@prisma/cli-init 0.0.0-dev.202511260055 → 0.0.0-dev.202511260112
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/{_-6Q3ARK63.js → _-VTLAS4VM.js} +1 -1
- package/dist/{accelerate-G7F7TX4S.js → accelerate-YEFEYVGD.js} +785 -1201
- package/dist/{chunk-IASWUJDO.js → chunk-7C5I22R2.js} +348 -434
- package/dist/{chunk-C6DDX2HM.js → chunk-T5EOVTT7.js} +1 -1
- package/dist/index.js +138 -132
- package/package.json +1 -1
|
@@ -344,7 +344,7 @@ import internals5 from "@prisma/internals";
|
|
|
344
344
|
import * as Checkpoint from "checkpoint-client";
|
|
345
345
|
|
|
346
346
|
// package.json
|
|
347
|
-
var version = "0.0.0-dev.
|
|
347
|
+
var version = "0.0.0-dev.202511260112";
|
|
348
348
|
|
|
349
349
|
// src/platform/_lib/userAgent.ts
|
|
350
350
|
var debug = Debug("prisma:cli:platform:_lib:userAgent");
|
package/dist/index.js
CHANGED
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
url,
|
|
22
22
|
withResolvers,
|
|
23
23
|
y
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7C5I22R2.js";
|
|
25
25
|
import {
|
|
26
26
|
credentialsFile,
|
|
27
27
|
poll,
|
|
28
28
|
printPpgInitOutput,
|
|
29
29
|
requestOrThrow,
|
|
30
30
|
successMessage
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-T5EOVTT7.js";
|
|
32
32
|
import {
|
|
33
33
|
__commonJS,
|
|
34
34
|
__require,
|
|
@@ -54,9 +54,9 @@ var require_polyfills = __commonJS({
|
|
|
54
54
|
}
|
|
55
55
|
if (typeof process.chdir === "function") {
|
|
56
56
|
chdir = process.chdir;
|
|
57
|
-
process.chdir = function(
|
|
57
|
+
process.chdir = function(d2) {
|
|
58
58
|
cwd = null;
|
|
59
|
-
chdir.call(process,
|
|
59
|
+
chdir.call(process, d2);
|
|
60
60
|
};
|
|
61
61
|
if (Object.setPrototypeOf)
|
|
62
62
|
Object.setPrototypeOf(process.chdir, chdir);
|
|
@@ -801,10 +801,10 @@ var require_graceful_fs = __commonJS({
|
|
|
801
801
|
var retryTimer;
|
|
802
802
|
function resetQueue() {
|
|
803
803
|
var now = Date.now();
|
|
804
|
-
for (var
|
|
805
|
-
if (fs3[gracefulQueue][
|
|
806
|
-
fs3[gracefulQueue][
|
|
807
|
-
fs3[gracefulQueue][
|
|
804
|
+
for (var i = 0; i < fs3[gracefulQueue].length; ++i) {
|
|
805
|
+
if (fs3[gracefulQueue][i].length > 2) {
|
|
806
|
+
fs3[gracefulQueue][i][3] = now;
|
|
807
|
+
fs3[gracefulQueue][i][4] = now;
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
810
|
retry();
|
|
@@ -963,8 +963,8 @@ var require_retry_operation = __commonJS({
|
|
|
963
963
|
var counts = {};
|
|
964
964
|
var mainError = null;
|
|
965
965
|
var mainErrorCount = 0;
|
|
966
|
-
for (var
|
|
967
|
-
var error = this._errors[
|
|
966
|
+
for (var i = 0; i < this._errors.length; i++) {
|
|
967
|
+
var error = this._errors[i];
|
|
968
968
|
var message = error.message;
|
|
969
969
|
var count = (counts[message] || 0) + 1;
|
|
970
970
|
counts[message] = count;
|
|
@@ -1009,14 +1009,14 @@ var require_retry = __commonJS({
|
|
|
1009
1009
|
throw new Error("minTimeout is greater than maxTimeout");
|
|
1010
1010
|
}
|
|
1011
1011
|
var timeouts = [];
|
|
1012
|
-
for (var
|
|
1013
|
-
timeouts.push(this.createTimeout(
|
|
1012
|
+
for (var i = 0; i < opts.retries; i++) {
|
|
1013
|
+
timeouts.push(this.createTimeout(i, opts));
|
|
1014
1014
|
}
|
|
1015
1015
|
if (options && options.forever && !timeouts.length) {
|
|
1016
|
-
timeouts.push(this.createTimeout(
|
|
1016
|
+
timeouts.push(this.createTimeout(i, opts));
|
|
1017
1017
|
}
|
|
1018
|
-
timeouts.sort(function(
|
|
1019
|
-
return
|
|
1018
|
+
timeouts.sort(function(a2, b) {
|
|
1019
|
+
return a2 - b;
|
|
1020
1020
|
});
|
|
1021
1021
|
return timeouts;
|
|
1022
1022
|
};
|
|
@@ -1039,8 +1039,8 @@ var require_retry = __commonJS({
|
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
1041
|
}
|
|
1042
|
-
for (var
|
|
1043
|
-
var method = methods[
|
|
1042
|
+
for (var i = 0; i < methods.length; i++) {
|
|
1043
|
+
var method = methods[i];
|
|
1044
1044
|
var original = obj[method];
|
|
1045
1045
|
obj[method] = function retryWrapper(original2) {
|
|
1046
1046
|
var op = exports.operation(options);
|
|
@@ -1539,7 +1539,7 @@ var require_lockfile = __commonJS({
|
|
|
1539
1539
|
const options = locks[file].options;
|
|
1540
1540
|
try {
|
|
1541
1541
|
options.fs.rmdirSync(getLockFile(file, options));
|
|
1542
|
-
} catch (
|
|
1542
|
+
} catch (e) {
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
1545
|
});
|
|
@@ -1660,7 +1660,7 @@ function normalizeWindowsPath(input2 = "") {
|
|
|
1660
1660
|
if (!input2) {
|
|
1661
1661
|
return input2;
|
|
1662
1662
|
}
|
|
1663
|
-
return input2.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (
|
|
1663
|
+
return input2.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
1664
1664
|
}
|
|
1665
1665
|
var _UNC_REGEX = /^[/\\]{2}/;
|
|
1666
1666
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
@@ -1795,9 +1795,9 @@ function filename(path3) {
|
|
|
1795
1795
|
return base.slice(0, separatorIndex);
|
|
1796
1796
|
}
|
|
1797
1797
|
|
|
1798
|
-
// ../../node_modules/.pnpm/get-port-please@3.2
|
|
1799
|
-
import { createServer
|
|
1800
|
-
import { networkInterfaces
|
|
1798
|
+
// ../../node_modules/.pnpm/get-port-please@3.1.2/node_modules/get-port-please/dist/index.mjs
|
|
1799
|
+
import { createServer } from "net";
|
|
1800
|
+
import { networkInterfaces } from "os";
|
|
1801
1801
|
var unsafePorts = /* @__PURE__ */ new Set([
|
|
1802
1802
|
1,
|
|
1803
1803
|
// tcpmux
|
|
@@ -1966,12 +1966,18 @@ function isUnsafePort(port) {
|
|
|
1966
1966
|
function isSafePort(port) {
|
|
1967
1967
|
return !isUnsafePort(port);
|
|
1968
1968
|
}
|
|
1969
|
+
var __defProp = Object.defineProperty;
|
|
1970
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1971
|
+
var __publicField = (obj, key, value) => {
|
|
1972
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1973
|
+
return value;
|
|
1974
|
+
};
|
|
1969
1975
|
var GetPortError = class extends Error {
|
|
1970
1976
|
constructor(message, opts) {
|
|
1971
1977
|
super(message, opts);
|
|
1972
1978
|
this.message = message;
|
|
1979
|
+
__publicField(this, "name", "GetPortError");
|
|
1973
1980
|
}
|
|
1974
|
-
name = "GetPortError";
|
|
1975
1981
|
};
|
|
1976
1982
|
function _log(verbose, message) {
|
|
1977
1983
|
if (verbose) {
|
|
@@ -1982,11 +1988,11 @@ function _generateRange(from, to) {
|
|
|
1982
1988
|
if (to < from) {
|
|
1983
1989
|
return [];
|
|
1984
1990
|
}
|
|
1985
|
-
const
|
|
1991
|
+
const r = [];
|
|
1986
1992
|
for (let index = from; index <= to; index++) {
|
|
1987
|
-
|
|
1993
|
+
r.push(index);
|
|
1988
1994
|
}
|
|
1989
|
-
return
|
|
1995
|
+
return r;
|
|
1990
1996
|
}
|
|
1991
1997
|
function _tryPort(port, host) {
|
|
1992
1998
|
return new Promise((resolve2) => {
|
|
@@ -2007,8 +2013,7 @@ function _getLocalHosts(additional) {
|
|
|
2007
2013
|
const hosts = new Set(additional);
|
|
2008
2014
|
for (const _interface of Object.values(networkInterfaces())) {
|
|
2009
2015
|
for (const config of _interface || []) {
|
|
2010
|
-
if (config.address && !config.internal && !config.address.startsWith("fe80::")
|
|
2011
|
-
!config.address.startsWith("169.254")) {
|
|
2016
|
+
if (config.address && !config.internal && !config.address.startsWith("fe80::")) {
|
|
2012
2017
|
hosts.add(config.address);
|
|
2013
2018
|
}
|
|
2014
2019
|
}
|
|
@@ -2017,9 +2022,9 @@ function _getLocalHosts(additional) {
|
|
|
2017
2022
|
}
|
|
2018
2023
|
async function _findPort(ports, host) {
|
|
2019
2024
|
for (const port of ports) {
|
|
2020
|
-
const
|
|
2021
|
-
if (
|
|
2022
|
-
return
|
|
2025
|
+
const r = await _tryPort(port, host);
|
|
2026
|
+
if (r) {
|
|
2027
|
+
return r;
|
|
2023
2028
|
}
|
|
2024
2029
|
}
|
|
2025
2030
|
}
|
|
@@ -2049,6 +2054,7 @@ async function getPort(_userOptions = {}) {
|
|
|
2049
2054
|
_userOptions.port || _userOptions.ports?.length || _userOptions.portRange?.length
|
|
2050
2055
|
);
|
|
2051
2056
|
const options = {
|
|
2057
|
+
name: "default",
|
|
2052
2058
|
random: _port === 0,
|
|
2053
2059
|
ports: [],
|
|
2054
2060
|
portRange: [],
|
|
@@ -2152,118 +2158,118 @@ async function checkPort(port, host = process.env.HOST, verbose) {
|
|
|
2152
2158
|
return port;
|
|
2153
2159
|
}
|
|
2154
2160
|
|
|
2155
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
return n3 === void 0 ? r4 : Object.assign(r4, { lazy: n3, lazyArgs: t6 });
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
// ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
2162
|
-
function t(t6, n3, r4) {
|
|
2163
|
-
let i3 = t6.length - n3.length;
|
|
2164
|
-
if (i3 === 0)
|
|
2165
|
-
return t6(...n3);
|
|
2166
|
-
if (i3 === 1)
|
|
2167
|
-
return e(t6, n3, r4);
|
|
2168
|
-
throw Error(`Wrong number of arguments`);
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
// ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/utilityEvaluators-DORpnx39.js
|
|
2172
|
-
var t2 = { done: false, hasNext: false };
|
|
2173
|
-
var r = (e2) => ({ hasNext: true, next: e2, done: false });
|
|
2161
|
+
// ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-ANXBDSUI.js
|
|
2162
|
+
var s = { done: false, hasNext: false };
|
|
2163
|
+
var o = (t) => ({ hasNext: true, next: t, done: false });
|
|
2174
2164
|
|
|
2175
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2176
|
-
function
|
|
2177
|
-
let
|
|
2178
|
-
for (;
|
|
2179
|
-
if (
|
|
2180
|
-
let
|
|
2181
|
-
|
|
2165
|
+
// ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-3GOCSNFN.js
|
|
2166
|
+
function C(t, ...o3) {
|
|
2167
|
+
let n = t, u3 = o3.map((e) => "lazy" in e ? y2(e) : void 0), p = 0;
|
|
2168
|
+
for (; p < o3.length; ) {
|
|
2169
|
+
if (u3[p] === void 0 || !B(n)) {
|
|
2170
|
+
let i = o3[p];
|
|
2171
|
+
n = i(n), p += 1;
|
|
2182
2172
|
continue;
|
|
2183
2173
|
}
|
|
2184
|
-
let
|
|
2185
|
-
for (let
|
|
2186
|
-
let
|
|
2187
|
-
if (
|
|
2174
|
+
let r = [];
|
|
2175
|
+
for (let i = p; i < o3.length; i++) {
|
|
2176
|
+
let l = u3[i];
|
|
2177
|
+
if (l === void 0 || (r.push(l), l.isSingle))
|
|
2188
2178
|
break;
|
|
2189
2179
|
}
|
|
2190
|
-
let
|
|
2191
|
-
for (let
|
|
2192
|
-
if (
|
|
2180
|
+
let a2 = [];
|
|
2181
|
+
for (let i of n)
|
|
2182
|
+
if (f(i, a2, r))
|
|
2193
2183
|
break;
|
|
2194
|
-
let { isSingle:
|
|
2195
|
-
|
|
2184
|
+
let { isSingle: s2 } = r.at(-1);
|
|
2185
|
+
n = s2 ? a2[0] : a2, p += r.length;
|
|
2196
2186
|
}
|
|
2197
|
-
return
|
|
2187
|
+
return n;
|
|
2198
2188
|
}
|
|
2199
|
-
function
|
|
2200
|
-
if (
|
|
2201
|
-
return
|
|
2202
|
-
let
|
|
2203
|
-
for (let [
|
|
2204
|
-
let { index:
|
|
2205
|
-
if (
|
|
2206
|
-
if (
|
|
2207
|
-
for (let
|
|
2208
|
-
if (
|
|
2189
|
+
function f(t, o3, n) {
|
|
2190
|
+
if (n.length === 0)
|
|
2191
|
+
return o3.push(t), false;
|
|
2192
|
+
let u3 = t, p = s, e = false;
|
|
2193
|
+
for (let [r, a2] of n.entries()) {
|
|
2194
|
+
let { index: s2, items: i } = a2;
|
|
2195
|
+
if (i.push(u3), p = a2(u3, s2, i), a2.index += 1, p.hasNext) {
|
|
2196
|
+
if (p.hasMany ?? false) {
|
|
2197
|
+
for (let l of p.next)
|
|
2198
|
+
if (f(l, o3, n.slice(r + 1)))
|
|
2209
2199
|
return true;
|
|
2210
|
-
return
|
|
2200
|
+
return e;
|
|
2211
2201
|
}
|
|
2212
|
-
|
|
2202
|
+
u3 = p.next;
|
|
2213
2203
|
}
|
|
2214
|
-
if (!
|
|
2204
|
+
if (!p.hasNext)
|
|
2215
2205
|
break;
|
|
2216
|
-
|
|
2206
|
+
p.done && (e = true);
|
|
2217
2207
|
}
|
|
2218
|
-
return
|
|
2208
|
+
return p.hasNext && o3.push(u3), e;
|
|
2219
2209
|
}
|
|
2220
|
-
function
|
|
2221
|
-
let { lazy:
|
|
2222
|
-
return Object.assign(
|
|
2210
|
+
function y2(t) {
|
|
2211
|
+
let { lazy: o3, lazyArgs: n } = t, u3 = o3(...n);
|
|
2212
|
+
return Object.assign(u3, { isSingle: o3.single ?? false, index: 0, items: [] });
|
|
2223
2213
|
}
|
|
2224
|
-
function
|
|
2225
|
-
return typeof
|
|
2214
|
+
function B(t) {
|
|
2215
|
+
return typeof t == "string" || typeof t == "object" && t !== null && Symbol.iterator in t;
|
|
2226
2216
|
}
|
|
2227
2217
|
|
|
2228
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2229
|
-
function
|
|
2230
|
-
let
|
|
2231
|
-
if (
|
|
2232
|
-
let [
|
|
2233
|
-
return
|
|
2234
|
-
}
|
|
2235
|
-
if (
|
|
2236
|
-
let
|
|
2237
|
-
return Object.assign((
|
|
2238
|
-
}
|
|
2239
|
-
throw Error(
|
|
2218
|
+
// ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-LFJW7BOT.js
|
|
2219
|
+
function y3(t, i) {
|
|
2220
|
+
let a2 = i.length - t.length;
|
|
2221
|
+
if (a2 === 1) {
|
|
2222
|
+
let [n, ...r] = i;
|
|
2223
|
+
return C(n, { lazy: t, lazyArgs: r });
|
|
2224
|
+
}
|
|
2225
|
+
if (a2 === 0) {
|
|
2226
|
+
let n = { lazy: t, lazyArgs: i };
|
|
2227
|
+
return Object.assign((e) => C(e, n), n);
|
|
2228
|
+
}
|
|
2229
|
+
throw new Error("Wrong number of arguments");
|
|
2240
2230
|
}
|
|
2241
2231
|
|
|
2242
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2243
|
-
function
|
|
2244
|
-
|
|
2232
|
+
// ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-D6FCK2GA.js
|
|
2233
|
+
function u(o3, n, a2) {
|
|
2234
|
+
let t = (r) => o3(r, ...n);
|
|
2235
|
+
return a2 === void 0 ? t : Object.assign(t, { lazy: a2, lazyArgs: n });
|
|
2245
2236
|
}
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
let
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
};
|
|
2237
|
+
|
|
2238
|
+
// ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-WIMGWYZL.js
|
|
2239
|
+
function u2(r, n, o3) {
|
|
2240
|
+
let a2 = r.length - n.length;
|
|
2241
|
+
if (a2 === 0)
|
|
2242
|
+
return r(...n);
|
|
2243
|
+
if (a2 === 1)
|
|
2244
|
+
return u(r, n, o3);
|
|
2245
|
+
throw new Error("Wrong number of arguments");
|
|
2256
2246
|
}
|
|
2257
2247
|
|
|
2258
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2259
|
-
function
|
|
2260
|
-
return
|
|
2248
|
+
// ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-ENS7GPLZ.js
|
|
2249
|
+
function a(...r) {
|
|
2250
|
+
return u2(o2, r);
|
|
2251
|
+
}
|
|
2252
|
+
function o2(r, t) {
|
|
2253
|
+
let e = [];
|
|
2254
|
+
for (let n = r; n < t; n++)
|
|
2255
|
+
e.push(n);
|
|
2256
|
+
return e;
|
|
2261
2257
|
}
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2258
|
+
|
|
2259
|
+
// ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-GKXRNLHM.js
|
|
2260
|
+
function d(...e) {
|
|
2261
|
+
return y3(f2, e);
|
|
2262
|
+
}
|
|
2263
|
+
function f2(e) {
|
|
2264
|
+
if (e.length === 0)
|
|
2265
|
+
return o;
|
|
2266
|
+
let n = /* @__PURE__ */ new Map();
|
|
2267
|
+
for (let r of e)
|
|
2268
|
+
n.set(r, (n.get(r) ?? 0) + 1);
|
|
2269
|
+
return (r) => {
|
|
2270
|
+
let t = n.get(r);
|
|
2271
|
+
return t === void 0 || t === 0 ? { done: false, hasNext: true, next: r } : (n.set(r, t - 1), s);
|
|
2272
|
+
};
|
|
2267
2273
|
}
|
|
2268
2274
|
|
|
2269
2275
|
// ../../dev/server/src/port.ts
|
|
@@ -2344,7 +2350,7 @@ async function tryAnyPort(options) {
|
|
|
2344
2350
|
...Object.values(portsUsedByThisServerLastTime || {})
|
|
2345
2351
|
];
|
|
2346
2352
|
const maximumSpecificPort = Math.min(Math.max(minimumPort, ...excludedPorts) + 100, MAX_PORT);
|
|
2347
|
-
const ports =
|
|
2353
|
+
const ports = d(a(minimumPort, maximumSpecificPort), excludedPorts);
|
|
2348
2354
|
const defaultPort2 = {
|
|
2349
2355
|
port: DEFAULT_SERVER_PORT,
|
|
2350
2356
|
databasePort: DEFAULT_DATABASE_PORT,
|
|
@@ -2639,7 +2645,7 @@ async function getApp(port, dbServer, serverState) {
|
|
|
2639
2645
|
const { debug } = serverState;
|
|
2640
2646
|
const [{ Hono }, { accelerateRoute }, { utilityRoute }] = await Promise.all([
|
|
2641
2647
|
import("hono/tiny"),
|
|
2642
|
-
import("./accelerate-
|
|
2648
|
+
import("./accelerate-YEFEYVGD.js"),
|
|
2643
2649
|
import("./utility-W6LOZZIT.js")
|
|
2644
2650
|
]);
|
|
2645
2651
|
const app = new Hono();
|
|
@@ -3135,7 +3141,7 @@ var getRegionsOrThrow = async (input2) => {
|
|
|
3135
3141
|
};
|
|
3136
3142
|
var getPrismaPostgresRegionsOrThrow = async (input2) => {
|
|
3137
3143
|
const regions = await getRegionsOrThrow(input2);
|
|
3138
|
-
const ppgRegions = regions.filter((_) => _.ppgStatus !== "unsupported").sort((
|
|
3144
|
+
const ppgRegions = regions.filter((_) => _.ppgStatus !== "unsupported").sort((a2, b) => b.displayName.localeCompare(a2.displayName));
|
|
3139
3145
|
return ppgRegions;
|
|
3140
3146
|
};
|
|
3141
3147
|
|
|
@@ -3431,7 +3437,7 @@ var Init = class _Init {
|
|
|
3431
3437
|
let generatedSchema;
|
|
3432
3438
|
let generatedName;
|
|
3433
3439
|
if (isPpgCommand) {
|
|
3434
|
-
const PlatformCommands = await import("./_-
|
|
3440
|
+
const PlatformCommands = await import("./_-VTLAS4VM.js");
|
|
3435
3441
|
const credentials = await credentialsFile.load();
|
|
3436
3442
|
if (internals.isError(credentials))
|
|
3437
3443
|
throw credentials;
|
|
@@ -3468,9 +3474,9 @@ var Init = class _Init {
|
|
|
3468
3474
|
})
|
|
3469
3475
|
})).json()
|
|
3470
3476
|
));
|
|
3471
|
-
} catch (
|
|
3477
|
+
} catch (e) {
|
|
3472
3478
|
spinner2.fail();
|
|
3473
|
-
throw
|
|
3479
|
+
throw e;
|
|
3474
3480
|
}
|
|
3475
3481
|
spinner2.succeed("Schema is ready");
|
|
3476
3482
|
}
|
|
@@ -3615,15 +3621,15 @@ var Init = class _Init {
|
|
|
3615
3621
|
const gitignorePath = path2.join(outputDir, ".gitignore");
|
|
3616
3622
|
try {
|
|
3617
3623
|
fs2.writeFileSync(gitignorePath, defaultGitIgnore(), { flag: "wx" });
|
|
3618
|
-
} catch (
|
|
3619
|
-
if (
|
|
3624
|
+
} catch (e) {
|
|
3625
|
+
if (e.code === "EEXIST") {
|
|
3620
3626
|
warnings.push(
|
|
3621
3627
|
`${yellow(
|
|
3622
3628
|
"warn"
|
|
3623
3629
|
)} You already have a .gitignore file. Don't forget to add \`.env\` in it to not commit any private information.`
|
|
3624
3630
|
);
|
|
3625
3631
|
} else {
|
|
3626
|
-
console.error("Failed to write .gitignore file, reason: ",
|
|
3632
|
+
console.error("Failed to write .gitignore file, reason: ", e);
|
|
3627
3633
|
}
|
|
3628
3634
|
}
|
|
3629
3635
|
const clientPathRelativeToOutputDir = path2.relative(outputDir, path2.resolve(prismaFolder, clientOutput));
|
|
@@ -3631,8 +3637,8 @@ var Init = class _Init {
|
|
|
3631
3637
|
fs2.appendFileSync(gitignorePath, `
|
|
3632
3638
|
/${clientPathRelativeToOutputDir.replaceAll(path2.sep, "/")}
|
|
3633
3639
|
`);
|
|
3634
|
-
} catch (
|
|
3635
|
-
console.error("Failed to append client path to .gitignore file, reason: ",
|
|
3640
|
+
} catch (e) {
|
|
3641
|
+
console.error("Failed to append client path to .gitignore file, reason: ", e);
|
|
3636
3642
|
}
|
|
3637
3643
|
const steps = [];
|
|
3638
3644
|
if (!isBun) {
|
|
@@ -3685,7 +3691,7 @@ ${warnings.length > 0 && internals.logger.should.warn() ? `
|
|
|
3685
3691
|
${warnings.join("\n")}
|
|
3686
3692
|
` : ""}
|
|
3687
3693
|
Next steps:
|
|
3688
|
-
${steps.map((
|
|
3694
|
+
${steps.map((s2, i) => `${i + 1}. ${s2}`).join("\n")}
|
|
3689
3695
|
|
|
3690
3696
|
More information in our documentation:
|
|
3691
3697
|
${internals.link("https://pris.ly/d/getting-started")}
|