@prisma/migrate 7.8.0-dev.9 → 7.9.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/chunk-EYEKG56L.js +299 -0
- package/dist/utils/setupMSSQL.js +5439 -13973
- package/dist/utils/setupMongo.js +692 -164
- package/package.json +10 -10
- package/dist/chunk-SFU5FRZP.js +0 -828
package/dist/bin.js
CHANGED
|
@@ -67,7 +67,7 @@ var import_config = require("@prisma/config");
|
|
|
67
67
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
68
68
|
var import_engines_version = require("@prisma/engines-version");
|
|
69
69
|
var import_internals = require("@prisma/internals");
|
|
70
|
-
var version = "7.
|
|
70
|
+
var version = "7.9.0-dev.1";
|
|
71
71
|
process.on("uncaughtException", (e) => {
|
|
72
72
|
console.log(e);
|
|
73
73
|
});
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_EYEKG56L_exports = {};
|
|
30
|
+
__export(chunk_EYEKG56L_exports, {
|
|
31
|
+
init_supports_color: () => init_supports_color,
|
|
32
|
+
require_ms: () => require_ms,
|
|
33
|
+
supports_color_exports: () => supports_color_exports
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(chunk_EYEKG56L_exports);
|
|
36
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
37
|
+
var import_node_process = __toESM(require("node:process"));
|
|
38
|
+
var import_node_os = __toESM(require("node:os"));
|
|
39
|
+
var import_node_tty = __toESM(require("node:tty"));
|
|
40
|
+
var require_ms = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
41
|
+
"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module2) {
|
|
42
|
+
"use strict";
|
|
43
|
+
var s = 1e3;
|
|
44
|
+
var m = s * 60;
|
|
45
|
+
var h = m * 60;
|
|
46
|
+
var d = h * 24;
|
|
47
|
+
var w = d * 7;
|
|
48
|
+
var y = d * 365.25;
|
|
49
|
+
module2.exports = function(val, options) {
|
|
50
|
+
options = options || {};
|
|
51
|
+
var type = typeof val;
|
|
52
|
+
if (type === "string" && val.length > 0) {
|
|
53
|
+
return parse(val);
|
|
54
|
+
} else if (type === "number" && isFinite(val)) {
|
|
55
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
56
|
+
}
|
|
57
|
+
throw new Error(
|
|
58
|
+
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
function parse(str) {
|
|
62
|
+
str = String(str);
|
|
63
|
+
if (str.length > 100) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
67
|
+
str
|
|
68
|
+
);
|
|
69
|
+
if (!match) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
var n = parseFloat(match[1]);
|
|
73
|
+
var type = (match[2] || "ms").toLowerCase();
|
|
74
|
+
switch (type) {
|
|
75
|
+
case "years":
|
|
76
|
+
case "year":
|
|
77
|
+
case "yrs":
|
|
78
|
+
case "yr":
|
|
79
|
+
case "y":
|
|
80
|
+
return n * y;
|
|
81
|
+
case "weeks":
|
|
82
|
+
case "week":
|
|
83
|
+
case "w":
|
|
84
|
+
return n * w;
|
|
85
|
+
case "days":
|
|
86
|
+
case "day":
|
|
87
|
+
case "d":
|
|
88
|
+
return n * d;
|
|
89
|
+
case "hours":
|
|
90
|
+
case "hour":
|
|
91
|
+
case "hrs":
|
|
92
|
+
case "hr":
|
|
93
|
+
case "h":
|
|
94
|
+
return n * h;
|
|
95
|
+
case "minutes":
|
|
96
|
+
case "minute":
|
|
97
|
+
case "mins":
|
|
98
|
+
case "min":
|
|
99
|
+
case "m":
|
|
100
|
+
return n * m;
|
|
101
|
+
case "seconds":
|
|
102
|
+
case "second":
|
|
103
|
+
case "secs":
|
|
104
|
+
case "sec":
|
|
105
|
+
case "s":
|
|
106
|
+
return n * s;
|
|
107
|
+
case "milliseconds":
|
|
108
|
+
case "millisecond":
|
|
109
|
+
case "msecs":
|
|
110
|
+
case "msec":
|
|
111
|
+
case "ms":
|
|
112
|
+
return n;
|
|
113
|
+
default:
|
|
114
|
+
return void 0;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function fmtShort(ms) {
|
|
118
|
+
var msAbs = Math.abs(ms);
|
|
119
|
+
if (msAbs >= d) {
|
|
120
|
+
return Math.round(ms / d) + "d";
|
|
121
|
+
}
|
|
122
|
+
if (msAbs >= h) {
|
|
123
|
+
return Math.round(ms / h) + "h";
|
|
124
|
+
}
|
|
125
|
+
if (msAbs >= m) {
|
|
126
|
+
return Math.round(ms / m) + "m";
|
|
127
|
+
}
|
|
128
|
+
if (msAbs >= s) {
|
|
129
|
+
return Math.round(ms / s) + "s";
|
|
130
|
+
}
|
|
131
|
+
return ms + "ms";
|
|
132
|
+
}
|
|
133
|
+
function fmtLong(ms) {
|
|
134
|
+
var msAbs = Math.abs(ms);
|
|
135
|
+
if (msAbs >= d) {
|
|
136
|
+
return plural(ms, msAbs, d, "day");
|
|
137
|
+
}
|
|
138
|
+
if (msAbs >= h) {
|
|
139
|
+
return plural(ms, msAbs, h, "hour");
|
|
140
|
+
}
|
|
141
|
+
if (msAbs >= m) {
|
|
142
|
+
return plural(ms, msAbs, m, "minute");
|
|
143
|
+
}
|
|
144
|
+
if (msAbs >= s) {
|
|
145
|
+
return plural(ms, msAbs, s, "second");
|
|
146
|
+
}
|
|
147
|
+
return ms + " ms";
|
|
148
|
+
}
|
|
149
|
+
function plural(ms, msAbs, n, name) {
|
|
150
|
+
var isPlural = msAbs >= n * 1.5;
|
|
151
|
+
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
var supports_color_exports = {};
|
|
156
|
+
(0, import_chunk_2ESYSVXG.__export)(supports_color_exports, {
|
|
157
|
+
createSupportsColor: () => createSupportsColor,
|
|
158
|
+
default: () => supports_color_default
|
|
159
|
+
});
|
|
160
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
|
161
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
162
|
+
const position = argv.indexOf(prefix + flag);
|
|
163
|
+
const terminatorPosition = argv.indexOf("--");
|
|
164
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
165
|
+
}
|
|
166
|
+
function envForceColor() {
|
|
167
|
+
if (!("FORCE_COLOR" in env)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (env.FORCE_COLOR === "true") {
|
|
171
|
+
return 1;
|
|
172
|
+
}
|
|
173
|
+
if (env.FORCE_COLOR === "false") {
|
|
174
|
+
return 0;
|
|
175
|
+
}
|
|
176
|
+
if (env.FORCE_COLOR.length === 0) {
|
|
177
|
+
return 1;
|
|
178
|
+
}
|
|
179
|
+
const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
180
|
+
if (![0, 1, 2, 3].includes(level)) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
return level;
|
|
184
|
+
}
|
|
185
|
+
function translateLevel(level) {
|
|
186
|
+
if (level === 0) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
level,
|
|
191
|
+
hasBasic: true,
|
|
192
|
+
has256: level >= 2,
|
|
193
|
+
has16m: level >= 3
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
197
|
+
const noFlagForceColor = envForceColor();
|
|
198
|
+
if (noFlagForceColor !== void 0) {
|
|
199
|
+
flagForceColor = noFlagForceColor;
|
|
200
|
+
}
|
|
201
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
202
|
+
if (forceColor === 0) {
|
|
203
|
+
return 0;
|
|
204
|
+
}
|
|
205
|
+
if (sniffFlags) {
|
|
206
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
207
|
+
return 3;
|
|
208
|
+
}
|
|
209
|
+
if (hasFlag("color=256")) {
|
|
210
|
+
return 2;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
214
|
+
return 1;
|
|
215
|
+
}
|
|
216
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
217
|
+
return 0;
|
|
218
|
+
}
|
|
219
|
+
const min = forceColor || 0;
|
|
220
|
+
if (env.TERM === "dumb") {
|
|
221
|
+
return min;
|
|
222
|
+
}
|
|
223
|
+
if (import_node_process.default.platform === "win32") {
|
|
224
|
+
const osRelease = import_node_os.default.release().split(".");
|
|
225
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
226
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
227
|
+
}
|
|
228
|
+
return 1;
|
|
229
|
+
}
|
|
230
|
+
if ("CI" in env) {
|
|
231
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
|
|
232
|
+
return 3;
|
|
233
|
+
}
|
|
234
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
235
|
+
return 1;
|
|
236
|
+
}
|
|
237
|
+
return min;
|
|
238
|
+
}
|
|
239
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
240
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
241
|
+
}
|
|
242
|
+
if (env.COLORTERM === "truecolor") {
|
|
243
|
+
return 3;
|
|
244
|
+
}
|
|
245
|
+
if (env.TERM === "xterm-kitty") {
|
|
246
|
+
return 3;
|
|
247
|
+
}
|
|
248
|
+
if (env.TERM === "xterm-ghostty") {
|
|
249
|
+
return 3;
|
|
250
|
+
}
|
|
251
|
+
if (env.TERM === "wezterm") {
|
|
252
|
+
return 3;
|
|
253
|
+
}
|
|
254
|
+
if ("TERM_PROGRAM" in env) {
|
|
255
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
256
|
+
switch (env.TERM_PROGRAM) {
|
|
257
|
+
case "iTerm.app": {
|
|
258
|
+
return version >= 3 ? 3 : 2;
|
|
259
|
+
}
|
|
260
|
+
case "Apple_Terminal": {
|
|
261
|
+
return 2;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
266
|
+
return 2;
|
|
267
|
+
}
|
|
268
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
269
|
+
return 1;
|
|
270
|
+
}
|
|
271
|
+
if ("COLORTERM" in env) {
|
|
272
|
+
return 1;
|
|
273
|
+
}
|
|
274
|
+
return min;
|
|
275
|
+
}
|
|
276
|
+
function createSupportsColor(stream, options = {}) {
|
|
277
|
+
const level = _supportsColor(stream, {
|
|
278
|
+
streamIsTTY: stream && stream.isTTY,
|
|
279
|
+
...options
|
|
280
|
+
});
|
|
281
|
+
return translateLevel(level);
|
|
282
|
+
}
|
|
283
|
+
var env, flagForceColor, supportsColor, supports_color_default;
|
|
284
|
+
var init_supports_color = (0, import_chunk_2ESYSVXG.__esm)({
|
|
285
|
+
"../../node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js"() {
|
|
286
|
+
"use strict";
|
|
287
|
+
({ env } = import_node_process.default);
|
|
288
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
289
|
+
flagForceColor = 0;
|
|
290
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
291
|
+
flagForceColor = 1;
|
|
292
|
+
}
|
|
293
|
+
supportsColor = {
|
|
294
|
+
stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
|
|
295
|
+
stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
|
|
296
|
+
};
|
|
297
|
+
supports_color_default = supportsColor;
|
|
298
|
+
}
|
|
299
|
+
});
|