@prisma/orm-framework 8.0.0-rc.18-dev.7 → 8.0.0-rc.18-dev.9
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-D--mDfh-.d.mts → authoring-CSsdXy1L.d.mts} +16 -5
- package/dist/authoring-CSsdXy1L.d.mts.map +1 -0
- package/dist/{authoring-axlemDvs.mjs → authoring-CdcF6V47.mjs} +10 -9
- package/dist/authoring-CdcF6V47.mjs.map +1 -0
- package/dist/{binder-Eeh-nJsx-CCtbphy6.d.mts → binder-Eeh-nJsx-CNEE7rH-.d.mts} +10 -10
- package/dist/{binder-Eeh-nJsx-CCtbphy6.d.mts.map → binder-Eeh-nJsx-CNEE7rH-.d.mts.map} +1 -1
- package/dist/codec-B6f31GrC.mjs.map +1 -1
- package/dist/{codec-DXDkDjYm.d.mts → codec-C50y5KJD.d.mts} +2 -2
- package/dist/{codec-DXDkDjYm.d.mts.map → codec-C50y5KJD.d.mts.map} +1 -1
- package/dist/{codec-descriptor-DUZmWwry-BVbguh8h.mjs → codec-descriptor-cZ8iVRuw-Cfsd42-8.mjs} +3 -3
- package/dist/codec-descriptor-cZ8iVRuw-Cfsd42-8.mjs.map +1 -0
- package/dist/{codec-types-CQNZE70G-DrntJY0s.d.mts → codec-types-BsE6wCHK-Dpx-WFJ2.d.mts} +11 -7
- package/dist/codec-types-BsE6wCHK-Dpx-WFJ2.d.mts.map +1 -0
- package/dist/{components-BMrl2FTt.d.mts → components-DY1n6ZoG.d.mts} +4 -4
- package/dist/{components-BMrl2FTt.d.mts.map → components-DY1n6ZoG.d.mts.map} +1 -1
- package/dist/components.d.mts +16 -16
- package/dist/components.mjs +5 -5
- package/dist/components__authoring.d.mts +4 -4
- package/dist/components__authoring.mjs +2 -2
- package/dist/components__codec.d.mts +3 -3
- package/dist/components__codec.mjs +3 -3
- package/dist/components__components.d.mts +3 -3
- package/dist/components__control.d.mts +3 -3
- package/dist/components__control.mjs +2 -2
- 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-BOqns_NG.d.mts → config-types-yVCv5UCi.d.mts} +7 -7
- package/dist/{config-types-BOqns_NG.d.mts.map → config-types-yVCv5UCi.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 +8 -8
- package/dist/contract-authoring.d.mts.map +1 -1
- package/dist/contract-authoring.mjs +2 -2
- package/dist/contract.d.mts +3 -3
- package/dist/contract__enum-accessor.d.mts +1 -1
- package/dist/contract__types.d.mts +2 -2
- package/dist/{control-C11hV6zc-Cf1gY6wI.d.mts → control-C11hV6zc-DNNpEk4P.d.mts} +2 -2
- package/dist/{control-C11hV6zc-Cf1gY6wI.d.mts.map → control-C11hV6zc-DNNpEk4P.d.mts.map} +1 -1
- package/dist/{control-CVGlbj6c-dmRUHRmd.mjs → control-CVGlbj6c-DGRy_Odg.mjs} +2 -2
- package/dist/{control-CVGlbj6c-dmRUHRmd.mjs.map → control-CVGlbj6c-DGRy_Odg.mjs.map} +1 -1
- package/dist/control-DEFsiDWR.d.mts +1 -0
- package/dist/{control-R4AYkr7S.d.mts → control-DW-Jv4qC.d.mts} +11 -9
- package/dist/{control-R4AYkr7S.d.mts.map → control-DW-Jv4qC.d.mts.map} +1 -1
- package/dist/{control-D-AyHVwu.mjs → control-DnVTy0uQ.mjs} +10 -3
- package/dist/control-DnVTy0uQ.mjs.map +1 -0
- package/dist/{data-type-4xQlxYB5-DD158cOq.mjs → data-type-PGFGVtmU-DeoZ2KIb.mjs} +13 -3
- package/dist/data-type-PGFGVtmU-DeoZ2KIb.mjs.map +1 -0
- package/dist/emission-BSYl5A1j.d.mts +2 -0
- package/dist/{emission-types-Cb8Eot74-y5Ucjh_S.d.mts → emission-types-6eDWkqG7-C0x_EHcS.d.mts} +10 -4
- package/dist/emission-types-6eDWkqG7-C0x_EHcS.d.mts.map +1 -0
- package/dist/{enum-accessor-BUuU12k8.d.mts → enum-accessor-COww36Lu.d.mts} +2 -5
- package/dist/{enum-accessor-BUuU12k8.d.mts.map → enum-accessor-COww36Lu.d.mts.map} +1 -1
- package/dist/errors.d.mts +4 -4
- package/dist/errors.mjs +3 -3
- package/dist/errors__control.d.mts +2 -2
- package/dist/errors__control.mjs +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/errors__execution.mjs +1 -1
- package/dist/errors__migration.d.mts +1 -1
- package/dist/errors__migration.mjs +1 -1
- package/dist/{execution-DyEVrYKn.d.mts → execution-5GwMfE3u.d.mts} +2 -2
- package/dist/{execution-DyEVrYKn.d.mts.map → execution-5GwMfE3u.d.mts.map} +1 -1
- package/dist/{execution-Ct_Zphl7.mjs → execution-BIqac9cC.mjs} +2 -2
- package/dist/{execution-Ct_Zphl7.mjs.map → execution-BIqac9cC.mjs.map} +1 -1
- package/dist/{execution-C1qForzP.d.mts → execution-Cxh39jc7.d.mts} +3 -3
- package/dist/{execution-C1qForzP.d.mts.map → execution-Cxh39jc7.d.mts.map} +1 -1
- package/dist/{framework-authoring-BaBmrcxi-DV-OErsx.d.mts → framework-authoring-D6Z2kyE8-B8GVWZ59.d.mts} +4 -4
- package/dist/{framework-authoring-BaBmrcxi-DV-OErsx.d.mts.map → framework-authoring-D6Z2kyE8-B8GVWZ59.d.mts.map} +1 -1
- package/dist/{framework-components-Cu_suxg--B6av7sUA.d.mts → framework-components-DhrgvP2z-B_XzMVzi.d.mts} +10 -6
- package/dist/framework-components-DhrgvP2z-B_XzMVzi.d.mts.map +1 -0
- package/dist/ids.d.mts +72 -7
- package/dist/ids.d.mts.map +1 -1
- package/dist/ids.mjs +19 -17
- package/dist/ids.mjs.map +1 -1
- package/dist/{migration-pjrQbiWb.mjs → migration-BdFXgvxm.mjs} +2 -2
- package/dist/{migration-pjrQbiWb.mjs.map → migration-BdFXgvxm.mjs.map} +1 -1
- package/dist/{migration-CmJ2a4Ir.d.mts → migration-DpDTUseh.d.mts} +2 -2
- package/dist/{migration-CmJ2a4Ir.d.mts.map → migration-DpDTUseh.d.mts.map} +1 -1
- package/dist/{parse-CJtBvEYy-DzMRgpky.d.mts → parse-CJtBvEYy-jWNozvcU.d.mts} +6 -6
- package/dist/{parse-CJtBvEYy-DzMRgpky.d.mts.map → parse-CJtBvEYy-jWNozvcU.d.mts.map} +1 -1
- package/dist/psl-ast-nSJQBZ1d.d.mts +2 -0
- package/dist/{psl-ast-BER6m646-c8XvWGXr.d.mts → psl-ast-xH8q-IMy-BGt6Xtfb.d.mts} +3 -3
- package/dist/{psl-ast-BER6m646-c8XvWGXr.d.mts.map → psl-ast-xH8q-IMy-BGt6Xtfb.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +10 -10
- package/dist/psl-parser.mjs +2 -2
- package/dist/psl-parser__format.d.mts +1 -1
- package/dist/psl-parser__interpret.d.mts +6 -6
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-printer.d.mts +4 -4
- package/dist/psl-printer.mjs +0 -2
- package/dist/psl-printer.mjs.map +1 -1
- package/dist/{runtime-CNRjjEnO.d.mts → runtime-DXJoMikC.d.mts} +2 -2
- package/dist/{runtime-CNRjjEnO.d.mts.map → runtime-DXJoMikC.d.mts.map} +1 -1
- package/dist/types-CXUzb1Kz.d.mts +38 -0
- package/dist/types-CXUzb1Kz.d.mts.map +1 -0
- package/dist/{types-import-spec-Dj96kZJO-DG90n0dU.d.mts → types-import-spec-DkCibt5c-eWXsW3y_.d.mts} +3 -3
- package/dist/{types-import-spec-Dj96kZJO-DG90n0dU.d.mts.map → types-import-spec-DkCibt5c-eWXsW3y_.d.mts.map} +1 -1
- package/dist/{written-value--KnOpj99-BA9i2Wto.d.mts → written-value-Cux5g-EZ-Bqapydv4.d.mts} +4 -4
- package/dist/{written-value--KnOpj99-BA9i2Wto.d.mts.map → written-value-Cux5g-EZ-Bqapydv4.d.mts.map} +1 -1
- package/package.json +15 -15
- package/dist/authoring-D--mDfh-.d.mts.map +0 -1
- package/dist/authoring-axlemDvs.mjs.map +0 -1
- package/dist/codec-descriptor-DUZmWwry-BVbguh8h.mjs.map +0 -1
- package/dist/codec-types-CQNZE70G-DrntJY0s.d.mts.map +0 -1
- package/dist/control-CMJMYN6y.d.mts +0 -1
- package/dist/control-D-AyHVwu.mjs.map +0 -1
- package/dist/data-type-4xQlxYB5-DD158cOq.mjs.map +0 -1
- package/dist/emission-B32HJNub.d.mts +0 -2
- package/dist/emission-types-Cb8Eot74-y5Ucjh_S.d.mts.map +0 -1
- package/dist/framework-components-Cu_suxg--B6av7sUA.d.mts.map +0 -1
- package/dist/psl-ast-Dho77tVl.d.mts +0 -2
- package/dist/types-FggL4gB2.d.mts +0 -21
- package/dist/types-FggL4gB2.d.mts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
2
|
import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
3
3
|
import { n as runtimeError } from "./runtime-error-BA9d7XjZ-BlT8t6LB.mjs";
|
|
4
|
-
//#region ../../../1-framework/1-core/framework-components/dist/data-type-
|
|
4
|
+
//#region ../../../1-framework/1-core/framework-components/dist/data-type-PGFGVtmU.mjs
|
|
5
5
|
/** The whole of what a data type id is: `owner/name` in lower case, with no version. */
|
|
6
6
|
const DATA_TYPE_ID_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*\/[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
7
7
|
/** Read `id` as a data type id, refusing anything that is not `owner/name` in lower case. */
|
|
@@ -54,6 +54,16 @@ function objectSchemaKeys(schema) {
|
|
|
54
54
|
function requiredSchemaKeys(schema) {
|
|
55
55
|
return objectSchemaProps(schema)?.flatMap((prop) => prop.kind === "required" && typeof prop.key === "string" ? [prop.key] : []);
|
|
56
56
|
}
|
|
57
|
+
function propAllows(prop, value) {
|
|
58
|
+
const schema = prop.value;
|
|
59
|
+
if (schema === null || typeof schema !== "object" && typeof schema !== "function") return false;
|
|
60
|
+
const allows = Reflect.get(schema, "allows");
|
|
61
|
+
return typeof allows === "function" && allows.call(schema, value) === true;
|
|
62
|
+
}
|
|
63
|
+
/** The keys of an arktype object schema whose own schema accepts `value`, or undefined when `schema` is not one. */
|
|
64
|
+
function schemaKeysAllowing(schema, value) {
|
|
65
|
+
return objectSchemaProps(schema)?.flatMap((prop) => typeof prop.key === "string" && propAllows(prop, value) ? [prop.key] : []);
|
|
66
|
+
}
|
|
57
67
|
/** The parameters a data type requires. */
|
|
58
68
|
function requiredParamKeys(type) {
|
|
59
69
|
return requiredSchemaKeys(type.params) ?? [];
|
|
@@ -91,6 +101,6 @@ function assembleDataTypes(descriptors) {
|
|
|
91
101
|
};
|
|
92
102
|
}
|
|
93
103
|
//#endregion
|
|
94
|
-
export { dataTypeId as a, requiredSchemaKeys as c, dataType as i, assembleDataTypes as n, objectSchemaKeys as o, createDataTypeLookup as r, requiredParamKeys as s, DATA_TYPE_ID_PATTERN as t };
|
|
104
|
+
export { dataTypeId as a, requiredSchemaKeys as c, dataType as i, schemaKeysAllowing as l, assembleDataTypes as n, objectSchemaKeys as o, createDataTypeLookup as r, requiredParamKeys as s, DATA_TYPE_ID_PATTERN as t };
|
|
95
105
|
|
|
96
|
-
//# sourceMappingURL=data-type-
|
|
106
|
+
//# sourceMappingURL=data-type-PGFGVtmU-DeoZ2KIb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-type-PGFGVtmU-DeoZ2KIb.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/data-type-PGFGVtmU.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/shared/data-type.ts\n/** The whole of what a data type id is: `owner/name` in lower case, with no version. */\nconst DATA_TYPE_ID_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-z0-9]+(?:-[a-z0-9]+)*$/;\n/** Read `id` as a data type id, refusing anything that is not `owner/name` in lower case. */\nfunction dataTypeId(id) {\n\tif (!DATA_TYPE_ID_PATTERN.test(id)) throw runtimeError(\"CONTRACT.DATA_TYPE_ID_INVALID\", `\"${id}\" is not a data type id. A data type id is \"owner/name\" in lower case and carries no version, as in \"owner/name\"; a versioned id names a codec.`, { id });\n\treturn blindCast(id);\n}\n/** Declare a data type. Every id it names, its own and each cast's source, is validated here. */\nfunction dataType(id, spec) {\n\tconst casts = {};\n\tfor (const [source, cast] of Object.entries(spec.casts ?? {})) casts[dataTypeId(source)] = cast;\n\tconst listCast = spec.listCast;\n\treturn {\n\t\tid: dataTypeId(id),\n\t\t...ifDefined(\"params\", spec.params),\n\t\tcasts,\n\t\t...listCast === void 0 ? {} : { listCast: {\n\t\t\tof: listCast.of.map(dataTypeId),\n\t\t\tcast: listCast.cast\n\t\t} },\n\t\t...spec.toCanonicalForm === void 0 ? {} : { toCanonicalForm: spec.toCanonicalForm }\n\t};\n}\nfunction isSchemaPropList(value) {\n\treturn Array.isArray(value) && value.every((prop) => prop !== null && (typeof prop === \"object\" || typeof prop === \"function\") && \"key\" in prop);\n}\nfunction describesObjects(schema) {\n\tconst extendsType = Reflect.get(schema, \"extends\");\n\treturn typeof extendsType === \"function\" && extendsType.call(schema, \"object\") === true;\n}\nfunction objectSchemaProps(schema) {\n\tif (schema === null || typeof schema !== \"object\" && typeof schema !== \"function\") return;\n\tif (!describesObjects(schema)) return void 0;\n\tconst props = readProps(schema);\n\treturn isSchemaPropList(props) ? props : void 0;\n}\n/** Arktype throws from `props` for a union or a morph, whose keys it cannot list. */\nfunction readProps(schema) {\n\ttry {\n\t\treturn Reflect.get(schema, \"props\");\n\t} catch {\n\t\treturn;\n\t}\n}\n/** The keys an arktype object schema declares, or undefined when `schema` is not one. */\nfunction objectSchemaKeys(schema) {\n\treturn objectSchemaProps(schema)?.flatMap((prop) => typeof prop.key === \"string\" ? [prop.key] : []);\n}\n/** The required keys an arktype object schema declares, or undefined when `schema` is not one. */\nfunction requiredSchemaKeys(schema) {\n\treturn objectSchemaProps(schema)?.flatMap((prop) => prop.kind === \"required\" && typeof prop.key === \"string\" ? [prop.key] : []);\n}\nfunction propAllows(prop, value) {\n\tconst schema = prop.value;\n\tif (schema === null || typeof schema !== \"object\" && typeof schema !== \"function\") return false;\n\tconst allows = Reflect.get(schema, \"allows\");\n\treturn typeof allows === \"function\" && allows.call(schema, value) === true;\n}\n/** The keys of an arktype object schema whose own schema accepts `value`, or undefined when `schema` is not one. */\nfunction schemaKeysAllowing(schema, value) {\n\treturn objectSchemaProps(schema)?.flatMap((prop) => typeof prop.key === \"string\" && propAllows(prop, value) ? [prop.key] : []);\n}\n/** The parameters a data type requires. */\nfunction requiredParamKeys(type) {\n\treturn requiredSchemaKeys(type.params) ?? [];\n}\nfunction createDataTypeLookup(types) {\n\tconst byId = new Map(types.map((type) => [type.id, type]));\n\treturn {\n\t\tget: (id) => byId.get(id),\n\t\thas: (id) => byId.has(id)\n\t};\n}\n/** Collect every data type the composed components register, refusing two declarations of one id. */\nfunction assembleDataTypes(descriptors) {\n\tconst declared = [];\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tconst contributedBy = descriptor.id ?? \"<unknown>\";\n\t\tfor (const type of descriptor.dataTypes ?? []) {\n\t\t\tconst existingOwner = owners.get(type.id);\n\t\t\tif (existingOwner !== void 0) throw runtimeError(\"CONTRACT.DATA_TYPE_DUPLICATE\", `Duplicate data type \"${type.id}\". Component \"${contributedBy}\" conflicts with \"${existingOwner}\". Each data type has exactly one owner across the composed stack.`, {\n\t\t\t\tdataType: type.id,\n\t\t\t\tcontributedBy,\n\t\t\t\towner: existingOwner\n\t\t\t});\n\t\t\towners.set(type.id, contributedBy);\n\t\t\tdeclared.push({\n\t\t\t\ttype,\n\t\t\t\tcontributedBy\n\t\t\t});\n\t\t}\n\t}\n\treturn {\n\t\tlookup: createDataTypeLookup(declared.map((entry) => entry.type)),\n\t\tdeclared\n\t};\n}\n//#endregion\nexport { dataTypeId as a, requiredSchemaKeys as c, dataType as i, schemaKeysAllowing as l, assembleDataTypes as n, objectSchemaKeys as o, createDataTypeLookup as r, requiredParamKeys as s, DATA_TYPE_ID_PATTERN as t };\n\n//# sourceMappingURL=data-type-PGFGVtmU.mjs.map"],"mappings":";;;;;AAKA,MAAM,uBAAuB;;AAE7B,SAAS,WAAW,IAAI;CACvB,IAAI,CAAC,qBAAqB,KAAK,EAAE,GAAG,MAAM,aAAa,iCAAiC,IAAI,GAAG,kJAAkJ,EAAE,GAAG,CAAC;CACvP,OAAO,UAAU,EAAE;AACpB;;AAEA,SAAS,SAAS,IAAI,MAAM;CAC3B,MAAM,QAAQ,CAAC;CACf,KAAK,MAAM,CAAC,QAAQ,SAAS,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,GAAG,MAAM,WAAW,MAAM,KAAK;CAC3F,MAAM,WAAW,KAAK;CACtB,OAAO;EACN,IAAI,WAAW,EAAE;EACjB,GAAG,UAAU,UAAU,KAAK,MAAM;EAClC;EACA,GAAG,aAAa,KAAK,IAAI,CAAC,IAAI,EAAE,UAAU;GACzC,IAAI,SAAS,GAAG,IAAI,UAAU;GAC9B,MAAM,SAAS;EAChB,EAAE;EACF,GAAG,KAAK,oBAAoB,KAAK,IAAI,CAAC,IAAI,EAAE,iBAAiB,KAAK,gBAAgB;CACnF;AACD;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,MAAM,QAAQ,KAAK,KAAK,MAAM,OAAO,SAAS,SAAS,SAAS,OAAO,SAAS,YAAY,OAAO,SAAS,eAAe,SAAS,IAAI;AAChJ;AACA,SAAS,iBAAiB,QAAQ;CACjC,MAAM,cAAc,QAAQ,IAAI,QAAQ,SAAS;CACjD,OAAO,OAAO,gBAAgB,cAAc,YAAY,KAAK,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AAS,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;CACzD,OAAO;EACN,MAAM,OAAO,KAAK,IAAI,EAAE;EACxB,MAAM,OAAO,KAAK,IAAI,EAAE;CACzB;AACD;;AAEA,SAAS,kBAAkB,aAAa;CACvC,MAAM,WAAW,CAAC;CAClB,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,cAAc,aAAa;EACrC,MAAM,gBAAgB,WAAW,MAAM;EACvC,KAAK,MAAM,QAAQ,WAAW,aAAa,CAAC,GAAG;GAC9C,MAAM,gBAAgB,OAAO,IAAI,KAAK,EAAE;GACxC,IAAI,kBAAkB,KAAK,GAAG,MAAM,aAAa,gCAAgC,wBAAwB,KAAK,GAAG,gBAAgB,cAAc,oBAAoB,cAAc,qEAAqE;IACrP,UAAU,KAAK;IACf;IACA,OAAO;GACR,CAAC;GACD,OAAO,IAAI,KAAK,IAAI,aAAa;GACjC,SAAS,KAAK;IACb;IACA;GACD,CAAC;EACF;CACD;CACA,OAAO;EACN,QAAQ,qBAAqB,SAAS,KAAK,UAAU,MAAM,IAAI,CAAC;EAChE;CACD;AACD"}
|
package/dist/{emission-types-Cb8Eot74-y5Ucjh_S.d.mts → emission-types-6eDWkqG7-C0x_EHcS.d.mts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { B as JsonValue, g as ContractModelBase } from "./domain-envelope-CN721GnP-4huRt7Wc.mjs";
|
|
2
2
|
import { t as Contract } from "./contract-types-Mp9HNgyy-zkcDkGuS.mjs";
|
|
3
|
-
import { f as CodecLookup, t as AnyCodecDescriptor } from "./codec-types-
|
|
4
|
-
import { l as TypesImportSpec, t as AggregateDescriptor } from "./types-import-spec-
|
|
5
|
-
//#region ../../../1-framework/1-core/framework-components/dist/emission-types-
|
|
3
|
+
import { f as CodecLookup, t as AnyCodecDescriptor } from "./codec-types-BsE6wCHK-Dpx-WFJ2.mjs";
|
|
4
|
+
import { l as TypesImportSpec, t as AggregateDescriptor } from "./types-import-spec-DkCibt5c-eWXsW3y_.mjs";
|
|
5
|
+
//#region ../../../1-framework/1-core/framework-components/dist/emission-types-6eDWkqG7.d.mts
|
|
6
6
|
//#region src/shared/import-specifier-resolver.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Rewrites one module specifier for the import root a generated file is being
|
|
@@ -39,6 +39,8 @@ declare function resolveRequirementSpecifiers<T extends {
|
|
|
39
39
|
//#region src/control/emission-types.d.ts
|
|
40
40
|
interface GenerateContractTypesOptions {
|
|
41
41
|
readonly queryOperationTypeImports?: ReadonlyArray<TypesImportSpec>;
|
|
42
|
+
/** The type functions that give the output types of the stack's codecs for a column's type parameters (`types.codecTypes.parameterizedOutputTypes`). */
|
|
43
|
+
readonly parameterizedOutputTypeImports?: ReadonlyArray<TypesImportSpec>;
|
|
42
44
|
/**
|
|
43
45
|
* The aggregate overloads the composed stack contributes, and the codec descriptors they are settled against. A family emits result types from these — the same declarations its runtime registry resolves against, so emitted types and decoded results cannot disagree.
|
|
44
46
|
*/
|
|
@@ -73,7 +75,11 @@ interface EmissionSpi {
|
|
|
73
75
|
readonly codecId: string;
|
|
74
76
|
} | undefined;
|
|
75
77
|
getStorageTypeExports?(contract: Contract, codecLookup?: CodecLookup): string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* The family's `FieldOutputTypes` (`side` `'output'`) or `FieldInputTypes` (`'input'`) as an application of its own generic to the emitted contract's shape: it may name `ContractBase`, `CodecTypes`, `ParameterizedOutputTypeFunctions` (the union of the stack's parameterized output type functions) and `FieldTypeOverrides` (each field's type where the codec does not give it: a value set, a value object, a union, or text the codec renders), which the framework declares. Absent, the framework writes each field's type out.
|
|
80
|
+
*/
|
|
81
|
+
fieldTypesExpression?(side: 'output' | 'input'): string;
|
|
76
82
|
}
|
|
77
83
|
//#endregion
|
|
78
84
|
export { resolveRequirementSpecifiers as a, keepInternalSpecifiers as i, GenerateContractTypesOptions as n, ImportSpecifierResolver as r, EmissionSpi as t };
|
|
79
|
-
//# sourceMappingURL=emission-types-
|
|
85
|
+
//# sourceMappingURL=emission-types-6eDWkqG7-C0x_EHcS.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emission-types-6eDWkqG7-C0x_EHcS.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/emission-types-6eDWkqG7.d.mts"],"mappings":";;;;;;;;;;;;;;;;KAcK,2BAA2B;;;;;;cAMlB,wBAAwB;;;;;;;;;;iBAUrB,6BAA6B;WACnC;GACR,uBAAuB,KAAK,UAAU,0BAA0B,MAAM,KAAK;WACnE;;;;UAID;WACC,4BAA4B,cAAc;;WAE1C,iCAAiC,cAAc;;;;WAI/C,uBAAuB,cAAc;WACrC,mBAAmB,cAAc;;;;WAIjC;;UAED;WACC;EACT,oBAAoB,UAAU,UAAU;EACxC,yBAAyB,mBAAmB,OAAO;;;;;;EAMnD,iBAAiB,wBAAwB;EACzC,qBAAqB,UAAU;EAC/B;EACA,mBAAmB,0BAA0B;;;;;;;EAO7C,sBAAsB,mBAAmB,mBAAmB,OAAO,mBAAmB,UAAU;aACrF,wBAAwB;aACxB;;EAEX,uBAAuB,UAAU,UAAU,cAAc;;;;EAIzD,sBAAsB"}
|
|
@@ -83,9 +83,6 @@ type EnumMemberNames<A> = A extends {
|
|
|
83
83
|
readonly names: ReadonlyArray<infer N>;
|
|
84
84
|
} ? N : never;
|
|
85
85
|
type EnumEntriesToAccessors<Enums> = { readonly [K in keyof Enums]: Enums[K] extends EnumEntry ? ContractEnumAccessor<Enums[K]> : never; };
|
|
86
|
-
type BuiltEnumAccessorsOf<TContract> = TContract extends {
|
|
87
|
-
readonly enumAccessors?: infer A;
|
|
88
|
-
} ? Exclude<A, undefined> : Record<never, never>;
|
|
89
86
|
type DomainEnumEntries<TNamespace> = TNamespace extends {
|
|
90
87
|
readonly enum?: infer E;
|
|
91
88
|
} ? unknown extends E ? Record<never, never> : Present<E> : Record<never, never>;
|
|
@@ -94,8 +91,8 @@ type NamespaceEnumEntries<TNamespace> = TNamespace extends {
|
|
|
94
91
|
} ? unknown extends MemberTuples ? DomainEnumEntries<TNamespace> : { readonly [K in keyof Present<MemberTuples>]: {
|
|
95
92
|
readonly members: Present<MemberTuples>[K];
|
|
96
93
|
}; } : DomainEnumEntries<TNamespace>;
|
|
97
|
-
type NamespaceEnumAccessors<TContract extends Contract, NsId extends keyof TContract['domain']['namespaces']> =
|
|
94
|
+
type NamespaceEnumAccessors<TContract extends Contract, NsId extends keyof TContract['domain']['namespaces']> = EnumEntriesToAccessors<NamespaceEnumEntries<TContract['domain']['namespaces'][NsId]>>;
|
|
98
95
|
type NamespacedEnums<TContract extends Contract> = { readonly [Ns in keyof TContract['domain']['namespaces']]: NamespaceEnumAccessors<TContract, Ns>; };
|
|
99
96
|
//#endregion
|
|
100
97
|
export { EnumMemberCodecFor as a, NamespaceEnumAccessors as c, buildNamespacedEnums as d, createEnumAccessor as f, EnumMemberCodec as i, NamespacedEnums as l, EnumAccessor as n, EnumMemberNames as o, EnumEntriesToAccessors as r, EnumValues as s, ContractEnumAccessor as t, buildEnumsMapForNamespace as u };
|
|
101
|
-
//# sourceMappingURL=enum-accessor-
|
|
98
|
+
//# sourceMappingURL=enum-accessor-COww36Lu.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum-accessor-
|
|
1
|
+
{"version":3,"file":"enum-accessor-COww36Lu.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/enum-accessor.d.mts"],"mappings":";;;;;;;UAMU;EACR,WAAW,MAAM;EACjB,WAAW,iBAAiB;;;KAGzB,sBAAsB,oBAAoB;;;;;;UAMrC;;WAEC;WACA;WACA,SAAS,SAAS;EAC3B,IAAI;EACJ,QAAQ;EACR,OAAO;EACP,UAAU;;;;;iBAKK,mBAAmB,cAAc,cAAc,QAAQ,kBAAkB;;;;iBAIzE,0BAA0B;WAChC,YAAY,SAAS;aACnB,OAAO,SAAS,eAAe;;GAEzC,qBAAqB,UAAU,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igrationNotSupported, _ as errorInvalidOutputFormat, a as errorConfigEvaluationFailed, b as errorMigrationCliInvalidConfigArg, c as errorConfigVersionMarkerMissing, d as errorContractValidationFailed, f as errorDatabaseConnectionRequired, g as errorFileNotFound, h as errorFamilyReadMarkerSqlRequired, i as CliStructuredError, l as errorContractConfigMissing, m as errorEnumCodecNotInPackStack, n as CliErrorConflict, o as errorConfigFileNotFound, p as errorDriverRequired, r as CliErrorEnvelope, s as errorConfigValidation, t as CheckedMigrationConfig, u as errorContractMissingExtensions, v as errorJsonFormatNotSupported, w as errorQueryRunnerFactoryRequired, x as errorMigrationCliUnknownFlag, y as errorMigrationCliConfigNotFound } from "./control-C11hV6zc-
|
|
2
|
-
import "./control-
|
|
3
|
-
import { a as errorMarkerRowCorrupt, c as errorSchemaVerificationFailed, d as rethrowMarkerReadError, f as withMarkerReadErrorHandling, i as errorMarkerRequired, l as errorTargetMismatch, n as errorMarkerMissing, o as errorRunnerFailed, r as errorMarkerReadFailed, s as errorRuntime, t as errorHashMismatch, u as parseMarkerRowSafely } from "./execution-
|
|
4
|
-
import { a as errorMigrationPlanNotArray, c as placeholder, i as errorMigrationOperationOptionRemoved, l as unfilledPlaceholderOperation, n as errorMigrationFileMissing, o as errorMigrationTargetMismatch, r as errorMigrationInvalidDefaultExport, s as errorUnfilledPlaceholder, t as errorDataTransformContractMismatch } from "./migration-
|
|
1
|
+
import { C as errorOutputFormatMutex, E as errorUnexpected, S as errorMigrationPlanningFailed, T as errorTargetMigrationNotSupported, _ as errorInvalidOutputFormat, a as errorConfigEvaluationFailed, b as errorMigrationCliInvalidConfigArg, c as errorConfigVersionMarkerMissing, d as errorContractValidationFailed, f as errorDatabaseConnectionRequired, g as errorFileNotFound, h as errorFamilyReadMarkerSqlRequired, i as CliStructuredError, l as errorContractConfigMissing, m as errorEnumCodecNotInPackStack, n as CliErrorConflict, o as errorConfigFileNotFound, p as errorDriverRequired, r as CliErrorEnvelope, s as errorConfigValidation, t as CheckedMigrationConfig, u as errorContractMissingExtensions, v as errorJsonFormatNotSupported, w as errorQueryRunnerFactoryRequired, x as errorMigrationCliUnknownFlag, y as errorMigrationCliConfigNotFound } from "./control-C11hV6zc-DNNpEk4P.mjs";
|
|
2
|
+
import "./control-DEFsiDWR.mjs";
|
|
3
|
+
import { a as errorMarkerRowCorrupt, c as errorSchemaVerificationFailed, d as rethrowMarkerReadError, f as withMarkerReadErrorHandling, i as errorMarkerRequired, l as errorTargetMismatch, n as errorMarkerMissing, o as errorRunnerFailed, r as errorMarkerReadFailed, s as errorRuntime, t as errorHashMismatch, u as parseMarkerRowSafely } from "./execution-Cxh39jc7.mjs";
|
|
4
|
+
import { a as errorMigrationPlanNotArray, c as placeholder, i as errorMigrationOperationOptionRemoved, l as unfilledPlaceholderOperation, n as errorMigrationFileMissing, o as errorMigrationTargetMismatch, r as errorMigrationInvalidDefaultExport, s as errorUnfilledPlaceholder, t as errorDataTransformContractMismatch } from "./migration-DpDTUseh.mjs";
|
|
5
5
|
export { type CheckedMigrationConfig, type CliErrorConflict, type CliErrorEnvelope, CliStructuredError, errorConfigEvaluationFailed, errorConfigFileNotFound, errorConfigValidation, errorConfigVersionMarkerMissing, errorContractConfigMissing, errorContractMissingExtensions, errorContractValidationFailed, errorDataTransformContractMismatch, errorDatabaseConnectionRequired, errorDriverRequired, errorEnumCodecNotInPackStack, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorHashMismatch, errorInvalidOutputFormat, errorJsonFormatNotSupported, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorMigrationCliConfigNotFound, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationOperationOptionRemoved, errorMigrationPlanNotArray, errorMigrationPlanningFailed, errorMigrationTargetMismatch, errorOutputFormatMutex, errorQueryRunnerFactoryRequired, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMigrationNotSupported, errorTargetMismatch, errorUnexpected, errorUnfilledPlaceholder, parseMarkerRowSafely, placeholder, rethrowMarkerReadError, unfilledPlaceholderOperation, withMarkerReadErrorHandling };
|
package/dist/errors.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as errorUnexpected, S as errorTargetMigrationNotSupported, _ as errorMigrationCliInvalidConfigArg, a as errorConfigVersionMarkerMissing, b as errorOutputFormatMutex, c as errorContractValidationFailed, d as errorEnumCodecNotInPackStack, f as errorFamilyReadMarkerSqlRequired, g as errorMigrationCliConfigNotFound, h as errorJsonFormatNotSupported, i as errorConfigValidation, l as errorDatabaseConnectionRequired, m as errorInvalidOutputFormat, n as errorConfigEvaluationFailed, o as errorContractConfigMissing, p as errorFileNotFound, r as errorConfigFileNotFound, s as errorContractMissingExtensions, t as CliStructuredError, u as errorDriverRequired, v as errorMigrationCliUnknownFlag, x as errorQueryRunnerFactoryRequired, y as errorMigrationPlanningFailed } from "./control-CVGlbj6c-
|
|
2
|
-
import { a as errorMarkerRowCorrupt, c as errorSchemaVerificationFailed, d as rethrowMarkerReadError, f as withMarkerReadErrorHandling, i as errorMarkerRequired, l as errorTargetMismatch, n as errorMarkerMissing, o as errorRunnerFailed, r as errorMarkerReadFailed, s as errorRuntime, t as errorHashMismatch, u as parseMarkerRowSafely } from "./execution-
|
|
3
|
-
import { a as errorMigrationPlanNotArray, c as placeholder, i as errorMigrationOperationOptionRemoved, l as unfilledPlaceholderOperation, n as errorMigrationFileMissing, o as errorMigrationTargetMismatch, r as errorMigrationInvalidDefaultExport, s as errorUnfilledPlaceholder, t as errorDataTransformContractMismatch } from "./migration-
|
|
1
|
+
import { C as errorUnexpected, S as errorTargetMigrationNotSupported, _ as errorMigrationCliInvalidConfigArg, a as errorConfigVersionMarkerMissing, b as errorOutputFormatMutex, c as errorContractValidationFailed, d as errorEnumCodecNotInPackStack, f as errorFamilyReadMarkerSqlRequired, g as errorMigrationCliConfigNotFound, h as errorJsonFormatNotSupported, i as errorConfigValidation, l as errorDatabaseConnectionRequired, m as errorInvalidOutputFormat, n as errorConfigEvaluationFailed, o as errorContractConfigMissing, p as errorFileNotFound, r as errorConfigFileNotFound, s as errorContractMissingExtensions, t as CliStructuredError, u as errorDriverRequired, v as errorMigrationCliUnknownFlag, x as errorQueryRunnerFactoryRequired, y as errorMigrationPlanningFailed } from "./control-CVGlbj6c-DGRy_Odg.mjs";
|
|
2
|
+
import { a as errorMarkerRowCorrupt, c as errorSchemaVerificationFailed, d as rethrowMarkerReadError, f as withMarkerReadErrorHandling, i as errorMarkerRequired, l as errorTargetMismatch, n as errorMarkerMissing, o as errorRunnerFailed, r as errorMarkerReadFailed, s as errorRuntime, t as errorHashMismatch, u as parseMarkerRowSafely } from "./execution-BIqac9cC.mjs";
|
|
3
|
+
import { a as errorMigrationPlanNotArray, c as placeholder, i as errorMigrationOperationOptionRemoved, l as unfilledPlaceholderOperation, n as errorMigrationFileMissing, o as errorMigrationTargetMismatch, r as errorMigrationInvalidDefaultExport, s as errorUnfilledPlaceholder, t as errorDataTransformContractMismatch } from "./migration-BdFXgvxm.mjs";
|
|
4
4
|
export { CliStructuredError, errorConfigEvaluationFailed, errorConfigFileNotFound, errorConfigValidation, errorConfigVersionMarkerMissing, errorContractConfigMissing, errorContractMissingExtensions, errorContractValidationFailed, errorDataTransformContractMismatch, errorDatabaseConnectionRequired, errorDriverRequired, errorEnumCodecNotInPackStack, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorHashMismatch, errorInvalidOutputFormat, errorJsonFormatNotSupported, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorMigrationCliConfigNotFound, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationOperationOptionRemoved, errorMigrationPlanNotArray, errorMigrationPlanningFailed, errorMigrationTargetMismatch, errorOutputFormatMutex, errorQueryRunnerFactoryRequired, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMigrationNotSupported, errorTargetMismatch, errorUnexpected, errorUnfilledPlaceholder, parseMarkerRowSafely, placeholder, rethrowMarkerReadError, unfilledPlaceholderOperation, withMarkerReadErrorHandling };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as errorOutputFormatMutex, E as errorUnexpected, S as errorMigrationPlanningFailed, T as errorTargetMigrationNotSupported, _ as errorInvalidOutputFormat, a as errorConfigEvaluationFailed, b as errorMigrationCliInvalidConfigArg, c as errorConfigVersionMarkerMissing, d as errorContractValidationFailed, f as errorDatabaseConnectionRequired, g as errorFileNotFound, h as errorFamilyReadMarkerSqlRequired, i as CliStructuredError, l as errorContractConfigMissing, m as errorEnumCodecNotInPackStack, n as CliErrorConflict, o as errorConfigFileNotFound, p as errorDriverRequired, r as CliErrorEnvelope, s as errorConfigValidation, t as CheckedMigrationConfig, u as errorContractMissingExtensions, v as errorJsonFormatNotSupported, w as errorQueryRunnerFactoryRequired, x as errorMigrationCliUnknownFlag, y as errorMigrationCliConfigNotFound } from "./control-C11hV6zc-
|
|
2
|
-
import "./control-
|
|
1
|
+
import { C as errorOutputFormatMutex, E as errorUnexpected, S as errorMigrationPlanningFailed, T as errorTargetMigrationNotSupported, _ as errorInvalidOutputFormat, a as errorConfigEvaluationFailed, b as errorMigrationCliInvalidConfigArg, c as errorConfigVersionMarkerMissing, d as errorContractValidationFailed, f as errorDatabaseConnectionRequired, g as errorFileNotFound, h as errorFamilyReadMarkerSqlRequired, i as CliStructuredError, l as errorContractConfigMissing, m as errorEnumCodecNotInPackStack, n as CliErrorConflict, o as errorConfigFileNotFound, p as errorDriverRequired, r as CliErrorEnvelope, s as errorConfigValidation, t as CheckedMigrationConfig, u as errorContractMissingExtensions, v as errorJsonFormatNotSupported, w as errorQueryRunnerFactoryRequired, x as errorMigrationCliUnknownFlag, y as errorMigrationCliConfigNotFound } from "./control-C11hV6zc-DNNpEk4P.mjs";
|
|
2
|
+
import "./control-DEFsiDWR.mjs";
|
|
3
3
|
export { type CheckedMigrationConfig, type CliErrorConflict, type CliErrorEnvelope, CliStructuredError, errorConfigEvaluationFailed, errorConfigFileNotFound, errorConfigValidation, errorConfigVersionMarkerMissing, errorContractConfigMissing, errorContractMissingExtensions, errorContractValidationFailed, errorDatabaseConnectionRequired, errorDriverRequired, errorEnumCodecNotInPackStack, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorInvalidOutputFormat, errorJsonFormatNotSupported, errorMigrationCliConfigNotFound, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag, errorMigrationPlanningFailed, errorOutputFormatMutex, errorQueryRunnerFactoryRequired, errorTargetMigrationNotSupported, errorUnexpected };
|
package/dist/errors__control.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as errorUnexpected, S as errorTargetMigrationNotSupported, _ as errorMigrationCliInvalidConfigArg, a as errorConfigVersionMarkerMissing, b as errorOutputFormatMutex, c as errorContractValidationFailed, d as errorEnumCodecNotInPackStack, f as errorFamilyReadMarkerSqlRequired, g as errorMigrationCliConfigNotFound, h as errorJsonFormatNotSupported, i as errorConfigValidation, l as errorDatabaseConnectionRequired, m as errorInvalidOutputFormat, n as errorConfigEvaluationFailed, o as errorContractConfigMissing, p as errorFileNotFound, r as errorConfigFileNotFound, s as errorContractMissingExtensions, t as CliStructuredError, u as errorDriverRequired, v as errorMigrationCliUnknownFlag, x as errorQueryRunnerFactoryRequired, y as errorMigrationPlanningFailed } from "./control-CVGlbj6c-
|
|
1
|
+
import { C as errorUnexpected, S as errorTargetMigrationNotSupported, _ as errorMigrationCliInvalidConfigArg, a as errorConfigVersionMarkerMissing, b as errorOutputFormatMutex, c as errorContractValidationFailed, d as errorEnumCodecNotInPackStack, f as errorFamilyReadMarkerSqlRequired, g as errorMigrationCliConfigNotFound, h as errorJsonFormatNotSupported, i as errorConfigValidation, l as errorDatabaseConnectionRequired, m as errorInvalidOutputFormat, n as errorConfigEvaluationFailed, o as errorContractConfigMissing, p as errorFileNotFound, r as errorConfigFileNotFound, s as errorContractMissingExtensions, t as CliStructuredError, u as errorDriverRequired, v as errorMigrationCliUnknownFlag, x as errorQueryRunnerFactoryRequired, y as errorMigrationPlanningFailed } from "./control-CVGlbj6c-DGRy_Odg.mjs";
|
|
2
2
|
export { CliStructuredError, errorConfigEvaluationFailed, errorConfigFileNotFound, errorConfigValidation, errorConfigVersionMarkerMissing, errorContractConfigMissing, errorContractMissingExtensions, errorContractValidationFailed, errorDatabaseConnectionRequired, errorDriverRequired, errorEnumCodecNotInPackStack, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorInvalidOutputFormat, errorJsonFormatNotSupported, errorMigrationCliConfigNotFound, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag, errorMigrationPlanningFailed, errorOutputFormatMutex, errorQueryRunnerFactoryRequired, errorTargetMigrationNotSupported, errorUnexpected };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as errorMarkerRowCorrupt, c as errorSchemaVerificationFailed, d as rethrowMarkerReadError, f as withMarkerReadErrorHandling, i as errorMarkerRequired, l as errorTargetMismatch, n as errorMarkerMissing, o as errorRunnerFailed, r as errorMarkerReadFailed, s as errorRuntime, t as errorHashMismatch, u as parseMarkerRowSafely } from "./execution-
|
|
1
|
+
import { a as errorMarkerRowCorrupt, c as errorSchemaVerificationFailed, d as rethrowMarkerReadError, f as withMarkerReadErrorHandling, i as errorMarkerRequired, l as errorTargetMismatch, n as errorMarkerMissing, o as errorRunnerFailed, r as errorMarkerReadFailed, s as errorRuntime, t as errorHashMismatch, u as parseMarkerRowSafely } from "./execution-Cxh39jc7.mjs";
|
|
2
2
|
export { errorHashMismatch, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMismatch, parseMarkerRowSafely, rethrowMarkerReadError, withMarkerReadErrorHandling };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as errorMarkerRowCorrupt, c as errorSchemaVerificationFailed, d as rethrowMarkerReadError, f as withMarkerReadErrorHandling, i as errorMarkerRequired, l as errorTargetMismatch, n as errorMarkerMissing, o as errorRunnerFailed, r as errorMarkerReadFailed, s as errorRuntime, t as errorHashMismatch, u as parseMarkerRowSafely } from "./execution-
|
|
1
|
+
import { a as errorMarkerRowCorrupt, c as errorSchemaVerificationFailed, d as rethrowMarkerReadError, f as withMarkerReadErrorHandling, i as errorMarkerRequired, l as errorTargetMismatch, n as errorMarkerMissing, o as errorRunnerFailed, r as errorMarkerReadFailed, s as errorRuntime, t as errorHashMismatch, u as parseMarkerRowSafely } from "./execution-BIqac9cC.mjs";
|
|
2
2
|
export { errorHashMismatch, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMismatch, parseMarkerRowSafely, rethrowMarkerReadError, withMarkerReadErrorHandling };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as errorMigrationPlanNotArray, c as placeholder, i as errorMigrationOperationOptionRemoved, l as unfilledPlaceholderOperation, n as errorMigrationFileMissing, o as errorMigrationTargetMismatch, r as errorMigrationInvalidDefaultExport, s as errorUnfilledPlaceholder, t as errorDataTransformContractMismatch } from "./migration-
|
|
1
|
+
import { a as errorMigrationPlanNotArray, c as placeholder, i as errorMigrationOperationOptionRemoved, l as unfilledPlaceholderOperation, n as errorMigrationFileMissing, o as errorMigrationTargetMismatch, r as errorMigrationInvalidDefaultExport, s as errorUnfilledPlaceholder, t as errorDataTransformContractMismatch } from "./migration-DpDTUseh.mjs";
|
|
2
2
|
export { errorDataTransformContractMismatch, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationOperationOptionRemoved, errorMigrationPlanNotArray, errorMigrationTargetMismatch, errorUnfilledPlaceholder, placeholder, unfilledPlaceholderOperation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as errorMigrationPlanNotArray, c as placeholder, i as errorMigrationOperationOptionRemoved, l as unfilledPlaceholderOperation, n as errorMigrationFileMissing, o as errorMigrationTargetMismatch, r as errorMigrationInvalidDefaultExport, s as errorUnfilledPlaceholder, t as errorDataTransformContractMismatch } from "./migration-
|
|
1
|
+
import { a as errorMigrationPlanNotArray, c as placeholder, i as errorMigrationOperationOptionRemoved, l as unfilledPlaceholderOperation, n as errorMigrationFileMissing, o as errorMigrationTargetMismatch, r as errorMigrationInvalidDefaultExport, s as errorUnfilledPlaceholder, t as errorDataTransformContractMismatch } from "./migration-BdFXgvxm.mjs";
|
|
2
2
|
export { errorDataTransformContractMismatch, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationOperationOptionRemoved, errorMigrationPlanNotArray, errorMigrationTargetMismatch, errorUnfilledPlaceholder, placeholder, unfilledPlaceholderOperation };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, y as TargetDescriptor } from "./framework-components-
|
|
1
|
+
import { b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, y as TargetDescriptor } from "./framework-components-DhrgvP2z-B_XzMVzi.mjs";
|
|
2
2
|
//#region ../../../1-framework/1-core/framework-components/dist/execution.d.mts
|
|
3
3
|
//#region src/execution/execution-instances.d.ts
|
|
4
4
|
interface RuntimeFamilyInstance<TFamilyId extends string> extends FamilyInstance<TFamilyId> {}
|
|
@@ -76,4 +76,4 @@ declare function assertRuntimeContractRequirementsSatisfied<TFamilyId extends st
|
|
|
76
76
|
}): void;
|
|
77
77
|
//#endregion
|
|
78
78
|
export { RuntimeDriverDescriptor as a, RuntimeExtensionInstance as c, RuntimeTargetDescriptor as d, RuntimeTargetInstance as f, instantiateExecutionStack as h, RuntimeAdapterInstance as i, RuntimeFamilyDescriptor as l, createExecutionStack as m, ExecutionStackInstance as n, RuntimeDriverInstance as o, assertRuntimeContractRequirementsSatisfied as p, RuntimeAdapterDescriptor as r, RuntimeExtensionDescriptor as s, ExecutionStack as t, RuntimeFamilyInstance as u };
|
|
79
|
-
//# sourceMappingURL=execution-
|
|
79
|
+
//# sourceMappingURL=execution-5GwMfE3u.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-
|
|
1
|
+
{"version":3,"file":"execution-5GwMfE3u.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/execution.d.mts"],"mappings":";;;UAEU,sBAAsB,kCAAkC,eAAe;UACvE,sBAAsB,0BAA0B,kCAAkC,eAAe,WAAW;UAC5G,uBAAuB,0BAA0B,kCAAkC,gBAAgB,WAAW;UAC9G,sBAAsB,0BAA0B,kCAAkC,eAAe,WAAW;UAC5G,yBAAyB,0BAA0B,kCAAkC,kBAAkB,WAAW;;;UAGlH,eAAe,0BAA0B,0BAA0B,yBAAyB,uBAAuB,WAAW,aAAa,uBAAuB,WAAW,YAAY,wBAAwB,sBAAsB,WAAW,aAAa,sBAAsB,WAAW,YAAY,2BAA2B,yBAAyB,WAAW,aAAa,yBAAyB,WAAW;WAC3Z,QAAQ,wBAAwB,WAAW;WAC3C,SAAS,yBAAyB,WAAW,WAAW;WACxD,QAAQ,wBAAwB,WAAW,oBAAoB;WAC/D,qBAAqB,2BAA2B,WAAW,WAAW;;UAEvE,uBAAuB,0BAA0B,0BAA0B,yBAAyB,uBAAuB,WAAW,aAAa,uBAAuB,WAAW,YAAY,wBAAwB,sBAAsB,WAAW,aAAa,sBAAsB,WAAW,YAAY,2BAA2B,yBAAyB,WAAW,aAAa,yBAAyB,WAAW;WACna,OAAO,eAAe,WAAW,WAAW,kBAAkB,iBAAiB;WAC/E,QAAQ,sBAAsB,WAAW;WACzC,SAAS;WACT,QAAQ;W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AAW,aAAa,sBAAsB,WAAW,oBAAoB,iBAAiB,WAAW;EAClQ,OAAO,UAAU,iBAAiB;;UAE1B,2BAA2B,0BAA0B,0BAA0B,2BAA2B,yBAAyB,WAAW,aAAa,yBAAyB,WAAW,oBAAoB,oBAAoB,WAAW;EAC1P,UAAU;;;;iBAIK,2CAA2C,0BAA0B,4BAA4B,UAAU,QAAQ,QAAQ,SAAS;WAC1I;aACE;aACA,aAAa;;WAEf,QAAQ,wBAAwB;WAChC,QAAQ,wBAAwB,WAAW;WAC3C,SAAS,yBAAyB,WAAW;WAC7C,qBAAqB,2BAA2B,WAAW"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
2
2
|
import { i as isStructuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
3
|
-
import { t as CliStructuredError } from "./control-CVGlbj6c-
|
|
3
|
+
import { t as CliStructuredError } from "./control-CVGlbj6c-DGRy_Odg.mjs";
|
|
4
4
|
//#region ../../../1-framework/1-core/errors/dist/execution.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Contract marker not found in database.
|
|
@@ -193,4 +193,4 @@ function errorRuntime(code, summary, options) {
|
|
|
193
193
|
//#endregion
|
|
194
194
|
export { errorMarkerRowCorrupt as a, errorSchemaVerificationFailed as c, rethrowMarkerReadError as d, withMarkerReadErrorHandling as f, errorMarkerRequired as i, errorTargetMismatch as l, errorMarkerMissing as n, errorRunnerFailed as o, errorMarkerReadFailed as r, errorRuntime as s, errorHashMismatch as t, parseMarkerRowSafely as u };
|
|
195
195
|
|
|
196
|
-
//# sourceMappingURL=execution-
|
|
196
|
+
//# sourceMappingURL=execution-BIqac9cC.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-Ct_Zphl7.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/execution.mjs"],"sourcesContent":["import { t as CliStructuredError } from \"./control-CVGlbj6c.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\n//#region src/execution.ts\n/**\n* Contract marker not found in database.\n*/\nfunction errorMarkerMissing(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_MISSING\", \"Database not signed\", {\n\t\twhy: options?.why ?? \"No database signature (marker) found\",\n\t\tfix: \"Run `{bin} db sign --db <url>` to sign the database\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Sign the database\",\n\t\t\tcommand: \"{bin} db sign --db <url>\"\n\t\t}]\n\t});\n}\n/**\n* Contract hash does not match database marker.\n*/\nfunction errorHashMismatch(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_MISMATCH\", \"Hash mismatch\", {\n\t\twhy: options?.why ?? \"Contract hash does not match database marker\",\n\t\tfix: \"Migrate database or re-sign if intentional\",\n\t\t...options?.expected !== void 0 || options?.actual !== void 0 ? { meta: {\n\t\t\t...ifDefined(\"expected\", options?.expected),\n\t\t\t...ifDefined(\"actual\", options?.actual)\n\t\t} } : {}\n\t});\n}\n/**\n* Contract target does not match config target.\n*/\nfunction errorTargetMismatch(expected, actual, options) {\n\treturn new CliStructuredError(\"CONTRACT.TARGET_MISMATCH\", \"Target mismatch\", {\n\t\twhy: options?.why ?? `Contract target does not match config target (expected: ${expected}, actual: ${actual})`,\n\t\tfix: \"Align contract target and config target\",\n\t\tmeta: {\n\t\t\texpected,\n\t\t\tactual\n\t\t}\n\t});\n}\n/**\n* Marker row exists but column values fail schema validation.\n*/\nfunction errorMarkerRowCorrupt(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_ROW_CORRUPT\", \"Marker row is corrupt or incompatible\", {\n\t\twhy: options.why,\n\t\tfix: `The ${options.markerLocation} row for space \"${options.space}\" contains invalid data. Delete the row, then run \\`{bin} db sign --db <url>\\` to write a fresh marker.`,\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Write a fresh marker\",\n\t\t\tcommand: \"{bin} db sign --db <url>\",\n\t\t\treason: `Delete the invalid ${options.markerLocation} row for space \"${options.space}\" first — this command then writes a valid one.`\n\t\t}],\n\t\tmeta: { space: options.space },\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\n/**\n* Driver-level failure while reading the contract marker table.\n*/\nfunction errorMarkerReadFailed(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_READ_FAILED\", \"Database error while reading contract marker\", {\n\t\twhy: options.why,\n\t\tfix: `Could not read marker at ${options.markerLocation} for space \"${options.space}\". Verify read permissions, connectivity, and locks, then retry.`,\n\t\tmeta: { space: options.space },\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\nfunction isDriverError(err) {\n\treturn isStructuredError(err) && err.code.startsWith(\"DRIVER.\");\n}\nfunction isMarkerRowParseError(err) {\n\treturn err instanceof Error && (err.message.startsWith(\"Invalid contract marker row:\") || err.message.startsWith(\"Invalid marker doc on\"));\n}\nfunction isLegacyMarkerShapeReadError(message) {\n\tconst normalized = message.toLowerCase();\n\treturn normalized.includes(\"column \\\"space\\\" does not exist\") || normalized.includes(\"no such column: space\");\n}\nfunction errorLegacyMarkerShape(options) {\n\treturn errorRunnerFailed(`Legacy marker-table shape detected on ${options.markerLocation} (no \\`space\\` column). Prisma 8 is in pre-1.0; the previous transitional auto-migration to the per-space-row schema has been removed. Drop \\`${options.markerLocation}\\` and re-run \\`{bin} db init\\` to reinitialise from a clean baseline.`, {\n\t\twhy: options.why,\n\t\tfix: \"Legacy marker-table shape detected. Drop `prisma_contract.marker` (Postgres) or `_prisma_marker` (SQLite) and re-run `{bin} db init` to recreate it with the current per-space schema.\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Reinitialise the marker table from a clean baseline\",\n\t\t\tcommand: \"{bin} db init\",\n\t\t\treason: `Drop \\`${options.markerLocation}\\` first — it has the legacy shape (no \\`space\\` column) and this command recreates it with the current per-space schema.`\n\t\t}],\n\t\tmeta: { runnerErrorCode: \"MIGRATION.LEGACY_MARKER_SHAPE\" },\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\nfunction rethrowMarkerReadError(err, context) {\n\tif (CliStructuredError.is(err) || isDriverError(err)) throw err;\n\tif (isMarkerRowParseError(err)) throw errorMarkerRowCorrupt({\n\t\twhy: err.message,\n\t\tspace: context.space,\n\t\tmarkerLocation: context.markerLocation,\n\t\tcause: err\n\t});\n\tconst message = err instanceof Error ? err.message : String(err);\n\tif (isLegacyMarkerShapeReadError(message)) throw errorLegacyMarkerShape({\n\t\twhy: message,\n\t\tmarkerLocation: context.markerLocation,\n\t\tcause: err\n\t});\n\tthrow errorMarkerReadFailed({\n\t\twhy: message,\n\t\tspace: context.space,\n\t\tmarkerLocation: context.markerLocation,\n\t\tcause: err\n\t});\n}\nasync function withMarkerReadErrorHandling(operation, context) {\n\ttry {\n\t\treturn await operation();\n\t} catch (err) {\n\t\trethrowMarkerReadError(err, context);\n\t}\n}\nfunction parseMarkerRowSafely(row, parse, context) {\n\ttry {\n\t\treturn parse(row);\n\t} catch (err) {\n\t\trethrowMarkerReadError(err, context);\n\t}\n}\n/**\n* Database marker is required but not found.\n* Used by commands that require a pre-existing marker as a precondition.\n*/\nfunction errorMarkerRequired(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_REQUIRED\", \"Database must be signed first\", {\n\t\twhy: options?.why ?? \"No database signature (marker) found\",\n\t\tfix: options?.fix ?? \"Run `{bin} db init` first to sign the database\",\n\t\tnextActions: options?.nextActions ?? [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Sign the database\",\n\t\t\tcommand: \"{bin} db init\"\n\t\t}]\n\t});\n}\n/**\n* Schema verification found mismatches between the database and the contract.\n* The full verification result is preserved in `meta.verificationResult`.\n*/\nfunction errorSchemaVerificationFailed(options) {\n\treturn new CliStructuredError(\"CONTRACT.SCHEMA_VERIFICATION_FAILED\", options.summary, {\n\t\twhy: \"Database schema does not satisfy the contract\",\n\t\tfix: \"Run `{bin} db update` to reconcile, or adjust your contract to match the database\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Reconcile the database\",\n\t\t\tcommand: \"{bin} db update\"\n\t\t}, {\n\t\t\tkind: \"edit-file\",\n\t\t\tlabel: \"Adjust your contract to match the database\"\n\t\t}],\n\t\tmeta: {\n\t\t\tverificationResult: options.verificationResult,\n\t\t\t...ifDefined(\"issues\", options.issues)\n\t\t}\n\t});\n}\n/**\n* Migration runner failed during execution.\n*/\nfunction errorRunnerFailed(summary, options) {\n\treturn new CliStructuredError(\"MIGRATION.RUNNER_FAILED\", summary, {\n\t\twhy: options?.why ?? \"Migration runner failed\",\n\t\tfix: options?.fix ?? \"Inspect the reported conflict and reconcile schema drift\",\n\t\t...ifDefined(\"nextActions\", options?.nextActions),\n\t\t...options?.meta ? { meta: options.meta } : {},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/**\n* Generic runtime error carrying a caller-provided dotted code.\n*/\nfunction errorRuntime(code, summary, options) {\n\treturn new CliStructuredError(code, summary, {\n\t\t...ifDefined(\"why\", options?.why),\n\t\t...ifDefined(\"fix\", options?.fix),\n\t\t...ifDefined(\"diagnostics\", options?.diagnostics),\n\t\t...ifDefined(\"meta\", options?.meta),\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n//#endregion\nexport { errorHashMismatch, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMismatch, parseMarkerRowSafely, rethrowMarkerReadError, withMarkerReadErrorHandling };\n\n//# sourceMappingURL=execution.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,mBAAmB,SAAS;CACpC,OAAO,IAAI,mBAAmB,2BAA2B,uBAAuB;EAC/E,KAAK,SAAS,OAAO;EACrB,KAAK;EACL,aAAa,CAAC;GACb,MAAM;GACN,OAAO;GACP,SAAS;EACV,CAAC;C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;;AAKA,SAAS,oBAAoB,SAAS;CACrC,OAAO,IAAI,mBAAmB,4BAA4B,iCAAiC;EAC1F,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACrB,aAAa,SAAS,eAAe,CAAC;GACrC,MAAM;GACN,OAAO;GACP,SAAS;EACV,CAAC;CACF,CAAC;AACF;;;;;AAKA,SAAS,8BAA8B,SAAS;CAC/C,OAAO,IAAI,mBAAmB,uCAAuC,QAAQ,SAAS;EACrF,KAAK;EACL,KAAK;EACL,aAAa,CAAC;GACb,MAAM;GACN,OAAO;GACP,SAAS;EACV,GAAG;GACF,MAAM;GACN,OAAO;EACR,CAAC;EACD,MAAM;GACL,oBAAoB,QAAQ;GAC5B,GAAG,UAAU,UAAU,QAAQ,MAAM;EACtC;CACD,CAAC;AACF;;;;AAIA,SAAS,kBAAkB,SAAS,SAAS;CAC5C,OAAO,IAAI,mBAAmB,2BAA2B,SAAS;EACjE,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACrB,GAAG,UAAU,eAAe,SAAS,WAAW;EAChD,GAAG,SAAS,OAAO,EAAE,MAAM,QAAQ,KAAK,IAAI,CAAC;EAC7C,GAAG,UAAU,SAAS,SAAS,KAAK;CACrC,CAAC;AACF;;;;AAIA,SAAS,aAAa,MAAM,SAAS,SAAS;CAC7C,OAAO,IAAI,mBAAmB,MAAM,SAAS;EAC5C,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,eAAe,SAAS,WAAW;EAChD,GAAG,UAAU,QAAQ,SAAS,IAAI;EAClC,GAAG,UAAU,SAAS,SAAS,KAAK;CACrC,CAAC;AACF"}
|
|
1
|
+
{"version":3,"file":"execution-BIqac9cC.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/execution.mjs"],"sourcesContent":["import { t as CliStructuredError } from \"./control-CVGlbj6c.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\n//#region src/execution.ts\n/**\n* Contract marker not found in database.\n*/\nfunction errorMarkerMissing(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_MISSING\", \"Database not signed\", {\n\t\twhy: options?.why ?? \"No database signature (marker) found\",\n\t\tfix: \"Run `{bin} db sign --db <url>` to sign the database\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Sign the database\",\n\t\t\tcommand: \"{bin} db sign --db <url>\"\n\t\t}]\n\t});\n}\n/**\n* Contract hash does not match database marker.\n*/\nfunction errorHashMismatch(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_MISMATCH\", \"Hash mismatch\", {\n\t\twhy: options?.why ?? \"Contract hash does not match database marker\",\n\t\tfix: \"Migrate database or re-sign if intentional\",\n\t\t...options?.expected !== void 0 || options?.actual !== void 0 ? { meta: {\n\t\t\t...ifDefined(\"expected\", options?.expected),\n\t\t\t...ifDefined(\"actual\", options?.actual)\n\t\t} } : {}\n\t});\n}\n/**\n* Contract target does not match config target.\n*/\nfunction errorTargetMismatch(expected, actual, options) {\n\treturn new CliStructuredError(\"CONTRACT.TARGET_MISMATCH\", \"Target mismatch\", {\n\t\twhy: options?.why ?? `Contract target does not match config target (expected: ${expected}, actual: ${actual})`,\n\t\tfix: \"Align contract target and config target\",\n\t\tmeta: {\n\t\t\texpected,\n\t\t\tactual\n\t\t}\n\t});\n}\n/**\n* Marker row exists but column values fail schema validation.\n*/\nfunction errorMarkerRowCorrupt(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_ROW_CORRUPT\", \"Marker row is corrupt or incompatible\", {\n\t\twhy: options.why,\n\t\tfix: `The ${options.markerLocation} row for space \"${options.space}\" contains invalid data. Delete the row, then run \\`{bin} db sign --db <url>\\` to write a fresh marker.`,\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Write a fresh marker\",\n\t\t\tcommand: \"{bin} db sign --db <url>\",\n\t\t\treason: `Delete the invalid ${options.markerLocation} row for space \"${options.space}\" first — this command then writes a valid one.`\n\t\t}],\n\t\tmeta: { space: options.space },\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\n/**\n* Driver-level failure while reading the contract marker table.\n*/\nfunction errorMarkerReadFailed(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_READ_FAILED\", \"Database error while reading contract marker\", {\n\t\twhy: options.why,\n\t\tfix: `Could not read marker at ${options.markerLocation} for space \"${options.space}\". Verify read permissions, connectivity, and locks, then retry.`,\n\t\tmeta: { space: options.space },\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\nfunction isDriverError(err) {\n\treturn isStructuredError(err) && err.code.startsWith(\"DRIVER.\");\n}\nfunction isMarkerRowParseError(err) {\n\treturn err instanceof Error && (err.message.startsWith(\"Invalid contract marker row:\") || err.message.startsWith(\"Invalid marker doc on\"));\n}\nfunction isLegacyMarkerShapeReadError(message) {\n\tconst normalized = message.toLowerCase();\n\treturn normalized.includes(\"column \\\"space\\\" does not exist\") || normalized.includes(\"no such column: space\");\n}\nfunction errorLegacyMarkerShape(options) {\n\treturn errorRunnerFailed(`Legacy marker-table shape detected on ${options.markerLocation} (no \\`space\\` column). Prisma 8 is in pre-1.0; the previous transitional auto-migration to the per-space-row schema has been removed. Drop \\`${options.markerLocation}\\` and re-run \\`{bin} db init\\` to reinitialise from a clean baseline.`, {\n\t\twhy: options.why,\n\t\tfix: \"Legacy marker-table shape detected. Drop `prisma_contract.marker` (Postgres) or `_prisma_marker` (SQLite) and re-run `{bin} db init` to recreate it with the current per-space schema.\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Reinitialise the marker table from a clean baseline\",\n\t\t\tcommand: \"{bin} db init\",\n\t\t\treason: `Drop \\`${options.markerLocation}\\` first — it has the legacy shape (no \\`space\\` column) and this command recreates it with the current per-space schema.`\n\t\t}],\n\t\tmeta: { runnerErrorCode: \"MIGRATION.LEGACY_MARKER_SHAPE\" },\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\nfunction rethrowMarkerReadError(err, context) {\n\tif (CliStructuredError.is(err) || isDriverError(err)) throw err;\n\tif (isMarkerRowParseError(err)) throw errorMarkerRowCorrupt({\n\t\twhy: err.message,\n\t\tspace: context.space,\n\t\tmarkerLocation: context.markerLocation,\n\t\tcause: err\n\t});\n\tconst message = err instanceof Error ? err.message : String(err);\n\tif (isLegacyMarkerShapeReadError(message)) throw errorLegacyMarkerShape({\n\t\twhy: message,\n\t\tmarkerLocation: context.markerLocation,\n\t\tcause: err\n\t});\n\tthrow errorMarkerReadFailed({\n\t\twhy: message,\n\t\tspace: context.space,\n\t\tmarkerLocation: context.markerLocation,\n\t\tcause: err\n\t});\n}\nasync function withMarkerReadErrorHandling(operation, context) {\n\ttry {\n\t\treturn await operation();\n\t} catch (err) {\n\t\trethrowMarkerReadError(err, context);\n\t}\n}\nfunction parseMarkerRowSafely(row, parse, context) {\n\ttry {\n\t\treturn parse(row);\n\t} catch (err) {\n\t\trethrowMarkerReadError(err, context);\n\t}\n}\n/**\n* Database marker is required but not found.\n* Used by commands that require a pre-existing marker as a precondition.\n*/\nfunction errorMarkerRequired(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_REQUIRED\", \"Database must be signed first\", {\n\t\twhy: options?.why ?? \"No database signature (marker) found\",\n\t\tfix: options?.fix ?? \"Run `{bin} db init` first to sign the database\",\n\t\tnextActions: options?.nextActions ?? [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Sign the database\",\n\t\t\tcommand: \"{bin} db init\"\n\t\t}]\n\t});\n}\n/**\n* Schema verification found mismatches between the database and the contract.\n* The full verification result is preserved in `meta.verificationResult`.\n*/\nfunction errorSchemaVerificationFailed(options) {\n\treturn new CliStructuredError(\"CONTRACT.SCHEMA_VERIFICATION_FAILED\", options.summary, {\n\t\twhy: \"Database schema does not satisfy the contract\",\n\t\tfix: \"Run `{bin} db update` to reconcile, or adjust your contract to match the database\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Reconcile the database\",\n\t\t\tcommand: \"{bin} db update\"\n\t\t}, {\n\t\t\tkind: \"edit-file\",\n\t\t\tlabel: \"Adjust your contract to match the database\"\n\t\t}],\n\t\tmeta: {\n\t\t\tverificationResult: options.verificationResult,\n\t\t\t...ifDefined(\"issues\", options.issues)\n\t\t}\n\t});\n}\n/**\n* Migration runner failed during execution.\n*/\nfunction errorRunnerFailed(summary, options) {\n\treturn new CliStructuredError(\"MIGRATION.RUNNER_FAILED\", summary, {\n\t\twhy: options?.why ?? \"Migration runner failed\",\n\t\tfix: options?.fix ?? \"Inspect the reported conflict and reconcile schema drift\",\n\t\t...ifDefined(\"nextActions\", options?.nextActions),\n\t\t...options?.meta ? { meta: options.meta } : {},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/**\n* Generic runtime error carrying a caller-provided dotted code.\n*/\nfunction errorRuntime(code, summary, options) {\n\treturn new CliStructuredError(code, summary, {\n\t\t...ifDefined(\"why\", options?.why),\n\t\t...ifDefined(\"fix\", options?.fix),\n\t\t...ifDefined(\"diagnostics\", options?.diagnostics),\n\t\t...ifDefined(\"meta\", options?.meta),\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n//#endregion\nexport { errorHashMismatch, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMismatch, parseMarkerRowSafely, rethrowMarkerReadError, withMarkerReadErrorHandling };\n\n//# sourceMappingURL=execution.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,mBAAmB,SAAS;CACpC,OAAO,IAAI,mBAAmB,2BAA2B,uBAAuB;EAC/E,KAAK,SAAS,OAAO;EACrB,KAAK;EACL,aAAa,CAAC;GACb,MAAM;GACN,OAAO;GACP,SAAS;EACV,CAAC;CACF,CAAC;AACF;;;;AAIA,SAAS,kBAAkB,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O,IAAI,mBAAmB,4BAA4B,iCAAiC;EAC1F,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACrB,aAAa,SAAS,eAAe,CAAC;GACrC,MAAM;GACN,OAAO;GACP,SAAS;EACV,CAAC;CACF,CAAC;AACF;;;;;AAKA,SAAS,8BAA8B,SAAS;CAC/C,OAAO,IAAI,mBAAmB,uCAAuC,QAAQ,SAAS;EACrF,KAAK;EACL,KAAK;EACL,aAAa,CAAC;GACb,MAAM;GACN,OAAO;GACP,SAAS;EACV,GAAG;GACF,MAAM;GACN,OAAO;EACR,CAAC;EACD,MAAM;GACL,oBAAoB,QAAQ;GAC5B,GAAG,UAAU,UAAU,QAAQ,MAAM;EACtC;CACD,CAAC;AACF;;;;AAIA,SAAS,kBAAkB,SAAS,SAAS;CAC5C,OAAO,IAAI,mBAAmB,2BAA2B,SAAS;EACjE,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACrB,GAAG,UAAU,eAAe,SAAS,WAAW;EAChD,GAAG,SAAS,OAAO,EAAE,MAAM,QAAQ,KAAK,IAAI,CAAC;EAC7C,GAAG,UAAU,SAAS,SAAS,KAAK;CACrC,CAAC;AACF;;;;AAIA,SAAS,aAAa,MAAM,SAAS,SAAS;CAC7C,OAAO,IAAI,mBAAmB,MAAM,SAAS;EAC5C,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,eAAe,SAAS,WAAW;EAChD,GAAG,UAAU,QAAQ,SAAS,IAAI;EAClC,GAAG,UAAU,SAAS,SAAS,KAAK;CACrC,CAAC;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { At as SchemaDiffIssue, nn as VerifyDatabaseSchemaResult } from "./control-
|
|
1
|
+
import { At as SchemaDiffIssue, nn as VerifyDatabaseSchemaResult } from "./control-DW-Jv4qC.mjs";
|
|
2
2
|
import { i as NextAction, r as Diagnostic } from "./structured-error-Cc7AIRsp.mjs";
|
|
3
|
-
import { i as CliStructuredError } from "./control-C11hV6zc-
|
|
3
|
+
import { i as CliStructuredError } from "./control-C11hV6zc-DNNpEk4P.mjs";
|
|
4
4
|
//#region ../../../1-framework/1-core/errors/dist/execution.d.mts
|
|
5
5
|
//#region src/execution.d.ts
|
|
6
6
|
/**
|
|
@@ -93,4 +93,4 @@ declare function errorRuntime(code: `${string}.${string}`, summary: string, opti
|
|
|
93
93
|
}): CliStructuredError;
|
|
94
94
|
//#endregion
|
|
95
95
|
export { errorMarkerRowCorrupt as a, errorSchemaVerificationFailed as c, rethrowMarkerReadError as d, withMarkerReadErrorHandling as f, errorMarkerRequired as i, errorTargetMismatch as l, errorMarkerMissing as n, errorRunnerFailed as o, errorMarkerReadFailed as r, errorRuntime as s, errorHashMismatch as t, parseMarkerRowSafely as u };
|
|
96
|
-
//# sourceMappingURL=execution-
|
|
96
|
+
//# sourceMappingURL=execution-Cxh39jc7.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-
|
|
1
|
+
{"version":3,"file":"execution-Cxh39jc7.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/execution.d.mts"],"mappings":";;;;;;;;iBAOiB,mBAAmB;WACzB;IACP;;;;iBAIa,kBAAkB;WACxB;WACA;WACA;IACP;;;;iBAIa,oBAAoB,kBAAkB,gBAAgB;WAC5D;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;iBACa,uBAAuB,cAAc;WAC3C;WACA;;iBAEM,4BAA4B,GAAG,iBAAiB,QAAQ,IAAI;WAClE;WACA;IACP,QAAQ;iBACK,qBAAqB,GAAG,cAAc,QAAQ,mBAAmB,GAAG;WAC1E;WACA;IACP;;;;;iBAKa,oBAAoB;WAC1B;WACA;WACA,uBAAuB;IAC9B;;;;;iBAKa,8BAA8B;WACpC;WACA,oBAAoB;WACpB,kBAAkB;IACzB;;;;iBAIa,kBAAkB,iBAAiB;WACzC;WACA;WACA,uBAAuB;WACvB,OAAO;WACP;IACP;;;;iBAIa,aAAa,6BAA6B,iBAAiB;WACjE;WACA;WACA,uBAAuB;WACvB,OAAO;WACP;IACP"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { B as JsonValue, N as ExecutionMutationDefaultPhases, a as ColumnDefault } from "./domain-envelope-CN721GnP-4huRt7Wc.mjs";
|
|
2
|
-
import { b as DataTypeLookup, p as CodecLookupWithDescriptors, y as DataTypeId } from "./codec-types-
|
|
2
|
+
import { b as DataTypeLookup, p as CodecLookupWithDescriptors, y as DataTypeId } from "./codec-types-BsE6wCHK-Dpx-WFJ2.mjs";
|
|
3
3
|
import { Type } from "arktype";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
|
-
//#region ../../../1-framework/1-core/framework-components/dist/framework-authoring-
|
|
5
|
+
//#region ../../../1-framework/1-core/framework-components/dist/framework-authoring-D6Z2kyE8.d.mts
|
|
6
6
|
//#region src/shared/option-descriptor.d.ts
|
|
7
7
|
interface AuthoringOption {
|
|
8
8
|
readonly kind: 'option';
|
|
@@ -251,7 +251,7 @@ interface AuthoringTypeConstructorDescriptor {
|
|
|
251
251
|
readonly deprecated?: {
|
|
252
252
|
readonly replacement: string;
|
|
253
253
|
};
|
|
254
|
-
/** Marks the constructor
|
|
254
|
+
/** Marks the constructor written for a column of its codec's data type when no schema names one: `contract infer` writes it, and the Prisma 7 reader will. `contract print` writes it when it produces the column's codec, and otherwise the first constructor in the stack that does, so a `timestamptz` column with the `Temporal` codec prints `DateTime`. At most one per data type. */
|
|
255
255
|
readonly inferred?: true;
|
|
256
256
|
}
|
|
257
257
|
interface AuthoringColumnDefaultTemplateLiteral {
|
|
@@ -750,4 +750,4 @@ declare function instantiateAuthoringFieldPreset(descriptor: AuthoringFieldPrese
|
|
|
750
750
|
};
|
|
751
751
|
//#endregion
|
|
752
752
|
export { instantiateAuthoringFieldPreset as $, AuthoringWarning as A, PslExtensionBlockParsedAttribute as B, AuthoringPslBlockDescriptorNamespace as C, AuthoringTypeConstructorDescriptor as D, AuthoringTemplateValue as E, ParsedPslExtensionBlock as F, assertNoCrossRegistryCollisions as G, PslPosition as H, PslDiagnosticCode as I, classifyEnumMemberType as J, assertResolvableTypeConstructorTemplates as K, PslExtensionBlock as L, ContributedPslDiagnosticCode as M, DataTypeAuthoringEntry as N, AuthoringTypeConstructorEntityRef as O, DataTypeWrittenForm as P, instantiateAuthoringEntityType as Q, PslExtensionBlockAttribute as R, AuthoringPslBlockDescriptor as S, AuthoringStorageTypeTemplate as T, PslSpan as U, PslExtensionBlockPrintEntry as V, ScalarTypeConstructorOutput as W, flushAuthoringWarnings as X, collectScalarTypeConstructors as Y, getAuthoringTypeConstructor as Z, AuthoringModelAttributeDescriptorNamespace as _, AuthoringContributions as a, isAuthoringPslBlockDescriptor as at, AuthoringModelAttributeLoweringOutput as b, AuthoringEntityTypeDescriptor as c, mergeAuthoringNamespaces as ct, AuthoringEntityTypeTemplateOutput as d, tagEntryKey as dt, instantiateAuthoringTypeConstructor as et, AuthoringFieldNamespace as f, validateAuthoringHelperArguments as ft, AuthoringModelAttributeDescriptor as g, AuthoringModelAttributeContext as h, AuthoringColumnDefaultTemplate as i, isAuthoringModelAttributeDescriptor as it, AuthoringWarningSink as j, AuthoringTypeNamespace as k, AuthoringEntityTypeFactoryOutput as l, resolveAuthoringTemplateValue as lt, AuthoringFieldPresetOutput as m, AuthoringArgumentDescriptor as n, isAuthoringEntityTypeDescriptor as nt, AuthoringDiagnosticSink as o, isAuthoringTypeConstructorDescriptor as ot, AuthoringFieldPresetDescriptor as p, validateAuthoringTypeParams as pt, authoringEntryType as q, AuthoringAttributeSpecContributions as r, isAuthoringFieldPresetDescriptor as rt, AuthoringEntityContext as s, isTagEntryKey as st, AuthoringArgRef as t, isAuthoringArgRef as tt, AuthoringEntityTypeNamespace as u, resolveEnumCodecId as ut, AuthoringModelAttributeEntityOutput as v, AuthoringSelectRef as w, AuthoringOption as x, AuthoringModelAttributeIndexOutput as y, PslExtensionBlockAttributeArg as z };
|
|
753
|
-
//# sourceMappingURL=framework-authoring-
|
|
753
|
+
//# sourceMappingURL=framework-authoring-D6Z2kyE8-B8GVWZ59.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-authoring-
|
|
1
|
+
{"version":3,"file":"framework-authoring-D6Z2kyE8-B8GVWZ59.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-authoring-D6Z2kyE8.d.mts"],"mappings":";;;;;;UAKU;WACC;WACA;;;;UAID;WACC;WACA;WACA;;UAED;WACC,OAAO;WACP,KAAK;;KAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuFA;UACK;WACC;WACA,MAAM;;;;;;UAMP;WACC;WACA;WACA,MAAM;;;;;;;;UAQP;WACC;WACA,eAAe;WACf,MAAM;;UAEP;WACC,MAAM,SAAS;WACf,WAAW,SAAS,eAAe;WACnC,MAAM;;UAEP;WACC;;;;;;;WAOA;WACA;WACA,YAAY,eAAe;WAC3B,0BAA0B;WAC1B,MAAM;;UAEP,wBAAwB,SAAS,SAAS;WACzC;WACA;WACA;WACA,QAAQ;WACR,gBAAgB,SAAS,eAAe;;WAExC,cAAc,SAAS;WACvB,YAAY,SAAS,eAAe;WACpC,MAAM;;;;KAIZ;WACM;WACA;WACA;WACA,UAAU;;;;;;;;;;;;;;;;UAgBX;WACC;WACA;WACA;WACA,OAAO,SAAS,eAAe;;KAErC,4DAA4D,kBAAkB,8BAA8B;YACrG,cAAc;;UAEhB;WACC;WACA;;KAEN,8BAA8B;WACxB;;WAEA;;WAEA;WACA;WACA;WACA;;WAEA;;WAEA;WACA,YAAY,eAAe;IAClC;;;;;UAKM;WACC;WACA,aAAa,eAAe;;;;;;;;;;;;;;;;;;;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e,wBAAwB,gBAAgB,yBAAyB,sBAAsB,8BAA8B,oBAAoB,sCAAsC,0BAA0B;iBACxP,8BAA8B,UAAU,oCAAoC;iBAC5E,iCAAiC,oBAAoB,sBAAsB,2CAA2C;;;;iBAItH,4BAA4B,oBAAoB,UAAU,8BAA8B,YAAY,qCAAqC,cAAc;iBACvJ,oCAAoC,YAAY,oCAAoC,2BAA2B;iBAC/G,+BAA+B,mBAAmB,oBAAoB,YAAY,+BAA+B,0BAA0B,KAAK,yBAAyB;iBACzK,gCAAgC,YAAY,gCAAgC;WAClF,YAAY;WACZ;WACA,UAAU;WACV,oBAAoB;WACpB;WACA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as AnyCodecDescriptor, v as DataType } from "./codec-types-
|
|
2
|
-
import { a as AuthoringContributions } from "./framework-authoring-
|
|
1
|
+
import { t as AnyCodecDescriptor, v as DataType } from "./codec-types-BsE6wCHK-Dpx-WFJ2.mjs";
|
|
2
|
+
import { a as AuthoringContributions } from "./framework-authoring-D6Z2kyE8-B8GVWZ59.mjs";
|
|
3
3
|
import { r as ControlMutationDefaults } from "./mutation-default-types-DCgdIlXt-DSAdarYA.mjs";
|
|
4
|
-
import { l as TypesImportSpec, t as AggregateDescriptor } from "./types-import-spec-
|
|
5
|
-
//#region ../../../1-framework/1-core/framework-components/dist/framework-components-
|
|
4
|
+
import { l as TypesImportSpec, t as AggregateDescriptor } from "./types-import-spec-DkCibt5c-eWXsW3y_.mjs";
|
|
5
|
+
//#region ../../../1-framework/1-core/framework-components/dist/framework-components-DhrgvP2z.d.mts
|
|
6
6
|
//#region src/shared/framework-components.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Declarative fields that describe component metadata.
|
|
@@ -31,12 +31,16 @@ interface ComponentMetadata {
|
|
|
31
31
|
* Example: `Vector<N>` for pgvector codecs that emit `Vector<1536>`
|
|
32
32
|
*/
|
|
33
33
|
readonly typeImports?: ReadonlyArray<TypesImportSpec>;
|
|
34
|
+
/**
|
|
35
|
+
* The type function, a `ParameterizedOutputTypesFunction` from `@internal/contract/types`, that gives the output type of each of this component's codecs whose output type depends on a column's type parameters. The emitted `contract.d.ts` types such a column by applying it, so the pack declares that type once.
|
|
36
|
+
*/
|
|
37
|
+
readonly parameterizedOutputTypes?: TypesImportSpec;
|
|
34
38
|
/**
|
|
35
39
|
* Optional control-plane hooks keyed by codecId. Used by family-specific planners/verifiers to handle storage types.
|
|
36
40
|
*/
|
|
37
41
|
readonly controlPlaneHooks?: Record<string, unknown>;
|
|
38
42
|
/**
|
|
39
|
-
* Codec descriptors contributed by this component. Source of truth for codec-id-keyed metadata (`traits`, `renderOutputType`) consumed by `extractCodecLookup`, and used to materialize representative `Codec` instances for codec-dispatched type rendering during emission.
|
|
43
|
+
* Codec descriptors contributed by this component. Source of truth for codec-id-keyed metadata (`traits`, `renderOutputType`, `renderValueLiteral`) consumed by `extractCodecLookup`, and used to materialize representative `Codec` instances for codec-dispatched type rendering during emission.
|
|
40
44
|
*/
|
|
41
45
|
readonly codecDescriptors?: ReadonlyArray<AnyCodecDescriptor>;
|
|
42
46
|
};
|
|
@@ -317,4 +321,4 @@ interface ExtensionInstance<TFamilyId extends string, TTargetId extends string>
|
|
|
317
321
|
}
|
|
318
322
|
//#endregion
|
|
319
323
|
export { checkContractComponentRequirements as S, PackRefBase as _, ComponentMetadata as a, TargetInstance as b, DriverDescriptor as c, ExtensionDescriptor as d, ExtensionInstance as f, FamilyPackRef as g, FamilyInstance as h, ComponentDescriptor as i, DriverInstance as l, FamilyDescriptor as m, AdapterInstance as n, ContractComponentRequirementsCheckInput as o, ExtensionPackRef as p, AdapterPackRef as r, ContractComponentRequirementsCheckResult as s, AdapterDescriptor as t, DriverPackRef as u, TargetBoundComponentDescriptor as v, TargetPackRef as x, TargetDescriptor as y };
|
|
320
|
-
//# sourceMappingURL=framework-components-
|
|
324
|
+
//# sourceMappingURL=framework-components-DhrgvP2z-B_XzMVzi.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framework-components-DhrgvP2z-B_XzMVzi.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-components-DhrgvP2z.d.mts"],"mappings":";;;;;;;;;UAQU;;WAEC;;;;;;WAMA,eAAe;;WAEf;aACE;;;;eAIE,SAAS;;;;;;;;eAQT,cAAc,cAAc;;;;eAI5B,2BAA2B;;;;eAI3B,oBAAoB;;;;eAIpB,mBAAmB,cAAc;;;;;aAKnC,uBAAuB,cAAc;aACrC;eACE,QAAQ;;;;;;;;;WASZ,YAAY,cAAc;;;;;;WAM1B,YAAY;;;;WAIZ,0BAA0B;;;;;;;;;;;;;;;;;UAiB3B,oBAAoB,6BAA6B;;WAEhD,MAAM;;WAEN;;UAED;WACC;aACE;aACA;aACA,aAAa;;WAEf;WACA;WACA,sBAAsB;;UAEvB;WACC;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;iBAEM,mCAAmC,OAAO,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;UA0B3F,iBAAiB,kCAAkC;;WAElD,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;UA2BX,iBAAiB,0BAA0B,kCAAkC;;WAE5E,UAAU;;WAEV,UAAU;;WAEV;;;;;UAKD,YAAY,qBAAqB,kCAAkC;WAClE,MAAM;WACN;WACA,UAAU;WACV;WACA,YAAY;;KAElB,cAAc,qCAAqC,sBAAsB;KACzE,cAAc,mCAAmC,qCAAqC,sBAAsB;WACtG,UAAU;;WAEV;WACA;;KAEN,eAAe,mCAAmC,qCAAqC,uBAAuB;WACxG,UAAU;;KAEhB,iBAAiB,mCAAmC,qCAAqC,yBAAyB;WAC5G,UAAU;;KAEhB,cAAc,mCAAmC,qCAAqC,sBAAsB;WACtG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BX,kBAAkB,0BAA0B,kCAAkC;;WAE7E,UAAU;;WAEV,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6BX,iBAAiB,0BAA0B,kCAAkC;;WAE5E,UAAU;;WAEV,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BX,oBAAoB,0BAA0B,kCAAkC;;WAE/E,UAAU;;WAEV,UAAU;;;KAGhB,+BAA+B,0BAA0B,4BAA4B,iBAAiB,WAAW,aAAa,kBAAkB,WAAW,aAAa,iBAAiB,WAAW,aAAa,oBAAoB,WAAW;UAC3O,eAAe;WACd,UAAU;;UAEX,eAAe,0BAA0B;WACxC,UAAU;WACV,UAAU;;UAEX,gBAAgB,0BAA0B;WACzC,UAAU;WACV,UAAU;;UAEX,eAAe,0BAA0B;WACxC,UAAU;WACV,UAAU;;UAEX,kBAAkB,0BAA0B;WAC3C,UAAU;WACV,UAAU"}
|
package/dist/ids.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as ExecutionMutationDefaultValue } from "./domain-envelope-CN721GnP-4huRt7Wc.mjs";
|
|
2
|
-
import { s as ColumnTypeDescriptor } from "./codec-
|
|
2
|
+
import { s as ColumnTypeDescriptor } from "./codec-C50y5KJD.mjs";
|
|
3
3
|
import { cuid2 as cuid2$1 } from "uniku/cuid2";
|
|
4
4
|
import { ksuid as ksuid$1 } from "uniku/ksuid";
|
|
5
5
|
import { nanoid as nanoid$1 } from "uniku/nanoid";
|
|
@@ -23,6 +23,24 @@ type IdGeneratorOptionsById = {
|
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/index.d.ts
|
|
26
|
+
declare const GENERATED_CHAR_TYPE: {
|
|
27
|
+
readonly codecId: "sql/char@1";
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The explicit storage a generator's TS spec helper bundles: a `character(N)`
|
|
31
|
+
* type sized to the generator's output. Calling a helper *is* an explicit
|
|
32
|
+
* storage request (the storage is part of the helper's contract), unlike a
|
|
33
|
+
* PSL `@default(<generator>)`, which never influences the field's storage
|
|
34
|
+
* type — the PSL interpreter never consults this metadata.
|
|
35
|
+
*/
|
|
36
|
+
type GeneratedStorage<Length extends number = number> = {
|
|
37
|
+
readonly type: ColumnTypeDescriptor<typeof GENERATED_CHAR_TYPE.codecId>;
|
|
38
|
+
readonly typeParams: {
|
|
39
|
+
readonly length: Length;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
declare const NANOID_DEFAULT_SIZE = 21;
|
|
43
|
+
type NanoidOptions = IdGeneratorOptionsById['nanoid'];
|
|
26
44
|
declare const builtinGeneratorRegistryMetadata: ReadonlyArray<{
|
|
27
45
|
readonly id: BuiltinGeneratorId;
|
|
28
46
|
readonly applicableCodecIds: readonly string[];
|
|
@@ -33,12 +51,59 @@ type GeneratedColumnSpec<TCodecId extends string = string> = {
|
|
|
33
51
|
readonly typeParams?: Record<string, unknown>;
|
|
34
52
|
readonly generated: ExecutionMutationDefaultValue;
|
|
35
53
|
};
|
|
36
|
-
declare
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
54
|
+
declare function createGeneratedSpec<TId extends BuiltinGeneratorId, Length extends number>(id: TId, storage: GeneratedStorage<Length>, options: IdGeneratorOptionsById[TId] | undefined): {
|
|
55
|
+
readonly type: ColumnTypeDescriptor<"sql/char@1">;
|
|
56
|
+
readonly nullable: false;
|
|
57
|
+
readonly typeParams: {
|
|
58
|
+
readonly length: Length;
|
|
59
|
+
};
|
|
60
|
+
readonly generated: ExecutionMutationDefaultValue;
|
|
61
|
+
};
|
|
62
|
+
declare const ulid: (options?: IdGeneratorOptionsById["ulid"]) => {
|
|
63
|
+
readonly type: ColumnTypeDescriptor<"sql/char@1">;
|
|
64
|
+
readonly nullable: false;
|
|
65
|
+
readonly typeParams: {
|
|
66
|
+
readonly length: 26;
|
|
67
|
+
};
|
|
68
|
+
readonly generated: ExecutionMutationDefaultValue;
|
|
69
|
+
};
|
|
70
|
+
declare const uuidv7: (options?: IdGeneratorOptionsById["uuidv7"]) => {
|
|
71
|
+
readonly type: ColumnTypeDescriptor<"sql/char@1">;
|
|
72
|
+
readonly nullable: false;
|
|
73
|
+
readonly typeParams: {
|
|
74
|
+
readonly length: 36;
|
|
75
|
+
};
|
|
76
|
+
readonly generated: ExecutionMutationDefaultValue;
|
|
77
|
+
};
|
|
78
|
+
declare const uuidv4: (options?: IdGeneratorOptionsById["uuidv4"]) => {
|
|
79
|
+
readonly type: ColumnTypeDescriptor<"sql/char@1">;
|
|
80
|
+
readonly nullable: false;
|
|
81
|
+
readonly typeParams: {
|
|
82
|
+
readonly length: 36;
|
|
83
|
+
};
|
|
84
|
+
readonly generated: ExecutionMutationDefaultValue;
|
|
85
|
+
};
|
|
86
|
+
declare const cuid2: (options?: IdGeneratorOptionsById["cuid2"]) => {
|
|
87
|
+
readonly type: ColumnTypeDescriptor<"sql/char@1">;
|
|
88
|
+
readonly nullable: false;
|
|
89
|
+
readonly typeParams: {
|
|
90
|
+
readonly length: 24;
|
|
91
|
+
};
|
|
92
|
+
readonly generated: ExecutionMutationDefaultValue;
|
|
93
|
+
};
|
|
94
|
+
declare const ksuid: (options?: IdGeneratorOptionsById["ksuid"]) => {
|
|
95
|
+
readonly type: ColumnTypeDescriptor<"sql/char@1">;
|
|
96
|
+
readonly nullable: false;
|
|
97
|
+
readonly typeParams: {
|
|
98
|
+
readonly length: 27;
|
|
99
|
+
};
|
|
100
|
+
readonly generated: ExecutionMutationDefaultValue;
|
|
101
|
+
};
|
|
102
|
+
declare function nanoid(): ReturnType<typeof createGeneratedSpec<'nanoid', typeof NANOID_DEFAULT_SIZE>>;
|
|
103
|
+
declare function nanoid<const Size extends number>(options: {
|
|
104
|
+
readonly size: Size;
|
|
105
|
+
}): ReturnType<typeof createGeneratedSpec<'nanoid', Size>>;
|
|
106
|
+
declare function nanoid(options?: NanoidOptions): ReturnType<typeof createGeneratedSpec<'nanoid', number>>;
|
|
42
107
|
//#endregion
|
|
43
108
|
export { GeneratedColumnSpec, builtinGeneratorIds, builtinGeneratorRegistryMetadata, cuid2, ksuid, nanoid, ulid, uuidv4, uuidv7 };
|
|
44
109
|
//# sourceMappingURL=ids.d.mts.map
|
package/dist/ids.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/ids/dist/index.d.mts"],"mappings":";;;;;;;;;;cASc;KACT,6BAA6B;;;KAG7B,SAAS,aAAa,uBAAuB,YAAY,qBAAqB,+BAA+B;KAC7G;WACM,MAAM,gBAAgB;WACtB,QAAQ,gBAAgB;WACxB,QAAQ,gBAAgB;WACxB,QAAQ,gBAAgB;WACxB,OAAO,gBAAgB;WACvB,OAAO,gBAAgB;;;;cAIpB,kCAAkC;WACrC,IAAI;WACJ;;KAEN,oBAAoB;WACd,MAAM,qBAAqB;WAC3B;WACA,aAAa;WACb,WAAW;;cAER,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"ids.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/ids/dist/index.d.mts"],"mappings":";;;;;;;;;;cASc;KACT,6BAA6B;;;KAG7B,SAAS,aAAa,uBAAuB,YAAY,qBAAqB,+BAA+B;KAC7G;WACM,MAAM,gBAAgB;WACtB,QAAQ,gBAAgB;WACxB,QAAQ,gBAAgB;WACxB,QAAQ,gBAAgB;WACxB,OAAO,gBAAgB;WACvB,OAAO,gBAAgB;;;;cAIpB;WACH;;;;;;;;;KASN,iBAAiB;WACX,MAAM,4BAA4B,oBAAoB;WACtD;aACE,QAAQ;;;cAGP;KACT,gBAAgB;cACP,kCAAkC;WACrC,IAAI;WACJ;;KAEN,oBAAoB;WACd,MAAM,qBAAqB;WAC3B;WACA,aAAa;WACb,WAAW;;iBAEL,oBAAoB,YAAY,oBAAoB,uBAAuB,IAAI,KAAK,SAAS,iBAAiB,SAAS,SAAS,uBAAuB;WAC7J,MAAM;WACN;WACA;aACE,QAAQ;;WAEV,WAAW;;cAER,OAAO,UAAU;WACpB,MAAM;WACN;WACA;aACE;;WAEF,WAAW;;cAER,SAAS,UAAU;WACtB,MAAM;WACN;WACA;aACE;;WAEF,WAAW;;cAER,SAAS,UAAU;WACtB,MAAM;WACN;WACA;aACE;;WAEF,WAAW;;cAER,QAAQ,UAAU;WACrB,MAAM;WACN;WACA;aACE;;WAEF,WAAW;;cAER,QAAQ,UAAU;WACrB,MAAM;WACN;WACA;aACE;;WAEF,WAAW;;iBAEL,UAAU,kBAAkB,qCAAqC;iBACjE,aAAa,qBAAqB;WACxC,MAAM;IACb,kBAAkB,8BAA8B;iBACnC,OAAO,UAAU,gBAAgB,kBAAkB"}
|