@prisma/migrate 6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.5 → 6.6.0-integration-mcp.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.
package/dist/bin.js CHANGED
@@ -28,13 +28,13 @@ var import_chunk_O723A5JE = require("./chunk-O723A5JE.js");
28
28
  var import_chunk_KN2W5IP7 = require("./chunk-KN2W5IP7.js");
29
29
  var import_chunk_GKHRL6AR = require("./chunk-GKHRL6AR.js");
30
30
  var import_chunk_GAKKKF5T = require("./chunk-GAKKKF5T.js");
31
- var import_chunk_QJT4H5N6 = require("./chunk-QJT4H5N6.js");
31
+ var import_chunk_ZJ4IDCRR = require("./chunk-ZJ4IDCRR.js");
32
32
  var import_chunk_IINN7QUV = require("./chunk-IINN7QUV.js");
33
- var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
34
33
  var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
35
34
  var import_chunk_RTGQXNX6 = require("./chunk-RTGQXNX6.js");
36
35
  var import_chunk_AI6DH66U = require("./chunk-AI6DH66U.js");
37
36
  var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
37
+ var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
38
38
  var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
39
39
  var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
40
40
  var import_chunk_3PIR4R46 = require("./chunk-3PIR4R46.js");
@@ -48,9 +48,9 @@ var import_chunk_5LKIRKDL = require("./chunk-5LKIRKDL.js");
48
48
  var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
49
49
  var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
50
50
  var import_chunk_2R6DII47 = require("./chunk-2R6DII47.js");
51
- var import_chunk_XPDKMCDT = require("./chunk-XPDKMCDT.js");
51
+ var import_chunk_FOJ77XJL = require("./chunk-FOJ77XJL.js");
52
+ var import_chunk_4RKCE4QB = require("./chunk-4RKCE4QB.js");
52
53
  var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
53
- var import_chunk_ZB5NPOJW = require("./chunk-ZB5NPOJW.js");
54
54
  var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
55
55
  var import_chunk_PDCXVUV3 = require("./chunk-PDCXVUV3.js");
56
56
  var import_chunk_V6PVGSDJ = require("./chunk-V6PVGSDJ.js");
@@ -70,7 +70,7 @@ var import_config = require("@prisma/config");
70
70
  var import_debug = __toESM(require("@prisma/debug"));
71
71
  var import_engines_version = require("@prisma/engines-version");
72
72
  var import_internals = require("@prisma/internals");
73
- var version = "6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.5";
73
+ var version = "6.6.0-integration-mcp.4";
74
74
  process.on("uncaughtException", (e) => {
75
75
  console.log(e);
76
76
  });
@@ -97,11 +97,11 @@ async function main() {
97
97
  resolve: import_chunk_KN2W5IP7.MigrateResolve.new(),
98
98
  reset: import_chunk_O723A5JE.MigrateReset.new(),
99
99
  deploy: import_chunk_HHVLUI3H.MigrateDeploy.new(),
100
- diff: import_chunk_XPDKMCDT.MigrateDiff.new()
100
+ diff: import_chunk_FOJ77XJL.MigrateDiff.new()
101
101
  }),
