@prisma/migrate 6.6.0-dev.8 → 6.6.0-dev.80

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.
Files changed (150) hide show
  1. package/dist/CLI.js +3 -3
  2. package/dist/Migrate.js +8 -6
  3. package/dist/SchemaEngine.js +5 -5
  4. package/dist/bin.js +47 -46
  5. package/dist/chunk-23DZXSTI.js +62 -0
  6. package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
  7. package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
  8. package/dist/chunk-33LPBNDX.js +1399 -0
  9. package/dist/{chunk-V3ZMNXZC.js → chunk-5LKIRKDL.js} +307 -382
  10. package/dist/{chunk-IR55GBON.js → chunk-5LTDMS3H.js} +18 -18
  11. package/dist/{chunk-LOGAFLCN.js → chunk-5R44VVVX.js} +29 -29
  12. package/dist/{chunk-Q3ZLC44N.js → chunk-63X7FE2R.js} +57 -66
  13. package/dist/{chunk-DJMFXNR4.js → chunk-74LUB4XX.js} +56 -57
  14. package/dist/{chunk-N4XTKFY6.js → chunk-7RM467G7.js} +39 -38
  15. package/dist/{chunk-RP2N6UXA.js → chunk-AI6DH66U.js} +6 -6
  16. package/dist/{chunk-A6PMXMMT.js → chunk-AUGZZ6RT.js} +105 -13
  17. package/dist/{chunk-G2XUUMKH.js → chunk-B4SUSDC2.js} +31 -39
  18. package/dist/{chunk-ZOEKRXDP.js → chunk-D2DGSPW6.js} +29 -55
  19. package/dist/{chunk-W2SZNLK4.js → chunk-EJG7GKM7.js} +37 -39
  20. package/dist/{chunk-5PSO7BDO.js → chunk-EJUXYFV3.js} +15 -15
  21. package/dist/{chunk-HCBZB4XC.js → chunk-FFPSJTA6.js} +53 -52
  22. package/dist/{chunk-N3KYWSX2.js → chunk-FZGPSDP7.js} +55 -49
  23. package/dist/{chunk-MCWCB2AX.js → chunk-IINN7QUV.js} +170 -643
  24. package/dist/{chunk-255BRND3.js → chunk-KRQEFTDT.js} +6 -6
  25. package/dist/{chunk-VVKOFN3Y.js → chunk-LLO7YF56.js} +44 -46
  26. package/dist/{chunk-VZ23KD5C.js → chunk-NGQA5JTN.js} +8 -10
  27. package/dist/{chunk-MKK3GSDF.js → chunk-NIKXBMZL.js} +5 -5
  28. package/dist/{chunk-GG54LOYV.js → chunk-O6RQXRWU.js} +45 -44
  29. package/dist/{chunk-MATFO4ZW.js → chunk-OEWQACEH.js} +38 -39
  30. package/dist/{chunk-3GHGKOL4.js → chunk-OPKM35BD.js} +370 -529
  31. package/dist/{chunk-EGPJABTW.js → chunk-QVMYNWAN.js} +257 -103
  32. package/dist/{chunk-V5TUSOJX.js → chunk-SQKGZVG3.js} +45 -45
  33. package/dist/{chunk-CQZFVAXC.js → chunk-TN7JMNXD.js} +42 -41
  34. package/dist/chunk-URKH6SE2.js +479 -0
  35. package/dist/chunk-V6PVGSDJ.js +76 -0
  36. package/dist/{chunk-DLLXDCI2.js → chunk-VAJ4VX67.js} +5 -6
  37. package/dist/{chunk-KC5MOJ5I.js → chunk-WU6Z6FMF.js} +371 -530
  38. package/dist/{chunk-OCQGHQED.js → chunk-YBX7R3MT.js} +12 -12
  39. package/dist/{chunk-KS7IEA6Z.js → chunk-YGBJA7QJ.js} +50 -52
  40. package/dist/{chunk-WI2A2TQE.js → chunk-ZJ4IDCRR.js} +90 -91
  41. package/dist/chunk-ZLHWX5PJ.js +883 -0
  42. package/dist/commands/DbCommand.js +3 -3
  43. package/dist/commands/DbDrop.js +4 -5
  44. package/dist/commands/DbExecute.js +9 -7
  45. package/dist/commands/DbPull.js +11 -10
  46. package/dist/commands/DbPush.js +10 -9
  47. package/dist/commands/DbSeed.js +4 -5
  48. package/dist/commands/MigrateCommand.js +3 -3
  49. package/dist/commands/MigrateDeploy.js +12 -11
  50. package/dist/commands/MigrateDev.js +14 -13
  51. package/dist/commands/MigrateDiff.js +12 -10
  52. package/dist/commands/MigrateReset.js +13 -12
  53. package/dist/commands/MigrateResolve.js +10 -9
  54. package/dist/commands/MigrateStatus.js +10 -9
  55. package/dist/index.js +50 -51
  56. package/dist/internals/src/Generator.d.ts +23 -5
  57. package/dist/internals/src/cli/checkUnsupportedDataProxy.d.ts +12 -17
  58. package/dist/internals/src/cli/directoryConfig.d.ts +7 -0
  59. package/dist/internals/src/cli/getSchema.d.ts +3 -28
  60. package/dist/internals/src/cli/hashes.d.ts +1 -2
  61. package/dist/internals/src/cli/schemaContext.d.ts +59 -0
  62. package/dist/internals/src/client/getClientEngineType.d.ts +1 -1
  63. package/dist/internals/src/convertCredentials.d.ts +1 -1
  64. package/dist/internals/src/engine-commands/getConfig.d.ts +1 -5
  65. package/dist/internals/src/engine-commands/getDmmf.d.ts +3 -6
  66. package/dist/internals/src/engine-commands/lintSchema.d.ts +1 -1
  67. package/dist/internals/src/errorReporting.d.ts +0 -1
  68. package/dist/internals/src/get-generators/getGenerators.d.ts +22 -9
  69. package/dist/internals/src/get-generators/utils/binaryTypeToEngineType.d.ts +1 -1
  70. package/dist/internals/src/get-generators/utils/engineTypeToBinaryType.d.ts +1 -1
  71. package/dist/internals/src/get-generators/utils/fixBinaryTargets.d.ts +1 -1
  72. package/dist/internals/src/get-generators/utils/getBinaryPathsByVersion.d.ts +1 -1
  73. package/dist/internals/src/get-generators/utils/getEngineVersionForGenerator.d.ts +1 -1
  74. package/dist/internals/src/get-generators/utils/printGeneratorConfig.d.ts +1 -1
  75. package/dist/internals/src/index.d.ts +7 -7
  76. package/dist/internals/src/migrateTypes.d.ts +63 -0
  77. package/dist/internals/src/panic.d.ts +1 -4
  78. package/dist/internals/src/resolvePkg.d.ts +7 -0
  79. package/dist/internals/src/types.d.ts +1 -1
  80. package/dist/internals/src/utils/extractPreviewFeatures.d.ts +2 -2
  81. package/dist/internals/src/utils/getEnvPaths.d.ts +1 -1
  82. package/dist/internals/src/utils/parseEnvValue.d.ts +1 -1
  83. package/dist/internals/src/utils/schemaFileInput.d.ts +0 -4
  84. package/dist/internals/src/utils/toSchemasContainer.d.ts +2 -3
  85. package/dist/migrate/src/Migrate.d.ts +7 -5
  86. package/dist/migrate/src/SchemaEngine.d.ts +5 -9
  87. package/dist/migrate/src/index.d.ts +0 -1
  88. package/dist/migrate/src/types.d.ts +14 -10
  89. package/dist/migrate/src/utils/createMigration.d.ts +21 -0
  90. package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +4 -6
  91. package/dist/migrate/src/utils/introspectSql.d.ts +3 -2
  92. package/dist/migrate/src/utils/listMigrations.d.ts +9 -0
  93. package/dist/migrate/src/utils/printDatasources.d.ts +1 -1
  94. package/dist/migrate/src/utils/seed.d.ts +0 -2
  95. package/dist/migrate/src/views/handleViewsIO.d.ts +2 -2
  96. package/dist/{multipart-parser-54WEFGGN-NLZG56KM.js → multipart-parser-ASKQAOL4-WZ47HU6G.js} +92 -125
  97. package/dist/{multipart-parser-NDLECNMN.js → multipart-parser-QCI3Y5IB.js} +66 -68
  98. package/dist/types.js +1 -1
  99. package/dist/{typescript-WN4QH2CP.js → typescript-2LKASCMC.js} +33 -33
  100. package/dist/{typescript-AILDXN3I.js → typescript-H3AVJ6KX.js} +32 -32
  101. package/dist/utils/byline.js +1 -1
  102. package/dist/utils/captureStdout.js +3 -3
  103. package/dist/utils/countModelsAndTypes.js +1 -1
  104. package/dist/utils/{getSchemaPathAndPrint.js → createMigration.js} +8 -8
  105. package/dist/utils/customColors.js +1 -1
  106. package/dist/utils/ensureDatabaseExists.js +7 -7
  107. package/dist/utils/errors.js +1 -1
  108. package/dist/utils/flagErrors.js +1 -1
  109. package/dist/utils/getDatabaseVersionSafe.js +5 -5
  110. package/dist/utils/handleEvaluateDataloss.js +1 -1
  111. package/dist/utils/introspectSql.js +5 -5
  112. package/dist/utils/isSchemaEmpty.js +1 -1
  113. package/dist/utils/listMigrations.js +25 -0
  114. package/dist/utils/now.js +1 -1
  115. package/dist/utils/printDatasource.js +1 -1
  116. package/dist/utils/printDatasources.js +5 -5
  117. package/dist/utils/printFiles.js +5 -5
  118. package/dist/utils/printIntrospectedSchema.js +1 -1
  119. package/dist/utils/printMigrationId.js +1 -1
  120. package/dist/utils/promptForMigrationName.js +3 -3
  121. package/dist/utils/removeSchemaFiles.js +1 -1
  122. package/dist/utils/replaceOrAddDatasource.js +1 -1
  123. package/dist/utils/replaceOrAddDatasource.test.js +1 -1
  124. package/dist/utils/saveSchemaFiles.js +1 -1
  125. package/dist/utils/seed.js +4 -7
  126. package/dist/utils/setupCockroach.js +3 -3
  127. package/dist/utils/setupMSSQL.js +1478 -707
  128. package/dist/utils/setupMongo.js +553 -552
  129. package/dist/utils/setupMysql.js +508 -563
  130. package/dist/utils/setupPostgres.js +3 -3
  131. package/dist/utils/spinner.js +4 -3
  132. package/dist/utils/test-handlePanic.js +1 -30
  133. package/dist/utils/unixSocket.js +1 -1
  134. package/dist/views/handleViewsIO.js +3 -3
  135. package/package.json +11 -11
  136. package/dist/chunk-GKDFIHM2.js +0 -45
  137. package/dist/chunk-J46BJQHT.js +0 -268
  138. package/dist/chunk-KOF4LGTS.js +0 -1817
  139. package/dist/chunk-YYPMC5FN.js +0 -1407
  140. package/dist/internals/src/get-generators/generatorResolvers/generatorResolvers.d.ts +0 -15
  141. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +0 -6
  142. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +0 -9
  143. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +0 -8
  144. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +0 -6
  145. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +0 -1
  146. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +0 -20
  147. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +0 -7
  148. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +0 -20
  149. package/dist/internals/src/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
  150. package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +0 -10
