@prisma/orm-framework 8.0.0-rc.14-dev.29 → 8.0.0-rc.14-dev.31
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/{authoring-CQOFIHhF.d.mts → authoring-CUDReFVP.d.mts} +4 -4
- package/dist/{authoring-CQOFIHhF.d.mts.map → authoring-CUDReFVP.d.mts.map} +1 -1
- package/dist/{authoring-C8hxYYQI.mjs → authoring-Cp71GImA.mjs} +2 -2
- package/dist/authoring-Cp71GImA.mjs.map +1 -0
- package/dist/{binder-CGmSEQPU-B7utUHdi.d.mts → binder-CGmSEQPU-Celseo4Z.d.mts} +9 -9
- package/dist/{binder-CGmSEQPU-B7utUHdi.d.mts.map → binder-CGmSEQPU-Celseo4Z.d.mts.map} +1 -1
- package/dist/{capabilities-M-lvaPSE-BMffxZqu.mjs → capabilities-CnCdDH1J-Bq8Zf0nY.mjs} +3 -3
- package/dist/{capabilities-M-lvaPSE-BMffxZqu.mjs.map → capabilities-CnCdDH1J-Bq8Zf0nY.mjs.map} +1 -1
- package/dist/{codec-DFvi9jo5.d.mts → codec-0XB-9TzG.d.mts} +5 -4
- package/dist/codec-0XB-9TzG.d.mts.map +1 -0
- package/dist/{codec-B3lumsVx.mjs → codec-Cz-bOon3.mjs} +3 -3
- package/dist/codec-Cz-bOon3.mjs.map +1 -0
- package/dist/{codec-types-CMqWkP1t-CjK8Cwfr.mjs → codec-types-BXLUbk-Y-DpGfKGK0.mjs} +2 -3
- package/dist/{codec-types-CMqWkP1t-CjK8Cwfr.mjs.map → codec-types-BXLUbk-Y-DpGfKGK0.mjs.map} +1 -1
- package/dist/{codec-types-DrcxdLlC-CAfu8HRL.d.mts → codec-types-CZ8xRBJy-BMjCsUt1.d.mts} +27 -11
- package/dist/codec-types-CZ8xRBJy-BMjCsUt1.d.mts.map +1 -0
- package/dist/{components-DFA65tWf.d.mts → components-CRRIFm30.d.mts} +4 -4
- package/dist/{components-DFA65tWf.d.mts.map → components-CRRIFm30.d.mts.map} +1 -1
- package/dist/{components-0Tccse_E.mjs → components-VMbwq7D8.mjs} +2 -2
- package/dist/{components-0Tccse_E.mjs.map → components-VMbwq7D8.mjs.map} +1 -1
- package/dist/components.d.mts +17 -17
- package/dist/components.mjs +9 -9
- package/dist/components__authoring.d.mts +4 -4
- package/dist/components__authoring.mjs +3 -3
- package/dist/components__codec.d.mts +3 -3
- package/dist/components__codec.mjs +4 -4
- package/dist/components__components.d.mts +3 -3
- package/dist/components__components.mjs +2 -2
- package/dist/components__control.d.mts +4 -4
- package/dist/components__control.mjs +3 -3
- package/dist/components__emission.d.mts +3 -3
- package/dist/components__execution.d.mts +1 -1
- package/dist/components__psl-ast.d.mts +3 -3
- package/dist/components__runtime.d.mts +1 -1
- package/dist/{config-types-D5MpuJlm.d.mts → config-types-E4OZwoHK.d.mts} +6 -6
- package/dist/{config-types-D5MpuJlm.d.mts.map → config-types-E4OZwoHK.d.mts.map} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config__config-types.d.mts +1 -1
- package/dist/contract-authoring.d.mts +5 -5
- package/dist/contract-authoring.mjs +3 -2
- package/dist/contract-authoring.mjs.map +1 -1
- package/dist/{control-DEcjDcjA.mjs → control-D9TxxGse.mjs} +55 -36
- package/dist/control-D9TxxGse.mjs.map +1 -0
- package/dist/{control-DgoyiMYQ.d.mts → control-DtFLqCvx.d.mts} +26 -25
- package/dist/{control-DgoyiMYQ.d.mts.map → control-DtFLqCvx.d.mts.map} +1 -1
- package/dist/{declarations-DDT0hm5r-BAMLVwKx.mjs → declarations-DDT0hm5r-D_XDM-WN.mjs} +2 -2
- package/dist/{declarations-DDT0hm5r-BAMLVwKx.mjs.map → declarations-DDT0hm5r-D_XDM-WN.mjs.map} +1 -1
- package/dist/emission-CKIZBZw3.d.mts +2 -0
- package/dist/{emission-types-CND9Xi8O-DKnaAGFS.d.mts → emission-types-CKbNqwUs-hrIslUsL.d.mts} +4 -4
- package/dist/{emission-types-CND9Xi8O-DKnaAGFS.d.mts.map → emission-types-CKbNqwUs-hrIslUsL.d.mts.map} +1 -1
- package/dist/errors.d.mts +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/{execution-BbJTSuvJ.d.mts → execution-DHWSU95b.d.mts} +2 -2
- package/dist/{execution-BbJTSuvJ.d.mts.map → execution-DHWSU95b.d.mts.map} +1 -1
- package/dist/{execution-D5L9gHoo.d.mts → execution-ZWG0tqRB.d.mts} +2 -2
- package/dist/{execution-D5L9gHoo.d.mts.map → execution-ZWG0tqRB.d.mts.map} +1 -1
- package/dist/{framework-authoring-BLXTNi9g-CcRc8u9I.d.mts → framework-authoring-BJf_-FTJ-K8fp3V_r.d.mts} +22 -28
- package/dist/framework-authoring-BJf_-FTJ-K8fp3V_r.d.mts.map +1 -0
- package/dist/{framework-components-CwclBqDh-CBGrY3Ry.d.mts → framework-components-7SQpxVko-BaUd55aP.d.mts} +7 -7
- package/dist/{framework-components-CwclBqDh-CBGrY3Ry.d.mts.map → framework-components-7SQpxVko-BaUd55aP.d.mts.map} +1 -1
- package/dist/ids.d.mts +1 -1
- package/dist/{mutation-default-types-ZfKqVdmf-DATmLFpQ.d.mts → mutation-default-types-CrA6rrwU-BkMgh2pO.d.mts} +3 -3
- package/dist/{mutation-default-types-ZfKqVdmf-DATmLFpQ.d.mts.map → mutation-default-types-CrA6rrwU-BkMgh2pO.d.mts.map} +1 -1
- package/dist/{parse-eSQ_clQv-D2Mtj0WV.d.mts → parse-eSQ_clQv-BIek6vrj.d.mts} +6 -6
- package/dist/{parse-eSQ_clQv-D2Mtj0WV.d.mts.map → parse-eSQ_clQv-BIek6vrj.d.mts.map} +1 -1
- package/dist/{parse-ymgXJUnk-CYMEjkGC.mjs → parse-ymgXJUnk-SzrYveCt.mjs} +2 -2
- package/dist/{parse-ymgXJUnk-CYMEjkGC.mjs.map → parse-ymgXJUnk-SzrYveCt.mjs.map} +1 -1
- package/dist/psl-ast-CcQp_u_l.d.mts +2 -0
- package/dist/{psl-ast-CPxYIxM1-XHoHPgRO.d.mts → psl-ast-DtjFlM-c-amCHIsWc.d.mts} +3 -3
- package/dist/{psl-ast-CPxYIxM1-XHoHPgRO.d.mts.map → psl-ast-DtjFlM-c-amCHIsWc.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +8 -8
- package/dist/psl-parser.mjs +2 -2
- package/dist/psl-parser__format.d.mts +1 -1
- package/dist/psl-parser__format.mjs +2 -2
- package/dist/psl-parser__interpret.d.mts +6 -6
- package/dist/psl-parser__interpret.mjs +1 -1
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-parser__syntax.mjs +2 -2
- package/dist/psl-printer.d.mts +4 -4
- package/dist/psl-printer.mjs +3 -2
- package/dist/psl-printer.mjs.map +1 -1
- package/dist/{resolve-codec-CxRICgbr-BLdoRYJc.mjs → resolve-codec-qE0g980d-Ck_gIaTi.mjs} +63 -3
- package/dist/resolve-codec-qE0g980d-Ck_gIaTi.mjs.map +1 -0
- package/dist/{runtime-BCzeC3dA.d.mts → runtime-BccsLa5m.d.mts} +2 -2
- package/dist/{runtime-BCzeC3dA.d.mts.map → runtime-BccsLa5m.d.mts.map} +1 -1
- package/dist/{temporal-presets-DzBBD4St-BaL1QaZ7.mjs → temporal-presets-UoKnoAlu-6864WUSv.mjs} +33 -10
- package/dist/temporal-presets-UoKnoAlu-6864WUSv.mjs.map +1 -0
- package/dist/{temporal-presets-DKHiZVPP-DLAr--Pb.d.mts → temporal-presets-pC0xlwib-Diikns1l.d.mts} +4 -4
- package/dist/{temporal-presets-DKHiZVPP-DLAr--Pb.d.mts.map → temporal-presets-pC0xlwib-Diikns1l.d.mts.map} +1 -1
- package/dist/{types-import-spec-D-EPunhV-B3y6hGP5.d.mts → types-import-spec-BLFYPur6-QN7ntocb.d.mts} +3 -3
- package/dist/{types-import-spec-D-EPunhV-B3y6hGP5.d.mts.map → types-import-spec-BLFYPur6-QN7ntocb.d.mts.map} +1 -1
- package/package.json +15 -15
- package/dist/authoring-C8hxYYQI.mjs.map +0 -1
- package/dist/codec-B3lumsVx.mjs.map +0 -1
- package/dist/codec-DFvi9jo5.d.mts.map +0 -1
- package/dist/codec-types-DrcxdLlC-CAfu8HRL.d.mts.map +0 -1
- package/dist/control-DEcjDcjA.mjs.map +0 -1
- package/dist/emission-jG88SNeC.d.mts +0 -2
- package/dist/framework-authoring-BLXTNi9g-CcRc8u9I.d.mts.map +0 -1
- package/dist/psl-ast-DA_tKWiL.d.mts +0 -2
- package/dist/resolve-codec-CxRICgbr-BLdoRYJc.mjs.map +0 -1
- package/dist/temporal-presets-DzBBD4St-BaL1QaZ7.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as JsonValue } from "./domain-envelope-C2vVIWGK-C5x7cBpU.mjs";
|
|
2
|
-
import { i as Codec } from "./codec-types-
|
|
3
|
-
import { $ as instantiateAuthoringTypeConstructor, F as ParsedPslExtensionBlock, a as AuthoringContributions, k as AuthoringTypeNamespace, p as AuthoringFieldPresetDescriptor, s as AuthoringEntityContext } from "./framework-authoring-
|
|
4
|
-
import "./temporal-presets-
|
|
2
|
+
import { i as Codec } from "./codec-types-CZ8xRBJy-BMjCsUt1.mjs";
|
|
3
|
+
import { $ as instantiateAuthoringTypeConstructor, F as ParsedPslExtensionBlock, a as AuthoringContributions, k as AuthoringTypeNamespace, p as AuthoringFieldPresetDescriptor, s as AuthoringEntityContext } from "./framework-authoring-BJf_-FTJ-K8fp3V_r.mjs";
|
|
4
|
+
import "./temporal-presets-pC0xlwib-Diikns1l.mjs";
|
|
5
5
|
//#region ../../../1-framework/1-core/framework-components/dist/authoring.d.mts
|
|
6
6
|
//#region src/shared/authoring-type-constructor-call.d.ts
|
|
7
7
|
/** What a type constructor call produces for a column. */
|
|
@@ -42,4 +42,4 @@ declare function fieldPresetSpellings(contributions: AuthoringContributions | un
|
|
|
42
42
|
declare function getAuthoringFieldPreset(contributions: AuthoringContributions | undefined, path: readonly string[]): AuthoringFieldPresetDescriptor | undefined;
|
|
43
43
|
//#endregion
|
|
44
44
|
export { findAuthoringTypeConstructorCall as a, fieldPresetSpellings as i, AuthoringTypeConstructorOutput as n, getAuthoringFieldPreset as o, EnumBlockMember as r, readEnumBlockMembers as s, AuthoringTypeConstructorCall as t };
|
|
45
|
-
//# sourceMappingURL=authoring-
|
|
45
|
+
//# sourceMappingURL=authoring-CUDReFVP.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-
|
|
1
|
+
{"version":3,"file":"authoring-CUDReFVP.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/authoring.d.mts"],"mappings":";;;;;;;KAMK,iCAAiC,kBAAkB;;UAE9C;WACC;WACA;;;;;;;;iBAQM,iCAAiC,WAAW,wBAAwB,QAAQ,iCAAiC;;;UAGpH;WACC;WACA;;;;;;;iBAOM,qBAAqB,OAAO,wBAAwB,SAAS,eAAe,0BAA0B,iBAAiB,OAAO,OAAO,KAAK,kCAAkC;;;;;;iBAM5K,qBAAqB,eAAe,oCAAoC;;;;iBAIxE,wBAAwB,eAAe,oCAAoC,0BAA0B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as isInternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
2
2
|
import { t as canonicalStringify } from "./canonical-stringify-DY4NaAJi.mjs";
|
|
3
3
|
import { t as canonicalizeJson } from "./canonicalize-json-ZPawceQR-Dua1VNEB.mjs";
|
|
4
|
-
import { S as isAuthoringTypeConstructorDescriptor, _ as isAuthoringArgRef, g as instantiateAuthoringTypeConstructor, y as isAuthoringFieldPresetDescriptor } from "./temporal-presets-
|
|
4
|
+
import { S as isAuthoringTypeConstructorDescriptor, _ as isAuthoringArgRef, g as instantiateAuthoringTypeConstructor, y as isAuthoringFieldPresetDescriptor } from "./temporal-presets-UoKnoAlu-6864WUSv.mjs";
|
|
5
5
|
//#region ../../../1-framework/1-core/framework-components/dist/authoring.mjs
|
|
6
6
|
function* typeConstructors(namespace, path = []) {
|
|
7
7
|
for (const [name, value] of Object.entries(namespace)) if (isAuthoringTypeConstructorDescriptor(value)) yield {
|
|
@@ -144,4 +144,4 @@ function getAuthoringFieldPreset(contributions, path) {
|
|
|
144
144
|
//#endregion
|
|
145
145
|
export { readEnumBlockMembers as i, findAuthoringTypeConstructorCall as n, getAuthoringFieldPreset as r, fieldPresetSpellings as t };
|
|
146
146
|
|
|
147
|
-
//# sourceMappingURL=authoring-
|
|
147
|
+
//# sourceMappingURL=authoring-Cp71GImA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring-Cp71GImA.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/authoring.mjs"],"sourcesContent":["import { t as canonicalizeJson } from \"./canonicalize-json-ZPawceQR.mjs\";\nimport { C as instantiateAuthoringTypeConstructor, D as isAuthoringModelAttributeDescriptor, E as isAuthoringFieldPresetDescriptor, F as validateAuthoringTypeParams, M as resolveAuthoringTemplateValue, N as resolveEnumCodecId, O as isAuthoringPslBlockDescriptor, P as validateAuthoringHelperArguments, S as instantiateAuthoringFieldPreset, T as isAuthoringEntityTypeDescriptor, a as temporalCodecPreset, b as getAuthoringTypeConstructor, d as printTaggedLiteral, g as classifyEnumMemberType, h as assertResolvableTypeConstructorTemplates, i as temporalAuthoringPresets, j as mergeAuthoringNamespaces, k as isAuthoringTypeConstructorDescriptor, m as assertNoCrossRegistryCollisions, n as TEMPORAL_ON_UPDATE_ARG, o as temporalPhaseTemplate, r as TIMESTAMP_NOW_GENERATOR_ID, t as TEMPORAL_ON_CREATE_ARG, v as collectScalarTypeConstructors, w as isAuthoringArgRef, x as instantiateAuthoringEntityType, y as flushAuthoringWarnings } from \"./temporal-presets-UoKnoAlu.mjs\";\nimport { isInternalError } from \"@internal/utils/internal-error\";\nimport { canonicalStringify } from \"@internal/utils/canonical-stringify\";\n//#region src/shared/authoring-type-constructor-call.ts\nfunction* typeConstructors(namespace, path = []) {\n\tfor (const [name, value] of Object.entries(namespace)) if (isAuthoringTypeConstructorDescriptor(value)) yield {\n\t\tpath: [...path, name],\n\t\tdescriptor: value\n\t};\n\telse yield* typeConstructors(value, [...path, name]);\n}\nfunction produces(produced, wanted) {\n\tconst wantedFields = {\n\t\t...wanted,\n\t\ttypeParams: wanted.typeParams ?? {}\n\t};\n\treturn Object.entries({\n\t\t...produced,\n\t\ttypeParams: produced.typeParams ?? {}\n\t}).every(([key, value]) => canonicalizeJson(value) === canonicalizeJson(wantedFields[key]));\n}\n/**\n* The arguments that make `descriptor` produce exactly `output`, when each of its type parameters\n* comes straight from one argument; `undefined` when it cannot produce `output`, including when\n* `output` has no value for an argument the constructor requires.\n*/\nfunction argumentsFor(descriptor, output) {\n\tif (descriptor.entityRefArg !== void 0 || descriptor.output.codecId !== output.codecId) return;\n\tconst args = [];\n\tfor (const [key, template] of Object.entries(descriptor.output.typeParams ?? {})) {\n\t\tconst value = output.typeParams?.[key];\n\t\tif (value !== void 0 && isAuthoringArgRef(template) && template.path === void 0) args[template.index] = value;\n\t}\n\tconst requiredArgs = (descriptor.args ?? []).filter((arg) => arg.optional !== true).length;\n\tif (args.length < requiredArgs || Array.from(args).includes(void 0)) return void 0;\n\ttry {\n\t\treturn produces(instantiateAuthoringTypeConstructor(descriptor, args), output) ? args : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* The first call, in namespace order, to a type constructor in `namespace` that produces exactly\n* `output`. The inverse of {@link instantiateAuthoringTypeConstructor} for constructors whose type\n* parameters each come straight from one argument. A constructor whose argument names another\n* entity is never chosen. `undefined` when no call produces `output`.\n*/\nfunction findAuthoringTypeConstructorCall(namespace, output) {\n\tfor (const { path, descriptor } of typeConstructors(namespace)) {\n\t\tconst args = argumentsFor(descriptor, output);\n\t\tif (args !== void 0) return {\n\t\t\tpath,\n\t\t\targs\n\t\t};\n\t}\n}\n//#endregion\n//#region src/shared/enum-block-members.ts\n/**\n* Reads the members of an `enum` block through its codec. A bare member is read from its own name.\n* Pushes a diagnostic and returns `undefined` when the codec refuses a member, when two members\n* store the same value, or when the block has no members. Shared by every family's enum factory.\n*/\nfunction readEnumBlockMembers(block, codecId, codec, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst diagnostics = ctx.diagnostics;\n\tconst memberByStoredValue = /* @__PURE__ */ new Map();\n\tconst members = [];\n\tlet memberError = false;\n\tfor (const [memberName, memberValue] of Object.entries(block.values)) {\n\t\tconst span = block.parameterSpans[memberName] ?? block.span;\n\t\tconst written = memberValue === void 0 ? memberName : memberValue;\n\t\tlet read;\n\t\ttry {\n\t\t\tread = codec.decodeJson(written);\n\t\t} catch (err) {\n\t\t\tif (isInternalError(err)) throw err;\n\t\t\tdiagnostics?.push(memberValue === void 0 ? {\n\t\t\t\tcode: \"PSL_ENUM_BARE_MEMBER_NON_STRING_CODEC\",\n\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" has no value and codec \"${codecId}\" does not accept a bare name as input`,\n\t\t\t\tsourceId,\n\t\t\t\tspan\n\t\t\t} : {\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" was rejected by codec \"${codecId}\": ${err instanceof Error ? err.message : String(err)}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tconst stored = codec.encodeJson(read);\n\t\tconst storedKey = canonicalStringify(stored);\n\t\tconst earlier = memberByStoredValue.get(storedKey);\n\t\tif (earlier !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_DUPLICATE_MEMBER_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\": members \"${earlier}\" and \"${memberName}\" both store ${JSON.stringify(stored)}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tmemberByStoredValue.set(storedKey, memberName);\n\t\tmembers.push({\n\t\t\tname: memberName,\n\t\t\tvalue: read\n\t\t});\n\t}\n\tif (memberError) return void 0;\n\tif (members.length === 0) {\n\t\tdiagnostics?.push({\n\t\t\tcode: \"PSL_ENUM_MISSING_TYPE\",\n\t\t\tmessage: `enum \"${block.name}\" must have at least one member`,\n\t\t\tsourceId,\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn members;\n}\n//#endregion\n//#region src/shared/field-preset-resolution.ts\nfunction presetSpellingsUnder(members, prefix) {\n\treturn Object.entries(members).flatMap(([name, member]) => isAuthoringFieldPresetDescriptor(member) ? [`${prefix}.${name}(${(member.args ?? []).map((arg, index) => arg.name ?? `argument${index + 1}`).join(\", \")})`] : presetSpellingsUnder(member, `${prefix}.${name}`));\n}\n/**\n* How each field preset registered under `namespace`, at any depth, is written, with the names of its arguments: `temporal.timestamp(onCreate, onUpdate)`.\n*/\nfunction fieldPresetSpellings(contributions, namespace) {\n\tconst members = contributions?.field?.[namespace];\n\tif (members === void 0 || isAuthoringFieldPresetDescriptor(members)) return [];\n\treturn presetSpellingsUnder(members, namespace);\n}\n/**\n* Walks `authoringContributions.field` segment by segment and returns the field-preset descriptor at the path, or `undefined` when none is registered there.\n*/\nfunction getAuthoringFieldPreset(contributions, path) {\n\tlet current = contributions?.field;\n\tfor (const segment of path) {\n\t\tif (typeof current !== \"object\" || current === null || \"kind\" in current) return;\n\t\tcurrent = current[segment];\n\t}\n\treturn current !== void 0 && isAuthoringFieldPresetDescriptor(current) ? current : void 0;\n}\n//#endregion\nexport { TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, assertNoCrossRegistryCollisions, assertResolvableTypeConstructorTemplates, classifyEnumMemberType, collectScalarTypeConstructors, fieldPresetSpellings, findAuthoringTypeConstructorCall, flushAuthoringWarnings, getAuthoringFieldPreset, getAuthoringTypeConstructor, instantiateAuthoringEntityType, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringArgRef, isAuthoringEntityTypeDescriptor, isAuthoringFieldPresetDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor, mergeAuthoringNamespaces, printTaggedLiteral, readEnumBlockMembers, resolveAuthoringTemplateValue, resolveEnumCodecId, temporalAuthoringPresets, temporalCodecPreset, temporalPhaseTemplate, validateAuthoringHelperArguments, validateAuthoringTypeParams };\n\n//# sourceMappingURL=authoring.mjs.map"],"mappings":";;;;;AAKA,UAAU,iBAAiB,WAAW,OAAO,CAAC,GAAG;CAChD,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,SAAS,GAAG,IAAI,qCAAqC,KAAK,GAAG,MAAM;EAC7G,MAAM,CAAC,GAAG,MAAM,IAAI;EACpB,YAAY;CACb;MACK,OAAO,iBAAiB,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC;AACpD;AACA,SAAS,SAAS,UAAU,QAAQ;CACnC,MAAM,eAAe;EACpB,GAAG;EACH,YAAY,OAAO,cAAc,CAAC;CACnC;CACA,OAAO,OAAO,QAAQ;EACrB,GAAG;EACH,YAAY,SAAS,cAAc,CAAC;CACrC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,WAAW,iBAAiB,KAAK,MAAM,iBAAiB,aAAa,IAAI,CAAC;AAC3F;;;;;;AAMA,SAAS,aAAa,YAAY,QAAQ;CACzC,IAAI,WAAW,iBAAiB,KAAK,KAAK,WAAW,OAAO,YAAY,OAAO,SAAS;CACxF,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,CAAC,KAAK,aAAa,OAAO,QAAQ,WAAW,OAAO,cAAc,CAAC,CAAC,GAAG;EACjF,MAAM,QAAQ,OAAO,aAAa;EAClC,IAAI,UAAU,KAAK,KAAK,kBAAkB,QAAQ,KAAK,SAAS,SAAS,KAAK,GAAG,KAAK,SAAS,SAAS;CACzG;CACA,MAAM,gBAAg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AO,YAAY,KAAK,KAAK,iCAAiC,OAAO,IAAI,UAAU,KAAK;AACzF"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { V as JsonValue } from "./domain-envelope-C2vVIWGK-C5x7cBpU.mjs";
|
|
2
|
-
import { D as AuthoringTypeConstructorDescriptor, U as PslSpan, p as AuthoringFieldPresetDescriptor } from "./framework-authoring-
|
|
3
|
-
import { i as ControlMutationDefaults } from "./mutation-default-types-
|
|
4
|
-
import { o as TaggedLiteralCanonicalization } from "./temporal-presets-
|
|
5
|
-
import "./authoring-
|
|
2
|
+
import { D as AuthoringTypeConstructorDescriptor, U as PslSpan, p as AuthoringFieldPresetDescriptor } from "./framework-authoring-BJf_-FTJ-K8fp3V_r.mjs";
|
|
3
|
+
import { i as ControlMutationDefaults } from "./mutation-default-types-CrA6rrwU-BkMgh2pO.mjs";
|
|
4
|
+
import { o as TaggedLiteralCanonicalization } from "./temporal-presets-pC0xlwib-Diikns1l.mjs";
|
|
5
|
+
import "./authoring-CUDReFVP.mjs";
|
|
6
6
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
7
|
-
import "./control-
|
|
8
|
-
import "./psl-ast-
|
|
9
|
-
import { n as ContractSourceContext } from "./config-types-
|
|
10
|
-
import { D as NamedTypeDeclarationAst, E as ModelDeclarationAst, L as PslDiagnostic, N as ParseDiagnostic, O as NamespaceDeclarationAst, T as ModelAttributeAst, Z as TypeAnnotationAst, _ as GenericBlockDeclarationAst, f as DocumentAst, h as FieldDeclarationAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, q as SyntaxNode, z as PslSources } from "./parse-eSQ_clQv-
|
|
7
|
+
import "./control-DtFLqCvx.mjs";
|
|
8
|
+
import "./psl-ast-CcQp_u_l.mjs";
|
|
9
|
+
import { n as ContractSourceContext } from "./config-types-E4OZwoHK.mjs";
|
|
10
|
+
import { D as NamedTypeDeclarationAst, E as ModelDeclarationAst, L as PslDiagnostic, N as ParseDiagnostic, O as NamespaceDeclarationAst, T as ModelAttributeAst, Z as TypeAnnotationAst, _ as GenericBlockDeclarationAst, f as DocumentAst, h as FieldDeclarationAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, q as SyntaxNode, z as PslSources } from "./parse-eSQ_clQv-BIek6vrj.mjs";
|
|
11
11
|
import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
|
|
12
12
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/binder-CGmSEQPU.d.mts
|
|
13
13
|
//#region src/resolve.d.ts
|
|
@@ -452,4 +452,4 @@ declare function contributedTypeOf(resolution: Resolution | undefined, binder: B
|
|
|
452
452
|
declare function createBinder(input: CreateBinderInput): BinderResult;
|
|
453
453
|
//#endregion
|
|
454
454
|
export { NullArgType as $, EntityDeclaration as A, UnrestrictedNumArgType as At, FuncCallSig as B, memberEntries as Bt, ContributedTypeScope as C, SymbolTable as Ct, DeclarationFor as D, TypedFuncCall as Dt, CtxOf as E, TopLevelScope as Et, FieldSymbol as F, createBinder as Ft, JsonArgType as G, typeReferenceNode as Gt, InferAttr as H, readResolvedAttribute as Ht, FixedIdentifierArgType as I, entityReference as It, ModelAttributeCtx as J, JsonValueArgType as K, FixedNumArgType as L, isNamespaceLike as Lt, EntitySelector as M, UnsupportedAttribute as Mt, FieldAttributeCtx as N, buildSymbolTable as Nt, DescribeUnresolvedType as O, UnresolvedTypeReference as Ot, FieldRefArgType as P, contributedTypeOf as Pt, NamespaceSymbol as Q, FixedStrArgType as R, keywordPslSpan as Rt, ContributedTypeNamespace as S, ScopeResolution as St, CreateBinderInput as T, TaggedLiteralArgType as Tt, InspectableArgType as U, readResolvedAttributes as Ut, IdentifierArgType as V, nodePslSpan as Vt, IntArgType as W, readResolvedConstructorCall as Wt, NamedOut as X, ModelSymbol as Y, NamedTypeSymbol as Z, CompositeTypeSymbol as _, ResolvedAttributeArg as _t, AttributeLevel as a, PSL_UNRESOLVED_REFERENCE as at, ContributedNamespaceSymbol as b, ResolvedTypeConstructorCall as bt, AttributeSymbol as c, PosOut as ct, BinderResult as d, RecordArgType as dt, NumLiteral as et, BlockAttributeCtx as f, ReferencedFieldRefArgType as ft, BuildSymbolTableOptions as g, ResolvedAttribute as gt, BoundSpec as h, Resolution as ht, AttributeCtx as i, OutOf as it, EntityRefArgType as j, UnrestrictedStrArgType as jt, DescribeUnsupportedAttribute as k, UnrestrictedIdentifierArgType as kt, Binder as l, PositionalParam as lt, BoolArgType as m, RequiredContextFor as mt, ArgType as n, OneOfArgType as nt, AttributeOut as o, Param as ot, BlockSymbol as p, RejectingArgType as pt, ListArgType as q, ArgTypeKind as r, OptionalArgType as rt, AttributeSpec as s, ParsedTaggedLiteral as st, AnyArgType as t, NumLiteralArgType as tt, BinderContext as u, PslSymbol as ut, ContextForRequirement as v, ResolvedEntityReference as vt, ContributedTypeSymbol as w, SymbolTableResult as wt, ContributedTypeDescriptor as x, Scope as xt, ContributedMember as y, ResolvedNamedTypeBinding as yt, FuncCallArgType as z, matchesSelector as zt };
|
|
455
|
-
//# sourceMappingURL=binder-CGmSEQPU-
|
|
455
|
+
//# sourceMappingURL=binder-CGmSEQPU-Celseo4Z.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binder-CGmSEQPU-
|
|
1
|
+
{"version":3,"file":"binder-CGmSEQPU-Celseo4Z.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/binder-CGmSEQPU.d.mts"],"mappings":";;;;;;;;;;;;;UASU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP,kBAAkB,cAAc,oBAAoB,oBAAoB,oBAAoB;WAC3F;WACA,eAAe;WACf,MAAM;WACN,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,cAAc,oBAAoB,mBAAmB,WAAW,OAAO,SAAS,aAAa,kBAAkB;iBACrI,uBAAuB,cAAc,oBAAoB,mBAAmB,YAAY,SA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UACvC;EACR,OAAO,eAAe;EACtB,WAAW,2BAA2B;;;;KAInC;WACM;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;WACA,QAAQ;;uBAEI;qBACF,QAAQ;EAC3B,YAAY,QAAQ;WACX,OAAO,eAAe;qBACZ,YAAY;EAC/B,WAAW,2BAA2B;;iBAEvB,gBAAgB,YAAY,kBAAkB,cAAc,QAAQ;EACnF;;iBAEe,cAAc,WAAW,QAAQ;EAChD;KACG,2BAA2B;;;cAGlB;KACT,YAAY,qBAAqB,qBAAqB,qBAAqB;UACtE;WACC;WACA;WACA;WACA,MAAM;;KAEZ,YAAY,cAAc,sBAAsB,kBAAkB,cAAc,kBAAkB;KAClG,aAAa;WACP;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;;WAEA;WACA;;UAED;EACR,eAAe,MAAM,aAAa;EAClC,cAAc,MAAM,aAAa;EACjC,QAAQ,MAAM,aAAa;;UAEnB;WACC,WAAW;WACX;WACA,OAAO,cAAc;WACrB,OAAO;;KAEb,gCAAgC,aAAa,yBAAyB;UACjE;WACC,OAAO;WACP,OAAO,cAAc;WACrB;;KAEN,0BAA0B,YAAY;UACjC,sBAAsB,KAAK;WAC1B,yBAAyB,KAAK;;UAE/B;WACC,SAAS;WACT,aAAa;WACb,SAAS;;UAEV;WACC,QAAQ;WACR,sBAAsB;;iBAEhB,kBAAkB,QAAQ,cAAc,kBAAkB;iBAC1D,kBAAkB,YAAY,wBAAwB,QAAQ,SAAS;iBACvE,aAAa,OAAO,oBAAoB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
-
import { n as isCodecTrait } from "./codec-types-
|
|
3
|
-
//#region ../../../1-framework/1-core/framework-components/dist/capabilities-
|
|
2
|
+
import { n as isCodecTrait } from "./codec-types-BXLUbk-Y-DpGfKGK0.mjs";
|
|
3
|
+
//#region ../../../1-framework/1-core/framework-components/dist/capabilities-CnCdDH1J.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Ownership key of an `(operation, input)` pair. Two descriptors sharing a key are two contributors claiming one overload, which is a composition error.
|
|
6
6
|
*/
|
|
@@ -117,4 +117,4 @@ function mergeCapabilityMatrices(base, contributors) {
|
|
|
117
117
|
//#endregion
|
|
118
118
|
export { mergeCapabilityMatrices as a, isNoInputAggregateDescriptor as i, isAggregateDescriptor as n, isAnyInputAggregateDescriptor as r, aggregateDescriptorKey as t };
|
|
119
119
|
|
|
120
|
-
//# sourceMappingURL=capabilities-
|
|
120
|
+
//# sourceMappingURL=capabilities-CnCdDH1J-Bq8Zf0nY.mjs.map
|
package/dist/{capabilities-M-lvaPSE-BMffxZqu.mjs.map → capabilities-CnCdDH1J-Bq8Zf0nY.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities-
|
|
1
|
+
{"version":3,"file":"capabilities-CnCdDH1J-Bq8Zf0nY.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/capabilities-CnCdDH1J.mjs"],"sourcesContent":["import { n as isCodecTrait } from \"./codec-types-BXLUbk-Y.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/shared/aggregate-descriptor.ts\n/**\n* Ownership key of an `(operation, input)` pair. Two descriptors sharing a key are two contributors claiming one overload, which is a composition error.\n*/\nfunction aggregateDescriptorKey(descriptor) {\n\tswitch (descriptor.input.kind) {\n\t\tcase \"none\": return `${descriptor.operation}:none`;\n\t\tcase \"any\": return `${descriptor.operation}:any`;\n\t\tcase \"codec\": return `${descriptor.operation}:codec:${descriptor.input.codecId}`;\n\t\tcase \"trait\": return `${descriptor.operation}:trait:${descriptor.input.trait}`;\n\t}\n}\n/** Whether `descriptor` is the overload of an operation that consumes no value — the case whose result always names a codec outright. */\nfunction isNoInputAggregateDescriptor(descriptor) {\n\treturn descriptor.input.kind === \"none\";\n}\n/** Whether `descriptor` answers regardless of input — the fallback rung of resolution. */\nfunction isAnyInputAggregateDescriptor(descriptor) {\n\treturn descriptor.input.kind === \"any\";\n}\nfunction isObjectLike(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction isNonEmptyString(value) {\n\treturn typeof value === \"string\" && value.length > 0;\n}\nfunction isAggregateInputMatch(value) {\n\tif (!isObjectLike(value) || !(\"kind\" in value)) return false;\n\tswitch (value.kind) {\n\t\tcase \"none\":\n\t\tcase \"any\": return true;\n\t\tcase \"codec\": return \"codecId\" in value && isNonEmptyString(value.codecId);\n\t\tcase \"trait\": return \"trait\" in value && isCodecTrait(value.trait);\n\t\tdefault: return false;\n\t}\n}\nfunction isAggregateOutputCodec(value) {\n\tif (!isObjectLike(value) || !(\"kind\" in value)) return false;\n\tswitch (value.kind) {\n\t\tcase \"self\": return true;\n\t\tcase \"codec\": return \"codecId\" in value && isNonEmptyString(value.codecId) && (!(\"typeParams\" in value) || value.typeParams === void 0 || typeof value.typeParams === \"function\");\n\t\tdefault: return false;\n\t}\n}\n/**\n* Structural validation of a contributed descriptor. Components assembled from JavaScript reach the contribution slot unchecked, so composition validates the shape once and every later read is a plain lookup.\n*/\nfunction isAggregateDescriptor(value) {\n\tif (!isObjectLike(value)) return false;\n\tif (!(\"operation\" in value) || !isNonEmptyString(value.operation)) return false;\n\tif (!(\"nullable\" in value) || typeof value.nullable !== \"boolean\") return false;\n\tif (value.nullable === false && (!(\"emptyResultJson\" in value) || value.emptyResultJson === void 0)) return false;\n\tif (!(\"input\" in value) || !isAggregateInputMatch(value.input)) return false;\n\tif (!(\"output\" in value) || !isAggregateOutputCodec(value.output)) return false;\n\treturn value.input.kind === \"codec\" || value.input.kind === \"trait\" || value.output.kind === \"codec\";\n}\n//#endregion\n//#region src/shared/capabilities.ts\n/**\n* Capability matrix merge primitive shared by emit-time and runtime stack composition.\n*\n* The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need\n* to fold a stack of component descriptors' `capabilities` declarations into a single\n* matrix keyed by namespace. Keeping the primitive here lets both call sites stay\n* byte-for-byte consistent without one depending on the other.\n*/\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction sortDeep(value) {\n\tif (Array.isArray(value)) return value.map(sortDeep);\n\tif (!isPlainObject(value)) return value;\n\tconst entries = Object.entries(value).sort(([a], [b]) => a.localeCompare(b));\n\tconst next = {};\n\tfor (const [key, child] of entries) next[key] = sortDeep(child);\n\treturn next;\n}\nfunction extractCapabilityMatrix(value) {\n\tif (!isPlainObject(value)) return {};\n\tconst out = {};\n\tfor (const [namespace, maybeCaps] of Object.entries(value)) {\n\t\tif (!isPlainObject(maybeCaps)) continue;\n\t\tconst caps = {};\n\t\tfor (const [key, flag] of Object.entries(maybeCaps)) if (typeof flag === \"boolean\") caps[key] = flag;\n\t\tif (Object.keys(caps).length > 0) out[namespace] = caps;\n\t}\n\treturn out;\n}\n/**\n* Merge an ordered list of contributor capability declarations into a base matrix.\n*\n* Behaviour:\n* - `base` and each contributor's `capabilities` are filtered through the same\n* structural extraction: non-plain-object namespace blocks are dropped,\n* non-boolean leaves inside a namespace block are dropped, and a namespace\n* block that ends up with zero boolean leaves is omitted entirely (so a\n* later contributor with a malformed namespace cannot erase a namespace\n* already present in `base`).\n* - Non-plain-object `capabilities` on a contributor (including `undefined`,\n* `null`, arrays, primitives) are skipped silently — the contributor\n* contributes nothing.\n* - Later contributors win on `(namespace, key)` collisions.\n* - The returned object is fresh — neither `base` nor any contributor is mutated.\n* - Output keys are sorted lexicographically at every plain-object level.\n*/\nfunction mergeCapabilityMatrices(base, contributors) {\n\tconst merged = extractCapabilityMatrix(base);\n\tfor (const contributor of contributors) {\n\t\tconst extracted = extractCapabilityMatrix(contributor.capabilities);\n\t\tfor (const [namespace, capabilities] of Object.entries(extracted)) merged[namespace] = {\n\t\t\t...merged[namespace] ?? {},\n\t\t\t...capabilities\n\t\t};\n\t}\n\treturn blindCast(sortDeep(merged));\n}\n//#endregion\nexport { isNoInputAggregateDescriptor as a, isAnyInputAggregateDescriptor as i, aggregateDescriptorKey as n, isAggregateDescriptor as r, mergeCapabilityMatrices as t };\n\n//# sourceMappingURL=capabilities-CnCdDH1J.mjs.map"],"mappings":";;;;;;AAMA,SAAS,uBAAuB,YAAY;CAC3C,QAAQ,WAAW,MAAM,MAAzB;EACC,KAAK,QAAQ,OAAO,GAAG,WAAW,UAAU;EAC5C,KAAK,OAAO,OAAO,GAAG,WAAW,UAAU;EAC3C,KAAK,SAAS,OAAO,GAAG,WAAW,UAAU,SAAS,WAAW,MAAM;EACvE,KAAK,SAAS,OAAO,GAAG,WAAW,UAAU,SAAS,WAAW,MAAM;CACxE;AACD;;AAEA,SAAS,6BAA6B,YAAY;CACjD,OAAO,WAAW,MAAM,SAAS;AAClC;;AAEA,SAAS,8BAA8B,YAAY;CAClD,OAAO,WAAW,MAAM,SAAS;AAClC;AACA,SAAS,aAAa,OAAO;CAC5B,OAAO,OAAO,UAAU,YAAY,UAAU;AAC/C;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,MAAM,SAAS;AACpD;AACA,SAAS,sBAAsB,OAAO;CACrC,IAAI,CAAC,aAAa,KAAK,KAAK,EAAE,UAAU,QAAQ,OAAO;CACvD,QAAQ,MAAM,MAAd;EACC,KAAK;EACL,KAAK,OAAO,OAAO;EACnB,KAAK,SAAS,OAAO,aAAa,SAAS,iBAAiB,MAAM,OAAO;EACzE,KAAK,SAAS,OAAO,WAAW,SAAS,aAAa,MAAM,KAAK;EACjE,SAAS,OAAO;CACjB;AACD;AACA,SAAS,uBAAuB,OAAO;CACtC,IAAI,CAAC,aAAa,KAAK,KAAK,EAAE,UAAU,QAAQ,OAAO;CACvD,QAAQ,MAAM,MAAd;EACC,KAAK,QAAQ,OAAO;EACpB,KAAK,SAAS,OAAO,aA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,KAAK,GAAG;EAC3D,IAAI,CAAC,cAAc,SAAS,GAAG;EAC/B,MAAM,OAAO,CAAC;EACd,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,SAAS,GAAG,IAAI,OAAO,SAAS,WAAW,KAAK,OAAO;EAChG,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,GAAG,IAAI,aAAa;CACpD;CACA,OAAO;AACR;;;;;;;;;;;;;;;;;;AAkBA,SAAS,wBAAwB,MAAM,cAAc;CACpD,MAAM,SAAS,wBAAwB,IAAI;CAC3C,KAAK,MAAM,eAAe,cAAc;EACvC,MAAM,YAAY,wBAAwB,YAAY,YAAY;EAClE,KAAK,MAAM,CAAC,WAAW,iBAAiB,OAAO,QAAQ,SAAS,GAAG,OAAO,aAAa;GACtF,GAAG,OAAO,cAAc,CAAC;GACzB,GAAG;EACJ;CACD;CACA,OAAO,UAAU,SAAS,MAAM,CAAC;AAClC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { V as JsonValue, nt as ValueSetRef } from "./domain-envelope-C2vVIWGK-C5x7cBpU.mjs";
|
|
2
|
-
import { c as CodecDescriptorTemplate, d as CodecInstanceContext, i as Codec, m as CodecRef, p as CodecLookupWithDescriptors, t as AnyCodecDescriptor } from "./codec-types-
|
|
2
|
+
import { c as CodecDescriptorTemplate, d as CodecInstanceContext, i as Codec, m as CodecRef, p as CodecLookupWithDescriptors, t as AnyCodecDescriptor } from "./codec-types-CZ8xRBJy-BMjCsUt1.mjs";
|
|
3
3
|
//#region ../../../1-framework/1-core/framework-components/dist/codec.d.mts
|
|
4
4
|
//#region src/shared/column-spec.d.ts
|
|
5
5
|
/**
|
|
@@ -11,7 +11,8 @@ import { c as CodecDescriptorTemplate, d as CodecInstanceContext, i as Codec, m
|
|
|
11
11
|
*/
|
|
12
12
|
type ColumnTypeDescriptor<TCodecId extends string = string> = {
|
|
13
13
|
readonly codecId: TCodecId;
|
|
14
|
-
|
|
14
|
+
/** Ignored: the contract names the database type from the codec's data type. */
|
|
15
|
+
readonly nativeType?: string;
|
|
15
16
|
readonly typeParams?: Record<string, unknown> | undefined;
|
|
16
17
|
readonly typeRef?: string;
|
|
17
18
|
/**
|
|
@@ -49,7 +50,7 @@ interface ColumnSpec<R, P extends Record<string, unknown> | undefined> extends C
|
|
|
49
50
|
/**
|
|
50
51
|
* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.
|
|
51
52
|
*
|
|
52
|
-
* `nativeType` is
|
|
53
|
+
* `nativeType` is ignored: the contract names the column's database type from the data type the codec represents.
|
|
53
54
|
*/
|
|
54
55
|
declare function column<R, P extends Record<string, unknown> | undefined>(codecFactory: (ctx: CodecInstanceContext) => R, codecId: string, typeParams: P, nativeType: string): ColumnSpec<R, P>;
|
|
55
56
|
/**
|
|
@@ -148,4 +149,4 @@ declare function materializeCodec(descriptor: AnyCodecDescriptor, ref: CodecRef,
|
|
|
148
149
|
declare function codecForRef(lookup: Pick<CodecLookupWithDescriptors, 'descriptorFor'>, ref: CodecRef): Codec | undefined;
|
|
149
150
|
//#endregion
|
|
150
151
|
export { materializeCodec as C, validateCodecTypeParams as D, resolveCodecDescriptorOrThrow as E, isNonFiniteText as S, renderTsLiteral as T, decodeJsonIntegerText as _, ColumnSpec as a, encodeJsonFloat as b, INT64_RANGE as c, SAFE_INTEGER_RANGE as d, codecForRef as f, decodeJsonInteger as g, decodeJsonFloat as h, ColumnHelperForStrict as i, IntegerRange as l, decodeJsonBoolean as m, CONTRACT_CODEC_DESCRIPTOR_MISSING as n, ColumnTypeDescriptor as o, column as p, ColumnHelperFor as r, INT32_RANGE as s, BigIntRange as t, SAFE_INTEGER_BIGINT_RANGE as u, decodeJsonMatching as v, refuseJsonValue as w, isIntegerIn as x, decodeJsonString as y };
|
|
151
|
-
//# sourceMappingURL=codec-
|
|
152
|
+
//# sourceMappingURL=codec-0XB-9TzG.d.mts.map
|
|
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K;;;;;;;iBAO7D,iBAAiB,YAAY,oBAAoB,KAAK,UAAU,KAAK,uBAAuB;;;;iBAI5F,YAAY,QAAQ,KAAK,8CAA8C,KAAK,WAAW"}
|
|
@@ -21,7 +21,7 @@ var CodecImpl = class {
|
|
|
21
21
|
/**
|
|
22
22
|
* Abstract base class for concrete codec descriptors.
|
|
23
23
|
*
|
|
24
|
-
* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `
|
|
24
|
+
* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `paramsSchema`, the curried `factory(params)`, and (optionally) `renderOutputType`.
|
|
25
25
|
*
|
|
26
26
|
* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.
|
|
27
27
|
*/
|
|
@@ -42,7 +42,7 @@ var CodecDescriptorImpl = class extends CodecDescriptorTemplateImpl {};
|
|
|
42
42
|
/**
|
|
43
43
|
* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.
|
|
44
44
|
*
|
|
45
|
-
* `nativeType` is
|
|
45
|
+
* `nativeType` is ignored: the contract names the column's database type from the data type the codec represents.
|
|
46
46
|
*/
|
|
47
47
|
function column(codecFactory, codecId, typeParams, nativeType) {
|
|
48
48
|
return {
|
|
@@ -152,4 +152,4 @@ function renderTsLiteral(value) {
|
|
|
152
152
|
//#endregion
|
|
153
153
|
export { isNonFiniteText as _, INT64_RANGE as a, column as c, decodeJsonInteger as d, decodeJsonIntegerText as f, isIntegerIn as g, encodeJsonFloat as h, INT32_RANGE as i, decodeJsonBoolean as l, decodeJsonString as m, CodecDescriptorTemplateImpl as n, SAFE_INTEGER_BIGINT_RANGE as o, decodeJsonMatching as p, CodecImpl as r, SAFE_INTEGER_RANGE as s, CodecDescriptorImpl as t, decodeJsonFloat as u, refuseJsonValue as v, renderTsLiteral as y };
|
|
154
154
|
|
|
155
|
-
//# sourceMappingURL=codec-
|
|
155
|
+
//# sourceMappingURL=codec-Cz-bOon3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-Cz-bOon3.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.mjs"],"sourcesContent":["import { t as emptyCodecLookup } from \"./codec-types-BXLUbk-Y.mjs\";\nimport { a as resolveCodecDescriptorOrThrow, c as createDataTypeLookup, d as objectSchemaKeys, f as requiredParamKeys, i as materializeCodec, l as dataType, o as validateCodecTypeParams, p as requiredSchemaKeys, r as codecForRef, s as assembleDataTypes, t as CONTRACT_CODEC_DESCRIPTOR_MISSING, u as dataTypeId } from \"./resolve-codec-qE0g980d.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { tsStringLiteral } from \"@internal/ts-render\";\n//#region src/shared/codec.ts\n/**\n* Abstract base class for concrete codec implementations.\n*\n* Codec authors extend this class with their typed `Id`, `TTraits`, `TWire`, `TInput` and override all four abstract conversion methods: `encode`, `decode`, `encodeJson`, and `decodeJson`. The runtime instance carries only its `id` (proxied through the descriptor so alias subclasses inherit the descriptor's id automatically) and the conversion methods — static metadata lives on the {@link CodecDescriptor}.\n*/\nvar CodecImpl = class {\n\tdescriptor;\n\t/**\n\t* Variance-erased descriptor reference. Concrete codec subclasses receive the typed descriptor in their own constructors and forward it via `super(descriptor)`; the variance erasure lives at this base because the abstract surface can't carry the concrete `TParams`.\n\t*/\n\tconstructor(descriptor) {\n\t\tthis.descriptor = descriptor;\n\t}\n\tget id() {\n\t\treturn this.descriptor.codecId;\n\t}\n};\n//#endregion\n//#region src/shared/codec-descriptor.ts\n/**\n* Abstract base class for concrete codec descriptors.\n*\n* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `paramsSchema`, the curried `factory(params)`, and (optionally) `renderOutputType`.\n*\n* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.\n*/\nvar CodecDescriptorTemplateImpl = class {\n\tget isParameterized() {\n\t\treturn this.paramsSchema !== void 0;\n\t}\n};\n/**\n* Abstract base for a concrete codec descriptor: a {@link CodecDescriptorTemplateImpl} that also\n* names the data type its codec represents.\n*\n* A codec whose data type depends on the target that adopts it extends\n* {@link CodecDescriptorTemplateImpl} instead, and the target names the type when it adapts the\n* template.\n*/\nvar CodecDescriptorImpl = class extends CodecDescriptorTemplateImpl {};\n//#endregion\n//#region src/shared/column-spec.ts\n/**\n* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.\n*\n* `nativeType` is ignored: the contract names the column's database type from the data type the codec represents.\n*/\nfunction column(codecFactory, codecId, typeParams, nativeType) {\n\treturn {\n\t\tcodecFactory,\n\t\tcodecId,\n\t\ttypeParams,\n\t\tnativeType\n\t};\n}\n//#endregion\n//#region src/shared/decode-json.ts\n/**\n* Readers for the JSON forms codecs share, each built as {@link Codec.decodeJson} requires: it returns the application value for a stored form of the codec's type and refuses anything else with {@link refuseJsonValue}.\n*/\nconst RECEIVED_PREVIEW_LIMIT = 100;\n/** The value a refusal names: its JSON text, or its digits for a number JSON cannot write, cut to 100 characters. */\nfunction receivedPreview(json) {\n\treturn (typeof json === \"number\" ? String(json) : JSON.stringify(json)).slice(0, RECEIVED_PREVIEW_LIMIT);\n}\n/**\n* The refusal every `decodeJson` raises: `RUNTIME.DECODE_FAILED`, `<codecId> JSON value must be <expected>`, with `meta.codecId` and `meta.received`, the value it was given as JSON text, cut to 100 characters.\n*/\nfunction refuseJsonValue(codecId, expected, json) {\n\tthrow structuredError(\"RUNTIME.DECODE_FAILED\", `${codecId} JSON value must be ${expected}`, { meta: {\n\t\tcodecId,\n\t\treceived: receivedPreview(json)\n\t} });\n}\nfunction decodeJsonString(codecId, json) {\n\tif (typeof json !== \"string\") return refuseJsonValue(codecId, \"a string\", json);\n\treturn json;\n}\n/** Reads a JSON string that matches `pattern`; `form` names what the pattern accepts, for the refusal. */\nfunction decodeJsonMatching(codecId, json, pattern, form) {\n\tif (typeof json !== \"string\" || !pattern.test(json)) return refuseJsonValue(codecId, form, json);\n\treturn json;\n}\nfunction decodeJsonBoolean(codecId, json) {\n\tif (typeof json !== \"boolean\") return refuseJsonValue(codecId, \"a boolean\", json);\n\treturn json;\n}\n/** Whether `value` is an integer within `range`, its ends included. */\nfunction isIntegerIn(value, range) {\n\treturn typeof value === \"number\" && Number.isInteger(value) && value >= range.min && value <= range.max;\n}\n/** The integers a JavaScript `number` holds exactly. */\nconst SAFE_INTEGER_RANGE = {\n\tmin: Number.MIN_SAFE_INTEGER,\n\tmax: Number.MAX_SAFE_INTEGER\n};\n/** The integers a signed 32-bit integer holds. */\nconst INT32_RANGE = {\n\tmin: -(2 ** 31),\n\tmax: 2 ** 31 - 1\n};\nfunction decodeJsonInteger(codecId, json, range) {\n\tif (!isIntegerIn(json, range)) return refuseJsonValue(codecId, `an integer from ${range.min} to ${range.max}`, json);\n\treturn json;\n}\n/** The integers a signed 64-bit integer holds. */\nconst INT64_RANGE = {\n\tmin: -(2n ** 63n),\n\tmax: 2n ** 63n - 1n\n};\n/** The integers a JavaScript `number` holds exactly, as a `bigint` range. */\nconst SAFE_INTEGER_BIGINT_RANGE = {\n\tmin: BigInt(Number.MIN_SAFE_INTEGER),\n\tmax: BigInt(Number.MAX_SAFE_INTEGER)\n};\nconst DECIMAL_INTEGER_TEXT = /^-?\\d+$/;\n/** Reads an integer a codec writes as decimal text, because a JSON number cannot hold every value of its type. */\nfunction decodeJsonIntegerText(codecId, json, range) {\n\tconst expected = range === void 0 ? \"a decimal integer string\" : `a decimal integer string from ${range.min} to ${range.max}`;\n\tconst value = BigInt(decodeJsonMatching(codecId, json, DECIMAL_INTEGER_TEXT, expected));\n\tif (range !== void 0 && (value < range.min || value > range.max)) return refuseJsonValue(codecId, expected, json);\n\treturn value;\n}\nconst NON_FINITE_TEXT = /* @__PURE__ */ new Set([\n\t\"NaN\",\n\t\"Infinity\",\n\t\"-Infinity\"\n]);\n/** Whether `text` is `NaN`, `Infinity` or `-Infinity`, the text a float's JSON form writes for a value JSON has no number for. */\nfunction isNonFiniteText(text) {\n\treturn NON_FINITE_TEXT.has(text);\n}\n/** JSON has no number for NaN or an infinity, so a float's JSON form writes them as the text `NaN`, `Infinity` and `-Infinity`. */\nfunction encodeJsonFloat(value) {\n\treturn Number.isFinite(value) ? value : String(value);\n}\nfunction decodeJsonFloat(codecId, json) {\n\tif (typeof json === \"number\" && Number.isFinite(json)) return json;\n\tif (typeof json === \"string\" && isNonFiniteText(json)) return Number(json);\n\treturn refuseJsonValue(codecId, \"a finite number or the text NaN, Infinity or -Infinity\", json);\n}\n//#endregion\n//#region src/shared/render-ts-literal.ts\n/**\n* Renders a codec-encoded value as a TypeScript literal (e.g. `\"low\"`, `1`, `true`), or `undefined`\n* when the value isn't literal-expressible (objects, arrays, null).\n*\n* Valid **only for identity codecs** whose `encodeJson` output equals their decoded output type\n* (text, int, float, bool). A non-identity codec (e.g. one that encodes to an int but decodes to a\n* string literal) must NOT use this: it has to `decodeJson` first, then render, in its own\n* `renderValueLiteral`.\n*/\nfunction renderTsLiteral(value) {\n\tif (typeof value === \"string\") return tsStringLiteral(value);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n}\n//#endregion\nexport { CONTRACT_CODEC_DESCRIPTOR_MISSING, CodecDescriptorImpl, CodecDescriptorTemplateImpl, CodecImpl, INT32_RANGE, INT64_RANGE, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, assembleDataTypes, codecForRef, column, createDataTypeLookup, dataType, dataTypeId, decodeJsonBoolean, decodeJsonFloat, decodeJsonInteger, decodeJsonIntegerText, decodeJsonMatching, decodeJsonString, emptyCodecLookup, encodeJsonFloat, isIntegerIn, isNonFiniteText, materializeCodec, objectSchemaKeys, refuseJsonValue, renderTsLiteral, requiredParamKeys, requiredSchemaKeys, resolveCodecDescriptorOrThrow, validateCodecTypeParams };\n\n//# sourceMappingURL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,OAAO;CAC/B,IAAI,OAAO,UAAU,UAAU,OAAO,gBAAgB,KAAK;CAC3D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;AACjF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../../1-framework/1-core/framework-components/dist/codec-types-
|
|
1
|
+
//#region ../../../1-framework/1-core/framework-components/dist/codec-types-BXLUbk-Y.mjs
|
|
2
2
|
/** Every semantic trait a codec may advertise. The runtime tuple backs validation of trait-keyed contributions arriving from JavaScript. */
|
|
3
3
|
const CODEC_TRAITS = [
|
|
4
4
|
"equality",
|
|
@@ -14,10 +14,9 @@ function isCodecTrait(value) {
|
|
|
14
14
|
/** A lookup with no codecs. It has no `descriptorFor`, so a stub that adds codecs to it through `get` cannot pass for a lookup of descriptors that answers nothing. */
|
|
15
15
|
const emptyCodecLookup = {
|
|
16
16
|
get: () => void 0,
|
|
17
|
-
targetTypesFor: () => void 0,
|
|
18
17
|
renderOutputTypeFor: () => void 0
|
|
19
18
|
};
|
|
20
19
|
//#endregion
|
|
21
20
|
export { isCodecTrait as n, emptyCodecLookup as t };
|
|
22
21
|
|
|
23
|
-
//# sourceMappingURL=codec-types-
|
|
22
|
+
//# sourceMappingURL=codec-types-BXLUbk-Y-DpGfKGK0.mjs.map
|
package/dist/{codec-types-CMqWkP1t-CjK8Cwfr.mjs.map → codec-types-BXLUbk-Y-DpGfKGK0.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-
|
|
1
|
+
{"version":3,"file":"codec-types-BXLUbk-Y-DpGfKGK0.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec-types-BXLUbk-Y.mjs"],"sourcesContent":["//#region src/shared/codec-types.ts\n/** Every semantic trait a codec may advertise. The runtime tuple backs validation of trait-keyed contributions arriving from JavaScript. */\nconst CODEC_TRAITS = [\n\t\"equality\",\n\t\"order\",\n\t\"boolean\",\n\t\"numeric\",\n\t\"textual\"\n];\n/** Whether `value` names one of the {@link CODEC_TRAITS}. */\nfunction isCodecTrait(value) {\n\treturn CODEC_TRAITS.some((trait) => trait === value);\n}\n/** A lookup with no codecs. It has no `descriptorFor`, so a stub that adds codecs to it through `get` cannot pass for a lookup of descriptors that answers nothing. */\nconst emptyCodecLookup = {\n\tget: () => void 0,\n\trenderOutputTypeFor: () => void 0\n};\n//#endregion\nexport { isCodecTrait as n, emptyCodecLookup as t };\n\n//# sourceMappingURL=codec-types-BXLUbk-Y.mjs.map"],"mappings":";;AAEA,MAAM,eAAe;CACpB;CACA;CACA;CACA;CACA;AACD;;AAEA,SAAS,aAAa,OAAO;CAC5B,OAAO,aAAa,MAAM,UAAU,UAAU,KAAK;AACpD;;AAEA,MAAM,mBAAmB;CACxB,WAAW,KAAK;CAChB,2BAA2B,KAAK;AACjC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { V as JsonValue } from "./domain-envelope-C2vVIWGK-C5x7cBpU.mjs";
|
|
2
|
+
import { Type } from "arktype";
|
|
2
3
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
|
-
//#region ../../../1-framework/1-core/framework-components/dist/codec-types-
|
|
4
|
+
//#region ../../../1-framework/1-core/framework-components/dist/codec-types-CZ8xRBJy.d.mts
|
|
4
5
|
//#region src/shared/data-type.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* The identity of a data type: `owner/name`, with no version. A type's identity does not change;
|
|
@@ -31,6 +32,8 @@ interface ListCast {
|
|
|
31
32
|
type ToCanonicalForm = (value: JsonValue) => JsonValue;
|
|
32
33
|
interface DataType {
|
|
33
34
|
readonly id: DataTypeId;
|
|
35
|
+
/** An arktype object schema of the type's parameters. A type without one has no parameters. */
|
|
36
|
+
readonly params?: Type<unknown>;
|
|
34
37
|
/** Keyed by the id of the type each cast takes values of. */
|
|
35
38
|
readonly casts: Readonly<Record<DataTypeId, Cast>>;
|
|
36
39
|
readonly listCast?: ListCast;
|
|
@@ -41,6 +44,7 @@ interface DataType {
|
|
|
41
44
|
readonly toCanonicalForm?: ToCanonicalForm;
|
|
42
45
|
}
|
|
43
46
|
interface DataTypeSpec {
|
|
47
|
+
readonly params?: Type<unknown>;
|
|
44
48
|
readonly casts?: Readonly<Record<string, Cast>>;
|
|
45
49
|
readonly listCast?: {
|
|
46
50
|
readonly of: readonly string[];
|
|
@@ -57,13 +61,30 @@ interface DataTypeLookup {
|
|
|
57
61
|
declare function dataTypeId(id: string): DataTypeId;
|
|
58
62
|
/** Declare a data type. Every id it names, its own and each cast's source, is validated here. */
|
|
59
63
|
declare function dataType(id: string, spec: DataTypeSpec): DataType;
|
|
64
|
+
/** The keys an arktype object schema declares, or undefined when `schema` is not one. */
|
|
65
|
+
declare function objectSchemaKeys(schema: unknown): readonly string[] | undefined;
|
|
66
|
+
/** The required keys an arktype object schema declares, or undefined when `schema` is not one. */
|
|
67
|
+
declare function requiredSchemaKeys(schema: unknown): readonly string[] | undefined;
|
|
68
|
+
/** The parameters a data type requires. */
|
|
69
|
+
declare function requiredParamKeys(type: DataType): readonly string[];
|
|
60
70
|
declare function createDataTypeLookup(types: readonly DataType[]): DataTypeLookup;
|
|
71
|
+
/** Collect every data type the composed components register, refusing two declarations of one id. */
|
|
72
|
+
declare function assembleDataTypes(descriptors: ReadonlyArray<{
|
|
73
|
+
readonly id?: string;
|
|
74
|
+
readonly dataTypes?: ReadonlyArray<DataType>;
|
|
75
|
+
}>): {
|
|
76
|
+
readonly lookup: DataTypeLookup;
|
|
77
|
+
readonly declared: ReadonlyArray<{
|
|
78
|
+
readonly type: DataType;
|
|
79
|
+
readonly contributedBy: string;
|
|
80
|
+
}>;
|
|
81
|
+
};
|
|
61
82
|
//#endregion
|
|
62
83
|
//#region src/shared/codec-descriptor.d.ts
|
|
63
84
|
/**
|
|
64
85
|
* Unified codec descriptor. Every codec in the framework registers through this shape — non-parameterized codecs use `P = void` and a constant factory that returns the same shared codec instance for every column; parameterized codecs use a non-empty `P` and a curried higher-order factory that returns a per-instance codec.
|
|
65
86
|
*
|
|
66
|
-
* The descriptor is the codec-id-keyed source of truth for static metadata (`traits
|
|
87
|
+
* The descriptor is the codec-id-keyed source of truth for static metadata (`traits`) and registration concerns (`paramsSchema` for JSON-boundary validation; optional `renderOutputType` for the `contract.d.ts` emit path). The runtime `Codec` instance returned by `factory(params)(ctx)` carries only the conversion behavior.
|
|
67
88
|
*
|
|
68
89
|
* Whether a codec id "is parameterized" stops being a registration-time distinction — it's a property of `P` on the descriptor. The descriptor map indexes every descriptor by `codecId`; both `descriptorFor(codecId)` and `forColumn(table, column)` resolve through the same map without branching on parameterization.
|
|
69
90
|
*
|
|
@@ -76,8 +97,6 @@ interface CodecDescriptorTemplate<P = void> {
|
|
|
76
97
|
readonly codecId: string;
|
|
77
98
|
/** Semantic traits for operator gating (e.g. equality, order, numeric). */
|
|
78
99
|
readonly traits: readonly CodecTrait[];
|
|
79
|
-
/** Database-native type names this codec handles (e.g. `['timestamptz']`). */
|
|
80
|
-
readonly targetTypes: readonly string[];
|
|
81
100
|
/** Standard Schema validator for the factory's params. Validates JSON-sourced params at the contract boundary (PSL → IR; `contract.json` → runtime). `undefined` for a codec that takes no params (`P = void`), which then rejects any `typeParams`. */
|
|
82
101
|
readonly paramsSchema: StandardSchemaV1<P> | undefined;
|
|
83
102
|
/** Whether this descriptor takes params, i.e. has a `paramsSchema`. Consumers that need to gate column-aware dispatch read this directly rather than threading a free-floating `(codecId) => boolean` callback. */
|
|
@@ -125,14 +144,13 @@ type AnyCodecDescriptor = CodecDescriptor<any>;
|
|
|
125
144
|
/**
|
|
126
145
|
* Abstract base class for concrete codec descriptors.
|
|
127
146
|
*
|
|
128
|
-
* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `
|
|
147
|
+
* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `paramsSchema`, the curried `factory(params)`, and (optionally) `renderOutputType`.
|
|
129
148
|
*
|
|
130
149
|
* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.
|
|
131
150
|
*/
|
|
132
151
|
declare abstract class CodecDescriptorTemplateImpl<TParams = void> implements CodecDescriptorTemplate<TParams> {
|
|
133
152
|
abstract readonly codecId: string;
|
|
134
153
|
abstract readonly traits: readonly CodecTrait[];
|
|
135
|
-
abstract readonly targetTypes: readonly string[];
|
|
136
154
|
abstract readonly paramsSchema: StandardSchemaV1<TParams> | undefined;
|
|
137
155
|
get isParameterized(): boolean;
|
|
138
156
|
/** Optional emit-path string renderer for `contract.d.ts`. Returns the TypeScript output type expression for the given params (e.g. `Vector<1536>`). Non-parameterized codecs typically omit it. */
|
|
@@ -169,7 +187,7 @@ declare abstract class CodecDescriptorImpl<TParams = void> extends CodecDescript
|
|
|
169
187
|
* - **Wire** (`TWire`): the format exchanged with the database driver.
|
|
170
188
|
* - **JSON** (`JsonValue`): the target-defined JSON-safe form used in contract artifacts. It uses the exact scalar shape the target produces inside JSON values, which can differ from the ordinary wire format.
|
|
171
189
|
*
|
|
172
|
-
* The runtime instance carries only its `id` (the descriptor's `codecId`, set by the factory) and the four conversion methods. Static metadata (`traits
|
|
190
|
+
* The runtime instance carries only its `id` (the descriptor's `codecId`, set by the factory) and the four conversion methods. Static metadata (`traits`) and the build-time `renderOutputType` renderer live on the {@link CodecDescriptor} keyed by `codecId` — the read-surface single source of truth. Consumers that need them resolve through `descriptorFor(codecId)`.
|
|
173
191
|
*
|
|
174
192
|
* Codec methods split into two groups:
|
|
175
193
|
*
|
|
@@ -251,12 +269,10 @@ interface CodecCallContext {
|
|
|
251
269
|
* Codec-id-keyed read surface threaded into emit and authoring paths.
|
|
252
270
|
*
|
|
253
271
|
* - `get(id)` returns a representative {@link Codec} instance for the codec id (used where a caller reads or encodes a value by codec id and the codec takes no type parameters). For parameterized codecs whose factory requires concrete params, this may return `undefined` — use `CodecRegistry.forCodecRef` instead.
|
|
254
|
-
* - `targetTypesFor(id)` exposes the codec-id-keyed `targetTypes` metadata the runtime instance no longer carries (TML-2357). Returns the same array `CodecDescriptor.targetTypes` would; for Mongo (whose registration doesn't yet resolve through the unified descriptor map — TML-2324) the family-side assembly populates this directly from the contributor's codec metadata.
|
|
255
272
|
* - `renderOutputTypeFor(id, params)` exposes the codec-id-keyed `renderOutputType` renderer the runtime instance no longer carries. Returns `undefined` when the codec doesn't render a custom type or when the codec id is unknown.
|
|
256
273
|
*/
|
|
257
274
|
interface CodecLookup {
|
|
258
275
|
get(id: string): Codec | undefined;
|
|
259
|
-
targetTypesFor(id: string): readonly string[] | undefined;
|
|
260
276
|
renderOutputTypeFor(id: string, params: Record<string, unknown>): string | undefined;
|
|
261
277
|
/** Codec-id-keyed `renderInputType` renderer for the `contract.d.ts` input position. Optional so existing lookups need not provide it; returns `undefined` when the codec renders no custom input type or the id is unknown. */
|
|
262
278
|
renderInputTypeFor?(id: string, params: Record<string, unknown>): string | undefined;
|
|
@@ -300,5 +316,5 @@ interface CodecInstanceContext {
|
|
|
300
316
|
readonly name: string;
|
|
301
317
|
}
|
|
302
318
|
//#endregion
|
|
303
|
-
export {
|
|
304
|
-
//# sourceMappingURL=codec-types-
|
|
319
|
+
export { requiredSchemaKeys as A, assembleDataTypes as C, emptyCodecLookup as D, dataTypeId as E, objectSchemaKeys as O, ToCanonicalForm as S, dataType as T, DataType as _, CodecCallContext as a, DataTypeSpec as b, CodecDescriptorTemplate as c, CodecInstanceContext as d, CodecLookup as f, CodecTrait as g, CodecRegistry as h, Codec as i, requiredParamKeys as k, CodecDescriptorTemplateImpl as l, CodecRef as m, AnyCodecDescriptorTemplate as n, CodecDescriptor as o, CodecLookupWithDescriptors as p, Cast as r, CodecDescriptorImpl as s, AnyCodecDescriptor as t, CodecImpl as u, DataTypeId as v, createDataTypeLookup as w, ListCast as x, DataTypeLookup as y };
|
|
320
|
+
//# sourceMappingURL=codec-types-CZ8xRBJy-BMjCsUt1.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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;uBAUpE,oBAAoB,wBAAwB,4BAA4B,oBAAoB,gBAAgB;oBAC/G,UAAU;;;;;;;;;;;;;;;;;;;;;;;UAuBpB,MAAM,4BAA4B,yBAAyB,wBAAwB,cAAc,iBAAiB;;WAEjH,IAAI;;WAEJ,gBAAgB;;EAEzB,OAAO,OAAO,QAAQ,KAAK,mBAAmB,QAAQ;;EAEtD,OAAO,MAAM,OAAO,KAAK,mBAAmB,QAAQ;;EAEpD,WAAW,OAAO,SAAS;;;;EAI3B,WAAW,MAAM,YAAY;;;;;;;uBAOR,UAAU,4BAA4B,yBAAyB,wBAAwB,cAAc,iBAAiB,6BAA6B,MAAM,IAAI,SAAS,OAAO;WACzL,YAAY;;;;EAIrB,YAAY,YAAY;MACpB,MAAM;WACD,OAAO,OAAO,QAAQ,KAAK,mBAAmB,QAAQ;WACtD,OAAO,MAAM,OAAO,KAAK,mBAAmB,QAAQ;WACpD,WAAW,OAAO,SAAS;;WAE3B,WAAW,MAAM,YAAY;;;;;cAK1B;KACT,qBAAqB;;;;;;;;;;;;UAYhB;WACC;WACA,aAAa;WACb;;;;;;;;;;;;;UAaD;WACC,SAAS;;;;;;;;UAQV;EACR,IAAI,aAAa;EACjB,oBAAoB,YAAY,QAAQ;;EAExC,oBAAoB,YAAY,QAAQ;;EAExC,uBAAuB,YAAY,OAAO,WAAW;;;UAG7C,mCAAmC;;;;EAI3C,cAAc,aAAa;;;;;;;;;;;;;;;UAenB,sBAAsB;EAC9B,YAAY,KAAK,WAAW;EAC5B,UAAU,qBAAqB,eAAe,iBAAiB;;;cAGnD,kBAAkB;;;;;;;;UAQtB;WACC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as CodecTrait } from "./codec-types-
|
|
2
|
-
import { t as AggregateDescriptor } from "./types-import-spec-
|
|
3
|
-
import "./framework-components-
|
|
1
|
+
import { g as CodecTrait } from "./codec-types-CZ8xRBJy-BMjCsUt1.mjs";
|
|
2
|
+
import { t as AggregateDescriptor } from "./types-import-spec-BLFYPur6-QN7ntocb.mjs";
|
|
3
|
+
import "./framework-components-7SQpxVko-BaUd55aP.mjs";
|
|
4
4
|
//#region ../../../1-framework/1-core/framework-components/dist/components.d.mts
|
|
5
5
|
//#region src/shared/aggregate-overloads.d.ts
|
|
6
6
|
/** What settling needs to know about a codec: its id, and the traits an overload can claim it by. */
|
|
@@ -47,4 +47,4 @@ interface SettledAggregateOverloads<TDescriptor extends AggregateDescriptor> {
|
|
|
47
47
|
declare function settleAggregateOverloads<TDescriptor extends AggregateDescriptor>(descriptors: readonly TDescriptor[], codecs: Iterable<AggregateCodecTraits>): SettledAggregateOverloads<TDescriptor>;
|
|
48
48
|
//#endregion
|
|
49
49
|
export { SettledAggregateOverloads as a, SettledAggregateOperation as i, AggregateOverloadAmbiguity as n, settleAggregateOverloads as o, AggregateOverloadDuplicate as r, AggregateCodecTraits as t };
|
|
50
|
-
//# sourceMappingURL=components-
|
|
50
|
+
//# sourceMappingURL=components-CRRIFm30.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-
|
|
1
|
+
{"version":3,"file":"components-CRRIFm30.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/components.d.mts"],"mappings":";;;;;;UAOU;WACC;WACA,iBAAiB;;;UAGlB,0BAA0B,oBAAoB;;WAE7C,WAAW,oBAAoB;;WAE/B,SAAS;;WAET,UAAU;;;UAGX;WACC;WACA;WACA,iBAAiB;;;UAGlB,2BAA2B,oBAAoB;WAC9C;WACA;WACA,OAAO;WACP,QAAQ;;UAET,0BAA0B,oBAAoB;WAC7C,YAAY,oBAAoB,0BAA0B;WAC1D,sBAAsB;WACtB,qBAAqB,2BAA2B;;;;;;;;;;;iBAW1C,yBAAyB,oBAAoB,qBAAqB,sBAAsB,eAAe,QAAQ,SAAS,wBAAwB,0BAA0B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as aggregateDescriptorKey } from "./capabilities-
|
|
1
|
+
import { t as aggregateDescriptorKey } from "./capabilities-CnCdDH1J-Bq8Zf0nY.mjs";
|
|
2
2
|
//#region ../../../1-framework/1-core/framework-components/dist/components.mjs
|
|
3
3
|
/**
|
|
4
4
|
* Settle every contributed overload against `codecs`.
|
|
@@ -85,4 +85,4 @@ function settleAggregateOverloads(descriptors, codecs) {
|
|
|
85
85
|
//#endregion
|
|
86
86
|
export { settleAggregateOverloads as t };
|
|
87
87
|
|
|
88
|
-
//# sourceMappingURL=components-
|
|
88
|
+
//# sourceMappingURL=components-VMbwq7D8.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-
|
|
1
|
+
{"version":3,"file":"components-VMbwq7D8.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/components.mjs"],"sourcesContent":["import { n as runtimeError, t as isRuntimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { a as isNoInputAggregateDescriptor, i as isAnyInputAggregateDescriptor, n as aggregateDescriptorKey, r as isAggregateDescriptor, t as mergeCapabilityMatrices } from \"./capabilities-CnCdDH1J.mjs\";\nimport { t as checkContractComponentRequirements } from \"./framework-components-D6j4Y5K7.mjs\";\n//#region src/shared/aggregate-overloads.ts\n/**\n* Settle every contributed overload against `codecs`.\n*\n* Exact codec overloads win over trait overloads, and trait overloads are expanded only over the codecs given — so a caller that passes the codecs a stack actually composes cannot end up with a row for one it does not. An exact overload survives even for a codec outside that set, because naming a codec id is a claim that stands on its own.\n*\n* The input-agnostic overload is left unexpanded: it answers whatever the other two rungs do not, so materializing it per codec would say the same thing once per codec.\n*\n* A second claim on one `(operation, input)` key is reported as a duplicate and does not unseat the first; both production callers reject duplicates before settling, so the report guards a consumer that calls this directly.\n*/\nfunction settleAggregateOverloads(descriptors, codecs) {\n\tconst byOperation = /* @__PURE__ */ new Map();\n\tconst firstClaims = /* @__PURE__ */ new Map();\n\tconst duplicates = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst key = aggregateDescriptorKey(descriptor);\n\t\tconst first = firstClaims.get(key);\n\t\tif (first !== void 0) {\n\t\t\tduplicates.push({\n\t\t\t\toperation: descriptor.operation,\n\t\t\t\tkey,\n\t\t\t\tfirst,\n\t\t\t\tsecond: descriptor\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tfirstClaims.set(key, descriptor);\n\t\tconst entry = byOperation.get(descriptor.operation) ?? {\n\t\t\texact: /* @__PURE__ */ new Map(),\n\t\t\ttraits: [],\n\t\t\tnoInput: void 0,\n\t\t\tanyInput: void 0\n\t\t};\n\t\tswitch (descriptor.input.kind) {\n\t\t\tcase \"none\":\n\t\t\t\tentry.noInput = descriptor;\n\t\t\t\tbreak;\n\t\t\tcase \"any\":\n\t\t\t\tentry.anyInput = descriptor;\n\t\t\t\tbreak;\n\t\t\tcase \"codec\":\n\t\t\t\tentry.exact.set(descriptor.input.codecId, descriptor);\n\t\t\t\tbreak;\n\t\t\tcase \"trait\":\n\t\t\t\tentry.traits.push({\n\t\t\t\t\tdescriptor,\n\t\t\t\t\ttrait: descriptor.input.trait\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t\tbyOperation.set(descriptor.operation, entry);\n\t}\n\tconst codecList = [...codecs];\n\tconst operations = /* @__PURE__ */ new Map();\n\tconst ambiguities = [];\n\tfor (const [operation, entry] of byOperation) {\n\t\tconst byCodecId = new Map(entry.exact);\n\t\tfor (const codec of codecList) {\n\t\t\tif (byCodecId.has(codec.codecId)) continue;\n\t\t\tconst claims = entry.traits.filter((candidate) => codec.traits.includes(candidate.trait));\n\t\t\tif (claims.length > 1) {\n\t\t\t\tambiguities.push({\n\t\t\t\t\toperation,\n\t\t\t\t\tcodecId: codec.codecId,\n\t\t\t\t\ttraits: claims.map((claim) => claim.trait)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst claim = claims[0];\n\t\t\tif (claim !== void 0) byCodecId.set(codec.codecId, claim.descriptor);\n\t\t}\n\t\toperations.set(operation, {\n\t\t\tbyCodecId,\n\t\t\tnoInput: entry.noInput,\n\t\t\tanyInput: entry.anyInput\n\t\t});\n\t}\n\treturn {\n\t\toperations,\n\t\tambiguities,\n\t\tduplicates\n\t};\n}\n//#endregion\nexport { aggregateDescriptorKey, checkContractComponentRequirements, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, isRuntimeError, mergeCapabilityMatrices, runtimeError, settleAggregateOverloads };\n\n//# sourceMappingURL=components.mjs.map"],"mappings":";;;;;;;;;;;AAaA,SAAS,yBAAyB,aAAa,QAAQ;CACtD,MAAM,8BAA8B,IAAI,IAAI;CAC5C,MAAM,8BAA8B,IAAI,IAAI;CAC5C,MAAM,aAAa,CAAC;CACpB,KAAK,MAAM,cAAc,aAAa;EACrC,MAAM,MAAM,uBAAuB,UAAU;EAC7C,MAAM,QAAQ,YAAY,IAAI,GAAG;EACjC,IAAI,UAAU,KAAK,GAAG;GACrB,WAAW,KAAK;IACf,WAAW,WAAW;IACtB;IACA;IACA,QAAQ;GACT,CAAC;GACD;EACD;EACA,YAAY,IAAI,KAAK,UAAU;EAC/B,MAAM,QAAQ,YAAY,IAAI,WAAW,SAAS,KAAK;GACtD,uBAAuB,IAAI,IAAI;GAC/B,QAAQ,CAAC;GACT,SAAS,KAAK;GACd,UAAU,KAAK;EAChB;EACA,QAAQ,WAAW,MAAM,MAAzB;GACC,KAAK;IACJ,MAAM,UAAU;IAChB;GACD,KAAK;IACJ,MAAM,WAAW;IACjB;GACD,KAAK;IACJ,MAAM,MAAM,IAAI,WAAW,MAAM,SAAS,UAAU;IACpD;GACD,KAAK;IACJ,MAAM,OAAO,KAAK;KACjB;KACA,OAAO,WAAW,MAAM;IACzB,CAAC;IACD;EACF;EACA,YAAY,IAAI,WAAW,WAAW,KAAK;CAC5C;CACA,MAAM,YAAY,CAAC,GAAG,MAAM;CAC5B,MAAM,6BAA6B,IAAI,IAAI;CAC3C,MAAM,cAAc,CAAC;CACrB,KAAK,MAAM,CAAC,WAAW,UAAU,a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