@prisma/orm-family-sql 8.0.0-rc.11-dev.52 → 8.0.0-rc.11-dev.54
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/{config-types-B1S5_Raa.mjs → config-types-DLERgC8A.mjs} +2 -2
- package/dist/{config-types-B1S5_Raa.mjs.map → config-types-DLERgC8A.mjs.map} +1 -1
- package/dist/contract-prisma7__provider.mjs +2 -2
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +2 -2
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__provider.mjs +75 -26
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.mjs +1 -1
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/{interpreter-BcaXUphN-C0qZ0ypa.mjs → interpreter-Cs1cxg-E-N_DDfih-.mjs} +53 -62
- package/dist/interpreter-Cs1cxg-E-N_DDfih-.mjs.map +1 -0
- package/package.json +19 -18
- package/dist/interpreter-BcaXUphN-C0qZ0ypa.mjs.map +0 -1
|
@@ -48,7 +48,7 @@ function typescriptContractFromPath(contractPath, output, options) {
|
|
|
48
48
|
inputs: [contractPath],
|
|
49
49
|
load: async (context) => {
|
|
50
50
|
const [absolutePath] = context.resolvedInputs;
|
|
51
|
-
if (absolutePath === void 0) throw new InternalError("typescriptContractFromPath: context.resolvedInputs is empty. The CLI config loader should populate it
|
|
51
|
+
if (absolutePath === void 0) throw new InternalError("typescriptContractFromPath: context.resolvedInputs is empty. The CLI config loader should populate it from source.inputs.");
|
|
52
52
|
const mod = await import(pathToFileURL(absolutePath).href);
|
|
53
53
|
const contract = mod.default ?? mod.contract;
|
|
54
54
|
if (contract === void 0) throw contractError("CONTRACT.MODULE_EXPORT_MISSING", `typescriptContractFromPath: module at "${absolutePath}" has no "default" or "contract" export.`, { meta: { path: absolutePath } });
|
|
@@ -61,4 +61,4 @@ function typescriptContractFromPath(contractPath, output, options) {
|
|
|
61
61
|
//#endregion
|
|
62
62
|
export { typescriptContract as n, typescriptContractFromPath as r, emptyContract as t };
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=config-types-
|
|
64
|
+
//# sourceMappingURL=config-types-DLERgC8A.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-
|
|
1
|
+
{"version":3,"file":"config-types-DLERgC8A.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-ts/dist/config-types.mjs"],"sourcesContent":["import { i as contractError, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from \"./derived-checks-6WZKIUxH.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { pathToFileURL } from \"node:url\";\nimport { ok } from \"@internal/utils/result\";\nimport { extname } from \"pathe\";\n//#region src/config-types.ts\n/**\n* Derives the emit output path from the TS contract input so artefacts land\n* colocated with the source (e.g. `prisma/contract.ts` →\n* `prisma/contract.json`). Mirrors the same default-derivation logic in\n* `@internal/sql-contract-psl/provider`.\n*/\nfunction defaultOutputFromContractPath(contractPath) {\n\tconst ext = extname(contractPath);\n\tif (ext.length === 0) return `${contractPath}.json`;\n\treturn `${contractPath.slice(0, -ext.length)}.json`;\n}\nfunction emptyContract(options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"typescript\",\n\t\t\tload: async () => {\n\t\t\t\treturn ok(applySqlSpecifierControlPolicy(buildSqlContractFromDefinition({\n\t\t\t\t\twarnings: void 0,\n\t\t\t\t\ttarget: options.target,\n\t\t\t\t\tcreateNamespace: options.createNamespace,\n\t\t\t\t\tmodels: []\n\t\t\t\t}), options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\t...ifDefined(\"output\", options.output)\n\t};\n}\nfunction typescriptContract(contract, output, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"typescript\",\n\t\t\tload: async () => ok(options === void 0 ? contract : applySqlSpecifierControlPolicy(contract, options.defaultControlPolicy, options.createNamespace))\n\t\t},\n\t\t...ifDefined(\"output\", output)\n\t};\n}\nfunction typescriptContractFromPath(contractPath, output, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"typescript\",\n\t\t\tinputs: [contractPath],\n\t\t\tload: async (context) => {\n\t\t\t\tconst [absolutePath] = context.resolvedInputs;\n\t\t\t\tif (absolutePath === void 0) throw new InternalError(\"typescriptContractFromPath: context.resolvedInputs is empty. The CLI config loader should populate it from source.inputs.\");\n\t\t\t\tconst mod = await import(pathToFileURL(absolutePath).href);\n\t\t\t\tconst contract = mod.default ?? mod.contract;\n\t\t\t\tif (contract === void 0) throw contractError(\"CONTRACT.MODULE_EXPORT_MISSING\", `typescriptContractFromPath: module at \"${absolutePath}\" has no \"default\" or \"contract\" export.`, { meta: { path: absolutePath } });\n\t\t\t\treturn ok(options === void 0 ? contract : applySqlSpecifierControlPolicy(contract, options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\toutput: output ?? defaultOutputFromContractPath(contractPath)\n\t};\n}\n//#endregion\nexport { emptyContract, typescriptContract, typescriptContractFromPath };\n\n//# sourceMappingURL=config-types.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,8BAA8B,cAAc;CACpD,MAAM,MAAM,QAAQ,YAAY;CAChC,IAAI,IAAI,WAAW,GAAG,OAAO,GAAG,aAAa;CAC7C,OAAO,GAAG,aAAa,MAAM,GAAG,CAAC,IAAI,MAAM,EAAE;AAC9C;AACA,SAAS,cAAc,SAAS;CAC/B,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,MAAM,YAAY;IACjB,OAAO,GAAG,+BAA+B,+BAA+B;KACvE,UAAU,KAAK;KACf,QAAQ,QAAQ;KAChB,iBAAiB,QAAQ;KACzB,QAAQ,CAAC;IACV,CAAC,GAAG,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GAC3D;EACD;EACA,GAAG,UAAU,UAAU,QAAQ,MAAM;CACtC;AACD;AACA,SAAS,mBAAmB,UAAU,QAAQ,SAAS;CACtD,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,MAAM,YAAY,GAAG,YAAY,KAAK,IAAI,WAAW,+BAA+B,UAAU,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;EACrJ;EACA,GAAG,UAAU,UAAU,MAAM;CAC9B;AACD;AACA,SAAS,2BAA2B,cAAc,QAAQ,SAAS;CAClE,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,QAAQ,CAAC,YAAY;GACrB,MAAM,OAAO,YAAY;IACxB,MAAM,CAAC,gBAAgB,QAAQ;IAC/B,IAAI,iBAAiB,KAAK,GAAG,MAAM,IAAI,cAAc,2HAA2H;IAChL,MAAM,MAAM,MAAM,OAAO,cAAc,YAAY,CAAC,CAAC;IACrD,MAAM,WAAW,IAAI,WAAW,IAAI;IACpC,IAAI,aAAa,KAAK,GAAG,MAAM,cAAc,kCAAkC,0CAA0C,aAAa,2CAA2C,EAAE,MAAM,EAAE,MAAM,aAAa,EAAE,CAAC;IACjN,OAAO,GAAG,YAAY,KAAK,IAAI,WAAW,+BAA+B,UAAU,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GAC1I;EACD;EACA,QAAQ,UAAU,8BAA8B,YAAY;CAC7D;AACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as validateSqlStorageConsistency, l as validateModelStorageReferences } from "./validators-CR2v1106.mjs";
|
|
2
2
|
import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
|
|
3
3
|
import { n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-6WZKIUxH-CWip2UN5.mjs";
|
|
4
|
-
import { c as resolveFieldTypeDescriptor, i as indexFkRelations, n as buildEntityTypesByDiscriminator, o as normalizeReferentialAction, r as entryForTag, s as readDataTypeDefault, t as applyBackrelationCandidates } from "./interpreter-
|
|
4
|
+
import { c as resolveFieldTypeDescriptor, i as indexFkRelations, n as buildEntityTypesByDiscriminator, o as normalizeReferentialAction, r as entryForTag, s as readDataTypeDefault, t as applyBackrelationCandidates } from "./interpreter-Cs1cxg-E-N_DDfih-.mjs";
|
|
5
5
|
import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
6
6
|
import { collectScalarTypeConstructors, instantiateAuthoringEntityType } from "@prisma/orm-framework/components/authoring";
|
|
7
7
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
@@ -1656,7 +1656,7 @@ function prisma7Contract(schemaPath, options) {
|
|
|
1656
1656
|
inputs: [schemaPath],
|
|
1657
1657
|
async load(context) {
|
|
1658
1658
|
const [absolutePath] = context.resolvedInputs;
|
|
1659
|
-
if (absolutePath === void 0) throw new InternalError("prisma7Contract: context.resolvedInputs is empty. The CLI config loader should populate it
|
|
1659
|
+
if (absolutePath === void 0) throw new InternalError("prisma7Contract: context.resolvedInputs is empty. The CLI config loader should populate it from source.inputs.");
|
|
1660
1660
|
let files;
|
|
1661
1661
|
try {
|
|
1662
1662
|
files = await listSchemaFiles(absolutePath, schemaPath);
|