export interface EmittedStringModule { /** Path inside the package, e.g. `resolvers/pet-search-doc-resolver.ts`. */ fileName: string; /** Extensionless package subpath, e.g. `resolvers/pet-search-doc-resolver`. */ moduleSpecifier: string; content: string; } export declare const RESOLVER_MODULE_DIR = "resolvers"; export declare const SCHEMA_MODULE_DIR = "schema"; export declare function resolverModuleSpecifier(resolverFileName: string): string; export declare function sdlModuleSpecifier(sdlFileName: string): string; export declare function emitResolverStringModule(resolverFileName: string, source: string): EmittedStringModule; export declare function emitSdlStringModule(sdlFileName: string, source: string): EmittedStringModule; /** * Every string module the package ships, followed by the two barrels over * them. Empty when nothing was emitted, so a spec with no projections keeps * its previous output. */ export declare function collectStringModules(resolvers: EmittedStringModule[], pipelineFunctions: EmittedStringModule[], sdlModules: EmittedStringModule[]): EmittedStringModule[]; /** * Barrels for the string modules. The consumer of the manifest is * data-driven — it iterates `resolvers[]` and looks each entry's code up by * the specifier the manifest carries — so a per-resolver static import would * mean one hand-maintained import line per emitted file. The barrel is that * lookup: one static import per package, keyed by the same specifier the * manifest names, exhaustive over every file emission wrote. */ export declare function emitResolverBarrel(resolvers: EmittedStringModule[], pipelineFunctions: EmittedStringModule[]): EmittedStringModule; export declare function emitSdlBarrel(sdlModules: EmittedStringModule[]): EmittedStringModule; declare function toBinding(baseName: string): string; declare function moduleBaseName(fileName: string): string; /** * `JSON.stringify` covers every escape a JS/GraphQL body can carry — quotes, * backslashes, control characters — and `${` is inert in a double-quoted * literal. U+2028/U+2029 are legal in an ES2019 string literal but not in * every parser that reads the generated package, so they are escaped too. */ declare function toStringLiteral(source: string): string; export declare const __test: { moduleBaseName: typeof moduleBaseName; toStringLiteral: typeof toStringLiteral; toBinding: typeof toBinding; }; export {}; //# sourceMappingURL=emit-string-module.d.ts.map