rune-langium / codegen/src/export / NamespaceEmitterOptions
Interface: NamespaceEmitterOptions
Defined in: packages/codegen/src/emit/namespace-emitter.ts:38
Options passed to a NamespaceEmitter constructor.
Extends GeneratorOptions with one Phase-0.5 knob: suppressBoilerplate. When true, the emitter must NOT inline shared runtime helpers (e.g., Zod's runeCheckOneOf, runeCount, runeAttrExists) in each per- namespace output — the wrapping GenericModelEmitter emits them once via the Profile's runtime sidecar instead. Default false; today's behavior is preserved when this flag is unset.
Emitters that have no runtime helpers (TypeScript, JSON Schema) may ignore the flag — accepting it is enough to satisfy the contract.
019 spec §3.2.
Extends
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
conditionFunctionName? | (declaration, forceAlias?) => string | Host bindings for condition callables in a standalone schema. | - | packages/codegen/src/emit/namespace-emitter.ts:45 |
excel? | { sheets: { conditions: boolean; enums: boolean; typeAliases: boolean; types: boolean; }; } | - | GeneratorOptions.excel | packages/codegen/src/types.ts:120 |
excel.sheets | { conditions: boolean; enums: boolean; typeAliases: boolean; types: boolean; } | - | - | packages/codegen/src/options/excel-options.ts:22 |
excel.sheets.conditions | boolean | - | - | packages/codegen/src/options/excel-options.ts:27 |
excel.sheets.enums | boolean | - | - | packages/codegen/src/options/excel-options.ts:25 |
excel.sheets.typeAliases | boolean | - | - | packages/codegen/src/options/excel-options.ts:26 |
excel.sheets.types | boolean | - | - | packages/codegen/src/options/excel-options.ts:24 |
functionInputs? | boolean | Validate the adapted function input structure without evaluating Data conditions. | - | packages/codegen/src/emit/namespace-emitter.ts:41 |
headerComment? | string | Optional string prepended to each emitted file's header comment. Do NOT set when requiring byte-identical output (SC-007). | GeneratorOptions.headerComment | packages/codegen/src/types.ts:93 |
json-schema? | { layout?: "per-namespace" | "single-file"; } | - | GeneratorOptions.json-schema | packages/codegen/src/types.ts:114 |
json-schema.layout? | "per-namespace" | "single-file" | - | - | packages/codegen/src/options/target-options-schema.ts:23 |
markdown? | { layout?: "per-namespace" | "barrel"; } | - | GeneratorOptions.markdown | packages/codegen/src/types.ts:116 |
markdown.layout? | "per-namespace" | "barrel" | - | - | packages/codegen/src/options/target-options-schema.ts:30 |
metadataInputs? | boolean | Preserve metadata envelopes while retaining ordinary Data condition validation. | - | packages/codegen/src/emit/namespace-emitter.ts:43 |
namespaces? | readonly string[] | Optional namespace allowlist (019 spec §5.1/§5.3). When present, only these namespaces are emitted; everything else in the parsed workspace is dropped before registry-build + walk. When absent, all namespaces are emitted (existing behavior — CLI / direct callers see no change). The caller is responsible for passing a dependency-closed set — the studio's Download modal computes the transitive closure (§5.2) so emitted code never references a dropped namespace. A non-closed set passed directly may produce output with unresolved imports. | GeneratorOptions.namespaces | packages/codegen/src/types.ts:105 |
openapi? | { crud?: | boolean | { types: string[]; }; format?: "json" | "yaml"; } | - | GeneratorOptions.openapi | packages/codegen/src/types.ts:124 |
openapi.crud? | | boolean | { types: string[]; } | - | - | packages/codegen/src/options/openapi-options.ts:29 |
openapi.format? | "json" | "yaml" | - | - | packages/codegen/src/options/openapi-options.ts:28 |
projectBindings? | ReadonlyMap<RosettaFunction, { dispatch?: string; kind: string; model: string; name: string; namespace: string; }> | Host-resolved native bindings. Configuration and executable callbacks never enter generated source. | GeneratorOptions.projectBindings | packages/codegen/src/types.ts:80 |
projectResources? | Pick<{ implementationSymbols: { dispatch?: string; kind: string; model: string; name: string; namespace: string; }[]; invokeByKey: (key, args) => unknown; codeList(symbol): readonly CodeListValue[] | undefined; codeListForType(type): readonly CodeListValue[] | undefined; implementationStatus(targetId): | { available: boolean; reason: string | undefined; } | undefined; invoke(symbol, args): unknown; validateCode(symbol, value): | { message: string; path: string; } | undefined; }, "codeListForType"> | Prepared resource lookup from the active project, never parsed configuration. | GeneratorOptions.projectResources | packages/codegen/src/types.ts:78 |
selection? | ExportSelection | Optional top-level declaration roots for a dependency-closed export. | GeneratorOptions.selection | packages/codegen/src/types.ts:107 |
sql? | { dialect?: "postgres" | "sqlserver"; enumStrategy?: "check" | "table"; inheritance?: "single-table" | "table-per-type"; layout?: "per-namespace" | "single-file"; } | - | GeneratorOptions.sql | packages/codegen/src/types.ts:115 |
sql.dialect? | "postgres" | "sqlserver" | - | - | packages/codegen/src/options/target-options-schema.ts:25 |
sql.enumStrategy? | "check" | "table" | - | - | packages/codegen/src/options/target-options-schema.ts:27 |
sql.inheritance? | "single-table" | "table-per-type" | - | - | packages/codegen/src/options/target-options-schema.ts:26 |
sql.layout? | "per-namespace" | "single-file" | - | - | packages/codegen/src/options/target-options-schema.ts:28 |
strict? | boolean | If true, any GeneratorDiagnostic with severity 'error' causes generate() to throw a GeneratorError instead of returning a partial result. FR-022. | GeneratorOptions.strict | packages/codegen/src/types.ts:88 |
suppressBoilerplate? | boolean | - | - | packages/codegen/src/emit/namespace-emitter.ts:39 |
target? | Target | Selects the emitter pipeline. Defaults to 'zod'. | GeneratorOptions.target | packages/codegen/src/types.ts:82 |
typescript? | { decorators?: boolean; inlineHelpers?: boolean; inputChecks?: boolean; layout?: "per-namespace" | "barrel" | "single-file"; serialization?: "zod" | "runtime"; } | - | GeneratorOptions.typescript | packages/codegen/src/types.ts:113 |
typescript.decorators? | boolean | - | - | packages/codegen/src/options/target-options-schema.ts:20 |
typescript.inlineHelpers? | boolean | - | - | packages/codegen/src/options/target-options-schema.ts:19 |
typescript.inputChecks? | boolean | - | - | packages/codegen/src/options/target-options-schema.ts:18 |
typescript.layout? | "per-namespace" | "barrel" | "single-file" | - | - | packages/codegen/src/options/target-options-schema.ts:16 |
typescript.serialization? | "zod" | "runtime" | - | - | packages/codegen/src/options/target-options-schema.ts:21 |
zod? | { codecs?: boolean; layout?: "per-namespace" | "barrel" | "single-file"; } | - | GeneratorOptions.zod | packages/codegen/src/types.ts:112 |
zod.codecs? | boolean | - | - | packages/codegen/src/options/target-options-schema.ts:16 |
zod.layout? | "per-namespace" | "barrel" | "single-file" | - | - | packages/codegen/src/options/target-options-schema.ts:16 |