@prisma/migrate 6.17.0-dev.3 → 6.17.0-dev.31
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/Migrate.js +6 -5
- package/dist/SchemaEngineCLI.js +3 -3
- package/dist/SchemaEngineWasm.js +3 -3
- package/dist/bin.js +36 -35
- package/dist/chunk-3WDCTXHL.js +270 -0
- package/dist/{chunk-UQEITMMV.js → chunk-4UHTKK7E.js} +12 -8
- package/dist/{chunk-B64PYCYC.js → chunk-5ETYUPYJ.js} +17 -11
- package/dist/{chunk-ORBFWBKN.js → chunk-CR34IQRC.js} +5 -5
- package/dist/{chunk-DYXEUKV3.js → chunk-D4TRX77Y.js} +6 -6
- package/dist/{chunk-YEUENY2G.js → chunk-DDD7GPGH.js} +11 -5
- package/dist/{chunk-EXY2VDLY.js → chunk-FBDQVK4W.js} +5 -4
- package/dist/{chunk-WXE3X4AN.js → chunk-FSKMAMBM.js} +13 -7
- package/dist/{chunk-QF5OMSPA.js → chunk-H5CDIF7X.js} +5 -5
- package/dist/{chunk-BKW5AGJV.js → chunk-M22W35EN.js} +11 -5
- package/dist/{chunk-U62JTEME.js → chunk-MCGCRK5I.js} +5 -5
- package/dist/{chunk-EJUXYFV3.js → chunk-OP2BDF75.js} +5 -4
- package/dist/{chunk-CXSHCKU6.js → chunk-OXN62EEV.js} +5 -5
- package/dist/chunk-PHXLQVPT.js +1890 -0
- package/dist/{chunk-F3JIZWIS.js → chunk-PSCP5S54.js} +17 -17
- package/dist/{chunk-CD4AWGFA.js → chunk-RHCOFXBR.js} +9 -4
- package/dist/{chunk-R2YKCEAN.js → chunk-RUJYIYAK.js} +5 -5
- package/dist/{chunk-RNQEWSLQ.js → chunk-VDFDEQDX.js} +16 -6
- package/dist/{chunk-YQ6GTOKJ.js → chunk-VSNIZVYG.js} +11 -10
- package/dist/{chunk-IINN7QUV.js → chunk-VU5BLQUI.js} +8 -8
- package/dist/{chunk-G56DQP5E.js → chunk-VUKPTQSN.js} +5 -5
- package/dist/{chunk-URKH6SE2.js → chunk-VV4M6AN7.js} +5 -251
- package/dist/commands/DbDrop.js +3 -3
- package/dist/commands/DbExecute.js +7 -6
- package/dist/commands/DbPull.js +10 -9
- package/dist/commands/DbPush.js +8 -7
- package/dist/commands/DbSeed.js +4 -3
- package/dist/commands/MigrateDeploy.js +7 -6
- package/dist/commands/MigrateDev.js +9 -8
- package/dist/commands/MigrateDiff.js +7 -6
- package/dist/commands/MigrateReset.js +10 -9
- package/dist/commands/MigrateResolve.js +7 -6
- package/dist/commands/MigrateStatus.js +7 -6
- package/dist/extensions.js +1 -0
- package/dist/index.js +43 -42
- package/dist/migrate/src/Migrate.d.ts +2 -0
- package/dist/migrate/src/SchemaEngineCLI.d.ts +3 -0
- package/dist/migrate/src/extensions.d.ts +13 -0
- package/dist/utils/ai-safety.js +2 -2
- package/dist/utils/getDatabaseVersionSafe.js +7 -6
- package/dist/utils/introspectSql.js +7 -6
- package/dist/utils/seed.js +4 -3
- package/dist/utils/setupMSSQL.js +544 -16
- package/dist/utils/setupMongo.js +3 -3
- package/dist/utils/spinner.js +4 -3
- package/package.json +11 -11
- package/dist/chunk-HFXUQT52.js +0 -1982
package/dist/Migrate.js
CHANGED
|
@@ -18,16 +18,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var Migrate_exports = {};
|
|
20
20
|
__export(Migrate_exports, {
|
|
21
|
-
Migrate: () =>
|
|
21
|
+
Migrate: () => import_chunk_PSCP5S54.Migrate
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(Migrate_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_PSCP5S54 = require("./chunk-PSCP5S54.js");
|
|
25
25
|
var import_chunk_PCTCQIOH = require("./chunk-PCTCQIOH.js");
|
|
26
|
-
var
|
|
26
|
+
var import_chunk_VV4M6AN7 = require("./chunk-VV4M6AN7.js");
|
|
27
27
|
var import_chunk_GGA2F64G = require("./chunk-GGA2F64G.js");
|
|
28
28
|
var import_chunk_23DZXSTI = require("./chunk-23DZXSTI.js");
|
|
29
|
-
var
|
|
30
|
-
var
|
|
29
|
+
var import_chunk_3WDCTXHL = require("./chunk-3WDCTXHL.js");
|
|
30
|
+
var import_chunk_CR34IQRC = require("./chunk-CR34IQRC.js");
|
|
31
|
+
var import_chunk_RHCOFXBR = require("./chunk-RHCOFXBR.js");
|
|
31
32
|
var import_chunk_AXR7LS2N = require("./chunk-AXR7LS2N.js");
|
|
32
33
|
var import_chunk_L6KOIJJ5 = require("./chunk-L6KOIJJ5.js");
|
|
33
34
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
package/dist/SchemaEngineCLI.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 SchemaEngineCLI_exports = {};
|
|
20
20
|
__export(SchemaEngineCLI_exports, {
|
|
21
|
-
EngineError: () =>
|
|
22
|
-
SchemaEngineCLI: () =>
|
|
21
|
+
EngineError: () => import_chunk_RHCOFXBR.EngineError,
|
|
22
|
+
SchemaEngineCLI: () => import_chunk_RHCOFXBR.SchemaEngineCLI
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(SchemaEngineCLI_exports);
|
|
25
|
-
var
|
|
25
|
+
var import_chunk_RHCOFXBR = require("./chunk-RHCOFXBR.js");
|
|
26
26
|
var import_chunk_AXR7LS2N = require("./chunk-AXR7LS2N.js");
|
|
27
27
|
var import_chunk_L6KOIJJ5 = require("./chunk-L6KOIJJ5.js");
|
|
28
28
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
package/dist/SchemaEngineWasm.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 SchemaEngineWasm_exports = {};
|
|
20
20
|
__export(SchemaEngineWasm_exports, {
|
|
21
|
-
SchemaEngineWasm: () =>
|
|
21
|
+
SchemaEngineWasm: () => import_chunk_CR34IQRC.SchemaEngineWasm
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(SchemaEngineWasm_exports);
|
|
24
|
-
var
|
|
25
|
-
var
|
|
24
|
+
var import_chunk_CR34IQRC = require("./chunk-CR34IQRC.js");
|
|
25
|
+
var import_chunk_RHCOFXBR = require("./chunk-RHCOFXBR.js");
|
|
26
26
|
var import_chunk_AXR7LS2N = require("./chunk-AXR7LS2N.js");
|
|
27
27
|
var import_chunk_L6KOIJJ5 = require("./chunk-L6KOIJJ5.js");
|
|
28
28
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
package/dist/bin.js
CHANGED
|
@@ -23,46 +23,47 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
mod
|
|
24
24
|
));
|
|
25
25
|
var import_chunk_NGQA5JTN = require("./chunk-NGQA5JTN.js");
|
|
26
|
-
var
|
|
27
|
-
var
|
|
26
|
+
var import_chunk_RUJYIYAK = require("./chunk-RUJYIYAK.js");
|
|
27
|
+
var import_chunk_M22W35EN = require("./chunk-M22W35EN.js");
|
|
28
|
+
var import_chunk_VSNIZVYG = require("./chunk-VSNIZVYG.js");
|
|
28
29
|
var import_chunk_C3722PDA = require("./chunk-C3722PDA.js");
|
|
29
30
|
var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
|
|
30
|
-
var
|
|
31
|
-
var import_chunk_B64PYCYC = require("./chunk-B64PYCYC.js");
|
|
32
|
-
var import_chunk_RNQEWSLQ = require("./chunk-RNQEWSLQ.js");
|
|
33
|
-
var import_chunk_YEUENY2G = require("./chunk-YEUENY2G.js");
|
|
31
|
+
var import_chunk_H5CDIF7X = require("./chunk-H5CDIF7X.js");
|
|
34
32
|
var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
|
|
33
|
+
var import_chunk_5ETYUPYJ = require("./chunk-5ETYUPYJ.js");
|
|
34
|
+
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
35
|
+
var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
|
|
36
|
+
var import_chunk_VDFDEQDX = require("./chunk-VDFDEQDX.js");
|
|
37
|
+
var import_chunk_DDD7GPGH = require("./chunk-DDD7GPGH.js");
|
|
35
38
|
var import_chunk_EJG7GKM7 = require("./chunk-EJG7GKM7.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
+
var import_chunk_MCGCRK5I = require("./chunk-MCGCRK5I.js");
|
|
40
|
+
var import_chunk_4UHTKK7E = require("./chunk-4UHTKK7E.js");
|
|
41
|
+
var import_chunk_VU5BLQUI = require("./chunk-VU5BLQUI.js");
|
|
42
|
+
var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
|
|
39
43
|
var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
|
|
40
44
|
var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
|
|
41
45
|
var import_chunk_RTGQXNX6 = require("./chunk-RTGQXNX6.js");
|
|
42
46
|
var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
|
|
43
47
|
var import_chunk_AI6DH66U = require("./chunk-AI6DH66U.js");
|
|
44
|
-
var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
|
|
45
48
|
var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
|
|
46
|
-
var import_chunk_WXE3X4AN = require("./chunk-WXE3X4AN.js");
|
|
47
|
-
var import_chunk_EXY2VDLY = require("./chunk-EXY2VDLY.js");
|
|
48
|
-
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
49
|
-
var import_chunk_DYXEUKV3 = require("./chunk-DYXEUKV3.js");
|
|
50
|
-
var import_chunk_HFXUQT52 = require("./chunk-HFXUQT52.js");
|
|
51
|
-
var import_chunk_LLO7YF56 = require("./chunk-LLO7YF56.js");
|
|
52
|
-
var import_chunk_BKW5AGJV = require("./chunk-BKW5AGJV.js");
|
|
53
|
-
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
54
|
-
var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
|
|
55
49
|
var import_chunk_2R6DII47 = require("./chunk-2R6DII47.js");
|
|
50
|
+
var import_chunk_FSKMAMBM = require("./chunk-FSKMAMBM.js");
|
|
51
|
+
var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
|
|
52
|
+
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
56
53
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
57
54
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
58
55
|
var import_chunk_TWPTG4XS = require("./chunk-TWPTG4XS.js");
|
|
59
|
-
var
|
|
56
|
+
var import_chunk_D4TRX77Y = require("./chunk-D4TRX77Y.js");
|
|
57
|
+
var import_chunk_PHXLQVPT = require("./chunk-PHXLQVPT.js");
|
|
58
|
+
var import_chunk_LLO7YF56 = require("./chunk-LLO7YF56.js");
|
|
59
|
+
var import_chunk_PSCP5S54 = require("./chunk-PSCP5S54.js");
|
|
60
60
|
var import_chunk_PCTCQIOH = require("./chunk-PCTCQIOH.js");
|
|
61
|
-
var
|
|
61
|
+
var import_chunk_VV4M6AN7 = require("./chunk-VV4M6AN7.js");
|
|
62
62
|
var import_chunk_GGA2F64G = require("./chunk-GGA2F64G.js");
|
|
63
63
|
var import_chunk_23DZXSTI = require("./chunk-23DZXSTI.js");
|
|
64
|
-
var
|
|
65
|
-
var
|
|
64
|
+
var import_chunk_3WDCTXHL = require("./chunk-3WDCTXHL.js");
|
|
65
|
+
var import_chunk_CR34IQRC = require("./chunk-CR34IQRC.js");
|
|
66
|
+
var import_chunk_RHCOFXBR = require("./chunk-RHCOFXBR.js");
|
|
66
67
|
var import_chunk_AXR7LS2N = require("./chunk-AXR7LS2N.js");
|
|
67
68
|
var import_chunk_L6KOIJJ5 = require("./chunk-L6KOIJJ5.js");
|
|
68
69
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
@@ -71,7 +72,7 @@ var import_config = require("@prisma/config");
|
|
|
71
72
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
72
73
|
var import_engines_version = require("@prisma/engines-version");
|
|
73
74
|
var import_internals = require("@prisma/internals");
|
|
74
|
-
var version = "6.17.0-dev.
|
|
75
|
+
var version = "6.17.0-dev.31";
|
|
75
76
|
process.on("uncaughtException", (e) => {
|
|
76
77
|
console.log(e);
|
|
77
78
|
});
|
|
@@ -93,19 +94,19 @@ var args = (0, import_internals.arg)(
|
|
|
93
94
|
async function main() {
|
|
94
95
|
const cli = import_chunk_NGQA5JTN.CLI.new({
|
|
95
96
|
migrate: import_chunk_LLO7YF56.MigrateCommand.new({
|
|
96
|
-
dev:
|
|
97
|
-
status:
|
|
98
|
-
resolve:
|
|
99
|
-
reset:
|
|
100
|
-
deploy:
|
|
101
|
-
diff:
|
|
97
|
+
dev: import_chunk_VSNIZVYG.MigrateDev.new(),
|
|
98
|
+
status: import_chunk_DDD7GPGH.MigrateStatus.new(),
|
|
99
|
+
resolve: import_chunk_VDFDEQDX.MigrateResolve.new(),
|
|
100
|
+
reset: import_chunk_5ETYUPYJ.MigrateReset.new(),
|
|
101
|
+
deploy: import_chunk_M22W35EN.MigrateDeploy.new(),
|
|
102
|
+
diff: import_chunk_H5CDIF7X.MigrateDiff.new()
|
|
102
103
|
}),
|
|
103
104
|
db: import_chunk_EJG7GKM7.DbCommand.new({
|
|
104
|
-
execute:
|
|
105
|
-
pull:
|
|
106
|
-
push:
|
|
105
|
+
execute: import_chunk_MCGCRK5I.DbExecute.new(),
|
|
106
|
+
pull: import_chunk_4UHTKK7E.DbPull.new(),
|
|
107
|
+
push: import_chunk_FSKMAMBM.DbPush.new(),
|
|
107
108
|
// drop: DbDrop.new(),
|
|
108
|
-
seed:
|
|
109
|
+
seed: import_chunk_D4TRX77Y.DbSeed.new()
|
|
109
110
|
})
|
|
110
111
|
});
|
|
111
112
|
const { config, error } = await (0, import_config.loadConfigFromFile)({ configFile: args["--config"] });
|
|
@@ -135,7 +136,7 @@ main().then((code) => {
|
|
|
135
136
|
cliVersion: version,
|
|
136
137
|
enginesVersion: import_engines_version.enginesVersion,
|
|
137
138
|
command: commandArray.join(" "),
|
|
138
|
-
getDatabaseVersionSafe:
|
|
139
|
+
getDatabaseVersionSafe: import_chunk_RUJYIYAK.getDatabaseVersionSafe
|
|
139
140
|
}).catch((e) => {
|
|
140
141
|
if (import_debug.default.enabled("migrate")) {
|
|
141
142
|
console.error((0, import_chunk_SKRR5WT4.red)((0, import_chunk_SKRR5WT4.bold)("Error: ")) + e.stack);
|
|
@@ -0,0 +1,270 @@
|
|
|
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_3WDCTXHL_exports = {};
|
|
20
|
+
__export(chunk_3WDCTXHL_exports, {
|
|
21
|
+
onExit: () => onExit
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(chunk_3WDCTXHL_exports);
|
|
24
|
+
var signals = [];
|
|
25
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
26
|
+
if (process.platform !== "win32") {
|
|
27
|
+
signals.push(
|
|
28
|
+
"SIGALRM",
|
|
29
|
+
"SIGABRT",
|
|
30
|
+
"SIGVTALRM",
|
|
31
|
+
"SIGXCPU",
|
|
32
|
+
"SIGXFSZ",
|
|
33
|
+
"SIGUSR2",
|
|
34
|
+
"SIGTRAP",
|
|
35
|
+
"SIGSYS",
|
|
36
|
+
"SIGQUIT",
|
|
37
|
+
"SIGIOT"
|
|
38
|
+
// should detect profiler and enable/disable accordingly.
|
|
39
|
+
// see #21
|
|
40
|
+
// 'SIGPROF'
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
if (process.platform === "linux") {
|
|
44
|
+
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
45
|
+
}
|
|
46
|
+
var processOk = (process3) => !!process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
|
|
47
|
+
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
48
|
+
var global = globalThis;
|
|
49
|
+
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
50
|
+
var Emitter = class {
|
|
51
|
+
emitted = {
|
|
52
|
+
afterExit: false,
|
|
53
|
+
exit: false
|
|
54
|
+
};
|
|
55
|
+
listeners = {
|
|
56
|
+
afterExit: [],
|
|
57
|
+
exit: []
|
|
58
|
+
};
|
|
59
|
+
count = 0;
|
|
60
|
+
id = Math.random();
|
|
61
|
+
constructor() {
|
|
62
|
+
if (global[kExitEmitter]) {
|
|
63
|
+
return global[kExitEmitter];
|
|
64
|
+
}
|
|
65
|
+
ObjectDefineProperty(global, kExitEmitter, {
|
|
66
|
+
value: this,
|
|
67
|
+
writable: false,
|
|
68
|
+
enumerable: false,
|
|
69
|
+
configurable: false
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
on(ev, fn) {
|
|
73
|
+
this.listeners[ev].push(fn);
|
|
74
|
+
}
|
|
75
|
+
removeListener(ev, fn) {
|
|
76
|
+
const list = this.listeners[ev];
|
|
77
|
+
const i = list.indexOf(fn);
|
|
78
|
+
if (i === -1) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (i === 0 && list.length === 1) {
|
|
82
|
+
list.length = 0;
|
|
83
|
+
} else {
|
|
84
|
+
list.splice(i, 1);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
emit(ev, code, signal) {
|
|
88
|
+
if (this.emitted[ev]) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
this.emitted[ev] = true;
|
|
92
|
+
let ret = false;
|
|
93
|
+
for (const fn of this.listeners[ev]) {
|
|
94
|
+
ret = fn(code, signal) === true || ret;
|
|
95
|
+
}
|
|
96
|
+
if (ev === "exit") {
|
|
97
|
+
ret = this.emit("afterExit", code, signal) || ret;
|
|
98
|
+
}
|
|
99
|
+
return ret;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var SignalExitBase = class {
|
|
103
|
+
};
|
|
104
|
+
var signalExitWrap = (handler) => {
|
|
105
|
+
return {
|
|
106
|
+
onExit(cb, opts) {
|
|
107
|
+
return handler.onExit(cb, opts);
|
|
108
|
+
},
|
|
109
|
+
load() {
|
|
110
|
+
return handler.load();
|
|
111
|
+
},
|
|
112
|
+
unload() {
|
|
113
|
+
return handler.unload();
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
var SignalExitFallback = class extends SignalExitBase {
|
|
118
|
+
onExit() {
|
|
119
|
+
return () => {
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
load() {
|
|
123
|
+
}
|
|
124
|
+
unload() {
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
var SignalExit = class extends SignalExitBase {
|
|
128
|
+
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
129
|
+
// so use a supported signal instead
|
|
130
|
+
/* c8 ignore start */
|
|
131
|
+
#hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
132
|
+
/* c8 ignore stop */
|
|
133
|
+
#emitter = new Emitter();
|
|
134
|
+
#process;
|
|
135
|
+
#originalProcessEmit;
|
|
136
|
+
#originalProcessReallyExit;
|
|
137
|
+
#sigListeners = {};
|
|
138
|
+
#loaded = false;
|
|
139
|
+
constructor(process3) {
|
|
140
|
+
super();
|
|
141
|
+
this.#process = process3;
|
|
142
|
+
this.#sigListeners = {};
|
|
143
|
+
for (const sig of signals) {
|
|
144
|
+
this.#sigListeners[sig] = () => {
|
|
145
|
+
const listeners = this.#process.listeners(sig);
|
|
146
|
+
let { count } = this.#emitter;
|
|
147
|
+
const p = process3;
|
|
148
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
149
|
+
count += p.__signal_exit_emitter__.count;
|
|
150
|
+
}
|
|
151
|
+
if (listeners.length === count) {
|
|
152
|
+
this.unload();
|
|
153
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
|
154
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
155
|
+
if (!ret)
|
|
156
|
+
process3.kill(process3.pid, s);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
this.#originalProcessReallyExit = process3.reallyExit;
|
|
161
|
+
this.#originalProcessEmit = process3.emit;
|
|
162
|
+
}
|
|
163
|
+
onExit(cb, opts) {
|
|
164
|
+
if (!processOk(this.#process)) {
|
|
165
|
+
return () => {
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (this.#loaded === false) {
|
|
169
|
+
this.load();
|
|
170
|
+
}
|
|
171
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
172
|
+
this.#emitter.on(ev, cb);
|
|
173
|
+
return () => {
|
|
174
|
+
this.#emitter.removeListener(ev, cb);
|
|
175
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
176
|
+
this.unload();
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
load() {
|
|
181
|
+
if (this.#loaded) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
this.#loaded = true;
|
|
185
|
+
this.#emitter.count += 1;
|
|
186
|
+
for (const sig of signals) {
|
|
187
|
+
try {
|
|
188
|
+
const fn = this.#sigListeners[sig];
|
|
189
|
+
if (fn)
|
|
190
|
+
this.#process.on(sig, fn);
|
|
191
|
+
} catch (_) {
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
this.#process.emit = (ev, ...a) => {
|
|
195
|
+
return this.#processEmit(ev, ...a);
|
|
196
|
+
};
|
|
197
|
+
this.#process.reallyExit = (code) => {
|
|
198
|
+
return this.#processReallyExit(code);
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
unload() {
|
|
202
|
+
if (!this.#loaded) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
this.#loaded = false;
|
|
206
|
+
signals.forEach((sig) => {
|
|
207
|
+
const listener = this.#sigListeners[sig];
|
|
208
|
+
if (!listener) {
|
|
209
|
+
throw new Error("Listener not defined for signal: " + sig);
|
|
210
|
+
}
|
|
211
|
+
try {
|
|
212
|
+
this.#process.removeListener(sig, listener);
|
|
213
|
+
} catch (_) {
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
this.#process.emit = this.#originalProcessEmit;
|
|
217
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
218
|
+
this.#emitter.count -= 1;
|
|
219
|
+
}
|
|
220
|
+
#processReallyExit(code) {
|
|
221
|
+
if (!processOk(this.#process)) {
|
|
222
|
+
return 0;
|
|
223
|
+
}
|
|
224
|
+
this.#process.exitCode = code || 0;
|
|
225
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
226
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
227
|
+
}
|
|
228
|
+
#processEmit(ev, ...args) {
|
|
229
|
+
const og = this.#originalProcessEmit;
|
|
230
|
+
if (ev === "exit" && processOk(this.#process)) {
|
|
231
|
+
if (typeof args[0] === "number") {
|
|
232
|
+
this.#process.exitCode = args[0];
|
|
233
|
+
}
|
|
234
|
+
const ret = og.call(this.#process, ev, ...args);
|
|
235
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
236
|
+
return ret;
|
|
237
|
+
} else {
|
|
238
|
+
return og.call(this.#process, ev, ...args);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
var process2 = globalThis.process;
|
|
243
|
+
var {
|
|
244
|
+
/**
|
|
245
|
+
* Called when the process is exiting, whether via signal, explicit
|
|
246
|
+
* exit, or running out of stuff to do.
|
|
247
|
+
*
|
|
248
|
+
* If the global process object is not suitable for instrumentation,
|
|
249
|
+
* then this will be a no-op.
|
|
250
|
+
*
|
|
251
|
+
* Returns a function that may be used to unload signal-exit.
|
|
252
|
+
*/
|
|
253
|
+
onExit,
|
|
254
|
+
/**
|
|
255
|
+
* Load the listeners. Likely you never need to call this, unless
|
|
256
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
257
|
+
* Mostly exposed for the benefit of testing.
|
|
258
|
+
*
|
|
259
|
+
* @internal
|
|
260
|
+
*/
|
|
261
|
+
load,
|
|
262
|
+
/**
|
|
263
|
+
* Unload the listeners. Likely you never need to call this, unless
|
|
264
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
265
|
+
* Mostly exposed for the benefit of testing.
|
|
266
|
+
*
|
|
267
|
+
* @internal
|
|
268
|
+
*/
|
|
269
|
+
unload
|
|
270
|
+
} = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback());
|
|
@@ -26,23 +26,23 @@ 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_4UHTKK7E_exports = {};
|
|
30
|
+
__export(chunk_4UHTKK7E_exports, {
|
|
31
31
|
DbPull: () => DbPull
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_4UHTKK7E_exports);
|
|
34
|
+
var import_chunk_VU5BLQUI = require("./chunk-VU5BLQUI.js");
|
|
35
|
+
var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
|
|
35
36
|
var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
|
|
36
37
|
var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
|
|
37
38
|
var import_chunk_RTGQXNX6 = require("./chunk-RTGQXNX6.js");
|
|
38
39
|
var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
|
|
39
40
|
var import_chunk_AI6DH66U = require("./chunk-AI6DH66U.js");
|
|
40
|
-
var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
|
|
41
41
|
var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
|
|
42
42
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
43
43
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
44
44
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
45
|
-
var
|
|
45
|
+
var import_chunk_PSCP5S54 = require("./chunk-PSCP5S54.js");
|
|
46
46
|
var import_chunk_AXR7LS2N = require("./chunk-AXR7LS2N.js");
|
|
47
47
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
48
48
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
@@ -118,7 +118,7 @@ Set composite types introspection depth to 2 levels
|
|
|
118
118
|
"--local-d1": Boolean
|
|
119
119
|
// optional, only on cloudflare D1
|
|
120
120
|
});
|
|
121
|
-
const spinnerFactory = (0,
|
|
121
|
+
const spinnerFactory = (0, import_chunk_VU5BLQUI.createSpinner)(!args["--print"]);
|
|
122
122
|
if (args instanceof Error) {
|
|
123
123
|
return this.help(args.message);
|
|
124
124
|
}
|
|
@@ -234,7 +234,11 @@ Some information will be lost (relations, comments, mapped fields, @ignore...),
|
|
|
234
234
|
)} for more info.`);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
const migrate = await
|
|
237
|
+
const migrate = await import_chunk_PSCP5S54.Migrate.setup({
|
|
238
|
+
adapter,
|
|
239
|
+
schemaContext: schemaContext ?? void 0,
|
|
240
|
+
extensions: config["extensions"]
|
|
241
|
+
});
|
|
238
242
|
const engine = migrate.engine;
|
|
239
243
|
const basedOn = !args["--url"] && schemaContext?.primaryDatasource ? ` based on datasource defined in ${(0, import_chunk_SKRR5WT4.underline)(schemaContext.loadedFromPathForLogMessages)}` : "";
|
|
240
244
|
const introspectionSpinner = spinnerFactory(`Introspecting${basedOn}`);
|
|
@@ -26,18 +26,18 @@ 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_5ETYUPYJ_exports = {};
|
|
30
|
+
__export(chunk_5ETYUPYJ_exports, {
|
|
31
31
|
MigrateReset: () => MigrateReset
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var import_chunk_EXY2VDLY = require("./chunk-EXY2VDLY.js");
|
|
35
|
-
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
36
|
-
var import_chunk_HFXUQT52 = require("./chunk-HFXUQT52.js");
|
|
33
|
+
module.exports = __toCommonJS(chunk_5ETYUPYJ_exports);
|
|
37
34
|
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
35
|
+
var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
|
|
36
|
+
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
38
37
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
39
38
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
40
|
-
var
|
|
39
|
+
var import_chunk_PHXLQVPT = require("./chunk-PHXLQVPT.js");
|
|
40
|
+
var import_chunk_PSCP5S54 = require("./chunk-PSCP5S54.js");
|
|
41
41
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
42
42
|
var import_internals = require("@prisma/internals");
|
|
43
43
|
var import_prompts = __toESM(require("prompts"));
|
|
@@ -122,12 +122,18 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
122
122
|
process.exit(130);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
(0,
|
|
125
|
+
(0, import_chunk_FBDQVK4W.aiAgentConfirmationCheckpoint)();
|
|
126
126
|
const schemaFilter = {
|
|
127
127
|
externalTables: config.tables?.external ?? [],
|
|
128
128
|
externalEnums: config.enums?.external ?? []
|
|
129
129
|
};
|
|
130
|
-
const migrate = await
|
|
130
|
+
const migrate = await import_chunk_PSCP5S54.Migrate.setup({
|
|
131
|
+
adapter,
|
|
132
|
+
migrationsDirPath,
|
|
133
|
+
schemaContext,
|
|
134
|
+
schemaFilter,
|
|
135
|
+
extensions: config["extensions"]
|
|
136
|
+
});
|
|
131
137
|
let migrationIds;
|
|
132
138
|
try {
|
|
133
139
|
await migrate.reset();
|
|
@@ -157,11 +163,11 @@ ${(0, import_chunk_KRQEFTDT.printFilesFromMigrationIds)("migrations", migrationI
|
|
|
157
163
|
}
|
|
158
164
|
if (!process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
|
|
159
165
|
const seedCommandFromPrismaConfig = config.migrations?.seed;
|
|
160
|
-
const seedCommandFromPkgJson = await (0,
|
|
166
|
+
const seedCommandFromPkgJson = await (0, import_chunk_PHXLQVPT.getSeedCommandFromPackageJson)(process.cwd());
|
|
161
167
|
const seedCommand = seedCommandFromPrismaConfig ?? seedCommandFromPkgJson;
|
|
162
168
|
if (seedCommand) {
|
|
163
169
|
process.stdout.write("\n");
|
|
164
|
-
const successfulSeeding = await (0,
|
|
170
|
+
const successfulSeeding = await (0, import_chunk_PHXLQVPT.executeSeedCommand)({ commandFromConfig: seedCommand });
|
|
165
171
|
if (successfulSeeding) {
|
|
166
172
|
process.stdout.write(`
|
|
167
173
|
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.
|
|
@@ -26,12 +26,12 @@ 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_CR34IQRC_exports = {};
|
|
30
|
+
__export(chunk_CR34IQRC_exports, {
|
|
31
31
|
SchemaEngineWasm: () => SchemaEngineWasm
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_CR34IQRC_exports);
|
|
34
|
+
var import_chunk_RHCOFXBR = require("./chunk-RHCOFXBR.js");
|
|
35
35
|
var import_chunk_AXR7LS2N = require("./chunk-AXR7LS2N.js");
|
|
36
36
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
37
37
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
@@ -83,7 +83,7 @@ var SchemaEngineWasm = class _SchemaEngineWasm {
|
|
|
83
83
|
const { message, stack } = (0, import_internals.getWasmError)(e);
|
|
84
84
|
throw new import_internals.RustPanic(serializePanic(message), stack, command, import_internals.ErrorArea.LIFT_CLI);
|
|
85
85
|
} else if ("code" in error) {
|
|
86
|
-
throw new
|
|
86
|
+
throw new import_chunk_RHCOFXBR.EngineError((0, import_chunk_SKRR5WT4.red)(`${error.code}
|
|
87
87
|
|
|
88
88
|
${(0, import_internals.relativizePathInPSLError)(error.message)}
|
|
89
89
|
`), error.code);
|
|
@@ -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");
|
|
@@ -215,11 +215,11 @@ ${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db seed -- --arg1 value1 --arg2 va
|
|
|
215
215
|
}
|
|
216
216
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
217
217
|
const seedCommandFromPrismaConfig = config.migrations?.seed;
|
|
218
|
-
const seedCommandFromPkgJson = await (0,
|
|
218
|
+
const seedCommandFromPkgJson = await (0, import_chunk_PHXLQVPT.getSeedCommandFromPackageJson)(process.cwd());
|
|
219
219
|
const seedCommand = seedCommandFromPrismaConfig ?? seedCommandFromPkgJson;
|
|
220
220
|
if (!seedCommand) return ``;
|
|
221
221
|
const extraArgs = args._.join(" ");
|
|
222
|
-
const successfulSeeding = await (0,
|
|
222
|
+
const successfulSeeding = await (0, import_chunk_PHXLQVPT.executeSeedCommand)({ commandFromConfig: seedCommand, extraArgs });
|
|
223
223
|
if (successfulSeeding) {
|
|
224
224
|
return `
|
|
225
225
|
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.`;
|
|
@@ -26,14 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_DDD7GPGH_exports = {};
|
|
30
|
+
__export(chunk_DDD7GPGH_exports, {
|
|
31
31
|
MigrateStatus: () => MigrateStatus
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_DDD7GPGH_exports);
|
|
34
34
|
var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
|
|
35
35
|
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_PSCP5S54 = require("./chunk-PSCP5S54.js");
|
|
37
37
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
38
38
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
39
39
|
var import_internals = require("@prisma/internals");
|
|
@@ -94,7 +94,13 @@ Check the status of your database migrations
|
|
|
94
94
|
externalTables: config.tables?.external ?? [],
|
|
95
95
|
externalEnums: config.enums?.external ?? []
|
|
96
96
|
};
|
|
97
|
-
const migrate = await
|
|
97
|
+
const migrate = await import_chunk_PSCP5S54.Migrate.setup({
|
|
98
|
+
adapter,
|
|
99
|
+
migrationsDirPath,
|
|
100
|
+
schemaContext,
|
|
101
|
+
schemaFilter,
|
|
102
|
+
extensions: config["extensions"]
|
|
103
|
+
});
|
|
98
104
|
if (!adapter) {
|
|
99
105
|
await (0, import_chunk_74LUB4XX.ensureCanConnectToDatabase)(schemaContext.primaryDatasource);
|
|
100
106
|
}
|