@prisma/get-platform 7.3.0-integration-prisma6-fix-cloudflare-engine.2 → 7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1

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.
@@ -26,14 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_5EPDNTW3_exports = {};
30
- __export(chunk_5EPDNTW3_exports, {
29
+ var chunk_GGL63BNP_exports = {};
30
+ __export(chunk_GGL63BNP_exports, {
31
31
  jestConsoleContext: () => jestConsoleContext,
32
32
  jestContext: () => jestContext,
33
33
  jestStdoutContext: () => jestStdoutContext,
34
34
  processExitContext: () => processExitContext
35
35
  });
36
- module.exports = __toCommonJS(chunk_5EPDNTW3_exports);
36
+ module.exports = __toCommonJS(chunk_GGL63BNP_exports);
37
37
  var import_chunk_3UEKS5W6 = require("./chunk-3UEKS5W6.js");
38
38
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
39
39
  var import_node_path = __toESM(require("node:path"));
@@ -75,6 +75,7 @@ ${[...generateDirectoryTree(children, indent)].join("\n")}
75
75
  overwrite: true
76
76
  });
77
77
  c.fs.symlink(import_node_path.default.join(originalCwd, "..", "client"), import_node_path.default.join(c.fs.cwd(), "node_modules", "@prisma", "client"));
78
+ c.fs.symlink(import_node_path.default.join(originalCwd, "..", "config"), import_node_path.default.join(c.fs.cwd(), "node_modules", "@prisma", "config"));
78
79
  };
