@prisma/migrate 6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.4 → 6.6.0-integration-mcp.1

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 (34) hide show
  1. package/dist/bin.js +14 -14
  2. package/dist/{chunk-EJUXYFV3.js → chunk-BYRRPHGM.js} +206 -3
  3. package/dist/{chunk-CKRN45WP.js → chunk-FJ22R36R.js} +6 -6
  4. package/dist/{chunk-B4SUSDC2.js → chunk-GBMQW4HZ.js} +6 -6
  5. package/dist/{chunk-UWQXMKQO.js → chunk-KF6K4EE5.js} +297 -2135
  6. package/dist/{chunk-O723A5JE.js → chunk-LVDALRAV.js} +6 -6
  7. package/dist/{chunk-L53C3AX3.js → chunk-PPOA6UUS.js} +296 -2134
  8. package/dist/{chunk-TGV6QGEF.js → chunk-QVMYNWAN.js} +191 -37
  9. package/dist/{chunk-5LKIRKDL.js → chunk-XPJHNEKB.js} +12 -12
  10. package/dist/{chunk-QJT4H5N6.js → chunk-ZJ4IDCRR.js} +4 -4
  11. package/dist/commands/DbPull.js +3 -3
  12. package/dist/commands/DbSeed.js +3 -3
  13. package/dist/commands/MigrateDev.js +3 -3
  14. package/dist/commands/MigrateDiff.js +3 -3
  15. package/dist/commands/MigrateReset.js +3 -3
  16. package/dist/index.js +14 -17
  17. package/dist/internals/src/cli/directoryConfig.d.ts +1 -1
  18. package/dist/internals/src/cli/getSchema.d.ts +3 -28
  19. package/dist/internals/src/cli/hashes.d.ts +1 -2
  20. package/dist/internals/src/cli/schemaContext.d.ts +4 -3
  21. package/dist/internals/src/index.d.ts +1 -1
  22. package/dist/migrate/src/index.d.ts +0 -1
  23. package/dist/{multipart-parser-ASKQAOL4-WZ47HU6G.js → multipart-parser-AOASR4DL-AXIJXW2B.js} +702 -228
  24. package/dist/{multipart-parser-QCI3Y5IB.js → multipart-parser-GQA7KJYT.js} +687 -213
  25. package/dist/open-KDTCMDK7.js +530 -0
  26. package/dist/utils/seed.js +3 -3
  27. package/dist/utils/setupCockroach.js +2 -2
  28. package/dist/utils/setupMSSQL.js +21636 -30315
  29. package/dist/utils/setupMongo.js +3327 -834
  30. package/dist/utils/setupPostgres.js +2 -2
  31. package/package.json +8 -8
  32. package/dist/chunk-GKDFIHM2.js +0 -45
  33. package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +0 -10
  34. package/dist/utils/getSchemaPathAndPrint.js +0 -27
package/dist/bin.js CHANGED
@@ -24,33 +24,33 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  ));
25
25
  var import_chunk_NGQA5JTN = require("./chunk-NGQA5JTN.js");
26
26
  var import_chunk_NIKXBMZL = require("./chunk-NIKXBMZL.js");
27
- var import_chunk_O723A5JE = require("./chunk-O723A5JE.js");
27
+ var import_chunk_LVDALRAV = require("./chunk-LVDALRAV.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");
41
- var import_chunk_B4SUSDC2 = require("./chunk-B4SUSDC2.js");
41
+ var import_chunk_GBMQW4HZ = require("./chunk-GBMQW4HZ.js");
42
42
  var import_chunk_LLO7YF56 = require("./chunk-LLO7YF56.js");
43
43
  var import_chunk_HHVLUI3H = require("./chunk-HHVLUI3H.js");
44
- var import_chunk_CKRN45WP = require("./chunk-CKRN45WP.js");
44
+ var import_chunk_FJ22R36R = require("./chunk-FJ22R36R.js");
45
45
  var import_chunk_YBX7R3MT = require("./chunk-YBX7R3MT.js");
46
46
  var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
