@prisma/orm-toolchain 8.0.0-rc.18-dev.20 → 8.0.0-rc.18-dev.22
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/dist/cli-telemetry.mjs +1 -1
- package/dist/cli.mjs +13 -18
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +1 -1
- package/dist/cli__control-api.mjs +1 -1
- package/dist/cli__migration-cli.mjs +1 -1
- package/dist/config-loader.mjs +1 -1
- package/dist/domain-type-generation-BdSOXF3O-DGGiAaNs.d.mts +75 -0
- package/dist/domain-type-generation-BdSOXF3O-DGGiAaNs.d.mts.map +1 -0
- package/dist/{domain-type-generation-BRVQvoy8-CcRke3tl.mjs → domain-type-generation-DpXuDGLd-CuADX8tA.mjs} +70 -210
- package/dist/domain-type-generation-DpXuDGLd-CuADX8tA.mjs.map +1 -0
- package/dist/emitter.d.mts +3 -3
- package/dist/emitter.mjs +3 -3
- package/dist/emitter__domain-type-generation.d.mts +2 -2
- package/dist/emitter__domain-type-generation.mjs +2 -2
- package/dist/{exports-o91c4INl-_M3b_rty.mjs → exports-BLyT8ULG-C_kH8_9c.mjs} +27 -39
- package/dist/exports-BLyT8ULG-C_kH8_9c.mjs.map +1 -0
- package/dist/{exports-R5Bj59KS.mjs → exports-DH9O5F9j.mjs} +2 -2
- package/dist/{exports-R5Bj59KS.mjs.map → exports-DH9O5F9j.mjs.map} +1 -1
- package/dist/{exports-DH1C-t5Q.mjs → exports-DfSHy5Id.mjs} +2 -2
- package/dist/{exports-DH1C-t5Q.mjs.map → exports-DfSHy5Id.mjs.map} +1 -1
- package/dist/{index-DbIFi6KU.d.mts → index-wUUMOC5E.d.mts} +3 -3
- package/dist/{index-DbIFi6KU.d.mts.map → index-wUUMOC5E.d.mts.map} +1 -1
- package/dist/quick-reference-mongo.md +1 -1
- package/dist/{ref-C4HTKAnF-CtTLsNvf.mjs → ref-C4HTKAnF-4Opkr4ZP.mjs} +3 -3
- package/dist/{ref-C4HTKAnF-CtTLsNvf.mjs.map → ref-C4HTKAnF-4Opkr4ZP.mjs.map} +1 -1
- package/dist/vite-plugin-contract-emit.mjs +3 -3
- package/package.json +12 -12
- package/dist/domain-type-generation-BRVQvoy8-CcRke3tl.mjs.map +0 -1
- package/dist/domain-type-generation-CINeP3Ed-D05XzCGK.d.mts +0 -106
- package/dist/domain-type-generation-CINeP3Ed-D05XzCGK.d.mts.map +0 -1
- package/dist/exports-o91c4INl-_M3b_rty.mjs.map +0 -1
|
@@ -7,7 +7,7 @@ import { i as Refs, n as RefEntry } from "./refs-BNCUu58Y-BIso5Jfg.mjs";
|
|
|
7
7
|
import { n as MigrationGraph } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
|
|
8
8
|
import { a as MigrationRef, t as ContractRef } from "./ref-resolution-BPhR-kta.mjs";
|
|
9
9
|
import { $ as executeDbVerify, A as EmitResult, B as PlanQuestion, C as DbUpdateOptions, D as EmitFailure, E as EmitContractConfig, F as ExecuteDbVerifyResult, G as RenderContractDtsResult, H as RenderContractDtsFailure, I as IntrospectOptions, J as StatementText, K as RenderContractDtsSuccess, M as ExecuteDbSignOptions, N as ExecuteDbSignResult, O as EmitFailureCode, P as ExecuteDbVerifyOptions, Q as executeDbSign, R as OnControlProgress, S as DbUpdateFailureCode, T as DbUpdateSuccess, U as RenderContractDtsFailureCode, V as PlanQuestionVerb, W as RenderContractDtsOptions, X as TemporaryValueReport, Y as StatementVerb, Z as VerifyOptions, _ as DbInitSuccess, a as CliStructuredError$2, b as DbSignSpaceOutcome, c as ControlActionName, d as ControlProgressEvent, f as CreateControlClient, g as DbInitResult, h as DbInitOptions, i as AskedSubject, j as EmitSuccess, k as EmitOptions, l as ControlClient, m as DbInitFailureCode, n as AppliedStatementReport, o as ContractEmitOptions, p as DbInitFailure, q as SchemaVerifyOptions, r as AskedDataLoss, s as ContractEmitResult, t as AnswerPlanQuestions, u as ControlClientOptions, v as DbSignOptions, w as DbUpdateResult, x as DbUpdateFailure, y as DbSignSpaceFailure, z as PlanAnswer } from "./db-sign-C3GY7-1h-C0whdey8.mjs";
|
|
10
|
-
import { a as emit } from "./index-
|
|
10
|
+
import { a as emit } from "./index-wUUMOC5E.mjs";
|
|
11
11
|
import { f as IntegrityQueryOptions, l as ContractSpaceAggregate, m as IntegrityViolation, t as AggregateContractSpace } from "./aggregate-Da8PGnzg.mjs";
|
|
12
12
|
import "./metadata-BtscDay2.mjs";
|
|
13
13
|
import "./package-N9PPdFV_.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { w as errorFromCaught } from "./caught-errors-olsx_RBn-BC8azlie.mjs";
|
|
2
|
-
import { $ as refuseMarkerOutsideGraph, A as executeRefAdvancement, B as loadAggregateIntegrityViolations, C as executeDbInit, D as executeMigrateShowPlan, E as executeDbVerify, H as loadContractSource, I as hasMigrationPath, J as migrationSpaceListEntriesFromAggregate, K as mapContractAtError, M as executeRefListCommand, N as executeRefSetCommand, O as executeMigrationNewCommand, Q as refuseDeclaredExtensionTargetMismatch, R as listRefsByContractHash, S as executeContractEmit, T as executeDbUpdate, V as loadContractRawSafely, W as loadContractSpaceAggregateForCli, X as readMigrationRefs, Y as preflightRefAdvancement, Z as refuseContractSpaceIntegrity, _ as createControlClient, _t as statusForMigrationHash, at as resolveContractRef$1, b as enrichContract, c as appliedHashesFromLedger, ct as resolveMigrationRef, d as buildReadAggregate, et as refuseMissingInvariantPath, f as buildRefAdvancementFields, ft as runContractSpaceSeedPhase, j as executeRefDeleteCommand, k as executeMigrationPlanCommand, l as buildContractSpaceAggregate, lt as resolveStatements, m as computeRefAdvancementName, mt as runMigrationList, nt as refuseUnknownInvariants, o as advanceRefSafely, ot as resolveContractRefToSnapshot, p as checkSingleTarget, pt as runMigrationCheck, q as mapIntegrityViolations, r as NO_REF_ADVANCEMENT, s as appContractStandInFromIdentity, st as resolveFromForPlan, tt as refusePackageCorruptionOnAggregate, u as buildMigrationSpaceGraphEntries, ut as resolveToForPlan, v as deriveStatusEdgeAnnotations, w as executeDbSign, x as enumerateCheckSpaces, y as disposeEmitQueue } from "./ref-C4HTKAnF-
|
|
2
|
+
import { $ as refuseMarkerOutsideGraph, A as executeRefAdvancement, B as loadAggregateIntegrityViolations, C as executeDbInit, D as executeMigrateShowPlan, E as executeDbVerify, H as loadContractSource, I as hasMigrationPath, J as migrationSpaceListEntriesFromAggregate, K as mapContractAtError, M as executeRefListCommand, N as executeRefSetCommand, O as executeMigrationNewCommand, Q as refuseDeclaredExtensionTargetMismatch, R as listRefsByContractHash, S as executeContractEmit, T as executeDbUpdate, V as loadContractRawSafely, W as loadContractSpaceAggregateForCli, X as readMigrationRefs, Y as preflightRefAdvancement, Z as refuseContractSpaceIntegrity, _ as createControlClient, _t as statusForMigrationHash, at as resolveContractRef$1, b as enrichContract, c as appliedHashesFromLedger, ct as resolveMigrationRef, d as buildReadAggregate, et as refuseMissingInvariantPath, f as buildRefAdvancementFields, ft as runContractSpaceSeedPhase, j as executeRefDeleteCommand, k as executeMigrationPlanCommand, l as buildContractSpaceAggregate, lt as resolveStatements, m as computeRefAdvancementName, mt as runMigrationList, nt as refuseUnknownInvariants, o as advanceRefSafely, ot as resolveContractRefToSnapshot, p as checkSingleTarget, pt as runMigrationCheck, q as mapIntegrityViolations, r as NO_REF_ADVANCEMENT, s as appContractStandInFromIdentity, st as resolveFromForPlan, tt as refusePackageCorruptionOnAggregate, u as buildMigrationSpaceGraphEntries, ut as resolveToForPlan, v as deriveStatusEdgeAnnotations, w as executeDbSign, x as enumerateCheckSpaces, y as disposeEmitQueue } from "./ref-C4HTKAnF-4Opkr4ZP.mjs";
|
|
3
3
|
export { NO_REF_ADVANCEMENT, advanceRefSafely, appContractStandInFromIdentity, appliedHashesFromLedger, buildContractSpaceAggregate, buildMigrationSpaceGraphEntries, buildReadAggregate, buildRefAdvancementFields, checkSingleTarget, computeRefAdvancementName, createControlClient, deriveStatusEdgeAnnotations, disposeEmitQueue, enrichContract, enumerateCheckSpaces, errorFromCaught, executeContractEmit, executeDbInit, executeDbSign, executeDbUpdate, executeDbVerify, executeMigrateShowPlan, executeMigrationNewCommand, executeMigrationPlanCommand, executeRefAdvancement, executeRefDeleteCommand, executeRefListCommand, executeRefSetCommand, hasMigrationPath, listRefsByContractHash, loadAggregateIntegrityViolations, loadContractRawSafely, loadContractSource, loadContractSpaceAggregateForCli, mapContractAtError, mapIntegrityViolations, migrationSpaceListEntriesFromAggregate, preflightRefAdvancement, readMigrationRefs, refuseContractSpaceIntegrity, refuseDeclaredExtensionTargetMismatch, refuseMarkerOutsideGraph, refuseMissingInvariantPath, refusePackageCorruptionOnAggregate, refuseUnknownInvariants, resolveContractRef$1 as resolveContractRef, resolveContractRefToSnapshot, resolveFromForPlan, resolveMigrationRef, resolveStatements, resolveToForPlan, runContractSpaceSeedPhase, runMigrationCheck, runMigrationList, statusForMigrationHash };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as requireConfigSections, p as loadConfigForSections, s as findNearestConfigPathForFile, t as CONFIG_FILENAME, u as loadConfig } from "./exports-
|
|
1
|
+
import { g as requireConfigSections, p as loadConfigForSections, s as findNearestConfigPathForFile, t as CONFIG_FILENAME, u as loadConfig } from "./exports-DfSHy5Id.mjs";
|
|
2
2
|
import { g as errorInvalidJson } from "./errors-nnIQQvmN-oeANP4Yi.mjs";
|
|
3
3
|
import { rt as migrationsDirFor, w as errorFromCaught } from "./caught-errors-olsx_RBn-BC8azlie.mjs";
|
|
4
4
|
import { r as buildMigrationArtifacts } from "./migration-Cp6vkFMP.mjs";
|
package/dist/config-loader.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as validateOrmSection, a as expandContractInputs, c as globContractInputMatching, d as loadConfigFiles, f as loadConfigForFile, g as requireConfigSections, h as ormConfigSection, i as evaluateConfigModule, l as isConfigSection, m as ormConfigSchema, n as ORM_CONFIG_SECTION_NAME, p as loadConfigForSections, r as buildLoadedConfig, s as findNearestConfigPathForFile, t as CONFIG_FILENAME, u as loadConfig } from "./exports-
|
|
1
|
+
import { _ as validateOrmSection, a as expandContractInputs, c as globContractInputMatching, d as loadConfigFiles, f as loadConfigForFile, g as requireConfigSections, h as ormConfigSection, i as evaluateConfigModule, l as isConfigSection, m as ormConfigSchema, n as ORM_CONFIG_SECTION_NAME, p as loadConfigForSections, r as buildLoadedConfig, s as findNearestConfigPathForFile, t as CONFIG_FILENAME, u as loadConfig } from "./exports-DfSHy5Id.mjs";
|
|
2
2
|
export { CONFIG_FILENAME, ORM_CONFIG_SECTION_NAME, buildLoadedConfig, evaluateConfigModule, expandContractInputs, findNearestConfigPathForFile, globContractInputMatching, isConfigSection, loadConfig, loadConfigFiles, loadConfigForFile, loadConfigForSections, ormConfigSchema, ormConfigSection, requireConfigSections, validateOrmSection };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ImportSpecifierResolver, TypesImportSpec } from "@prisma/orm-framework/components/emission";
|
|
2
|
+
import { CodecLookup } from "@prisma/orm-framework/components/codec";
|
|
3
|
+
import { Contract, ContractField, ContractModelBase, ContractValueObject, CrossReference, JsonValue } from "@prisma/orm-framework/contract/types";
|
|
4
|
+
//#region ../../../1-framework/3-tooling/emitter/dist/domain-type-generation-BdSOXF3O.d.mts
|
|
5
|
+
//#region src/domain-type-generation.d.ts
|
|
6
|
+
declare function serializeValue(value: unknown): string;
|
|
7
|
+
declare function serializeObjectKey(key: string): string;
|
|
8
|
+
declare function serializeNamespaceId(value: string): string;
|
|
9
|
+
declare function serializeCrossReference(ref: CrossReference): string;
|
|
10
|
+
declare function generateRootsType(roots: Record<string, CrossReference> | undefined): string;
|
|
11
|
+
declare function generateModelFieldEntry(fieldName: string, field: ContractField): string;
|
|
12
|
+
declare function generateModelFieldsType(fields: Record<string, ContractField>): string;
|
|
13
|
+
declare function generateModelRelationsType(relations: Record<string, unknown>): string;
|
|
14
|
+
declare function generateModelsType(models: Record<string, ContractModelBase>, generateModelStorage: (modelName: string, model: ContractModelBase) => string): string;
|
|
15
|
+
declare function deduplicateImports(imports: TypesImportSpec[]): TypesImportSpec[];
|
|
16
|
+
declare function generateImportLines(imports: TypesImportSpec[], resolveImportSpecifier?: ImportSpecifierResolver): string[];
|
|
17
|
+
declare function generateCodecTypeIntersection(imports: ReadonlyArray<TypesImportSpec>, named: string): string;
|
|
18
|
+
declare function serializeExecutionType(execution: Record<string, unknown>): string;
|
|
19
|
+
declare function generateHashTypeAliases(hashes: {
|
|
20
|
+
readonly storageHash: string;
|
|
21
|
+
readonly executionHash?: string;
|
|
22
|
+
readonly profileHash: string;
|
|
23
|
+
}): string;
|
|
24
|
+
/**
|
|
25
|
+
* A field's permitted values (codec-encoded) plus the codec that types them: read from the domain enum the field names, or supplied for other model fields by the family's {@link EmissionSpi.resolveStorageValueSet}. The framework renders these into a TS literal union through the codec seam ({@link renderValueSetType}).
|
|
26
|
+
*/
|
|
27
|
+
type ResolvedFieldValueSet = {
|
|
28
|
+
readonly encodedValues: readonly JsonValue[];
|
|
29
|
+
readonly codecId: string;
|
|
30
|
+
};
|
|
31
|
+
type StorageValueSetResolver = (modelName: string, fieldName: string, model: ContractModelBase) => ResolvedFieldValueSet | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Renders a value set (a field/column's permitted values, codec-encoded) into a TS literal union by
|
|
34
|
+
* routing **each** value through the codec's `renderValueLiteral` — the seam owned by the codec, not
|
|
35
|
+
* a generic serializer. `side`: `output` = read type, `input` = create/update type.
|
|
36
|
+
*
|
|
37
|
+
* Returns `undefined` — signalling the caller to fall back to the codec's full output type — when
|
|
38
|
+
* the lookup is absent, has no `renderValueLiteralFor`, the value set is empty, or **any** value
|
|
39
|
+
* isn't literal-expressible. A caller that needs column and field types to agree shares this so both
|
|
40
|
+
* compute the union identically.
|
|
41
|
+
*/
|
|
42
|
+
declare function renderValueSetType(values: readonly JsonValue[], codecId: string, side: 'output' | 'input', codecLookup: CodecLookup | undefined): string | undefined;
|
|
43
|
+
/** The local alias for the union of the stack's parameterized output type functions. */
|
|
44
|
+
declare const PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS = "ParameterizedOutputTypeFunctions";
|
|
45
|
+
/** The declaration of {@link PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS} for the type functions the stack's components declare. */
|
|
46
|
+
declare function parameterizedOutputTypeFunctionsAlias(typeFunctions: ReadonlyArray<TypesImportSpec>): string;
|
|
47
|
+
/** `FieldOutputTypes` (`side` `'output'`) or `FieldInputTypes` (`'input'`): the shared generic applied to the emitted contract's domain, with `FieldTypeOverrides`. */
|
|
48
|
+
declare function fieldTypesMapExpression(side: 'output' | 'input'): string;
|
|
49
|
+
declare function generateContractFieldDescriptor(fieldName: string, field: ContractField): string;
|
|
50
|
+
declare function generateValueObjectsDescriptorType(valueObjects: Record<string, ContractValueObject> | undefined): string;
|
|
51
|
+
/**
|
|
52
|
+
* `<Name>Output` and `<Name>Input` for each value object, read from the shared generic's value object types at the namespace that declares it.
|
|
53
|
+
*/
|
|
54
|
+
declare function generateValueObjectTypeAliases(valueObjectNamespaces: ReadonlyArray<readonly [name: string, namespaceId: string]>): string;
|
|
55
|
+
/** A field's or column's type on each side where its codec does not give it, as type text. */
|
|
56
|
+
type TypeOverride = {
|
|
57
|
+
readonly output?: string;
|
|
58
|
+
readonly input?: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* The type of a scalar field that its codec does not give, which the shared field type generic takes as an override: the literal union of the value set it holds, or the text its codec renders for its type parameters. `undefined` when the codec gives both sides, and for a value object or union field, which the generic types itself.
|
|
62
|
+
*/
|
|
63
|
+
declare function resolveFieldTypeOverride(field: ContractField, codecLookup: CodecLookup | undefined, resolvedValueSet: ResolvedFieldValueSet | undefined): TypeOverride | undefined;
|
|
64
|
+
/** The literal union of a value set on each side whose values all have literal types, or `undefined` when neither side has. */
|
|
65
|
+
declare function renderValueSetOverride(values: readonly JsonValue[], codecId: string, codecLookup: CodecLookup | undefined): TypeOverride | undefined;
|
|
66
|
+
/** The type text a codec renders for these type parameters, on the sides it renders one. */
|
|
67
|
+
declare function renderCodecTypeOverride(codecId: string, typeParams: Record<string, unknown> | undefined, codecLookup: CodecLookup | undefined): TypeOverride | undefined;
|
|
68
|
+
declare function renderTypeOverride(override: TypeOverride): string;
|
|
69
|
+
/** A nested map of type overrides, one level per path segment, ordered by name at every level, leaving out every branch with no entry. */
|
|
70
|
+
declare function renderTypeOverridesMap(entries: ReadonlyArray<readonly [path: readonly string[], type: TypeOverride | undefined]>): string;
|
|
71
|
+
/** `FieldTypeOverrides`: per namespace, `models` or `valueObjects`, owner and field, the type of each field its codec does not give. */
|
|
72
|
+
declare function generateFieldTypeOverridesMap(contract: Pick<Contract, 'domain'>, codecLookup: CodecLookup | undefined, resolveStorageValueSet: StorageValueSetResolver | undefined): string;
|
|
73
|
+
//#endregion
|
|
74
|
+
export { serializeValue as A, renderValueSetOverride as C, serializeExecutionType as D, serializeCrossReference as E, serializeNamespaceId as O, renderTypeOverridesMap as S, resolveFieldTypeOverride as T, generateValueObjectTypeAliases as _, deduplicateImports as a, renderCodecTypeOverride as b, generateContractFieldDescriptor as c, generateImportLines as d, generateModelFieldEntry as f, generateRootsType as g, generateModelsType as h, TypeOverride as i, serializeObjectKey as k, generateFieldTypeOverridesMap as l, generateModelRelationsType as m, ResolvedFieldValueSet as n, fieldTypesMapExpression as o, generateModelFieldsType as p, StorageValueSetResolver as r, generateCodecTypeIntersection as s, PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS as t, generateHashTypeAliases as u, generateValueObjectsDescriptorType as v, renderValueSetType as w, renderTypeOverride as x, parameterizedOutputTypeFunctionsAlias as y };
|
|
75
|
+
//# sourceMappingURL=domain-type-generation-BdSOXF3O-DGGiAaNs.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain-type-generation-BdSOXF3O-DGGiAaNs.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/emitter/dist/domain-type-generation-BdSOXF3O.d.mts"],"mappings":";;;;;iBAIiB,eAAe;iBACf,mBAAmB;iBACnB,qBAAqB;iBACrB,wBAAwB,KAAK;iBAC7B,kBAAkB,OAAO,eAAe;iBACxC,wBAAwB,mBAAmB,OAAO;iBAClD,wBAAwB,QAAQ,eAAe;iBAC/C,2BAA2B,WAAW;iBACtC,mBAAmB,QAAQ,eAAe,oBAAoB,uBAAuB,mBAAmB,OAAO;iBAC/G,mBAAmB,SAAS,oBAAoB;iBAChD,oBAAoB,SAAS,mBAAmB,yBAAyB;iBACzE,8BAA8B,SAAS,cAAc,kBAAkB;iBACvE,uBAAuB,WAAW;iBAClC,wBAAwB;WAC9B;WACA;WACA;;;;;KAKN;WACM,wBAAwB;WACxB;;KAEN,2BAA2B,mBAAmB,mBAAmB,OAAO,sBAAsB;;;;;;;;;;;iBAWlF,mBAAmB,iBAAiB,aAAa,iBAAiB,0BAA0B,aAAa;;cAE5G;;iBAEG,sCAAsC,eAAe,cAAc;;iBAEnE,wBAAwB;iBACxB,gCAAgC,mBAAmB,OAAO;iBAC1D,mCAAmC,cAAc,eAAe;;;;iBAIhE,+BAA+B,uBAAuB,wBAAwB,cAAc;;KAExG;WACM;WACA;;;;;iBAKM,yBAAyB,OAAO,eAAe,aAAa,yBAAyB,kBAAkB,oCAAoC;;iBAE3I,uBAAuB,iBAAiB,aAAa,iBAAiB,aAAa,0BAA0B;;iBAE7G,wBAAwB,iBAAiB,YAAY,qCAAqC,aAAa,0BAA0B;iBACjI,mBAAmB,UAAU;;iBAE7B,uBAAuB,SAAS,wBAAwB,yBAAyB,MAAM;;iBAEvF,8BAA8B,UAAU,KAAK,qBAAqB,aAAa,yBAAyB,wBAAwB"}
|
|
@@ -3,7 +3,7 @@ import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
|
3
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
4
|
import { keepInternalSpecifiers } from "@prisma/orm-framework/components/emission";
|
|
5
5
|
import { renderImports, tsStringLiteral } from "@prisma/orm-framework/ts-render";
|
|
6
|
-
//#region ../../../1-framework/3-tooling/emitter/dist/domain-type-generation-
|
|
6
|
+
//#region ../../../1-framework/3-tooling/emitter/dist/domain-type-generation-DpXuDGLd.mjs
|
|
7
7
|
function emitterError(code, message, options) {
|
|
8
8
|
return structuredError(code, message, options);
|
|
9
9
|
}
|
|
@@ -47,9 +47,6 @@ function generateModelFieldEntry(fieldName, field) {
|
|
|
47
47
|
function objectTypeOpenWhenEmpty(entries) {
|
|
48
48
|
return entries.length > 0 ? `{ ${entries.join("; ")} }` : "{}";
|
|
49
49
|
}
|
|
50
|
-
function objectTypeClosedWhenEmpty(entries) {
|
|
51
|
-
return entries.length > 0 ? `{ ${entries.join("; ")} }` : "Record<string, never>";
|
|
52
|
-
}
|
|
53
50
|
function generateModelFieldsType(fields) {
|
|
54
51
|
const fieldEntries = [];
|
|
55
52
|
for (const [fieldName, field] of Object.entries(fields)) fieldEntries.push(generateModelFieldEntry(fieldName, field));
|
|
@@ -153,16 +150,6 @@ function generateHashTypeAliases(hashes) {
|
|
|
153
150
|
`export type ProfileHash = ProfileHashBase<${serializeValue(hashes.profileHash)}>;`
|
|
154
151
|
].join("\n");
|
|
155
152
|
}
|
|
156
|
-
function applyModifiers(base, field) {
|
|
157
|
-
let result = base;
|
|
158
|
-
if (field.many) {
|
|
159
|
-
if (field.many.elementNullable) result = `${result} | null`;
|
|
160
|
-
result = `ReadonlyArray<${result}>`;
|
|
161
|
-
}
|
|
162
|
-
if (field.dict === true) result = `Readonly<Record<string, ${result}>>`;
|
|
163
|
-
if (field.nullable) result = `${result} | null`;
|
|
164
|
-
return result;
|
|
165
|
-
}
|
|
166
153
|
/**
|
|
167
154
|
* Renders a value set (a field/column's permitted values, codec-encoded) into a TS literal union by
|
|
168
155
|
* routing **each** value through the codec's `renderValueLiteral` — the seam owned by the codec, not
|
|
@@ -183,156 +170,16 @@ function renderValueSetType(values, codecId, side, codecLookup) {
|
|
|
183
170
|
}
|
|
184
171
|
return literals.join(" | ");
|
|
185
172
|
}
|
|
186
|
-
/** The local alias an emitted `contract.d.ts` types a column with type parameters through. */
|
|
187
|
-
const CODEC_OUTPUT_FOR = "CodecOutputFor";
|
|
188
173
|
/** The local alias for the union of the stack's parameterized output type functions. */
|
|
189
174
|
const PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS = "ParameterizedOutputTypeFunctions";
|
|
190
|
-
/** The declaration of {@link CODEC_OUTPUT_FOR}: `ParameterizedOutputType` from `@internal/contract/types` applied to {@link PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS}, falling back to the codec's plain output type. */
|
|
191
|
-
const codecOutputForAlias = `type ${CODEC_OUTPUT_FOR}<CodecId extends keyof CodecTypes, TypeParams extends Record<string, unknown>> = ParameterizedOutputType<${PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS}, CodecId, TypeParams, CodecTypes[CodecId]["output"]>;`;
|
|
192
175
|
/** The declaration of {@link PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS} for the type functions the stack's components declare. */
|
|
193
176
|
function parameterizedOutputTypeFunctionsAlias(typeFunctions) {
|
|
194
177
|
const aliases = [...new Set(typeFunctions.map((typeFunction) => typeFunction.alias))];
|
|
195
178
|
return `type ${PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS} = ${aliases.length > 0 ? aliases.join(" | ") : "never"};`;
|
|
196
179
|
}
|
|
197
|
-
/**
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
function codecOutputType(codecId, typeParams, codecLookup) {
|
|
201
|
-
const plain = `CodecTypes[${serializeValue(codecId)}]["output"]`;
|
|
202
|
-
if (typeParams === void 0) return plain;
|
|
203
|
-
const rendered = codecLookup?.renderOutputTypeFor(codecId, typeParams);
|
|
204
|
-
if (rendered && isSafeTypeExpression(rendered)) return rendered;
|
|
205
|
-
return `${CODEC_OUTPUT_FOR}<${serializeValue(codecId)}, ${serializeValue(typeParams)}>`;
|
|
206
|
-
}
|
|
207
|
-
/** The input type of a value of codec `codecId` in a column with these type parameters: the text the codec renders (`renderInputType`), or its plain input type. */
|
|
208
|
-
function codecInputType(codecId, typeParams, codecLookup) {
|
|
209
|
-
if (codecLookup !== void 0 && typeParams !== void 0) {
|
|
210
|
-
const rendered = codecLookup.renderInputTypeFor?.(codecId, typeParams);
|
|
211
|
-
if (rendered && isSafeTypeExpression(rendered)) return rendered;
|
|
212
|
-
}
|
|
213
|
-
return `CodecTypes[${serializeValue(codecId)}]["input"]`;
|
|
214
|
-
}
|
|
215
|
-
function resolveFieldType(field, codecLookup, resolvedValueSet) {
|
|
216
|
-
const { type } = field;
|
|
217
|
-
switch (type.kind) {
|
|
218
|
-
case "scalar": {
|
|
219
|
-
if (resolvedValueSet) {
|
|
220
|
-
const output = renderValueSetType(resolvedValueSet.encodedValues, resolvedValueSet.codecId, "output", codecLookup);
|
|
221
|
-
const input = renderValueSetType(resolvedValueSet.encodedValues, resolvedValueSet.codecId, "input", codecLookup);
|
|
222
|
-
if (output !== void 0 && input !== void 0) return {
|
|
223
|
-
output: applyModifiers(output, field),
|
|
224
|
-
input: applyModifiers(input, field)
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
const typeParams = type.typeParams && Object.keys(type.typeParams).length > 0 ? type.typeParams : void 0;
|
|
228
|
-
return {
|
|
229
|
-
output: applyModifiers(codecOutputType(type.codecId, typeParams, codecLookup), field),
|
|
230
|
-
input: applyModifiers(codecInputType(type.codecId, typeParams, codecLookup), field)
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
case "valueObject": return {
|
|
234
|
-
output: applyModifiers(`${type.name}Output`, field),
|
|
235
|
-
input: applyModifiers(`${type.name}Input`, field)
|
|
236
|
-
};
|
|
237
|
-
case "union": {
|
|
238
|
-
const outputMembers = type.members.map((m) => m.kind === "scalar" ? `CodecTypes[${serializeValue(m.codecId)}]["output"]` : `${m.name}Output`);
|
|
239
|
-
const inputMembers = type.members.map((m) => m.kind === "scalar" ? `CodecTypes[${serializeValue(m.codecId)}]["input"]` : `${m.name}Input`);
|
|
240
|
-
return {
|
|
241
|
-
output: applyModifiers(outputMembers.join(" | "), field),
|
|
242
|
-
input: applyModifiers(inputMembers.join(" | "), field)
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
default: return {
|
|
246
|
-
output: applyModifiers("unknown", field),
|
|
247
|
-
input: applyModifiers("unknown", field)
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
function generateFieldResolvedType(field, codecLookup, side = "output") {
|
|
252
|
-
return resolveFieldType(field, codecLookup)[side];
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Resolves one model field's input and output types the way `FieldOutputTypes` /
|
|
256
|
-
* `FieldInputTypes` do: the field's type parameters refine its codec's type, and a family-resolved
|
|
257
|
-
* value set renders as a literal union.
|
|
258
|
-
*/
|
|
259
|
-
function resolveModelFieldType(modelName, fieldName, field, model, resolvers) {
|
|
260
|
-
const resolvedValueSet = resolvers.resolveFieldValueSet?.(modelName, fieldName, model);
|
|
261
|
-
return resolveFieldType(field, resolvers.codecLookup, resolvedValueSet);
|
|
262
|
-
}
|
|
263
|
-
function generateBothFieldTypesMaps(models, codecLookup, resolveFieldValueSet) {
|
|
264
|
-
if (!models || Object.keys(models).length === 0) return {
|
|
265
|
-
output: "Record<string, never>",
|
|
266
|
-
input: "Record<string, never>"
|
|
267
|
-
};
|
|
268
|
-
const resolvers = {
|
|
269
|
-
codecLookup,
|
|
270
|
-
resolveFieldValueSet
|
|
271
|
-
};
|
|
272
|
-
const outputModelEntries = [];
|
|
273
|
-
const inputModelEntries = [];
|
|
274
|
-
for (const [modelName, model] of Object.entries(models).sort(([a], [b]) => a.localeCompare(b))) {
|
|
275
|
-
if (!model) continue;
|
|
276
|
-
const outputFieldEntries = [];
|
|
277
|
-
const inputFieldEntries = [];
|
|
278
|
-
for (const [fieldName, field] of Object.entries(model.fields)) {
|
|
279
|
-
const resolved = resolveModelFieldType(modelName, fieldName, field, model, resolvers);
|
|
280
|
-
const key = `readonly ${serializeObjectKey(fieldName)}`;
|
|
281
|
-
outputFieldEntries.push(`${key}: ${resolved.output}`);
|
|
282
|
-
inputFieldEntries.push(`${key}: ${resolved.input}`);
|
|
283
|
-
}
|
|
284
|
-
const outputFields = objectTypeOpenWhenEmpty(outputFieldEntries);
|
|
285
|
-
const inputFields = objectTypeClosedWhenEmpty(inputFieldEntries);
|
|
286
|
-
const modelKey = `readonly ${serializeObjectKey(modelName)}`;
|
|
287
|
-
outputModelEntries.push(`${modelKey}: ${outputFields}`);
|
|
288
|
-
inputModelEntries.push(`${modelKey}: ${inputFields}`);
|
|
289
|
-
}
|
|
290
|
-
return {
|
|
291
|
-
output: `{ ${outputModelEntries.join("; ")} }`,
|
|
292
|
-
input: `{ ${inputModelEntries.join("; ")} }`
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
function generateFieldTypesMapsByNamespace(namespaceModels, codecLookup, resolveFieldValueSet) {
|
|
296
|
-
if (namespaceModels.length === 0) return {
|
|
297
|
-
output: "Record<string, never>",
|
|
298
|
-
input: "Record<string, never>"
|
|
299
|
-
};
|
|
300
|
-
const outputNamespaceEntries = [];
|
|
301
|
-
const inputNamespaceEntries = [];
|
|
302
|
-
for (const [nsId, models] of namespaceModels) {
|
|
303
|
-
const inner = generateBothFieldTypesMaps(models, codecLookup, resolveFieldValueSet);
|
|
304
|
-
const nsKey = `readonly ${serializeObjectKey(nsId)}`;
|
|
305
|
-
outputNamespaceEntries.push(`${nsKey}: ${inner.output}`);
|
|
306
|
-
inputNamespaceEntries.push(`${nsKey}: ${inner.input}`);
|
|
307
|
-
}
|
|
308
|
-
return {
|
|
309
|
-
output: `{ ${outputNamespaceEntries.join("; ")} }`,
|
|
310
|
-
input: `{ ${inputNamespaceEntries.join("; ")} }`
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
function generateFieldOutputTypesMap(models, codecLookup) {
|
|
314
|
-
return generateBothFieldTypesMaps(models, codecLookup).output;
|
|
315
|
-
}
|
|
316
|
-
function generateFieldInputTypesMap(models, codecLookup) {
|
|
317
|
-
return generateBothFieldTypesMaps(models, codecLookup).input;
|
|
318
|
-
}
|
|
319
|
-
function generateValueObjectType(_voName, vo, _valueObjects, side = "output", codecLookup) {
|
|
320
|
-
return resolveValueObjectType(_voName, vo, _valueObjects, codecLookup)[side];
|
|
321
|
-
}
|
|
322
|
-
function resolveValueObjectType(_voName, vo, _valueObjects, codecLookup) {
|
|
323
|
-
const outputEntries = [];
|
|
324
|
-
const inputEntries = [];
|
|
325
|
-
for (const [fieldName, field] of Object.entries(vo.fields)) {
|
|
326
|
-
const resolved = resolveFieldType(field, codecLookup);
|
|
327
|
-
const key = `readonly ${serializeObjectKey(fieldName)}`;
|
|
328
|
-
outputEntries.push(`${key}: ${resolved.output}`);
|
|
329
|
-
inputEntries.push(`${key}: ${resolved.input}`);
|
|
330
|
-
}
|
|
331
|
-
const empty = "Record<string, never>";
|
|
332
|
-
return {
|
|
333
|
-
output: outputEntries.length > 0 ? `{ ${outputEntries.join("; ")} }` : empty,
|
|
334
|
-
input: inputEntries.length > 0 ? `{ ${inputEntries.join("; ")} }` : empty
|
|
335
|
-
};
|
|
180
|
+
/** `FieldOutputTypes` (`side` `'output'`) or `FieldInputTypes` (`'input'`): the shared generic applied to the emitted contract's domain, with `FieldTypeOverrides`. */
|
|
181
|
+
function fieldTypesMapExpression(side) {
|
|
182
|
+
return `FieldTypesFromDomain<ContractBase['domain']['namespaces'], CodecTypes, ${PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS}, FieldTypeOverrides, ${serializeValue(side)}>`;
|
|
336
183
|
}
|
|
337
184
|
function generateContractFieldDescriptor(fieldName, field) {
|
|
338
185
|
const modStr = contractFieldModifierSuffix(field);
|
|
@@ -355,31 +202,26 @@ function generateValueObjectsDescriptorType(valueObjects) {
|
|
|
355
202
|
}
|
|
356
203
|
return `{ ${voEntries.join("; ")} }`;
|
|
357
204
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
205
|
+
/**
|
|
206
|
+
* `<Name>Output` and `<Name>Input` for each value object, read from the shared generic's value object types at the namespace that declares it.
|
|
207
|
+
*/
|
|
208
|
+
function generateValueObjectTypeAliases(valueObjectNamespaces) {
|
|
209
|
+
if (valueObjectNamespaces.length === 0) return "";
|
|
210
|
+
const generic = (side) => `ValueObjectTypesFromDomain<ContractBase['domain']['namespaces'], CodecTypes, ${PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS}, FieldTypeOverrides, ${serializeValue(side)}>`;
|
|
211
|
+
const aliases = [`type ValueObjectOutputTypes = ${generic("output")};`, `type ValueObjectInputTypes = ${generic("input")};`];
|
|
212
|
+
for (const [name, namespaceId] of valueObjectNamespaces) {
|
|
213
|
+
const path = `[${serializeValue(namespaceId)}][${serializeValue(name)}]`;
|
|
214
|
+
aliases.push(`export type ${name}Output = ValueObjectOutputTypes${path};`);
|
|
215
|
+
aliases.push(`export type ${name}Input = ValueObjectInputTypes${path};`);
|
|
365
216
|
}
|
|
366
217
|
return aliases.join("\n");
|
|
367
218
|
}
|
|
368
219
|
/**
|
|
369
|
-
* The type of a field that its codec does not give,
|
|
220
|
+
* The type of a scalar field that its codec does not give, which the shared field type generic takes as an override: the literal union of the value set it holds, or the text its codec renders for its type parameters. `undefined` when the codec gives both sides, and for a value object or union field, which the generic types itself.
|
|
370
221
|
*/
|
|
371
222
|
function resolveFieldTypeOverride(field, codecLookup, resolvedValueSet) {
|
|
372
223
|
const { type } = field;
|
|
373
|
-
if (type.kind !== "scalar")
|
|
374
|
-
const resolved = resolveFieldType({
|
|
375
|
-
nullable: false,
|
|
376
|
-
type
|
|
377
|
-
}, codecLookup);
|
|
378
|
-
return {
|
|
379
|
-
output: resolved.output,
|
|
380
|
-
input: resolved.input
|
|
381
|
-
};
|
|
382
|
-
}
|
|
224
|
+
if (type.kind !== "scalar") return void 0;
|
|
383
225
|
if (resolvedValueSet) {
|
|
384
226
|
const override = renderValueSetOverride(resolvedValueSet.encodedValues, resolvedValueSet.codecId, codecLookup);
|
|
385
227
|
if (override !== void 0) return override;
|
|
@@ -414,45 +256,63 @@ function renderTypeOverride(override) {
|
|
|
414
256
|
return type === void 0 ? [] : [`readonly ${side}: ${type}`];
|
|
415
257
|
}).join("; ")} }`;
|
|
416
258
|
}
|
|
417
|
-
/** A nested map of type overrides, ordered by name at every level, leaving out every branch with no entry. */
|
|
259
|
+
/** A nested map of type overrides, one level per path segment, ordered by name at every level, leaving out every branch with no entry. */
|
|
418
260
|
function renderTypeOverridesMap(entries) {
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
const [first, second, third] = path;
|
|
432
|
-
const middle = outer.get(first) ?? /* @__PURE__ */ new Map();
|
|
433
|
-
outer.set(first, middle);
|
|
434
|
-
const inner = middle.get(second) ?? [];
|
|
435
|
-
middle.set(second, inner);
|
|
436
|
-
inner.push(`readonly ${serializeObjectKey(third)}: ${renderTypeOverride(type)}`);
|
|
261
|
+
const root = /* @__PURE__ */ new Map();
|
|
262
|
+
for (const [path, type] of entries) {
|
|
263
|
+
if (type === void 0) continue;
|
|
264
|
+
let node = root;
|
|
265
|
+
for (const segment of path.slice(0, -1)) {
|
|
266
|
+
const child = node.get(segment);
|
|
267
|
+
const next = child instanceof Map ? child : /* @__PURE__ */ new Map();
|
|
268
|
+
node.set(segment, next);
|
|
269
|
+
node = next;
|
|
270
|
+
}
|
|
271
|
+
const leaf = path.at(-1);
|
|
272
|
+
if (leaf !== void 0) node.set(leaf, type);
|
|
437
273
|
}
|
|
438
|
-
return
|
|
439
|
-
const secondParts = [...middle].map(([second, inner]) => `readonly ${serializeObjectKey(second)}: { ${inner.join("; ")} }`);
|
|
440
|
-
return `readonly ${serializeObjectKey(first)}: { ${secondParts.join("; ")} }`;
|
|
441
|
-
}).join("; ")} }`;
|
|
274
|
+
return renderOverrideTree(root);
|
|
442
275
|
}
|
|
443
|
-
function
|
|
444
|
-
return
|
|
276
|
+
function renderOverrideTree(tree) {
|
|
277
|
+
return `{ ${[...tree].sort(([a], [b]) => a.localeCompare(b)).map(([key, value]) => `readonly ${serializeObjectKey(key)}: ${value instanceof Map ? renderOverrideTree(value) : renderTypeOverride(value)}`).join("; ")} }`;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* The values a field's value set holds, with the field's codec. A reference to a domain enum is read from the contract's domain, for model and value object fields alike. Any other model field goes to the family's `resolveStorageValueSet`, which reads its storage. A value object field has no storage of its own.
|
|
281
|
+
*/
|
|
282
|
+
function resolveFieldValueSet(field, contract, resolveStorageValueSet) {
|
|
283
|
+
if (field.valueSet?.plane === "domain") return resolveDomainValueSet(field, contract);
|
|
284
|
+
return resolveStorageValueSet();
|
|
285
|
+
}
|
|
286
|
+
function resolveDomainValueSet(field, contract) {
|
|
287
|
+
const ref = field.valueSet;
|
|
288
|
+
if (ref === void 0 || field.type.kind !== "scalar" || ref.entityKind !== "enum") return;
|
|
289
|
+
const domainEnum = contract.domain.namespaces[ref.namespaceId]?.enum?.[ref.entityName];
|
|
290
|
+
if (domainEnum === void 0) return void 0;
|
|
291
|
+
return {
|
|
292
|
+
encodedValues: domainEnum.members.map((member) => member.value),
|
|
293
|
+
codecId: field.type.codecId
|
|
294
|
+
};
|
|
445
295
|
}
|
|
446
|
-
/** `FieldTypeOverrides`: per namespace,
|
|
447
|
-
function generateFieldTypeOverridesMap(
|
|
448
|
-
return renderTypeOverridesMap(
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
296
|
+
/** `FieldTypeOverrides`: per namespace, `models` or `valueObjects`, owner and field, the type of each field its codec does not give. */
|
|
297
|
+
function generateFieldTypeOverridesMap(contract, codecLookup, resolveStorageValueSet) {
|
|
298
|
+
return renderTypeOverridesMap(Object.entries(contract.domain.namespaces).flatMap(([nsId, ns]) => {
|
|
299
|
+
const modelFields = Object.entries(ns.models).flatMap(([modelName, model]) => Object.entries(model.fields).map(([fieldName, field]) => [[
|
|
300
|
+
nsId,
|
|
301
|
+
"models",
|
|
302
|
+
modelName,
|
|
303
|
+
fieldName
|
|
304
|
+
], resolveFieldTypeOverride(field, codecLookup, resolveFieldValueSet(field, contract, () => resolveStorageValueSet?.(modelName, fieldName, model)))]));
|
|
305
|
+
const valueObjects = blindCast(ns.valueObjects ?? {});
|
|
306
|
+
const valueObjectFields = Object.entries(valueObjects).flatMap(([valueObjectName, valueObject]) => Object.entries(valueObject.fields).map(([fieldName, field]) => [[
|
|
307
|
+
nsId,
|
|
308
|
+
"valueObjects",
|
|
309
|
+
valueObjectName,
|
|
310
|
+
fieldName
|
|
311
|
+
], resolveFieldTypeOverride(field, codecLookup, resolveFieldValueSet(field, contract, () => void 0))]));
|
|
312
|
+
return [...modelFields, ...valueObjectFields];
|
|
313
|
+
}));
|
|
454
314
|
}
|
|
455
315
|
//#endregion
|
|
456
|
-
export {
|
|
316
|
+
export { resolveFieldTypeOverride as C, serializeObjectKey as D, serializeNamespaceId as E, serializeValue as O, renderValueSetType as S, serializeExecutionType as T, parameterizedOutputTypeFunctionsAlias as _, generateCodecTypeIntersection as a, renderTypeOverridesMap as b, generateHashTypeAliases as c, generateModelFieldsType as d, generateModelRelationsType as f, generateValueObjectsDescriptorType as g, generateValueObjectTypeAliases as h, fieldTypesMapExpression as i, generateImportLines as l, generateRootsType as m, deduplicateImports as n, generateContractFieldDescriptor as o, generateModelsType as p, emitterError as r, generateFieldTypeOverridesMap as s, PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS as t, generateModelFieldEntry as u, renderCodecTypeOverride as v, serializeCrossReference as w, renderValueSetOverride as x, renderTypeOverride as y };
|
|
457
317
|
|
|
458
|
-
//# sourceMappingURL=domain-type-generation-
|
|
318
|
+
//# sourceMappingURL=domain-type-generation-DpXuDGLd-CuADX8tA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain-type-generation-DpXuDGLd-CuADX8tA.mjs","names":[],"sources":["../../../../1-framework/3-tooling/emitter/dist/domain-type-generation-DpXuDGLd.mjs"],"sourcesContent":["import { isSafeTypeExpression } from \"./type-expression-safety.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { keepInternalSpecifiers } from \"@internal/framework-components/emission\";\nimport { renderImports, tsStringLiteral } from \"@internal/ts-render\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/emitter-errors.ts\nfunction emitterError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/domain-type-generation.ts\nfunction serializeValue(value) {\n\tif (value === null) return \"null\";\n\tif (value === void 0) return \"undefined\";\n\tif (typeof value === \"string\") return tsStringLiteral(value);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n\tif (typeof value === \"bigint\") return `${value}n`;\n\tif (Array.isArray(value)) return `readonly [${value.map((v) => serializeValue(v)).join(\", \")}]`;\n\tif (typeof value === \"object\") return `{ ${Object.entries(value).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0).map(([k, v]) => `readonly ${serializeObjectKey(k)}: ${serializeValue(v)}`).join(\"; \")} }`;\n\treturn \"unknown\";\n}\nfunction serializeObjectKey(key) {\n\tif (/^[$A-Z_a-z][$\\w]*$/.test(key)) return key;\n\treturn serializeValue(key);\n}\nfunction serializeNamespaceId(value) {\n\treturn `${serializeValue(value)} & NamespaceId`;\n}\nfunction serializeCrossReference(ref) {\n\treturn `{ readonly namespace: ${serializeNamespaceId(String(ref.namespace))}; readonly model: ${serializeValue(ref.model)}${ref.space !== void 0 ? `; readonly space: ${serializeValue(ref.space)}` : \"\"} }`;\n}\nfunction generateRootsType(roots) {\n\tif (!roots || Object.keys(roots).length === 0) return \"Record<string, never>\";\n\treturn `{ ${Object.entries(roots).map(([key, value]) => `readonly ${serializeObjectKey(key)}: ${serializeCrossReference(value)}`).join(\"; \")} }`;\n}\nfunction contractFieldModifierSuffix(field) {\n\treturn (field.many ? `; readonly many: { readonly elementNullable: ${field.many.elementNullable} }` : \"\") + (field.dict === true ? \"; readonly dict: true\" : \"\");\n}\nfunction generateModelFieldEntry(fieldName, field) {\n\tconst mods = contractFieldModifierSuffix(field);\n\tconst { nullable, type } = field;\n\tif (type.kind === \"scalar\") {\n\t\tconst typeParamsSpec = type.typeParams && Object.keys(type.typeParams).length > 0 ? `; readonly typeParams: ${serializeValue(type.typeParams)}` : \"\";\n\t\treturn `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${nullable}; readonly type: { readonly kind: \"scalar\"; readonly codecId: ${serializeValue(type.codecId)}${typeParamsSpec} }${mods} }`;\n\t}\n\tif (type.kind === \"valueObject\") return `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${nullable}; readonly type: { readonly kind: \"valueObject\"; readonly name: ${serializeValue(type.name)} }${mods} }`;\n\treturn `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${nullable}; readonly type: ${serializeValue(type)}${mods} }`;\n}\nfunction objectTypeOpenWhenEmpty(entries) {\n\treturn entries.length > 0 ? `{ ${entries.join(\"; \")} }` : \"{}\";\n}\nfunction generateModelFieldsType(fields) {\n\tconst fieldEntries = [];\n\tfor (const [fieldName, field] of Object.entries(fields)) fieldEntries.push(generateModelFieldEntry(fieldName, field));\n\treturn objectTypeOpenWhenEmpty(fieldEntries);\n}\nfunction generateModelRelationsType(relations) {\n\tconst relationEntries = [];\n\tfor (const [relName, rel] of Object.entries(relations)) {\n\t\tif (typeof rel !== \"object\" || rel === null) continue;\n\t\tconst relObj = blindCast(rel);\n\t\tconst toRef = relObj[\"to\"];\n\t\tif (toRef !== null && typeof toRef === \"object\" && \"space\" in toRef && toRef.space !== void 0) {\n\t\t\trelationEntries.push(`readonly ${serializeObjectKey(relName)}: never`);\n\t\t\tcontinue;\n\t\t}\n\t\tconst parts = [];\n\t\tif (toRef) parts.push(`readonly to: ${serializeCrossReference(blindCast(toRef))}`);\n\t\tif (relObj[\"cardinality\"]) parts.push(`readonly cardinality: ${serializeValue(relObj[\"cardinality\"])}`);\n\t\tif (typeof relObj[\"nullable\"] === \"boolean\") parts.push(`readonly nullable: ${relObj[\"nullable\"]}`);\n\t\tconst on = blindCast(relObj[\"on\"]);\n\t\tif (on && (!on.localFields || !on.targetFields)) throw emitterError(\"CONTRACT.RELATION_INVALID\", `Relation \"${relName}\" has an \"on\" block but is missing localFields or targetFields`, { meta: { relation: relName } });\n\t\tif (on?.localFields && on.targetFields) {\n\t\t\tconst localFields = on.localFields.map((f) => serializeValue(f)).join(\", \");\n\t\t\tconst targetFields = on.targetFields.map((f) => serializeValue(f)).join(\", \");\n\t\t\tparts.push(`readonly on: { readonly localFields: readonly [${localFields}]; readonly targetFields: readonly [${targetFields}] }`);\n\t\t}\n\t\tif (relObj[\"cardinality\"] === \"N:M\") {\n\t\t\tconst { through } = blindCast(relObj);\n\t\t\tconst table = serializeValue(through.table);\n\t\t\tconst namespaceId = serializeValue(through.namespaceId);\n\t\t\tconst parentColumns = through.parentColumns.map((c) => serializeValue(c)).join(\", \");\n\t\t\tconst childColumns = through.childColumns.map((c) => serializeValue(c)).join(\", \");\n\t\t\tconst targetColumns = through.targetColumns.map((c) => serializeValue(c)).join(\", \");\n\t\t\tparts.push(`readonly through: { readonly table: ${table}; readonly namespaceId: ${namespaceId}; readonly parentColumns: readonly [${parentColumns}]; readonly childColumns: readonly [${childColumns}]; readonly targetColumns: readonly [${targetColumns}] }`);\n\t\t}\n\t\tif (parts.length > 0) relationEntries.push(`readonly ${serializeObjectKey(relName)}: { ${parts.join(\"; \")} }`);\n\t}\n\tif (relationEntries.length === 0) return \"Record<string, never>\";\n\treturn `{ ${relationEntries.join(\"; \")} }`;\n}\nfunction generateModelsType(models, generateModelStorage) {\n\tif (!models || Object.keys(models).length === 0) return \"Record<string, never>\";\n\tconst modelTypes = [];\n\tfor (const [modelName, model] of Object.entries(models).sort(([a], [b]) => a.localeCompare(b))) {\n\t\tconst fieldsType = generateModelFieldsType(model.fields);\n\t\tconst relationsType = generateModelRelationsType(model.relations);\n\t\tconst storageType = generateModelStorage(modelName, model);\n\t\tconst modelParts = [\n\t\t\t`readonly fields: ${fieldsType}`,\n\t\t\t`readonly relations: ${relationsType}`,\n\t\t\t`readonly storage: ${storageType}`\n\t\t];\n\t\tif (model.owner) modelParts.push(`readonly owner: ${serializeValue(model.owner)}`);\n\t\tif (model.discriminator) modelParts.push(`readonly discriminator: ${serializeValue(model.discriminator)}`);\n\t\tif (model.variants) {\n\t\t\tconst variantEntries = Object.entries(model.variants).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0).map(([value, ref]) => `readonly ${serializeObjectKey(value)}: ${serializeCrossReference(ref)}`);\n\t\t\tmodelParts.push(`readonly variants: { ${variantEntries.join(\"; \")} }`);\n\t\t}\n\t\tif (model.base) modelParts.push(`readonly base: ${serializeCrossReference(model.base)}`);\n\t\tmodelTypes.push(`readonly ${serializeObjectKey(modelName)}: { ${modelParts.join(\"; \")} }`);\n\t}\n\treturn `{ ${modelTypes.join(\"; \")} }`;\n}\nfunction deduplicateImports(imports) {\n\tconst seenKeys = /* @__PURE__ */ new Set();\n\tconst result = [];\n\tfor (const imp of imports) {\n\t\tconst key = `${imp.package}::${imp.named}`;\n\t\tif (!seenKeys.has(key)) {\n\t\t\tseenKeys.add(key);\n\t\t\tresult.push(imp);\n\t\t}\n\t}\n\treturn result;\n}\nfunction generateImportLines(imports, resolveImportSpecifier = keepInternalSpecifiers) {\n\tconst rendered = renderImports(imports.map((imp) => ({\n\t\tmoduleSpecifier: resolveImportSpecifier(imp.package),\n\t\tsymbol: imp.named,\n\t\talias: imp.alias,\n\t\ttypeOnly: true\n\t})));\n\treturn rendered === \"\" ? [] : rendered.split(\"\\n\");\n}\nfunction generateCodecTypeIntersection(imports, named) {\n\treturn imports.filter((imp) => imp.named === named).map((imp) => imp.alias).join(\" & \") || \"Record<string, never>\";\n}\nfunction serializeExecutionType(execution) {\n\tconst parts = [\"readonly executionHash: ExecutionHash\"];\n\tfor (const [key, value] of Object.entries(execution)) {\n\t\tif (key === \"executionHash\") continue;\n\t\tparts.push(`readonly ${serializeObjectKey(key)}: ${serializeValue(value)}`);\n\t}\n\treturn `{ ${parts.join(\"; \")} }`;\n}\nfunction generateHashTypeAliases(hashes) {\n\tconst executionHashType = hashes.executionHash ? `ExecutionHashBase<${serializeValue(hashes.executionHash)}>` : \"ExecutionHashBase<string>\";\n\treturn [\n\t\t`export type StorageHash = StorageHashBase<${serializeValue(hashes.storageHash)}>;`,\n\t\t`export type ExecutionHash = ${executionHashType};`,\n\t\t`export type ProfileHash = ProfileHashBase<${serializeValue(hashes.profileHash)}>;`\n\t].join(\"\\n\");\n}\n/**\n* Renders a value set (a field/column's permitted values, codec-encoded) into a TS literal union by\n* routing **each** value through the codec's `renderValueLiteral` — the seam owned by the codec, not\n* a generic serializer. `side`: `output` = read type, `input` = create/update type.\n*\n* Returns `undefined` — signalling the caller to fall back to the codec's full output type — when\n* the lookup is absent, has no `renderValueLiteralFor`, the value set is empty, or **any** value\n* isn't literal-expressible. A caller that needs column and field types to agree shares this so both\n* compute the union identically.\n*/\nfunction renderValueSetType(values, codecId, side, codecLookup) {\n\tif (values.length === 0 || codecLookup?.renderValueLiteralFor === void 0) return void 0;\n\tconst literals = [];\n\tfor (const value of values) {\n\t\tconst lit = codecLookup.renderValueLiteralFor(codecId, value, side);\n\t\tif (lit === void 0 || !isSafeTypeExpression(lit)) return void 0;\n\t\tliterals.push(lit);\n\t}\n\treturn literals.join(\" | \");\n}\n/** The local alias for the union of the stack's parameterized output type functions. */\nconst PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS = \"ParameterizedOutputTypeFunctions\";\n/** The declaration of {@link PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS} for the type functions the stack's components declare. */\nfunction parameterizedOutputTypeFunctionsAlias(typeFunctions) {\n\tconst aliases = [...new Set(typeFunctions.map((typeFunction) => typeFunction.alias))];\n\treturn `type ${PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS} = ${aliases.length > 0 ? aliases.join(\" | \") : \"never\"};`;\n}\n/** `FieldOutputTypes` (`side` `'output'`) or `FieldInputTypes` (`'input'`): the shared generic applied to the emitted contract's domain, with `FieldTypeOverrides`. */\nfunction fieldTypesMapExpression(side) {\n\treturn `FieldTypesFromDomain<ContractBase['domain']['namespaces'], CodecTypes, ${PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS}, FieldTypeOverrides, ${serializeValue(side)}>`;\n}\nfunction generateContractFieldDescriptor(fieldName, field) {\n\tconst modStr = contractFieldModifierSuffix(field);\n\tconst { type } = field;\n\tif (type.kind === \"scalar\") {\n\t\tconst typeParamsSpec = type.typeParams && Object.keys(type.typeParams).length > 0 ? `; readonly typeParams: ${serializeValue(type.typeParams)}` : \"\";\n\t\treturn `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${field.nullable}; readonly type: { readonly kind: \"scalar\"; readonly codecId: ${serializeValue(type.codecId)}${typeParamsSpec} }${modStr} }`;\n\t}\n\tif (type.kind === \"valueObject\") return `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${field.nullable}; readonly type: { readonly kind: \"valueObject\"; readonly name: ${serializeValue(type.name)} }${modStr} }`;\n\treturn `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${field.nullable}; readonly type: ${serializeValue(type)}${modStr} }`;\n}\nfunction generateValueObjectsDescriptorType(valueObjects) {\n\tif (!valueObjects || Object.keys(valueObjects).length === 0) return \"Record<string, never>\";\n\tconst voEntries = [];\n\tfor (const [voName, vo] of Object.entries(valueObjects)) {\n\t\tconst fieldEntries = [];\n\t\tfor (const [fieldName, field] of Object.entries(vo.fields)) fieldEntries.push(generateContractFieldDescriptor(fieldName, field));\n\t\tconst fieldsType = fieldEntries.length > 0 ? `{ ${fieldEntries.join(\"; \")} }` : \"Record<string, never>\";\n\t\tvoEntries.push(`readonly ${serializeObjectKey(voName)}: { readonly fields: ${fieldsType} }`);\n\t}\n\treturn `{ ${voEntries.join(\"; \")} }`;\n}\n/**\n* `<Name>Output` and `<Name>Input` for each value object, read from the shared generic's value object types at the namespace that declares it.\n*/\nfunction generateValueObjectTypeAliases(valueObjectNamespaces) {\n\tif (valueObjectNamespaces.length === 0) return \"\";\n\tconst generic = (side) => `ValueObjectTypesFromDomain<ContractBase['domain']['namespaces'], CodecTypes, ${PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS}, FieldTypeOverrides, ${serializeValue(side)}>`;\n\tconst aliases = [`type ValueObjectOutputTypes = ${generic(\"output\")};`, `type ValueObjectInputTypes = ${generic(\"input\")};`];\n\tfor (const [name, namespaceId] of valueObjectNamespaces) {\n\t\tconst path = `[${serializeValue(namespaceId)}][${serializeValue(name)}]`;\n\t\taliases.push(`export type ${name}Output = ValueObjectOutputTypes${path};`);\n\t\taliases.push(`export type ${name}Input = ValueObjectInputTypes${path};`);\n\t}\n\treturn aliases.join(\"\\n\");\n}\n/**\n* The type of a scalar field that its codec does not give, which the shared field type generic takes as an override: the literal union of the value set it holds, or the text its codec renders for its type parameters. `undefined` when the codec gives both sides, and for a value object or union field, which the generic types itself.\n*/\nfunction resolveFieldTypeOverride(field, codecLookup, resolvedValueSet) {\n\tconst { type } = field;\n\tif (type.kind !== \"scalar\") return void 0;\n\tif (resolvedValueSet) {\n\t\tconst override = renderValueSetOverride(resolvedValueSet.encodedValues, resolvedValueSet.codecId, codecLookup);\n\t\tif (override !== void 0) return override;\n\t}\n\tconst typeParams = type.typeParams && Object.keys(type.typeParams).length > 0 ? type.typeParams : void 0;\n\treturn renderCodecTypeOverride(type.codecId, typeParams, codecLookup);\n}\n/** The literal union of a value set on each side whose values all have literal types, or `undefined` when neither side has. */\nfunction renderValueSetOverride(values, codecId, codecLookup) {\n\tconst output = renderValueSetType(values, codecId, \"output\", codecLookup);\n\tconst input = renderValueSetType(values, codecId, \"input\", codecLookup);\n\tconst override = {\n\t\t...output !== void 0 ? { output } : {},\n\t\t...input !== void 0 ? { input } : {}\n\t};\n\treturn Object.keys(override).length > 0 ? override : void 0;\n}\n/** The type text a codec renders for these type parameters, on the sides it renders one. */\nfunction renderCodecTypeOverride(codecId, typeParams, codecLookup) {\n\tif (codecLookup === void 0 || typeParams === void 0) return void 0;\n\tconst output = codecLookup.renderOutputTypeFor(codecId, typeParams);\n\tconst input = codecLookup.renderInputTypeFor?.(codecId, typeParams);\n\tconst override = {\n\t\t...output && isSafeTypeExpression(output) ? { output } : {},\n\t\t...input && isSafeTypeExpression(input) ? { input } : {}\n\t};\n\treturn Object.keys(override).length > 0 ? override : void 0;\n}\nfunction renderTypeOverride(override) {\n\treturn `{ ${[\"output\", \"input\"].flatMap((side) => {\n\t\tconst type = override[side];\n\t\treturn type === void 0 ? [] : [`readonly ${side}: ${type}`];\n\t}).join(\"; \")} }`;\n}\n/** A nested map of type overrides, one level per path segment, ordered by name at every level, leaving out every branch with no entry. */\nfunction renderTypeOverridesMap(entries) {\n\tconst root = /* @__PURE__ */ new Map();\n\tfor (const [path, type] of entries) {\n\t\tif (type === void 0) continue;\n\t\tlet node = root;\n\t\tfor (const segment of path.slice(0, -1)) {\n\t\t\tconst child = node.get(segment);\n\t\t\tconst next = child instanceof Map ? child : /* @__PURE__ */ new Map();\n\t\t\tnode.set(segment, next);\n\t\t\tnode = next;\n\t\t}\n\t\tconst leaf = path.at(-1);\n\t\tif (leaf !== void 0) node.set(leaf, type);\n\t}\n\treturn renderOverrideTree(root);\n}\nfunction renderOverrideTree(tree) {\n\treturn `{ ${[...tree].sort(([a], [b]) => a.localeCompare(b)).map(([key, value]) => `readonly ${serializeObjectKey(key)}: ${value instanceof Map ? renderOverrideTree(value) : renderTypeOverride(value)}`).join(\"; \")} }`;\n}\n/**\n* The values a field's value set holds, with the field's codec. A reference to a domain enum is read from the contract's domain, for model and value object fields alike. Any other model field goes to the family's `resolveStorageValueSet`, which reads its storage. A value object field has no storage of its own.\n*/\nfunction resolveFieldValueSet(field, contract, resolveStorageValueSet) {\n\tif (field.valueSet?.plane === \"domain\") return resolveDomainValueSet(field, contract);\n\treturn resolveStorageValueSet();\n}\nfunction resolveDomainValueSet(field, contract) {\n\tconst ref = field.valueSet;\n\tif (ref === void 0 || field.type.kind !== \"scalar\" || ref.entityKind !== \"enum\") return;\n\tconst domainEnum = contract.domain.namespaces[ref.namespaceId]?.enum?.[ref.entityName];\n\tif (domainEnum === void 0) return void 0;\n\treturn {\n\t\tencodedValues: domainEnum.members.map((member) => member.value),\n\t\tcodecId: field.type.codecId\n\t};\n}\n/** `FieldTypeOverrides`: per namespace, `models` or `valueObjects`, owner and field, the type of each field its codec does not give. */\nfunction generateFieldTypeOverridesMap(contract, codecLookup, resolveStorageValueSet) {\n\treturn renderTypeOverridesMap(Object.entries(contract.domain.namespaces).flatMap(([nsId, ns]) => {\n\t\tconst modelFields = Object.entries(ns.models).flatMap(([modelName, model]) => Object.entries(model.fields).map(([fieldName, field]) => [[\n\t\t\tnsId,\n\t\t\t\"models\",\n\t\t\tmodelName,\n\t\t\tfieldName\n\t\t], resolveFieldTypeOverride(field, codecLookup, resolveFieldValueSet(field, contract, () => resolveStorageValueSet?.(modelName, fieldName, model)))]));\n\t\tconst valueObjects = blindCast(ns.valueObjects ?? {});\n\t\tconst valueObjectFields = Object.entries(valueObjects).flatMap(([valueObjectName, valueObject]) => Object.entries(valueObject.fields).map(([fieldName, field]) => [[\n\t\t\tnsId,\n\t\t\t\"valueObjects\",\n\t\t\tvalueObjectName,\n\t\t\tfieldName\n\t\t], resolveFieldTypeOverride(field, codecLookup, resolveFieldValueSet(field, contract, () => void 0))]));\n\t\treturn [...modelFields, ...valueObjectFields];\n\t}));\n}\n//#endregion\nexport { serializeCrossReference as C, serializeValue as D, serializeObjectKey as E, emitterError as O, resolveFieldTypeOverride as S, serializeNamespaceId as T, renderCodecTypeOverride as _, generateContractFieldDescriptor as a, renderValueSetOverride as b, generateImportLines as c, generateModelRelationsType as d, generateModelsType as f, parameterizedOutputTypeFunctionsAlias as g, generateValueObjectsDescriptorType as h, generateCodecTypeIntersection as i, generateModelFieldEntry as l, generateValueObjectTypeAliases as m, deduplicateImports as n, generateFieldTypeOverridesMap as o, generateRootsType as p, fieldTypesMapExpression as r, generateHashTypeAliases as s, PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS as t, generateModelFieldsType as u, renderTypeOverride as v, serializeExecutionType as w, renderValueSetType as x, renderTypeOverridesMap as y };\n\n//# sourceMappingURL=domain-type-generation-DpXuDGLd.mjs.map"],"mappings":";;;;;;AAMA,SAAS,aAAa,MAAM,SAAS,SAAS;CAC7C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;AAGA,SAAS,eAAe,OAAO;CAC9B,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,UAAU,KAAK,GAAG,OAAO;CAC7B,IAAI,OAAO,UAAU,UAAU,OAAO,gBAAgB,KAAK;CAC3D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;CAChF,IAAI,OAAO,UAAU,UAAU,OAAO,GAAG,MAAM;CAC/C,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,aAAa,MAAM,KAAK,MAAM,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;CAC7F,IAAI,OAAO,UAAU,UAAU,OAAO,KAAK,OAAO,QAAQ,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,OAAO,QAAQ,KAAK,OAAO,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,OAAO,YAAY,mBAAmB,CAAC,EAAE,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;CAC3N,OAAO;AACR;AACA,SAAS,mBAAmB,KAAK;CAChC,IAAI,qBAAqB,KAAK,GAAG,GAAG,OAAO;CAC3C,OAAO,eAAe,GAAG;AAC1B;AACA,SAAS,qBAAqB,OAAO;C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AAC,CAAC,CAAC,CAAC;EACtG,OAAO,CAAC,GAAG,aAAa,GAAG,iBAAiB;CAC7C,CAAC,CAAC;AACH"}
|
package/dist/emitter.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as emit, i as EmittedArtifactPaths, n as EmitResult, o as generateContractDts, r as EmitStackInput, s as getEmittedArtifactPaths, t as EmitOptions } from "./index-
|
|
3
|
-
export { type EmitOptions, type EmitResult, type EmitStackInput, type EmittedArtifactPaths, deduplicateImports, emit, generateCodecTypeIntersection, generateContractDts,
|
|
1
|
+
import { A as serializeValue, a as deduplicateImports, d as generateImportLines, g as generateRootsType, k as serializeObjectKey, m as generateModelRelationsType, s as generateCodecTypeIntersection, u as generateHashTypeAliases } from "./domain-type-generation-BdSOXF3O-DGGiAaNs.mjs";
|
|
2
|
+
import { a as emit, i as EmittedArtifactPaths, n as EmitResult, o as generateContractDts, r as EmitStackInput, s as getEmittedArtifactPaths, t as EmitOptions } from "./index-wUUMOC5E.mjs";
|
|
3
|
+
export { type EmitOptions, type EmitResult, type EmitStackInput, type EmittedArtifactPaths, deduplicateImports, emit, generateCodecTypeIntersection, generateContractDts, generateHashTypeAliases, generateImportLines, generateModelRelationsType, generateRootsType, getEmittedArtifactPaths, serializeObjectKey, serializeValue };
|
package/dist/emitter.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as generateContractDts, r as getEmittedArtifactPaths, t as emit } from "./exports-
|
|
3
|
-
export { deduplicateImports, emit, generateCodecTypeIntersection, generateContractDts,
|
|
1
|
+
import { D as serializeObjectKey, O as serializeValue, a as generateCodecTypeIntersection, c as generateHashTypeAliases, f as generateModelRelationsType, l as generateImportLines, m as generateRootsType, n as deduplicateImports } from "./domain-type-generation-DpXuDGLd-CuADX8tA.mjs";
|
|
2
|
+
import { n as generateContractDts, r as getEmittedArtifactPaths, t as emit } from "./exports-BLyT8ULG-C_kH8_9c.mjs";
|
|
3
|
+
export { deduplicateImports, emit, generateCodecTypeIntersection, generateContractDts, generateHashTypeAliases, generateImportLines, generateModelRelationsType, generateRootsType, getEmittedArtifactPaths, serializeObjectKey, serializeValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export {
|
|
1
|
+
import { A as serializeValue, C as renderValueSetOverride, D as serializeExecutionType, E as serializeCrossReference, O as serializeNamespaceId, S as renderTypeOverridesMap, T as resolveFieldTypeOverride, _ as generateValueObjectTypeAliases, a as deduplicateImports, b as renderCodecTypeOverride, c as generateContractFieldDescriptor, d as generateImportLines, f as generateModelFieldEntry, g as generateRootsType, h as generateModelsType, i as TypeOverride, k as serializeObjectKey, l as generateFieldTypeOverridesMap, m as generateModelRelationsType, n as ResolvedFieldValueSet, o as fieldTypesMapExpression, p as generateModelFieldsType, r as StorageValueSetResolver, s as generateCodecTypeIntersection, t as PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS, u as generateHashTypeAliases, v as generateValueObjectsDescriptorType, w as renderValueSetType, x as renderTypeOverride, y as parameterizedOutputTypeFunctionsAlias } from "./domain-type-generation-BdSOXF3O-DGGiAaNs.mjs";
|
|
2
|
+
export { PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS, ResolvedFieldValueSet, StorageValueSetResolver, TypeOverride, deduplicateImports, fieldTypesMapExpression, generateCodecTypeIntersection, generateContractFieldDescriptor, generateFieldTypeOverridesMap, generateHashTypeAliases, generateImportLines, generateModelFieldEntry, generateModelFieldsType, generateModelRelationsType, generateModelsType, generateRootsType, generateValueObjectTypeAliases, generateValueObjectsDescriptorType, parameterizedOutputTypeFunctionsAlias, renderCodecTypeOverride, renderTypeOverride, renderTypeOverridesMap, renderValueSetOverride, renderValueSetType, resolveFieldTypeOverride, serializeCrossReference, serializeExecutionType, serializeNamespaceId, serializeObjectKey, serializeValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { C as resolveFieldTypeOverride, D as serializeObjectKey, E as serializeNamespaceId, O as serializeValue, S as renderValueSetType, T as serializeExecutionType, _ as parameterizedOutputTypeFunctionsAlias, a as generateCodecTypeIntersection, b as renderTypeOverridesMap, c as generateHashTypeAliases, d as generateModelFieldsType, f as generateModelRelationsType, g as generateValueObjectsDescriptorType, h as generateValueObjectTypeAliases, i as fieldTypesMapExpression, l as generateImportLines, m as generateRootsType, n as deduplicateImports, o as generateContractFieldDescriptor, p as generateModelsType, s as generateFieldTypeOverridesMap, t as PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS, u as generateModelFieldEntry, v as renderCodecTypeOverride, w as serializeCrossReference, x as renderValueSetOverride, y as renderTypeOverride } from "./domain-type-generation-DpXuDGLd-CuADX8tA.mjs";
|
|
2
|
+
export { PARAMETERIZED_OUTPUT_TYPE_FUNCTIONS, deduplicateImports, fieldTypesMapExpression, generateCodecTypeIntersection, generateContractFieldDescriptor, generateFieldTypeOverridesMap, generateHashTypeAliases, generateImportLines, generateModelFieldEntry, generateModelFieldsType, generateModelRelationsType, generateModelsType, generateRootsType, generateValueObjectTypeAliases, generateValueObjectsDescriptorType, parameterizedOutputTypeFunctionsAlias, renderCodecTypeOverride, renderTypeOverride, renderTypeOverridesMap, renderValueSetOverride, renderValueSetType, resolveFieldTypeOverride, serializeCrossReference, serializeExecutionType, serializeNamespaceId, serializeObjectKey, serializeValue };
|