@prisma/internals 6.6.0-integration-push-xmzqvqxpztks.7 → 6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.3
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/Generator.d.ts +5 -23
- package/dist/Generator.js +2 -4
- package/dist/{chunk-RN2HKPE6.js → chunk-5IAGIQ5I.js} +8 -8
- package/dist/{chunk-3CHSHRZX.js → chunk-6727N6PT.js} +5 -5
- package/dist/chunk-72UZXEBG.js +28 -0
- package/dist/{chunk-TGNGIHD7.js → chunk-75AJJ2SV.js} +5 -5
- package/dist/{chunk-3R43ZQD7.js → chunk-ABTIXQDX.js} +4 -3
- package/dist/{chunk-2THINWCT.js → chunk-BTWAF3S4.js} +7 -7
- package/dist/chunk-BWGDP6B5.js +4948 -0
- package/dist/{chunk-BPDMLM32.js → chunk-DYVL6P7F.js} +13 -46
- package/dist/chunk-EUTJYQDW.js +46 -0
- package/dist/chunk-EWWOTVR3.js +52 -0
- package/dist/chunk-GHHABGYW.js +28 -0
- package/dist/{chunk-PL5KBFMT.js → chunk-GI3F44TM.js} +5 -5
- package/dist/{chunk-YPS4L25P.js → chunk-GIOVJ5SL.js} +8 -8
- package/dist/{chunk-I7MGLNDS.js → chunk-HX2VLZFY.js} +287 -111
- package/dist/{chunk-MJIP3FY5.js → chunk-K5W6WZ6E.js} +238 -6
- package/dist/{chunk-MGFEZIW7.js → chunk-LHESHKC2.js} +5 -5
- package/dist/{chunk-IMOWQZSF.js → chunk-LLOWNQI4.js} +8 -8
- package/dist/{chunk-S2R7ACYL.js → chunk-MSQTODVE.js} +8 -8
- package/dist/{chunk-7JDKTQ7P.js → chunk-MWJN65OB.js} +7 -7
- package/dist/{chunk-DXK2BUKM.js → chunk-N4XUH3VC.js} +5 -4
- package/dist/{chunk-C73SLFIL.js → chunk-PQE76XRR.js} +5 -5
- package/dist/chunk-QGJH4P4N.js +35 -0
- package/dist/{chunk-UPQKNKIW.js → chunk-TKUGTIBG.js} +5 -5
- package/dist/{chunk-2H6XXXKO.js → chunk-TV34NMBZ.js} +12 -15
- package/dist/{chunk-YKIDHO5L.js → chunk-UUO6X4LC.js} +8 -8
- package/dist/{chunk-IS4R7W5O.js → chunk-VAVGLPCV.js} +287 -111
- package/dist/{chunk-67I7CEQJ.js → chunk-VVPSLVOR.js} +7 -6
- package/dist/{chunk-XNFIABGN.js → chunk-VYWUZ7RB.js} +5 -5
- package/dist/{chunk-EHL2GLNE.js → chunk-XKIMYV5V.js} +5 -5
- package/dist/{chunk-AMDATEIM.js → chunk-XQSHUIJ5.js} +8 -8
- package/dist/cli/checkUnsupportedDataProxy.js +29 -23
- package/dist/cli/directoryConfig.d.ts +1 -1
- package/dist/cli/directoryConfig.js +2 -2
- package/dist/cli/getSchema.d.ts +28 -3
- package/dist/cli/getSchema.js +33 -26
- package/dist/cli/hashes.d.ts +2 -1
- package/dist/cli/hashes.js +29 -23
- package/dist/cli/schemaContext.d.ts +3 -4
- package/dist/cli/schemaContext.js +29 -23
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +28 -22
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/index.js +37 -31
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +15 -0
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +138 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +6 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +26 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +9 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +26 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +8 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +29 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +6 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +138 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +1 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +26 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +20 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +26 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +7 -0
- package/dist/{resolvePkg.js → get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js} +6 -6
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +1 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +17 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +20 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +139 -0
- package/dist/get-generators/getGenerators.d.ts +9 -18
- package/dist/get-generators/getGenerators.js +31 -25
- package/dist/getPackedPackage.js +3 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +60 -53
- package/dist/utils/getEnvPaths.js +28 -22
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/loadEnvFile.js +28 -22
- package/dist/wasm.js +4 -4
- package/package.json +11 -10
- package/dist/resolvePkg.d.ts +0 -7
@@ -16,31 +16,34 @@ var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
return to;
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var
|
20
|
-
__export(
|
21
|
-
Generator: () => Generator
|
22
|
-
InProcessGenerator: () => InProcessGenerator,
|
23
|
-
JsonRpcGenerator: () => JsonRpcGenerator
|
19
|
+
var chunk_DYVL6P7F_exports = {};
|
20
|
+
__export(chunk_DYVL6P7F_exports, {
|
21
|
+
Generator: () => Generator
|
24
22
|
});
|
25
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_DYVL6P7F_exports);
|
26
24
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
27
25
|
var import_generator_helper = require("@prisma/generator-helper");
|
28
26
|
var Generator = class {
|
27
|
+
generatorProcess;
|
29
28
|
manifest = null;
|
30
29
|
config;
|
31
30
|
options;
|
32
|
-
constructor(config) {
|
31
|
+
constructor(executablePath, config, isNode) {
|
33
32
|
this.config = config;
|
33
|
+
this.generatorProcess = new import_generator_helper.GeneratorProcess(executablePath, { isNode });
|
34
34
|
}
|
35
35
|
async init() {
|
36
|
-
await this.
|
37
|
-
this.manifest = await this.getManifest();
|
36
|
+
await this.generatorProcess.init();
|
37
|
+
this.manifest = await this.generatorProcess.getManifest(this.config);
|
38
|
+
}
|
39
|
+
stop() {
|
40
|
+
this.generatorProcess.stop();
|
38
41
|
}
|
39
42
|
generate() {
|
40
43
|
if (!this.options) {
|
41
44
|
throw new Error(`Please first run .setOptions() on the Generator to initialize the options`);
|
42
45
|
}
|
43
|
-
return this.
|
46
|
+
return this.generatorProcess.generate(this.options);
|
44
47
|
}
|
45
48
|
setOptions(options) {
|
46
49
|
this.options = options;
|
@@ -67,39 +70,3 @@ var Generator = class {
|
|
67
70
|
return (0, import_chunk_IOIAK7V7.parseEnvValue)(this.config.provider);
|
68
71
|
}
|
69
72
|
};
|
70
|
-
var JsonRpcGenerator = class extends Generator {
|
71
|
-
#generatorProcess;
|
72
|
-
constructor(executablePath, config, isNode) {
|
73
|
-
super(config);
|
74
|
-
this.#generatorProcess = new import_generator_helper.GeneratorProcess(executablePath, { isNode });
|
75
|
-
}
|
76
|
-
async initImpl() {
|
77
|
-
await this.#generatorProcess.init();
|
78
|
-
}
|
79
|
-
async getManifest() {
|
80
|
-
return await this.#generatorProcess.getManifest(this.config);
|
81
|
-
}
|
82
|
-
async generateImpl(options) {
|
83
|
-
await this.#generatorProcess.generate(options);
|
84
|
-
}
|
85
|
-
stop() {
|
86
|
-
this.#generatorProcess.stop();
|
87
|
-
}
|
88
|
-
};
|
89
|
-
var InProcessGenerator = class extends Generator {
|
90
|
-
#generator;
|
91
|
-
constructor(config, generator) {
|
92
|
-
super(config);
|
93
|
-
this.#generator = generator;
|
94
|
-
}
|
95
|
-
async initImpl() {
|
96
|
-
}
|
97
|
-
async getManifest() {
|
98
|
-
return await this.#generator.getManifest(this.config);
|
99
|
-
}
|
100
|
-
async generateImpl(options) {
|
101
|
-
await this.#generator.generate(options);
|
102
|
-
}
|
103
|
-
stop() {
|
104
|
-
}
|
105
|
-
};
|
@@ -0,0 +1,46 @@
|
|
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_EUTJYQDW_exports = {};
|
20
|
+
__export(chunk_EUTJYQDW_exports, {
|
21
|
+
semverLt: () => semverLt
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(chunk_EUTJYQDW_exports);
|
24
|
+
function semverLt(a, b) {
|
25
|
+
const [major1, minor1, patch1] = a.split(".").map(Number);
|
26
|
+
const [major2, minor2, patch2] = b.split(".").map(Number);
|
27
|
+
if (major1 < major2) {
|
28
|
+
return true;
|
29
|
+
}
|
30
|
+
if (major1 > major2) {
|
31
|
+
return false;
|
32
|
+
}
|
33
|
+
if (minor1 < minor2) {
|
34
|
+
return true;
|
35
|
+
}
|
36
|
+
if (minor1 > minor2) {
|
37
|
+
return false;
|
38
|
+
}
|
39
|
+
if (patch1 < patch2) {
|
40
|
+
return true;
|
41
|
+
}
|
42
|
+
if (patch1 > patch2) {
|
43
|
+
return false;
|
44
|
+
}
|
45
|
+
return false;
|
46
|
+
}
|
@@ -0,0 +1,52 @@
|
|
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_EWWOTVR3_exports = {};
|
30
|
+
__export(chunk_EWWOTVR3_exports, {
|
31
|
+
findPrismaClientDir: () => findPrismaClientDir
|
32
|
+
});
|
33
|
+
module.exports = __toCommonJS(chunk_EWWOTVR3_exports);
|
34
|
+
var import_chunk_VVPSLVOR = require("./chunk-VVPSLVOR.js");
|
35
|
+
var import_debug = __toESM(require("@prisma/debug"));
|
36
|
+
var import_fs = __toESM(require("fs"));
|
37
|
+
var import_path = __toESM(require("path"));
|
38
|
+
var debug = (0, import_debug.default)("prisma:generator");
|
39
|
+
var realPath = import_fs.default.promises.realpath;
|
40
|
+
async function findPrismaClientDir(baseDir) {
|
41
|
+
const resolveOpts = { basedir: baseDir, preserveSymlinks: true };
|
42
|
+
const CLIDir = await (0, import_chunk_VVPSLVOR.resolvePkg)("prisma", resolveOpts);
|
43
|
+
const clientDir = await (0, import_chunk_VVPSLVOR.resolvePkg)("@prisma/client", resolveOpts);
|
44
|
+
const resolvedClientDir = clientDir && await realPath(clientDir);
|
45
|
+
debug("prismaCLIDir", CLIDir);
|
46
|
+
debug("prismaClientDir", clientDir);
|
47
|
+
if (CLIDir === void 0) return resolvedClientDir;
|
48
|
+
if (clientDir === void 0) return resolvedClientDir;
|
49
|
+
const relDir = import_path.default.relative(CLIDir, clientDir).split(import_path.default.sep);
|
50
|
+
if (relDir[0] !== ".." || relDir[1] === "..") return void 0;
|
51
|
+
return resolvedClientDir;
|
52
|
+
}
|
@@ -0,0 +1,28 @@
|
|
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_GHHABGYW_exports = {};
|
20
|
+
__export(chunk_GHHABGYW_exports, {
|
21
|
+
isYarnUsed: () => isYarnUsed
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(chunk_GHHABGYW_exports);
|
24
|
+
var import_chunk_BWGDP6B5 = require("./chunk-BWGDP6B5.js");
|
25
|
+
async function isYarnUsed(baseDir) {
|
26
|
+
const packageManager = await (0, import_chunk_BWGDP6B5.detect)({ cwd: baseDir, autoInstall: false, programmatic: true });
|
27
|
+
return packageManager === "yarn" || packageManager === "yarn@berry";
|
28
|
+
}
|
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
return to;
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var
|
20
|
-
__export(
|
19
|
+
var chunk_GI3F44TM_exports = {};
|
20
|
+
__export(chunk_GI3F44TM_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_GI3F44TM_exports);
|
24
|
+
var import_chunk_6727N6PT = require("./chunk-6727N6PT.js");
|
25
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
27
|
-
const rows = [["Prisma CLI Version",
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_6727N6PT.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -26,16 +26,16 @@ 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
|
30
|
-
__export(
|
29
|
+
var chunk_GIOVJ5SL_exports = {};
|
30
|
+
__export(chunk_GIOVJ5SL_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_GIOVJ5SL_exports);
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
37
|
-
var
|
38
|
-
var
|
37
|
+
var import_chunk_PQE76XRR = require("./chunk-PQE76XRR.js");
|
38
|
+
var import_chunk_LHESHKC2 = require("./chunk-LHESHKC2.js");
|
39
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
@@ -58,7 +58,7 @@ ${detailsHeader} ${message}`;
|
|
58
58
|
}).exhaustive();
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
60
60
|
[Context: getDmmf]`;
|
61
|
-
super((0,
|
61
|
+
super((0, import_chunk_PQE76XRR.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
62
62
|
this.name = "GetDmmfError";
|
63
63
|
}
|
64
64
|
};
|
@@ -70,13 +70,13 @@ async function getDMMF(options) {
|
|
70
70
|
() => {
|
71
71
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
72
72
|
debug("Triggering a Rust panic...");
|
73
|
-
|
73
|
+
import_chunk_LHESHKC2.prismaSchemaWasm.debug_panic();
|
74
74
|
}
|
75
75
|
const params = JSON.stringify({
|
76
76
|
prismaSchema: options.datamodel,
|
77
77
|
noColor: Boolean(process.env.NO_COLOR)
|
78
78
|
});
|
79
|
-
const data =
|
79
|
+
const data = import_chunk_LHESHKC2.prismaSchemaWasm.get_dmmf(params);
|
80
80
|
return data;
|
81
81
|
},
|
82
82
|
(e) => ({
|