@prisma/orm-postgres 8.0.0-rc.12-dev.14 → 8.0.0-rc.12-dev.15

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import postgresAdapter from "@prisma/orm-target-postgres/adapter/control";
2
- import { defineConfig as defineConfig$1 } from "@prisma/orm-framework/config/config-types";
2
+ import { defaultContractOutputPath, defineConfig as defineConfig$1 } from "@prisma/orm-framework/config/config-types";
3
3
  import postgresDriver from "@prisma/orm-target-postgres/driver/control";
4
4
  import sql from "@prisma/orm-family-sql/family/control";
5
5
  import { prismaContract } from "@prisma/orm-family-sql/contract-psl/provider";
@@ -10,27 +10,9 @@ import postgresPackRef from "@prisma/orm-target-postgres/target/pack";
10
10
  import { postgresCreateNamespace } from "@prisma/orm-target-postgres/target/types";
11
11
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
12
12
  import { extname, join } from "pathe";
13
- import { isDynamicPattern } from "tinyglobby";
14
13
  import { prisma7Contract } from "@prisma/orm-family-sql/contract-prisma7/provider";
15
14
  import { prisma7PostgresBinding } from "@prisma/orm-target-postgres/target/prisma7-binding";
16
15
  //#region ../../../3-extensions/postgres/dist/config.mjs
