@prisma/cli-init 0.7.0 → 0.8.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/index.js CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  url,
22
22
  withResolvers,
23
23
  y
24
- } from "./chunk-YTWW6A72.js";
24
+ } from "./chunk-7WBH7PZA.js";
25
25
  import {
26
26
  __commonJS,
27
27
  __require,
@@ -47,9 +47,9 @@ var require_polyfills = __commonJS({
47
47
  }
48
48
  if (typeof process.chdir === "function") {
49
49
  chdir = process.chdir;
50
- process.chdir = function(d2) {
50
+ process.chdir = function(d) {
51
51
  cwd = null;
52
- chdir.call(process, d2);
52
+ chdir.call(process, d);
53
53
  };
54
54
  if (Object.setPrototypeOf)
55
55
  Object.setPrototypeOf(process.chdir, chdir);
@@ -794,10 +794,10 @@ var require_graceful_fs = __commonJS({
794
794
  var retryTimer;
795
795
  function resetQueue() {
796
796
  var now = Date.now();
797
- for (var i = 0; i < fs5[gracefulQueue].length; ++i) {
798
- if (fs5[gracefulQueue][i].length > 2) {
799
- fs5[gracefulQueue][i][3] = now;
800
- fs5[gracefulQueue][i][4] = now;
797
+ for (var i3 = 0; i3 < fs5[gracefulQueue].length; ++i3) {
798
+ if (fs5[gracefulQueue][i3].length > 2) {
799
+ fs5[gracefulQueue][i3][3] = now;
800
+ fs5[gracefulQueue][i3][4] = now;
801
801
  }
802
802
  }
803
803
  retry();
@@ -956,8 +956,8 @@ var require_retry_operation = __commonJS({
956
956
  var counts = {};
957
957
  var mainError = null;
958
958
  var mainErrorCount = 0;
959
- for (var i = 0; i < this._errors.length; i++) {
960
- var error = this._errors[i];
959
+ for (var i3 = 0; i3 < this._errors.length; i3++) {
960
+ var error = this._errors[i3];
961
961
  var message = error.message;
962
962
  var count = (counts[message] || 0) + 1;
963
963
  counts[message] = count;
@@ -1002,14 +1002,14 @@ var require_retry = __commonJS({
1002
1002
  throw new Error("minTimeout is greater than maxTimeout");
1003
1003
  }
1004
1004
  var timeouts = [];
1005
- for (var i = 0; i < opts.retries; i++) {
1006
- timeouts.push(this.createTimeout(i, opts));
1005
+ for (var i3 = 0; i3 < opts.retries; i3++) {
1006
+ timeouts.push(this.createTimeout(i3, opts));
1007
1007
  }
1008
1008
  if (options && options.forever && !timeouts.length) {
1009
- timeouts.push(this.createTimeout(i, opts));
1009
+ timeouts.push(this.createTimeout(i3, opts));
1010
1010
  }
1011
- timeouts.sort(function(a2, b) {
1012
- return a2 - b;
1011
+ timeouts.sort(function(a, b) {
1012
+ return a - b;
1013
1013
  });
1014
1014
  return timeouts;
1015
1015
  };
@@ -1032,8 +1032,8 @@ var require_retry = __commonJS({
1032
1032
  }
1033
1033
  }
1034
1034
  }
1035
- for (var i = 0; i < methods.length; i++) {
1036
- var method = methods[i];
1035
+ for (var i3 = 0; i3 < methods.length; i3++) {
1036
+ var method = methods[i3];
1037
1037
  var original = obj[method];
1038
1038
  obj[method] = function retryWrapper(original2) {
1039
1039
  var op = exports.operation(options);
@@ -1532,7 +1532,7 @@ var require_lockfile = __commonJS({
1532
1532
  const options = locks[file].options;
1533
1533
  try {
1534
1534
  options.fs.rmdirSync(getLockFile(file, options));
1535
- } catch (e) {
1535
+ } catch (e2) {
1536
1536
  }
1537
1537
  }
1538
1538
  });
@@ -1653,7 +1653,7 @@ function normalizeWindowsPath(input2 = "") {
1653
1653
  if (!input2) {
1654
1654
  return input2;
1655
1655
  }
1656
- return input2.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
1656
+ return input2.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r4) => r4.toUpperCase());
1657
1657
  }
1658
1658
  var _UNC_REGEX = /^[/\\]{2}/;
1659
1659
  var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
@@ -1788,9 +1788,9 @@ function filename(path6) {
1788
1788
  return base.slice(0, separatorIndex);
1789
1789
  }
1790
1790
 
1791
- // ../../node_modules/.pnpm/get-port-please@3.1.2/node_modules/get-port-please/dist/index.mjs
1792
- import { createServer } from "net";
1793
- import { networkInterfaces } from "os";
1791
+ // ../../node_modules/.pnpm/get-port-please@3.2.0/node_modules/get-port-please/dist/index.mjs
1792
+ import { createServer, Server } from "net";
1793
+ import { networkInterfaces, tmpdir } from "os";
1794
1794
  var unsafePorts = /* @__PURE__ */ new Set([
1795
1795
  1,
1796
1796
  // tcpmux
@@ -1959,18 +1959,12 @@ function isUnsafePort(port) {
1959
1959
  function isSafePort(port) {
1960
1960
  return !isUnsafePort(port);
1961
1961
  }
1962
- var __defProp = Object.defineProperty;
1963
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1964
- var __publicField = (obj, key, value) => {
1965
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1966
- return value;
1967
- };
1968
1962
  var GetPortError = class extends Error {
1969
1963
  constructor(message, opts) {
1970
1964
  super(message, opts);
1971
1965
  this.message = message;
1972
- __publicField(this, "name", "GetPortError");
1973
1966
  }
1967
+ name = "GetPortError";
1974
1968
  };
1975
1969
  function _log(verbose, message) {
1976
1970
  if (verbose) {
@@ -1981,11 +1975,11 @@ function _generateRange(from, to) {
1981
1975
  if (to < from) {
1982
1976
  return [];
1983
1977
  }
1984
- const r = [];
1978
+ const r4 = [];
1985
1979
  for (let index = from; index <= to; index++) {
1986
- r.push(index);
1980
+ r4.push(index);
1987
1981
  }
1988
- return r;
1982
+ return r4;
1989
1983
  }
1990
1984
  function _tryPort(port, host) {
1991
1985
  return new Promise((resolve2) => {
@@ -2006,7 +2000,8 @@ function _getLocalHosts(additional) {
2006
2000
  const hosts = new Set(additional);
2007
2001
  for (const _interface of Object.values(networkInterfaces())) {
2008
2002
  for (const config of _interface || []) {
2009
- if (config.address && !config.internal && !config.address.startsWith("fe80::")) {
2003
+ if (config.address && !config.internal && !config.address.startsWith("fe80::") && // Link-Local
2004
+ !config.address.startsWith("169.254")) {
2010
2005
  hosts.add(config.address);
2011
2006
  }
2012
2007
  }
@@ -2015,9 +2010,9 @@ function _getLocalHosts(additional) {
2015
2010
  }
2016
2011
  async function _findPort(ports, host) {
2017
2012
  for (const port of ports) {
2018
- const r = await _tryPort(port, host);
2019
- if (r) {
2020
- return r;
2013
+ const r4 = await _tryPort(port, host);
2014
+ if (r4) {
2015
+ return r4;
2021
2016
  }
2022
2017
  }
2023
2018
  }
@@ -2047,7 +2042,6 @@ async function getPort(_userOptions = {}) {
2047
2042
  _userOptions.port || _userOptions.ports?.length || _userOptions.portRange?.length
2048
2043
  );
2049
2044
  const options = {
2050
- name: "default",
2051
2045
  random: _port === 0,
2052
2046
  ports: [],
2053
2047
  portRange: [],
@@ -2151,118 +2145,118 @@ async function checkPort(port, host = process.env.HOST, verbose) {
2151
2145
  return port;
2152
2146
  }
2153
2147
 
2154
- // ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-ANXBDSUI.js
2155
- var s = { done: false, hasNext: false };
2156
- var o = (t) => ({ hasNext: true, next: t, done: false });
2148
+ // ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js
2149
+ function e(e2, t6, n3) {
2150
+ let r4 = (n4) => e2(n4, ...t6);
2151
+ return n3 === void 0 ? r4 : Object.assign(r4, { lazy: n3, lazyArgs: t6 });
2152
+ }
2153
+
2154
+ // ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
2155
+ function t(t6, n3, r4) {
2156
+ let i3 = t6.length - n3.length;
2157
+ if (i3 === 0)
2158
+ return t6(...n3);
2159
+ if (i3 === 1)
2160
+ return e(t6, n3, r4);
2161
+ throw Error(`Wrong number of arguments`);
2162
+ }
2157
2163
 
2158
- // ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-3GOCSNFN.js
2159
- function C(t, ...o3) {
2160
- let n = t, u3 = o3.map((e) => "lazy" in e ? y2(e) : void 0), p = 0;
2161
- for (; p < o3.length; ) {
2162
- if (u3[p] === void 0 || !B(n)) {
2163
- let i = o3[p];
2164
- n = i(n), p += 1;
2164
+ // ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/utilityEvaluators-DORpnx39.js
2165
+ var t2 = { done: false, hasNext: false };
2166
+ var r = (e2) => ({ hasNext: true, next: e2, done: false });
2167
+
2168
+ // ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/pipe-jLehR9-P.js
2169
+ function t3(e2, ...t6) {
2170
+ let a = e2, o = t6.map((e3) => `lazy` in e3 ? r2(e3) : void 0), s = 0;
2171
+ for (; s < t6.length; ) {
2172
+ if (o[s] === void 0 || !i(a)) {
2173
+ let e4 = t6[s];
2174
+ a = e4(a), s += 1;
2165
2175
  continue;
2166
2176
  }
2167
- let r = [];
2168
- for (let i = p; i < o3.length; i++) {
2169
- let l = u3[i];
2170
- if (l === void 0 || (r.push(l), l.isSingle))
2177
+ let e3 = [];
2178
+ for (let n3 = s; n3 < t6.length; n3++) {
2179
+ let t7 = o[n3];
2180
+ if (t7 === void 0 || (e3.push(t7), t7.isSingle))
2171
2181
  break;
2172
2182
  }
2173
- let a2 = [];
2174
- for (let i of n)
2175
- if (f(i, a2, r))
2183
+ let r4 = [];
2184
+ for (let t7 of a)
2185
+ if (n(t7, r4, e3))
2176
2186
  break;
2177
- let { isSingle: s2 } = r.at(-1);
2178
- n = s2 ? a2[0] : a2, p += r.length;
2187
+ let { isSingle: c } = e3.at(-1);
2188
+ a = c ? r4[0] : r4, s += e3.length;
2179
2189
  }
2180
- return n;
2190
+ return a;
2181
2191
  }
2182
- function f(t, o3, n) {
2183
- if (n.length === 0)
2184
- return o3.push(t), false;
2185
- let u3 = t, p = s, e = false;
2186
- for (let [r, a2] of n.entries()) {
2187
- let { index: s2, items: i } = a2;
2188
- if (i.push(u3), p = a2(u3, s2, i), a2.index += 1, p.hasNext) {
2189
- if (p.hasMany ?? false) {
2190
- for (let l of p.next)
2191
- if (f(l, o3, n.slice(r + 1)))
2192
+ function n(t6, r4, i3) {
2193
+ if (i3.length === 0)
2194
+ return r4.push(t6), false;
2195
+ let a = t6, o = t2, s = false;
2196
+ for (let [e2, t7] of i3.entries()) {
2197
+ let { index: c, items: l } = t7;
2198
+ if (l.push(a), o = t7(a, c, l), t7.index += 1, o.hasNext) {
2199
+ if (o.hasMany ?? false) {
2200
+ for (let t8 of o.next)
2201
+ if (n(t8, r4, i3.slice(e2 + 1)))
2192
2202
  return true;
2193
- return e;
2203
+ return s;
2194
2204
  }
2195
- u3 = p.next;
2205
+ a = o.next;
2196
2206
  }
2197
- if (!p.hasNext)
2207
+ if (!o.hasNext)
2198
2208
  break;
2199
- p.done && (e = true);
2209
+ o.done && (s = true);
2200
2210
  }
2201
- return p.hasNext && o3.push(u3), e;
2202
- }
2203
- function y2(t) {
2204
- let { lazy: o3, lazyArgs: n } = t, u3 = o3(...n);
2205
- return Object.assign(u3, { isSingle: o3.single ?? false, index: 0, items: [] });
2211
+ return o.hasNext && r4.push(a), s;
2206
2212
  }
2207
- function B(t) {
2208
- return typeof t == "string" || typeof t == "object" && t !== null && Symbol.iterator in t;
2213
+ function r2(e2) {
2214
+ let { lazy: t6, lazyArgs: n3 } = e2, r4 = t6(...n3);
2215
+ return Object.assign(r4, { isSingle: t6.single ?? false, index: 0, items: [] });
2209
2216
  }
2210
-
2211
- // ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-LFJW7BOT.js
2212
- function y3(t, i) {
2213
- let a2 = i.length - t.length;
2214
- if (a2 === 1) {
2215
- let [n, ...r] = i;
2216
- return C(n, { lazy: t, lazyArgs: r });
2217
- }
2218
- if (a2 === 0) {
2219
- let n = { lazy: t, lazyArgs: i };
2220
- return Object.assign((e) => C(e, n), n);
2221
- }
2222
- throw new Error("Wrong number of arguments");
2217
+ function i(e2) {
2218
+ return typeof e2 == `string` || typeof e2 == `object` && !!e2 && Symbol.iterator in e2;
2223
2219
  }
2224
2220
 
2225
- // ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-D6FCK2GA.js
2226
- function u(o3, n, a2) {
2227
- let t = (r) => o3(r, ...n);
2228
- return a2 === void 0 ? t : Object.assign(t, { lazy: a2, lazyArgs: n });
2221
+ // ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purryFromLazy-3oywCNIb.js
2222
+ function t4(t6, n3) {
2223
+ let r4 = n3.length - t6.length;
2224
+ if (r4 === 1) {
2225
+ let [r5, ...i3] = n3;
2226
+ return t3(r5, { lazy: t6, lazyArgs: i3 });
2227
+ }
2228
+ if (r4 === 0) {
2229
+ let r5 = { lazy: t6, lazyArgs: n3 };
2230
+ return Object.assign((t7) => t3(t7, r5), r5);
2231
+ }
2232
+ throw Error(`Wrong number of arguments`);
2229
2233
  }
2230
2234
 
2231
- // ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-WIMGWYZL.js
2232
- function u2(r, n, o3) {
2233
- let a2 = r.length - n.length;
2234
- if (a2 === 0)
2235
- return r(...n);
2236
- if (a2 === 1)
2237
- return u(r, n, o3);
2238
- throw new Error("Wrong number of arguments");
2235
+ // ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/difference-DxYg8_zs.js
2236
+ function r3(...e2) {
2237
+ return t4(i2, e2);
2239
2238
  }
2240
-
2241
- // ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-ENS7GPLZ.js
2242
- function a(...r) {
2243
- return u2(o2, r);
2244
- }
2245
- function o2(r, t) {
2246
- let e = [];
2247
- for (let n = r; n < t; n++)
2248
- e.push(n);
2249
- return e;
2239
+ function i2(n3) {
2240
+ if (n3.length === 0)
2241
+ return r;
2242
+ let r4 = /* @__PURE__ */ new Map();
2243
+ for (let e2 of n3)
2244
+ r4.set(e2, (r4.get(e2) ?? 0) + 1);
2245
+ return (t6) => {
2246
+ let n4 = r4.get(t6);
2247
+ return n4 === void 0 || n4 === 0 ? { done: false, hasNext: true, next: t6 } : (r4.set(t6, n4 - 1), t2);
2248
+ };
2250
2249
  }
2251
2250
 
2252
- // ../../node_modules/.pnpm/remeda@2.21.3/node_modules/remeda/dist/chunk-GKXRNLHM.js
2253
- function d(...e) {
2254
- return y3(f2, e);
2251
+ // ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/range-amdmPz_6.js
2252
+ function t5(...t6) {
2253
+ return t(n2, t6);
2255
2254
  }
2256
- function f2(e) {
2257
- if (e.length === 0)
2258
- return o;
2259
- let n = /* @__PURE__ */ new Map();
2260
- for (let r of e)
2261
- n.set(r, (n.get(r) ?? 0) + 1);
2262
- return (r) => {
2263
- let t = n.get(r);
2264
- return t === void 0 || t === 0 ? { done: false, hasNext: true, next: r } : (n.set(r, t - 1), s);
2265
- };
2255
+ function n2(e2, t6) {
2256
+ let n3 = [];
2257
+ for (let r4 = e2; r4 < t6; r4++)
2258
+ n3.push(r4);
2259
+ return n3;
2266
2260
  }
2267
2261
 
2268
2262
  // ../../dev/server/src/port.ts
@@ -2343,7 +2337,7 @@ async function tryAnyPort(options) {
2343
2337
  ...Object.values(portsUsedByThisServerLastTime || {})
2344
2338
  ];
2345
2339
  const maximumSpecificPort = Math.min(Math.max(minimumPort, ...excludedPorts) + 100, MAX_PORT);
2346
- const ports = d(a(minimumPort, maximumSpecificPort), excludedPorts);
2340
+ const ports = r3(t5(minimumPort, maximumSpecificPort), excludedPorts);
2347
2341
  const defaultPort2 = {
2348
2342
  port: DEFAULT_SERVER_PORT,
2349
2343
  databasePort: DEFAULT_DATABASE_PORT,
@@ -2557,6 +2551,7 @@ async function getDB(dataDir, debug3) {
2557
2551
  database: BASE_PGLITE_OPTIONS.database,
2558
2552
  dataDir,
2559
2553
  debug: debug3 ? 5 : void 0,
2554
+ extensions: await getExtensions(),
2560
2555
  relaxedDurability: false,
2561
2556
  username: BASE_PGLITE_OPTIONS.username
2562
2557
  });
@@ -2567,10 +2562,63 @@ async function getShadowDB(_dataDir, debug3) {
2567
2562
  database: BASE_PGLITE_OPTIONS.database,
2568
2563
  dataDir: "memory://",
2569
2564
  debug: debug3 ? 5 : void 0,
2565
+ extensions: await getExtensions(),
2570
2566
  relaxedDurability: false,
2571
2567
  username: BASE_PGLITE_OPTIONS.username
2572
2568
  });
2573
2569
  }
2570
+ async function getExtensions() {
2571
+ const importedExtensions = await Promise.all([
2572
+ import("@electric-sql/pglite/contrib/amcheck"),
2573
+ // missing `autoinc` https://www.postgresql.org/docs/current/contrib-spi.html#CONTRIB-SPI-AUTOINC.
2574
+ import("@electric-sql/pglite/contrib/bloom"),
2575
+ import("@electric-sql/pglite/contrib/btree_gin"),
2576
+ import("@electric-sql/pglite/contrib/btree_gist"),
2577
+ import("@electric-sql/pglite/contrib/citext"),
2578
+ import("@electric-sql/pglite/contrib/cube"),
2579
+ // missing `dblink` https://www.postgresql.org/docs/current/dblink.html.
2580
+ import("@electric-sql/pglite/contrib/dict_int"),
2581
+ import("@electric-sql/pglite/contrib/dict_xsyn"),
2582
+ import("@electric-sql/pglite/contrib/earthdistance"),
2583
+ import("@electric-sql/pglite/contrib/file_fdw"),
2584
+ import("@electric-sql/pglite/contrib/fuzzystrmatch"),
2585
+ import("@electric-sql/pglite/contrib/hstore"),
2586
+ // missing `insert_username` https://www.postgresql.org/docs/current/contrib-spi.html#CONTRIB-SPI-INSERT-USERNAME.
2587
+ // missing `intagg` https://www.postgresql.org/docs/current/intagg.html.
2588
+ import("@electric-sql/pglite/contrib/intarray"),
2589
+ import("@electric-sql/pglite/contrib/isn"),
2590
+ import("@electric-sql/pglite/contrib/lo"),
2591
+ import("@electric-sql/pglite/contrib/ltree"),
2592
+ // missing `moddatetime` https://www.postgresql.org/docs/current/contrib-spi.html#CONTRIB-SPI-MODDATETIME.
2593
+ import("@electric-sql/pglite/contrib/pageinspect"),
2594
+ import("@electric-sql/pglite/contrib/pg_buffercache"),
2595
+ import("@electric-sql/pglite/contrib/pg_freespacemap"),
2596
+ // missing `pg_prewarm` https://www.postgresql.org/docs/current/pgprewarm.html.
2597
+ // missing `pg_search` https://pgxn.org/dist/pg_search.
2598
+ // missing `pg_stat_statements` https://www.postgresql.org/docs/current/pgstatstatements.html.
2599
+ import("@electric-sql/pglite/contrib/pg_surgery"),
2600
+ import("@electric-sql/pglite/contrib/pg_trgm"),
2601
+ import("@electric-sql/pglite/contrib/pg_visibility"),
2602
+ import("@electric-sql/pglite/contrib/pg_walinspect"),
2603
+ // `pgcrypto` is included by default in PGLite https://github.com/electric-sql/pglite/pull/129#issuecomment-2260439887.
2604
+ // missing `pgrowlocks` https://www.postgresql.org/docs/current/pgrowlocks.html.
2605
+ // missing `pgstattuple` https://www.postgresql.org/docs/current/pgstattuple.html.
2606
+ // `plpgsql` is included by default in PGLite https://github.com/electric-sql/pglite/blob/c00eaded4a14cdf94ab057b53c2a67674bb5f003/packages/pglite/examples/plpgsql.html#L25.
2607
+ // missing `postgres_fdw` https://www.postgresql.org/docs/current/postgres-fdw.html.
2608
+ // missing `refint` https://www.postgresql.org/docs/current/contrib-spi.html#CONTRIB-SPI-REFINT.
2609
+ import("@electric-sql/pglite/contrib/seg"),
2610
+ // missing `sslinfo` https://www.postgresql.org/docs/current/sslinfo.html.
2611
+ import("@electric-sql/pglite/contrib/tablefunc"),
2612
+ import("@electric-sql/pglite/contrib/tcn"),
2613
+ import("@electric-sql/pglite/contrib/tsm_system_rows"),
2614
+ import("@electric-sql/pglite/contrib/tsm_system_time"),
2615
+ import("@electric-sql/pglite/contrib/unaccent"),
2616
+ import("@electric-sql/pglite/contrib/uuid_ossp"),
2617
+ import("@electric-sql/pglite/vector")
2618
+ // `xml2` is included by default in PGlite https://github.com/electric-sql/pglite/pull/129#issuecomment-2260439887.
2619
+ ]);
2620
+ return Object.assign({}, ...importedExtensions);
2621
+ }
2574
2622
  async function dumpDB(options) {
2575
2623
  const { dataDir, db, debug: debug3, destinationPath } = options;
2576
2624
  const pg = db || await getDB(dataDir, debug3);
@@ -2638,7 +2686,7 @@ async function getApp(port, dbServer, serverState) {
2638
2686
  const { debug: debug3 } = serverState;
2639
2687
  const [{ Hono }, { accelerateRoute }, { utilityRoute }] = await Promise.all([
2640
2688
  import("hono/tiny"),
2641
- import("./accelerate-7HJZB2GE.js"),
2689
+ import("./accelerate-5VID4BSA.js"),
2642
2690
  import("./utility-QJR3G2JJ.js")
2643
2691
  ]);
2644
2692
  const app = new Hono();
@@ -3475,8 +3523,8 @@ var GeneratedFiles = class _GeneratedFiles {
3475
3523
  yield entry;
3476
3524
  }
3477
3525
  }
3478
- format(f3) {
3479
- return new Formatter(this, f3).formatToString();
3526
+ format(f) {
3527
+ return new Formatter(this, f).formatToString();
3480
3528
  }
3481
3529
  };
3482
3530
  var Formatter = class _Formatter {
@@ -3519,8 +3567,8 @@ var FileWriter = class {
3519
3567
  fs3.writeFileSync(absPath, content, options);
3520
3568
  this.#files.add(absPath);
3521
3569
  }
3522
- format(f3) {
3523
- return this.#files.format(f3);
3570
+ format(f) {
3571
+ return this.#files.format(f);
3524
3572
  }
3525
3573
  };
3526
3574
 
@@ -3929,9 +3977,9 @@ var Init = class _Init {
3929
3977
  })
3930
3978
  })).json()
3931
3979
  ));
3932
- } catch (e) {
3980
+ } catch (e2) {
3933
3981
  spinner2.fail();
3934
- throw e;
3982
+ throw e2;
3935
3983
  }
3936
3984
  spinner2.succeed("Schema is ready");
3937
3985
  }
@@ -4060,15 +4108,15 @@ var Init = class _Init {
4060
4108
  const gitignorePath = path5.join(outputDir, ".gitignore");
4061
4109
  try {
4062
4110
  writer.write(gitignorePath, defaultGitIgnore(), { flag: "wx" });
4063
- } catch (e) {
4064
- if (e.code === "EEXIST") {
4111
+ } catch (e2) {
4112
+ if (e2.code === "EEXIST") {
4065
4113
  warnings.push(
4066
4114
  `${yellow(
4067
4115
  "warn"
4068
4116
  )} You already have a ${bold2(".gitignore file.")} Don't forget to add ${bold2(".env")} in it to not commit any private information.`
4069
4117
  );
4070
4118
  } else {
4071
- console.error("Failed to write .gitignore file, reason: ", e);
4119
+ console.error("Failed to write .gitignore file, reason: ", e2);
4072
4120
  }
4073
4121
  }
4074
4122
  const clientPathRelativeToOutputDir = path5.relative(outputDir, path5.resolve(prismaFolder, clientOutput));
@@ -4076,8 +4124,8 @@ var Init = class _Init {
4076
4124
  fs4.appendFileSync(gitignorePath, `
4077
4125
  /${clientPathRelativeToOutputDir.replaceAll(path5.sep, "/")}
4078
4126
  `);
4079
- } catch (e) {
4080
- console.error("Failed to append client path to .gitignore file, reason: ", e);
4127
+ } catch (e2) {
4128
+ console.error("Failed to append client path to .gitignore file, reason: ", e2);
4081
4129
  }
4082
4130
  const connectExistingDatabaseSteps = ` 1. Configure your DATABASE_URL in ${green2("prisma.config.ts")}
4083
4131
  2. Run ${green2(internals.getCommandWithExecutor("prisma db pull"))} to introspect your database.`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli-init",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Init CLI for Prisma",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -36,7 +36,7 @@
36
36
  "tsup": "8.0.2",
37
37
  "typescript": "5.8.3",
38
38
  "vitest": "3.1.3",
39
- "@prisma/dev": "0.16.1"
39
+ "@prisma/dev": "0.17.0"
40
40
  },
41
41
  "dependencies": {
42
42
  "@inquirer/prompts": "7.3.3",