@prisma/internals 6.19.0-integration-engines-6-19-0-32-next-568b222d0ab829bbbe5f2fd48ed587836813346c.1 → 6.19.0-integration-feat-remove-library-engine.5

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.
Files changed (116) hide show
  1. package/dist/{chunk-DK5SCKNO.js → chunk-2KREE2OX.js} +5 -5
  2. package/dist/{chunk-JOIIWB3U.js → chunk-2LOGW45F.js} +68 -33
  3. package/dist/{chunk-ISSTUMGH.js → chunk-2THJ6XVV.js} +12 -12
  4. package/dist/{chunk-BVJP43JS.js → chunk-32LLAKF4.js} +13 -784
  5. package/dist/{chunk-4HCWAIVZ.js → chunk-33FYCEWF.js} +14 -20
  6. package/dist/{chunk-FYZCPL2Z.js → chunk-3CAPLXKF.js} +5 -8
  7. package/dist/{chunk-I6WLABB2.js → chunk-3WXUQZS7.js} +14 -5
  8. package/dist/{chunk-U2GOPCRA.js → chunk-4AHWN4VZ.js} +5 -5
  9. package/dist/{chunk-OAT7ZJED.js → chunk-4YDN7W7B.js} +7 -20
  10. package/dist/{chunk-TGOAMULH.js → chunk-4ZYCASUI.js} +8 -9
  11. package/dist/{chunk-SH2TNBI6.js → chunk-5B5U2HVK.js} +7 -8
  12. package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
  13. package/dist/{chunk-F2OZV76L.js → chunk-5MHUYAV3.js} +9 -9
  14. package/dist/{chunk-HO5HRHFZ.js → chunk-5W3BSMTH.js} +3 -6
  15. package/dist/{chunk-2MJTY4KQ.js → chunk-6FP5PMMX.js} +5 -5
  16. package/dist/{chunk-YU52YNDP.js → chunk-6QTJ35DP.js} +12 -12
  17. package/dist/{chunk-PWLNUJDJ.js → chunk-7PEHIVPK.js} +5 -5
  18. package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
  19. package/dist/{chunk-HFFWZTVM.js → chunk-BUQN4WLU.js} +7 -9
  20. package/dist/{chunk-HHG4DGHC.js → chunk-CGLLQXZE.js} +11 -12
  21. package/dist/{chunk-GMW36QQF.js → chunk-DOO45FN6.js} +7 -7
  22. package/dist/chunk-DYV47NUW.js +796 -0
  23. package/dist/{chunk-IDINCQMN.js → chunk-FF7OLLBP.js} +12 -784
  24. package/dist/{chunk-ZKW5OHDA.js → chunk-FP5T5YD3.js} +5 -5
  25. package/dist/{chunk-4CGPN5SR.js → chunk-GJSFP4V4.js} +3 -9
  26. package/dist/{chunk-4JCVHBYR.js → chunk-GL7OANR6.js} +5 -5
  27. package/dist/{chunk-VDOBMNYY.js → chunk-HBU4ZVCA.js} +11 -11
  28. package/dist/{chunk-DSG2XXJJ.js → chunk-HQE53CGA.js} +11 -11
  29. package/dist/{chunk-UHI6VYFX.js → chunk-IHC4ZVPQ.js} +5 -5
  30. package/dist/{chunk-D4VDA2TZ.js → chunk-IRWX4FCC.js} +6 -6
  31. package/dist/{chunk-UQUWZJVN.js → chunk-IU77SCOB.js} +9 -9
  32. package/dist/{chunk-RIACS7RB.js → chunk-JGAJWFOG.js} +5 -5
  33. package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
  34. package/dist/{chunk-LBEUT2S6.js → chunk-KZ5SMOBR.js} +5 -5
  35. package/dist/{chunk-AX5N26KG.js → chunk-L2CX3ZWZ.js} +6 -6
  36. package/dist/{chunk-JD36HS5L.js → chunk-LQA25XWD.js} +14 -20
  37. package/dist/{chunk-RKDOMYIG.js → chunk-M6PZRD57.js} +38 -71
  38. package/dist/{chunk-DX7WJ45H.js → chunk-MEBZK5AR.js} +5 -5
  39. package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
  40. package/dist/{chunk-PZEUONUZ.js → chunk-MK4IWFSR.js} +11 -11
  41. package/dist/{chunk-TQFONRJP.js → chunk-MXAUURHG.js} +5 -5
  42. package/dist/{chunk-7QC5VORA.js → chunk-MYLPCGTT.js} +5 -5
  43. package/dist/{chunk-EYVG6XQS.js → chunk-OKVM3CW4.js} +3 -39
  44. package/dist/{chunk-IKIW52QS.js → chunk-PSACKRZB.js} +11 -11
  45. package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
  46. package/dist/{chunk-75BIJ5PX.js → chunk-UB2X7DGZ.js} +9 -9
  47. package/dist/{chunk-N3UPGHTD.js → chunk-WC5A3H4V.js} +38 -71
  48. package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
  49. package/dist/cli/checkUnsupportedDataProxy.js +56 -62
  50. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +56 -62
  51. package/dist/cli/getGeneratorSuccessMessage.js +2 -3
  52. package/dist/cli/getSchema.d.ts +1 -15
  53. package/dist/cli/getSchema.js +4 -5
  54. package/dist/cli/hashes.js +4 -4
  55. package/dist/cli/schemaContext.d.ts +1 -3
  56. package/dist/cli/schemaContext.js +56 -62
  57. package/dist/engine-commands/errorHelpers.js +4 -4
  58. package/dist/engine-commands/formatSchema.js +55 -61
  59. package/dist/engine-commands/getConfig.d.ts +0 -1
  60. package/dist/engine-commands/getConfig.js +13 -13
  61. package/dist/engine-commands/getDmmf.js +10 -10
  62. package/dist/engine-commands/getEngineVersion.js +6 -9
  63. package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
  64. package/dist/engine-commands/getEnginesInfo.js +7 -9
  65. package/dist/engine-commands/index.js +67 -73
  66. package/dist/engine-commands/lintSchema.js +9 -9
  67. package/dist/engine-commands/mergeSchemas.js +10 -10
  68. package/dist/engine-commands/queryEngineCommons.js +6 -6
  69. package/dist/engine-commands/validate.js +10 -10
  70. package/dist/errorReporting.js +6 -6
  71. package/dist/get-generators/getGenerators.d.ts +0 -1
  72. package/dist/get-generators/getGenerators.js +58 -64
  73. package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
  74. package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
  75. package/dist/get-generators/utils/getBinaryPathsByVersion.js +6 -5
  76. package/dist/getPackedPackage.js +4 -3
  77. package/dist/index.d.ts +1 -8
  78. package/dist/index.js +101 -115
  79. package/dist/{multipart-parser-3AFJFP6K.js → multipart-parser-UV3WZSWW.js} +6 -6
  80. package/dist/resolveBinary.js +8 -7
  81. package/dist/schemaEngineCommands.js +9 -8
  82. package/dist/sendPanic.js +4 -4
  83. package/dist/utils/canPrompt.js +3 -3
  84. package/dist/utils/cloudflareD1.js +3 -3
  85. package/dist/utils/drawBox.js +2 -2
  86. package/dist/utils/fs-functional.js +10 -10
  87. package/dist/utils/fs-utils.js +8 -8
  88. package/dist/utils/getVersionFromPackageJson.js +3 -3
  89. package/dist/utils/handlePanic.js +8 -8
  90. package/dist/utils/link.js +2 -2
  91. package/dist/utils/missingDatasource.js +3 -3
  92. package/dist/utils/missingGeneratorMessage.js +5 -5
  93. package/dist/utils/serializeQueryEngineName.js +2 -2
  94. package/dist/wasm.js +5 -5
  95. package/package.json +15 -16
  96. package/dist/chunk-3FP46GUV.js +0 -471
  97. package/dist/chunk-46ABODUM.js +0 -186
  98. package/dist/chunk-6TTRTZXU.js +0 -37
  99. package/dist/chunk-DZYINYAA.js +0 -68
  100. package/dist/chunk-ERSH2BQA.js +0 -58
  101. package/dist/chunk-PZMRR772.js +0 -41
  102. package/dist/chunk-T2PM5TKT.js +0 -55
  103. package/dist/client/getClientEngineType.d.ts +0 -7
  104. package/dist/client/getClientEngineType.js +0 -26
  105. package/dist/dotenvExpand.d.ts +0 -35
  106. package/dist/dotenvExpand.js +0 -25
  107. package/dist/utils/getEnvPaths.d.ts +0 -14
  108. package/dist/utils/getEnvPaths.js +0 -29
  109. package/dist/utils/handleEngineLoadingErrors.d.ts +0 -8
  110. package/dist/utils/handleEngineLoadingErrors.js +0 -27
  111. package/dist/utils/load.d.ts +0 -6
  112. package/dist/utils/load.js +0 -28
  113. package/dist/utils/loadEnvFile.d.ts +0 -10
  114. package/dist/utils/loadEnvFile.js +0 -30
  115. package/dist/utils/tryLoadEnvs.d.ts +0 -25
  116. package/dist/utils/tryLoadEnvs.js +0 -30
