import { CompilerContext } from '../context/index.ts'; import { AssetSpec, AssetTransformer } from '../publicTypes.ts'; import { ContextDirectories } from '../context/types.ts'; export declare function serveAssets(context: CompilerContext, assets: AssetSpec[], transformers?: AssetTransformer[]): void; export declare function writeAssets(context: CompilerContext, assets: AssetSpec[], transformers?: AssetTransformer[]): Promise; /** * If trying to serve a file and destination does not include file name, take * file name from source */ declare function addImplicitDistFileName(spec: AssetSpec): string; /** * Taking an absolute or relative destination path, resolve it as follows: * - Make absolute path be relative to the output base * - Prepend relative path with the serve base * - Ensure the resulting path does not escape above the output directory * - Ensure the path separators are correct for the current system */ declare function resolveDistPath({ dist, distCdnAssets }: Pick, rawDestination: string): string; /** * Take a resolved absolute file path in the dist directory, and from it infer * the path at which the file will be served. */ declare function resolveServePath(baseUrl: string, resolvedDistPath: string, distCdnDir: string): string; /** * Given an array of absolute paths, make sure a parent directory for each file * exists */ export declare function makeDirectoriesForFiles(files: readonly string[]): Promise; export declare const minifyJsonTransformer: AssetTransformer; export declare const defaultAssetTransformers: AssetTransformer[]; export declare const exportsForTests: { addImplicitDistFileName: typeof addImplicitDistFileName; resolveDistPath: typeof resolveDistPath; resolveServePath: typeof resolveServePath; }; export {};