102
102
  db: import_chunk_EJG7GKM7.DbCommand.new({
103
103
  execute: import_chunk_GAKKKF5T.DbExecute.new(),
104
- pull: import_chunk_QJT4H5N6.DbPull.new(),
104
+ pull: import_chunk_ZJ4IDCRR.DbPull.new(),
105
105
  push: import_chunk_3PIR4R46.DbPush.new(),
106
106
  // drop: DbDrop.new(),
107
107
  seed: import_chunk_B4SUSDC2.DbSeed.new()
@@ -16,11 +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_ZB5NPOJW_exports = {};
20
- __export(chunk_ZB5NPOJW_exports, {
19
+ var chunk_4RKCE4QB_exports = {};
20
+ __export(chunk_4RKCE4QB_exports, {
21
21
  require_clean: () => require_clean,
22
22
  require_constants: () => require_constants,
23
23
  require_debug: () => require_debug,
24
+ require_function_bind: () => require_function_bind,
24
25
  require_identifiers: () => require_identifiers,
25
26
  require_parse: () => require_parse,
26
27
  require_parse_options: () => require_parse_options,
@@ -28,7 +29,7 @@ __export(chunk_ZB5NPOJW_exports, {
28
29
  require_semver: () => require_semver,
29
30
  require_valid: () => require_valid
30
31
  });
31
- module.exports = __toCommonJS(chunk_ZB5NPOJW_exports);
32
+ module.exports = __toCommonJS(chunk_4RKCE4QB_exports);
32
33
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
33
34
  var require_debug = (0, import_chunk_2ESYSVXG.__commonJS)({
34
35
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/debug.js"(exports, module2) {
@@ -490,3 +491,84 @@ var require_clean = (0, import_chunk_2ESYSVXG.__commonJS)({
490
491
  module2.exports = clean;
491
492
  }
492
493
  });
494
+ var require_implementation = (0, import_chunk_2ESYSVXG.__commonJS)({
495
+ "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module2) {
496
+ "use strict";
497
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
498
+ var toStr = Object.prototype.toString;
499
+ var max = Math.max;
500
+ var funcType = "[object Function]";
501
+ var concatty = function concatty2(a, b) {
502
+ var arr = [];
503
+ for (var i = 0; i < a.length; i += 1) {
504
+ arr[i] = a[i];
505
+ }
506
+ for (var j = 0; j < b.length; j += 1) {
507
+ arr[j + a.length] = b[j];
508
+ }
509
+ return arr;
510
+ };
511
+ var slicy = function slicy2(arrLike, offset) {
512
+ var arr = [];
513
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
514
+ arr[j] = arrLike[i];
515
+ }
516
+ return arr;
517
+ };
518
+ var joiny = function(arr, joiner) {
519
+ var str = "";
520
+ for (var i = 0; i < arr.length; i += 1) {
521
+ str += arr[i];
522
+ if (i + 1 < arr.length) {
523
+ str += joiner;
524
+ }
525
+ }
526
+ return str;
527
+ };
528
+ module2.exports = function bind(that) {
529
+ var target = this;
530
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
531
+ throw new TypeError(ERROR_MESSAGE + target);
532
+ }
533
+ var args = slicy(arguments, 1);
534
+ var bound;
535
+ var binder = function() {
536
+ if (this instanceof bound) {
537
+ var result = target.apply(
538
+ this,
539
+ concatty(args, arguments)
540
+ );
541
+ if (Object(result) === result) {
542
+ return result;
543
+ }
544
+ return this;
545
+ }
546
+ return target.apply(
547
+ that,
548
+ concatty(args, arguments)
549
+ );
550
+ };
551
+ var boundLength = max(0, target.length - args.length);
552
+ var boundArgs = [];
553
+ for (var i = 0; i < boundLength; i++) {
554
+ boundArgs[i] = "$" + i;
555
+ }
556
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
557
+ if (target.prototype) {
558
+ var Empty = function Empty2() {
559
+ };
560
+ Empty.prototype = target.prototype;
561
+ bound.prototype = new Empty();
562
+ Empty.prototype = null;
563
+ }
564
+ return bound;
565
+ };
566
+ }
567
+ });
568
+ var require_function_bind = (0, import_chunk_2ESYSVXG.__commonJS)({
569
+ "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module2) {
570
+ "use strict";
571
+ var implementation = require_implementation();
572
+ module2.exports = Function.prototype.bind || implementation;
573
+ }
574
+ });
@@ -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_XPDKMCDT_exports = {};
30
- __export(chunk_XPDKMCDT_exports, {
29
+ var chunk_FOJ77XJL_exports = {};
30
+ __export(chunk_FOJ77XJL_exports, {
31
31
  MigrateDiff: () => MigrateDiff
32
32
  });
33
- module.exports = __toCommonJS(chunk_XPDKMCDT_exports);
33
+ module.exports = __toCommonJS(chunk_FOJ77XJL_exports);
34
+ var import_chunk_4RKCE4QB = require("./chunk-4RKCE4QB.js");
34
35
  var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
35
- var import_chunk_ZB5NPOJW = require("./chunk-ZB5NPOJW.js");
36
36
  var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
37
37
  var import_chunk_PDCXVUV3 = require("./chunk-PDCXVUV3.js");
38
38
  var import_chunk_V6PVGSDJ = require("./chunk-V6PVGSDJ.js");
@@ -9335,93 +9335,12 @@ var require_lib5 = (0, import_chunk_2ESYSVXG.__commonJS)({
9335
9335
  module2.exports = GitHost;
9336
9336
  }
9337
9337
  });
9338
- var require_implementation = (0, import_chunk_2ESYSVXG.__commonJS)({
9339
- "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module2) {
9340
- "use strict";
9341
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
9342
- var toStr = Object.prototype.toString;
9343
- var max = Math.max;
9344
- var funcType = "[object Function]";
9345
- var concatty = function concatty2(a, b) {
9346
- var arr = [];
9347
- for (var i = 0; i < a.length; i += 1) {
9348
- arr[i] = a[i];
9349
- }
9350
- for (var j = 0; j < b.length; j += 1) {
9351
- arr[j + a.length] = b[j];
9352
- }
9353
- return arr;
9354
- };
9355
- var slicy = function slicy2(arrLike, offset) {
9356
- var arr = [];
9357
- for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
9358
- arr[j] = arrLike[i];
9359
- }
9360
- return arr;
9361
- };
9362
- var joiny = function(arr, joiner) {
9363
- var str = "";
9364
- for (var i = 0; i < arr.length; i += 1) {
9365
- str += arr[i];
9366
- if (i + 1 < arr.length) {
9367
- str += joiner;
9368
- }
9369
- }
9370
- return str;
9371
- };
9372
- module2.exports = function bind2(that) {
9373
- var target = this;
9374
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
9375
- throw new TypeError(ERROR_MESSAGE + target);
9376
- }
9377
- var args = slicy(arguments, 1);
9378
- var bound;
9379
- var binder = function() {
9380
- if (this instanceof bound) {
9381
- var result = target.apply(
9382
- this,
9383
- concatty(args, arguments)
9384
- );
9385
- if (Object(result) === result) {
9386
- return result;
9387
- }
9388
- return this;
9389
- }
9390
- return target.apply(
9391
- that,
9392
- concatty(args, arguments)
9393
- );
9394
- };
9395
- var boundLength = max(0, target.length - args.length);
9396
- var boundArgs = [];
9397
- for (var i = 0; i < boundLength; i++) {
9398
- boundArgs[i] = "$" + i;
9399
- }
9400
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
9401
- if (target.prototype) {
9402
- var Empty = function Empty2() {
9403
- };
9404
- Empty.prototype = target.prototype;
9405
- bound.prototype = new Empty();
9406
- Empty.prototype = null;
9407
- }
9408
- return bound;
9409
- };
9410
- }
9411
- });
9412
- var require_function_bind = (0, import_chunk_2ESYSVXG.__commonJS)({
9413
- "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module2) {
9414
- "use strict";
9415
- var implementation = require_implementation();
9416
- module2.exports = Function.prototype.bind || implementation;
9417
- }
9418
- });
9419
9338
  var require_hasown = (0, import_chunk_2ESYSVXG.__commonJS)({
9420
9339
  "../../node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(exports, module2) {
9421
9340
  "use strict";
9422
9341
  var call = Function.prototype.call;
9423
9342
  var $hasOwn = Object.prototype.hasOwnProperty;
9424
- var bind2 = require_function_bind();
9343
+ var bind2 = (0, import_chunk_4RKCE4QB.require_function_bind)();
9425
9344
  module2.exports = bind2.call(call, $hasOwn);
9426
9345
  }
9427
9346
  });
