import type { ImportMap } from '@ms-cloudpack/import-map'; import type { PartialContext } from '@ms-cloudpack/api-server'; /** * Rewrites bare module imports in source code to use full URLs from the import map. * This allows workers (including service workers) and their dependencies to function without es-module-shims. * * @param source - The original source code * @param importMap - The import map to resolve bare imports against * @param bundleServerUrl - The bundle server base URL for resolving relative paths * @returns The rewritten source code with all bare imports replaced with full URLs */ export declare function rewriteImports(source: string, importMap: ImportMap, bundleServerUrl?: string): Promise; /** * Reads a file and rewrites bare imports to use import map URLs. * This is used for workers and their nested imports. * * @param filePath - The file path to read and rewrite * @param context - The session context with importMap and config * @returns The rewritten source code */ export declare function rewriteImportsFromFile(filePath: string, context: PartialContext<'session', 'importMap' | 'urls' | 'config'>): Promise; //# sourceMappingURL=rewriteImports.d.ts.map