@hey-api/codegen-core 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -6
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +730 -375
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +983 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +9 -5
- package/dist/index.d.ts +0 -628
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["Ref","T","Refs","K","FromRef","V","FromRefs","IProjectRenderMeta","ISymbolMeta","File","Language","IAnalysisContext","Symbol","INode","T","ISymbolMeta","Symbol","BindingKind","ISymbolIdentifier","SymbolKind","SymbolNameSanitizer","ISymbolIn","ReadonlyArray","ISymbolRegistry","IterableIterator","Ref","Symbol","SymbolKind","AssignOptions","NameScopes","ReadonlyArray","Input","Set","Map","NameConflictResolver","Scope","Array","IAnalysisContext","NameConflictResolver","Extensions","Language","ReadonlyArray","Record","Partial","NameConflictResolvers","Language","File","FileKeyArgs","Required","Pick","Partial","IFileIn","IFileRegistry","IterableIterator","INode","INodeRegistry","Iterable","IOutput","IProjectRenderMeta","File","IProject","RenderContext","Renderer","IProjectRenderMeta","IFileRegistry","Extensions","NameConflictResolvers","INodeRegistry","IOutput","NameConflictResolver","Renderer","ISymbolRegistry","IProject","ReadonlyArray","File","BindingKind","ExportMember","ExportModule","Pick","Array","ImportMember","ImportModule"],"sources":["../src/refs/types.d.ts","../src/extensions.d.ts","../src/nodes/node.d.ts","../src/symbols/types.d.ts","../src/symbols/symbol.ts","../src/planner/types.d.ts","../src/languages/types.d.ts","../src/files/types.d.ts","../src/nodes/types.d.ts","../src/output.d.ts","../src/renderer.d.ts","../src/project/types.d.ts","../src/files/file.ts","../src/bindings.d.ts","../src/brands.ts","../src/debug.ts","../src/guards.ts","../src/languages/extensions.ts","../src/languages/resolvers.ts","../src/planner/resolvers.ts","../src/files/registry.ts","../src/nodes/registry.ts","../src/symbols/registry.ts","../src/project/project.ts","../src/refs/refs.ts"],"sourcesContent":["/**\n * Ref wrapper which ensures a stable reference for a value.\n *\n * @example\n * ```ts\n * type NumRef = Ref<number>; // { '~ref': number }\n * const num: NumRef = { '~ref': 42 };\n * console.log(num['~ref']); // 42\n * ```\n */\nexport type Ref<T> = { '~ref': T };\n\n/**\n * Maps every property of `T` to a `Ref` of that property.\n *\n * @example\n * ```ts\n * type Foo = { a: number; b: string };\n * type Refs = Refs<Foo>; // { a: Ref<number>; b: Ref<string> }\n * const refs: Refs = { a: { '~ref': 1 }, b: { '~ref': 'x' } };\n * console.log(refs.a['~ref'], refs.b['~ref']); // 1 'x'\n * ```\n */\nexport type Refs<T> = {\n [K in keyof T]: Ref<T[K]>;\n};\n\n/**\n * Unwraps a Ref to its value type.\n *\n * @example\n * ```ts\n * type N = FromRef<{ '~ref': number }>; // number\n * ```\n */\nexport type FromRef<T> = T extends Ref<infer V> ? V : T;\n\n/**\n * Maps every property of a Ref-wrapped object back to its plain value.\n *\n * @example\n * ```ts\n * type Foo = { a: number; b: string };\n * type Refs = Refs<Foo>; // { a: Ref<number>; b: Ref<string> }\n * type Foo2 = FromRefs<Refs>; // { a: number; b: string }\n * ```\n */\nexport type FromRefs<T> = {\n [K in keyof T]: T[K] extends Ref<infer V> ? V : T[K];\n};\n","/**\n * Arbitrary metadata passed to the project's render function.\n *\n * Implementers should extend this interface for their own needs.\n */\nexport interface IProjectRenderMeta {\n [key: string]: unknown;\n}\n\n/**\n * Additional metadata about the symbol.\n *\n * Implementers should extend this interface for their own needs.\n */\nexport interface ISymbolMeta {\n [key: string]: unknown;\n}\n","import type { File } from '../files/file';\nimport type { Language } from '../languages/types';\nimport type { IAnalysisContext } from '../planner/types';\nimport type { Symbol } from '../symbols/symbol';\n\nexport interface INode<T = unknown> {\n /** Perform semantic analysis. */\n analyze(ctx: IAnalysisContext): void;\n /** Whether this node is exported from its file. */\n exported?: boolean;\n /** The file this node belongs to. */\n file?: File;\n /** The programming language associated with this node */\n language: Language;\n /** Parent node in the syntax tree. */\n parent?: INode;\n /** Root node of the syntax tree. */\n root?: INode;\n /** The symbol associated with this node. */\n symbol?: Symbol;\n /** Convert this node into AST representation. */\n toAst(): T;\n /** Brand used for renderer dispatch. */\n readonly '~brand': string;\n}\n","import type { ISymbolMeta } from '../extensions';\nimport type { Symbol } from './symbol';\n\nexport type BindingKind = 'default' | 'named' | 'namespace';\n\nexport type ISymbolIdentifier = number | ISymbolMeta;\n\nexport type SymbolKind =\n | 'class'\n | 'enum'\n | 'function'\n | 'interface'\n | 'namespace'\n | 'type'\n | 'var';\n\nexport type SymbolNameSanitizer = (name: string) => string;\n\nexport type ISymbolIn = {\n /**\n * Array of file names (without extensions) from which this symbol is re-exported.\n *\n * @default undefined\n */\n exportFrom?: ReadonlyArray<string>;\n /**\n * Whether this symbol is exported from its own file.\n *\n * @default false\n */\n exported?: boolean;\n /**\n * External module name if this symbol is imported from a module not managed\n * by the project (e.g. \"zod\", \"lodash\").\n *\n * @default undefined\n */\n external?: string;\n /**\n * Optional output strategy to override default behavior.\n *\n * @returns The file path to output the symbol to, or undefined to fallback to default behavior.\n */\n getFilePath?: Symbol['getFilePath'];\n /**\n * Kind of import if this symbol represents an import.\n */\n importKind?: BindingKind;\n /**\n * Kind of symbol.\n */\n kind?: SymbolKind;\n /**\n * Arbitrary metadata about the symbol.\n *\n * @default undefined\n */\n meta?: ISymbolMeta;\n /**\n * The intended, user-facing name of the symbol before any conflict resolution.\n * It is **not** guaranteed to be the final emitted name — aliasing may occur if the\n * file contains conflicting local identifiers or other symbols with the same intended name.\n *\n * @example \"UserModel\"\n */\n name: string;\n};\n\nexport interface ISymbolRegistry {\n /**\n * Get a symbol.\n *\n * @param identifier Symbol identifier to reference.\n * @returns The symbol, or undefined if not found.\n */\n get(identifier: ISymbolIdentifier): Symbol | undefined;\n /**\n * Returns whether a symbol is registered in the registry.\n *\n * @param identifier Symbol identifier to check.\n * @returns True if the symbol is registered, false otherwise.\n */\n isRegistered(identifier: ISymbolIdentifier): boolean;\n /**\n * Returns the current symbol ID and increments it.\n *\n * @returns Symbol ID before being incremented.\n */\n readonly nextId: number;\n /**\n * Queries symbols by metadata filter.\n *\n * @param filter Metadata filter to query symbols by.\n * @returns Array of symbols matching the filter.\n */\n query(filter: ISymbolMeta): ReadonlyArray<Symbol>;\n /**\n * References a symbol.\n *\n * @param meta Metadata filter to reference symbol by.\n * @returns The referenced symbol.\n */\n reference(meta: ISymbolMeta): Symbol;\n /**\n * Register a symbol globally.\n *\n * Deduplicates identical symbols by ID.\n *\n * @param symbol Symbol to register.\n * @returns The registered symbol.\n */\n register(symbol: ISymbolIn): Symbol;\n /**\n * Get all symbols in the order they were registered.\n *\n * @returns Array of all registered symbols, in insert order.\n */\n registered(): IterableIterator<Symbol>;\n}\n","import type { Ref } from '../refs/types';\nimport type { Symbol } from '../symbols/symbol';\nimport type { SymbolKind } from '../symbols/types';\n\nexport type AssignOptions = {\n /** The primary scope in which to assign a symbol's final name. */\n scope: NameScopes;\n /** Additional scopes to update as side effects when assigning a symbol's final name. */\n scopesToUpdate: ReadonlyArray<NameScopes>;\n};\n\nexport type Input = Ref<object> | object | string | number | undefined;\n\nexport type NameScopes = Map<string, Set<SymbolKind>>;\n\nexport type NameConflictResolver = (args: {\n attempt: number;\n baseName: string;\n}) => string | null;\n\nexport type Scope = {\n /** Child scopes. */\n children: Array<Scope>;\n /** Resolved names in this scope. */\n localNames: NameScopes;\n /** Parent scope, if any. */\n parent?: Scope;\n /** Symbols registered in this scope. */\n symbols: Array<Ref<Symbol>>;\n};\n\nexport interface IAnalysisContext {\n /** Register a dependency on another symbol. */\n addDependency(symbol: Ref<Symbol>): void;\n /** Register a dependency on another symbol or analyze further. */\n analyze(input: Input): void;\n /** Get local names in the current scope. */\n localNames(scope: Scope): NameScopes;\n /** Pop the current local scope. */\n popScope(): void;\n /** Push a new local scope. */\n pushScope(): void;\n /** Current local scope. */\n scope: Scope;\n /** Stack of local name scopes. */\n scopes: Scope;\n /** Top-level symbol for the current analysis pass. */\n symbol?: Symbol;\n /** Walks all symbols in the scope tree in depth-first order. */\n walkScopes(\n callback: (symbol: Ref<Symbol>, scope: Scope) => void,\n scope?: Scope,\n ): void;\n}\n","import type { NameConflictResolver } from '../planner/types';\n\nexport type Extensions = Partial<Record<Language, ReadonlyArray<string>>>;\n\nexport type Language =\n | 'c'\n | 'c#'\n | 'c++'\n | 'css'\n | 'dart'\n | 'go'\n | 'haskell'\n | 'html'\n | 'java'\n | 'javascript'\n | 'json'\n | 'kotlin'\n | 'lua'\n | 'markdown'\n | 'matlab'\n | 'perl'\n | 'php'\n | 'python'\n | 'r'\n | 'ruby'\n | 'rust'\n | 'scala'\n | 'shell'\n | 'sql'\n | 'swift'\n | 'typescript'\n | 'yaml'\n | (string & {}); // other/custom language\n\nexport type NameConflictResolvers = Partial<\n Record<Language, NameConflictResolver>\n>;\n","import type { Language } from '../languages/types';\nimport type { File } from './file';\n\nexport type FileKeyArgs = Pick<Required<File>, 'logicalFilePath'> &\n Pick<Partial<File>, 'external' | 'language'>;\n\nexport type IFileIn = {\n /**\n * Indicates whether the file is external, meaning it is not generated\n * as part of the project but is referenced (e.g., a module from\n * node_modules).\n *\n * @example true\n */\n external?: boolean;\n /**\n * Language of the file.\n *\n * @example \"typescript\"\n */\n language?: Language;\n /**\n * Logical, extension-free path used for planning and routing.\n *\n * @example \"src/models/user\"\n */\n logicalFilePath: string;\n /**\n * The desired name for the file within the project. If there are multiple files\n * with the same desired name, this might not end up being the actual name.\n *\n * @example \"UserModel\"\n */\n name?: string;\n};\n\nexport interface IFileRegistry {\n /**\n * Get a file.\n *\n * @returns The file, or undefined if not found.\n */\n get(args: FileKeyArgs): File | undefined;\n /**\n * Returns whether a file is registered in the registry.\n *\n * @returns True if the file is registered, false otherwise.\n */\n isRegistered(args: FileKeyArgs): boolean;\n /**\n * Returns the current file ID and increments it.\n *\n * @returns File ID before being incremented\n */\n readonly nextId: number;\n /**\n * Register a file globally.\n *\n * @param file File to register.\n * @returns Newly registered file if created, merged file otherwise.\n */\n register(file: IFileIn): File;\n /**\n * Get all files in the order they were registered.\n *\n * @returns Array of all registered files, in insert order.\n */\n registered(): IterableIterator<File>;\n}\n","import type { INode } from './node';\n\nexport interface INodeRegistry {\n /**\n * Register a syntax node.\n *\n * @returns The index of the registered node.\n */\n add(node: INode | null): number;\n /**\n * All nodes in insertion order.\n */\n all(): Iterable<INode>;\n /**\n * Remove a node by its index.\n *\n * @param index Index of the node to remove.\n */\n remove(index: number): void;\n /**\n * Update a node at the given index.\n *\n * @param index Index of the node to update.\n * @param node New node to set.\n */\n update(index: number, node: INode | null): void;\n}\n","export interface IOutput {\n /**\n * The main content of the file to output.\n *\n * A raw string representing source code.\n *\n * @example \"function foo(): void {\\n // implementation\\n}\\n\"\n */\n content: string;\n /**\n * Logical output path (used for writing the file).\n *\n * @example \"models/user.ts\"\n */\n path: string;\n}\n","import type { IProjectRenderMeta } from './extensions';\nimport type { File } from './files/file';\nimport type { IProject } from './project/types';\n\nexport interface RenderContext {\n /**\n * The current file.\n */\n file: File;\n /**\n * Arbitrary metadata.\n */\n meta?: IProjectRenderMeta;\n /**\n * The project the file belongs to.\n */\n project: IProject;\n}\n\nexport interface Renderer {\n /** Renders the given file. */\n render(ctx: RenderContext): string;\n /** Returns whether this renderer can render the given file. */\n supports(ctx: RenderContext): boolean;\n}\n","import type { IProjectRenderMeta } from '../extensions';\nimport type { IFileRegistry } from '../files/types';\nimport type { Extensions, NameConflictResolvers } from '../languages/types';\nimport type { INodeRegistry } from '../nodes/types';\nimport type { IOutput } from '../output';\nimport type { NameConflictResolver } from '../planner/types';\nimport type { Renderer } from '../renderer';\nimport type { ISymbolRegistry } from '../symbols/types';\n\n/**\n * Represents a code generation project consisting of codegen files.\n *\n * Manages imports, symbols, and output generation across the project.\n */\nexport interface IProject {\n /**\n * The default file to assign symbols without a specific file selector.\n *\n * @default 'main'\n */\n readonly defaultFileName: string;\n /** Default name conflict resolver used when a file has no specific resolver. */\n readonly defaultNameConflictResolver: NameConflictResolver;\n /** Maps language to array of extensions. First element is used by default. */\n readonly extensions: Extensions;\n /**\n * Function to transform file names before they are used.\n *\n * @param name The original file name.\n * @returns The transformed file name.\n */\n readonly fileName?: (name: string) => string;\n /** Centralized file registry for the project. */\n readonly files: IFileRegistry;\n /** Map of language-specific name conflict resolvers for files in the project. */\n readonly nameConflictResolvers: NameConflictResolvers;\n /** Centralized node registry for the project. */\n readonly nodes: INodeRegistry;\n /**\n * Produces output representations for all files in the project.\n *\n * @param meta Arbitrary metadata.\n * @returns Array of outputs ready for writing or further processing.\n * @example\n * project.render().forEach(output => writeFile(output));\n */\n render(meta?: IProjectRenderMeta): ReadonlyArray<IOutput>;\n /**\n * List of available renderers.\n *\n * @example\n * [new TypeScriptRenderer()]\n */\n readonly renderers: ReadonlyArray<Renderer>;\n /** The absolute path to the root folder of the project. */\n readonly root: string;\n /** Centralized symbol registry for the project. */\n readonly symbols: ISymbolRegistry;\n}\n","import type { File } from './files/file';\nimport type { BindingKind } from './symbols/types';\n\nexport interface ExportMember {\n /**\n * Name under which the symbol is exported in this file.\n *\n * export { Foo as Bar } from \"./models\"\n *\n * exportedName === \"Bar\"\n */\n exportedName: string;\n /** Whether this export is type-only. */\n isTypeOnly: boolean;\n /** Export flavor. */\n kind: BindingKind;\n /** The exported name of the symbol in its source file. */\n sourceName: string;\n}\n\nexport type ExportModule = Pick<ExportMember, 'isTypeOnly'> & {\n /** Whether this module can export all symbols: `export * from 'module'`. */\n canExportAll: boolean;\n /** Members exported from this module. */\n exports: Array<ExportMember>;\n /** Source file. */\n from: File;\n /** Namespace export: `export * as ns from 'module'`. Mutually exclusive with `exports`. */\n namespaceExport?: string;\n};\n\nexport interface ImportMember {\n /** Whether this import is type-only. */\n isTypeOnly: boolean;\n /** Import flavor. */\n kind: BindingKind;\n /**\n * The name this symbol will have locally in this file.\n * This is where aliasing is applied:\n *\n * import { Foo as Foo$2 } from \"./x\"\n *\n * localName === \"Foo$2\"\n */\n localName: string;\n /** The exported name of the symbol in its source file. */\n sourceName: string;\n}\n\nexport type ImportModule = Pick<ImportMember, 'isTypeOnly'> & {\n /** Source file. */\n from: File;\n /** List of symbols imported from this module. */\n imports: Array<ImportMember>;\n /** Namespace import: `import * as name from 'module'`. Mutually exclusive with `imports`. */\n namespaceImport?: string;\n};\n"],"mappings":";;;;;;;AAUA,CAAA,CAAA,CAAA,CAAA;AAaA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;AAYYI,IAAAA,CAzBAJ,GAyBO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAC;EAAAA,CAAAA,CAAAA,GAAAA,CAAA,CAAA,CAzBYA,CAyBZ;AAAA,CAAA;;;;;AAYnB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;AACoDE,IAAAA,CAzBxCD,IAyBwCC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAC,KAAA,CAxBvCF,CAwBuC,CAAA,CAAA,CAxBnCD,GAwBmC,CAxB/BC,CAwB+B,CAxB7BE,CAwB6B,CAAA,CAAA,CAAA;;AC3CrD,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,GAAA,CAAA,EAAA,CAAA,GAAA,CAAA,KAAA,CAAA,IAAA;AASA,CAAA;;;;ACTA,CAAA,CAAA,CAAA,CAAA,CAAA;;AAMSM,IAAAA,CFwBGL,OExBHK,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CFwBgBR,CExBhBQ,CAAAA,OAAAA,CFwB0BT,GExB1BS,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CFwByCJ,CExBzCI,CAAAA,CAAAA,CFw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CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CsBoCL,CtBpCK,CAAA,CAAA,CAAA,CAAA,CsBqCT,QtBrCS,CsBqCA,CtBrCA,CAAA;;;;AClBZ,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,KAAA,CAAA,KAAA,CAAA,EAAA,CAAA;AAEA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,IAAA,CAAA,EAAA,CAAA,GAAA,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA,MAAA;AAEA,CAAA,CAAA;AASYoB,OAAAA,CAAAA,KAAAA,CqB0DC,KrB1DkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,EAAA,CqB0DoB,GrB1DpB,CqB0DwB,CrB1DxB,CAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"ansi-colors";import t from"color-support";import n from"node:path";const r=`heyapi.node`,i=`heyapi.symbol`;e.enabled=t().hasBasic;const a={analyzer:e.greenBright,dsl:e.cyanBright,file:e.yellowBright,registry:e.blueBright,symbol:e.magentaBright};function o(t,n){let r=process.env.DEBUG;if(!r)return;let i=r.split(`,`).map(e=>e.trim().toLowerCase());if(!(i.includes(`*`)||i.includes(`heyapi:*`)||i.includes(`heyapi:${n}`)||i.includes(n)))return;let o=(a[n]??e.whiteBright)(`heyapi:${n}`);console.debug(`${o} ${t}`)}var s=class{_exports=[];_extension;_finalPath;_imports=[];_language;_logicalFilePath;_name;_nodes=[];_renderer;"~brand"=`heyapi.file`;allNames=new Map;external;id;project;topLevelNames=new Map;constructor(e,t,r){this.external=e.external??!1,this.id=t,e.language!==void 0&&(this._language=e.language),this._logicalFilePath=e.logicalFilePath.split(n.sep).join(`/`),e.name!==void 0&&(this._name=e.name),this.project=r}get exports(){return[...this._exports]}get extension(){if(this._extension)return this._extension;let e=this.language,t=e?this.project.extensions[e]:void 0;if(t&&t[0])return t[0]}get finalPath(){return this._finalPath?this._finalPath:[...this._logicalFilePath?this._logicalFilePath.split(`/`).slice(0,-1):[],`${this.name}${this.extension??``}`].join(`/`)}get imports(){return[...this._imports]}get language(){if(this._language)return this._language;if(this._nodes[0])return this._nodes[0].language}get logicalFilePath(){return this._logicalFilePath}get name(){if(this._name)return this._name;let e=this._logicalFilePath.split(`/`).pop();if(e)return e;let t=`File ${this.toString()} has no name`;throw o(t,`file`),Error(t)}get nodes(){return[...this._nodes]}get renderer(){return this._renderer}addExport(e){this._exports.push(e)}addImport(e){this._imports.push(e)}addNode(e){this._nodes.push(e),e.file=this}setExtension(e){this._extension=e}setFinalPath(e){this._finalPath=e}setLanguage(e){this._language=e}setName(e){this._name=e}setRenderer(e){this._renderer=e}toString(){return`[File ${this._logicalFilePath}#${this.id}]`}};function c(e,t){return!e||typeof e!=`object`?!1:e[`~brand`]===t}function l(e){return!e||typeof e!=`object`?!1:c(e,r)}function u(e){return c(e[`~ref`],r)}function d(e){return c(e,i)}function f(e){return c(e[`~ref`],i)}const p={c:[`.c`],"c#":[`.cs`],"c++":[`.cpp`,`.hpp`],css:[`.css`],dart:[`.dart`],go:[`.go`],haskell:[`.hs`],html:[`.html`],java:[`.java`],javascript:[`.js`,`.jsx`],json:[`.json`],kotlin:[`.kt`],lua:[`.lua`],markdown:[`.md`],matlab:[`.m`],perl:[`.pl`],php:[`.php`],python:[`.py`],r:[`.r`],ruby:[`.rb`],rust:[`.rs`],scala:[`.scala`],shell:[`.sh`],sql:[`.sql`],swift:[`.swift`],typescript:[`.ts`,`.tsx`],yaml:[`.yaml`,`.yml`]},m=({attempt:e,baseName:t})=>e===0?t:`${t}${e+1}`,h=({attempt:e,baseName:t})=>e===0?t:`${t}_${e+1}`,g={php:h,python:h,ruby:h};var _=class{_id=0;_values=new Map;project;constructor(e){this.project=e}get(e){return this._values.get(this.createFileKey(e))}isRegistered(e){return this._values.has(this.createFileKey(e))}get nextId(){return this._id++}register(e){let t=this.createFileKey(e),n=this._values.get(t);return n?e.name&&n.setName(e.name):n=new s(e,this.nextId,this.project),this._values.set(t,n),n}*registered(){for(let e of this._values.values())yield e}createFileKey(e){let t=e.logicalFilePath.split(n.sep).join(`/`);return`${e.external?`ext:`:``}${t}${e.language?`:${e.language}`:``}`}};const v=e=>({"~ref":e}),y=e=>{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=v(e[n]));return t},b=e=>e?.[`~ref`],x=e=>{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=b(e[n]));return t},S=e=>typeof e==`object`&&!!e&&`~ref`in e;var C=class{list=[];add(e){return this.list.push(v(e))-1}*all(){for(let e of this.list){let t=b(e);t&&(yield t)}}remove(e){this.list[e]=v(null)}update(e,t){this.list[e]=v(t)}};function w(e,t){if(e===`interface`&&t===`interface`)return!0;if(e===`interface`&&t===`type`||e===`type`&&t===`interface`||e===`type`&&t===`type`)return!1;if(e===`interface`&&t===`class`||e===`class`&&t===`interface`||e===`enum`&&t===`namespace`||e===`namespace`&&t===`enum`||e===`class`&&t===`namespace`||e===`namespace`&&t===`class`||e===`namespace`&&t===`namespace`)return!0;if(e===`enum`&&t===`enum`)return!1;if(e===`function`&&t===`namespace`||e===`namespace`&&t===`function`)return!0;let n=new Set([`class`,`enum`,`function`,`var`]),r=n.has(e),i=n.has(t);if(r&&i)return!1;let a=new Set([`interface`,`type`]);return a.has(e),a.has(t),!0}const T=e=>({children:[],localNames:new Map,parent:e,symbols:[]});var E=class{scopes=T();symbol;scope=this.scopes;constructor(e){this.symbol=e}addDependency(e){this.symbol!==b(e)&&this.scope.symbols.push(e)}analyze(e){let t=S(e)?e:v(e);f(t)?this.addDependency(t):u(t)&&b(t).analyze(this)}localNames(e){let t=new Map;for(let[n,r]of e.localNames)t.set(n,new Set(r));if(e.parent){let n=this.localNames(e.parent);for(let[e,r]of n)if(!t.has(e))t.set(e,r);else{let n=t.get(e);for(let e of r)n.add(e)}}return t}popScope(){this.scope=this.scope.parent??this.scope}pushScope(){let e=T(this.scope);this.scope.children.push(e),this.scope=e}walkScopes(e,t=this.scopes){this.scope=t;for(let n of t.symbols)e(n,t);for(let n of t.children)t=n,this.walkScopes(e,t);this.scope=this.scopes}},D=class{nodeCache=new WeakMap;analyzeNode(e){let t=this.nodeCache.get(e);if(t)return t;let n=new E(e.symbol);return e.analyze(n),this.nodeCache.set(e,n),n}analyze(e,t){for(let n of e){let e=this.analyzeNode(n);t?.(e,n)}}};const O=e=>e===`type`||e===`interface`;var k=class{analyzer=new D;cacheResolvedNames=new Set;project;constructor(e){this.project=e}plan(e){this.cacheResolvedNames.clear(),this.allocateFiles(),this.assignLocalNames(),this.resolveFilePaths(e),this.planExports(),this.planImports()}allocateFiles(){this.analyzer.analyze(this.project.nodes.all(),(e,t)=>{let n=t.symbol;if(!n)return;let r=this.project.files.register(this.symbolToFileIn(n));r.addNode(t),n.setFile(r);for(let e of n.exportFrom)this.project.files.register({external:!1,language:r.language,logicalFilePath:e});e.walkScopes(e=>{let t=b(e);if(t.external&&t.isCanonical&&!t.file){let e=this.project.files.register(this.symbolToFileIn(t));t.setFile(e)}})})}assignLocalNames(){this.analyzer.analyze(this.project.nodes.all(),(e,t)=>{let n=t.symbol;n&&this.assignTopLevelName(n,e)}),this.analyzer.analyze(this.project.nodes.all(),(e,t)=>{let n=t.file;n&&e.walkScopes(t=>{let r=b(t);r.file||this.assignLocalName(r,e,{scopesToUpdate:[n.allNames]})})})}resolveFilePaths(e){for(let t of this.project.files.registered()){if(t.external)continue;let r=this.project.fileName?.(t.name)||t.name;t.setName(r);let i=t.finalPath;i&&t.setFinalPath(n.resolve(this.project.root,i));let a={file:t,meta:e,project:this.project},o=this.project.renderers.find(e=>e.supports(a));o&&t.setRenderer(o)}}planExports(){let e=new Map,t=new Map;this.analyzer.analyze(this.project.nodes.all(),(n,r)=>{if(!r.exported)return;let i=r.symbol;if(!i)return;let a=r.file;if(a)for(let o of i.exportFrom){let s=this.project.files.register({external:!1,language:r.language,logicalFilePath:o});if(s.id===a.id)continue;let c=e.get(s);c||(c=new Map,e.set(s,c));let l=this.project.symbols.register({exported:!0,external:i.external,importKind:i.importKind,kind:i.kind,name:i.finalName});l.setFile(s),t.set(l.id,a),this.assignTopLevelName(l,n);let u=c.get(l.finalName);u||(u={kinds:new Set,symbol:l},c.set(l.finalName,u)),u.kinds.add(l.kind)}});for(let[n,r]of e){let e=new Map;for(let[,n]of r){let r=t.get(n.symbol.id),i=e.get(r);i||={canExportAll:!0,exports:[],from:r,isTypeOnly:!0};let a=[...n.kinds].every(e=>O(e)),o=n.symbol.finalName;i.exports.push({exportedName:o,isTypeOnly:a,kind:n.symbol.importKind,sourceName:n.symbol.name}),n.symbol.name!==n.symbol.finalName&&(i.canExportAll=!1),a||(i.isTypeOnly=!1),e.set(r,i)}for(let[,t]of e)n.addExport(t)}}planImports(){let e=new Map;this.analyzer.analyze(this.project.nodes.all(),t=>{let n=t.symbol;if(!n)return;let r=n.file;if(!r)return;let i=e.get(r);i||(i=new Map,e.set(r,i)),t.walkScopes(e=>{let n=b(e);if(!n.file||n.file.id===r.id)return;n.external&&this.assignTopLevelName(n,t);let a=n.file.id,o=n.finalName,s=O(n.kind),c=`${a}|${o}|${n.importKind}|${s}`,l=i.get(c);if(!l){let e=this.project.symbols.register({exported:n.exported,external:n.external,importKind:n.importKind,kind:n.kind,name:n.finalName});e.setFile(r),this.assignTopLevelName(e,t,{scope:e.file.allNames}),l={dep:n,kinds:new Set,symbol:e},i.set(c,l),l.kinds.add(e.kind)}e[`~ref`]=l.symbol})});for(let[t,n]of e){let e=new Map;for(let[,t]of n){let n=t.dep.file,r=e.get(n);r||={from:n,imports:[],isTypeOnly:!0};let i=[...t.kinds].every(e=>O(e));t.symbol.importKind===`namespace`?(r.imports=[],r.namespaceImport=t.symbol.finalName):r.imports.push({isTypeOnly:i,kind:t.symbol.importKind,localName:t.symbol.finalName,sourceName:t.dep.finalName}),i||(r.isTypeOnly=!1),e.set(n,r)}for(let[,n]of e)t.addImport(n)}}assignTopLevelName(e,t,n){e.file&&this.assignSymbolName(e,{scope:n?.scope??e.file.topLevelNames,scopesToUpdate:[e.file.allNames,t.scopes.localNames,...n?.scopesToUpdate??[]]})}assignLocalName(e,t,n){this.assignSymbolName(e,{scope:n.scope??t.localNames(t.scope),scopesToUpdate:n.scopesToUpdate})}assignSymbolName(e,t){if(this.cacheResolvedNames.has(e.id))return;let n=e.name,r=e.nameSanitizer?.(n)??n,i=1;for(;![...t.scope.get(r)??[]].every(t=>w(e.kind,t));){let t=e.node?.language||e.file?.language,a=((t?this.project.nameConflictResolvers[t]:void 0)??this.project.defaultNameConflictResolver)({attempt:i,baseName:n});if(!a)throw Error(`Unresolvable name conflict: ${e.toString()}`);r=e.nameSanitizer?.(a)??a,i+=1}e.setFinalName(r),this.cacheResolvedNames.add(e.id);let a=[t.scope,...t.scopesToUpdate];for(let t of a)this.updateScope(e,t)}updateScope(e,t){let n=e.finalName,r=t.get(n)??new Set;r.add(e.kind),t.set(n,r)}symbolToFileIn(e){return{external:!!e.external,language:e.node?.language,logicalFilePath:e.external||e.getFilePath?.(e)||this.project.defaultFileName}}},A=class{_canonical;_exported;_exportFrom;_external;_file;_finalName;_getFilePath;_importKind;_kind;_meta;_name;_nameSanitizer;_node;"~brand"=i;id;constructor(e,t){this._exported=e.exported??!1,this._exportFrom=e.exportFrom??[],this._external=e.external,this._getFilePath=e.getFilePath,this.id=t,this._importKind=e.importKind??`named`,this._kind=e.kind??`var`,this._meta=e.meta,this._name=e.name}get canonical(){return this._canonical??this}get exported(){return this.canonical._exported}get exportFrom(){return this.canonical._exportFrom}get external(){return this.canonical._external}get file(){return this.canonical._file}get finalName(){if(!this.canonical._finalName){let e=`Symbol finalName has not been resolved yet for ${this.canonical.toString()}`;throw o(e,`symbol`),Error(e)}return this.canonical._finalName}get getFilePath(){return this.canonical._getFilePath}get importKind(){return this.canonical._importKind}get isCanonical(){return!this._canonical||this._canonical===this}get kind(){return this.canonical._kind}get meta(){return this.canonical._meta}get name(){return this.canonical._name}get nameSanitizer(){return this.canonical._nameSanitizer}get node(){return this.canonical._node}setCanonical(e){this._canonical=e}setExported(e){this.assertCanonical(),this._exported=e}setExportFrom(e){this.assertCanonical(),this._exportFrom=e}setFile(e){if(this.assertCanonical(),this._file&&this._file!==e){let e=`Symbol ${this.canonical.toString()} is already assigned to a different file.`;throw o(e,`symbol`),Error(e)}this._file=e}setFinalName(e){if(this.assertCanonical(),this._finalName&&this._finalName!==e){let e=`Symbol finalName has already been resolved for ${this.canonical.toString()}.`;throw o(e,`symbol`),Error(e)}this._finalName=e}setImportKind(e){this.assertCanonical(),this._importKind=e}setKind(e){this.assertCanonical(),this._kind=e}setName(e){this.assertCanonical(),this._name=e}setNameSanitizer(e){this.assertCanonical(),this._nameSanitizer=e}setNode(e){if(this.assertCanonical(),this._node&&this._node!==e){let e=`Symbol ${this.canonical.toString()} is already bound to a different node.`;throw o(e,`symbol`),Error(e)}this._node=e,e.symbol=this}toString(){return`[Symbol ${this.name}#${this.id}]`}assertCanonical(){if(this._canonical&&this._canonical!==this){let e=`Illegal mutation of stub symbol ${this.toString()} → canonical: ${this._canonical.toString()}`;throw o(e,`symbol`),Error(e)}}},j=class{_id=0;_indices=new Map;_queryCache=new Map;_queryCacheDependencies=new Map;_registered=new Set;_stubs=new Set;_stubCache=new Map;_values=new Map;get(e){return typeof e==`number`?this._values.get(e):this.query(e)[0]}isRegistered(e){let t=this.get(e);return t?this._registered.has(t.id):!1}get nextId(){return this._id++}query(e){let t=this.buildCacheKey(e),n=this._queryCache.get(t);if(n)return n.map(e=>this._values.get(e));let r=[],i=this.buildIndexKeySpace(e),a=new Set,o=!1;for(let e of i){a.add(this.serializeIndexEntry(e));let t=this._indices.get(e[0]);if(!t){o=!0;break}let n=t.get(e[1]);if(!n){o=!0;break}r.push(n)}if(o||!r.length)return this._queryCacheDependencies.set(t,a),this._queryCache.set(t,[]),[];let s=new Set(r[0]);for(let e of r.slice(1))s=new Set([...s].filter(t=>e.has(t)));let c=[...s];return this._queryCacheDependencies.set(t,a),this._queryCache.set(t,c),c.map(e=>this._values.get(e))}reference(e){let[t]=this.query(e);if(t)return t;let n=this.buildCacheKey(e),r=this._stubCache.get(n);if(r!==void 0)return this._values.get(r);let i=new A({meta:e,name:``},this.nextId);return this._values.set(i.id,i),this._stubs.add(i.id),this._stubCache.set(n,i.id),i}register(e){let t=new A(e,this.nextId);if(this._values.set(t.id,t),this._registered.add(t.id),t.meta){let e=this.buildIndexKeySpace(t.meta);this.indexSymbol(t.id,e),this.invalidateCache(e),this.replaceStubs(t,e)}return t}*registered(){for(let e of this._registered.values())yield this._values.get(e)}buildCacheKey(e){return this.buildIndexKeySpace(e).map(e=>this.serializeIndexEntry(e)).sort().join(`|`)}buildIndexKeySpace(e,t=``){let n=[];for(let[r,i]of Object.entries(e)){let e=t?`${t}.${r}`:r;i&&typeof i==`object`&&!Array.isArray(i)?n.push(...this.buildIndexKeySpace(i,e)):n.push([e,i])}return n}indexSymbol(e,t){for(let[n,r]of t){this._indices.has(n)||this._indices.set(n,new Map);let t=this._indices.get(n),i=t.get(r)??new Set;i.add(e),t.set(r,i)}}invalidateCache(e){let t=e.map(e=>this.serializeIndexEntry(e));for(let[e,n]of this._queryCacheDependencies.entries())for(let r of t)if(n.has(r)){this._queryCacheDependencies.delete(e),this._queryCache.delete(e);break}}isSubset(e,t){let n=new Map(t);for(let[t,r]of e)if(!n.has(t)||n.get(t)!==r)return!1;return!0}replaceStubs(e,t){for(let n of this._stubs.values()){let r=this._values.get(n);if(r?.meta&&this.isSubset(this.buildIndexKeySpace(r.meta),t)){let t=this.buildCacheKey(r.meta);this._stubCache.delete(t),this._stubs.delete(n),r.setCanonical(e)}}}serializeIndexEntry(e){return`${e[0]}:${JSON.stringify(e[1])}`}},M=class{files;nodes=new C;symbols=new j;defaultFileName;defaultNameConflictResolver;extensions;fileName;nameConflictResolvers;renderers;root;constructor(e){let t=e.fileName;this.defaultFileName=e.defaultFileName??`main`,this.defaultNameConflictResolver=e.defaultNameConflictResolver??m,this.extensions={...p,...e.extensions},this.fileName=typeof t==`string`?()=>t:t,this.files=new _(this),this.nameConflictResolvers={...g,...e.nameConflictResolvers},this.renderers=e.renderers??[],this.root=n.resolve(e.root).replace(/[/\\]+$/,``)}render(e){new k(this).plan(e);let t=[];for(let n of this.files.registered())if(n.finalPath&&n.renderer){let r=n.renderer.render({file:n,meta:e,project:this});t.push({content:r,path:n.finalPath})}return t}};export{s as File,M as Project,A as Symbol,o as debug,p as defaultExtensions,g as defaultNameConflictResolvers,b as fromRef,x as fromRefs,l as isNode,u as isNodeRef,S as isRef,d as isSymbol,f as isSymbolRef,r as nodeBrand,v as ref,y as refs,m as simpleNameConflictResolver,i as symbolBrand,h as underscoreNameConflictResolver};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["path","defaultExtensions: Extensions","simpleNameConflictResolver: NameConflictResolver","underscoreNameConflictResolver: NameConflictResolver","defaultNameConflictResolvers: NameConflictResolvers","ref","names: NameScopes","file","ctx: RenderContext","sets: Array<Set<SymbolId>>","entries: Array<IndexEntry>","path","files: Array<IOutput>"],"sources":["../src/brands.ts","../src/debug.ts","../src/files/file.ts","../src/guards.ts","../src/languages/extensions.ts","../src/planner/resolvers.ts","../src/languages/resolvers.ts","../src/files/registry.ts","../src/refs/refs.ts","../src/nodes/registry.ts","../src/project/namespace.ts","../src/planner/analyzer.ts","../src/planner/planner.ts","../src/symbols/symbol.ts","../src/symbols/registry.ts","../src/project/project.ts"],"sourcesContent":["export const fileBrand = 'heyapi.file';\nexport const nodeBrand = 'heyapi.node';\nexport const symbolBrand = 'heyapi.symbol';\n","import colors from 'ansi-colors';\n// @ts-expect-error\nimport colorSupport from 'color-support';\n\ncolors.enabled = colorSupport().hasBasic;\n\nconst DEBUG_GROUPS = {\n analyzer: colors.greenBright,\n dsl: colors.cyanBright,\n file: colors.yellowBright,\n registry: colors.blueBright,\n symbol: colors.magentaBright,\n} as const;\n\nexport function debug(message: string, group: keyof typeof DEBUG_GROUPS) {\n const value = process.env.DEBUG;\n if (!value) return;\n\n const groups = value.split(',').map((x) => x.trim().toLowerCase());\n\n if (\n !(\n groups.includes('*') ||\n groups.includes('heyapi:*') ||\n groups.includes(`heyapi:${group}`) ||\n groups.includes(group)\n )\n ) {\n return;\n }\n\n const color = DEBUG_GROUPS[group] ?? colors.whiteBright;\n const prefix = color(`heyapi:${group}`);\n\n console.debug(`${prefix} ${message}`);\n}\n","import path from 'node:path';\n\nimport type { ExportModule, ImportModule } from '../bindings';\nimport { fileBrand } from '../brands';\nimport { debug } from '../debug';\nimport type { Language } from '../languages/types';\nimport type { INode } from '../nodes/node';\nimport type { NameScopes } from '../planner/types';\nimport type { IProject } from '../project/types';\nimport type { Renderer } from '../renderer';\nimport type { IFileIn } from './types';\n\nexport class File {\n /**\n * Exports from this file.\n */\n private _exports: Array<ExportModule> = [];\n /**\n * File extension (e.g. `.ts`).\n */\n private _extension?: string;\n /**\n * Actual emitted file path, including extension and directories.\n */\n private _finalPath?: string;\n /**\n * Imports to this file.\n */\n private _imports: Array<ImportModule> = [];\n /**\n * Language of the file.\n */\n private _language?: Language;\n /**\n * Logical, extension-free path used for planning and routing.\n */\n private _logicalFilePath: string;\n /**\n * Base name of the file (without extension).\n */\n private _name?: string;\n /**\n * Syntax nodes contained in this file.\n */\n private _nodes: Array<INode> = [];\n /**\n * Renderer assigned to this file.\n */\n private _renderer?: Renderer;\n\n /** Brand used for identifying files. */\n readonly '~brand' = fileBrand;\n /** All names defined in this file, including local scopes. */\n allNames: NameScopes = new Map();\n /** Whether this file is external to the project. */\n external: boolean;\n /** Unique identifier for the file. */\n readonly id: number;\n /** The project this file belongs to. */\n readonly project: IProject;\n /** Names declared at the top level of the file. */\n topLevelNames: NameScopes = new Map();\n\n constructor(input: IFileIn, id: number, project: IProject) {\n this.external = input.external ?? false;\n this.id = id;\n if (input.language !== undefined) this._language = input.language;\n this._logicalFilePath = input.logicalFilePath.split(path.sep).join('/');\n if (input.name !== undefined) this._name = input.name;\n this.project = project;\n }\n\n /**\n * Exports from this file.\n */\n get exports(): ReadonlyArray<ExportModule> {\n return [...this._exports];\n }\n\n /**\n * Read-only accessor for the file extension.\n */\n get extension(): string | undefined {\n if (this._extension) return this._extension;\n const language = this.language;\n const extension = language ? this.project.extensions[language] : undefined;\n if (extension && extension[0]) return extension[0];\n return;\n }\n\n /**\n * Read-only accessor for the final emitted path.\n *\n * If undefined, the file has not yet been assigned a final path\n * or is external to the project and should not be emitted.\n */\n get finalPath(): string | undefined {\n if (this._finalPath) return this._finalPath;\n const dirs = this._logicalFilePath\n ? this._logicalFilePath.split('/').slice(0, -1)\n : [];\n return [...dirs, `${this.name}${this.extension ?? ''}`].join('/');\n }\n\n /**\n * Imports to this file.\n */\n get imports(): ReadonlyArray<ImportModule> {\n return [...this._imports];\n }\n\n /**\n * Language of the file; inferred from nodes or fallback if not set explicitly.\n */\n get language(): Language | undefined {\n if (this._language) return this._language;\n if (this._nodes[0]) return this._nodes[0].language;\n return;\n }\n\n /**\n * Logical, extension-free path used for planning and routing.\n */\n get logicalFilePath(): string {\n return this._logicalFilePath;\n }\n\n /**\n * Base name of the file (without extension).\n *\n * If no name was set explicitly, it is inferred from the logical file path.\n */\n get name(): string {\n if (this._name) return this._name;\n const name = this._logicalFilePath.split('/').pop();\n if (name) return name;\n const message = `File ${this.toString()} has no name`;\n debug(message, 'file');\n throw new Error(message);\n }\n\n /**\n * Syntax nodes contained in this file.\n */\n get nodes(): ReadonlyArray<INode> {\n return [...this._nodes];\n }\n\n /**\n * Renderer assigned to this file.\n */\n get renderer(): Renderer | undefined {\n return this._renderer;\n }\n\n /**\n * Add an export group to the file.\n */\n addExport(group: ExportModule): void {\n this._exports.push(group);\n }\n\n /**\n * Add an import group to the file.\n */\n addImport(group: ImportModule): void {\n this._imports.push(group);\n }\n\n /**\n * Add a syntax node to the file.\n */\n addNode(node: INode): void {\n this._nodes.push(node);\n node.file = this;\n }\n\n /**\n * Sets the file extension.\n */\n setExtension(extension: string): void {\n this._extension = extension;\n }\n\n /**\n * Sets the final emitted path of the file.\n */\n setFinalPath(path: string): void {\n this._finalPath = path;\n }\n\n /**\n * Sets the language of the file.\n */\n setLanguage(lang: Language): void {\n this._language = lang;\n }\n\n /**\n * Sets the name of the file.\n */\n setName(name: string): void {\n this._name = name;\n }\n\n /**\n * Sets the renderer assigned to this file.\n */\n setRenderer(renderer: Renderer): void {\n this._renderer = renderer;\n }\n\n /**\n * Returns a debug‑friendly string representation identifying the file.\n */\n toString(): string {\n return `[File ${this._logicalFilePath}#${this.id}]`;\n }\n}\n","import { nodeBrand, symbolBrand } from './brands';\nimport type { INode } from './nodes/node';\nimport type { Ref } from './refs/types';\nimport type { Symbol } from './symbols/symbol';\n\nexport function isBrand(value: unknown, brand: string): value is INode {\n if (!value || typeof value !== 'object') return false;\n return (value as any)['~brand'] === brand;\n}\n\nexport function isNode(value: unknown): value is INode {\n if (!value || typeof value !== 'object') return false;\n return isBrand(value, nodeBrand);\n}\n\nexport function isNodeRef(value: Ref<unknown>): value is Ref<INode> {\n return isBrand(value['~ref'], nodeBrand);\n}\n\nexport function isSymbol(value: unknown): value is Symbol {\n return isBrand(value, symbolBrand);\n}\n\nexport function isSymbolRef(value: Ref<unknown>): value is Ref<Symbol> {\n return isBrand(value['~ref'], symbolBrand);\n}\n","import type { Extensions } from './types';\n\nexport const defaultExtensions: Extensions = {\n c: ['.c'],\n 'c#': ['.cs'],\n 'c++': ['.cpp', '.hpp'],\n css: ['.css'],\n dart: ['.dart'],\n go: ['.go'],\n haskell: ['.hs'],\n html: ['.html'],\n java: ['.java'],\n javascript: ['.js', '.jsx'],\n json: ['.json'],\n kotlin: ['.kt'],\n lua: ['.lua'],\n markdown: ['.md'],\n matlab: ['.m'],\n perl: ['.pl'],\n php: ['.php'],\n python: ['.py'],\n r: ['.r'],\n ruby: ['.rb'],\n rust: ['.rs'],\n scala: ['.scala'],\n shell: ['.sh'],\n sql: ['.sql'],\n swift: ['.swift'],\n typescript: ['.ts', '.tsx'],\n yaml: ['.yaml', '.yml'],\n};\n","import type { NameConflictResolver } from './types';\n\nexport const simpleNameConflictResolver: NameConflictResolver = ({\n attempt,\n baseName,\n}) => (attempt === 0 ? baseName : `${baseName}${attempt + 1}`);\n\nexport const underscoreNameConflictResolver: NameConflictResolver = ({\n attempt,\n baseName,\n}) => (attempt === 0 ? baseName : `${baseName}_${attempt + 1}`);\n","import { underscoreNameConflictResolver } from '../planner/resolvers';\nimport type { NameConflictResolvers } from './types';\n\nexport const defaultNameConflictResolvers: NameConflictResolvers = {\n php: underscoreNameConflictResolver,\n python: underscoreNameConflictResolver,\n ruby: underscoreNameConflictResolver,\n};\n","import path from 'node:path';\n\nimport type { IProject } from '../project/types';\nimport { File } from './file';\nimport type { FileKeyArgs, IFileIn, IFileRegistry } from './types';\n\ntype FileId = number;\ntype FileKey = string;\n\nexport class FileRegistry implements IFileRegistry {\n private _id: FileId = 0;\n private _values: Map<FileKey, File> = new Map();\n private readonly project: IProject;\n\n constructor(project: IProject) {\n this.project = project;\n }\n\n get(args: FileKeyArgs): File | undefined {\n return this._values.get(this.createFileKey(args));\n }\n\n isRegistered(args: FileKeyArgs): boolean {\n return this._values.has(this.createFileKey(args));\n }\n\n get nextId(): FileId {\n return this._id++;\n }\n\n register(file: IFileIn): File {\n const key = this.createFileKey(file);\n\n let result = this._values.get(key);\n if (result) {\n if (file.name) {\n result.setName(file.name);\n }\n } else {\n result = new File(file, this.nextId, this.project);\n }\n\n this._values.set(key, result);\n\n return result;\n }\n\n *registered(): IterableIterator<File> {\n for (const file of this._values.values()) {\n yield file;\n }\n }\n\n private createFileKey(args: FileKeyArgs): string {\n const logicalPath = args.logicalFilePath.split(path.sep).join('/');\n return `${args.external ? 'ext:' : ''}${logicalPath}${args.language ? `:${args.language}` : ''}`;\n }\n}\n","import type { FromRefs, Ref, Refs } from './types';\n\n/**\n * Wraps a single value in a Ref object.\n *\n * @example\n * ```ts\n * const r = ref(123); // { '~ref': 123 }\n * console.log(r['~ref']); // 123\n * ```\n */\nexport const ref = <T>(value: T): Ref<T> => ({ '~ref': value });\n\n/**\n * Converts a plain object to an object of Refs (deep, per property).\n *\n * @example\n * ```ts\n * const obj = { a: 1, b: \"x\" };\n * const refs = refs(obj); // { a: { '~ref': 1 }, b: { '~ref': \"x\" } }\n * ```\n */\nexport const refs = <T extends Record<string, unknown>>(obj: T): Refs<T> => {\n const result = {} as Refs<T>;\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = ref(obj[key]);\n }\n }\n return result;\n};\n\n/**\n * Unwraps a single Ref object to its value.\n *\n * @example\n * ```ts\n * const r = { '~ref': 42 };\n * const n = fromRef(r); // 42\n * console.log(n); // 42\n * ```\n */\nexport const fromRef = <T extends Ref<unknown> | undefined>(\n ref: T,\n): T extends Ref<infer U> ? U : undefined =>\n ref?.['~ref'] as T extends Ref<infer U> ? U : undefined;\n\n/**\n * Converts an object of Refs back to a plain object (unwraps all refs).\n *\n * @example\n * ```ts\n * const refs = { a: { '~ref': 1 }, b: { '~ref': \"x\" } };\n * const plain = fromRefs(refs); // { a: 1, b: \"x\" }\n * ```\n */\nexport const fromRefs = <T extends Refs<Record<string, unknown>>>(\n obj: T,\n): FromRefs<T> => {\n const result = {} as FromRefs<T>;\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = fromRef(obj[key]!) as (typeof result)[typeof key];\n }\n }\n return result;\n};\n\n/**\n * Checks whether a value is a Ref object.\n *\n * @param value Value to check\n * @returns True if the value is a Ref object.\n */\nexport const isRef = <T>(value: unknown): value is Ref<T> =>\n typeof value === 'object' && value !== null && '~ref' in value;\n","import { fromRef, ref } from '../refs/refs';\nimport type { Ref } from '../refs/types';\nimport type { INode } from './node';\nimport type { INodeRegistry } from './types';\n\nexport class NodeRegistry implements INodeRegistry {\n private list: Array<Ref<INode | null>> = [];\n\n add(node: INode | null): number {\n const index = this.list.push(ref(node));\n return index - 1;\n }\n\n *all(): Iterable<INode> {\n for (const r of this.list) {\n const node = fromRef(r);\n if (node) yield node;\n }\n }\n\n remove(index: number): void {\n this.list[index] = ref(null);\n }\n\n update(index: number, node: INode | null): void {\n this.list[index] = ref(node);\n }\n}\n","import type { SymbolKind } from '../symbols/types';\n\n/**\n * Returns true if two declarations of given kinds\n * are allowed to share the same identifier in TypeScript.\n */\nexport function canShareName(a: SymbolKind, b: SymbolKind): boolean {\n // same-kind always valid for interfaces (merging)\n if (a === 'interface' && b === 'interface') return true;\n\n // type vs interface merges\n if (\n (a === 'interface' && b === 'type') ||\n (a === 'type' && b === 'interface')\n ) {\n return false; // TypeScript does NOT merge type-alias with interface.\n }\n\n // type vs type = conflict\n if (a === 'type' && b === 'type') return false;\n\n // interface vs class = allowed (declare-merge)\n if (\n (a === 'interface' && b === 'class') ||\n (a === 'class' && b === 'interface')\n ) {\n return true;\n }\n\n // enum vs namespace = allowed (merges into value+type)\n if (\n (a === 'enum' && b === 'namespace') ||\n (a === 'namespace' && b === 'enum')\n ) {\n return true;\n }\n\n // class vs namespace = allowed\n if (\n (a === 'class' && b === 'namespace') ||\n (a === 'namespace' && b === 'class')\n ) {\n return true;\n }\n\n // namespace vs namespace = allowed (merging)\n if (a === 'namespace' && b === 'namespace') return true;\n\n // enum vs enum = conflict IF values conflict (TypeScript flags duplicates)\n if (a === 'enum' && b === 'enum') return false;\n\n // function and namespace merge (namespace can augment function)\n if (\n (a === 'function' && b === 'namespace') ||\n (a === 'namespace' && b === 'function')\n ) {\n return true;\n }\n\n // these collide with each other in the value namespace\n const valueKinds = new Set<SymbolKind>(['class', 'enum', 'function', 'var']);\n\n const aInValue = valueKinds.has(a);\n const bInValue = valueKinds.has(b);\n\n if (aInValue && bInValue) return false;\n\n // type-only declarations do not collide with value-only declarations\n const typeKinds = new Set<SymbolKind>(['interface', 'type']);\n const aInType = typeKinds.has(a);\n const bInType = typeKinds.has(b);\n\n // if one is type-only and the other is value-only, they do NOT collide\n if (aInType !== bInType) return true;\n\n return true;\n}\n","import { isNodeRef, isSymbolRef } from '../guards';\nimport type { INode } from '../nodes/node';\nimport { fromRef, isRef, ref } from '../refs/refs';\nimport type { Ref } from '../refs/types';\nimport type { Symbol } from '../symbols/symbol';\nimport type { IAnalysisContext, Input, NameScopes, Scope } from './types';\n\nconst createScope = (parent?: Scope): Scope => ({\n children: [],\n localNames: new Map(),\n parent,\n symbols: [],\n});\n\nexport class AnalysisContext implements IAnalysisContext {\n scopes: Scope = createScope();\n symbol?: Symbol;\n scope: Scope = this.scopes;\n\n constructor(symbol?: Symbol) {\n this.symbol = symbol;\n }\n\n addDependency(symbol: Ref<Symbol>): void {\n if (this.symbol !== fromRef(symbol)) {\n this.scope.symbols.push(symbol);\n }\n }\n\n analyze(input: Input): void {\n const v = isRef(input) ? input : ref(input);\n if (isSymbolRef(v)) {\n this.addDependency(v);\n } else if (isNodeRef(v)) {\n fromRef(v).analyze(this);\n }\n }\n\n localNames(scope: Scope): NameScopes {\n const names: NameScopes = new Map();\n for (const [name, kinds] of scope.localNames) {\n names.set(name, new Set(kinds));\n }\n if (scope.parent) {\n const parentNames = this.localNames(scope.parent);\n for (const [name, kinds] of parentNames) {\n if (!names.has(name)) {\n names.set(name, kinds);\n } else {\n const existingKinds = names.get(name)!;\n for (const kind of kinds) {\n existingKinds.add(kind);\n }\n }\n }\n }\n return names;\n }\n\n popScope(): void {\n this.scope = this.scope.parent ?? this.scope;\n }\n\n pushScope(): void {\n const scope = createScope(this.scope);\n this.scope.children.push(scope);\n this.scope = scope;\n }\n\n walkScopes(\n callback: (symbol: Ref<Symbol>, scope: Scope) => void,\n scope: Scope = this.scopes,\n ): void {\n this.scope = scope;\n for (const symbol of scope.symbols) {\n callback(symbol, scope);\n }\n for (const child of scope.children) {\n scope = child;\n this.walkScopes(callback, scope);\n }\n this.scope = this.scopes;\n }\n}\n\nexport class Analyzer {\n private nodeCache = new WeakMap<INode, AnalysisContext>();\n\n analyzeNode(node: INode): AnalysisContext {\n const cached = this.nodeCache.get(node);\n if (cached) return cached;\n\n const ctx = new AnalysisContext(node.symbol);\n node.analyze(ctx);\n\n this.nodeCache.set(node, ctx);\n return ctx;\n }\n\n analyze(\n nodes: Iterable<INode>,\n callback?: (ctx: AnalysisContext, node: INode) => void,\n ): void {\n for (const node of nodes) {\n const ctx = this.analyzeNode(node);\n callback?.(ctx, node);\n }\n }\n}\n","import path from 'node:path';\n\nimport type { ExportModule, ImportModule } from '../bindings';\nimport type { IProjectRenderMeta } from '../extensions';\nimport type { File } from '../files/file';\nimport type { IFileIn } from '../files/types';\nimport { canShareName } from '../project/namespace';\nimport type { IProject } from '../project/types';\nimport { fromRef } from '../refs/refs';\nimport type { RenderContext } from '../renderer';\nimport type { Symbol } from '../symbols/symbol';\nimport type { SymbolKind } from '../symbols/types';\nimport type { AnalysisContext } from './analyzer';\nimport { Analyzer } from './analyzer';\nimport type { AssignOptions, NameScopes } from './types';\n\nconst isTypeOnlyKind = (kind: SymbolKind) =>\n kind === 'type' || kind === 'interface';\n\nexport class Planner {\n private readonly analyzer = new Analyzer();\n private readonly cacheResolvedNames = new Set<number>();\n private readonly project: IProject;\n\n constructor(project: IProject) {\n this.project = project;\n }\n\n /**\n * Executes the planning phase for the project.\n */\n plan(meta?: IProjectRenderMeta) {\n this.cacheResolvedNames.clear();\n this.allocateFiles();\n this.assignLocalNames();\n this.resolveFilePaths(meta);\n this.planExports();\n this.planImports();\n }\n\n /**\n * Creates and assigns a file to every node, re-export,\n * and external dependency.\n */\n private allocateFiles(): void {\n this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => {\n const symbol = node.symbol;\n if (!symbol) return;\n\n const file = this.project.files.register(this.symbolToFileIn(symbol));\n file.addNode(node);\n symbol.setFile(file);\n for (const exportFrom of symbol.exportFrom) {\n this.project.files.register({\n external: false,\n language: file.language,\n logicalFilePath: exportFrom,\n });\n }\n ctx.walkScopes((dependency) => {\n const dep = fromRef(dependency);\n if (dep.external && dep.isCanonical && !dep.file) {\n const file = this.project.files.register(this.symbolToFileIn(dep));\n dep.setFile(file);\n }\n });\n });\n }\n\n /**\n * Assigns final names to all symbols.\n *\n * First assigns top-level (file-scoped) symbol names, then local symbols.\n */\n private assignLocalNames(): void {\n this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => {\n const symbol = node.symbol;\n if (!symbol) return;\n this.assignTopLevelName(symbol, ctx);\n });\n\n this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => {\n const file = node.file;\n if (!file) return;\n ctx.walkScopes((dependency) => {\n const dep = fromRef(dependency);\n // top-level or external symbol\n if (dep.file) return;\n this.assignLocalName(dep, ctx, {\n scopesToUpdate: [file.allNames],\n });\n });\n });\n }\n\n /**\n * Resolves and sets final file paths for all non-external files. Attaches renderers.\n *\n * Uses the project's fileName function if provided, otherwise uses the file's current name.\n *\n * Resolves final paths relative to the project's root directory.\n */\n private resolveFilePaths(meta?: IProjectRenderMeta): void {\n for (const file of this.project.files.registered()) {\n if (file.external) continue;\n const finalName = this.project.fileName?.(file.name) || file.name;\n file.setName(finalName);\n const finalPath = file.finalPath;\n if (finalPath) {\n file.setFinalPath(path.resolve(this.project.root, finalPath));\n }\n const ctx: RenderContext = { file, meta, project: this.project };\n const renderer = this.project.renderers.find((r) => r.supports(ctx));\n if (renderer) file.setRenderer(renderer);\n }\n }\n\n /**\n * Plans exports by analyzing all exported symbols.\n *\n * Registers re-export targets as files and creates new exported symbols for them.\n *\n * Assigns names to re-exported symbols and collects re-export metadata,\n * distinguishing type-only exports based on symbol kinds.\n */\n private planExports(): void {\n const seenByFile = new Map<\n File,\n Map<string, { kinds: Set<SymbolKind>; symbol: Symbol }>\n >();\n const sourceFile = new Map<number, File>();\n\n this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => {\n if (!node.exported) return;\n\n const symbol = node.symbol;\n if (!symbol) return;\n\n const file = node.file;\n if (!file) return;\n\n for (const exportFrom of symbol.exportFrom) {\n const target = this.project.files.register({\n external: false,\n language: node.language,\n logicalFilePath: exportFrom,\n });\n if (target.id === file.id) continue;\n\n let fileMap = seenByFile.get(target);\n if (!fileMap) {\n fileMap = new Map();\n seenByFile.set(target, fileMap);\n }\n\n const exp = this.project.symbols.register({\n exported: true,\n external: symbol.external,\n importKind: symbol.importKind,\n kind: symbol.kind,\n name: symbol.finalName,\n });\n exp.setFile(target);\n sourceFile.set(exp.id, file);\n this.assignTopLevelName(exp, ctx);\n\n let entry = fileMap.get(exp.finalName);\n if (!entry) {\n entry = { kinds: new Set(), symbol: exp };\n fileMap.set(exp.finalName, entry);\n }\n entry.kinds.add(exp.kind);\n }\n });\n\n for (const [file, fileMap] of seenByFile) {\n const exports = new Map<File, ExportModule>();\n for (const [, entry] of fileMap) {\n const source = sourceFile.get(entry.symbol.id)!;\n let exp = exports.get(source);\n if (!exp) {\n exp = {\n canExportAll: true,\n exports: [],\n from: source,\n isTypeOnly: true,\n };\n }\n const isTypeOnly = [...entry.kinds].every((kind) =>\n isTypeOnlyKind(kind),\n );\n const exportedName = entry.symbol.finalName;\n exp.exports.push({\n exportedName,\n isTypeOnly,\n kind: entry.symbol.importKind,\n sourceName: entry.symbol.name,\n });\n if (entry.symbol.name !== entry.symbol.finalName) {\n exp.canExportAll = false;\n }\n if (!isTypeOnly) {\n exp.isTypeOnly = false;\n }\n exports.set(source, exp);\n }\n for (const [, exp] of exports) {\n file.addExport(exp);\n }\n }\n }\n\n /**\n * Plans imports by analyzing symbol dependencies across files.\n *\n * For external dependencies, assigns top-level names.\n *\n * Creates or reuses import symbols for dependencies from other files,\n * assigning names and updating import metadata including type-only flags.\n */\n private planImports(): void {\n const seenByFile = new Map<\n File,\n Map<\n string,\n {\n dep: Symbol;\n kinds: Set<SymbolKind>;\n symbol: Symbol;\n }\n >\n >();\n\n this.analyzer.analyze(this.project.nodes.all(), (ctx) => {\n const symbol = ctx.symbol;\n if (!symbol) return;\n\n const file = symbol.file;\n if (!file) return;\n\n let fileMap = seenByFile.get(file);\n if (!fileMap) {\n fileMap = new Map();\n seenByFile.set(file, fileMap);\n }\n\n ctx.walkScopes((dependency) => {\n const dep = fromRef(dependency);\n if (!dep.file || dep.file.id === file.id) return;\n\n if (dep.external) {\n this.assignTopLevelName(dep, ctx);\n }\n\n const fromFileId = dep.file.id;\n const importedName = dep.finalName;\n const isTypeOnly = isTypeOnlyKind(dep.kind);\n const kind = dep.importKind;\n const key = `${fromFileId}|${importedName}|${kind}|${isTypeOnly}`;\n\n let entry = fileMap.get(key);\n if (!entry) {\n const imp = this.project.symbols.register({\n exported: dep.exported,\n external: dep.external,\n importKind: dep.importKind,\n kind: dep.kind,\n name: dep.finalName,\n });\n imp.setFile(file);\n this.assignTopLevelName(imp, ctx, {\n scope: imp.file!.allNames,\n });\n entry = {\n dep,\n kinds: new Set(),\n symbol: imp,\n };\n fileMap.set(key, entry);\n entry.kinds.add(imp.kind);\n }\n\n dependency['~ref'] = entry.symbol;\n });\n });\n\n for (const [file, fileMap] of seenByFile) {\n const imports = new Map<File, ImportModule>();\n for (const [, entry] of fileMap) {\n const source = entry.dep.file!;\n let imp = imports.get(source);\n if (!imp) {\n imp = {\n from: source,\n imports: [],\n isTypeOnly: true,\n };\n }\n const isTypeOnly = [...entry.kinds].every((kind) =>\n isTypeOnlyKind(kind),\n );\n if (entry.symbol.importKind === 'namespace') {\n imp.imports = [];\n imp.namespaceImport = entry.symbol.finalName;\n } else {\n imp.imports.push({\n isTypeOnly,\n kind: entry.symbol.importKind,\n localName: entry.symbol.finalName,\n sourceName: entry.dep.finalName,\n });\n }\n if (!isTypeOnly) {\n imp.isTypeOnly = false;\n }\n imports.set(source, imp);\n }\n for (const [, imp] of imports) {\n file.addImport(imp);\n }\n }\n }\n\n /**\n * Assigns the final name to a top-level (file-scoped) symbol.\n *\n * Uses the symbol's file top-level names as the default scope,\n * and updates all relevant name scopes including the file's allNames and local scopes.\n *\n * Supports optional overrides for the naming scope and scopes to update.\n */\n private assignTopLevelName(\n symbol: Symbol,\n ctx: AnalysisContext,\n options?: Partial<AssignOptions>,\n ): void {\n if (!symbol.file) return;\n this.assignSymbolName(symbol, {\n scope: options?.scope ?? symbol.file.topLevelNames,\n scopesToUpdate: [\n symbol.file.allNames,\n ctx.scopes.localNames,\n ...(options?.scopesToUpdate ?? []),\n ],\n });\n }\n\n /**\n * Assigns the final name to a non-top-level (local) symbol.\n *\n * Uses the provided scope or derives it from the current analysis context's local names.\n *\n * Updates all provided name scopes accordingly.\n */\n private assignLocalName(\n symbol: Symbol,\n ctx: AnalysisContext,\n options: Pick<Partial<AssignOptions>, 'scope'> &\n Pick<AssignOptions, 'scopesToUpdate'>,\n ): void {\n this.assignSymbolName(symbol, {\n scope: options.scope ?? ctx.localNames(ctx.scope),\n scopesToUpdate: options.scopesToUpdate,\n });\n }\n\n /**\n * Assigns the final name to a symbol within the provided name scope.\n *\n * Resolves name conflicts until a unique name is found.\n *\n * Updates all specified name scopes with the assigned final name.\n */\n private assignSymbolName(symbol: Symbol, options: AssignOptions): void {\n if (this.cacheResolvedNames.has(symbol.id)) return;\n\n const baseName = symbol.name;\n let finalName = symbol.nameSanitizer?.(baseName) ?? baseName;\n let attempt = 1;\n\n while (true) {\n const kinds = [...(options.scope.get(finalName) ?? [])];\n\n const ok = kinds.every((kind) => canShareName(symbol.kind, kind));\n if (ok) break;\n\n const language = symbol.node?.language || symbol.file?.language;\n const resolver =\n (language ? this.project.nameConflictResolvers[language] : undefined) ??\n this.project.defaultNameConflictResolver;\n const resolvedName = resolver({ attempt, baseName });\n if (!resolvedName) {\n throw new Error(`Unresolvable name conflict: ${symbol.toString()}`);\n }\n\n finalName = symbol.nameSanitizer?.(resolvedName) ?? resolvedName;\n attempt = attempt + 1;\n }\n\n symbol.setFinalName(finalName);\n this.cacheResolvedNames.add(symbol.id);\n const updateScopes = [options.scope, ...options.scopesToUpdate];\n for (const scope of updateScopes) {\n this.updateScope(symbol, scope);\n }\n }\n\n /**\n * Updates the provided name scope with the symbol's final name and kind.\n *\n * Ensures the name scope tracks all kinds associated with a given name.\n */\n private updateScope(symbol: Symbol, scope: NameScopes): void {\n const name = symbol.finalName;\n const cache = scope.get(name) ?? new Set<SymbolKind>();\n cache.add(symbol.kind);\n scope.set(name, cache);\n }\n\n private symbolToFileIn(symbol: Symbol): IFileIn {\n return {\n external: Boolean(symbol.external),\n language: symbol.node?.language,\n logicalFilePath:\n symbol.external ||\n symbol.getFilePath?.(symbol) ||\n this.project.defaultFileName,\n } satisfies IFileIn;\n }\n}\n","import { symbolBrand } from '../brands';\nimport { debug } from '../debug';\nimport type { ISymbolMeta } from '../extensions';\nimport type { File } from '../files/file';\nimport type { INode } from '../nodes/node';\nimport type {\n BindingKind,\n ISymbolIn,\n SymbolKind,\n SymbolNameSanitizer,\n} from './types';\n\nexport class Symbol {\n /**\n * Canonical symbol this stub resolves to, if any.\n *\n * Stubs created during DSL construction may later be associated\n * with a fully registered symbol. Once set, all property lookups\n * should defer to the canonical symbol.\n */\n private _canonical?: Symbol;\n /**\n * True if this symbol is exported from its defining file.\n *\n * @default false\n */\n private _exported: boolean;\n /**\n * Names of files (without extension) from which this symbol is re-exported.\n *\n * @default []\n */\n private _exportFrom: ReadonlyArray<string>;\n /**\n * External module name if this symbol is imported from a module not managed\n * by the project (e.g. \"zod\", \"lodash\").\n *\n * @default undefined\n */\n private _external?: string;\n /**\n * The file this symbol is ultimately emitted into.\n *\n * Only top-level symbols have an assigned file.\n */\n private _file?: File;\n /**\n * The alias-resolved, conflict-free emitted name.\n */\n private _finalName?: string;\n /**\n * Custom strategy to determine file output path.\n *\n * @returns The file path to output the symbol to, or undefined to fallback to default behavior.\n */\n private _getFilePath?: (symbol: Symbol) => string | undefined;\n /**\n * How this symbol should be imported (namespace/default/named).\n *\n * @default 'named'\n */\n private _importKind: BindingKind;\n /**\n * Kind of symbol (class, type, alias, etc.).\n *\n * @default 'var'\n */\n private _kind: SymbolKind;\n /**\n * Arbitrary user metadata.\n *\n * @default undefined\n */\n private _meta?: ISymbolMeta;\n /**\n * Intended user-facing name before conflict resolution.\n *\n * @example \"UserModel\"\n */\n private _name: string;\n /**\n * Optional function to sanitize the symbol name.\n *\n * @default undefined\n */\n private _nameSanitizer?: SymbolNameSanitizer;\n /**\n * Node that defines this symbol.\n */\n private _node?: INode;\n\n /** Brand used for identifying symbols. */\n readonly '~brand' = symbolBrand;\n /** Globally unique, stable symbol ID. */\n readonly id: number;\n\n constructor(input: ISymbolIn, id: number) {\n this._exported = input.exported ?? false;\n this._exportFrom = input.exportFrom ?? [];\n this._external = input.external;\n this._getFilePath = input.getFilePath;\n this.id = id;\n this._importKind = input.importKind ?? 'named';\n this._kind = input.kind ?? 'var';\n this._meta = input.meta;\n this._name = input.name;\n }\n\n /**\n * Returns the canonical symbol for this instance.\n *\n * If this symbol was created as a stub, this getter returns\n * the fully registered canonical symbol. Otherwise, it returns\n * the symbol itself.\n */\n get canonical(): Symbol {\n return this._canonical ?? this;\n }\n\n /**\n * Indicates whether this symbol is exported from its defining file.\n */\n get exported(): boolean {\n return this.canonical._exported;\n }\n\n /**\n * Names of files (without extension) that re-export this symbol.\n */\n get exportFrom(): ReadonlyArray<string> {\n return this.canonical._exportFrom;\n }\n\n /**\n * External module from which this symbol originates, if any.\n */\n get external(): string | undefined {\n return this.canonical._external;\n }\n\n /**\n * Read‑only accessor for the assigned output file.\n *\n * Only top-level symbols have an assigned file.\n */\n get file(): File | undefined {\n return this.canonical._file;\n }\n\n /**\n * Read‑only accessor for the resolved final emitted name.\n */\n get finalName(): string {\n if (!this.canonical._finalName) {\n const message = `Symbol finalName has not been resolved yet for ${this.canonical.toString()}`;\n debug(message, 'symbol');\n throw new Error(message);\n }\n return this.canonical._finalName;\n }\n\n /**\n * Custom file path resolver, if provided.\n */\n get getFilePath(): ((symbol: Symbol) => string | undefined) | undefined {\n return this.canonical._getFilePath;\n }\n\n /**\n * How this symbol should be imported (named/default/namespace).\n */\n get importKind(): BindingKind {\n return this.canonical._importKind;\n }\n\n /**\n * Indicates whether this is a canonical symbol (not a stub).\n */\n get isCanonical(): boolean {\n return !this._canonical || this._canonical === this;\n }\n\n /**\n * The symbol's kind (class, type, alias, variable, etc.).\n */\n get kind(): SymbolKind {\n return this.canonical._kind;\n }\n\n /**\n * Arbitrary user‑provided metadata associated with this symbol.\n */\n get meta(): ISymbolMeta | undefined {\n return this.canonical._meta;\n }\n\n /**\n * User-intended name before aliasing or conflict resolution.\n */\n get name(): string {\n return this.canonical._name;\n }\n\n /**\n * Optional function to sanitize the symbol name.\n */\n get nameSanitizer(): SymbolNameSanitizer | undefined {\n return this.canonical._nameSanitizer;\n }\n\n /**\n * Read‑only accessor for the defining node.\n */\n get node(): INode | undefined {\n return this.canonical._node;\n }\n\n /**\n * Marks this symbol as a stub and assigns its canonical symbol.\n *\n * After calling this, all semantic queries (name, kind, file,\n * meta, etc.) should reflect the canonical symbol's values.\n *\n * @param symbol — The canonical symbol this stub should resolve to.\n */\n setCanonical(symbol: Symbol): void {\n this._canonical = symbol;\n }\n\n /**\n * Marks the symbol as exported from its file.\n *\n * @param exported — Whether the symbol is exported.\n */\n setExported(exported: boolean): void {\n this.assertCanonical();\n this._exported = exported;\n }\n\n /**\n * Records file names that re‑export this symbol.\n *\n * @param list — Source files re‑exporting this symbol.\n */\n setExportFrom(list: ReadonlyArray<string>): void {\n this.assertCanonical();\n this._exportFrom = list;\n }\n\n /**\n * Assigns the output file this symbol will be emitted into.\n *\n * This may only be set once.\n */\n setFile(file: File): void {\n this.assertCanonical();\n if (this._file && this._file !== file) {\n const message = `Symbol ${this.canonical.toString()} is already assigned to a different file.`;\n debug(message, 'symbol');\n throw new Error(message);\n }\n this._file = file;\n }\n\n /**\n * Assigns the conflict‑resolved final local name for this symbol.\n *\n * This may only be set once.\n */\n setFinalName(name: string): void {\n this.assertCanonical();\n if (this._finalName && this._finalName !== name) {\n const message = `Symbol finalName has already been resolved for ${this.canonical.toString()}.`;\n debug(message, 'symbol');\n throw new Error(message);\n }\n this._finalName = name;\n }\n\n /**\n * Sets how this symbol should be imported.\n *\n * @param kind — The import strategy (named/default/namespace).\n */\n setImportKind(kind: BindingKind): void {\n this.assertCanonical();\n this._importKind = kind;\n }\n\n /**\n * Sets the symbol's kind (class, type, alias, variable, etc.).\n *\n * @param kind — The new symbol kind.\n */\n setKind(kind: SymbolKind): void {\n this.assertCanonical();\n this._kind = kind;\n }\n\n /**\n * Updates the intended user‑facing name for this symbol.\n *\n * @param name — The new name.\n */\n setName(name: string): void {\n this.assertCanonical();\n this._name = name;\n }\n\n /**\n * Sets a custom function to sanitize the symbol's name.\n *\n * @param fn — The name sanitizer function to apply.\n */\n setNameSanitizer(fn: SymbolNameSanitizer): void {\n this.assertCanonical();\n this._nameSanitizer = fn;\n }\n\n /**\n * Binds the node that defines this symbol.\n *\n * This may only be set once.\n */\n setNode(node: INode): void {\n this.assertCanonical();\n if (this._node && this._node !== node) {\n const message = `Symbol ${this.canonical.toString()} is already bound to a different node.`;\n debug(message, 'symbol');\n throw new Error(message);\n }\n this._node = node;\n node.symbol = this;\n }\n\n /**\n * Returns a debug‑friendly string representation identifying the symbol.\n */\n toString(): string {\n return `[Symbol ${this.name}#${this.id}]`;\n }\n\n /**\n * Ensures this symbol is canonical before allowing mutation.\n *\n * A symbol that has been marked as a stub (i.e., its `_canonical` points\n * to a different symbol) may not be mutated. This guard throws an error\n * if any setter attempts to modify a stub, preventing accidental writes\n * to non‑canonical instances.\n *\n * @throws {Error} If the symbol is a stub and is being mutated.\n */\n private assertCanonical(): void {\n if (this._canonical && this._canonical !== this) {\n const message = `Illegal mutation of stub symbol ${this.toString()} → canonical: ${this._canonical.toString()}`;\n debug(message, 'symbol');\n throw new Error(message);\n }\n }\n}\n","import type { ISymbolMeta } from '../extensions';\nimport { Symbol } from './symbol';\nimport type { ISymbolIdentifier, ISymbolIn, ISymbolRegistry } from './types';\n\ntype IndexEntry = [string, unknown];\ntype IndexKeySpace = ReadonlyArray<IndexEntry>;\ntype QueryCacheKey = string;\ntype SymbolId = number;\n\nexport class SymbolRegistry implements ISymbolRegistry {\n private _id: SymbolId = 0;\n private _indices: Map<IndexEntry[0], Map<IndexEntry[1], Set<SymbolId>>> =\n new Map();\n private _queryCache: Map<QueryCacheKey, ReadonlyArray<SymbolId>> = new Map();\n private _queryCacheDependencies: Map<QueryCacheKey, Set<QueryCacheKey>> =\n new Map();\n private _registered: Set<SymbolId> = new Set();\n private _stubs: Set<SymbolId> = new Set();\n private _stubCache: Map<QueryCacheKey, SymbolId> = new Map();\n private _values: Map<SymbolId, Symbol> = new Map();\n\n get(identifier: ISymbolIdentifier): Symbol | undefined {\n return typeof identifier === 'number'\n ? this._values.get(identifier)\n : this.query(identifier)[0];\n }\n\n isRegistered(identifier: ISymbolIdentifier): boolean {\n const symbol = this.get(identifier);\n return symbol ? this._registered.has(symbol.id) : false;\n }\n\n get nextId(): SymbolId {\n return this._id++;\n }\n\n query(filter: ISymbolMeta): ReadonlyArray<Symbol> {\n const cacheKey = this.buildCacheKey(filter);\n const cachedIds = this._queryCache.get(cacheKey);\n if (cachedIds) {\n return cachedIds.map((symbolId) => this._values.get(symbolId)!);\n }\n const sets: Array<Set<SymbolId>> = [];\n const indexKeySpace = this.buildIndexKeySpace(filter);\n const cacheDependencies = new Set<QueryCacheKey>();\n let missed = false;\n for (const indexEntry of indexKeySpace) {\n cacheDependencies.add(this.serializeIndexEntry(indexEntry));\n const values = this._indices.get(indexEntry[0]);\n if (!values) {\n missed = true;\n break;\n }\n const set = values.get(indexEntry[1]);\n if (!set) {\n missed = true;\n break;\n }\n sets.push(set);\n }\n if (missed || !sets.length) {\n this._queryCacheDependencies.set(cacheKey, cacheDependencies);\n this._queryCache.set(cacheKey, []);\n return [];\n }\n let result = new Set(sets[0]);\n for (const set of sets.slice(1)) {\n result = new Set([...result].filter((symbolId) => set.has(symbolId)));\n }\n const resultIds = [...result];\n this._queryCacheDependencies.set(cacheKey, cacheDependencies);\n this._queryCache.set(cacheKey, resultIds);\n return resultIds.map((symbolId) => this._values.get(symbolId)!);\n }\n\n reference(meta: ISymbolMeta): Symbol {\n const [registered] = this.query(meta);\n if (registered) return registered;\n\n const cacheKey = this.buildCacheKey(meta);\n const cachedId = this._stubCache.get(cacheKey);\n if (cachedId !== undefined) return this._values.get(cachedId)!;\n\n const stub = new Symbol({ meta, name: '' }, this.nextId);\n\n this._values.set(stub.id, stub);\n this._stubs.add(stub.id);\n this._stubCache.set(cacheKey, stub.id);\n return stub;\n }\n\n register(symbol: ISymbolIn): Symbol {\n const result = new Symbol(symbol, this.nextId);\n\n this._values.set(result.id, result);\n this._registered.add(result.id);\n\n if (result.meta) {\n const indexKeySpace = this.buildIndexKeySpace(result.meta);\n this.indexSymbol(result.id, indexKeySpace);\n this.invalidateCache(indexKeySpace);\n this.replaceStubs(result, indexKeySpace);\n }\n\n return result;\n }\n\n *registered(): IterableIterator<Symbol> {\n for (const id of this._registered.values()) {\n yield this._values.get(id)!;\n }\n }\n\n private buildCacheKey(filter: ISymbolMeta): QueryCacheKey {\n const indexKeySpace = this.buildIndexKeySpace(filter);\n return indexKeySpace\n .map((indexEntry) => this.serializeIndexEntry(indexEntry))\n .sort() // ensure order-insensitivity\n .join('|');\n }\n\n private buildIndexKeySpace(meta: ISymbolMeta, prefix = ''): IndexKeySpace {\n const entries: Array<IndexEntry> = [];\n for (const [key, value] of Object.entries(meta)) {\n const path = prefix ? `${prefix}.${key}` : key;\n if (value && typeof value === 'object' && !Array.isArray(value)) {\n entries.push(...this.buildIndexKeySpace(value as ISymbolMeta, path));\n } else {\n entries.push([path, value]);\n }\n }\n return entries;\n }\n\n private indexSymbol(symbolId: SymbolId, indexKeySpace: IndexKeySpace): void {\n for (const [key, value] of indexKeySpace) {\n if (!this._indices.has(key)) this._indices.set(key, new Map());\n const values = this._indices.get(key)!;\n const set = values.get(value) ?? new Set();\n set.add(symbolId);\n values.set(value, set);\n }\n }\n\n private invalidateCache(indexKeySpace: IndexKeySpace): void {\n const changed = indexKeySpace.map((indexEntry) =>\n this.serializeIndexEntry(indexEntry),\n );\n for (const [\n cacheKey,\n cacheDependencies,\n ] of this._queryCacheDependencies.entries()) {\n for (const key of changed) {\n if (cacheDependencies.has(key)) {\n this._queryCacheDependencies.delete(cacheKey);\n this._queryCache.delete(cacheKey);\n break;\n }\n }\n }\n }\n\n private isSubset(sub: IndexKeySpace, sup: IndexKeySpace): boolean {\n const supMap = new Map(sup);\n for (const [key, value] of sub) {\n if (!supMap.has(key) || supMap.get(key) !== value) {\n return false;\n }\n }\n return true;\n }\n\n private replaceStubs(symbol: Symbol, indexKeySpace: IndexKeySpace): void {\n for (const stubId of this._stubs.values()) {\n const stub = this._values.get(stubId);\n if (\n stub?.meta &&\n this.isSubset(this.buildIndexKeySpace(stub.meta), indexKeySpace)\n ) {\n const cacheKey = this.buildCacheKey(stub.meta);\n this._stubCache.delete(cacheKey);\n this._stubs.delete(stubId);\n stub.setCanonical(symbol);\n }\n }\n }\n\n private serializeIndexEntry(indexEntry: IndexEntry): string {\n return `${indexEntry[0]}:${JSON.stringify(indexEntry[1])}`;\n }\n}\n","import path from 'node:path';\n\nimport type { IProjectRenderMeta } from '../extensions';\nimport { FileRegistry } from '../files/registry';\nimport { defaultExtensions } from '../languages/extensions';\nimport { defaultNameConflictResolvers } from '../languages/resolvers';\nimport type { Extensions, NameConflictResolvers } from '../languages/types';\nimport { NodeRegistry } from '../nodes/registry';\nimport type { IOutput } from '../output';\nimport { Planner } from '../planner/planner';\nimport { simpleNameConflictResolver } from '../planner/resolvers';\nimport type { NameConflictResolver } from '../planner/types';\nimport type { Renderer } from '../renderer';\nimport { SymbolRegistry } from '../symbols/registry';\nimport type { IProject } from './types';\n\nexport class Project implements IProject {\n readonly files: FileRegistry;\n readonly nodes = new NodeRegistry();\n readonly symbols = new SymbolRegistry();\n\n readonly defaultFileName: string;\n readonly defaultNameConflictResolver: NameConflictResolver;\n readonly extensions: Extensions;\n readonly fileName?: (name: string) => string;\n readonly nameConflictResolvers: NameConflictResolvers;\n readonly renderers: ReadonlyArray<Renderer>;\n readonly root: string;\n\n constructor(\n args: Pick<\n Partial<IProject>,\n | 'defaultFileName'\n | 'defaultNameConflictResolver'\n | 'extensions'\n | 'fileName'\n | 'nameConflictResolvers'\n | 'renderers'\n > &\n Pick<IProject, 'root'>,\n ) {\n const fileName = args.fileName;\n this.defaultFileName = args.defaultFileName ?? 'main';\n this.defaultNameConflictResolver =\n args.defaultNameConflictResolver ?? simpleNameConflictResolver;\n this.extensions = {\n ...defaultExtensions,\n ...args.extensions,\n };\n this.fileName = typeof fileName === 'string' ? () => fileName : fileName;\n this.files = new FileRegistry(this);\n this.nameConflictResolvers = {\n ...defaultNameConflictResolvers,\n ...args.nameConflictResolvers,\n };\n this.renderers = args.renderers ?? [];\n this.root = path.resolve(args.root).replace(/[/\\\\]+$/, '');\n }\n\n render(meta?: IProjectRenderMeta): ReadonlyArray<IOutput> {\n new Planner(this).plan(meta);\n const files: Array<IOutput> = [];\n for (const file of this.files.registered()) {\n if (file.finalPath && file.renderer) {\n const content = file.renderer.render({ file, meta, project: this });\n files.push({ content, path: file.finalPath });\n }\n }\n return files;\n }\n}\n"],"mappings":"iFAAA,MACa,EAAY,cACZ,EAAc,gBCE3B,EAAO,QAAU,GAAc,CAAC,SAEhC,MAAM,EAAe,CACnB,SAAU,EAAO,YACjB,IAAK,EAAO,WACZ,KAAM,EAAO,aACb,SAAU,EAAO,WACjB,OAAQ,EAAO,cAChB,CAED,SAAgB,EAAM,EAAiB,EAAkC,CACvE,IAAM,EAAQ,QAAQ,IAAI,MAC1B,GAAI,CAAC,EAAO,OAEZ,IAAM,EAAS,EAAM,MAAM,IAAI,CAAC,IAAK,GAAM,EAAE,MAAM,CAAC,aAAa,CAAC,CAElE,GACE,EACE,EAAO,SAAS,IAAI,EACpB,EAAO,SAAS,WAAW,EAC3B,EAAO,SAAS,UAAU,IAAQ,EAClC,EAAO,SAAS,EAAM,EAGxB,OAIF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ChC,KAAK,OAAO,OAAO,EAAO,CAC1B,EAAK,aAAa,EAAO,GAK/B,oBAA4B,EAAgC,CAC1D,MAAO,GAAG,EAAW,GAAG,GAAG,KAAK,UAAU,EAAW,GAAG,KC5K/C,EAAb,KAAyC,CACvC,MACA,MAAiB,IAAI,EACrB,QAAmB,IAAI,EAEvB,gBACA,4BACA,WACA,SACA,sBACA,UACA,KAEA,YACE,EAUA,CACA,IAAM,EAAW,EAAK,SACtB,KAAK,gBAAkB,EAAK,iBAAmB,OAC/C,KAAK,4BACH,EAAK,6BAA+B,EACtC,KAAK,WAAa,CAChB,GAAG,EACH,GAAG,EAAK,WACT,CACD,KAAK,SAAW,OAAO,GAAa,aAAiB,EAAW,EAChE,KAAK,MAAQ,IAAI,EAAa,KAAK,CACnC,KAAK,sBAAwB,CAC3B,GAAG,EACH,GAAG,EAAK,sBACT,CACD,KAAK,UAAY,EAAK,WAAa,EAAE,CACrC,KAAK,KAAO,EAAK,QAAQ,EAAK,KAAK,CAAC,QAAQ,UAAW,GAAG,CAG5D,OAAO,EAAmD,CACxD,IAAI,EAAQ,KAAK,CAAC,KAAK,EAAK,CAC5B,IAAMC,EAAwB,EAAE,CAChC,IAAK,IAAM,KAAQ,KAAK,MAAM,YAAY,CACxC,GAAI,EAAK,WAAa,EAAK,SAAU,CACnC,IAAM,EAAU,EAAK,SAAS,OAAO,CAAE,OAAM,OAAM,QAAS,KAAM,CAAC,CACnE,EAAM,KAAK,CAAE,UAAS,KAAM,EAAK,UAAW,CAAC,CAGjD,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hey-api/codegen-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "🧱 TypeScript framework for generating structured, multi-file source code from abstract syntax trees.",
|
|
5
5
|
"homepage": "https://heyapi.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
],
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./dist/index.cjs",
|
|
29
|
-
"module": "./dist/index.
|
|
30
|
-
"types": "./dist/index.d.
|
|
29
|
+
"module": "./dist/index.mjs",
|
|
30
|
+
"types": "./dist/index.d.mts",
|
|
31
31
|
"exports": {
|
|
32
32
|
".": {
|
|
33
33
|
"import": {
|
|
34
|
-
"types": "./dist/index.d.
|
|
35
|
-
"default": "./dist/index.
|
|
34
|
+
"types": "./dist/index.d.mts",
|
|
35
|
+
"default": "./dist/index.mjs"
|
|
36
36
|
},
|
|
37
37
|
"require": {
|
|
38
38
|
"types": "./dist/index.d.cts",
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">=20.19.0"
|
|
51
51
|
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"ansi-colors": "4.1.3",
|
|
54
|
+
"color-support": "1.1.3"
|
|
55
|
+
},
|
|
52
56
|
"peerDependencies": {
|
|
53
57
|
"typescript": ">=5.5.3"
|
|
54
58
|
},
|