17
- function staticPrefixDirectory(pattern) {
18
- const staticSegments = [];
19
- for (const segment of pattern.replaceAll("\\", "/").split("/")) {
20
- if (isDynamicPattern(segment)) break;
21
- staticSegments.push(segment);
22
- }
23
- return staticSegments.join("/");
24
- }
25
- function deriveOutputPath(contractPath) {
26
- if (isDynamicPattern(contractPath)) {
27
- const prefix = staticPrefixDirectory(contractPath);
28
- return prefix.length === 0 ? "contract.json" : `${prefix}/contract.json`;
29
- }
30
- const ext = extname(contractPath);
31
- if (ext.length === 0) return `${contractPath}.json`;
32
- return `${contractPath.slice(0, -ext.length)}.json`;
33
- }
34
16
  function contractConfigFromPath(contractPath, output) {
35
17
  return extname(contractPath) === ".ts" ? typescriptContractFromPath(contractPath, output) : prismaContract(contractPath, {
36
18
  output,
@@ -44,9 +26,9 @@ function contractConfigFromPath(contractPath, output) {
44
26
  }
45
27
  function resolveContractConfig(options) {
46
28
  const explicitOutput = options.output !== void 0 ? join(options.output, "contract.json") : void 0;
47
- if (typeof options.contract === "string") return contractConfigFromPath(options.contract, explicitOutput ?? deriveOutputPath(options.contract));
29
+ if (typeof options.contract === "string") return contractConfigFromPath(options.contract, explicitOutput ?? defaultContractOutputPath(options.contract));
48
30
  const firstInput = options.contract.source.inputs?.[0];
49
- const output = explicitOutput ?? options.contract.output ?? (firstInput !== void 0 ? deriveOutputPath(firstInput) : void 0);
31
+ const output = explicitOutput ?? options.contract.output ?? (firstInput !== void 0 ? defaultContractOutputPath(firstInput) : void 0);
50
32
  return {
51
33
  ...options.contract,
52
34
  ...ifDefined("output", output)
@@ -1 +1 @@
1
- {"version":3,"file":"config.mjs","names":[],"sources":["../../../../3-extensions/postgres/dist/config.mjs"],"sourcesContent":["import postgresAdapter from \"@internal/adapter-postgres/control\";\nimport { defineConfig as defineConfig$1 } from \"@internal/config/config-types\";\nimport postgresDriver from \"@internal/driver-postgres/control\";\nimport sql from \"@internal/family-sql/control\";\nimport { prismaContract } from \"@internal/sql-contract-psl/provider\";\nimport { typescriptContractFromPath } from \"@internal/sql-contract-ts/config-types\";\nimport { PG_INT_CODEC_ID, PG_TEXT_CODEC_ID } from \"@internal/target-postgres/codec-ids\";\nimport postgres from \"@internal/target-postgres/control\";\nimport postgresPackRef from \"@internal/target-postgres/pack\";\nimport { postgresCreateNamespace } from \"@internal/target-postgres/types\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { extname, join } from \"pathe\";\nimport { isDynamicPattern } from \"tinyglobby\";\nimport { prisma7Contract } from \"@internal/sql-contract-prisma7/provider\";\nimport { prisma7PostgresBinding } from \"@internal/target-postgres/prisma7-binding\";\n//#region src/config/define-config.ts\nfunction staticPrefixDirectory(pattern) {\n\tconst staticSegments = [];\n\tfor (const segment of pattern.replaceAll(\"\\\\\", \"/\").split(\"/\")) {\n\t\tif (isDynamicPattern(segment)) break;\n\t\tstaticSegments.push(segment);\n\t}\n\treturn staticSegments.join(\"/\");\n}\nfunction deriveOutputPath(contractPath) {\n\tif (isDynamicPattern(contractPath)) {\n\t\tconst prefix = staticPrefixDirectory(contractPath);\n\t\treturn prefix.length === 0 ? \"contract.json\" : `${prefix}/contract.json`;\n\t}\n\tconst ext = extname(contractPath);\n\tif (ext.length === 0) return `${contractPath}.json`;\n\treturn `${contractPath.slice(0, -ext.length)}.json`;\n}\nfunction contractConfigFromPath(contractPath, output) {\n\treturn extname(contractPath) === \".ts\" ? typescriptContractFromPath(contractPath, output) : prismaContract(contractPath, {\n\t\toutput,\n\t\ttarget: postgresPackRef,\n\t\tcreateNamespace: postgresCreateNamespace,\n\t\tenumInferenceCodecs: {\n\t\t\ttext: PG_TEXT_CODEC_ID,\n\t\t\tint: PG_INT_CODEC_ID\n\t\t}\n\t});\n}\nfunction resolveContractConfig(options) {\n\tconst explicitOutput = options.output !== void 0 ? join(options.output, \"contract.json\") : void 0;\n\tif (typeof options.contract === \"string\") return contractConfigFromPath(options.contract, explicitOutput ?? deriveOutputPath(options.contract));\n\tconst firstInput = options.contract.source.inputs?.[0];\n\tconst output = explicitOutput ?? options.contract.output ?? (firstInput !== void 0 ? deriveOutputPath(firstInput) : void 0);\n\treturn {\n\t\t...options.contract,\n\t\t...ifDefined(\"output\", output)\n\t};\n}\nfunction defineConfig(options) {\n\treturn defineConfig$1({\n\t\tfamily: sql,\n\t\ttarget: postgres,\n\t\tadapter: postgresAdapter,\n\t\tdriver: postgresDriver,\n\t\textensions: options.extensions ?? [],\n\t\tcontract: resolveContractConfig(options),\n\t\t...ifDefined(\"db\", options.db),\n\t\t...ifDefined(\"migrations\", options.migrations)\n\t});\n}\n//#endregion\n//#region src/config/prisma7-schema.ts\n/**\n* Reads a Prisma 7 `schema.prisma` (or a directory of `.prisma` files) as the\n* contract source, so Prisma 8 can adopt a database Prisma 7 still migrates.\n*/\nfunction prisma7Schema(schemaPath) {\n\treturn prisma7Contract(schemaPath, { binding: prisma7PostgresBinding });\n}\n//#endregion\nexport { defineConfig, prisma7Schema };\n\n//# sourceMappingURL=config.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,CAAC;CACxB,KAAK,MAAM,WAAW,QAAQ,WAAW,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,GAAG;EAC/D,IAAI,iBAAiB,OAAO,GAAG;EAC/B,eAAe,KAAK,OAAO;CAC5B;CACA,OAAO,eAAe,KAAK,GAAG;AAC/B;AACA,SAAS,iBAAiB,cAAc;CACvC,IAAI,iBAAiB,YAAY,GAAG;EACnC,MAAM,SAAS,sBAAsB,YAAY;EACjD,OAAO,OAAO,WAAW,IAAI,kBAAkB,GAAG,OAAO;CAC1D;CACA,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,uBAAuB,cAAc,QAAQ;CACrD,OAAO,QAAQ,YAAY,MAAM,QAAQ,2BAA2B,cAAc,MAAM,IAAI,eAAe,cAAc;EACxH;EACA,QAAQ;EACR,iBAAiB;EACjB,qBAAqB;GACpB,MAAM;GACN,KAAK;EACN;CACD,CAAC;AACF;AACA,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,QAAQ,WAAW,KAAK,IAAI,KAAK,QAAQ,QAAQ,eAAe,IAAI,KAAK;CAChG,IAAI,OAAO,QAAQ,aAAa,UAAU,OAAO,uBAAuB,QAAQ,UAAU,kBAAkB,iBAAiB,QAAQ,QAAQ,CAAC;CAC9I,MAAM,aAAa,QAAQ,SAAS,OAAO,SAAS;CACpD,MAAM,SAAS,kBAAkB,QAAQ,SAAS,WAAW,eAAe,KAAK,IAAI,iBAAiB,UAAU,IAAI,KAAK;CACzH,OAAO;EACN,GAAG,QAAQ;EACX,GAAG,UAAU,UAAU,MAAM;CAC9B;AACD;AACA,SAAS,aAAa,SAAS;CAC9B,OAAO,eAAe;EACrB,QAAQ;EACR,QAAQ;EACR,SAAS;EACT,QAAQ;EACR,YAAY,QAAQ,cAAc,CAAC;EACnC,UAAU,sBAAsB,OAAO;EACvC,GAAG,UAAU,MAAM,QAAQ,EAAE;EAC7B,GAAG,UAAU,cAAc,QAAQ,UAAU;CAC9C,CAAC;AACF;;;;;AAOA,SAAS,cAAc,YAAY;CAClC,OAAO,gBAAgB,YAAY,EAAE,SAAS,uBAAuB,CAAC;AACvE"}
1
+ {"version":3,"file":"config.mjs","names":[],"sources":["../../../../3-extensions/postgres/dist/config.mjs"],"sourcesContent":["import postgresAdapter from \"@internal/adapter-postgres/control\";\nimport { defaultContractOutputPath, defineConfig as defineConfig$1 } from \"@internal/config/config-types\";\nimport postgresDriver from \"@internal/driver-postgres/control\";\nimport sql from \"@internal/family-sql/control\";\nimport { prismaContract } from \"@internal/sql-contract-psl/provider\";\nimport { typescriptContractFromPath } from \"@internal/sql-contract-ts/config-types\";\nimport { PG_INT_CODEC_ID, PG_TEXT_CODEC_ID } from \"@internal/target-postgres/codec-ids\";\nimport postgres from \"@internal/target-postgres/control\";\nimport postgresPackRef from \"@internal/target-postgres/pack\";\nimport { postgresCreateNamespace } from \"@internal/target-postgres/types\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { extname, join } from \"pathe\";\nimport { prisma7Contract } from \"@internal/sql-contract-prisma7/provider\";\nimport { prisma7PostgresBinding } from \"@internal/target-postgres/prisma7-binding\";\n//#region src/config/define-config.ts\nfunction contractConfigFromPath(contractPath, output) {\n\treturn extname(contractPath) === \".ts\" ? typescriptContractFromPath(contractPath, output) : prismaContract(contractPath, {\n\t\toutput,\n\t\ttarget: postgresPackRef,\n\t\tcreateNamespace: postgresCreateNamespace,\n\t\tenumInferenceCodecs: {\n\t\t\ttext: PG_TEXT_CODEC_ID,\n\t\t\tint: PG_INT_CODEC_ID\n\t\t}\n\t});\n}\nfunction resolveContractConfig(options) {\n\tconst explicitOutput = options.output !== void 0 ? join(options.output, \"contract.json\") : void 0;\n\tif (typeof options.contract === \"string\") return contractConfigFromPath(options.contract, explicitOutput ?? defaultContractOutputPath(options.contract));\n\tconst firstInput = options.contract.source.inputs?.[0];\n\tconst output = explicitOutput ?? options.contract.output ?? (firstInput !== void 0 ? defaultContractOutputPath(firstInput) : void 0);\n\treturn {\n\t\t...options.contract,\n\t\t...ifDefined(\"output\", output)\n\t};\n}\nfunction defineConfig(options) {\n\treturn defineConfig$1({\n\t\tfamily: sql,\n\t\ttarget: postgres,\n\t\tadapter: postgresAdapter,\n\t\tdriver: postgresDriver,\n\t\textensions: options.extensions ?? [],\n\t\tcontract: resolveContractConfig(options),\n\t\t...ifDefined(\"db\", options.db),\n\t\t...ifDefined(\"migrations\", options.migrations)\n\t});\n}\n//#endregion\n//#region src/config/prisma7-schema.ts\n/**\n* Reads a Prisma 7 `schema.prisma` (or a directory of `.prisma` files) as the\n* contract source, so Prisma 8 can adopt a database Prisma 7 still migrates.\n*/\nfunction prisma7Schema(schemaPath) {\n\treturn prisma7Contract(schemaPath, { binding: prisma7PostgresBinding });\n}\n//#endregion\nexport { defineConfig, prisma7Schema };\n\n//# sourceMappingURL=config.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,uBAAuB,cAAc,QAAQ;CACrD,OAAO,QAAQ,YAAY,MAAM,QAAQ,2BAA2B,cAAc,MAAM,IAAI,eAAe,cAAc;EACxH;EACA,QAAQ;EACR,iBAAiB;EACjB,qBAAqB;GACpB,MAAM;GACN,KAAK;EACN;CACD,CAAC;AACF;AACA,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,QAAQ,WAAW,KAAK,IAAI,KAAK,QAAQ,QAAQ,eAAe,IAAI,KAAK;CAChG,IAAI,OAAO,QAAQ,aAAa,UAAU,OAAO,uBAAuB,QAAQ,UAAU,kBAAkB,0BAA0B,QAAQ,QAAQ,CAAC;CACvJ,MAAM,aAAa,QAAQ,SAAS,OAAO,SAAS;CACpD,MAAM,SAAS,kBAAkB,QAAQ,SAAS,WAAW,eAAe,KAAK,IAAI,0BAA0B,UAAU,IAAI,KAAK;CAClI,OAAO;EACN,GAAG,QAAQ;EACX,GAAG,UAAU,UAAU,MAAM;CAC9B;AACD;AACA,SAAS,aAAa,SAAS;CAC9B,OAAO,eAAe;EACrB,QAAQ;EACR,QAAQ;EACR,SAAS;EACT,QAAQ;EACR,YAAY,QAAQ,cAAc,CAAC;EACnC,UAAU,sBAAsB,OAAO;EACvC,GAAG,UAAU,MAAM,QAAQ,EAAE;EAC7B,GAAG,UAAU,cAAc,QAAQ,UAAU;CAC9C,CAAC;AACF;;;;;AAOA,SAAS,cAAc,YAAY;CAClC,OAAO,gBAAgB,YAAY,EAAE,SAAS,uBAAuB,CAAC;AACvE"}
@@ -0,0 +1 @@
1
+ export * from "@prisma/orm-family-sql/family/psl-build";
@@ -0,0 +1,2 @@
1
+ export * from "@prisma/orm-family-sql/family/psl-build";
2
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-postgres",
3
- "version": "8.0.0-rc.12-dev.14",
3
+ "version": "8.0.0-rc.12-dev.15",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -10,10 +10,10 @@
10
10
  "skills"
11
11
  ],
12
12
  "dependencies": {
13
- "@prisma/orm-family-sql": "8.0.0-rc.12-dev.14",
14
- "@prisma/orm-framework": "8.0.0-rc.12-dev.14",
15
- "@prisma/orm-target-postgres": "8.0.0-rc.12-dev.14",
16
- "@prisma/orm-toolchain": "8.0.0-rc.12-dev.14",
13
+ "@prisma/orm-family-sql": "8.0.0-rc.12-dev.15",
14
+ "@prisma/orm-framework": "8.0.0-rc.12-dev.15",
15
+ "@prisma/orm-target-postgres": "8.0.0-rc.12-dev.15",
16
+ "@prisma/orm-toolchain": "8.0.0-rc.12-dev.15",
17
17
  "@types/node": "26.1.2",
18
18
  "@types/pg": "8.20.4",
19
19
  "pathe": "^2.0.3",
@@ -21,9 +21,9 @@
21
21
  "tinyglobby": "^0.2.17"
22
22
  },
23
23
  "devDependencies": {
24
- "@internal/postgres": "8.0.0-rc.12-dev.14",
25
- "@repo/tsconfig": "8.0.0-rc.12-dev.14",
26
- "@repo/tsdown": "8.0.0-rc.12-dev.14",
24
+ "@internal/postgres": "8.0.0-rc.12-dev.15",
25
+ "@repo/tsconfig": "8.0.0-rc.12-dev.15",
26
+ "@repo/tsdown": "8.0.0-rc.12-dev.15",
27
27
  "tsdown": "0.22.14",
28
28
  "typescript": "5.9.3"
29
29
  },
@@ -81,6 +81,7 @@
81
81
  "./family/ir": "./dist/family__ir.mjs",
82
82
  "./family/migration": "./dist/family__migration.mjs",
83
83
  "./family/pack": "./dist/family__pack.mjs",
84
+ "./family/psl-build": "./dist/family__psl-build.mjs",
84
85
  "./family/psl-infer": "./dist/family__psl-infer.mjs",
85
86
  "./family/runtime": "./dist/family__runtime.mjs",
86
87
  "./family/verify": "./dist/family__verify.mjs",
@@ -15,7 +15,7 @@ description: >-
15
15
  ORM 7 or earlier (schema.prisma + @prisma/client).
16
16
  metadata:
17
17
  library: '@prisma/orm-postgres'
18
- library_version: '8.0.0-rc.12-dev.14'
18
+ library_version: '8.0.0-rc.12-dev.15'
19
19
  version: '2026-09-12'
20
20
  ---
21
21