@prisma/migrate 6.19.0-integration-engines-6-19-0-30-push-otuqumlrponx-17ff4a7bd0bffdf0b40b58a399869660f7f0e368.1 → 6.19.0-integration-feat-remove-library-engine.4

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 (51) hide show
  1. package/dist/Migrate.js +3 -3
  2. package/dist/bin.js +27 -28
  3. package/dist/{chunk-J33EXHZB.js → chunk-2Z63R7HP.js} +10 -12
  4. package/dist/{chunk-F2XCBEZ4.js → chunk-3VYHMV3C.js} +10 -12
  5. package/dist/{chunk-Z27SI4AV.js → chunk-43R3GFIU.js} +4 -4
  6. package/dist/{chunk-3AKRTEIK.js → chunk-45NSU26W.js} +7 -7
  7. package/dist/{chunk-OP2BDF75.js → chunk-FRY7T46S.js} +10 -11
  8. package/dist/{chunk-O35BTK6Y.js → chunk-JVGKTJYZ.js} +5 -5
  9. package/dist/{chunk-VV4M6AN7.js → chunk-JX2HIV7V.js} +10 -10
  10. package/dist/{chunk-PHXLQVPT.js → chunk-L7EZFBB4.js} +40 -68
  11. package/dist/{chunk-R4IWP35Z.js → chunk-L7EZXEMS.js} +6 -6
  12. package/dist/{chunk-NB4FRYRQ.js → chunk-LNQIFWXN.js} +5 -5
  13. package/dist/{chunk-ZTIS675B.js → chunk-O57XJHDD.js} +64 -76
  14. package/dist/{chunk-BHJMJSM4.js → chunk-PJYHZKCF.js} +6 -6
  15. package/dist/{chunk-6ORQRJLP.js → chunk-QZUMMKCI.js} +16 -47
  16. package/dist/{chunk-VU5BLQUI.js → chunk-T2ACIU5M.js} +14 -8
  17. package/dist/{chunk-7TVX3D4W.js → chunk-TCBZUTEL.js} +27 -65
  18. package/dist/{chunk-TW22Y3AA.js → chunk-URVKYSZJ.js} +7 -7
  19. package/dist/{chunk-D6LYHB65.js → chunk-V5D5NSLS.js} +33 -25
  20. package/dist/{chunk-D4TRX77Y.js → chunk-W2NKGYXF.js} +7 -9
  21. package/dist/{chunk-QVMYNWAN.js → chunk-XA2JOJS2.js} +157 -70
  22. package/dist/commands/DbDrop.js +2 -2
  23. package/dist/commands/DbExecute.js +4 -4
  24. package/dist/commands/DbPull.js +5 -6
  25. package/dist/commands/DbPush.js +4 -4
  26. package/dist/commands/DbSeed.js +3 -3
  27. package/dist/commands/MigrateDeploy.js +4 -4
  28. package/dist/commands/MigrateDev.js +5 -5
  29. package/dist/commands/MigrateDiff.js +4 -4
  30. package/dist/commands/MigrateReset.js +5 -5
  31. package/dist/commands/MigrateResolve.js +4 -4
  32. package/dist/commands/MigrateStatus.js +4 -4
  33. package/dist/index.js +31 -32
  34. package/dist/internals/src/cli/getSchema.d.ts +1 -15
  35. package/dist/migrate/src/Migrate.d.ts +1 -2
  36. package/dist/migrate/src/utils/seed.d.ts +0 -6
  37. package/dist/open-GFNXULGD.js +593 -0
  38. package/dist/utils/getDatabaseVersionSafe.js +4 -4
  39. package/dist/utils/introspectSql.js +4 -4
  40. package/dist/utils/seed.js +2 -3
  41. package/dist/utils/setupCockroach.js +2 -2
  42. package/dist/utils/setupMSSQL.js +30734 -30124
  43. package/dist/utils/setupMongo.js +2048 -768
  44. package/dist/utils/setupPostgres.js +2 -2
  45. package/dist/utils/spinner.js +3 -3
  46. package/package.json +11 -11
  47. package/dist/chunk-RR6BKMNO.js +0 -80
  48. package/dist/migrate/src/utils/replaceOrAddDatasource.d.ts +0 -2
  49. package/dist/migrate/src/utils/replaceOrAddDatasource.test.d.ts +0 -1
  50. package/dist/utils/replaceOrAddDatasource.js +0 -25
  51. package/dist/utils/replaceOrAddDatasource.test.js +0 -207
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_7TVX3D4W_exports = {};
30
- __export(chunk_7TVX3D4W_exports, {
29
+ var chunk_TCBZUTEL_exports = {};
30
+ __export(chunk_TCBZUTEL_exports, {
31
31
  DbExecute: () => DbExecute
32
32
  });
33
- module.exports = __toCommonJS(chunk_7TVX3D4W_exports);
34
- var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
33
+ module.exports = __toCommonJS(chunk_TCBZUTEL_exports);
34
+ var import_chunk_V5D5NSLS = require("./chunk-V5D5NSLS.js");
35
35
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
36
36
  var import_consumers = __toESM(require("node:stream/consumers"));
37
37
  var import_internals = require("@prisma/internals");
@@ -47,9 +47,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Options")}
47
47
  -h, --help Display this help message
48
48
  --config Custom path to your Prisma config file
49
49
 
50
- ${(0, import_chunk_SKRR5WT4.italic)("Datasource input, only 1 must be provided:")}
51
- --url URL of the datasource to run the command on
52
- --schema Path to your Prisma schema file to take the datasource URL from
50
+ Datasource configuration is read from ${(0, import_chunk_SKRR5WT4.italic)("prisma.config.ts")}.
53
51
 
54
52
  ${(0, import_chunk_SKRR5WT4.italic)("Script input, only 1 must be provided:")}
55
53
  --file Path to a file. The content will be sent as the script to be executed
@@ -68,11 +66,11 @@ var DbExecute = class _DbExecute {
68
66
  static help = (0, import_internals.format)(`
69
67
  ${process.platform === "win32" ? "" : "\u{1F4DD} "}Execute native commands to your database
70
68
 
71
- This command takes as input a datasource, using ${(0, import_chunk_SKRR5WT4.green)(`--url`)} or ${(0, import_chunk_SKRR5WT4.green)(`--schema`)} and a script, using ${(0, import_chunk_SKRR5WT4.green)(
69
+ This command takes as input a datasource defined in ${(0, import_chunk_SKRR5WT4.italic)("prisma.config.ts")} and a script, using ${(0, import_chunk_SKRR5WT4.green)(
72
70
  `--stdin`
73
71
  )} or ${(0, import_chunk_SKRR5WT4.green)(`--file`)}.
74
- The input parameters are mutually exclusive, only 1 of each (datasource & script) must be provided.
75
-
72
+ The script input parameters are mutually exclusive, only 1 must be provided.
73
+
76
74
  The output of the command is connector-specific, and is not meant for returning data, but only to report success or failure.
77
75
 
78
76
  On SQL databases, this command takes as input a SQL script.
@@ -82,23 +80,14 @@ ${(0, import_chunk_SKRR5WT4.italic)(`This command is currently not supported on
82
80
 
83
81
  ${helpOptions}
84
82
  ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
85
-
86
- Execute the content of a SQL script file to the datasource URL taken from the schema
87
- ${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db execute
88
- --file ./script.sql \\
89
- --schema schema.prisma
90
83
 
91
- Execute the SQL script from stdin to the datasource URL specified via the \`DATABASE_URL\` environment variable
92
- ${(0, import_chunk_SKRR5WT4.dim)("$")} echo 'TRUNCATE TABLE dev;' | \\
93
- prisma db execute \\
94
- --stdin \\
95
- --url="$DATABASE_URL"
84
+ Execute the content of a SQL script file using the datasource configured in prisma.config.ts
85
+ ${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db execute --file ./script.sql
96
86
 
97
- Like previous example, but exposing the datasource url credentials to your terminal history
87
+ Execute the SQL script from stdin using the configured datasource
98
88
  ${(0, import_chunk_SKRR5WT4.dim)("$")} echo 'TRUNCATE TABLE dev;' | \\
99
89
  prisma db execute \\
100
- --stdin \\
101
- --url="mysql://root:root@localhost/mydb"
90
+ --stdin
102
91
  `);
103
92
  async parse(argv, config) {
104
93
  const args = (0, import_internals.arg)(
@@ -109,8 +98,6 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
109
98
  "--config": String,
110
99
  "--stdin": Boolean,
111
100
  "--file": String,
112
- "--schema": String,
113
- "--url": String,
114
101
  "--telemetry-information": String
115
102
  },
116
103
  false
@@ -121,33 +108,15 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
121
108
  if (args["--help"]) {
122
109
  return this.help();
123
110
  }
124
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false, config });
125
111
  const cmd = "db execute";
126
- (0, import_internals.checkUnsupportedSchemaEngineWasm)({
127
- cmd,
128
- config,
129
- args,
130
- flags: ["--url"]
131
- });
132
112
  if (args["--stdin"] && args["--file"]) {
133
113
  throw new Error(
134
- `--stdin and --file cannot be used at the same time. Only 1 must be provided.
114
+ `--stdin and --file cannot be used at the same time. Only 1 must be provided.
135
115
  See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db execute -h"))}\``
136
116
  );
137
117
  } else if (!args["--stdin"] && !args["--file"]) {
138
118
  throw new Error(
139
119
  `Either --stdin or --file must be provided.
140
- See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db execute -h"))}\``
141
- );
142
- }
143
- if (args["--url"] && args["--schema"]) {
144
- throw new Error(
145
- `--url and --schema cannot be used at the same time. Only 1 must be provided.
146
- See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db execute -h"))}\``
147
- );
148
- } else if (!args["--url"] && !args["--schema"]) {
149
- throw new Error(
150
- `Either --url or --schema must be provided.
151
120
  See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db execute -h"))}\``
152
121
  );
153
122
  }
@@ -167,28 +136,21 @@ See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExec
167
136
  if (args["--stdin"]) {
168
137
  script = await import_consumers.default.text(process.stdin);
169
138
  }
170
- let datasourceType;
171
- if (args["--url"]) {
172
- (0, import_internals.checkUnsupportedDataProxy)({ cmd, urls: [args["--url"]] });
173
- datasourceType = {
174
- tag: "url",
175
- url: args["--url"]
176
- };
177
- } else {
178
- const schemaContext = await (0, import_internals.loadSchemaContext)({
179
- schemaPathFromArg: args["--schema"],
180
- schemaPathFromConfig: config.schema,
181
- schemaEngineConfig: config,
182
- printLoadMessage: false
183
- });
184
- (0, import_internals.checkUnsupportedDataProxy)({ cmd, schemaContext });
185
- datasourceType = {
186
- tag: "schema",
187
- ...(0, import_internals.toSchemasContainer)(schemaContext.schemaFiles),
188
- configDir: schemaContext.primaryDatasourceDirectory
189
- };
139
+ if (config.engine === "js") {
140
+ throw new Error('engine: "js" is not yet supported in `db execute`.');
141
+ }
142
+ if (config.engine !== "classic" || !config.datasource?.url) {
143
+ throw new Error(
144
+ `A datasource URL must be provided via prisma.config.ts.
145
+ See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db execute -h"))}\``
146
+ );
190
147
  }
191
- const migrate = await import_chunk_D6LYHB65.Migrate.setup({ schemaEngineConfig: config, extensions: config["extensions"] });
148
+ (0, import_internals.checkUnsupportedDataProxy)({ cmd, urls: [config.datasource.url] });
149
+ const datasourceType = {
150
+ tag: "url",
151
+ url: config.datasource.url
152
+ };
153
+ const migrate = await import_chunk_V5D5NSLS.Migrate.setup({ schemaEngineConfig: config, extensions: config["extensions"] });
192
154
  try {
193
155
  await migrate.engine.dbExecute({
194
156
  script,
@@ -26,16 +26,16 @@ 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_TW22Y3AA_exports = {};
30
- __export(chunk_TW22Y3AA_exports, {
29
+ var chunk_URVKYSZJ_exports = {};
30
+ __export(chunk_URVKYSZJ_exports, {
31
31
  DbPush: () => DbPush
32
32
  });
33
- module.exports = __toCommonJS(chunk_TW22Y3AA_exports);
33
+ module.exports = __toCommonJS(chunk_URVKYSZJ_exports);
34
34
  var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
35
35
  var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
36
36
  var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
37
37
  var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
38
- var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
38
+ var import_chunk_V5D5NSLS = require("./chunk-V5D5NSLS.js");
39
39
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
40
40
  var import_internals = require("@prisma/internals");
41
41
  var import_prompts = __toESM(require("prompts"));
@@ -91,7 +91,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
91
91
  if (args["--help"]) {
92
92
  return this.help();
93
93
  }
94
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
94
+ (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
95
95
  const schemaContext = await (0, import_internals.loadSchemaContext)({
96
96
  schemaPathFromArg: args["--schema"],
97
97
  schemaPathFromConfig: config.schema,
@@ -106,7 +106,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
106
106
  externalTables: config.tables?.external ?? [],
107
107
  externalEnums: config.enums?.external ?? []
108
108
  };
109
- const migrate = await import_chunk_D6LYHB65.Migrate.setup({
109
+ const migrate = await import_chunk_V5D5NSLS.Migrate.setup({
110
110
  schemaEngineConfig: config,
111
111
  migrationsDirPath,
112
112
  schemaContext,
@@ -233,7 +233,7 @@ ${rocketEmoji}${provider === "mongodb" ? migrationSuccessMongoMessage : migratio
233
233
  );
234
234
  }
235
235
  if (!process.env.PRISMA_MIGRATE_SKIP_GENERATE && !args["--skip-generate"]) {
236
- await migrate.tryToRunGenerate(datasourceInfo);
236
+ await migrate.tryToRunGenerate();
237
237
  }
238
238
  return ``;
239
239
  }
@@ -26,13 +26,13 @@ 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_D6LYHB65_exports = {};
30
- __export(chunk_D6LYHB65_exports, {
29
+ var chunk_V5D5NSLS_exports = {};
30
+ __export(chunk_V5D5NSLS_exports, {
31
31
  Migrate: () => Migrate
32
32
  });
33
- module.exports = __toCommonJS(chunk_D6LYHB65_exports);
33
+ module.exports = __toCommonJS(chunk_V5D5NSLS_exports);
34
+ var import_chunk_JX2HIV7V = require("./chunk-JX2HIV7V.js");
34
35
  var import_chunk_T64SUJ5L = require("./chunk-T64SUJ5L.js");
35
- var import_chunk_VV4M6AN7 = require("./chunk-VV4M6AN7.js");
36
36
  var import_chunk_GGA2F64G = require("./chunk-GGA2F64G.js");
37
37
  var import_chunk_23DZXSTI = require("./chunk-23DZXSTI.js");
38
38
  var import_chunk_22YP3RXZ = require("./chunk-22YP3RXZ.js");
@@ -46,9 +46,11 @@ var import_node_process = __toESM(require("node:process"));
46
46
  var import_node_process2 = __toESM(require("node:process"));
47
47
  var base_exports = {};
48
48
  (0, import_chunk_2ESYSVXG.__export)(base_exports, {
49
+ ConEmu: () => ConEmu,
49
50
  beep: () => beep,
50
51
  clearScreen: () => clearScreen,
51
52
  clearTerminal: () => clearTerminal,
53
+ clearViewport: () => clearViewport,
52
54
  cursorBackward: () => cursorBackward,
53
55
  cursorDown: () => cursorDown,
54
56
  cursorForward: () => cursorForward,
@@ -76,7 +78,8 @@ var base_exports = {};
76
78
  image: () => image,
77
79
  link: () => link,
78
80
  scrollDown: () => scrollDown,
79
- scrollUp: () => scrollUp
81
+ scrollUp: () => scrollUp,
82
+ setCwd: () => setCwd
80
83
  });
81
84
  var isBrowser = globalThis.window?.document !== void 0;
82
85
  var isNode = globalThis.process?.versions?.node !== void 0;
@@ -160,6 +163,7 @@ var eraseScreen = ESC + "2J";
160
163
  var scrollUp = ESC + "S";
161
164
  var scrollDown = ESC + "T";
162
165
  var clearScreen = "\x1Bc";
166
+ var clearViewport = `${eraseScreen}${ESC}H`;
163
167
  var clearTerminal = isWindows2 ? `${eraseScreen}${ESC}0f` : `${eraseScreen}${ESC}3J${ESC}H`;
164
168
  var enterAlternativeScreen = ESC + "?1049h";
165
169
  var exitAlternativeScreen = ESC + "?1049l";
@@ -189,7 +193,8 @@ var image = (data, options = {}) => {
189
193
  if (options.preserveAspectRatio === false) {
190
194
  returnValue += ";preserveAspectRatio=0";
191
195
  }
192
- return returnValue + ":" + Buffer.from(data).toString("base64") + BEL;
196
+ const imageBuffer = Buffer.from(data);
197
+ return returnValue + `;size=${imageBuffer.byteLength}:` + imageBuffer.toString("base64") + BEL;
193
198
  };
194
199
  var iTerm = {
195
200
  setCwd: (cwd = cwdFunction()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
@@ -210,6 +215,10 @@ var iTerm = {
210
215
  return returnValue + BEL;
211
216
  }
212
217
  };
218
+ var ConEmu = {
219
+ setCwd: (cwd = cwdFunction()) => `${OSC}9;9;${cwd}${BEL}`
220
+ };
221
+ var setCwd = (cwd = cwdFunction()) => iTerm.setCwd(cwd) + ConEmu.setCwd(cwd);
213
222
  var ANSI_BACKGROUND_OFFSET = 10;
214
223
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
215
224
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -308,7 +317,7 @@ function assembleStyles() {
308
317
  styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
309
318
  Object.defineProperties(styles, {
310
319
  rgbToAnsi256: {
311
- value: (red, green, blue) => {
320
+ value(red, green, blue) {
312
321
  if (red === green && green === blue) {
313
322
  if (red < 8) {
314
323
  return 16;
@@ -323,7 +332,7 @@ function assembleStyles() {
323
332
  enumerable: false
324
333
  },
325
334
  hexToRgb: {
326
- value: (hex) => {
335
+ value(hex) {
327
336
  const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
328
337
  if (!matches) {
329
338
  return [0, 0, 0];
@@ -348,7 +357,7 @@ function assembleStyles() {
348
357
  enumerable: false
349
358
  },
350
359
  ansi256ToAnsi: {
351
- value: (code) => {
360
+ value(code) {
352
361
  if (code < 8) {
353
362
  return 30 + code;
354
363
  }
@@ -406,14 +415,14 @@ var ANSI_SGR_TERMINATOR = "m";
406
415
  var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
407
416
  var wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
408
417
  var wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
409
- var wordLengths = (string) => string.split(" ").map((character) => (0, import_chunk_VV4M6AN7.stringWidth)(character));
418
+ var wordLengths = (string) => string.split(" ").map((character) => (0, import_chunk_JX2HIV7V.stringWidth)(character));
410
419
  var wrapWord = (rows, word, columns) => {
411
420
  const characters = [...word];
412
421
  let isInsideEscape = false;
413
422
  let isInsideLinkEscape = false;
414
- let visible = (0, import_chunk_VV4M6AN7.stringWidth)((0, import_chunk_VV4M6AN7.stripAnsi)(rows.at(-1)));
423
+ let visible = (0, import_chunk_JX2HIV7V.stringWidth)((0, import_chunk_JX2HIV7V.stripAnsi)(rows.at(-1)));
415
424
  for (const [index, character] of characters.entries()) {
416
- const characterLength = (0, import_chunk_VV4M6AN7.stringWidth)(character);
425
+ const characterLength = (0, import_chunk_JX2HIV7V.stringWidth)(character);
417
426
  if (visible + characterLength <= columns) {
418
427
  rows[rows.length - 1] += character;
419
428
  } else {
@@ -450,7 +459,7 @@ var stringVisibleTrimSpacesRight = (string) => {
450
459
  const words = string.split(" ");
451
460
  let last = words.length;
452
461
  while (last > 0) {
453
- if ((0, import_chunk_VV4M6AN7.stringWidth)(words[last - 1]) > 0) {
462
+ if ((0, import_chunk_JX2HIV7V.stringWidth)(words[last - 1]) > 0) {
454
463
  break;
455
464
  }
456
465
  last--;
@@ -473,7 +482,7 @@ var exec = (string, columns, options = {}) => {
473
482
  if (options.trim !== false) {
474
483
  rows[rows.length - 1] = rows.at(-1).trimStart();
475
484
  }
476
- let rowLength = (0, import_chunk_VV4M6AN7.stringWidth)(rows.at(-1));
485
+ let rowLength = (0, import_chunk_JX2HIV7V.stringWidth)(rows.at(-1));
477
486
  if (index !== 0) {
478
487
  if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
479
488
  rows.push("");
@@ -551,11 +560,12 @@ function isFullwidthCodePoint(codePoint) {
551
560
  if (!Number.isInteger(codePoint)) {
552
561
  return false;
553
562
  }
554
- return (0, import_chunk_VV4M6AN7.eastAsianWidth)(codePoint) === 2;
563
+ return (0, import_chunk_JX2HIV7V.isFullWidth)(codePoint) || (0, import_chunk_JX2HIV7V.isWide)(codePoint);
555
564
  }
556
565
  var ESCAPES2 = /* @__PURE__ */ new Set([27, 155]);
557
566
  var CODE_POINT_0 = "0".codePointAt(0);
558
567
  var CODE_POINT_9 = "9".codePointAt(0);
568
+ var MAX_ANSI_SEQUENCE_LENGTH = 19;
559
569
  var endCodesSet = /* @__PURE__ */ new Set();
560
570
  var endCodesMap = /* @__PURE__ */ new Map();
561
571
  for (const [start, end] of ansi_styles_default.codes) {
@@ -589,7 +599,7 @@ function findNumberIndex(string) {
589
599
  return -1;
590
600
  }
591
601
  function parseAnsiCode(string, offset) {
592
- string = string.slice(offset, offset + 19);
602
+ string = string.slice(offset, offset + MAX_ANSI_SEQUENCE_LENGTH);
593
603
  const startIndex = findNumberIndex(string);
594
604
  if (startIndex !== -1) {
595
605
  let endIndex = string.indexOf("m", startIndex);
@@ -617,15 +627,15 @@ function tokenize(string, endCharacter = Number.POSITIVE_INFINITY) {
617
627
  continue;
618
628
  }
619
629
  }
620
- const isFullWidth = isFullwidthCodePoint(codePoint);
630
+ const isFullWidth2 = isFullwidthCodePoint(codePoint);
621
631
  const character = String.fromCodePoint(codePoint);
622
632
  returnValue.push({
623
633
  type: "character",
624
634
  value: character,
625
- isFullWidth
635
+ isFullWidth: isFullWidth2
626
636
  });
627
637
  index += character.length;
628
- visibleCount += isFullWidth ? 2 : character.length;
638
+ visibleCount += isFullWidth2 ? 2 : character.length;
629
639
  if (visibleCount >= endCharacter) {
630
640
  break;
631
641
  }
@@ -687,7 +697,7 @@ var fitToTerminalHeight = (stream, text) => {
687
697
  const terminalHeight = stream.rows ?? defaultTerminalHeight;
688
698
  const lines = text.split("\n");
689
699
  const toRemove = Math.max(0, lines.length - terminalHeight);
690
- return toRemove ? sliceAnsi(text, (0, import_chunk_VV4M6AN7.stripAnsi)(lines.slice(0, toRemove).join("\n")).length + 1) : text;
700
+ return toRemove ? sliceAnsi(text, (0, import_chunk_JX2HIV7V.stripAnsi)(lines.slice(0, toRemove).join("\n")).length + 1) : text;
691
701
  };
692
702
  function createLogUpdate(stream, { showCursor = false } = {}) {
693
703
  let previousLineCount = 0;
@@ -700,7 +710,7 @@ function createLogUpdate(stream, { showCursor = false } = {}) {
700
710
  };
701
711
  const render = (...arguments_) => {
702
712
  if (!showCursor) {
703
- import_chunk_VV4M6AN7.cli_cursor_default.hide();
713
+ import_chunk_JX2HIV7V.cli_cursor_default.hide();
704
714
  }
705
715
  let output = fitToTerminalHeight(stream, arguments_.join(" ") + "\n");
706
716
  const width = getWidth(stream);
@@ -720,7 +730,7 @@ function createLogUpdate(stream, { showCursor = false } = {}) {
720
730
  render.done = () => {
721
731
  reset();
722
732
  if (!showCursor) {
723
- import_chunk_VV4M6AN7.cli_cursor_default.show();
733
+ import_chunk_JX2HIV7V.cli_cursor_default.show();
724
734
  }
725
735
  };
726
736
  return render;
@@ -874,9 +884,8 @@ var Migrate = class _Migrate {
874
884
  unexecutable
875
885
  };
876
886
  }
877
- async tryToRunGenerate(datasourceInfo) {
887
+ async tryToRunGenerate() {
878
888
  if (!this.schemaContext) throw new Error("this.schemaContext is undefined");
879
- const skipEngines = (0, import_internals.isPrismaPostgres)(datasourceInfo.url);
880
889
  const message = [];
881
890
  process.stdout.write("\n");
882
891
  log_update_default(`Running generate... ${(0, import_chunk_SKRR5WT4.dim)("(Use --skip-generate to skip the generators)")}`);
@@ -884,7 +893,6 @@ var Migrate = class _Migrate {
884
893
  schemaContext: this.schemaContext,
885
894
  printDownloadProgress: true,
886
895
  version: import_engines_version.enginesVersion,
887
- noEngine: skipEngines,
888
896
  registry: import_client_generator_registry.defaultRegistry.toInternal()
889
897
  });
890
898
  for (const generator of generators) {
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_D4TRX77Y_exports = {};
20
- __export(chunk_D4TRX77Y_exports, {
19
+ var chunk_W2NKGYXF_exports = {};
20
+ __export(chunk_W2NKGYXF_exports, {
21
21
  DbSeed: () => DbSeed
22
22
  });
23
- module.exports = __toCommonJS(chunk_D4TRX77Y_exports);
24
- var import_chunk_PHXLQVPT = require("./chunk-PHXLQVPT.js");
23
+ module.exports = __toCommonJS(chunk_W2NKGYXF_exports);
24
+ var import_chunk_L7EZFBB4 = require("./chunk-L7EZFBB4.js");
25
25
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
26
26
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
27
27
  var import_internals = require("@prisma/internals");
@@ -213,13 +213,11 @@ ${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db seed -- --arg1 value1 --arg2 va
213
213
  if (args["--help"]) {
214
214
  return this.help();
215
215
  }
216
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
217
- const seedCommandFromPrismaConfig = config.migrations?.seed;
218
- const seedCommandFromPkgJson = await (0, import_chunk_PHXLQVPT.getSeedCommandFromPackageJson)(process.cwd());
219
- const seedCommand = seedCommandFromPrismaConfig ?? seedCommandFromPkgJson;
216
+ (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
217
+ const seedCommand = config.migrations?.seed;
220
218
  if (!seedCommand) return ``;
221
219
  const extraArgs = args._.join(" ");
222
- const successfulSeeding = await (0, import_chunk_PHXLQVPT.executeSeedCommand)({ commandFromConfig: seedCommand, extraArgs });
220
+ const successfulSeeding = await (0, import_chunk_L7EZFBB4.executeSeedCommand)({ commandFromConfig: seedCommand, extraArgs });
223
221
  if (successfulSeeding) {
224
222
  return `
225
223
  ${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.`;