@@ -26,27 +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 chunk_V3ZMNXZC_exports = {};
30
- __export(chunk_V3ZMNXZC_exports, {
29
+ var chunk_5LKIRKDL_exports = {};
30
+ __export(chunk_5LKIRKDL_exports, {
31
31
  executeSeedCommand: () => executeSeedCommand,
32
- getSeedCommandFromPackageJson: () => getSeedCommandFromPackageJson,
33
- legacyTsNodeScriptWarning: () => legacyTsNodeScriptWarning,
34
- verifySeedConfigAndReturnMessage: () => verifySeedConfigAndReturnMessage
32
+ getSeedCommandFromPackageJson: () => getSeedCommandFromPackageJson
35
33
  });
36
- module.exports = __toCommonJS(chunk_V3ZMNXZC_exports);
37
- var import_chunk_J46BJQHT = require("./chunk-J46BJQHT.js");
34
+ module.exports = __toCommonJS(chunk_5LKIRKDL_exports);
38
35
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
39
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
36
+ var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
40
37
  var import_debug = __toESM(require("@prisma/debug"));
41
38
  var import_internals = require("@prisma/internals");
42
- var import_fs = __toESM(require("fs"));
43
39
  var import_path = __toESM(require("path"));
44
- var require_windows = (0, import_chunk_WWAWV7DQ.__commonJS)({
40
+ var require_windows = (0, import_chunk_2ESYSVXG.__commonJS)({
45
41
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) {
46
42
  "use strict";
47
43
  module2.exports = isexe;
48
44
  isexe.sync = sync;
49
- var fs2 = (0, import_chunk_WWAWV7DQ.__require)("fs");
45
+ var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
50
46
  function checkPathExt(path2, options) {
51
47
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
52
48
  if (!pathext) {
@@ -71,28 +67,28 @@ var require_windows = (0, import_chunk_WWAWV7DQ.__commonJS)({
71
67
  return checkPathExt(path2, options);
72
68
  }
73
69
  function isexe(path2, options, cb) {
74
- fs2.stat(path2, function(er, stat) {
70
+ fs.stat(path2, function(er, stat) {
75
71
  cb(er, er ? false : checkStat(stat, path2, options));
76
72
  });
77
73
  }
78
74
  function sync(path2, options) {
79
- return checkStat(fs2.statSync(path2), path2, options);
75
+ return checkStat(fs.statSync(path2), path2, options);
80
76
  }
81
77
  }
82
78
  });
83
- var require_mode = (0, import_chunk_WWAWV7DQ.__commonJS)({
79
+ var require_mode = (0, import_chunk_2ESYSVXG.__commonJS)({
84
80
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module2) {
85
81
  "use strict";
86
82
  module2.exports = isexe;
87
83
  isexe.sync = sync;
88
- var fs2 = (0, import_chunk_WWAWV7DQ.__require)("fs");
84
+ var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
89
85
  function isexe(path2, options, cb) {
90
- fs2.stat(path2, function(er, stat) {
86
+ fs.stat(path2, function(er, stat) {
91
87
  cb(er, er ? false : checkStat(stat, options));
92
88
  });
93
89
  }
94
90
  function sync(path2, options) {
95
- return checkStat(fs2.statSync(path2), options);
91
+ return checkStat(fs.statSync(path2), options);
96
92
  }
97
93
  function checkStat(stat, options) {
98
94
  return stat.isFile() && checkMode(stat, options);
@@ -112,10 +108,10 @@ var require_mode = (0, import_chunk_WWAWV7DQ.__commonJS)({
112
108
  }
113
109
  }
114
110
  });
115
- var require_isexe = (0, import_chunk_WWAWV7DQ.__commonJS)({
111
+ var require_isexe = (0, import_chunk_2ESYSVXG.__commonJS)({
116
112
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) {
117
113
  "use strict";
118
- var fs2 = (0, import_chunk_WWAWV7DQ.__require)("fs");
114
+ var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
119
115
  var core;
120
116
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
121
117
  core = require_windows();
@@ -166,11 +162,11 @@ var require_isexe = (0, import_chunk_WWAWV7DQ.__commonJS)({
166
162
  }
167
163
  }
168
164
  });
169
- var require_which = (0, import_chunk_WWAWV7DQ.__commonJS)({
165
+ var require_which = (0, import_chunk_2ESYSVXG.__commonJS)({
170
166
  "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module2) {
171
167
  "use strict";
172
168
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
173
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
169
+ var path2 = (0, import_chunk_2ESYSVXG.__require)("path");
174
170
  var COLON = isWindows ? ";" : ":";
175
171
  var isexe = require_isexe();
176
172
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -261,7 +257,7 @@ var require_which = (0, import_chunk_WWAWV7DQ.__commonJS)({
261
257
  which.sync = whichSync;
262
258
  }
263
259
  });
264
- var require_path_key = (0, import_chunk_WWAWV7DQ.__commonJS)({
260
+ var require_path_key = (0, import_chunk_2ESYSVXG.__commonJS)({
265
261
  "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module2) {
266
262
  "use strict";
267
263
  var pathKey = (options = {}) => {
@@ -276,10 +272,10 @@ var require_path_key = (0, import_chunk_WWAWV7DQ.__commonJS)({
276
272
  module2.exports.default = pathKey;
277
273
  }
278
274
  });
279
- var require_resolveCommand = (0, import_chunk_WWAWV7DQ.__commonJS)({
275
+ var require_resolveCommand = (0, import_chunk_2ESYSVXG.__commonJS)({
280
276
  "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) {
281
277
  "use strict";
282
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
278
+ var path2 = (0, import_chunk_2ESYSVXG.__require)("path");
283
279
  var which = require_which();
284
280
  var getPathKey = require_path_key();
285
281
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -316,7 +312,7 @@ var require_resolveCommand = (0, import_chunk_WWAWV7DQ.__commonJS)({
316
312
  module2.exports = resolveCommand;
317
313
  }
318
314
  });
319
- var require_escape = (0, import_chunk_WWAWV7DQ.__commonJS)({
315
+ var require_escape = (0, import_chunk_2ESYSVXG.__commonJS)({
320
316
  "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports, module2) {
321
317
  "use strict";
322
318
  var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
@@ -339,13 +335,13 @@ var require_escape = (0, import_chunk_WWAWV7DQ.__commonJS)({
339
335
  module2.exports.argument = escapeArgument;
340
336
  }
341
337
  });
342
- var require_shebang_regex = (0, import_chunk_WWAWV7DQ.__commonJS)({
338
+ var require_shebang_regex = (0, import_chunk_2ESYSVXG.__commonJS)({
343
339
  "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module2) {
344
340
  "use strict";
345
341
  module2.exports = /^#!(.*)/;
346
342
  }
347
343
  });
348
- var require_shebang_command = (0, import_chunk_WWAWV7DQ.__commonJS)({
344
+ var require_shebang_command = (0, import_chunk_2ESYSVXG.__commonJS)({
349
345
  "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module2) {
350
346
  "use strict";
351
347
  var shebangRegex = require_shebang_regex();
@@ -363,19 +359,19 @@ var require_shebang_command = (0, import_chunk_WWAWV7DQ.__commonJS)({
363
359
  };
364
360
  }
365
361
  });
366
- var require_readShebang = (0, import_chunk_WWAWV7DQ.__commonJS)({
362
+ var require_readShebang = (0, import_chunk_2ESYSVXG.__commonJS)({
367
363
  "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) {
368
364
  "use strict";
369
- var fs2 = (0, import_chunk_WWAWV7DQ.__require)("fs");
365
+ var fs = (0, import_chunk_2ESYSVXG.__require)("fs");
370
366
  var shebangCommand = require_shebang_command();
371
367
  function readShebang(command) {
372
368
  const size = 150;
373
369
  const buffer = Buffer.alloc(size);
374
370
  let fd;
375
371
  try {
376
- fd = fs2.openSync(command, "r");
377
- fs2.readSync(fd, buffer, 0, size, 0);
378
- fs2.closeSync(fd);
372
+ fd = fs.openSync(command, "r");
373
+ fs.readSync(fd, buffer, 0, size, 0);
374
+ fs.closeSync(fd);
379
375
  } catch (e) {
380
376
  }
381
377
  return shebangCommand(buffer.toString());
@@ -383,10 +379,10 @@ var require_readShebang = (0, import_chunk_WWAWV7DQ.__commonJS)({
383
379
  module2.exports = readShebang;
384
380
  }
385
381
  });
386
- var require_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
382
+ var require_parse = (0, import_chunk_2ESYSVXG.__commonJS)({
387
383
  "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports, module2) {
388
384
  "use strict";
389
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
385
+ var path2 = (0, import_chunk_2ESYSVXG.__require)("path");
390
386
  var resolveCommand = require_resolveCommand();
391
387
  var escape = require_escape();
392
388
  var readShebang = require_readShebang();
@@ -443,7 +439,7 @@ var require_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
443
439
  module2.exports = parse;
444
440
  }
445
441
  });
446
- var require_enoent = (0, import_chunk_WWAWV7DQ.__commonJS)({
442
+ var require_enoent = (0, import_chunk_2ESYSVXG.__commonJS)({
447
443
  "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports, module2) {
448
444
  "use strict";
449
445
  var isWin = process.platform === "win32";
@@ -491,10 +487,10 @@ var require_enoent = (0, import_chunk_WWAWV7DQ.__commonJS)({
491
487
  };
492
488
  }
493
489
  });
494
- var require_cross_spawn = (0, import_chunk_WWAWV7DQ.__commonJS)({
490
+ var require_cross_spawn = (0, import_chunk_2ESYSVXG.__commonJS)({
495
491
  "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports, module2) {
496
492
  "use strict";
497
- var cp = (0, import_chunk_WWAWV7DQ.__require)("child_process");
493
+ var cp = (0, import_chunk_2ESYSVXG.__require)("child_process");
498
494
  var parse = require_parse();
499
495
  var enoent = require_enoent();
500
496
  function spawn(command, args, options) {
@@ -516,7 +512,7 @@ var require_cross_spawn = (0, import_chunk_WWAWV7DQ.__commonJS)({
516
512
  module2.exports._enoent = enoent;
517
513
  }
518
514
  });
519
- var require_strip_final_newline = (0, import_chunk_WWAWV7DQ.__commonJS)({
515
+ var require_strip_final_newline = (0, import_chunk_2ESYSVXG.__commonJS)({
520
516
  "../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports, module2) {
521
517
  "use strict";
522
518
  module2.exports = (input) => {
@@ -532,10 +528,10 @@ var require_strip_final_newline = (0, import_chunk_WWAWV7DQ.__commonJS)({
532
528
  };
533
529
  }
534
530
  });
535
- var require_npm_run_path = (0, import_chunk_WWAWV7DQ.__commonJS)({
531
+ var require_npm_run_path = (0, import_chunk_2ESYSVXG.__commonJS)({
536
532
  "../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports, module2) {
537
533
  "use strict";
538
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
534
+ var path2 = (0, import_chunk_2ESYSVXG.__require)("path");
539
535
  var pathKey = require_path_key();
540
536
  var npmRunPath = (options) => {
541
537
  options = {
@@ -571,7 +567,56 @@ var require_npm_run_path = (0, import_chunk_WWAWV7DQ.__commonJS)({
571
567
  };
572
568
  }
573
569
  });
574
- var require_core = (0, import_chunk_WWAWV7DQ.__commonJS)({
570
+ var require_mimic_fn = (0, import_chunk_2ESYSVXG.__commonJS)({
571
+ "../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports, module2) {
572
+ "use strict";
573
+ var mimicFn = (to, from) => {
574
+ for (const prop of Reflect.ownKeys(from)) {
575
+ Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
576
+ }
577
+ return to;
578
+ };
579
+ module2.exports = mimicFn;
580
+ module2.exports.default = mimicFn;
581
+ }
582
+ });
583
+ var require_onetime = (0, import_chunk_2ESYSVXG.__commonJS)({
584
+ "../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports, module2) {
585
+ "use strict";
586
+ var mimicFn = require_mimic_fn();
587
+ var calledFunctions = /* @__PURE__ */ new WeakMap();
588
+ var onetime = (function_, options = {}) => {
589
+ if (typeof function_ !== "function") {
590
+ throw new TypeError("Expected a function");
591
+ }
592
+ let returnValue;
593
+ let callCount = 0;
594
+ const functionName = function_.displayName || function_.name || "<anonymous>";
595
+ const onetime2 = function(...arguments_) {
596
+ calledFunctions.set(onetime2, ++callCount);
597
+ if (callCount === 1) {
598
+ returnValue = function_.apply(this, arguments_);
599
+ function_ = null;
600
+ } else if (options.throw === true) {
601
+ throw new Error(`Function \`${functionName}\` can only be called once`);
602
+ }
603
+ return returnValue;
604
+ };
605
+ mimicFn(onetime2, function_);
606
+ calledFunctions.set(onetime2, callCount);
607
+ return onetime2;
608
+ };
609
+ module2.exports = onetime;
610
+ module2.exports.default = onetime;
611
+ module2.exports.callCount = (function_) => {
612
+ if (!calledFunctions.has(function_)) {
613
+ throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
614
+ }
615
+ return calledFunctions.get(function_);
616
+ };
617
+ }
618
+ });
619
+ var require_core = (0, import_chunk_2ESYSVXG.__commonJS)({
575
620
  "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js"(exports) {
576
621
  "use strict";
577
622
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -850,7 +895,7 @@ var require_core = (0, import_chunk_WWAWV7DQ.__commonJS)({
850
895
  exports.SIGNALS = SIGNALS;
851
896
  }
852
897
  });
853
- var require_realtime = (0, import_chunk_WWAWV7DQ.__commonJS)({
898
+ var require_realtime = (0, import_chunk_2ESYSVXG.__commonJS)({
854
899
  "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js"(exports) {
855
900
  "use strict";
856
901
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -874,12 +919,12 @@ var require_realtime = (0, import_chunk_WWAWV7DQ.__commonJS)({
874
919
  exports.SIGRTMAX = SIGRTMAX;
875
920
  }
876
921
  });
877
- var require_signals = (0, import_chunk_WWAWV7DQ.__commonJS)({
922
+ var require_signals = (0, import_chunk_2ESYSVXG.__commonJS)({
878
923
  "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js"(exports) {
879
924
  "use strict";
880
925
  Object.defineProperty(exports, "__esModule", { value: true });
881
926
  exports.getSignals = void 0;
882
- var _os = (0, import_chunk_WWAWV7DQ.__require)("os");
927
+ var _os = (0, import_chunk_2ESYSVXG.__require)("os");
883
928
  var _core = require_core();
884
929
  var _realtime = require_realtime();
885
930
  var getSignals = function() {
@@ -905,12 +950,12 @@ var require_signals = (0, import_chunk_WWAWV7DQ.__commonJS)({
905
950
  };
906
951
  }
907
952
  });
908
- var require_main = (0, import_chunk_WWAWV7DQ.__commonJS)({
953
+ var require_main = (0, import_chunk_2ESYSVXG.__commonJS)({
909
954
  "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js"(exports) {
910
955
  "use strict";
911
956
  Object.defineProperty(exports, "__esModule", { value: true });
912
957
  exports.signalsByNumber = exports.signalsByName = void 0;
913
- var _os = (0, import_chunk_WWAWV7DQ.__require)("os");
958
+ var _os = (0, import_chunk_2ESYSVXG.__require)("os");
914
959
  var _signals = require_signals();
915
960
  var _realtime = require_realtime();
916
961
  var getSignalsByName = function() {
@@ -960,7 +1005,7 @@ var require_main = (0, import_chunk_WWAWV7DQ.__commonJS)({
960
1005
  exports.signalsByNumber = signalsByNumber;
961
1006
  }
962
1007
  });
963
- var require_error = (0, import_chunk_WWAWV7DQ.__commonJS)({
1008
+ var require_error = (0, import_chunk_2ESYSVXG.__commonJS)({
964
1009
  "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js"(exports, module2) {
965
1010
  "use strict";
966
1011
  var { signalsByName } = require_main();
@@ -1035,7 +1080,7 @@ ${error.message}` : execaMessage;
1035
1080
  module2.exports = makeError;
1036
1081
  }
1037
1082
  });
1038
- var require_stdio = (0, import_chunk_WWAWV7DQ.__commonJS)({
1083
+ var require_stdio = (0, import_chunk_2ESYSVXG.__commonJS)({
1039
1084
  "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js"(exports, module2) {
1040
1085
  "use strict";
1041
1086
  var aliases = ["stdin", "stdout", "stderr"];
@@ -1076,11 +1121,205 @@ var require_stdio = (0, import_chunk_WWAWV7DQ.__commonJS)({
1076
1121
  };
1077
1122
  }
1078
1123
  });
1079
- var require_kill = (0, import_chunk_WWAWV7DQ.__commonJS)({
1124
+ var require_signals2 = (0, import_chunk_2ESYSVXG.__commonJS)({
1125
+ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports, module2) {
1126
+ "use strict";
1127
+ module2.exports = [
1128
+ "SIGABRT",
1129
+ "SIGALRM",
1130
+ "SIGHUP",
1131
+ "SIGINT",
1132
+ "SIGTERM"
1133
+ ];
1134
+ if (process.platform !== "win32") {
1135
+ module2.exports.push(
1136
+ "SIGVTALRM",
1137
+ "SIGXCPU",
1138
+ "SIGXFSZ",
1139
+ "SIGUSR2",
1140
+ "SIGTRAP",
1141
+ "SIGSYS",
1142
+ "SIGQUIT",
1143
+ "SIGIOT"
1144
+ // should detect profiler and enable/disable accordingly.
1145
+ // see #21
1146
+ // 'SIGPROF'
1147
+ );
1148
+ }
1149
+ if (process.platform === "linux") {
1150
+ module2.exports.push(
1151
+ "SIGIO",
1152
+ "SIGPOLL",
1153
+ "SIGPWR",
1154
+ "SIGSTKFLT",
1155
+ "SIGUNUSED"
1156
+ );
1157
+ }
1158
+ }
1159
+ });
1160
+ var require_signal_exit = (0, import_chunk_2ESYSVXG.__commonJS)({
1161
+ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
1162
+ "use strict";
1163
+ var process2 = global.process;
1164
+ var processOk = function(process3) {
1165
+ return 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";
1166
+ };
1167
+ if (!processOk(process2)) {
1168
+ module2.exports = function() {
1169
+ return function() {
1170
+ };
1171
+ };
1172
+ } else {
1173
+ assert = (0, import_chunk_2ESYSVXG.__require)("assert");
1174
+ signals = require_signals2();
1175
+ isWin = /^win/i.test(process2.platform);
1176
+ EE = (0, import_chunk_2ESYSVXG.__require)("events");
1177
+ if (typeof EE !== "function") {
1178
+ EE = EE.EventEmitter;
1179
+ }
1180
+ if (process2.__signal_exit_emitter__) {
1181
+ emitter = process2.__signal_exit_emitter__;
1182
+ } else {
1183
+ emitter = process2.__signal_exit_emitter__ = new EE();
1184
+ emitter.count = 0;
1185
+ emitter.emitted = {};
1186
+ }
1187
+ if (!emitter.infinite) {
1188
+ emitter.setMaxListeners(Infinity);
1189
+ emitter.infinite = true;
1190
+ }
1191
+ module2.exports = function(cb, opts) {
1192
+ if (!processOk(global.process)) {
1193
+ return function() {
1194
+ };
1195
+ }
1196
+ assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
1197
+ if (loaded === false) {
1198
+ load();
1199
+ }
1200
+ var ev = "exit";
1201
+ if (opts && opts.alwaysLast) {
1202
+ ev = "afterexit";
1203
+ }
1204
+ var remove = function() {
1205
+ emitter.removeListener(ev, cb);
1206
+ if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
1207
+ unload();
1208
+ }
1209
+ };
1210
+ emitter.on(ev, cb);
1211
+ return remove;
1212
+ };
1213
+ unload = function unload2() {
1214
+ if (!loaded || !processOk(global.process)) {
1215
+ return;
1216
+ }
1217
+ loaded = false;
1218
+ signals.forEach(function(sig) {
1219
+ try {
1220
+ process2.removeListener(sig, sigListeners[sig]);
1221
+ } catch (er) {
1222
+ }
1223
+ });
1224
+ process2.emit = originalProcessEmit;
1225
+ process2.reallyExit = originalProcessReallyExit;
1226
+ emitter.count -= 1;
1227
+ };
1228
+ module2.exports.unload = unload;
1229
+ emit = function emit2(event, code, signal) {
1230
+ if (emitter.emitted[event]) {
1231
+ return;
1232
+ }
1233
+ emitter.emitted[event] = true;
1234
+ emitter.emit(event, code, signal);
1235
+ };
1236
+ sigListeners = {};
1237
+ signals.forEach(function(sig) {
1238
+ sigListeners[sig] = function listener() {
1239
+ if (!processOk(global.process)) {
1240
+ return;
1241
+ }
1242
+ var listeners = process2.listeners(sig);
1243
+ if (listeners.length === emitter.count) {
1244
+ unload();
1245
+ emit("exit", null, sig);
1246
+ emit("afterexit", null, sig);
1247
+ if (isWin && sig === "SIGHUP") {
1248
+ sig = "SIGINT";
1249
+ }
1250
+ process2.kill(process2.pid, sig);
1251
+ }
1252
+ };
1253
+ });
1254
+ module2.exports.signals = function() {
1255
+ return signals;
1256
+ };
1257
+ loaded = false;
1258
+ load = function load2() {
1259
+ if (loaded || !processOk(global.process)) {
1260
+ return;
1261
+ }
1262
+ loaded = true;
1263
+ emitter.count += 1;
1264
+ signals = signals.filter(function(sig) {
1265
+ try {
1266
+ process2.on(sig, sigListeners[sig]);
1267
+ return true;
1268
+ } catch (er) {
1269
+ return false;
1270
+ }
1271
+ });
1272
+ process2.emit = processEmit;
1273
+ process2.reallyExit = processReallyExit;
1274
+ };
1275
+ module2.exports.load = load;
1276
+ originalProcessReallyExit = process2.reallyExit;
1277
+ processReallyExit = function processReallyExit2(code) {
1278
+ if (!processOk(global.process)) {
1279
+ return;
1280
+ }
1281
+ process2.exitCode = code || /* istanbul ignore next */
1282
+ 0;
1283
+ emit("exit", process2.exitCode, null);
1284
+ emit("afterexit", process2.exitCode, null);
1285
+ originalProcessReallyExit.call(process2, process2.exitCode);
1286
+ };
1287
+ originalProcessEmit = process2.emit;
1288
+ processEmit = function processEmit2(ev, arg) {
1289
+ if (ev === "exit" && processOk(global.process)) {
1290
+ if (arg !== void 0) {
1291
+ process2.exitCode = arg;
1292
+ }
1293
+ var ret = originalProcessEmit.apply(this, arguments);
1294
+ emit("exit", process2.exitCode, null);
1295
+ emit("afterexit", process2.exitCode, null);
1296
+ return ret;
1297
+ } else {
1298
+ return originalProcessEmit.apply(this, arguments);
1299
+ }
1300
+ };
1301
+ }
1302
+ var assert;
1303
+ var signals;
1304
+ var isWin;
1305
+ var EE;
1306
+ var emitter;
1307
+ var unload;
1308
+ var emit;
1309
+ var sigListeners;
1310
+ var loaded;
1311
+ var load;
1312
+ var originalProcessReallyExit;
1313
+ var processReallyExit;
1314
+ var originalProcessEmit;
1315
+ var processEmit;
1316
+ }
1317
+ });
1318
+ var require_kill = (0, import_chunk_2ESYSVXG.__commonJS)({
1080
1319
  "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js"(exports, module2) {
1081
1320
  "use strict";
1082
- var os = (0, import_chunk_WWAWV7DQ.__require)("os");
1083
- var onExit = (0, import_chunk_J46BJQHT.require_signal_exit)();
1321
+ var os = (0, import_chunk_2ESYSVXG.__require)("os");
1322
+ var onExit = require_signal_exit();
1084
1323
  var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
1085
1324
  var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
1086
1325
  const killResult = kill(signal);
@@ -1164,7 +1403,7 @@ var require_kill = (0, import_chunk_WWAWV7DQ.__commonJS)({
1164
1403
  };
1165
1404
  }
1166
1405
  });
1167
- var require_is_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1406
+ var require_is_stream = (0, import_chunk_2ESYSVXG.__commonJS)({
1168
1407
  "../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports, module2) {
1169
1408
  "use strict";
1170
1409
  var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
@@ -1175,10 +1414,10 @@ var require_is_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1175
1414
  module2.exports = isStream;
1176
1415
  }
1177
1416
  });
1178
- var require_buffer_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1417
+ var require_buffer_stream = (0, import_chunk_2ESYSVXG.__commonJS)({
1179
1418
  "../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(exports, module2) {
1180
1419
  "use strict";
1181
- var { PassThrough: PassThroughStream } = (0, import_chunk_WWAWV7DQ.__require)("stream");
1420
+ var { PassThrough: PassThroughStream } = (0, import_chunk_2ESYSVXG.__require)("stream");
1182
1421
  module2.exports = (options) => {
1183
1422
  options = { ...options };
1184
1423
  const { array } = options;
@@ -1218,12 +1457,12 @@ var require_buffer_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1218
1457
  };
1219
1458
  }
1220
1459
  });
1221
- var require_get_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1460
+ var require_get_stream = (0, import_chunk_2ESYSVXG.__commonJS)({
1222
1461
  "../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports, module2) {
1223
1462
  "use strict";
1224
- var { constants: BufferConstants } = (0, import_chunk_WWAWV7DQ.__require)("buffer");
1225
- var stream = (0, import_chunk_WWAWV7DQ.__require)("stream");
1226
- var { promisify } = (0, import_chunk_WWAWV7DQ.__require)("util");
1463
+ var { constants: BufferConstants } = (0, import_chunk_2ESYSVXG.__require)("buffer");
1464
+ var stream = (0, import_chunk_2ESYSVXG.__require)("stream");
1465
+ var { promisify } = (0, import_chunk_2ESYSVXG.__require)("util");
1227
1466
  var bufferStream = require_buffer_stream();
1228
1467
  var streamPipelinePromisified = promisify(stream.pipeline);
1229
1468
  var MaxBufferError = class extends Error {
@@ -1271,10 +1510,10 @@ var require_get_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1271
1510
  module2.exports.MaxBufferError = MaxBufferError;
1272
1511
  }
1273
1512
  });
1274
- var require_merge_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1513
+ var require_merge_stream = (0, import_chunk_2ESYSVXG.__commonJS)({
1275
1514
  "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports, module2) {
1276
1515
  "use strict";
1277
- var { PassThrough } = (0, import_chunk_WWAWV7DQ.__require)("stream");
1516
+ var { PassThrough } = (0, import_chunk_2ESYSVXG.__require)("stream");
1278
1517
  module2.exports = function() {
1279
1518
  var sources = [];
1280
1519
  var output = new PassThrough({ objectMode: true });
@@ -1309,7 +1548,7 @@ var require_merge_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1309
1548
  };
1310
1549
  }
1311
1550
  });
1312
- var require_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1551
+ var require_stream = (0, import_chunk_2ESYSVXG.__commonJS)({
1313
1552
  "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js"(exports, module2) {
1314
1553
  "use strict";
1315
1554
  var isStream = require_is_stream();
@@ -1386,7 +1625,7 @@ var require_stream = (0, import_chunk_WWAWV7DQ.__commonJS)({
1386
1625
  };
1387
1626
  }
1388
1627
  });
1389
- var require_promise = (0, import_chunk_WWAWV7DQ.__commonJS)({
1628
+ var require_promise = (0, import_chunk_2ESYSVXG.__commonJS)({
1390
1629
  "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js"(exports, module2) {
1391
1630
  "use strict";
1392
1631
  var nativePromisePrototype = (async () => {
@@ -1423,7 +1662,7 @@ var require_promise = (0, import_chunk_WWAWV7DQ.__commonJS)({
1423
1662
  };
1424
1663
  }
1425
1664
  });
1426
- var require_command = (0, import_chunk_WWAWV7DQ.__commonJS)({
1665
+ var require_command = (0, import_chunk_2ESYSVXG.__commonJS)({
1427
1666
  "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js"(exports, module2) {
1428
1667
  "use strict";
1429
1668
  var normalizeArgs = (file, args = []) => {
@@ -1466,15 +1705,15 @@ var require_command = (0, import_chunk_WWAWV7DQ.__commonJS)({
1466
1705
  };
1467
1706
  }
1468
1707
  });
1469
- var require_execa = (0, import_chunk_WWAWV7DQ.__commonJS)({
1708
+ var require_execa = (0, import_chunk_2ESYSVXG.__commonJS)({
1470
1709
  "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js"(exports, module2) {
1471
1710
  "use strict";
1472
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
1473
- var childProcess = (0, import_chunk_WWAWV7DQ.__require)("child_process");
1711
+ var path2 = (0, import_chunk_2ESYSVXG.__require)("path");
1712
+ var childProcess = (0, import_chunk_2ESYSVXG.__require)("child_process");
1474
1713
  var crossSpawn = require_cross_spawn();
1475
1714
  var stripFinalNewline = require_strip_final_newline();
1476
1715
  var npmRunPath = require_npm_run_path();
1477
- var onetime = (0, import_chunk_J46BJQHT.require_onetime)();
1716
+ var onetime = require_onetime();
1478
1717
  var makeError = require_error();
1479
1718
  var normalizeStdio = require_stdio();
1480
1719
  var { spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler } = require_kill();
@@ -1692,274 +1931,8 @@ var require_execa = (0, import_chunk_WWAWV7DQ.__commonJS)({
1692
1931
  };
1693
1932
  }
1694
1933
  });
1695
- var require_path_exists = (0, import_chunk_WWAWV7DQ.__commonJS)({
1696
- "../../node_modules/.pnpm/path-exists@3.0.0/node_modules/path-exists/index.js"(exports, module2) {
1697
- "use strict";
1698
- var fs2 = (0, import_chunk_WWAWV7DQ.__require)("fs");
1699
- module2.exports = (fp) => new Promise((resolve) => {
1700
- fs2.access(fp, (err) => {
1701
- resolve(!err);
1702
- });
1703
- });
1704
- module2.exports.sync = (fp) => {
1705
- try {
1706
- fs2.accessSync(fp);
1707
- return true;
1708
- } catch (err) {
1709
- return false;
1710
- }
1711
- };
1712
- }
1713
- });
1714
- var require_p_try = (0, import_chunk_WWAWV7DQ.__commonJS)({
1715
- "../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js"(exports, module2) {
1716
- "use strict";
1717
- var pTry = (fn, ...arguments_) => new Promise((resolve) => {
1718
- resolve(fn(...arguments_));
1719
- });
1720
- module2.exports = pTry;
1721
- module2.exports.default = pTry;
1722
- }
1723
- });
1724
- var require_p_limit = (0, import_chunk_WWAWV7DQ.__commonJS)({
1725
- "../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js"(exports, module2) {
1726
- "use strict";
1727
- var pTry = require_p_try();
1728
- var pLimit = (concurrency) => {
1729
- if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
1730
- return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));
1731
- }
1732
- const queue = [];
1733
- let activeCount = 0;
1734
- const next = () => {
1735
- activeCount--;
1736
- if (queue.length > 0) {
1737
- queue.shift()();
1738
- }
1739
- };
1740
- const run = (fn, resolve, ...args) => {
1741
- activeCount++;
1742
- const result = pTry(fn, ...args);
1743
- resolve(result);
1744
- result.then(next, next);
1745
- };
1746
- const enqueue = (fn, resolve, ...args) => {
1747
- if (activeCount < concurrency) {
1748
- run(fn, resolve, ...args);
1749
- } else {
1750
- queue.push(run.bind(null, fn, resolve, ...args));
1751
- }
1752
- };
1753
- const generator = (fn, ...args) => new Promise((resolve) => enqueue(fn, resolve, ...args));
1754
- Object.defineProperties(generator, {
1755
- activeCount: {
1756
- get: () => activeCount
1757
- },
1758
- pendingCount: {
1759
- get: () => queue.length
1760
- },
1761
- clearQueue: {
1762
- value: () => {
1763
- queue.length = 0;
1764
- }
1765
- }
1766
- });
1767
- return generator;
1768
- };
1769
- module2.exports = pLimit;
1770
- module2.exports.default = pLimit;
1771
- }
1772
- });
1773
- var require_p_locate = (0, import_chunk_WWAWV7DQ.__commonJS)({
1774
- "../../node_modules/.pnpm/p-locate@3.0.0/node_modules/p-locate/index.js"(exports, module2) {
1775
- "use strict";
1776
- var pLimit = require_p_limit();
1777
- var EndError = class extends Error {
1778
- constructor(value) {
1779
- super();
1780
- this.value = value;
1781
- }
1782
- };
1783
- var testElement = (el, tester) => Promise.resolve(el).then(tester);
1784
- var finder = (el) => Promise.all(el).then((val) => val[1] === true && Promise.reject(new EndError(val[0])));
1785
- module2.exports = (iterable, tester, opts) => {
1786
- opts = Object.assign({
1787
- concurrency: Infinity,
1788
- preserveOrder: true
1789
- }, opts);
1790
- const limit = pLimit(opts.concurrency);
1791
- const items = [...iterable].map((el) => [el, limit(testElement, el, tester)]);
1792
- const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity);
1793
- return Promise.all(items.map((el) => checkLimit(finder, el))).then(() => {
1794
- }).catch((err) => err instanceof EndError ? err.value : Promise.reject(err));
1795
- };
1796
- }
1797
- });
1798
- var require_locate_path = (0, import_chunk_WWAWV7DQ.__commonJS)({
1799
- "../../node_modules/.pnpm/locate-path@3.0.0/node_modules/locate-path/index.js"(exports, module2) {
1800
- "use strict";
1801
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
1802
- var pathExists = require_path_exists();
1803
- var pLocate = require_p_locate();
1804
- module2.exports = (iterable, options) => {
1805
- options = Object.assign({
1806
- cwd: process.cwd()
1807
- }, options);
1808
- return pLocate(iterable, (el) => pathExists(path2.resolve(options.cwd, el)), options);
1809
- };
1810
- module2.exports.sync = (iterable, options) => {
1811
- options = Object.assign({
1812
- cwd: process.cwd()
1813
- }, options);
1814
- for (const el of iterable) {
1815
- if (pathExists.sync(path2.resolve(options.cwd, el))) {
1816
- return el;
1817
- }
1818
- }
1819
- };
1820
- }
1821
- });
1822
- var require_find_up = (0, import_chunk_WWAWV7DQ.__commonJS)({
1823
- "../../node_modules/.pnpm/find-up@3.0.0/node_modules/find-up/index.js"(exports, module2) {
1824
- "use strict";
1825
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
1826
- var locatePath = require_locate_path();
1827
- module2.exports = (filename, opts = {}) => {
1828
- const startDir = path2.resolve(opts.cwd || "");
1829
- const { root } = path2.parse(startDir);
1830
- const filenames = [].concat(filename);
1831
- return new Promise((resolve) => {
1832
- (function find(dir) {
1833
- locatePath(filenames, { cwd: dir }).then((file) => {
1834
- if (file) {
1835
- resolve(path2.join(dir, file));
1836
- } else if (dir === root) {
1837
- resolve(null);
1838
- } else {
1839
- find(path2.dirname(dir));
1840
- }
1841
- });
1842
- })(startDir);
1843
- });
1844
- };
1845
- module2.exports.sync = (filename, opts = {}) => {
1846
- let dir = path2.resolve(opts.cwd || "");
1847
- const { root } = path2.parse(dir);
1848
- const filenames = [].concat(filename);
1849
- while (true) {
1850
- const file = locatePath.sync(filenames, { cwd: dir });
1851
- if (file) {
1852
- return path2.join(dir, file);
1853
- }
1854
- if (dir === root) {
1855
- return null;
1856
- }
1857
- dir = path2.dirname(dir);
1858
- }
1859
- };
1860
- }
1861
- });
1862
- var require_pkg_up = (0, import_chunk_WWAWV7DQ.__commonJS)({
1863
- "../../node_modules/.pnpm/pkg-up@3.1.0/node_modules/pkg-up/index.js"(exports, module2) {
1864
- "use strict";
1865
- var findUp = require_find_up();
1866
- module2.exports = async ({ cwd } = {}) => findUp("package.json", { cwd });
1867
- module2.exports.sync = ({ cwd } = {}) => findUp.sync("package.json", { cwd });
1868
- }
1869
- });
1870
- var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)(require_execa());
1871
- var import_pkg_up = (0, import_chunk_WWAWV7DQ.__toESM)(require_pkg_up());
1934
+ var import_execa = (0, import_chunk_2ESYSVXG.__toESM)(require_execa());
1872
1935
  var debug = (0, import_debug.default)("prisma:migrate:seed");
1873
- async function verifySeedConfigAndReturnMessage(schemaPath) {
1874
- const cwd = process.cwd();
1875
- const detected = detectSeedFiles(cwd, schemaPath);
1876
- const prismaConfig = await (0, import_internals.getPrismaConfigFromPackageJson)(cwd);
1877
- if (prismaConfig && prismaConfig.data?.seed) {
1878
- return void 0;
1879
- }
1880
- const packageManager = "npm i -D";
1881
- let message = `${(0, import_chunk_SKRR5WT4.red)(
1882
- 'To configure seeding in your project you need to add a "prisma.seed" property in your package.json with the command to execute it:'
1883
- )}
1884
-
1885
- 1. Open the package.json of your project
1886
- `;
1887
- if (detected.numberOfSeedFiles) {
1888
- await legacyTsNodeScriptWarning();
1889
- message += `2. Add the following example to it:`;
1890
- if (detected.js) {
1891
- message += `
1892
- \`\`\`
1893
- "prisma": {
1894
- "seed": "node ${detected.js}"
1895
- }
1896
- \`\`\`
1897
- `;
1898
- } else if (detected.ts) {
1899
- message += `
1900
- \`\`\`
1901
- "prisma": {
1902
- "seed": "ts-node ${detected.ts}"
1903
- }
1904
- \`\`\`
1905
- If you are using ESM (ECMAScript modules):
1906
- \`\`\`
1907
- "prisma": {
1908
- "seed": "node --loader ts-node/esm ${detected.ts}"
1909
- }
1910
- \`\`\`
1911
-
1912
- 3. Install the required dependencies by running:
1913
- ${(0, import_chunk_SKRR5WT4.green)(`${packageManager} ts-node typescript @types/node`)}
1914
- `;
1915
- } else if (detected.sh) {
1916
- message += `
1917
- \`\`\`
1918
- "prisma": {
1919
- "seed": "${detected.sh}"
1920
- }
1921
- \`\`\`
1922
- And run \`chmod +x ${detected.sh}\` to make it executable.`;
1923
- }
1924
- } else {
1925
- message += `2. Add one of the following examples to your package.json:
1926
-
1927
- ${(0, import_chunk_SKRR5WT4.bold)("TypeScript:")}
1928
- \`\`\`
1929
- "prisma": {
1930
- "seed": "ts-node ./prisma/seed.ts"
1931
- }
1932
- \`\`\`
1933
- If you are using ESM (ECMAScript modules):
1934
- \`\`\`
1935
- "prisma": {
1936
- "seed": "node --loader ts-node/esm ./prisma/seed.ts"
1937
- }
1938
- \`\`\`
1939
-
1940
- And install the required dependencies by running:
1941
- ${packageManager} ts-node typescript @types/node
1942
-
1943
- ${(0, import_chunk_SKRR5WT4.bold)("JavaScript:")}
1944
- \`\`\`
1945
- "prisma": {
1946
- "seed": "node ./prisma/seed.js"
1947
- }
1948
- \`\`\`
1949
-
1950
- ${(0, import_chunk_SKRR5WT4.bold)("Bash:")}
1951
- \`\`\`
1952
- "prisma": {
1953
- "seed": "./prisma/seed.sh"
1954
- }
1955
- \`\`\`
1956
- And run \`chmod +x prisma/seed.sh\` to make it executable.`;
1957
- }
1958
- message += `
1959
- More information in our documentation:
1960
- ${(0, import_internals.link)("https://pris.ly/d/seeding")}`;
1961
- return message;
1962
- }
1963
1936
  async function getSeedCommandFromPackageJson(cwd) {
1964
1937
  const prismaConfig = await (0, import_internals.getPrismaConfigFromPackageJson)(cwd);
1965
1938
  debug({ prismaConfig });
@@ -2007,51 +1980,3 @@ An error occurred while running the seed command:`)));
2007
1980
  }
2008
1981
  return true;
2009
1982
  }
2010
- function detectSeedFiles(cwd, schemaPath) {
2011
- let parentDirectory = import_path.default.relative(cwd, import_path.default.join(cwd, "prisma"));
2012
- if (schemaPath) {
2013
- parentDirectory = import_path.default.relative(cwd, import_path.default.dirname(schemaPath));
2014
- }
2015
- const seedPath = import_path.default.join(parentDirectory, "seed.");
2016
- const detected = {
2017
- seedPath,
2018
- numberOfSeedFiles: 0,
2019
- js: "",
2020
- ts: "",
2021
- sh: ""
2022
- };
2023
- const extensions = ["js", "ts", "sh"];
2024
- for (const extension of extensions) {
2025
- const fullPath = seedPath + extension;
2026
- if (!import_fs.default.existsSync(fullPath)) {
2027
- continue;
2028
- }
2029
- detected[extension] = fullPath;
2030
- detected.numberOfSeedFiles++;
2031
- }
2032
- debug({ detected });
2033
- return detected;
2034
- }
2035
- async function legacyTsNodeScriptWarning() {
2036
- const scripts = await getScriptsFromPackageJson();
2037
- if (scripts?.["ts-node"]) {
2038
- import_internals.logger.warn(
2039
- (0, import_chunk_SKRR5WT4.yellow)(`The "ts-node" script in the package.json is not used anymore since version 3.0 and can now be removed.`)
2040
- );
2041
- }
2042
- return void 0;
2043
- }
2044
- async function getScriptsFromPackageJson(cwd = process.cwd()) {
2045
- try {
2046
- const pkgJsonPath = await (0, import_pkg_up.default)({ cwd });
2047
- if (!pkgJsonPath) {
2048
- return null;
2049
- }
2050
- const pkgJsonString = await import_fs.default.promises.readFile(pkgJsonPath, "utf-8");
2051
- const pkgJson = JSON.parse(pkgJsonString);
2052
- const { "ts-node": tsnode } = pkgJson.scripts;
2053
- return { "ts-node": tsnode };
2054
- } catch {
2055
- return null;
2056
- }
2057
- }