Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.

This commit is contained in:
becarta
2025-05-23 12:43:00 +02:00
parent f40db0f5c9
commit a544759a3b
11127 changed files with 1647032 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
/**
* @param {string} jsonPath
* @param {{specifier: URL | string, base?: URL}} options
* @returns {PackageConfig}
*/
export function read(jsonPath: string, { base, specifier }: {
specifier: URL | string;
base?: URL;
}): PackageConfig;
/**
* @param {URL | string} resolved
* @returns {PackageConfig}
*/
export function getPackageScopeConfig(resolved: URL | string): PackageConfig;
/**
* Returns the package type for a given URL.
* @param {URL} url - The URL to get the package type for.
* @returns {PackageType}
*/
export function getPackageType(url: URL): PackageType;
export type ErrnoException = import('./errors.js').ErrnoException;
export type PackageType = 'commonjs' | 'module' | 'none';
export type PackageConfig = {
pjsonPath: string;
exists: boolean;
main?: string | undefined;
name?: string | undefined;
type: PackageType;
exports?: Record<string, unknown> | undefined;
imports?: Record<string, unknown> | undefined;
};