@@ -9705,8 +9624,8 @@ var require_typos = (0, import_chunk_2ESYSVXG.__commonJS)({
9705
9624
  var require_fixer = (0, import_chunk_2ESYSVXG.__commonJS)({
9706
9625
  "../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
9707
9626
  "use strict";
9708
- var isValidSemver = (0, import_chunk_ZB5NPOJW.require_valid)();
9709
- var cleanSemver = (0, import_chunk_ZB5NPOJW.require_clean)();
9627
+ var isValidSemver = (0, import_chunk_4RKCE4QB.require_valid)();
9628
+ var cleanSemver = (0, import_chunk_4RKCE4QB.require_clean)();
9710
9629
  var validateLicense = require_validate_npm_package_license();
9711
9630
  var hostedGitInfo = require_lib5();
9712
9631
  var isBuiltinModule = require_is_core_module();
@@ -10252,7 +10171,7 @@ var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
10252
10171
  "../internals/package.json"(exports, module2) {
10253
10172
  module2.exports = {
10254
10173
  name: "@prisma/internals",
10255
- version: "6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.5",
10174
+ version: "6.6.0-integration-mcp.4",
10256
10175
  description: "This package is intended for Prisma's internal use",
10257
10176
  main: "dist/index.js",
10258
10177
  types: "dist/index.d.ts",
@@ -10339,7 +10258,7 @@ var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
10339
10258
  "@prisma/generator": "workspace:*",
10340
10259
  "@prisma/generator-helper": "workspace:*",
10341
10260
  "@prisma/get-platform": "workspace:*",
10342
- "@prisma/prisma-schema-wasm": "6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04",
10261
+ "@prisma/prisma-schema-wasm": "6.6.0-26.47cb872770bc2c9ff45909bd09f7326df36d9130",
10343
10262
  "@prisma/schema-files-loader": "workspace:*",
10344
10263
  arg: "5.0.2",
10345
10264
  prompts: "2.4.2"
@@ -10985,15 +10904,16 @@ function renderLookupError(error) {
10985
10904
  function renderDefaultLookupError(error, cwd) {
10986
10905
  const parts = [
10987
10906
  `Could not find Prisma Schema that is required for this command.`,
10988
- `You can either provide it with ${(0, import_chunk_SKRR5WT4.green)(
10989
- "`--schema`"
10990
- )} argument, set it as \`prisma.schema\` in your package.json or put it into the default location.`,
10907
+ `You can either provide it with ${(0, import_chunk_SKRR5WT4.green)("`--schema`")} argument,`,
10908
+ `set it in your ${(0, import_chunk_SKRR5WT4.green)("`prisma.config.ts`")},`,
10909
+ `set it as ${(0, import_chunk_SKRR5WT4.green)("`prisma.schema`")} in your ${(0, import_chunk_SKRR5WT4.green)("package.json")},`,
10910
+ `or put it into the default location (${(0, import_chunk_SKRR5WT4.green)("`./prisma/schema.prisma`")}, or ${(0, import_chunk_SKRR5WT4.green)("`./schema.prisma`")}.`,
10991
10911
  "Checked following paths:\n"
10992
10912
  ];
10993
10913
  const printedPaths = /* @__PURE__ */ new Set();
10994
10914
  for (const failure of error.failures) {
10995
- const filePath = failure.rule.schemaPath.path;
10996
- if (!printedPaths.has(failure.rule.schemaPath.path)) {
10915
+ const filePath = failure.path;
10916
+ if (!printedPaths.has(failure.path)) {
10997
10917
  parts.push(`${import_path2.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
10998
10918
  printedPaths.add(filePath);
10999
10919
  }
@@ -11019,21 +10939,13 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
11019
10939
  error: { kind: "PrismaConfigNotConfigured" }
11020
10940
  };
11021
10941
  }
11022
- let schemaResult;
11023
- if (schemaPathFromConfig.kind === "single") {
11024
- schemaResult = await readSchemaFromSingleFile(schemaPathFromConfig.filePath);
11025
- if (!schemaResult.ok) {
11026
- throw new Error(
11027
- `Could not load schema from file \`${schemaPathFromConfig.filePath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
11028
- );
11029
- }
11030
- } else {
11031
- schemaResult = await readSchemaFromDirectory(schemaPathFromConfig.folderPath);
11032
- if (!schemaResult.ok) {
11033
- throw new Error(
11034
- `Could not load schema from folder \`${schemaPathFromConfig.folderPath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
11035
- );
11036
- }
10942
+ const schemaResult = await readSchemaFromFileOrDirectory(schemaPathFromConfig);
10943
+ if (!schemaResult.ok) {
10944
+ throw new Error(
10945
+ `Could not load schema from \`${schemaPathFromConfig}\` provided by "prisma.config.ts"\`: ${renderLookupError(
10946
+ schemaResult.error
10947
+ )}`
10948
+ );
11037
10949
  }
11038
10950
  return schemaResult;
11039
10951
  }
@@ -11068,51 +10980,14 @@ async function getSchemaFromPackageJson(cwd) {
11068
10980
  return lookupResult;
11069
10981
  }
11070
10982
  async function getDefaultSchema(cwd, failures = []) {
11071
- const schemaPrisma = {
11072
- schemaPath: {
11073
- path: import_path2.default.join(cwd, "schema.prisma"),
11074
- kind: "file"
11075
- }
11076
- };
11077
- const prismaSchemaFile = {
11078
- schemaPath: {
11079
- path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
11080
- kind: "file"
11081
- },
11082
- conflictsWith: {
11083
- path: import_path2.default.join(cwd, "prisma", "schema"),
11084
- kind: "directory"
11085
- }
11086
- };
11087
- const prismaSchemaFolder = {
11088
- schemaPath: {
11089
- path: import_path2.default.join(cwd, "prisma", "schema"),
11090
- kind: "directory"
11091
- },
11092
- conflictsWith: {
11093
- path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
11094
- kind: "file"
11095
- }
11096
- };
11097
- const rules = [schemaPrisma, prismaSchemaFile, prismaSchemaFolder];
11098
- for (const rule of rules) {
11099
- debug2(`Checking existence of ${rule.schemaPath.path}`);
11100
- const schema = await loadSchemaFromDefaultLocation(rule.schemaPath);
10983
+ const lookupPaths = [import_path2.default.join(cwd, "schema.prisma"), import_path2.default.join(cwd, "prisma", "schema.prisma")];
10984
+ for (const path7 of lookupPaths) {
10985
+ debug2(`Checking existence of ${path7}`);
10986
+ const schema = await readSchemaFromSingleFile(path7);
11101
10987
  if (!schema.ok) {
11102
- failures.push({ rule, error: schema.error });
10988
+ failures.push({ path: path7, error: schema.error });
11103
10989
  continue;
11104
10990
  }
11105
- if (rule.conflictsWith) {
11106
- const conflictingSchema = await loadSchemaFromDefaultLocation(rule.conflictsWith);
11107
- if (conflictingSchema.ok) {
11108
- throw new Error(
11109
- `Found Prisma Schemas at both \`${import_path2.default.relative(cwd, rule.schemaPath.path)}\` and \`${import_path2.default.relative(
11110
- cwd,
11111
- rule.conflictsWith.path
11112
- )}\`. Please remove one.`
11113
- );
11114
- }
11115
- }
11116
10991
  return schema;
11117
10992
  }
11118
10993
  return {
@@ -11123,14 +10998,6 @@ async function getDefaultSchema(cwd, failures = []) {
11123
10998
  }
11124
10999
  };
11125
11000
  }
11126
- async function loadSchemaFromDefaultLocation(lookupPath) {
11127
- switch (lookupPath.kind) {
11128
- case "file":
11129
- return readSchemaFromSingleFile(lookupPath.path);
11130
- case "directory":
11131
- return readSchemaFromDirectory(lookupPath.path);
11132
- }
11133
- }
11134
11001
  var debug3 = (0, import_debug.default)("prisma:migrate:diff");
11135
11002
  var helpOptions = (0, import_internals.format)(
11136
11003
  `${(0, import_chunk_SKRR5WT4.bold)("Usage")}
@@ -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_L53C3AX3_exports = {};
30
- __export(chunk_L53C3AX3_exports, {
29
+ var chunk_QSSFEJHM_exports = {};
30
+ __export(chunk_QSSFEJHM_exports, {
31
31
  MigrateDiff: () => MigrateDiff
32
32
  });
33
- module.exports = __toCommonJS(chunk_L53C3AX3_exports);
33
+ module.exports = __toCommonJS(chunk_QSSFEJHM_exports);
34
+ var import_chunk_4RKCE4QB = require("./chunk-4RKCE4QB.js");
34
35
  var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
35
- var import_chunk_ZB5NPOJW = require("./chunk-ZB5NPOJW.js");
36
36
  var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
37
37
  var import_chunk_PDCXVUV3 = require("./chunk-PDCXVUV3.js");
38
38
  var import_chunk_V6PVGSDJ = require("./chunk-V6PVGSDJ.js");
@@ -9335,93 +9335,12 @@ var require_lib5 = (0, import_chunk_2ESYSVXG.__commonJS)({
9335
9335
  module2.exports = GitHost;
9336
9336
  }
9337
9337
  });
9338
- var require_implementation = (0, import_chunk_2ESYSVXG.__commonJS)({
9339
- "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module2) {
9340
- "use strict";
9341
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
9342
- var toStr = Object.prototype.toString;
9343
- var max = Math.max;
9344
- var funcType = "[object Function]";
9345
- var concatty = function concatty2(a, b) {
9346
- var arr = [];
9347
- for (var i = 0; i < a.length; i += 1) {
9348
- arr[i] = a[i];
9349
- }
9350
- for (var j = 0; j < b.length; j += 1) {
9351
- arr[j + a.length] = b[j];
9352
- }
9353
- return arr;
9354
- };
9355
- var slicy = function slicy2(arrLike, offset) {
9356
- var arr = [];
9357
- for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
9358
- arr[j] = arrLike[i];
9359
- }
9360
- return arr;
9361
- };
9362
- var joiny = function(arr, joiner) {
9363
- var str = "";
9364
- for (var i = 0; i < arr.length; i += 1) {
9365
- str += arr[i];
9366
- if (i + 1 < arr.length) {
9367
- str += joiner;
9368
- }
9369
- }
9370
- return str;
9371
- };
9372
- module2.exports = function bind2(that) {
9373
- var target = this;
9374
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
9375
- throw new TypeError(ERROR_MESSAGE + target);
9376
- }
9377
- var args = slicy(arguments, 1);
9378
- var bound;
9379
- var binder = function() {
9380
- if (this instanceof bound) {
9381
- var result = target.apply(
9382
- this,
9383
- concatty(args, arguments)
9384
- );
9385
- if (Object(result) === result) {
9386
- return result;
9387
- }
9388
- return this;
9389
- }
9390
- return target.apply(
9391
- that,
9392
- concatty(args, arguments)
9393
- );
9394
- };
9395
- var boundLength = max(0, target.length - args.length);
9396
- var boundArgs = [];
9397
- for (var i = 0; i < boundLength; i++) {
9398
- boundArgs[i] = "$" + i;
9399
- }
9400
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
9401
- if (target.prototype) {
9402
- var Empty = function Empty2() {
9403
- };
9404
- Empty.prototype = target.prototype;
9405
- bound.prototype = new Empty();
9406
- Empty.prototype = null;
9407
- }
9408
- return bound;
9409
- };
9410
- }
9411
- });
9412
- var require_function_bind = (0, import_chunk_2ESYSVXG.__commonJS)({
9413
- "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module2) {
9414
- "use strict";
9415
- var implementation = require_implementation();
9416
- module2.exports = Function.prototype.bind || implementation;
9417
- }
9418
- });
9419
9338
  var require_hasown = (0, import_chunk_2ESYSVXG.__commonJS)({
9420
9339
  "../../node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(exports, module2) {
9421
9340
  "use strict";
9422
9341
  var call = Function.prototype.call;
9423
9342
  var $hasOwn = Object.prototype.hasOwnProperty;
9424
- var bind2 = require_function_bind();
9343
+ var bind2 = (0, import_chunk_4RKCE4QB.require_function_bind)();
9425
9344
  module2.exports = bind2.call(call, $hasOwn);
9426
9345
  }
9427
9346
  });
@@ -9705,8 +9624,8 @@ var require_typos = (0, import_chunk_2ESYSVXG.__commonJS)({
9705
9624
  var require_fixer = (0, import_chunk_2ESYSVXG.__commonJS)({
9706
9625
  "../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
9707
9626
  "use strict";
9708
- var isValidSemver = (0, import_chunk_ZB5NPOJW.require_valid)();
9709
- var cleanSemver = (0, import_chunk_ZB5NPOJW.require_clean)();
9627
+ var isValidSemver = (0, import_chunk_4RKCE4QB.require_valid)();
9628
+ var cleanSemver = (0, import_chunk_4RKCE4QB.require_clean)();
9710
9629
  var validateLicense = require_validate_npm_package_license();
9711
9630
  var hostedGitInfo = require_lib5();
9712
9631
  var isBuiltinModule = require_is_core_module();
@@ -10339,7 +10258,7 @@ var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
10339
10258
  "@prisma/generator": "workspace:*",
10340
10259
  "@prisma/generator-helper": "workspace:*",
10341
10260
  "@prisma/get-platform": "workspace:*",
10342
- "@prisma/prisma-schema-wasm": "6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04",
10261
+ "@prisma/prisma-schema-wasm": "6.6.0-26.47cb872770bc2c9ff45909bd09f7326df36d9130",
10343
10262
  "@prisma/schema-files-loader": "workspace:*",
10344
10263
  arg: "5.0.2",
10345
10264
  prompts: "2.4.2"
@@ -10985,15 +10904,16 @@ function renderLookupError(error) {
10985
10904
  function renderDefaultLookupError(error, cwd) {
10986
10905
  const parts = [
10987
10906
  `Could not find Prisma Schema that is required for this command.`,
10988
- `You can either provide it with ${(0, import_chunk_SKRR5WT4.green)(
10989
- "`--schema`"
10990
- )} argument, set it as \`prisma.schema\` in your package.json or put it into the default location.`,
10907
+ `You can either provide it with ${(0, import_chunk_SKRR5WT4.green)("`--schema`")} argument,`,
10908
+ `set it in your ${(0, import_chunk_SKRR5WT4.green)("`prisma.config.ts`")},`,
10909
+ `set it as ${(0, import_chunk_SKRR5WT4.green)("`prisma.schema`")} in your ${(0, import_chunk_SKRR5WT4.green)("package.json")},`,
10910
+ `or put it into the default location (${(0, import_chunk_SKRR5WT4.green)("`./prisma/schema.prisma`")}, or ${(0, import_chunk_SKRR5WT4.green)("`./schema.prisma`")}.`,
10991
10911
  "Checked following paths:\n"
10992
10912
  ];
10993
10913
  const printedPaths = /* @__PURE__ */ new Set();
10994
10914
  for (const failure of error.failures) {
10995
- const filePath = failure.rule.schemaPath.path;
10996
- if (!printedPaths.has(failure.rule.schemaPath.path)) {
10915
+ const filePath = failure.path;
10916
+ if (!printedPaths.has(failure.path)) {
10997
10917
  parts.push(`${import_path2.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
10998
10918
  printedPaths.add(filePath);
10999
10919
  }
@@ -11019,21 +10939,13 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
11019
10939
  error: { kind: "PrismaConfigNotConfigured" }
11020
10940
  };
11021
10941
  }
11022
- let schemaResult;
11023
- if (schemaPathFromConfig.kind === "single") {
11024
- schemaResult = await readSchemaFromSingleFile(schemaPathFromConfig.filePath);
11025
- if (!schemaResult.ok) {
11026
- throw new Error(
11027
- `Could not load schema from file \`${schemaPathFromConfig.filePath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
11028
- );
11029
- }
11030
- } else {
11031
- schemaResult = await readSchemaFromDirectory(schemaPathFromConfig.folderPath);
11032
- if (!schemaResult.ok) {
11033
- throw new Error(
11034
- `Could not load schema from folder \`${schemaPathFromConfig.folderPath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
11035
- );
11036
- }
10942
+ const schemaResult = await readSchemaFromFileOrDirectory(schemaPathFromConfig);
10943
+ if (!schemaResult.ok) {
10944
+ throw new Error(
10945
+ `Could not load schema from \`${schemaPathFromConfig}\` provided by "prisma.config.ts"\`: ${renderLookupError(
10946
+ schemaResult.error
10947
+ )}`
10948
+ );
11037
10949
  }
11038
10950
  return schemaResult;
11039
10951
  }
@@ -11068,51 +10980,14 @@ async function getSchemaFromPackageJson(cwd) {
11068
10980
  return lookupResult;
11069
10981
  }
11070
10982
  async function getDefaultSchema(cwd, failures = []) {
11071
- const schemaPrisma = {
11072
- schemaPath: {
11073
- path: import_path2.default.join(cwd, "schema.prisma"),
11074
- kind: "file"
11075
- }
11076
- };
11077
- const prismaSchemaFile = {
11078
- schemaPath: {
11079
- path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
11080
- kind: "file"
11081
- },
11082
- conflictsWith: {
11083
- path: import_path2.default.join(cwd, "prisma", "schema"),
11084
- kind: "directory"
11085
- }
11086
- };
11087
- const prismaSchemaFolder = {
11088
- schemaPath: {
11089
- path: import_path2.default.join(cwd, "prisma", "schema"),
11090
- kind: "directory"
11091
- },
11092
- conflictsWith: {
11093
- path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
11094
- kind: "file"
11095
- }
11096
- };
11097
- const rules = [schemaPrisma, prismaSchemaFile, prismaSchemaFolder];
11098
- for (const rule of rules) {
11099
- debug2(`Checking existence of ${rule.schemaPath.path}`);
11100
- const schema = await loadSchemaFromDefaultLocation(rule.schemaPath);
10983
+ const lookupPaths = [import_path2.default.join(cwd, "schema.prisma"), import_path2.default.join(cwd, "prisma", "schema.prisma")];
10984
+ for (const path7 of lookupPaths) {
10985
+ debug2(`Checking existence of ${path7}`);
10986
+ const schema = await readSchemaFromSingleFile(path7);
11101
10987
  if (!schema.ok) {
11102
- failures.push({ rule, error: schema.error });
10988
+ failures.push({ path: path7, error: schema.error });
11103
10989
  continue;
11104
10990
  }
11105
- if (rule.conflictsWith) {
11106
- const conflictingSchema = await loadSchemaFromDefaultLocation(rule.conflictsWith);
11107
- if (conflictingSchema.ok) {
11108
- throw new Error(
11109
- `Found Prisma Schemas at both \`${import_path2.default.relative(cwd, rule.schemaPath.path)}\` and \`${import_path2.default.relative(
11110
- cwd,
11111
- rule.conflictsWith.path
11112
- )}\`. Please remove one.`
11113
- );
11114
- }
11115
- }
11116
10991
  return schema;
11117
10992
  }
11118
10993
  return {
@@ -11123,14 +10998,6 @@ async function getDefaultSchema(cwd, failures = []) {
11123
10998
  }
11124
10999
  };
11125
11000
  }
11126
- async function loadSchemaFromDefaultLocation(lookupPath) {
11127
- switch (lookupPath.kind) {
11128
- case "file":
11129
- return readSchemaFromSingleFile(lookupPath.path);
11130
- case "directory":
11131
- return readSchemaFromDirectory(lookupPath.path);
11132
- }
11133
- }
11134
11001
  var debug3 = (0, import_debug.default)("prisma:migrate:diff");
11135
11002
  var helpOptions = (0, import_internals.format)(
11136
11003
  `${(0, import_chunk_SKRR5WT4.bold)("Usage")}