79
80
  c.cli = (...input) => {
80
81
  return (0, import_chunk_3UEKS5W6.execaNode)(import_node_path.default.join(originalCwd, "../cli/build/index.js"), input, {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- export { assertNodeAPISupported } from './assertNodeAPISupported';
2
1
  export { type BinaryTarget, binaryTargets } from './binaryTargets';
3
- export { getNodeAPIName } from './getNodeAPIName';
4
2
  export type { PlatformInfo } from './getPlatform';
5
3
  export { getBinaryTargetForCurrentPlatform, getos, getPlatformInfo } from './getPlatform';
6
4
  export { link } from './link';
package/dist/index.js CHANGED
@@ -18,28 +18,24 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var index_exports = {};
20
20
  __export(index_exports, {
21
- assertNodeAPISupported: () => import_chunk_O5EOXX3N.assertNodeAPISupported,
22
21
  binaryTargets: () => import_chunk_7MLUNQIZ.binaryTargets,
23
22
  getBinaryTargetForCurrentPlatform: () => import_chunk_7PMGXL6S.getBinaryTargetForCurrentPlatform,
24
- getNodeAPIName: () => import_chunk_2U36ISZO.getNodeAPIName,
25
23
  getPlatformInfo: () => import_chunk_7PMGXL6S.getPlatformInfo,
26
24
  getos: () => import_chunk_7PMGXL6S.getos,
27
- jestConsoleContext: () => import_chunk_5EPDNTW3.jestConsoleContext,
28
- jestContext: () => import_chunk_5EPDNTW3.jestContext,
29
- jestStdoutContext: () => import_chunk_5EPDNTW3.jestStdoutContext,
25
+ jestConsoleContext: () => import_chunk_GGL63BNP.jestConsoleContext,
26
+ jestContext: () => import_chunk_GGL63BNP.jestContext,
27
+ jestStdoutContext: () => import_chunk_GGL63BNP.jestStdoutContext,
30
28
  link: () => import_chunk_M5T7GI2R.link,
31
- processExitContext: () => import_chunk_5EPDNTW3.processExitContext
29
+ processExitContext: () => import_chunk_GGL63BNP.processExitContext
32
30
  });
33
31
  module.exports = __toCommonJS(index_exports);
34
- var import_chunk_6HZWON4S = require("./chunk-6HZWON4S.js");
35
- var import_chunk_5EPDNTW3 = require("./chunk-5EPDNTW3.js");
36
- var import_chunk_3UEKS5W6 = require("./chunk-3UEKS5W6.js");
37
- var import_chunk_O5EOXX3N = require("./chunk-O5EOXX3N.js");
38
- var import_chunk_2U36ISZO = require("./chunk-2U36ISZO.js");
39
32
  var import_chunk_7PMGXL6S = require("./chunk-7PMGXL6S.js");
40
33
  var import_chunk_M5T7GI2R = require("./chunk-M5T7GI2R.js");
41
34
  var import_chunk_FWMN4WME = require("./chunk-FWMN4WME.js");
42
35
  var import_chunk_YVXCXD3A = require("./chunk-YVXCXD3A.js");
43
36
  var import_chunk_7MLUNQIZ = require("./chunk-7MLUNQIZ.js");
37
+ var import_chunk_6HZWON4S = require("./chunk-6HZWON4S.js");
38
+ var import_chunk_GGL63BNP = require("./chunk-GGL63BNP.js");
39
+ var import_chunk_3UEKS5W6 = require("./chunk-3UEKS5W6.js");
44
40
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
45
41
  (0, import_chunk_7MLUNQIZ.init_binaryTargets)();
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var test_utils_exports = {};
20
20
  __export(test_utils_exports, {
21
- jestConsoleContext: () => import_chunk_5EPDNTW3.jestConsoleContext,
22
- jestContext: () => import_chunk_5EPDNTW3.jestContext,
23
- jestStdoutContext: () => import_chunk_5EPDNTW3.jestStdoutContext,
24
- processExitContext: () => import_chunk_5EPDNTW3.processExitContext
21
+ jestConsoleContext: () => import_chunk_GGL63BNP.jestConsoleContext,
22
+ jestContext: () => import_chunk_GGL63BNP.jestContext,
23
+ jestStdoutContext: () => import_chunk_GGL63BNP.jestStdoutContext,
24
+ processExitContext: () => import_chunk_GGL63BNP.processExitContext
25
25
  });
26
26
  module.exports = __toCommonJS(test_utils_exports);
27
27
  var import_chunk_6HZWON4S = require("../chunk-6HZWON4S.js");
28
- var import_chunk_5EPDNTW3 = require("../chunk-5EPDNTW3.js");
28
+ var import_chunk_GGL63BNP = require("../chunk-GGL63BNP.js");
29
29
  var import_chunk_3UEKS5W6 = require("../chunk-3UEKS5W6.js");
30
30
  var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var jestContext_exports = {};
20
20
  __export(jestContext_exports, {
21
- jestConsoleContext: () => import_chunk_5EPDNTW3.jestConsoleContext,
22
- jestContext: () => import_chunk_5EPDNTW3.jestContext,
23
- jestStdoutContext: () => import_chunk_5EPDNTW3.jestStdoutContext,
24
- processExitContext: () => import_chunk_5EPDNTW3.processExitContext
21
+ jestConsoleContext: () => import_chunk_GGL63BNP.jestConsoleContext,
22
+ jestContext: () => import_chunk_GGL63BNP.jestContext,
23
+ jestStdoutContext: () => import_chunk_GGL63BNP.jestStdoutContext,
24
+ processExitContext: () => import_chunk_GGL63BNP.processExitContext
25
25
  });
26
26
  module.exports = __toCommonJS(jestContext_exports);
27
- var import_chunk_5EPDNTW3 = require("../chunk-5EPDNTW3.js");
27
+ var import_chunk_GGL63BNP = require("../chunk-GGL63BNP.js");
28
28
  var import_chunk_3UEKS5W6 = require("../chunk-3UEKS5W6.js");
29
29
  var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
@@ -40,7 +40,20 @@ var require_jestSnapshotSerializer = (0, import_chunk_2ESYSVXG.__commonJS)({
40
40
  ).replace(/Starting a postgresql pool with \d+ connections./g, "Starting a postgresql pool with XX connections.");
41
41
  }
42
42
  function normalizeTmpDir(str) {
43
- return str.replace(/\/tmp\/([a-z0-9]+)\//g, "/tmp/dir/");
43
+ const tempDirRegexes = [
44
+ // Linux
45
+ /\/tmp\/([a-z0-9]+)/g,
46
+ // macOS
47
+ /\/private\/var\/folders\/[^/]+\/[^/]+\/T\/[a-z0-9]+/g
48
+ ];
49
+ if (process.env.TEMP) {
50
+ const escapedPath = process.env.TEMP.replaceAll("\\", "\\\\");
51
+ tempDirRegexes.push(new RegExp(`${escapedPath}\\\\[a-z0-9]+`, "g"));
52
+ }
53
+ for (const regex of tempDirRegexes) {
54
+ str = str.replace(regex, "/tmp/dir");
55
+ }
56
+ return str;
44
57
  }
45
58
  function trimErrorPaths(str) {
46
59
  const parentDir = path.dirname(path.dirname(path.dirname(__dirname)));
@@ -58,12 +71,6 @@ var require_jestSnapshotSerializer = (0, import_chunk_2ESYSVXG.__commonJS)({
58
71
  function removePlatforms(str) {
59
72
  return str.replace(binaryTargetRegex, "TEST_PLATFORM");
60
73
  }
61
- function normalizeNodeApiLibFilePath(str) {
62
- return str.replace(
63
- /((lib)?query_engine-TEST_PLATFORM\.)(.*)(\.node)/g,
64
- "libquery_engine-TEST_PLATFORM.LIBRARY_TYPE.node"
65
- );
66
- }
67
74
  function normalizeBinaryFilePath(str) {
68
75
  return str.replace(/\.exe(\s+)?(\W.*)/g, "$1$2").replace(/\.exe$/g, "");
69
76
  }
@@ -121,7 +128,6 @@ var require_jestSnapshotSerializer = (0, import_chunk_2ESYSVXG.__commonJS)({
121
128
  // From Client package
122
129
  normalizeGitHubLinks,
123
130
  removePlatforms,
124
- normalizeNodeApiLibFilePath,
125
131
  normalizeBinaryFilePath,
126
132
  normalizeTsClientStackTrace,
127
133
  trimErrorPaths,
@@ -17231,6 +17231,7 @@ ${[...generateDirectoryTree(children, indent)].join("\n")}
17231
17231
  overwrite: true
17232
17232
  });
17233
17233
  c.fs.symlink(import_node_path.default.join(originalCwd, "..", "client"), import_node_path.default.join(c.fs.cwd(), "node_modules", "@prisma", "client"));
17234
+ c.fs.symlink(import_node_path.default.join(originalCwd, "..", "config"), import_node_path.default.join(c.fs.cwd(), "node_modules", "@prisma", "config"));
17234
17235
  };
17235
17236
  c.cli = (...input) => {
17236
17237
  return (0, import_chunk_3UEKS5W6.execaNode)(import_node_path.default.join(originalCwd, "../cli/build/index.js"), input, {
@@ -17319,7 +17320,7 @@ var vitestProcessExitContext = () => (c) => {
17319
17320
  ctx.mocked["process.exit"] = vi.spyOn(process, "exit").mockImplementation((number) => {
17320
17321
  throw new Error("process.exit: " + number);
17321
17322
  });
17322
- ctx.recordedExitCode = () => ctx.mocked["process.exit"].mock.calls[0]?.[0] ?? 0;
17323
+ ctx.recordedExitCode = () => Number(ctx.mocked["process.exit"].mock.calls[0]?.[0] ?? 0);
17323
17324
  });
17324
17325
  afterEach(() => {
17325
17326
  ctx.mocked["process.exit"].mockRestore();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/get-platform",
3
- "version": "7.3.0-integration-prisma6-fix-cloudflare-engine.2",
3
+ "version": "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "@swc/core": "1.11.5",
19
19
  "@swc/jest": "0.2.37",
20
20
  "@types/jest": "29.5.14",
21
- "@types/node": "18.19.76",
21
+ "@types/node": "~20.19.24",
22
22
  "benchmark": "2.1.4",
23
23
  "escape-string-regexp": "5.0.0",
24
24
  "execa": "8.0.1",
@@ -33,7 +33,7 @@
33
33
  "vitest": "3.2.4"
34
34
  },
35
35
  "dependencies": {
36
- "@prisma/debug": "7.3.0-integration-prisma6-fix-cloudflare-engine.2"
36
+ "@prisma/debug": "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1"
37
37
  },
38
38
  "files": [
39
39
  "README.md",
@@ -1,4 +0,0 @@
1
- /**
2
- * Determines whether Node API is supported on the current platform and throws if not
3
- */
4
- export declare function assertNodeAPISupported(): void;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var assertNodeAPISupported_exports = {};
20
- __export(assertNodeAPISupported_exports, {
21
- assertNodeAPISupported: () => import_chunk_O5EOXX3N.assertNodeAPISupported
22
- });
23
- module.exports = __toCommonJS(assertNodeAPISupported_exports);
24
- var import_chunk_O5EOXX3N = require("./chunk-O5EOXX3N.js");
25
- var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_2U36ISZO_exports = {};
20
- __export(chunk_2U36ISZO_exports, {
21
- getNodeAPIName: () => getNodeAPIName
22
- });
23
- module.exports = __toCommonJS(chunk_2U36ISZO_exports);
24
- var NODE_API_QUERY_ENGINE_URL_BASE = "libquery_engine";
25
- function getNodeAPIName(binaryTarget, type) {
26
- const isUrl = type === "url";
27
- if (binaryTarget.includes("windows")) {
28
- return isUrl ? `query_engine.dll.node` : `query_engine-${binaryTarget}.dll.node`;
29
- } else if (binaryTarget.includes("darwin")) {
30
- return isUrl ? `${NODE_API_QUERY_ENGINE_URL_BASE}.dylib.node` : `${NODE_API_QUERY_ENGINE_URL_BASE}-${binaryTarget}.dylib.node`;
31
- } else {
32
- return isUrl ? `${NODE_API_QUERY_ENGINE_URL_BASE}.so.node` : `${NODE_API_QUERY_ENGINE_URL_BASE}-${binaryTarget}.so.node`;
33
- }
34
- }
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_O5EOXX3N_exports = {};
30
- __export(chunk_O5EOXX3N_exports, {
31
- assertNodeAPISupported: () => assertNodeAPISupported
32
- });
33
- module.exports = __toCommonJS(chunk_O5EOXX3N_exports);
34
- var import_fs = __toESM(require("fs"));
35
- function assertNodeAPISupported() {
36
- const customLibraryPath = process.env.PRISMA_QUERY_ENGINE_LIBRARY;
37
- const customLibraryExists = customLibraryPath && import_fs.default.existsSync(customLibraryPath);
38
- if (!customLibraryExists && process.arch === "ia32") {
39
- throw new Error(
40
- `The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set \`engineType = "binary"\` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)`
41
- );
42
- }
43
- }
@@ -1,8 +0,0 @@
1
- import { BinaryTarget } from './binaryTargets';
2
- /**
3
- * Gets Node-API Library name depending on the binary target
4
- * @param binaryTarget
5
- * @param type `fs` gets name used on the file system, `url` gets the name required to download the library from S3
6
- * @returns
7
- */
8
- export declare function getNodeAPIName(binaryTarget: BinaryTarget, type: 'url' | 'fs'): string;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var getNodeAPIName_exports = {};
20
- __export(getNodeAPIName_exports, {
21
- getNodeAPIName: () => import_chunk_2U36ISZO.getNodeAPIName
22
- });
23
- module.exports = __toCommonJS(getNodeAPIName_exports);
24
- var import_chunk_2U36ISZO = require("./chunk-2U36ISZO.js");
25
- var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");