47
- var import_chunk_5LKIRKDL = require("./chunk-5LKIRKDL.js");
47
+ var import_chunk_XPJHNEKB = require("./chunk-XPJHNEKB.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_UWQXMKQO = require("./chunk-UWQXMKQO.js");
52
- var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
51
+ var import_chunk_KF6K4EE5 = require("./chunk-KF6K4EE5.js");
53
52
  var import_chunk_ZB5NPOJW = require("./chunk-ZB5NPOJW.js");
53
+ var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.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.4";
73
+ var version = "6.6.0-integration-mcp.1";
74
74
  process.on("uncaughtException", (e) => {
75
75
  console.log(e);
76
76
  });
@@ -92,19 +92,19 @@ var args = (0, import_internals.arg)(
92
92
  async function main() {
93
93
  const cli = import_chunk_NGQA5JTN.CLI.new({
94
94
  migrate: import_chunk_LLO7YF56.MigrateCommand.new({
95
- dev: import_chunk_CKRN45WP.MigrateDev.new(),
95
+ dev: import_chunk_FJ22R36R.MigrateDev.new(),
96
96
  status: import_chunk_GKHRL6AR.MigrateStatus.new(),
97
97
  resolve: import_chunk_KN2W5IP7.MigrateResolve.new(),
98
- reset: import_chunk_O723A5JE.MigrateReset.new(),
98
+ reset: import_chunk_LVDALRAV.MigrateReset.new(),
99
99
  deploy: import_chunk_HHVLUI3H.MigrateDeploy.new(),
100
- diff: import_chunk_UWQXMKQO.MigrateDiff.new()
100
+ diff: import_chunk_KF6K4EE5.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
- seed: import_chunk_B4SUSDC2.DbSeed.new()
107
+ seed: import_chunk_GBMQW4HZ.DbSeed.new()
108
108
  })
109
109
  });
110
110
  const { config, error } = await (0, import_config.loadConfigFromFile)({ configFile: args["--config"] });
@@ -16,12 +16,13 @@ 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_EJUXYFV3_exports = {};
20
- __export(chunk_EJUXYFV3_exports, {
19
+ var chunk_BYRRPHGM_exports = {};
20
+ __export(chunk_BYRRPHGM_exports, {
21
21
  require_ms: () => require_ms,
22
+ require_sprintf: () => require_sprintf,
22
23
  require_src: () => require_src
23
24
  });
24
- module.exports = __toCommonJS(chunk_EJUXYFV3_exports);
25
+ module.exports = __toCommonJS(chunk_BYRRPHGM_exports);
25
26
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
26
27
  var require_ms = (0, import_chunk_2ESYSVXG.__commonJS)({
27
28
  "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module2) {
@@ -789,3 +790,205 @@ var require_src = (0, import_chunk_2ESYSVXG.__commonJS)({
789
790
  }
790
791
  }
791
792
  });
793
+ var require_sprintf = (0, import_chunk_2ESYSVXG.__commonJS)({
794
+ "../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js"(exports) {
795
+ "use strict";
796
+ !function() {
797
+ "use strict";
798
+ var re = {
799
+ not_string: /[^s]/,
800
+ not_bool: /[^t]/,
801
+ not_type: /[^T]/,
802
+ not_primitive: /[^v]/,
803
+ number: /[diefg]/,
804
+ numeric_arg: /[bcdiefguxX]/,
805
+ json: /[j]/,
806
+ not_json: /[^j]/,
807
+ text: /^[^\x25]+/,
808
+ modulo: /^\x25{2}/,
809
+ placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
810
+ key: /^([a-z_][a-z_\d]*)/i,
811
+ key_access: /^\.([a-z_][a-z_\d]*)/i,
812
+ index_access: /^\[(\d+)\]/,
813
+ sign: /^[+-]/
814
+ };
815
+ function sprintf(key) {
816
+ return sprintf_format(sprintf_parse(key), arguments);
817
+ }
818
+ function vsprintf(fmt, argv) {
819
+ return sprintf.apply(null, [fmt].concat(argv || []));
820
+ }
821
+ function sprintf_format(parse_tree, argv) {
822
+ var cursor = 1, tree_length = parse_tree.length, arg, output = "", i, k, ph, pad, pad_character, pad_length, is_positive, sign;
823
+ for (i = 0; i < tree_length; i++) {
824
+ if (typeof parse_tree[i] === "string") {
825
+ output += parse_tree[i];
826
+ } else if (typeof parse_tree[i] === "object") {
827
+ ph = parse_tree[i];
828
+ if (ph.keys) {
829
+ arg = argv[cursor];
830
+ for (k = 0; k < ph.keys.length; k++) {
831
+ if (arg == void 0) {
832
+ throw new Error(sprintf('[sprintf] Cannot access property "%s" of undefined value "%s"', ph.keys[k], ph.keys[k - 1]));
833
+ }
834
+ arg = arg[ph.keys[k]];
835
+ }
836
+ } else if (ph.param_no) {
837
+ arg = argv[ph.param_no];
838
+ } else {
839
+ arg = argv[cursor++];
840
+ }
841
+ if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
842
+ arg = arg();
843
+ }
844
+ if (re.numeric_arg.test(ph.type) && (typeof arg !== "number" && isNaN(arg))) {
845
+ throw new TypeError(sprintf("[sprintf] expecting number but found %T", arg));
846
+ }
847
+ if (re.number.test(ph.type)) {
848
+ is_positive = arg >= 0;
849
+ }
850
+ switch (ph.type) {
851
+ case "b":
852
+ arg = parseInt(arg, 10).toString(2);
853
+ break;
854
+ case "c":
855
+ arg = String.fromCharCode(parseInt(arg, 10));
856
+ break;
857
+ case "d":
858
+ case "i":
859
+ arg = parseInt(arg, 10);
860
+ break;
861
+ case "j":
862
+ arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0);
863
+ break;
864
+ case "e":
865
+ arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential();
866
+ break;
867
+ case "f":
868
+ arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg);
869
+ break;
870
+ case "g":
871
+ arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg);
872
+ break;
873
+ case "o":
874
+ arg = (parseInt(arg, 10) >>> 0).toString(8);
875
+ break;
876
+ case "s":
877
+ arg = String(arg);
878
+ arg = ph.precision ? arg.substring(0, ph.precision) : arg;
879
+ break;
880
+ case "t":
881
+ arg = String(!!arg);
882
+ arg = ph.precision ? arg.substring(0, ph.precision) : arg;
883
+ break;
884
+ case "T":
885
+ arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase();
886
+ arg = ph.precision ? arg.substring(0, ph.precision) : arg;
887
+ break;
888
+ case "u":
889
+ arg = parseInt(arg, 10) >>> 0;
890
+ break;
891
+ case "v":
892
+ arg = arg.valueOf();
893
+ arg = ph.precision ? arg.substring(0, ph.precision) : arg;
894
+ break;
895
+ case "x":
896
+ arg = (parseInt(arg, 10) >>> 0).toString(16);
897
+ break;
898
+ case "X":
899
+ arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase();
900
+ break;
901
+ }
902
+ if (re.json.test(ph.type)) {
903
+ output += arg;
904
+ } else {
905
+ if (re.number.test(ph.type) && (!is_positive || ph.sign)) {
906
+ sign = is_positive ? "+" : "-";
907
+ arg = arg.toString().replace(re.sign, "");
908
+ } else {
909
+ sign = "";
910
+ }
911
+ pad_character = ph.pad_char ? ph.pad_char === "0" ? "0" : ph.pad_char.charAt(1) : " ";
912
+ pad_length = ph.width - (sign + arg).length;
913
+ pad = ph.width ? pad_length > 0 ? pad_character.repeat(pad_length) : "" : "";
914
+ output += ph.align ? sign + arg + pad : pad_character === "0" ? sign + pad + arg : pad + sign + arg;
915
+ }
916
+ }
917
+ }
918
+ return output;
919
+ }
920
+ var sprintf_cache = /* @__PURE__ */ Object.create(null);
921
+ function sprintf_parse(fmt) {
922
+ if (sprintf_cache[fmt]) {
923
+ return sprintf_cache[fmt];
924
+ }
925
+ var _fmt = fmt, match, parse_tree = [], arg_names = 0;
926
+ while (_fmt) {
927
+ if ((match = re.text.exec(_fmt)) !== null) {
928
+ parse_tree.push(match[0]);
929
+ } else if ((match = re.modulo.exec(_fmt)) !== null) {
930
+ parse_tree.push("%");
931
+ } else if ((match = re.placeholder.exec(_fmt)) !== null) {
932
+ if (match[2]) {
933
+ arg_names |= 1;
934
+ var field_list = [], replacement_field = match[2], field_match = [];
935
+ if ((field_match = re.key.exec(replacement_field)) !== null) {
936
+ field_list.push(field_match[1]);
937
+ while ((replacement_field = replacement_field.substring(field_match[0].length)) !== "") {
938
+ if ((field_match = re.key_access.exec(replacement_field)) !== null) {
939
+ field_list.push(field_match[1]);
940
+ } else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
941
+ field_list.push(field_match[1]);
942
+ } else {
943
+ throw new SyntaxError("[sprintf] failed to parse named argument key");
944
+ }
945
+ }
946
+ } else {
947
+ throw new SyntaxError("[sprintf] failed to parse named argument key");
948
+ }
949
+ match[2] = field_list;
950
+ } else {
951
+ arg_names |= 2;
952
+ }
953
+ if (arg_names === 3) {
954
+ throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");
955
+ }
956
+ parse_tree.push(
957
+ {
958
+ placeholder: match[0],
959
+ param_no: match[1],
960
+ keys: match[2],
961
+ sign: match[3],
962
+ pad_char: match[4],
963
+ align: match[5],
964
+ width: match[6],
965
+ precision: match[7],
966
+ type: match[8]
967
+ }
968
+ );
969
+ } else {
970
+ throw new SyntaxError("[sprintf] unexpected placeholder");
971
+ }
972
+ _fmt = _fmt.substring(match[0].length);
973
+ }
974
+ return sprintf_cache[fmt] = parse_tree;
975
+ }
976
+ if (typeof exports !== "undefined") {
977
+ exports["sprintf"] = sprintf;
978
+ exports["vsprintf"] = vsprintf;
979
+ }
980
+ if (typeof window !== "undefined") {
981
+ window["sprintf"] = sprintf;
982
+ window["vsprintf"] = vsprintf;
983
+ if (typeof define === "function" && define["amd"]) {
984
+ define(function() {
985
+ return {
986
+ "sprintf": sprintf,
987
+ "vsprintf": vsprintf
988
+ };
989
+ });
990
+ }
991
+ }
992
+ }();
993
+ }
994
+ });
@@ -26,14 +26,14 @@ 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_CKRN45WP_exports = {};
30
- __export(chunk_CKRN45WP_exports, {
29
+ var chunk_FJ22R36R_exports = {};
30
+ __export(chunk_FJ22R36R_exports, {
31
31
  MigrateDev: () => MigrateDev
32
32
  });
33
- module.exports = __toCommonJS(chunk_CKRN45WP_exports);
33
+ module.exports = __toCommonJS(chunk_FJ22R36R_exports);
34
34
  var import_chunk_YBX7R3MT = require("./chunk-YBX7R3MT.js");
35
35
  var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
36
- var import_chunk_5LKIRKDL = require("./chunk-5LKIRKDL.js");
36
+ var import_chunk_XPJHNEKB = require("./chunk-XPJHNEKB.js");
37
37
  var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
38
38
  var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
39
39
  var import_chunk_PDCXVUV3 = require("./chunk-PDCXVUV3.js");
@@ -268,10 +268,10 @@ ${(0, import_chunk_SKRR5WT4.green)("Your database is now in sync with your schem
268
268
  }
269
269
  if (wasDbCreated && !process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
270
270
  try {
271
- const seedCommandFromPkgJson = await (0, import_chunk_5LKIRKDL.getSeedCommandFromPackageJson)(process.cwd());
271
+ const seedCommandFromPkgJson = await (0, import_chunk_XPJHNEKB.getSeedCommandFromPackageJson)(process.cwd());
272
272
  if (seedCommandFromPkgJson) {
273
273
  process.stdout.write("\n");
274
- const successfulSeeding = await (0, import_chunk_5LKIRKDL.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson });
274
+ const successfulSeeding = await (0, import_chunk_XPJHNEKB.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson });
275
275
  if (successfulSeeding) {
276
276
  process.stdout.write(`
277
277
  ${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.
@@ -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_B4SUSDC2_exports = {};
20
- __export(chunk_B4SUSDC2_exports, {
19
+ var chunk_GBMQW4HZ_exports = {};
20
+ __export(chunk_GBMQW4HZ_exports, {
21
21
  DbSeed: () => DbSeed
22
22
  });
23
- module.exports = __toCommonJS(chunk_B4SUSDC2_exports);
24
- var import_chunk_5LKIRKDL = require("./chunk-5LKIRKDL.js");
23
+ module.exports = __toCommonJS(chunk_GBMQW4HZ_exports);
24
+ var import_chunk_XPJHNEKB = require("./chunk-XPJHNEKB.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");
@@ -214,10 +214,10 @@ ${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db seed -- --arg1 value1 --arg2 va
214
214
  return this.help();
215
215
  }
216
216
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
217
- const seedCommandFromPkgJson = await (0, import_chunk_5LKIRKDL.getSeedCommandFromPackageJson)(process.cwd());
217
+ const seedCommandFromPkgJson = await (0, import_chunk_XPJHNEKB.getSeedCommandFromPackageJson)(process.cwd());
218
218
  if (!seedCommandFromPkgJson) return ``;
219
219
  const extraArgs = args._.join(" ");
220
- const successfulSeeding = await (0, import_chunk_5LKIRKDL.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson, extraArgs });
220
+ const successfulSeeding = await (0, import_chunk_XPJHNEKB.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson, extraArgs });
221
221
  if (successfulSeeding) {
222
222
  return `
223
223
  ${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.`;