eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
30 lines (29 loc) • 1.42 kB
TypeScript
type RolldownOutputChunk = {
readonly type: "chunk";
readonly code: string;
readonly fileName: string;
};
type RolldownOutputAsset = {
readonly type: "asset";
readonly fileName: string;
readonly source: string | Uint8Array;
};
type RolldownOutput = {
readonly output: readonly [RolldownOutputChunk, ...(RolldownOutputChunk | RolldownOutputAsset)[]];
};
export type RolldownBuild = (options: Record<string, unknown>) => Promise<RolldownOutput>;
type RolldownParseAst = (sourceText: string, options?: Record<string, unknown> | null, filename?: string) => unknown;
export type RolldownParserLanguage = "js" | "jsx" | "ts" | "tsx";
type RolldownParseAstModule = {
readonly parseAst: RolldownParseAst;
};
/**
* Loads Rolldown's parser from Nitro's dependency tree so workflow directive
* transforms can use the same bundler dependency without exposing it publicly.
*/
export declare function loadNitroRolldownParseAst(): Promise<RolldownParseAstModule>;
export declare function inferRolldownParserLanguage(filename: string): RolldownParserLanguage;
export declare function parseWithNitroRolldownAst(filename: string, sourceText: string): Promise<unknown>;
export declare function buildWithNitroRolldown(options: Record<string, unknown>): Promise<RolldownOutput>;
export declare function getSingleRolldownChunk(output: RolldownOutput, description: string): RolldownOutputChunk;
export {};