@@ -1,186 +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_46ABODUM_exports = {};
30
- __export(chunk_46ABODUM_exports, {
31
- getEnvPaths: () => getEnvPaths
32
- });
33
- module.exports = __toCommonJS(chunk_46ABODUM_exports);
34
- var import_chunk_3FP46GUV = require("./chunk-3FP46GUV.js");
35
- var import_chunk_EYVG6XQS = require("./chunk-EYVG6XQS.js");
36
- var import_debug = __toESM(require("@prisma/debug"));
37
- var import_node_path = __toESM(require("node:path"));
38
- var import_node_process = __toESM(require("node:process"));
39
- var import_node_path2 = __toESM(require("node:path"));
40
- var import_node_fs = __toESM(require("node:fs"));
41
- var import_node_url = require("node:url");
42
- var import_node_url2 = require("node:url");
43
- var import_node_fs2 = __toESM(require("node:fs"));
44
- var import_fs = __toESM(require("fs"));
45
- var import_path = __toESM(require("path"));
46
- var typeMappings = {
47
- directory: "isDirectory",
48
- file: "isFile"
49
- };
50
- function checkType(type) {
51
- if (Object.hasOwnProperty.call(typeMappings, type)) {
52
- return;
53
- }
54
- throw new Error(`Invalid type specified: ${type}`);
55
- }
56
- var matchType = (type, stat) => stat[typeMappings[type]]();
57
- var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
58
- function locatePathSync(paths, {
59
- cwd = import_node_process.default.cwd(),
60
- type = "file",
61
- allowSymlinks = true
62
- } = {}) {
63
- checkType(type);
64
- cwd = toPath(cwd);
65
- const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
66
- for (const path_ of paths) {
67
- try {
68
- const stat = statFunction(import_node_path2.default.resolve(cwd, path_), {
69
- throwIfNoEntry: false
70
- });
71
- if (!stat) {
72
- continue;
73
- }
74
- if (matchType(type, stat)) {
75
- return path_;
76
- }
77
- } catch {
78
- }
79
- }
80
- }
81
- function toPath2(urlOrPath) {
82
- return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
83
- }
84
- function pathExistsSync(path4) {
85
- try {
86
- import_node_fs2.default.accessSync(path4);
87
- return true;
88
- } catch {
89
- return false;
90
- }
91
- }
92
- var findUpStop = Symbol("findUpStop");
93
- function findUpMultipleSync(name, options = {}) {
94
- let directory = import_node_path.default.resolve(toPath2(options.cwd) ?? "");
95
- const { root } = import_node_path.default.parse(directory);
96
- const stopAt = import_node_path.default.resolve(directory, toPath2(options.stopAt) ?? root);
97
- const limit = options.limit ?? Number.POSITIVE_INFINITY;
98
- const paths = [name].flat();
99
- const runMatcher = (locateOptions) => {
100
- if (typeof name !== "function") {
101
- return locatePathSync(paths, locateOptions);
102
- }
103
- const foundPath = name(locateOptions.cwd);
104
- if (typeof foundPath === "string") {
105
- return locatePathSync([foundPath], locateOptions);
106
- }
107
- return foundPath;
108
- };
109
- const matches = [];
110
- while (true) {
111
- const foundPath = runMatcher({ ...options, cwd: directory });
112
- if (foundPath === findUpStop) {
113
- break;
114
- }
115
- if (foundPath) {
116
- matches.push(import_node_path.default.resolve(directory, foundPath));
117
- }
118
- if (directory === stopAt || matches.length >= limit) {
119
- break;
120
- }
121
- directory = import_node_path.default.dirname(directory);
122
- }
123
- return matches;
124
- }
125
- function findUpSync(name, options = {}) {
126
- const matches = findUpMultipleSync(name, { ...options, limit: 1 });
127
- return matches[0];
128
- }
129
- var debug = (0, import_debug.default)("prisma:loadEnv");
130
- async function getEnvPaths(schemaPath, opts = { cwd: process.cwd() }) {
131
- const rootEnvPath = getProjectRootEnvPath({ cwd: opts.cwd }) ?? null;
132
- const schemaEnvPathFromArgs = schemaPathToEnvPath(schemaPath);
133
- const schemaEnvPathFromPkgJson = schemaPathToEnvPath(await readSchemaPathFromPkgJson());
134
- const schemaEnvPaths = [
135
- schemaEnvPathFromArgs,
136
- // 1 - Check --schema directory for .env
137
- schemaEnvPathFromPkgJson,
138
- // 2 - Check package.json schema directory for .env
139
- "./prisma/.env",
140
- // 3 - Check ./prisma directory for .env
141
- "./.env"
142
- // 4 - Check cwd for .env
143
- ];
144
- const schemaEnvPath = schemaEnvPaths.find(import_chunk_3FP46GUV.exists);
145
- return { rootEnvPath, schemaEnvPath };
146
- }
147
- async function readSchemaPathFromPkgJson() {
148
- try {
149
- const pkgJsonSchema = await (0, import_chunk_EYVG6XQS.getSchemaFromPackageJson)(process.cwd());
150
- if (pkgJsonSchema.ok) {
151
- pkgJsonSchema.schema.schemaPath;
152
- }
153
- return null;
154
- } catch {
155
- return null;
156
- }
157
- }
158
- function getProjectRootEnvPath(opts) {
159
- const pkgJsonPath = findUpSync((dir) => {
160
- const pkgPath = import_path.default.join(dir, "package.json");
161
- if (pathExistsSync(pkgPath)) {
162
- try {
163
- const pkg = JSON.parse(import_fs.default.readFileSync(pkgPath, "utf8"));
164
- if (pkg["name"] !== ".prisma/client") {
165
- debug(`project root found at ${pkgPath}`);
166
- return pkgPath;
167
- }
168
- } catch (e) {
169
- debug(`skipping package.json at ${pkgPath}`);
170
- }
171
- }
172
- return void 0;
173
- }, opts);
174
- if (!pkgJsonPath) {
175
- return null;
176
- }
177
- const candidate = import_path.default.join(import_path.default.dirname(pkgJsonPath), ".env");
178
- if (!import_fs.default.existsSync(candidate)) {
179
- return null;
180
- }
181
- return candidate;
182
- }
183
- function schemaPathToEnvPath(schemaPath) {
184
- if (!schemaPath) return null;
185
- return import_path.default.join(import_path.default.dirname(schemaPath), ".env");
186
- }
@@ -1,37 +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_6TTRTZXU_exports = {};
20
- __export(chunk_6TTRTZXU_exports, {
21
- loadLibrary: () => loadLibrary
22
- });
23
- module.exports = __toCommonJS(chunk_6TTRTZXU_exports);
24
- var import_chunk_DZYINYAA = require("./chunk-DZYINYAA.js");
25
- var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
26
- function loadLibrary(id, platformInfo) {
27
- try {
28
- return (0, import_chunk_4VNS5WPM.__require)(id);
29
- } catch (e) {
30
- const errorMessage = (0, import_chunk_DZYINYAA.handleLibraryLoadingErrors)({
31
- e,
32
- platformInfo,
33
- id
34
- });
35
- throw new Error(errorMessage);
36
- }
37
- }
@@ -1,68 +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_DZYINYAA_exports = {};
20
- __export(chunk_DZYINYAA_exports, {
21
- handleLibraryLoadingErrors: () => handleLibraryLoadingErrors
22
- });
23
- module.exports = __toCommonJS(chunk_DZYINYAA_exports);
24
- var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
25
- var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
26
- var import_get_platform = require("@prisma/get-platform");
27
- function handleLibraryLoadingErrors(args) {
28
- const error = args.e;
29
- const systemLibraryNotFound = (library) => `Prisma cannot find the required \`${library}\` system library in your system`;
30
- const hasLinkingProblem = error.message.includes("cannot open shared object file");
31
- const referToSystemRequirementsDocs = `Please refer to the documentation about Prisma's system requirements: ${(0, import_get_platform.link)(
32
- "https://pris.ly/d/system-requirements"
33
- )}`;
34
- const errorTitle = `Unable to require(\`${(0, import_chunk_PG5FDKSF.dim)(args.id)}\`).`;
35
- const potentialReasonMessage = (0, import_chunk_XKZ6CBLA.z)({ message: error.message, code: error.code }).with({ code: "ENOENT" }, () => `File does not exist.`).when(
36
- ({ message }) => hasLinkingProblem && message.includes("libz"),
37
- () => {
38
- return `${systemLibraryNotFound("libz")}. Please install it and try again.`;
39
- }
40
- ).when(
41
- ({ message }) => hasLinkingProblem && message.includes("libgcc_s"),
42
- () => {
43
- return `${systemLibraryNotFound("libgcc_s")}. Please install it and try again.`;
44
- }
45
- ).when(
46
- ({ message }) => hasLinkingProblem && message.includes("libssl"),
47
- () => {
48
- const libsslVersion = args.platformInfo.libssl ? `openssl-${args.platformInfo.libssl}` : "openssl";
49
- return `${systemLibraryNotFound("libssl")}. Please install ${libsslVersion} and try again.`;
50
- }
51
- ).when(
52
- ({ message }) => message.includes("GLIBC"),
53
- () => {
54
- return `Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${referToSystemRequirementsDocs}`;
55
- }
56
- ).when(
57
- ({ message }) => args.platformInfo.platform === "linux" && message.includes("symbol not found"),
58
- () => {
59
- return `The Prisma engines are not compatible with your system ${args.platformInfo.originalDistro} on (${args.platformInfo.archFromUname}) which uses the \`${args.platformInfo.binaryTarget}\` binaryTarget by default. ${referToSystemRequirementsDocs}`;
60
- }
61
- ).otherwise(() => {
62
- return `The Prisma engines do not seem to be compatible with your system. ${referToSystemRequirementsDocs}`;
63
- });
64
- return `${errorTitle}
65
- ${potentialReasonMessage}
66
-
67
- Details: ${error.message}`;
68
- }
@@ -1,58 +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_ERSH2BQA_exports = {};
20
- __export(chunk_ERSH2BQA_exports, {
21
- ClientEngineType: () => ClientEngineType,
22
- getClientEngineType: () => getClientEngineType
23
- });
24
- module.exports = __toCommonJS(chunk_ERSH2BQA_exports);
25
- var ClientEngineType = /* @__PURE__ */ ((ClientEngineType2) => {
26
- ClientEngineType2["Library"] = "library";
27
- ClientEngineType2["Binary"] = "binary";
28
- ClientEngineType2["Client"] = "client";
29
- return ClientEngineType2;
30
- })(ClientEngineType || {});
31
- function getClientEngineType(generatorConfig) {
32
- const engineTypeFromEnvVar = getEngineTypeFromEnvVar();
33
- if (engineTypeFromEnvVar) return engineTypeFromEnvVar;
34
- if (generatorConfig?.config.engineType === "library") {
35
- return "library";
36
- } else if (generatorConfig?.config.engineType === "binary") {
37
- return "binary";
38
- } else if (generatorConfig?.config.engineType === "client") {
39
- return "client";
40
- } else {
41
- return getDefaultEngineType();
42
- }
43
- }
44
- function getEngineTypeFromEnvVar() {
45
- const engineType = process.env.PRISMA_CLIENT_ENGINE_TYPE;
46
- if (engineType === "library") {
47
- return "library";
48
- } else if (engineType === "binary") {
49
- return "binary";
50
- } else if (engineType === "client") {
51
- return "client";
52
- } else {
53
- return void 0;
54
- }
55
- }
56
- function getDefaultEngineType() {
57
- return "library";
58
- }
@@ -1,41 +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_PZMRR772_exports = {};
20
- __export(chunk_PZMRR772_exports, {
21
- loadEnvFile: () => loadEnvFile
22
- });
23
- module.exports = __toCommonJS(chunk_PZMRR772_exports);
24
- var import_chunk_46ABODUM = require("./chunk-46ABODUM.js");
25
- var import_chunk_3FP46GUV = require("./chunk-3FP46GUV.js");
26
- async function loadEnvFile({
27
- schemaPath,
28
- config,
29
- printMessage = false
30
- }) {
31
- if (config.loadedFromFile) {
32
- process.stderr.write(`Prisma config detected, skipping environment variable loading.
33
- `);
34
- return;
35
- }
36
- const envPaths = await (0, import_chunk_46ABODUM.getEnvPaths)(schemaPath);
37
- const envData = (0, import_chunk_3FP46GUV.tryLoadEnvs)(envPaths, { conflictCheck: "error" });
38
- if (printMessage && envData && envData.message) {
39
- process.stderr.write(envData.message + "\n");
40
- }
41
- }
@@ -1,55 +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_T2PM5TKT_exports = {};
20
- __export(chunk_T2PM5TKT_exports, {
21
- dotenvExpand: () => dotenvExpand
22
- });
23
- module.exports = __toCommonJS(chunk_T2PM5TKT_exports);
24
- function dotenvExpand(config) {
25
- const environment = config.ignoreProcessEnv ? {} : process.env;
26
- const interpolate = (envValue) => {
27
- const matches = envValue.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g);
28
- return matches?.reduce(function(newEnv, match) {
29
- const parts = /(.?)\${([a-zA-Z0-9_]+)?}/g.exec(match);
30
- if (!parts) {
31
- return newEnv;
32
- }
33
- const prefix = parts[1];
34
- let value, replacePart;
35
- if (prefix === "\\") {
36
- replacePart = parts[0];
37
- value = replacePart.replace("\\$", "$");
38
- } else {
39
- const key = parts[2];
40
- replacePart = parts[0].substring(prefix.length);
41
- value = Object.hasOwnProperty.call(environment, key) ? environment[key] : config.parsed[key] || "";
42
- value = interpolate(value);
43
- }
44
- return newEnv.replace(replacePart, value);
45
- }, envValue) ?? envValue;
46
- };
47
- for (const configKey in config.parsed) {
48
- const value = Object.hasOwnProperty.call(environment, configKey) ? environment[configKey] : config.parsed[configKey];
49
- config.parsed[configKey] = interpolate(value);
50
- }
51
- for (const processKey in config.parsed) {
52
- environment[processKey] = config.parsed[processKey];
53
- }
54
- return config;
55
- }
@@ -1,7 +0,0 @@
1
- import type { GeneratorConfig } from '@prisma/generator';
2
- export declare enum ClientEngineType {
3
- Library = "library",
4
- Binary = "binary",
5
- Client = "client"
6
- }
7
- export declare function getClientEngineType(generatorConfig?: GeneratorConfig): ClientEngineType;
@@ -1,26 +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 getClientEngineType_exports = {};
20
- __export(getClientEngineType_exports, {
21
- ClientEngineType: () => import_chunk_ERSH2BQA.ClientEngineType,
22
- getClientEngineType: () => import_chunk_ERSH2BQA.getClientEngineType
23
- });
24
- module.exports = __toCommonJS(getClientEngineType_exports);
25
- var import_chunk_ERSH2BQA = require("../chunk-ERSH2BQA.js");
26
- var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
@@ -1,35 +0,0 @@
1
- import type { DotenvConfigOutput } from 'dotenv';
2
- /**
3
- * Modified version of https://github.com/motdotla/dotenv-expand
4
- * Our version does only expand ${ENV} - curly braces but not without curly braces
5
- *
6
- * Original License from https://github.com/motdotla/dotenv-expand/blob/de9e5cb0215495452f475f5be4dea1580b8217cd/LICENSE
7
- * Copyright (c) 2016, Scott Motte
8
- * All rights reserved.
9
- *
10
- * Redistribution and use in source and binary forms, with or without
11
- * modification, are permitted provided that the following conditions are met:
12
- *
13
- * * Redistributions of source code must retain the above copyright notice, this
14
- * list of conditions and the following disclaimer.
15
- *
16
- * * Redistributions in binary form must reproduce the above copyright notice,
17
- * this list of conditions and the following disclaimer in the documentation
18
- * and/or other materials provided with the distribution.
19
- *
20
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
- */
31
- export declare function dotenvExpand(config: DotenvConfigOutput & {
32
- ignoreProcessEnv?: boolean;
33
- }): DotenvConfigOutput & {
34
- ignoreProcessEnv?: boolean | undefined;
35
- };
@@ -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 dotenvExpand_exports = {};
20
- __export(dotenvExpand_exports, {
21
- dotenvExpand: () => import_chunk_T2PM5TKT.dotenvExpand
22
- });
23
- module.exports = __toCommonJS(dotenvExpand_exports);
24
- var import_chunk_T2PM5TKT = require("./chunk-T2PM5TKT.js");
25
- var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
@@ -1,14 +0,0 @@
1
- import { EnvPaths } from '@prisma/generator';
2
- /**
3
- * 1. Search in project root
4
- * 1. Schema
5
- * 1. Search location from schema arg `--schema`
6
- * 1. Search location from pkgJSON `"prisma": {"schema": "/path/to/schema.prisma"}`
7
- * 1. Search default location `./prisma/.env`
8
- * 1. Search cwd `./.env`
9
- *
10
- * @returns `{ rootEnvPath, schemaEnvPath }`
11
- */
12
- export declare function getEnvPaths(schemaPath?: string | null, opts?: {
13
- cwd: string;
14
- }): Promise<EnvPaths>;
@@ -1,29 +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 getEnvPaths_exports = {};
20
- __export(getEnvPaths_exports, {
21
- getEnvPaths: () => import_chunk_46ABODUM.getEnvPaths
22
- });
23
- module.exports = __toCommonJS(getEnvPaths_exports);
24
- var import_chunk_46ABODUM = require("../chunk-46ABODUM.js");
25
- var import_chunk_3FP46GUV = require("../chunk-3FP46GUV.js");
26
- var import_chunk_EYVG6XQS = require("../chunk-EYVG6XQS.js");
27
- var import_chunk_PG5FDKSF = require("../chunk-PG5FDKSF.js");
28
- var import_chunk_T2PM5TKT = require("../chunk-T2PM5TKT.js");
29
- var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
@@ -1,8 +0,0 @@
1
- import { type PlatformInfo } from '@prisma/get-platform';
2
- type HandleLibraryLoadingErrorsInput = {
3
- e: Error;
4
- platformInfo: PlatformInfo;
5
- id: string;
6
- };
7
- export declare function handleLibraryLoadingErrors(args: HandleLibraryLoadingErrorsInput): string;
8
- export {};
@@ -1,27 +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 handleEngineLoadingErrors_exports = {};
20
- __export(handleEngineLoadingErrors_exports, {
21
- handleLibraryLoadingErrors: () => import_chunk_DZYINYAA.handleLibraryLoadingErrors
22
- });
23
- module.exports = __toCommonJS(handleEngineLoadingErrors_exports);
24
- var import_chunk_DZYINYAA = require("../chunk-DZYINYAA.js");
25
- var import_chunk_XKZ6CBLA = require("../chunk-XKZ6CBLA.js");
26
- var import_chunk_PG5FDKSF = require("../chunk-PG5FDKSF.js");
27
- var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
@@ -1,6 +0,0 @@
1
- import type { PlatformInfo } from '@prisma/get-platform';
2
- /**
3
- * This is a wrapper around `require` for loading a Node-API library.
4
- * This is to avoid eval and hide require away from bundlers
5
- */
6
- export declare function loadLibrary<T>(id: string, platformInfo: PlatformInfo): T;
@@ -1,28 +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 load_exports = {};
20
- __export(load_exports, {
21
- loadLibrary: () => import_chunk_6TTRTZXU.loadLibrary
22
- });
23
- module.exports = __toCommonJS(load_exports);
24
- var import_chunk_6TTRTZXU = require("../chunk-6TTRTZXU.js");
25
- var import_chunk_DZYINYAA = require("../chunk-DZYINYAA.js");
26
- var import_chunk_XKZ6CBLA = require("../chunk-XKZ6CBLA.js");
27
- var import_chunk_PG5FDKSF = require("../chunk-PG5FDKSF.js");
28
- var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");