@prisma/orm-framework 8.0.0-rc.11-dev.55 → 8.0.0-rc.12
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-C3ci9IF_.d.mts +1 -0
- package/dist/{capabilities-BzwH_XMZ-CkgWaxF9.mjs → capabilities-ByvrTdNS-BGxo8i2x.mjs} +3 -3
- package/dist/{capabilities-BzwH_XMZ-CkgWaxF9.mjs.map → capabilities-ByvrTdNS-BGxo8i2x.mjs.map} +1 -1
- package/dist/{codec-Dn37lyN3.mjs → codec-BWFxotS7.mjs} +2 -4
- package/dist/codec-BWFxotS7.mjs.map +1 -0
- package/dist/{codec-CNyDiibx.d.mts → codec-BWgHuo8s.d.mts} +8 -6
- package/dist/{codec-CNyDiibx.d.mts.map → codec-BWgHuo8s.d.mts.map} +1 -1
- package/dist/{codec-types-CUHzY47p-BGExkYMT.d.mts → codec-types-C4Bx6jXr-cKPQHksN.d.mts} +8 -13
- package/dist/codec-types-C4Bx6jXr-cKPQHksN.d.mts.map +1 -0
- package/dist/codec-types-Da9WpgoM-BCn5_Sfz.mjs +22 -0
- package/dist/codec-types-Da9WpgoM-BCn5_Sfz.mjs.map +1 -0
- package/dist/{components-mjP-NiPI.d.mts → components-D5OkdR2k.d.mts} +4 -4
- package/dist/{components-mjP-NiPI.d.mts.map → components-D5OkdR2k.d.mts.map} +1 -1
- package/dist/{components-CnV-6irM.mjs → components-Dzqm9cyw.mjs} +2 -2
- package/dist/{components-CnV-6irM.mjs.map → components-Dzqm9cyw.mjs.map} +1 -1
- package/dist/components.d.mts +15 -15
- package/dist/components.mjs +7 -7
- package/dist/components__authoring.d.mts +2 -2
- 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 +2 -2
- package/dist/components__control.mjs +1 -1
- 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-DpKsS43P.d.mts → config-types-DFbRLLoj.d.mts} +15 -8
- package/dist/{config-types-DpKsS43P.d.mts.map → config-types-DFbRLLoj.d.mts.map} +1 -1
- package/dist/config.d.mts +2 -3
- package/dist/config.mjs +1 -2
- package/dist/config__config-types.d.mts +1 -1
- package/dist/contract-authoring.d.mts +3 -3
- package/dist/{control-CFj9y0qe.mjs → control-0Teuhk1e.mjs} +3 -3
- package/dist/{control-CFj9y0qe.mjs.map → control-0Teuhk1e.mjs.map} +1 -1
- package/dist/{control-Drb1PraC.d.mts → control-daWTOzIt.d.mts} +7 -7
- package/dist/{control-Drb1PraC.d.mts.map → control-daWTOzIt.d.mts.map} +1 -1
- package/dist/{declarations-SwNXosDu-BnYi6A1z.mjs → declarations-SwNXosDu-D2vp62Qo.mjs} +2 -2
- package/dist/{declarations-SwNXosDu-BnYi6A1z.mjs.map → declarations-SwNXosDu-D2vp62Qo.mjs.map} +1 -1
- package/dist/emission-B0xJHIJv.d.mts +2 -0
- package/dist/{emission-types-DNZaV1ZD-m0p3ggXz.d.mts → emission-types-ByNBI5Lx-u4GNPYIc.d.mts} +4 -4
- package/dist/{emission-types-DNZaV1ZD-m0p3ggXz.d.mts.map → emission-types-ByNBI5Lx-u4GNPYIc.d.mts.map} +1 -1
- package/dist/errors.d.mts +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/{execution-DbBow4tN.d.mts → execution-BE7wdKQi.d.mts} +2 -2
- package/dist/{execution-DbBow4tN.d.mts.map → execution-BE7wdKQi.d.mts.map} +1 -1
- package/dist/{execution-DAbEHe-I.d.mts → execution-shS9XY88.d.mts} +2 -2
- package/dist/{execution-DAbEHe-I.d.mts.map → execution-shS9XY88.d.mts.map} +1 -1
- package/dist/{framework-authoring-Co1079uY-BbMaaDFN.d.mts → framework-authoring-C4qKf0lE-C6CUyzE5.d.mts} +3 -3
- package/dist/{framework-authoring-Co1079uY-BbMaaDFN.d.mts.map → framework-authoring-C4qKf0lE-C6CUyzE5.d.mts.map} +1 -1
- package/dist/{framework-components-5NDIE2bw-BEUhp0I_.d.mts → framework-components-By_tc8WO-DMUxsJ11.d.mts} +5 -5
- package/dist/{framework-components-5NDIE2bw-BEUhp0I_.d.mts.map → framework-components-By_tc8WO-DMUxsJ11.d.mts.map} +1 -1
- package/dist/ids.d.mts +1 -1
- package/dist/{parse-Cc94-3I4-DY-0G7Dp.d.mts → parse-Cc94-3I4-CNqJmnMR.d.mts} +5 -5
- package/dist/{parse-Cc94-3I4-DY-0G7Dp.d.mts.map → parse-Cc94-3I4-CNqJmnMR.d.mts.map} +1 -1
- package/dist/{parse-DT0CXbYQ-BiB2k3LY.mjs → parse-DT0CXbYQ-BsAldB1g.mjs} +2 -2
- package/dist/{parse-DT0CXbYQ-BiB2k3LY.mjs.map → parse-DT0CXbYQ-BsAldB1g.mjs.map} +1 -1
- package/dist/{psl-ast-COX_BDIK-Db5b89j9.d.mts → psl-ast-CjS--vj2-DKxe-sf-.d.mts} +4 -4
- package/dist/{psl-ast-COX_BDIK-Db5b89j9.d.mts.map → psl-ast-CjS--vj2-DKxe-sf-.d.mts.map} +1 -1
- package/dist/{psl-ast-B4EnAqNe.d.mts → psl-ast-DP7HlTAO.d.mts} +4 -4
- package/dist/{psl-ast-B4EnAqNe.d.mts.map → psl-ast-DP7HlTAO.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +9 -9
- package/dist/psl-parser.mjs +1 -1
- package/dist/psl-parser__format.mjs +2 -2
- package/dist/psl-parser__interpret.d.mts +3 -3
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-parser__syntax.mjs +2 -2
- package/dist/psl-printer.d.mts +6 -6
- package/dist/{resolve-codec-C13hn-14-DfFGo-7T.mjs → resolve-codec-DWEkC3ya-DRYIta04.mjs} +20 -11
- package/dist/resolve-codec-DWEkC3ya-DRYIta04.mjs.map +1 -0
- package/dist/{runtime-BF7FbnSQ.d.mts → runtime-BLPkDw5z.d.mts} +2 -2
- package/dist/{runtime-BF7FbnSQ.d.mts.map → runtime-BLPkDw5z.d.mts.map} +1 -1
- package/dist/{symbol-table-BKzfcqoT-B2VzeTlt.d.mts → symbol-table-BKzfcqoT-6qb_OZnS.d.mts} +5 -5
- package/dist/{symbol-table-BKzfcqoT-B2VzeTlt.d.mts.map → symbol-table-BKzfcqoT-6qb_OZnS.d.mts.map} +1 -1
- package/dist/{types-import-spec-fliHHCFF-B1yF0Xw3.d.mts → types-import-spec-B15QNHY_-CZajVHiF.d.mts} +3 -3
- package/dist/{types-import-spec-fliHHCFF-B1yF0Xw3.d.mts.map → types-import-spec-B15QNHY_-CZajVHiF.d.mts.map} +1 -1
- package/package.json +15 -16
- package/dist/authoring-BAkAELU9.d.mts +0 -1
- package/dist/codec-Dn37lyN3.mjs.map +0 -1
- package/dist/codec-types-CUHzY47p-BGExkYMT.d.mts.map +0 -1
- package/dist/codec-types-smcGzGq6-BohNffPc.mjs +0 -30
- package/dist/codec-types-smcGzGq6-BohNffPc.mjs.map +0 -1
- package/dist/config-validation-DPt5hwQx.mjs +0 -168
- package/dist/config-validation-DPt5hwQx.mjs.map +0 -1
- package/dist/config-validation-Wiqew2J9.d.mts +0 -21
- package/dist/config-validation-Wiqew2J9.d.mts.map +0 -1
- package/dist/config__config-validation.d.mts +0 -2
- package/dist/config__config-validation.mjs +0 -2
- package/dist/emission-CjBzhxw9.d.mts +0 -2
- package/dist/resolve-codec-C13hn-14-DfFGo-7T.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "8.0.0-rc.
|
|
3
|
+
"version": "8.0.0-rc.12",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"uniku": "^0.5.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@internal/config": "8.0.0-rc.
|
|
19
|
-
"@internal/contract": "8.0.0-rc.
|
|
20
|
-
"@internal/contract-authoring": "8.0.0-rc.
|
|
21
|
-
"@internal/errors": "8.0.0-rc.
|
|
22
|
-
"@internal/framework-components": "8.0.0-rc.
|
|
23
|
-
"@internal/ids": "8.0.0-rc.
|
|
24
|
-
"@internal/operations": "8.0.0-rc.
|
|
25
|
-
"@internal/psl-parser": "8.0.0-rc.
|
|
26
|
-
"@internal/psl-printer": "8.0.0-rc.
|
|
27
|
-
"@internal/ts-render": "8.0.0-rc.
|
|
28
|
-
"@repo/tsconfig": "8.0.0-rc.
|
|
29
|
-
"@internal/publish-surface": "8.0.0-rc.
|
|
30
|
-
"@repo/tsdown": "8.0.0-rc.
|
|
31
|
-
"@internal/utils": "8.0.0-rc.
|
|
18
|
+
"@internal/config": "8.0.0-rc.12",
|
|
19
|
+
"@internal/contract": "8.0.0-rc.12",
|
|
20
|
+
"@internal/contract-authoring": "8.0.0-rc.12",
|
|
21
|
+
"@internal/errors": "8.0.0-rc.12",
|
|
22
|
+
"@internal/framework-components": "8.0.0-rc.12",
|
|
23
|
+
"@internal/ids": "8.0.0-rc.12",
|
|
24
|
+
"@internal/operations": "8.0.0-rc.12",
|
|
25
|
+
"@internal/psl-parser": "8.0.0-rc.12",
|
|
26
|
+
"@internal/psl-printer": "8.0.0-rc.12",
|
|
27
|
+
"@internal/ts-render": "8.0.0-rc.12",
|
|
28
|
+
"@repo/tsconfig": "8.0.0-rc.12",
|
|
29
|
+
"@internal/publish-surface": "8.0.0-rc.12",
|
|
30
|
+
"@repo/tsdown": "8.0.0-rc.12",
|
|
31
|
+
"@internal/utils": "8.0.0-rc.12",
|
|
32
32
|
"tsdown": "0.22.14",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
34
|
"vitest": "5.0.0-rc.2"
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
"./components/utils": "./dist/components__utils.mjs",
|
|
56
56
|
"./config": "./dist/config.mjs",
|
|
57
57
|
"./config/config-types": "./dist/config__config-types.mjs",
|
|
58
|
-
"./config/config-validation": "./dist/config__config-validation.mjs",
|
|
59
58
|
"./contract": "./dist/contract.mjs",
|
|
60
59
|
"./contract/apply-specifier-default-control-policy": "./dist/contract__apply-specifier-default-control-policy.mjs",
|
|
61
60
|
"./contract/contract-validation-error": "./dist/contract__contract-validation-error.mjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./framework-authoring-Co1079uY-BbMaaDFN.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-Dn37lyN3.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.mjs"],"sourcesContent":["import { r as voidParamsSchema, t as emptyCodecLookup } from \"./codec-types-smcGzGq6.mjs\";\nimport { a as createDataTypeLookup, i as validateCodecTypeParams, n as materializeCodec, o as dataType, r as resolveCodecDescriptorOrThrow, s as dataTypeId, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-C13hn-14.mjs\";\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`, `targetTypes`, `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\t/** Boolean derived from `paramsSchema`: `true` whenever the schema is not the singleton `voidParamsSchema`. */\n\tget isParameterized() {\n\t\treturn this.paramsSchema !== voidParamsSchema;\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 the column's database-native type spelling — the value the postgres adapter's migration planner, the SQL renderer's cast policy, and the emitted contract's column `nativeType` slot read. Per-codec helpers pass the literal native-type string for their codec (e.g. `'text'`, `'int4'`, `'character varying'`); for codecs whose native-type spelling depends on parameters (none today; reserved for future shapes), the helper computes the rendered string before calling `column`. The framework does not derive the value from `codecId` — that mapping is target-specific and lives at the helper.\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/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, column, createDataTypeLookup, dataType, dataTypeId, emptyCodecLookup, materializeCodec, renderTsLiteral, resolveCodecDescriptorOrThrow, validateCodecTypeParams, voidParamsSchema };\n\n//# sourceMappingURL=codec.mjs.map"],"mappings":";;;;;;;;AASA,IAAI,YAAY,MAAM;CACrB;;;;CAIA,YAAY,YAAY;EACvB,KAAK,aAAa;CACnB;CACA,IAAI,KAAK;EACR,OAAO,KAAK,WAAW;CACxB;AACD;;;;;;;;AAUA,IAAI,8BAA8B,MAAM;;CAEvC,IAAI,kBAAkB;EACrB,OAAO,KAAK,iBAAiB;CAC9B;AACD;;;;;;;;;AASA,IAAI,sBAAsB,cAAc,4BAA4B,CAAC;;;;;;AAQrE,SAAS,OAAO,cAAc,SAAS,YAAY,YAAY;CAC9D,OAAO;EACN;EACA;EACA;EACA;CACD;AACD;;;;;;;;;;AAYA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,UAAU,OAAO,gBAAgB,KAAK;CAC3D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;AACjF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-CUHzY47p-BGExkYMT.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec-types-CUHzY47p.d.mts"],"mappings":";;;;;;;;;KAQK;WACM;;;;;;KAMN,QAAQ,OAAO,cAAc;;;;;UAKxB;WACC,aAAa;WACb,OAAO,mBAAmB,gBAAgB;;UAE3C;WACC,IAAI;;WAEJ,OAAO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AM;WACD,OAAO,OAAO,QAAQ,KAAK,mBAAmB,QAAQ;WACtD,OAAO,MAAM,OAAO,KAAK,mBAAmB,QAAQ;WACpD,WAAW,OAAO,SAAS;WAC3B,WAAW,MAAM,YAAY;;;;;cAK1B;KACT,qBAAqB;;;;;;;;;;;;UAYhB;WACC;WACA,aAAa;WACb;;;;;;;;;;;;;UAaD;WACC,SAAS;;;;;;;;;UASV;EACR,IAAI,aAAa;EACjB,eAAe;EACf,oBAAoB,YAAY,QAAQ;;EAExC,oBAAoB,YAAY,QAAQ;;EAExC,uBAAuB,YAAY,OAAO,WAAW;;;;;;;;;;EAUrD,eAAe,aAAa;;;;;;;;;;;;;;;UAepB,sBAAsB;EAC9B,YAAY,KAAK,WAAW;EAC5B,UAAU,qBAAqB,eAAe,iBAAiB;;cAEnD,kBAAkB;;;;;;;;UAQtB;WACC;;;;;cAKG,kBAAkB"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//#region ../../../1-framework/1-core/framework-components/dist/codec-types-smcGzGq6.mjs
|
|
2
|
-
/** Every semantic trait a codec may advertise. The runtime tuple backs validation of trait-keyed contributions arriving from JavaScript. */
|
|
3
|
-
const CODEC_TRAITS = [
|
|
4
|
-
"equality",
|
|
5
|
-
"order",
|
|
6
|
-
"boolean",
|
|
7
|
-
"numeric",
|
|
8
|
-
"textual"
|
|
9
|
-
];
|
|
10
|
-
/** Whether `value` names one of the {@link CODEC_TRAITS}. */
|
|
11
|
-
function isCodecTrait(value) {
|
|
12
|
-
return CODEC_TRAITS.some((trait) => trait === value);
|
|
13
|
-
}
|
|
14
|
-
const emptyCodecLookup = {
|
|
15
|
-
get: () => void 0,
|
|
16
|
-
targetTypesFor: () => void 0,
|
|
17
|
-
renderOutputTypeFor: () => void 0
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Standard Schema validator for `void` params. Accepts only `undefined` (or absent input); rejects any other value so a contract that tries to thread `typeParams` through a non-parameterized codec id fails fast at the JSON boundary instead of silently coercing the value away. Used by the framework-supplied non-parameterized descriptor synthesizer.
|
|
21
|
-
*/
|
|
22
|
-
const voidParamsSchema = { "~standard": {
|
|
23
|
-
version: 1,
|
|
24
|
-
vendor: "prisma",
|
|
25
|
-
validate: (input) => input === void 0 ? { value: void 0 } : { issues: [{ message: "unexpected typeParams for non-parameterized codec (void params expected)" }] }
|
|
26
|
-
} };
|
|
27
|
-
//#endregion
|
|
28
|
-
export { isCodecTrait as n, voidParamsSchema as r, emptyCodecLookup as t };
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=codec-types-smcGzGq6-BohNffPc.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-smcGzGq6-BohNffPc.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec-types-smcGzGq6.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}\nconst emptyCodecLookup = {\n\tget: () => void 0,\n\ttargetTypesFor: () => void 0,\n\trenderOutputTypeFor: () => void 0\n};\n/**\n* Standard Schema validator for `void` params. Accepts only `undefined` (or absent input); rejects any other value so a contract that tries to thread `typeParams` through a non-parameterized codec id fails fast at the JSON boundary instead of silently coercing the value away. Used by the framework-supplied non-parameterized descriptor synthesizer.\n*/\nconst voidParamsSchema = { \"~standard\": {\n\tversion: 1,\n\tvendor: \"prisma\",\n\tvalidate: (input) => input === void 0 ? { value: void 0 } : { issues: [{ message: \"unexpected typeParams for non-parameterized codec (void params expected)\" }] }\n} };\n//#endregion\nexport { isCodecTrait as n, voidParamsSchema as r, emptyCodecLookup as t };\n\n//# sourceMappingURL=codec-types-smcGzGq6.mjs.map"],"mappings":";;AAEA,MAAM,eAAe;CACpB;CACA;CACA;CACA;CACA;AACD;;AAEA,SAAS,aAAa,OAAO;CAC5B,OAAO,aAAa,MAAM,UAAU,UAAU,KAAK;AACpD;AACA,MAAM,mBAAmB;CACxB,WAAW,KAAK;CAChB,sBAAsB,KAAK;CAC3B,2BAA2B,KAAK;AACjC;;;;AAIA,MAAM,mBAAmB,EAAE,aAAa;CACvC,SAAS;CACT,QAAQ;CACR,WAAW,UAAU,UAAU,KAAK,IAAI,EAAE,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,SAAS,2EAA2E,CAAC,EAAE;AACjK,EAAE"}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
//#region ../../../1-framework/1-core/config/dist/config-validation.mjs
|
|
2
|
-
var IssueCollector = class {
|
|
3
|
-
issues = [];
|
|
4
|
-
add(section, field, message) {
|
|
5
|
-
this.issues.push({
|
|
6
|
-
section,
|
|
7
|
-
field,
|
|
8
|
-
message: message ?? `Config must have a "${field}" field`
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
function isObject(value) {
|
|
13
|
-
return typeof value === "object" && value !== null;
|
|
14
|
-
}
|
|
15
|
-
function validateFamily(config, issues) {
|
|
16
|
-
const family = config["family"];
|
|
17
|
-
if (!family) {
|
|
18
|
-
issues.add("family", "family");
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (!isObject(family)) {
|
|
22
|
-
issues.add("family", "family", "Config.family must be an object");
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (family["kind"] !== "family") issues.add("family", "family.kind", "Config.family must have kind: \"family\"");
|
|
26
|
-
if (typeof family["id"] !== "string") issues.add("family", "family.id", "Config.family must have id: string");
|
|
27
|
-
if (typeof family["familyId"] !== "string") issues.add("family", "family.familyId", "Config.family must have familyId: string");
|
|
28
|
-
if (typeof family["version"] !== "string") issues.add("family", "family.version", "Config.family must have version: string");
|
|
29
|
-
if (!family["emission"] || typeof family["emission"] !== "object") issues.add("family", "family.emission", "Config.family must have emission: EmissionSpi");
|
|
30
|
-
if (typeof family["create"] !== "function") issues.add("family", "family.create", "Config.family must have create: function");
|
|
31
|
-
return typeof family["familyId"] === "string" ? family["familyId"] : void 0;
|
|
32
|
-
}
|
|
33
|
-
function validateTargetLikeDescriptor(descriptor, fieldPrefix, expectations, issues) {
|
|
34
|
-
const { section, kind, label, familyId, targetId } = expectations;
|
|
35
|
-
const describe = (suffix, requirement) => issues.add(section, `${fieldPrefix}.${suffix}`, `${label} must have ${requirement}`);
|
|
36
|
-
if (descriptor["kind"] !== kind) describe("kind", `kind: "${kind}"`);
|
|
37
|
-
if (typeof descriptor["id"] !== "string") describe("id", "id: string");
|
|
38
|
-
if (typeof descriptor["familyId"] !== "string") describe("familyId", "familyId: string");
|
|
39
|
-
else if (familyId !== void 0 && descriptor["familyId"] !== familyId) issues.add(section, `${fieldPrefix}.familyId`, `Config.${fieldPrefix}.familyId must match Config.family.familyId (expected: ${familyId}, got: ${descriptor["familyId"]})`);
|
|
40
|
-
if (typeof descriptor["version"] !== "string") describe("version", "version: string");
|
|
41
|
-
if (typeof descriptor["targetId"] !== "string") describe("targetId", "targetId: string");
|
|
42
|
-
else if (targetId !== void 0 && descriptor["targetId"] !== targetId) issues.add(section, `${fieldPrefix}.targetId`, `Config.${fieldPrefix}.targetId must match Config.target.targetId (expected: ${targetId}, got: ${descriptor["targetId"]})`);
|
|
43
|
-
if (typeof descriptor["create"] !== "function") describe("create", "create: function");
|
|
44
|
-
}
|
|
45
|
-
function validateTarget(config, familyId, issues) {
|
|
46
|
-
const target = config["target"];
|
|
47
|
-
if (!target) {
|
|
48
|
-
issues.add("target", "target");
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (!isObject(target)) {
|
|
52
|
-
issues.add("target", "target", "Config.target must be an object");
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
validateTargetLikeDescriptor(target, "target", {
|
|
56
|
-
section: "target",
|
|
57
|
-
kind: "target",
|
|
58
|
-
label: "Config.target",
|
|
59
|
-
familyId,
|
|
60
|
-
targetId: void 0
|
|
61
|
-
}, issues);
|
|
62
|
-
return typeof target["targetId"] === "string" ? target["targetId"] : void 0;
|
|
63
|
-
}
|
|
64
|
-
function validateExtensions(config, familyId, targetId, issues) {
|
|
65
|
-
if (config["extensionPacks"] !== void 0) issues.add("extensions", "extensionPacks", "Config.extensionPacks is no longer supported; rename it to Config.extensions");
|
|
66
|
-
if (config["extensions"] === void 0) return;
|
|
67
|
-
if (!Array.isArray(config["extensions"])) {
|
|
68
|
-
issues.add("extensions", "extensions", "Config.extensions must be an array");
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
for (const ext of config["extensions"]) {
|
|
72
|
-
if (!isObject(ext)) {
|
|
73
|
-
issues.add("extensions", "extensions[]", "Config.extensions must contain ControlExtensionDescriptor objects");
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
validateTargetLikeDescriptor(ext, "extensions[]", {
|
|
77
|
-
section: "extensions",
|
|
78
|
-
kind: "extension",
|
|
79
|
-
label: "Config.extensions items",
|
|
80
|
-
familyId,
|
|
81
|
-
targetId
|
|
82
|
-
}, issues);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function validateContract(config, issues) {
|
|
86
|
-
if (config["contract"] === void 0) return;
|
|
87
|
-
if (!isObject(config["contract"])) {
|
|
88
|
-
issues.add("contract", "contract", "Config.contract must be an object");
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const contract = config["contract"];
|
|
92
|
-
if (!Object.hasOwn(contract, "source")) {
|
|
93
|
-
issues.add("contract", "contract.source", "Config.contract.source is required when contract is provided");
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
const source = contract["source"];
|
|
97
|
-
if (!isObject(source)) {
|
|
98
|
-
issues.add("contract", "contract.source", "Config.contract.source must be a provider object");
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
const inputs = Object.hasOwn(source, "inputs") ? source["inputs"] : void 0;
|
|
102
|
-
if (inputs !== void 0) {
|
|
103
|
-
if (!Array.isArray(inputs)) issues.add("contract", "contract.source.inputs", "Config.contract.source.inputs must be an array of strings when provided");
|
|
104
|
-
else if (inputs.some((input) => typeof input !== "string")) issues.add("contract", "contract.source.inputs[]", "Config.contract.source.inputs must contain only strings");
|
|
105
|
-
}
|
|
106
|
-
const format = Object.hasOwn(source, "format") ? source["format"] : void 0;
|
|
107
|
-
if (format !== void 0 && typeof format !== "string") issues.add("contract", "contract.source.format", "Config.contract.source.format must be a string when provided");
|
|
108
|
-
if (!Object.hasOwn(source, "load") || typeof source["load"] !== "function") issues.add("contract", "contract.source.load", "Config.contract.source.load must be a function");
|
|
109
|
-
const output = Object.hasOwn(contract, "output") ? contract["output"] : void 0;
|
|
110
|
-
if (output !== void 0 && typeof output !== "string") issues.add("contract", "contract.output", "Config.contract.output must be a string when provided");
|
|
111
|
-
}
|
|
112
|
-
function validateMigrations(config, issues) {
|
|
113
|
-
if (config["migrations"] === void 0) return;
|
|
114
|
-
if (!isObject(config["migrations"])) {
|
|
115
|
-
issues.add("migrations", "migrations", "Config.migrations must be an object");
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
const dir = config["migrations"]["dir"];
|
|
119
|
-
if (dir !== void 0 && typeof dir !== "string") issues.add("migrations", "migrations.dir", "Config.migrations.dir must be a string");
|
|
120
|
-
}
|
|
121
|
-
function validateFormatter(config, issues) {
|
|
122
|
-
if (config["formatter"] === void 0) return;
|
|
123
|
-
if (!isObject(config["formatter"])) {
|
|
124
|
-
issues.add("formatter", "formatter", "Config.formatter must be an object");
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
const { indent, newline } = config["formatter"];
|
|
128
|
-
if (!(indent === void 0 || indent === "tab" || typeof indent === "number" && Number.isInteger(indent) && indent >= 1)) issues.add("formatter", "formatter.indent", "Config.formatter.indent must be an integer >= 1 or \"tab\"");
|
|
129
|
-
if (newline !== void 0 && newline !== "LF" && newline !== "CRLF") issues.add("formatter", "formatter.newline", "Config.formatter.newline must be \"LF\" or \"CRLF\"");
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Validates the config structure and returns every problem found, each tagged
|
|
133
|
-
* with the config section it concerns. Pure validation logic with no file I/O
|
|
134
|
-
* or CLI awareness; it never throws.
|
|
135
|
-
*/
|
|
136
|
-
function collectConfigIssues(config) {
|
|
137
|
-
const issues = new IssueCollector();
|
|
138
|
-
const familyId = validateFamily(config, issues);
|
|
139
|
-
const targetId = validateTarget(config, familyId, issues);
|
|
140
|
-
const adapter = config["adapter"];
|
|
141
|
-
if (!adapter) issues.add("adapter", "adapter");
|
|
142
|
-
else if (!isObject(adapter)) issues.add("adapter", "adapter", "Config.adapter must be an object");
|
|
143
|
-
else validateTargetLikeDescriptor(adapter, "adapter", {
|
|
144
|
-
section: "adapter",
|
|
145
|
-
kind: "adapter",
|
|
146
|
-
label: "Config.adapter",
|
|
147
|
-
familyId,
|
|
148
|
-
targetId
|
|
149
|
-
}, issues);
|
|
150
|
-
const driver = config["driver"];
|
|
151
|
-
if (driver !== void 0) if (!isObject(driver)) issues.add("driver", "driver", "Config.driver must be an object");
|
|
152
|
-
else validateTargetLikeDescriptor(driver, "driver", {
|
|
153
|
-
section: "driver",
|
|
154
|
-
kind: "driver",
|
|
155
|
-
label: "Config.driver",
|
|
156
|
-
familyId,
|
|
157
|
-
targetId
|
|
158
|
-
}, issues);
|
|
159
|
-
validateExtensions(config, familyId, targetId, issues);
|
|
160
|
-
validateContract(config, issues);
|
|
161
|
-
validateMigrations(config, issues);
|
|
162
|
-
validateFormatter(config, issues);
|
|
163
|
-
return issues.issues;
|
|
164
|
-
}
|
|
165
|
-
//#endregion
|
|
166
|
-
export { collectConfigIssues as t };
|
|
167
|
-
|
|
168
|
-
//# sourceMappingURL=config-validation-DPt5hwQx.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-validation-DPt5hwQx.mjs","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-validation.mjs"],"sourcesContent":["//#region src/config-validation.ts\nvar IssueCollector = class {\n\tissues = [];\n\tadd(section, field, message) {\n\t\tthis.issues.push({\n\t\t\tsection,\n\t\t\tfield,\n\t\t\tmessage: message ?? `Config must have a \"${field}\" field`\n\t\t});\n\t}\n};\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction validateFamily(config, issues) {\n\tconst family = config[\"family\"];\n\tif (!family) {\n\t\tissues.add(\"family\", \"family\");\n\t\treturn;\n\t}\n\tif (!isObject(family)) {\n\t\tissues.add(\"family\", \"family\", \"Config.family must be an object\");\n\t\treturn;\n\t}\n\tif (family[\"kind\"] !== \"family\") issues.add(\"family\", \"family.kind\", \"Config.family must have kind: \\\"family\\\"\");\n\tif (typeof family[\"id\"] !== \"string\") issues.add(\"family\", \"family.id\", \"Config.family must have id: string\");\n\tif (typeof family[\"familyId\"] !== \"string\") issues.add(\"family\", \"family.familyId\", \"Config.family must have familyId: string\");\n\tif (typeof family[\"version\"] !== \"string\") issues.add(\"family\", \"family.version\", \"Config.family must have version: string\");\n\tif (!family[\"emission\"] || typeof family[\"emission\"] !== \"object\") issues.add(\"family\", \"family.emission\", \"Config.family must have emission: EmissionSpi\");\n\tif (typeof family[\"create\"] !== \"function\") issues.add(\"family\", \"family.create\", \"Config.family must have create: function\");\n\treturn typeof family[\"familyId\"] === \"string\" ? family[\"familyId\"] : void 0;\n}\nfunction validateTargetLikeDescriptor(descriptor, fieldPrefix, expectations, issues) {\n\tconst { section, kind, label, familyId, targetId } = expectations;\n\tconst describe = (suffix, requirement) => issues.add(section, `${fieldPrefix}.${suffix}`, `${label} must have ${requirement}`);\n\tif (descriptor[\"kind\"] !== kind) describe(\"kind\", `kind: \"${kind}\"`);\n\tif (typeof descriptor[\"id\"] !== \"string\") describe(\"id\", \"id: string\");\n\tif (typeof descriptor[\"familyId\"] !== \"string\") describe(\"familyId\", \"familyId: string\");\n\telse if (familyId !== void 0 && descriptor[\"familyId\"] !== familyId) issues.add(section, `${fieldPrefix}.familyId`, `Config.${fieldPrefix}.familyId must match Config.family.familyId (expected: ${familyId}, got: ${descriptor[\"familyId\"]})`);\n\tif (typeof descriptor[\"version\"] !== \"string\") describe(\"version\", \"version: string\");\n\tif (typeof descriptor[\"targetId\"] !== \"string\") describe(\"targetId\", \"targetId: string\");\n\telse if (targetId !== void 0 && descriptor[\"targetId\"] !== targetId) issues.add(section, `${fieldPrefix}.targetId`, `Config.${fieldPrefix}.targetId must match Config.target.targetId (expected: ${targetId}, got: ${descriptor[\"targetId\"]})`);\n\tif (typeof descriptor[\"create\"] !== \"function\") describe(\"create\", \"create: function\");\n}\nfunction validateTarget(config, familyId, issues) {\n\tconst target = config[\"target\"];\n\tif (!target) {\n\t\tissues.add(\"target\", \"target\");\n\t\treturn;\n\t}\n\tif (!isObject(target)) {\n\t\tissues.add(\"target\", \"target\", \"Config.target must be an object\");\n\t\treturn;\n\t}\n\tvalidateTargetLikeDescriptor(target, \"target\", {\n\t\tsection: \"target\",\n\t\tkind: \"target\",\n\t\tlabel: \"Config.target\",\n\t\tfamilyId,\n\t\ttargetId: void 0\n\t}, issues);\n\treturn typeof target[\"targetId\"] === \"string\" ? target[\"targetId\"] : void 0;\n}\nfunction validateExtensions(config, familyId, targetId, issues) {\n\tif (config[\"extensionPacks\"] !== void 0) issues.add(\"extensions\", \"extensionPacks\", \"Config.extensionPacks is no longer supported; rename it to Config.extensions\");\n\tif (config[\"extensions\"] === void 0) return;\n\tif (!Array.isArray(config[\"extensions\"])) {\n\t\tissues.add(\"extensions\", \"extensions\", \"Config.extensions must be an array\");\n\t\treturn;\n\t}\n\tfor (const ext of config[\"extensions\"]) {\n\t\tif (!isObject(ext)) {\n\t\t\tissues.add(\"extensions\", \"extensions[]\", \"Config.extensions must contain ControlExtensionDescriptor objects\");\n\t\t\tcontinue;\n\t\t}\n\t\tvalidateTargetLikeDescriptor(ext, \"extensions[]\", {\n\t\t\tsection: \"extensions\",\n\t\t\tkind: \"extension\",\n\t\t\tlabel: \"Config.extensions items\",\n\t\t\tfamilyId,\n\t\t\ttargetId\n\t\t}, issues);\n\t}\n}\nfunction validateContract(config, issues) {\n\tif (config[\"contract\"] === void 0) return;\n\tif (!isObject(config[\"contract\"])) {\n\t\tissues.add(\"contract\", \"contract\", \"Config.contract must be an object\");\n\t\treturn;\n\t}\n\tconst contract = config[\"contract\"];\n\tif (!Object.hasOwn(contract, \"source\")) {\n\t\tissues.add(\"contract\", \"contract.source\", \"Config.contract.source is required when contract is provided\");\n\t\treturn;\n\t}\n\tconst source = contract[\"source\"];\n\tif (!isObject(source)) {\n\t\tissues.add(\"contract\", \"contract.source\", \"Config.contract.source must be a provider object\");\n\t\treturn;\n\t}\n\tconst inputs = Object.hasOwn(source, \"inputs\") ? source[\"inputs\"] : void 0;\n\tif (inputs !== void 0) {\n\t\tif (!Array.isArray(inputs)) issues.add(\"contract\", \"contract.source.inputs\", \"Config.contract.source.inputs must be an array of strings when provided\");\n\t\telse if (inputs.some((input) => typeof input !== \"string\")) issues.add(\"contract\", \"contract.source.inputs[]\", \"Config.contract.source.inputs must contain only strings\");\n\t}\n\tconst format = Object.hasOwn(source, \"format\") ? source[\"format\"] : void 0;\n\tif (format !== void 0 && typeof format !== \"string\") issues.add(\"contract\", \"contract.source.format\", \"Config.contract.source.format must be a string when provided\");\n\tif (!Object.hasOwn(source, \"load\") || typeof source[\"load\"] !== \"function\") issues.add(\"contract\", \"contract.source.load\", \"Config.contract.source.load must be a function\");\n\tconst output = Object.hasOwn(contract, \"output\") ? contract[\"output\"] : void 0;\n\tif (output !== void 0 && typeof output !== \"string\") issues.add(\"contract\", \"contract.output\", \"Config.contract.output must be a string when provided\");\n}\nfunction validateMigrations(config, issues) {\n\tif (config[\"migrations\"] === void 0) return;\n\tif (!isObject(config[\"migrations\"])) {\n\t\tissues.add(\"migrations\", \"migrations\", \"Config.migrations must be an object\");\n\t\treturn;\n\t}\n\tconst dir = config[\"migrations\"][\"dir\"];\n\tif (dir !== void 0 && typeof dir !== \"string\") issues.add(\"migrations\", \"migrations.dir\", \"Config.migrations.dir must be a string\");\n}\nfunction validateFormatter(config, issues) {\n\tif (config[\"formatter\"] === void 0) return;\n\tif (!isObject(config[\"formatter\"])) {\n\t\tissues.add(\"formatter\", \"formatter\", \"Config.formatter must be an object\");\n\t\treturn;\n\t}\n\tconst { indent, newline } = config[\"formatter\"];\n\tif (!(indent === void 0 || indent === \"tab\" || typeof indent === \"number\" && Number.isInteger(indent) && indent >= 1)) issues.add(\"formatter\", \"formatter.indent\", \"Config.formatter.indent must be an integer >= 1 or \\\"tab\\\"\");\n\tif (newline !== void 0 && newline !== \"LF\" && newline !== \"CRLF\") issues.add(\"formatter\", \"formatter.newline\", \"Config.formatter.newline must be \\\"LF\\\" or \\\"CRLF\\\"\");\n}\n/**\n* Validates the config structure and returns every problem found, each tagged\n* with the config section it concerns. Pure validation logic with no file I/O\n* or CLI awareness; it never throws.\n*/\nfunction collectConfigIssues(config) {\n\tconst issues = new IssueCollector();\n\tconst familyId = validateFamily(config, issues);\n\tconst targetId = validateTarget(config, familyId, issues);\n\tconst adapter = config[\"adapter\"];\n\tif (!adapter) issues.add(\"adapter\", \"adapter\");\n\telse if (!isObject(adapter)) issues.add(\"adapter\", \"adapter\", \"Config.adapter must be an object\");\n\telse validateTargetLikeDescriptor(adapter, \"adapter\", {\n\t\tsection: \"adapter\",\n\t\tkind: \"adapter\",\n\t\tlabel: \"Config.adapter\",\n\t\tfamilyId,\n\t\ttargetId\n\t}, issues);\n\tconst driver = config[\"driver\"];\n\tif (driver !== void 0) if (!isObject(driver)) issues.add(\"driver\", \"driver\", \"Config.driver must be an object\");\n\telse validateTargetLikeDescriptor(driver, \"driver\", {\n\t\tsection: \"driver\",\n\t\tkind: \"driver\",\n\t\tlabel: \"Config.driver\",\n\t\tfamilyId,\n\t\ttargetId\n\t}, issues);\n\tvalidateExtensions(config, familyId, targetId, issues);\n\tvalidateContract(config, issues);\n\tvalidateMigrations(config, issues);\n\tvalidateFormatter(config, issues);\n\treturn issues.issues;\n}\n//#endregion\nexport { collectConfigIssues };\n\n//# sourceMappingURL=config-validation.mjs.map"],"mappings":";AACA,IAAI,iBAAiB,MAAM;CAC1B,SAAS,CAAC;CACV,IAAI,SAAS,OAAO,SAAS;EAC5B,KAAK,OAAO,KAAK;GAChB;GACA;GACA,SAAS,WAAW,uBAAuB,MAAM;EAClD,CAAC;CACF;AACD;AACA,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,UAAU;AAC/C;AACA,SAAS,eAAe,QAAQ,QAAQ;CACvC,MAAM,SAAS,OAAO;CACtB,IAAI,CAAC,QAAQ;EACZ,OAAO,IAAI,UAAU,QAAQ;EAC7B;CACD;CACA,IAAI,CAAC,SAAS,MAAM,GAAG;EACtB,OAAO,IAAI,UAAU,UAAU,iCAAiC;EAChE;CACD;CACA,IAAI,OAAO,YAAY,UAAU,OAAO,IAAI,UAAU,eAAe,0CAA0C;CAC/G,IAAI,OAAO,OAAO,UAAU,UAAU,OAAO,IAAI,UAAU,aAAa,oCAAoC;CAC5G,IAAI,OAAO,OAAO,gBAAgB,UAAU,OAAO,IAAI,UAAU,mBAAmB,0CAA0C;CAC9H,IAAI,OAAO,OAAO,eAAe,UAAU,OAAO,IAAI,UAAU,kBAAkB,yCAAyC;CAC3H,IAAI,CAAC,OAAO,eAAe,OAAO,OAAO,gBAAgB,UAAU,OAAO,IAAI,UAAU,mBAAmB,+CAA+C;CAC1J,IAAI,OAAO,OAAO,cAAc,YAAY,OAAO,IAAI,UAAU,iBAAiB,0CAA0C;CAC5H,OAAO,OAAO,OAAO,gBAAgB,WAAW,OAAO,cAAc,KAAK;AAC3E;AACA,SAAS,6BAA6B,YAAY,aAAa,cAAc,QAAQ;CACpF,MAAM,EAAE,SAAS,MAAM,OAAO,UAAU,aAA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3F,6BAA6B,SAAS,WAAW;EACrD,SAAS;EACT,MAAM;EACN,OAAO;EACP;EACA;CACD,GAAG,MAAM;CACT,MAAM,SAAS,OAAO;CACtB,IAAI,WAAW,KAAK,GAAG,IAAI,CAAC,SAAS,MAAM,GAAG,OAAO,IAAI,UAAU,UAAU,iCAAiC;MACzG,6BAA6B,QAAQ,UAAU;EACnD,SAAS;EACT,MAAM;EACN,OAAO;EACP;EACA;CACD,GAAG,MAAM;CACT,mBAAmB,QAAQ,UAAU,UAAU,MAAM;CACrD,iBAAiB,QAAQ,MAAM;CAC/B,mBAAmB,QAAQ,MAAM;CACjC,kBAAkB,QAAQ,MAAM;CAChC,OAAO,OAAO;AACf"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//#region ../../../1-framework/1-core/config/dist/config-validation.d.mts
|
|
2
|
-
//#region src/config-validation.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Top-level config sections. Diagnostics carry the section they concern so
|
|
5
|
-
* commands can fail on the sections they read and ignore the rest.
|
|
6
|
-
*/
|
|
7
|
-
type ConfigSection = 'family' | 'target' | 'adapter' | 'driver' | 'extensions' | 'db' | 'contract' | 'migrations' | 'formatter';
|
|
8
|
-
interface ConfigValidationIssue {
|
|
9
|
-
readonly section: ConfigSection;
|
|
10
|
-
readonly field: string;
|
|
11
|
-
readonly message: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Validates the config structure and returns every problem found, each tagged
|
|
15
|
-
* with the config section it concerns. Pure validation logic with no file I/O
|
|
16
|
-
* or CLI awareness; it never throws.
|
|
17
|
-
*/
|
|
18
|
-
declare function collectConfigIssues(config: Record<string, unknown>): readonly ConfigValidationIssue[];
|
|
19
|
-
//#endregion
|
|
20
|
-
export { ConfigValidationIssue as n, collectConfigIssues as r, ConfigSection as t };
|
|
21
|
-
//# sourceMappingURL=config-validation-Wiqew2J9.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-validation-Wiqew2J9.d.mts","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-validation.d.mts"],"mappings":";;;;;;KAKK;UACK;WACC,SAAS;WACT;WACA;;;;;;;iBAOM,oBAAoB,QAAQ,mCAAmC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-codec-C13hn-14-DfFGo-7T.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/resolve-codec-C13hn-14.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/shared/data-type.ts\nconst DATA_TYPE_ID = /^[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.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\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};\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//#endregion\n//#region src/shared/resolve-codec.ts\nconst CONTRACT_CODEC_DESCRIPTOR_MISSING = \"CONTRACT.CODEC_DESCRIPTOR_MISSING\";\n/**\n* Look up a descriptor for `ref.codecId` using `descriptorFor`; throw\n* `code` if none is found. Each plane names its own error path: the control\n* plane resolves contract-stack descriptors (`CONTRACT.*`), the execution\n* plane resolves at query time (`RUNTIME.*`).\n*/\nfunction resolveCodecDescriptorOrThrow(descriptorFor, ref, code) {\n\tconst descriptor = descriptorFor(ref.codecId);\n\tif (!descriptor) throw runtimeError(code, `No codec descriptor registered for codecId '${ref.codecId}'.`, { codecId: ref.codecId });\n\treturn descriptor;\n}\n/**\n* Validates `ref.typeParams` against `descriptor.paramsSchema`.\n*\n* Parameterized codecs that omit `typeParams` have it normalized to `{}` before\n* validation (mirrors `ast-codec-resolver.ts` semantics). Throws\n* `RUNTIME.TYPE_PARAMS_INVALID` when the validator returns a `Promise` or\n* reports issues.\n*/\nfunction validateCodecTypeParams(descriptor, ref) {\n\tconst normalized = descriptor.isParameterized && ref.typeParams === void 0 ? {\n\t\t...ref,\n\t\ttypeParams: {}\n\t} : ref;\n\tconst result = blindCast(descriptor.paramsSchema[\"~standard\"].validate(normalized.typeParams));\n\tif (result instanceof Promise) throw runtimeError(\"RUNTIME.TYPE_PARAMS_INVALID\", `paramsSchema for codec '${ref.codecId}' returned a Promise; runtime validation requires a synchronous Standard Schema validator.`, {\n\t\tcodecId: ref.codecId,\n\t\ttypeParams: ref.typeParams\n\t});\n\tif (\"issues\" in result && result.issues) {\n\t\tconst messages = result.issues.map((issue) => issue.message).join(\"; \");\n\t\tthrow runtimeError(\"RUNTIME.TYPE_PARAMS_INVALID\", `Invalid typeParams for codec '${ref.codecId}': ${messages}`, {\n\t\t\tcodecId: ref.codecId,\n\t\t\ttypeParams: ref.typeParams\n\t\t});\n\t}\n\treturn blindCast(result).value;\n}\n/**\n* Resolves a `Codec` instance: validates `ref.typeParams` via\n* {@link validateCodecTypeParams} then calls `descriptor.factory(validated)(ctx)`\n* as a method on `descriptor`, preserving `this` for factories that build\n* their returned codec from the descriptor instance (e.g. `new XCodec(this)`).\n*/\nfunction materializeCodec(descriptor, ref, ctx) {\n\tconst validated = validateCodecTypeParams(descriptor, ref);\n\treturn descriptor.factory(validated)(ctx);\n}\n//#endregion\nexport { createDataTypeLookup as a, validateCodecTypeParams as i, materializeCodec as n, dataType as o, resolveCodecDescriptorOrThrow as r, dataTypeId as s, CONTRACT_CODEC_DESCRIPTOR_MISSING as t };\n\n//# sourceMappingURL=resolve-codec-C13hn-14.mjs.map"],"mappings":";;;AAGA,MAAM,eAAe;;AAErB,SAAS,WAAW,IAAI;CACvB,IAAI,CAAC,aAAa,KAAK,EAAE,GAAG,MAAM,aAAa,iCAAiC,IAAI,GAAG,kJAAkJ,EAAE,GAAG,CAAC;CAC/O,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;EACA,GAAG,aAAa,KAAK,IAAI,CAAC,IAAI,EAAE,UAAU;GACzC,IAAI,SAAS,GAAG,IAAI,UAAU;GAC9B,MAAM,SAAS;EAChB,EAAE;CACH;AACD;AACA,SAAS,qBAAqB,OAAO;CACpC,MAAM,OAAO,IAAI,IAAI,MAAM,KAAK,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;CACzD,OAAO;EACN,MAAM,OAAO,KAAK,IAAI,EAAE;EACxB,MAAM,OAAO,KAAK,IAAI,EAAE;CACzB;AACD;AAGA,MAAM,oCAAoC;;;;;;;AAO1C,SAAS,8BAA8B,eAAe,KAAK,MAAM;CAChE,MAAM,aAAa,cAAc,IAAI,OAAO;CAC5C,IAAI,CAAC,YAAY,MAAM,aAAa,MAAM,+CAA+C,IAAI,QAAQ,KAAK,EAAE,SAAS,IAAI,QAAQ,CAAC;CAClI,OAAO;AACR;;;;;;;;;AASA,SAAS,w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