@prisma/migrate 6.18.0-integration-next.11 → 6.18.0
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/bin.js +22 -22
- package/dist/{chunk-X6X2YOMP.js → chunk-3AKRTEIK.js} +4 -4
- package/dist/{chunk-NN4KNZIO.js → chunk-6ORQRJLP.js} +4 -4
- package/dist/{chunk-WYJ3CJCO.js → chunk-7TVX3D4W.js} +4 -4
- package/dist/{chunk-XJTAAJKM.js → chunk-BHJMJSM4.js} +4 -4
- package/dist/{chunk-W2NKGYXF.js → chunk-D4TRX77Y.js} +9 -7
- package/dist/{chunk-6EUJATSC.js → chunk-F2XCBEZ4.js} +9 -7
- package/dist/{chunk-JSXDRFVP.js → chunk-J33EXHZB.js} +9 -7
- package/dist/{chunk-L7EZFBB4.js → chunk-PHXLQVPT.js} +68 -40
- package/dist/{chunk-IW6ZMFN5.js → chunk-R4IWP35Z.js} +4 -4
- package/dist/{chunk-DKIKZTVE.js → chunk-TW22Y3AA.js} +4 -4
- package/dist/{chunk-43R3GFIU.js → chunk-Z27SI4AV.js} +4 -4
- package/dist/{chunk-B6XUXZTV.js → chunk-ZTIS675B.js} +40 -5
- package/dist/commands/DbDrop.js +2 -2
- package/dist/commands/DbExecute.js +2 -2
- package/dist/commands/DbPull.js +2 -2
- package/dist/commands/DbPush.js +2 -2
- package/dist/commands/DbSeed.js +3 -3
- package/dist/commands/MigrateDeploy.js +2 -2
- package/dist/commands/MigrateDev.js +3 -3
- package/dist/commands/MigrateDiff.js +2 -2
- package/dist/commands/MigrateReset.js +3 -3
- package/dist/commands/MigrateResolve.js +2 -2
- package/dist/commands/MigrateStatus.js +2 -2
- package/dist/index.js +23 -23
- package/dist/internals/src/cli/getSchema.d.ts +15 -1
- package/dist/migrate/src/utils/seed.d.ts +6 -0
- package/dist/utils/seed.js +3 -2
- package/package.json +10 -10
package/dist/bin.js
CHANGED
|
@@ -24,20 +24,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
));
|
|
25
25
|
var import_chunk_NGQA5JTN = require("./chunk-NGQA5JTN.js");
|
|
26
26
|
var import_chunk_NB4FRYRQ = require("./chunk-NB4FRYRQ.js");
|
|
27
|
-
var
|
|
28
|
-
var
|
|
27
|
+
var import_chunk_BHJMJSM4 = require("./chunk-BHJMJSM4.js");
|
|
28
|
+
var import_chunk_F2XCBEZ4 = require("./chunk-F2XCBEZ4.js");
|
|
29
29
|
var import_chunk_C3722PDA = require("./chunk-C3722PDA.js");
|
|
30
30
|
var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
|
|
31
|
-
var
|
|
31
|
+
var import_chunk_ZTIS675B = require("./chunk-ZTIS675B.js");
|
|
32
32
|
var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
|
|
33
|
-
var
|
|
33
|
+
var import_chunk_J33EXHZB = require("./chunk-J33EXHZB.js");
|
|
34
34
|
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
35
35
|
var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
36
|
+
var import_chunk_3AKRTEIK = require("./chunk-3AKRTEIK.js");
|
|
37
|
+
var import_chunk_R4IWP35Z = require("./chunk-R4IWP35Z.js");
|
|
38
38
|
var import_chunk_EJG7GKM7 = require("./chunk-EJG7GKM7.js");
|
|
39
|
-
var
|
|
40
|
-
var
|
|
39
|
+
var import_chunk_7TVX3D4W = require("./chunk-7TVX3D4W.js");
|
|
40
|
+
var import_chunk_6ORQRJLP = require("./chunk-6ORQRJLP.js");
|
|
41
41
|
var import_chunk_VU5BLQUI = require("./chunk-VU5BLQUI.js");
|
|
42
42
|
var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
|
|
43
43
|
var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
|
|
@@ -47,14 +47,14 @@ var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
|
|
|
47
47
|
var import_chunk_AI6DH66U = require("./chunk-AI6DH66U.js");
|
|
48
48
|
var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
|
|
49
49
|
var import_chunk_2R6DII47 = require("./chunk-2R6DII47.js");
|
|
50
|
-
var
|
|
50
|
+
var import_chunk_TW22Y3AA = require("./chunk-TW22Y3AA.js");
|
|
51
51
|
var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
|
|
52
52
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
53
53
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
54
54
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
55
55
|
var import_chunk_TWPTG4XS = require("./chunk-TWPTG4XS.js");
|
|
56
|
-
var
|
|
57
|
-
var
|
|
56
|
+
var import_chunk_D4TRX77Y = require("./chunk-D4TRX77Y.js");
|
|
57
|
+
var import_chunk_PHXLQVPT = require("./chunk-PHXLQVPT.js");
|
|
58
58
|
var import_chunk_LLO7YF56 = require("./chunk-LLO7YF56.js");
|
|
59
59
|
var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
|
|
60
60
|
var import_chunk_T64SUJ5L = require("./chunk-T64SUJ5L.js");
|
|
@@ -72,7 +72,7 @@ var import_config = require("@prisma/config");
|
|
|
72
72
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
73
73
|
var import_engines_version = require("@prisma/engines-version");
|
|
74
74
|
var import_internals = require("@prisma/internals");
|
|
75
|
-
var version = "6.18.0
|
|
75
|
+
var version = "6.18.0";
|
|
76
76
|
process.on("uncaughtException", (e) => {
|
|
77
77
|
console.log(e);
|
|
78
78
|
});
|
|
@@ -94,19 +94,19 @@ var args = (0, import_internals.arg)(
|
|
|
94
94
|
async function main() {
|
|
95
95
|
const cli = import_chunk_NGQA5JTN.CLI.new({
|
|
96
96
|
migrate: import_chunk_LLO7YF56.MigrateCommand.new({
|
|
97
|
-
dev:
|
|
98
|
-
status:
|
|
99
|
-
resolve:
|
|
100
|
-
reset:
|
|
101
|
-
deploy:
|
|
102
|
-
diff:
|
|
97
|
+
dev: import_chunk_F2XCBEZ4.MigrateDev.new(),
|
|
98
|
+
status: import_chunk_R4IWP35Z.MigrateStatus.new(),
|
|
99
|
+
resolve: import_chunk_3AKRTEIK.MigrateResolve.new(),
|
|
100
|
+
reset: import_chunk_J33EXHZB.MigrateReset.new(),
|
|
101
|
+
deploy: import_chunk_BHJMJSM4.MigrateDeploy.new(),
|
|
102
|
+
diff: import_chunk_ZTIS675B.MigrateDiff.new()
|
|
103
103
|
}),
|
|
104
104
|
db: import_chunk_EJG7GKM7.DbCommand.new({
|
|
105
|
-
execute:
|
|
106
|
-
pull:
|
|
107
|
-
push:
|
|
105
|
+
execute: import_chunk_7TVX3D4W.DbExecute.new(),
|
|
106
|
+
pull: import_chunk_6ORQRJLP.DbPull.new(),
|
|
107
|
+
push: import_chunk_TW22Y3AA.DbPush.new(),
|
|
108
108
|
// drop: DbDrop.new(),
|
|
109
|
-
seed:
|
|
109
|
+
seed: import_chunk_D4TRX77Y.DbSeed.new()
|
|
110
110
|
})
|
|
111
111
|
});
|
|
112
112
|
const { config, error } = await (0, import_config.loadConfigFromFile)({ configFile: args["--config"] });
|
|
@@ -16,11 +16,11 @@ 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_3AKRTEIK_exports = {};
|
|
20
|
+
__export(chunk_3AKRTEIK_exports, {
|
|
21
21
|
MigrateResolve: () => MigrateResolve
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_3AKRTEIK_exports);
|
|
24
24
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
25
25
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
26
26
|
var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
|
|
@@ -83,7 +83,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
83
83
|
if (args["--help"]) {
|
|
84
84
|
return this.help();
|
|
85
85
|
}
|
|
86
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
86
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
87
87
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
88
88
|
schemaPathFromArg: args["--schema"],
|
|
89
89
|
schemaPathFromConfig: config.schema,
|
|
@@ -26,11 +26,11 @@ 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_6ORQRJLP_exports = {};
|
|
30
|
+
__export(chunk_6ORQRJLP_exports, {
|
|
31
31
|
DbPull: () => DbPull
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_6ORQRJLP_exports);
|
|
34
34
|
var import_chunk_VU5BLQUI = require("./chunk-VU5BLQUI.js");
|
|
35
35
|
var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
|
|
36
36
|
var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
|
|
@@ -126,7 +126,7 @@ Set composite types introspection depth to 2 levels
|
|
|
126
126
|
return this.help();
|
|
127
127
|
}
|
|
128
128
|
const url = args["--url"];
|
|
129
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: !args["--print"], config });
|
|
129
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: !args["--print"], config });
|
|
130
130
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
131
131
|
schemaPathFromArg: args["--schema"],
|
|
132
132
|
schemaPathFromConfig: config.schema,
|
|
@@ -26,11 +26,11 @@ 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_7TVX3D4W_exports = {};
|
|
30
|
+
__export(chunk_7TVX3D4W_exports, {
|
|
31
31
|
DbExecute: () => DbExecute
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_7TVX3D4W_exports);
|
|
34
34
|
var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
|
|
35
35
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
36
36
|
var import_consumers = __toESM(require("node:stream/consumers"));
|
|
@@ -121,7 +121,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
121
121
|
if (args["--help"]) {
|
|
122
122
|
return this.help();
|
|
123
123
|
}
|
|
124
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false, config });
|
|
124
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false, config });
|
|
125
125
|
const cmd = "db execute";
|
|
126
126
|
(0, import_internals.checkUnsupportedSchemaEngineWasm)({
|
|
127
127
|
cmd,
|
|
@@ -26,11 +26,11 @@ 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_BHJMJSM4_exports = {};
|
|
30
|
+
__export(chunk_BHJMJSM4_exports, {
|
|
31
31
|
MigrateDeploy: () => MigrateDeploy
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_BHJMJSM4_exports);
|
|
34
34
|
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
35
35
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
36
36
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
@@ -83,7 +83,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
83
83
|
if (args["--help"]) {
|
|
84
84
|
return this.help();
|
|
85
85
|
}
|
|
86
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
86
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
87
87
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
88
88
|
schemaPathFromArg: args["--schema"],
|
|
89
89
|
schemaPathFromConfig: config.schema,
|
|
@@ -16,12 +16,12 @@ 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_D4TRX77Y_exports = {};
|
|
20
|
+
__export(chunk_D4TRX77Y_exports, {
|
|
21
21
|
DbSeed: () => DbSeed
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_D4TRX77Y_exports);
|
|
24
|
+
var import_chunk_PHXLQVPT = require("./chunk-PHXLQVPT.js");
|
|
25
25
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
26
26
|
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
27
27
|
var import_internals = require("@prisma/internals");
|
|
@@ -213,11 +213,13 @@ ${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db seed -- --arg1 value1 --arg2 va
|
|
|
213
213
|
if (args["--help"]) {
|
|
214
214
|
return this.help();
|
|
215
215
|
}
|
|
216
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
217
|
-
const
|
|
216
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
217
|
+
const seedCommandFromPrismaConfig = config.migrations?.seed;
|
|
218
|
+
const seedCommandFromPkgJson = await (0, import_chunk_PHXLQVPT.getSeedCommandFromPackageJson)(process.cwd());
|
|
219
|
+
const seedCommand = seedCommandFromPrismaConfig ?? seedCommandFromPkgJson;
|
|
218
220
|
if (!seedCommand) return ``;
|
|
219
221
|
const extraArgs = args._.join(" ");
|
|
220
|
-
const successfulSeeding = await (0,
|
|
222
|
+
const successfulSeeding = await (0, import_chunk_PHXLQVPT.executeSeedCommand)({ commandFromConfig: seedCommand, extraArgs });
|
|
221
223
|
if (successfulSeeding) {
|
|
222
224
|
return `
|
|
223
225
|
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.`;
|
|
@@ -26,11 +26,11 @@ 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_F2XCBEZ4_exports = {};
|
|
30
|
+
__export(chunk_F2XCBEZ4_exports, {
|
|
31
31
|
MigrateDev: () => MigrateDev
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_F2XCBEZ4_exports);
|
|
34
34
|
var import_chunk_C3722PDA = require("./chunk-C3722PDA.js");
|
|
35
35
|
var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
|
|
36
36
|
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
@@ -38,7 +38,7 @@ var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
|
|
|
38
38
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
39
39
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
40
40
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_PHXLQVPT = require("./chunk-PHXLQVPT.js");
|
|
42
42
|
var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
|
|
43
43
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
44
44
|
var import_node_path = __toESM(require("node:path"));
|
|
@@ -100,7 +100,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
100
100
|
if (args["--help"]) {
|
|
101
101
|
return this.help();
|
|
102
102
|
}
|
|
103
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
103
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
104
104
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
105
105
|
schemaPathFromArg: args["--schema"],
|
|
106
106
|
schemaPathFromConfig: config.schema,
|
|
@@ -286,10 +286,12 @@ ${(0, import_chunk_SKRR5WT4.green)("Your database is now in sync with your schem
|
|
|
286
286
|
}
|
|
287
287
|
if (wasDbCreated && !process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
|
|
288
288
|
try {
|
|
289
|
-
const
|
|
289
|
+
const seedCommandFromPrismaConfig = config.migrations?.seed;
|
|
290
|
+
const seedCommandFromPkgJson = await (0, import_chunk_PHXLQVPT.getSeedCommandFromPackageJson)(process.cwd());
|
|
291
|
+
const seedCommand = seedCommandFromPrismaConfig ?? seedCommandFromPkgJson;
|
|
290
292
|
if (seedCommand) {
|
|
291
293
|
process.stdout.write("\n");
|
|
292
|
-
const successfulSeeding = await (0,
|
|
294
|
+
const successfulSeeding = await (0, import_chunk_PHXLQVPT.executeSeedCommand)({ commandFromConfig: seedCommand });
|
|
293
295
|
if (successfulSeeding) {
|
|
294
296
|
process.stdout.write(`
|
|
295
297
|
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.
|
|
@@ -26,17 +26,17 @@ 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_J33EXHZB_exports = {};
|
|
30
|
+
__export(chunk_J33EXHZB_exports, {
|
|
31
31
|
MigrateReset: () => MigrateReset
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_J33EXHZB_exports);
|
|
34
34
|
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
35
35
|
var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
|
|
36
36
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
37
37
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
38
38
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
39
|
-
var
|
|
39
|
+
var import_chunk_PHXLQVPT = require("./chunk-PHXLQVPT.js");
|
|
40
40
|
var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
|
|
41
41
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
42
42
|
var import_internals = require("@prisma/internals");
|
|
@@ -90,7 +90,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
90
90
|
if (args["--help"]) {
|
|
91
91
|
return this.help();
|
|
92
92
|
}
|
|
93
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
93
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
94
94
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
95
95
|
schemaPathFromArg: args["--schema"],
|
|
96
96
|
schemaPathFromConfig: config.schema,
|
|
@@ -163,10 +163,12 @@ ${(0, import_chunk_KRQEFTDT.printFilesFromMigrationIds)("migrations", migrationI
|
|
|
163
163
|
await migrate.tryToRunGenerate(datasourceInfo);
|
|
164
164
|
}
|
|
165
165
|
if (!process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
|
|
166
|
-
const
|
|
166
|
+
const seedCommandFromPrismaConfig = config.migrations?.seed;
|
|
167
|
+
const seedCommandFromPkgJson = await (0, import_chunk_PHXLQVPT.getSeedCommandFromPackageJson)(process.cwd());
|
|
168
|
+
const seedCommand = seedCommandFromPrismaConfig ?? seedCommandFromPkgJson;
|
|
167
169
|
if (seedCommand) {
|
|
168
170
|
process.stdout.write("\n");
|
|
169
|
-
const successfulSeeding = await (0,
|
|
171
|
+
const successfulSeeding = await (0, import_chunk_PHXLQVPT.executeSeedCommand)({ commandFromConfig: seedCommand });
|
|
170
172
|
if (successfulSeeding) {
|
|
171
173
|
process.stdout.write(`
|
|
172
174
|
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.
|
|
@@ -26,21 +26,24 @@ 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(
|
|
31
|
-
executeSeedCommand: () => executeSeedCommand
|
|
29
|
+
var chunk_PHXLQVPT_exports = {};
|
|
30
|
+
__export(chunk_PHXLQVPT_exports, {
|
|
31
|
+
executeSeedCommand: () => executeSeedCommand,
|
|
32
|
+
getSeedCommandFromPackageJson: () => getSeedCommandFromPackageJson
|
|
32
33
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_PHXLQVPT_exports);
|
|
34
35
|
var import_chunk_3WDCTXHL = require("./chunk-3WDCTXHL.js");
|
|
35
36
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
36
37
|
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
38
|
+
var import_node_path = __toESM(require("node:path"));
|
|
39
|
+
var import_config = require("@prisma/config");
|
|
37
40
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
38
41
|
var import_node_buffer = require("node:buffer");
|
|
39
|
-
var
|
|
42
|
+
var import_node_path2 = __toESM(require("node:path"));
|
|
40
43
|
var import_node_child_process = __toESM(require("node:child_process"));
|
|
41
44
|
var import_node_process = __toESM(require("node:process"));
|
|
42
45
|
var import_node_process2 = __toESM(require("node:process"));
|
|
43
|
-
var
|
|
46
|
+
var import_node_path3 = __toESM(require("node:path"));
|
|
44
47
|
var import_node_url = require("node:url");
|
|
45
48
|
var import_node_process3 = __toESM(require("node:process"));
|
|
46
49
|
var import_node_os = require("node:os");
|
|
@@ -60,7 +63,7 @@ var require_windows = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
60
63
|
module2.exports = isexe;
|
|
61
64
|
isexe.sync = sync;
|
|
62
65
|
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
63
|
-
function checkPathExt(
|
|
66
|
+
function checkPathExt(path4, options) {
|
|
64
67
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
65
68
|
if (!pathext) {
|
|
66
69
|
return true;
|
|
@@ -71,25 +74,25 @@ var require_windows = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
71
74
|
}
|
|
72
75
|
for (var i = 0; i < pathext.length; i++) {
|
|
73
76
|
var p = pathext[i].toLowerCase();
|
|
74
|
-
if (p &&
|
|
77
|
+
if (p && path4.substr(-p.length).toLowerCase() === p) {
|
|
75
78
|
return true;
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
return false;
|
|
79
82
|
}
|
|
80
|
-
function checkStat(stat,
|
|
83
|
+
function checkStat(stat, path4, options) {
|
|
81
84
|
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
82
85
|
return false;
|
|
83
86
|
}
|
|
84
|
-
return checkPathExt(
|
|
87
|
+
return checkPathExt(path4, options);
|
|
85
88
|
}
|
|
86
|
-
function isexe(
|
|
87
|
-
fs.stat(
|
|
88
|
-
cb(er, er ? false : checkStat(stat,
|
|
89
|
+
function isexe(path4, options, cb) {
|
|
90
|
+
fs.stat(path4, function(er, stat) {
|
|
91
|
+
cb(er, er ? false : checkStat(stat, path4, options));
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
|
-
function sync(
|
|
92
|
-
return checkStat(fs.statSync(
|
|
94
|
+
function sync(path4, options) {
|
|
95
|
+
return checkStat(fs.statSync(path4), path4, options);
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
});
|
|
@@ -99,13 +102,13 @@ var require_mode = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
99
102
|
module2.exports = isexe;
|
|
100
103
|
isexe.sync = sync;
|
|
101
104
|
var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
|
|
102
|
-
function isexe(
|
|
103
|
-
fs.stat(
|
|
105
|
+
function isexe(path4, options, cb) {
|
|
106
|
+
fs.stat(path4, function(er, stat) {
|
|
104
107
|
cb(er, er ? false : checkStat(stat, options));
|
|
105
108
|
});
|
|
106
109
|
}
|
|
107
|
-
function sync(
|
|
108
|
-
return checkStat(fs.statSync(
|
|
110
|
+
function sync(path4, options) {
|
|
111
|
+
return checkStat(fs.statSync(path4), options);
|
|
109
112
|
}
|
|
110
113
|
function checkStat(stat, options) {
|
|
111
114
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -137,7 +140,7 @@ var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
137
140
|
}
|
|
138
141
|
module2.exports = isexe;
|
|
139
142
|
isexe.sync = sync;
|
|
140
|
-
function isexe(
|
|
143
|
+
function isexe(path4, options, cb) {
|
|
141
144
|
if (typeof options === "function") {
|
|
142
145
|
cb = options;
|
|
143
146
|
options = {};
|
|
@@ -147,7 +150,7 @@ var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
147
150
|
throw new TypeError("callback not provided");
|
|
148
151
|
}
|
|
149
152
|
return new Promise(function(resolve, reject) {
|
|
150
|
-
isexe(
|
|
153
|
+
isexe(path4, options || {}, function(er, is) {
|
|
151
154
|
if (er) {
|
|
152
155
|
reject(er);
|
|
153
156
|
} else {
|
|
@@ -156,7 +159,7 @@ var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
156
159
|
});
|
|
157
160
|
});
|
|
158
161
|
}
|
|
159
|
-
core(
|
|
162
|
+
core(path4, options || {}, function(er, is) {
|
|
160
163
|
if (er) {
|
|
161
164
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
162
165
|
er = null;
|
|
@@ -166,9 +169,9 @@ var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
166
169
|
cb(er, is);
|
|
167
170
|
});
|
|
168
171
|
}
|
|
169
|
-
function sync(
|
|
172
|
+
function sync(path4, options) {
|
|
170
173
|
try {
|
|
171
|
-
return core.sync(
|
|
174
|
+
return core.sync(path4, options || {});
|
|
172
175
|
} catch (er) {
|
|
173
176
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
174
177
|
return false;
|
|
@@ -183,7 +186,7 @@ var require_which = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
183
186
|
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module2) {
|
|
184
187
|
"use strict";
|
|
185
188
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
186
|
-
var
|
|
189
|
+
var path4 = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
187
190
|
var COLON = isWindows ? ";" : ":";
|
|
188
191
|
var isexe = require_isexe();
|
|
189
192
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -221,7 +224,7 @@ var require_which = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
221
224
|
return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
222
225
|
const ppRaw = pathEnv[i];
|
|
223
226
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
224
|
-
const pCmd =
|
|
227
|
+
const pCmd = path4.join(pathPart, cmd);
|
|
225
228
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
226
229
|
resolve(subStep(p, i, 0));
|
|
227
230
|
});
|
|
@@ -248,7 +251,7 @@ var require_which = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
248
251
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
249
252
|
const ppRaw = pathEnv[i];
|
|
250
253
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
251
|
-
const pCmd =
|
|
254
|
+
const pCmd = path4.join(pathPart, cmd);
|
|
252
255
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
253
256
|
for (let j = 0; j < pathExt.length; j++) {
|
|
254
257
|
const cur = p + pathExt[j];
|
|
@@ -292,7 +295,7 @@ var require_path_key = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
292
295
|
var require_resolveCommand = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
293
296
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) {
|
|
294
297
|
"use strict";
|
|
295
|
-
var
|
|
298
|
+
var path4 = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
296
299
|
var which = require_which();
|
|
297
300
|
var getPathKey = require_path_key();
|
|
298
301
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -310,7 +313,7 @@ var require_resolveCommand = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
310
313
|
try {
|
|
311
314
|
resolved = which.sync(parsed.command, {
|
|
312
315
|
path: env[getPathKey({ env })],
|
|
313
|
-
pathExt: withoutPathExt ?
|
|
316
|
+
pathExt: withoutPathExt ? path4.delimiter : void 0
|
|
314
317
|
});
|
|
315
318
|
} catch (e) {
|
|
316
319
|
} finally {
|
|
@@ -319,7 +322,7 @@ var require_resolveCommand = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
319
322
|
}
|
|
320
323
|
}
|
|
321
324
|
if (resolved) {
|
|
322
|
-
resolved =
|
|
325
|
+
resolved = path4.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
323
326
|
}
|
|
324
327
|
return resolved;
|
|
325
328
|
}
|
|
@@ -367,8 +370,8 @@ var require_shebang_command = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
367
370
|
if (!match) {
|
|
368
371
|
return null;
|
|
369
372
|
}
|
|
370
|
-
const [
|
|
371
|
-
const binary =
|
|
373
|
+
const [path4, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
374
|
+
const binary = path4.split("/").pop();
|
|
372
375
|
if (binary === "env") {
|
|
373
376
|
return argument;
|
|
374
377
|
}
|
|
@@ -399,7 +402,7 @@ var require_readShebang = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
399
402
|
var require_parse = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
400
403
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module2) {
|
|
401
404
|
"use strict";
|
|
402
|
-
var
|
|
405
|
+
var path4 = (0, import_chunk_2ESYSVXG.__require)("path");
|
|
403
406
|
var resolveCommand = require_resolveCommand();
|
|
404
407
|
var escape = require_escape();
|
|
405
408
|
var readShebang = require_readShebang();
|
|
@@ -424,7 +427,7 @@ var require_parse = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
424
427
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
425
428
|
if (parsed.options.forceShell || needsShell) {
|
|
426
429
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
427
|
-
parsed.command =
|
|
430
|
+
parsed.command = path4.normalize(parsed.command);
|
|
428
431
|
parsed.command = escape.command(parsed.command);
|
|
429
432
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
430
433
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -597,7 +600,7 @@ var npmRunPath = ({
|
|
|
597
600
|
addExecPath = true
|
|
598
601
|
} = {}) => {
|
|
599
602
|
const cwdString = cwd instanceof URL ? (0, import_node_url.fileURLToPath)(cwd) : cwd;
|
|
600
|
-
const cwdPath =
|
|
603
|
+
const cwdPath = import_node_path3.default.resolve(cwdString);
|
|
601
604
|
const result = [];
|
|
602
605
|
if (preferLocal) {
|
|
603
606
|
applyPreferLocal(result, cwdPath);
|
|
@@ -605,19 +608,19 @@ var npmRunPath = ({
|
|
|
605
608
|
if (addExecPath) {
|
|
606
609
|
applyExecPath(result, execPath, cwdPath);
|
|
607
610
|
}
|
|
608
|
-
return [...result, pathOption].join(
|
|
611
|
+
return [...result, pathOption].join(import_node_path3.default.delimiter);
|
|
609
612
|
};
|
|
610
613
|
var applyPreferLocal = (result, cwdPath) => {
|
|
611
614
|
let previous;
|
|
612
615
|
while (previous !== cwdPath) {
|
|
613
|
-
result.push(
|
|
616
|
+
result.push(import_node_path3.default.join(cwdPath, "node_modules/.bin"));
|
|
614
617
|
previous = cwdPath;
|
|
615
|
-
cwdPath =
|
|
618
|
+
cwdPath = import_node_path3.default.resolve(cwdPath, "..");
|
|
616
619
|
}
|
|
617
620
|
};
|
|
618
621
|
var applyExecPath = (result, execPath, cwdPath) => {
|
|
619
622
|
const execPathString = execPath instanceof URL ? (0, import_node_url.fileURLToPath)(execPath) : execPath;
|
|
620
|
-
result.push(
|
|
623
|
+
result.push(import_node_path3.default.resolve(cwdPath, execPathString, ".."));
|
|
621
624
|
};
|
|
622
625
|
var npmRunPathEnv = ({ env = import_node_process2.default.env, ...options } = {}) => {
|
|
623
626
|
env = { ...env };
|
|
@@ -1662,7 +1665,7 @@ var handleArguments = (file, args, options = {}) => {
|
|
|
1662
1665
|
};
|
|
1663
1666
|
options.env = getEnv(options);
|
|
1664
1667
|
options.stdio = normalizeStdio(options);
|
|
1665
|
-
if (import_node_process.default.platform === "win32" &&
|
|
1668
|
+
if (import_node_process.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") {
|
|
1666
1669
|
args.unshift("/q");
|
|
1667
1670
|
}
|
|
1668
1671
|
return { file, args, options, parsed };
|
|
@@ -1838,6 +1841,31 @@ function execaCommand(command, options) {
|
|
|
1838
1841
|
return execa(file, args, options);
|
|
1839
1842
|
}
|
|
1840
1843
|
var debug = (0, import_debug.default)("prisma:migrate:seed");
|
|
1844
|
+
async function getSeedCommandFromPackageJson(cwd) {
|
|
1845
|
+
const prismaConfig = await (0, import_config.loadConfigFromPackageJson)(cwd);
|
|
1846
|
+
debug({ prismaConfig });
|
|
1847
|
+
if (!prismaConfig?.config?.seed) {
|
|
1848
|
+
return null;
|
|
1849
|
+
}
|
|
1850
|
+
const seedCommandFromPkgJson = prismaConfig.config.seed;
|
|
1851
|
+
if (typeof seedCommandFromPkgJson !== "string") {
|
|
1852
|
+
throw new Error(
|
|
1853
|
+
`Provided seed command \`${seedCommandFromPkgJson}\` from \`${import_node_path.default.relative(
|
|
1854
|
+
cwd,
|
|
1855
|
+
prismaConfig.loadedFromFile
|
|
1856
|
+
)}\` must be of type string`
|
|
1857
|
+
);
|
|
1858
|
+
}
|
|
1859
|
+
if (!seedCommandFromPkgJson) {
|
|
1860
|
+
throw new Error(
|
|
1861
|
+
`Provided seed command \`${seedCommandFromPkgJson}\` from \`${import_node_path.default.relative(
|
|
1862
|
+
cwd,
|
|
1863
|
+
prismaConfig.loadedFromFile
|
|
1864
|
+
)}\` cannot be empty`
|
|
1865
|
+
);
|
|
1866
|
+
}
|
|
1867
|
+
return prismaConfig.config.seed;
|
|
1868
|
+
}
|
|
1841
1869
|
async function executeSeedCommand({
|
|
1842
1870
|
commandFromConfig,
|
|
1843
1871
|
extraArgs
|
|
@@ -26,11 +26,11 @@ 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_R4IWP35Z_exports = {};
|
|
30
|
+
__export(chunk_R4IWP35Z_exports, {
|
|
31
31
|
MigrateStatus: () => MigrateStatus
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_R4IWP35Z_exports);
|
|
34
34
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
35
35
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
36
36
|
var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
|
|
@@ -81,7 +81,7 @@ Check the status of your database migrations
|
|
|
81
81
|
if (args["--help"]) {
|
|
82
82
|
return this.help();
|
|
83
83
|
}
|
|
84
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
84
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
85
85
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
86
86
|
schemaPathFromArg: args["--schema"],
|
|
87
87
|
schemaPathFromConfig: config.schema,
|
|
@@ -26,11 +26,11 @@ 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_TW22Y3AA_exports = {};
|
|
30
|
+
__export(chunk_TW22Y3AA_exports, {
|
|
31
31
|
DbPush: () => DbPush
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_TW22Y3AA_exports);
|
|
34
34
|
var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
|
|
35
35
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
36
36
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
@@ -91,7 +91,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
91
91
|
if (args["--help"]) {
|
|
92
92
|
return this.help();
|
|
93
93
|
}
|
|
94
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
94
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
95
95
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
96
96
|
schemaPathFromArg: args["--schema"],
|
|
97
97
|
schemaPathFromConfig: config.schema,
|
|
@@ -26,11 +26,11 @@ 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_Z27SI4AV_exports = {};
|
|
30
|
+
__export(chunk_Z27SI4AV_exports, {
|
|
31
31
|
DbDrop: () => DbDrop
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_Z27SI4AV_exports);
|
|
34
34
|
var import_chunk_IHDN3L3R = require("./chunk-IHDN3L3R.js");
|
|
35
35
|
var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
|
|
36
36
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
@@ -94,7 +94,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
94
94
|
if (!args["--preview-feature"]) {
|
|
95
95
|
throw new import_chunk_IHDN3L3R.PreviewFlagError();
|
|
96
96
|
}
|
|
97
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
97
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
98
98
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
99
99
|
schemaPathFromArg: args["--schema"],
|
|
100
100
|
schemaPathFromConfig: config.schema,
|
|
@@ -26,11 +26,11 @@ 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_ZTIS675B_exports = {};
|
|
30
|
+
__export(chunk_ZTIS675B_exports, {
|
|
31
31
|
MigrateDiff: () => MigrateDiff
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_ZTIS675B_exports);
|
|
34
34
|
var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
|
|
35
35
|
var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
|
|
36
36
|
var import_chunk_GGA2F64G = require("./chunk-GGA2F64G.js");
|
|
@@ -39,6 +39,7 @@ var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
|
39
39
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
40
40
|
var import_internals = require("@prisma/internals");
|
|
41
41
|
var import_path = __toESM(require("path"));
|
|
42
|
+
var import_config = require("@prisma/config");
|
|
42
43
|
var import_debug2 = require("@prisma/debug");
|
|
43
44
|
var import_fs = __toESM(require("fs"));
|
|
44
45
|
var import_path2 = __toESM(require("path"));
|
|
@@ -5568,6 +5569,10 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfi
|
|
|
5568
5569
|
if (prismaConfigResult.ok) {
|
|
5569
5570
|
return prismaConfigResult;
|
|
5570
5571
|
}
|
|
5572
|
+
const pkgJsonResult = await getSchemaFromPackageJson(cwd);
|
|
5573
|
+
if (pkgJsonResult.ok) {
|
|
5574
|
+
return pkgJsonResult;
|
|
5575
|
+
}
|
|
5571
5576
|
const defaultResult = await getDefaultSchema(cwd);
|
|
5572
5577
|
if (defaultResult.ok) {
|
|
5573
5578
|
return defaultResult;
|
|
@@ -5624,6 +5629,36 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
|
|
|
5624
5629
|
}
|
|
5625
5630
|
return schemaResult;
|
|
5626
5631
|
}
|
|
5632
|
+
async function getSchemaFromPackageJson(cwd) {
|
|
5633
|
+
const prismaConfig = await (0, import_config.loadConfigFromPackageJson)(cwd);
|
|
5634
|
+
debug("prismaConfig", prismaConfig);
|
|
5635
|
+
if (!prismaConfig || !prismaConfig.config?.schema) {
|
|
5636
|
+
return { ok: false, error: { kind: "PackageJsonNotConfigured" } };
|
|
5637
|
+
}
|
|
5638
|
+
const schemaPathFromPkgJson = prismaConfig.config.schema;
|
|
5639
|
+
if (typeof schemaPathFromPkgJson !== "string") {
|
|
5640
|
+
throw new Error(
|
|
5641
|
+
`Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path2.default.relative(
|
|
5642
|
+
cwd,
|
|
5643
|
+
prismaConfig.loadedFromFile
|
|
5644
|
+
)}\` must be of type string`
|
|
5645
|
+
);
|
|
5646
|
+
}
|
|
5647
|
+
const absoluteSchemaPath = import_path2.default.isAbsolute(schemaPathFromPkgJson) ? schemaPathFromPkgJson : import_path2.default.resolve(import_path2.default.dirname(prismaConfig.loadedFromFile), schemaPathFromPkgJson);
|
|
5648
|
+
const lookupResult = await readSchemaFromFileOrDirectory(absoluteSchemaPath);
|
|
5649
|
+
if (!lookupResult.ok) {
|
|
5650
|
+
throw new Error(
|
|
5651
|
+
`Could not load schema from \`${import_path2.default.relative(
|
|
5652
|
+
cwd,
|
|
5653
|
+
absoluteSchemaPath
|
|
5654
|
+
)}\` provided by "prisma.schema" config of \`${import_path2.default.relative(
|
|
5655
|
+
cwd,
|
|
5656
|
+
prismaConfig.loadedFromFile
|
|
5657
|
+
)}\`: ${renderLookupError(lookupResult.error)}`
|
|
5658
|
+
);
|
|
5659
|
+
}
|
|
5660
|
+
return lookupResult;
|
|
5661
|
+
}
|
|
5627
5662
|
async function getDefaultSchema(cwd, failures = []) {
|
|
5628
5663
|
const lookupPaths = [import_path2.default.join(cwd, "schema.prisma"), import_path2.default.join(cwd, "prisma", "schema.prisma")];
|
|
5629
5664
|
for (const path3 of lookupPaths) {
|
|
@@ -5838,7 +5873,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
5838
5873
|
tag: "empty"
|
|
5839
5874
|
};
|
|
5840
5875
|
} else if (args["--from-schema-datasource"]) {
|
|
5841
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false, config });
|
|
5876
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false, config });
|
|
5842
5877
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
5843
5878
|
schemaPathFromArg: args["--from-schema-datasource"],
|
|
5844
5879
|
schemaPathArgumentName: "--from-schema-datasource",
|
|
@@ -5881,7 +5916,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
5881
5916
|
tag: "empty"
|
|
5882
5917
|
};
|
|
5883
5918
|
} else if (args["--to-schema-datasource"]) {
|
|
5884
|
-
(0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false, config });
|
|
5919
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false, config });
|
|
5885
5920
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
5886
5921
|
schemaPathFromArg: args["--to-schema-datasource"],
|
|
5887
5922
|
schemaPathArgumentName: "--to-schema-datasource",
|
package/dist/commands/DbDrop.js
CHANGED
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var DbDrop_exports = {};
|
|
20
20
|
__export(DbDrop_exports, {
|
|
21
|
-
DbDrop: () =>
|
|
21
|
+
DbDrop: () => import_chunk_Z27SI4AV.DbDrop
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(DbDrop_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_Z27SI4AV = require("../chunk-Z27SI4AV.js");
|
|
25
25
|
var import_chunk_IHDN3L3R = require("../chunk-IHDN3L3R.js");
|
|
26
26
|
var import_chunk_FBDQVK4W = require("../chunk-FBDQVK4W.js");
|
|
27
27
|
var import_chunk_3WC4XD74 = require("../chunk-3WC4XD74.js");
|
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var DbExecute_exports = {};
|
|
20
20
|
__export(DbExecute_exports, {
|
|
21
|
-
DbExecute: () =>
|
|
21
|
+
DbExecute: () => import_chunk_7TVX3D4W.DbExecute
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(DbExecute_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_7TVX3D4W = require("../chunk-7TVX3D4W.js");
|
|
25
25
|
var import_chunk_D6LYHB65 = require("../chunk-D6LYHB65.js");
|
|
26
26
|
var import_chunk_T64SUJ5L = require("../chunk-T64SUJ5L.js");
|
|
27
27
|
var import_chunk_VV4M6AN7 = require("../chunk-VV4M6AN7.js");
|
package/dist/commands/DbPull.js
CHANGED
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var DbPull_exports = {};
|
|
20
20
|
__export(DbPull_exports, {
|
|
21
|
-
DbPull: () =>
|
|
21
|
+
DbPull: () => import_chunk_6ORQRJLP.DbPull
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(DbPull_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_6ORQRJLP = require("../chunk-6ORQRJLP.js");
|
|
25
25
|
var import_chunk_VU5BLQUI = require("../chunk-VU5BLQUI.js");
|
|
26
26
|
var import_chunk_AHJ2N6BJ = require("../chunk-AHJ2N6BJ.js");
|
|
27
27
|
var import_chunk_JZ75RIMZ = require("../chunk-JZ75RIMZ.js");
|
package/dist/commands/DbPush.js
CHANGED
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var DbPush_exports = {};
|
|
20
20
|
__export(DbPush_exports, {
|
|
21
|
-
DbPush: () =>
|
|
21
|
+
DbPush: () => import_chunk_TW22Y3AA.DbPush
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(DbPush_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_TW22Y3AA = require("../chunk-TW22Y3AA.js");
|
|
25
25
|
var import_chunk_FBDQVK4W = require("../chunk-FBDQVK4W.js");
|
|
26
26
|
var import_chunk_3WC4XD74 = require("../chunk-3WC4XD74.js");
|
|
27
27
|
var import_chunk_2FXU5NZQ = require("../chunk-2FXU5NZQ.js");
|
package/dist/commands/DbSeed.js
CHANGED
|
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var DbSeed_exports = {};
|
|
20
20
|
__export(DbSeed_exports, {
|
|
21
|
-
DbSeed: () =>
|
|
21
|
+
DbSeed: () => import_chunk_D4TRX77Y.DbSeed
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(DbSeed_exports);
|
|
24
|
-
var
|
|
25
|
-
var
|
|
24
|
+
var import_chunk_D4TRX77Y = require("../chunk-D4TRX77Y.js");
|
|
25
|
+
var import_chunk_PHXLQVPT = require("../chunk-PHXLQVPT.js");
|
|
26
26
|
var import_chunk_3WDCTXHL = require("../chunk-3WDCTXHL.js");
|
|
27
27
|
var import_chunk_SKRR5WT4 = require("../chunk-SKRR5WT4.js");
|
|
28
28
|
var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
|
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var MigrateDeploy_exports = {};
|
|
20
20
|
__export(MigrateDeploy_exports, {
|
|
21
|
-
MigrateDeploy: () =>
|
|
21
|
+
MigrateDeploy: () => import_chunk_BHJMJSM4.MigrateDeploy
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(MigrateDeploy_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_BHJMJSM4 = require("../chunk-BHJMJSM4.js");
|
|
25
25
|
var import_chunk_KRQEFTDT = require("../chunk-KRQEFTDT.js");
|
|
26
26
|
var import_chunk_UP6FVCDK = require("../chunk-UP6FVCDK.js");
|
|
27
27
|
var import_chunk_2R6DII47 = require("../chunk-2R6DII47.js");
|
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var MigrateDev_exports = {};
|
|
20
20
|
__export(MigrateDev_exports, {
|
|
21
|
-
MigrateDev: () =>
|
|
21
|
+
MigrateDev: () => import_chunk_F2XCBEZ4.MigrateDev
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(MigrateDev_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_F2XCBEZ4 = require("../chunk-F2XCBEZ4.js");
|
|
25
25
|
var import_chunk_C3722PDA = require("../chunk-C3722PDA.js");
|
|
26
26
|
var import_chunk_7CQBDP4H = require("../chunk-7CQBDP4H.js");
|
|
27
27
|
var import_chunk_KRQEFTDT = require("../chunk-KRQEFTDT.js");
|
|
@@ -31,7 +31,7 @@ var import_chunk_3WC4XD74 = require("../chunk-3WC4XD74.js");
|
|
|
31
31
|
var import_chunk_2FXU5NZQ = require("../chunk-2FXU5NZQ.js");
|
|
32
32
|
var import_chunk_74LUB4XX = require("../chunk-74LUB4XX.js");
|
|
33
33
|
var import_chunk_TWPTG4XS = require("../chunk-TWPTG4XS.js");
|
|
34
|
-
var
|
|
34
|
+
var import_chunk_PHXLQVPT = require("../chunk-PHXLQVPT.js");
|
|
35
35
|
var import_chunk_D6LYHB65 = require("../chunk-D6LYHB65.js");
|
|
36
36
|
var import_chunk_T64SUJ5L = require("../chunk-T64SUJ5L.js");
|
|
37
37
|
var import_chunk_VV4M6AN7 = require("../chunk-VV4M6AN7.js");
|
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var MigrateDiff_exports = {};
|
|
20
20
|
__export(MigrateDiff_exports, {
|
|
21
|
-
MigrateDiff: () =>
|
|
21
|
+
MigrateDiff: () => import_chunk_ZTIS675B.MigrateDiff
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(MigrateDiff_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_ZTIS675B = require("../chunk-ZTIS675B.js");
|
|
25
25
|
var import_chunk_VAJ4VX67 = require("../chunk-VAJ4VX67.js");
|
|
26
26
|
var import_chunk_D6LYHB65 = require("../chunk-D6LYHB65.js");
|
|
27
27
|
var import_chunk_T64SUJ5L = require("../chunk-T64SUJ5L.js");
|
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var MigrateReset_exports = {};
|
|
20
20
|
__export(MigrateReset_exports, {
|
|
21
|
-
MigrateReset: () =>
|
|
21
|
+
MigrateReset: () => import_chunk_J33EXHZB.MigrateReset
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(MigrateReset_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_J33EXHZB = require("../chunk-J33EXHZB.js");
|
|
25
25
|
var import_chunk_KRQEFTDT = require("../chunk-KRQEFTDT.js");
|
|
26
26
|
var import_chunk_UP6FVCDK = require("../chunk-UP6FVCDK.js");
|
|
27
27
|
var import_chunk_2R6DII47 = require("../chunk-2R6DII47.js");
|
|
@@ -30,7 +30,7 @@ var import_chunk_3WC4XD74 = require("../chunk-3WC4XD74.js");
|
|
|
30
30
|
var import_chunk_2FXU5NZQ = require("../chunk-2FXU5NZQ.js");
|
|
31
31
|
var import_chunk_74LUB4XX = require("../chunk-74LUB4XX.js");
|
|
32
32
|
var import_chunk_TWPTG4XS = require("../chunk-TWPTG4XS.js");
|
|
33
|
-
var
|
|
33
|
+
var import_chunk_PHXLQVPT = require("../chunk-PHXLQVPT.js");
|
|
34
34
|
var import_chunk_D6LYHB65 = require("../chunk-D6LYHB65.js");
|
|
35
35
|
var import_chunk_T64SUJ5L = require("../chunk-T64SUJ5L.js");
|
|
36
36
|
var import_chunk_VV4M6AN7 = require("../chunk-VV4M6AN7.js");
|
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var MigrateResolve_exports = {};
|
|
20
20
|
__export(MigrateResolve_exports, {
|
|
21
|
-
MigrateResolve: () =>
|
|
21
|
+
MigrateResolve: () => import_chunk_3AKRTEIK.MigrateResolve
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(MigrateResolve_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_3AKRTEIK = require("../chunk-3AKRTEIK.js");
|
|
25
25
|
var import_chunk_2FXU5NZQ = require("../chunk-2FXU5NZQ.js");
|
|
26
26
|
var import_chunk_74LUB4XX = require("../chunk-74LUB4XX.js");
|
|
27
27
|
var import_chunk_TWPTG4XS = require("../chunk-TWPTG4XS.js");
|
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var MigrateStatus_exports = {};
|
|
20
20
|
__export(MigrateStatus_exports, {
|
|
21
|
-
MigrateStatus: () =>
|
|
21
|
+
MigrateStatus: () => import_chunk_R4IWP35Z.MigrateStatus
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(MigrateStatus_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_R4IWP35Z = require("../chunk-R4IWP35Z.js");
|
|
25
25
|
var import_chunk_2FXU5NZQ = require("../chunk-2FXU5NZQ.js");
|
|
26
26
|
var import_chunk_74LUB4XX = require("../chunk-74LUB4XX.js");
|
|
27
27
|
var import_chunk_TWPTG4XS = require("../chunk-TWPTG4XS.js");
|
package/dist/index.js
CHANGED
|
@@ -19,20 +19,20 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var index_exports = {};
|
|
20
20
|
__export(index_exports, {
|
|
21
21
|
DbCommand: () => import_chunk_EJG7GKM7.DbCommand,
|
|
22
|
-
DbDrop: () =>
|
|
23
|
-
DbExecute: () =>
|
|
24
|
-
DbPull: () =>
|
|
25
|
-
DbPush: () =>
|
|
26
|
-
DbSeed: () =>
|
|
22
|
+
DbDrop: () => import_chunk_Z27SI4AV.DbDrop,
|
|
23
|
+
DbExecute: () => import_chunk_7TVX3D4W.DbExecute,
|
|
24
|
+
DbPull: () => import_chunk_6ORQRJLP.DbPull,
|
|
25
|
+
DbPush: () => import_chunk_TW22Y3AA.DbPush,
|
|
26
|
+
DbSeed: () => import_chunk_D4TRX77Y.DbSeed,
|
|
27
27
|
EngineResults: () => import_chunk_LVR7W5DD.EngineResults,
|
|
28
28
|
Migrate: () => import_chunk_D6LYHB65.Migrate,
|
|
29
29
|
MigrateCommand: () => import_chunk_LLO7YF56.MigrateCommand,
|
|
30
|
-
MigrateDeploy: () =>
|
|
31
|
-
MigrateDev: () =>
|
|
32
|
-
MigrateDiff: () =>
|
|
33
|
-
MigrateReset: () =>
|
|
34
|
-
MigrateResolve: () =>
|
|
35
|
-
MigrateStatus: () =>
|
|
30
|
+
MigrateDeploy: () => import_chunk_BHJMJSM4.MigrateDeploy,
|
|
31
|
+
MigrateDev: () => import_chunk_F2XCBEZ4.MigrateDev,
|
|
32
|
+
MigrateDiff: () => import_chunk_ZTIS675B.MigrateDiff,
|
|
33
|
+
MigrateReset: () => import_chunk_J33EXHZB.MigrateReset,
|
|
34
|
+
MigrateResolve: () => import_chunk_3AKRTEIK.MigrateResolve,
|
|
35
|
+
MigrateStatus: () => import_chunk_R4IWP35Z.MigrateStatus,
|
|
36
36
|
SchemaEngineCLI: () => import_chunk_GSX25HRL.SchemaEngineCLI,
|
|
37
37
|
SchemaEngineWasm: () => import_chunk_22YP3RXZ.SchemaEngineWasm,
|
|
38
38
|
byline: () => import_chunk_L6KOIJJ5.byline,
|
|
@@ -42,23 +42,23 @@ __export(index_exports, {
|
|
|
42
42
|
module.exports = __toCommonJS(index_exports);
|
|
43
43
|
var import_chunk_O35BTK6Y = require("./chunk-O35BTK6Y.js");
|
|
44
44
|
var import_chunk_LVR7W5DD = require("./chunk-LVR7W5DD.js");
|
|
45
|
-
var
|
|
45
|
+
var import_chunk_Z27SI4AV = require("./chunk-Z27SI4AV.js");
|
|
46
46
|
var import_chunk_IHDN3L3R = require("./chunk-IHDN3L3R.js");
|
|
47
47
|
var import_chunk_NB4FRYRQ = require("./chunk-NB4FRYRQ.js");
|
|
48
|
-
var
|
|
49
|
-
var
|
|
48
|
+
var import_chunk_BHJMJSM4 = require("./chunk-BHJMJSM4.js");
|
|
49
|
+
var import_chunk_F2XCBEZ4 = require("./chunk-F2XCBEZ4.js");
|
|
50
50
|
var import_chunk_C3722PDA = require("./chunk-C3722PDA.js");
|
|
51
51
|
var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
|
|
52
|
-
var
|
|
52
|
+
var import_chunk_ZTIS675B = require("./chunk-ZTIS675B.js");
|
|
53
53
|
var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
|
|
54
|
-
var
|
|
54
|
+
var import_chunk_J33EXHZB = require("./chunk-J33EXHZB.js");
|
|
55
55
|
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
56
56
|
var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
|
|
57
|
-
var
|
|
58
|
-
var
|
|
57
|
+
var import_chunk_3AKRTEIK = require("./chunk-3AKRTEIK.js");
|
|
58
|
+
var import_chunk_R4IWP35Z = require("./chunk-R4IWP35Z.js");
|
|
59
59
|
var import_chunk_EJG7GKM7 = require("./chunk-EJG7GKM7.js");
|
|
60
|
-
var
|
|
61
|
-
var
|
|
60
|
+
var import_chunk_7TVX3D4W = require("./chunk-7TVX3D4W.js");
|
|
61
|
+
var import_chunk_6ORQRJLP = require("./chunk-6ORQRJLP.js");
|
|
62
62
|
var import_chunk_VU5BLQUI = require("./chunk-VU5BLQUI.js");
|
|
63
63
|
var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
|
|
64
64
|
var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
|
|
@@ -68,14 +68,14 @@ var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
|
|
|
68
68
|
var import_chunk_AI6DH66U = require("./chunk-AI6DH66U.js");
|
|
69
69
|
var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
|
|
70
70
|
var import_chunk_2R6DII47 = require("./chunk-2R6DII47.js");
|
|
71
|
-
var
|
|
71
|
+
var import_chunk_TW22Y3AA = require("./chunk-TW22Y3AA.js");
|
|
72
72
|
var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
|
|
73
73
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
74
74
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
75
75
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
76
76
|
var import_chunk_TWPTG4XS = require("./chunk-TWPTG4XS.js");
|
|
77
|
-
var
|
|
78
|
-
var
|
|
77
|
+
var import_chunk_D4TRX77Y = require("./chunk-D4TRX77Y.js");
|
|
78
|
+
var import_chunk_PHXLQVPT = require("./chunk-PHXLQVPT.js");
|
|
79
79
|
var import_chunk_LLO7YF56 = require("./chunk-LLO7YF56.js");
|
|
80
80
|
var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
|
|
81
81
|
var import_chunk_T64SUJ5L = require("./chunk-T64SUJ5L.js");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type { GetSchemaResult } from '@prisma/schema-files-loader';
|
|
1
|
+
import type { GetSchemaResult, SuccessfulLookupResult } from '@prisma/schema-files-loader';
|
|
2
|
+
type PackageJsonLookupResult = SuccessfulLookupResult | {
|
|
3
|
+
ok: false;
|
|
4
|
+
error: {
|
|
5
|
+
kind: 'PackageJsonNotConfigured';
|
|
6
|
+
};
|
|
7
|
+
};
|
|
2
8
|
export type GetSchemaOptions = {
|
|
3
9
|
cwd?: string;
|
|
4
10
|
argumentName?: string;
|
|
@@ -22,3 +28,11 @@ export declare function getSchemaWithPath(schemaPathFromArgs?: string, schemaPat
|
|
|
22
28
|
*/
|
|
23
29
|
export declare function getSchemaWithPathOptional(schemaPathFromArgs?: string, schemaPathFromConfig?: string, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult | null>;
|
|
24
30
|
export declare function printSchemaLoadedMessage(schemaPath: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Trying to access this function results in a deprecation warning.
|
|
33
|
+
* Users should be instructed to use the Prisma config file instead.
|
|
34
|
+
* See: https://pris.ly/prisma-config.
|
|
35
|
+
* @deprecated
|
|
36
|
+
*/
|
|
37
|
+
export declare function getSchemaFromPackageJson(cwd: string): Promise<PackageJsonLookupResult>;
|
|
38
|
+
export {};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User's Prisma configuration should live in `prisma.config.ts` instead of `package.json#prisma`.
|
|
3
|
+
* See: https://pris.ly/prisma-config.
|
|
4
|
+
* @deprecated
|
|
5
|
+
*/
|
|
6
|
+
export declare function getSeedCommandFromPackageJson(cwd: string): Promise<string | null>;
|
|
1
7
|
export declare function executeSeedCommand({ commandFromConfig, extraArgs, }: {
|
|
2
8
|
commandFromConfig: string;
|
|
3
9
|
extraArgs?: string;
|
package/dist/utils/seed.js
CHANGED
|
@@ -18,10 +18,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var seed_exports = {};
|
|
20
20
|
__export(seed_exports, {
|
|
21
|
-
executeSeedCommand: () =>
|
|
21
|
+
executeSeedCommand: () => import_chunk_PHXLQVPT.executeSeedCommand,
|
|
22
|
+
getSeedCommandFromPackageJson: () => import_chunk_PHXLQVPT.getSeedCommandFromPackageJson
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(seed_exports);
|
|
24
|
-
var
|
|
25
|
+
var import_chunk_PHXLQVPT = require("../chunk-PHXLQVPT.js");
|
|
25
26
|
var import_chunk_3WDCTXHL = require("../chunk-3WDCTXHL.js");
|
|
26
27
|
var import_chunk_SKRR5WT4 = require("../chunk-SKRR5WT4.js");
|
|
27
28
|
var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/migrate",
|
|
3
|
-
"version": "6.18.0
|
|
3
|
+
"version": "6.18.0",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/migrate/src/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@swc/core": "1.11.5",
|
|
22
22
|
"@swc/jest": "0.2.37",
|
|
23
23
|
"@types/jest": "29.5.14",
|
|
24
|
-
"@types/node": "
|
|
24
|
+
"@types/node": "18.19.76",
|
|
25
25
|
"@types/pg": "8.11.11",
|
|
26
26
|
"@types/prompts": "2.4.9",
|
|
27
27
|
"@types/sqlite3": "3.1.11",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"tempy": "1.0.1",
|
|
45
45
|
"ts-pattern": "5.6.2",
|
|
46
46
|
"typescript": "5.4.5",
|
|
47
|
-
"@prisma/adapter-libsql": "6.18.0
|
|
47
|
+
"@prisma/adapter-libsql": "6.18.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@prisma/internals": "*"
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@prisma/engines-version": "6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f",
|
|
54
54
|
"prompts": "2.4.2",
|
|
55
|
-
"@prisma/client-generator-registry": "6.18.0
|
|
56
|
-
"@prisma/config": "6.18.0
|
|
57
|
-
"@prisma/
|
|
58
|
-
"@prisma/
|
|
59
|
-
"@prisma/
|
|
60
|
-
"@prisma/
|
|
61
|
-
"@prisma/
|
|
55
|
+
"@prisma/client-generator-registry": "6.18.0",
|
|
56
|
+
"@prisma/config": "6.18.0",
|
|
57
|
+
"@prisma/driver-adapter-utils": "6.18.0",
|
|
58
|
+
"@prisma/debug": "6.18.0",
|
|
59
|
+
"@prisma/get-platform": "6.18.0",
|
|
60
|
+
"@prisma/internals": "6.18.0",
|
|
61
|
+
"@prisma/generator": "6.18.0"
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
64
64
|
"README.md",
|