drizzle-kit 0.30.1 → 0.30.2-0a0cdd2

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 (4) hide show
  1. package/api.js +386 -95
  2. package/api.mjs +386 -95
  3. package/bin.cjs +551 -342
  4. package/package.json +1 -1
package/bin.cjs CHANGED
@@ -1628,10 +1628,10 @@ function custom(check2, params = {}, fatal) {
1628
1628
  return ZodAny.create().superRefine((data, ctx) => {
1629
1629
  var _a, _b;
1630
1630
  if (!check2(data)) {
1631
- const p2 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
1632
- const _fatal = (_b = (_a = p2.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
1633
- const p22 = typeof p2 === "string" ? { message: p2 } : p2;
1634
- ctx.addIssue({ code: "custom", ...p22, fatal: _fatal });
1631
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
1632
+ const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
1633
+ const p2 = typeof p === "string" ? { message: p } : p;
1634
+ ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
1635
1635
  }
1636
1636
  });
1637
1637
  return ZodAny.create();
@@ -7829,8 +7829,8 @@ var require_windows = __commonJS({
7829
7829
  return true;
7830
7830
  }
7831
7831
  for (var i2 = 0; i2 < pathext.length; i2++) {
7832
- var p2 = pathext[i2].toLowerCase();
7833
- if (p2 && path5.substr(-p2.length).toLowerCase() === p2) {
7832
+ var p = pathext[i2].toLowerCase();
7833
+ if (p && path5.substr(-p.length).toLowerCase() === p) {
7834
7834
  return true;
7835
7835
  }
7836
7836
  }
@@ -7984,9 +7984,9 @@ var require_lib = __commonJS({
7984
7984
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
7985
7985
  const found = [];
7986
7986
  for (const envPart of pathEnv) {
7987
- const p2 = getPathPart(envPart, cmd);
7987
+ const p = getPathPart(envPart, cmd);
7988
7988
  for (const ext2 of pathExt) {
7989
- const withExt = p2 + ext2;
7989
+ const withExt = p + ext2;
7990
7990
  const is11 = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
7991
7991
  if (is11) {
7992
7992
  if (!opt.all) {
@@ -8008,9 +8008,9 @@ var require_lib = __commonJS({
8008
8008
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
8009
8009
  const found = [];
8010
8010
  for (const pathEnvPart of pathEnv) {
8011
- const p2 = getPathPart(pathEnvPart, cmd);
8011
+ const p = getPathPart(pathEnvPart, cmd);
8012
8012
  for (const ext2 of pathExt) {
8013
- const withExt = p2 + ext2;
8013
+ const withExt = p + ext2;
8014
8014
  const is11 = isexe.sync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
8015
8015
  if (is11) {
8016
8016
  if (!opt.all) {
@@ -9815,11 +9815,11 @@ var require_expand = __commonJS({
9815
9815
  const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
9816
9816
  const walk = (node, parent = {}) => {
9817
9817
  node.queue = [];
9818
- let p2 = parent;
9818
+ let p = parent;
9819
9819
  let q = parent.queue;
9820
- while (p2.type !== "brace" && p2.type !== "root" && p2.parent) {
9821
- p2 = p2.parent;
9822
- q = p2.queue;
9820
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
9821
+ p = p.parent;
9822
+ q = p.queue;
9823
9823
  }
9824
9824
  if (node.invalid || node.dollar) {
9825
9825
  q.push(append(q.pop(), stringify3(node, options)));
@@ -11752,7 +11752,7 @@ var require_picomatch = __commonJS({
11752
11752
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
11753
11753
  picomatch.parse = (pattern, options) => {
11754
11754
  if (Array.isArray(pattern))
11755
- return pattern.map((p2) => picomatch.parse(p2, options));
11755
+ return pattern.map((p) => picomatch.parse(p, options));
11756
11756
  return parse5(pattern, { ...options, fastpaths: false });
11757
11757
  };
11758
11758
  picomatch.scan = (input, options) => scan(input, options);
@@ -11856,7 +11856,7 @@ var require_micromatch = __commonJS({
11856
11856
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
11857
11857
  }
11858
11858
  if (options.nonull === true || options.nullglob === true) {
11859
- return options.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
11859
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
11860
11860
  }
11861
11861
  }
11862
11862
  return matches;
@@ -11887,7 +11887,7 @@ var require_micromatch = __commonJS({
11887
11887
  throw new TypeError(`Expected a string: "${util2.inspect(str)}"`);
11888
11888
  }
11889
11889
  if (Array.isArray(pattern)) {
11890
- return pattern.some((p2) => micromatch.contains(str, p2, options));
11890
+ return pattern.some((p) => micromatch.contains(str, p, options));
11891
11891
  }
11892
11892
  if (typeof pattern === "string") {
11893
11893
  if (isEmptyString(str) || isEmptyString(pattern)) {
@@ -11933,7 +11933,7 @@ var require_micromatch = __commonJS({
11933
11933
  if (typeof str !== "string") {
11934
11934
  throw new TypeError(`Expected a string: "${util2.inspect(str)}"`);
11935
11935
  }
11936
- return [].concat(patterns).every((p2) => picomatch(p2, options)(str));
11936
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
11937
11937
  };
11938
11938
  micromatch.capture = (glob2, input, options) => {
11939
11939
  let posix = utils.isWindows(options);
@@ -13042,7 +13042,7 @@ var require_queue = __commonJS({
13042
13042
  queue.drained = drained;
13043
13043
  return queue;
13044
13044
  function push2(value) {
13045
- var p2 = new Promise(function(resolve2, reject) {
13045
+ var p = new Promise(function(resolve2, reject) {
13046
13046
  pushCb(value, function(err2, result) {
13047
13047
  if (err2) {
13048
13048
  reject(err2);
@@ -13051,11 +13051,11 @@ var require_queue = __commonJS({
13051
13051
  resolve2(result);
13052
13052
  });
13053
13053
  });
13054
- p2.catch(noop3);
13055
- return p2;
13054
+ p.catch(noop3);
13055
+ return p;
13056
13056
  }
13057
13057
  function unshift(value) {
13058
- var p2 = new Promise(function(resolve2, reject) {
13058
+ var p = new Promise(function(resolve2, reject) {
13059
13059
  unshiftCb(value, function(err2, result) {
13060
13060
  if (err2) {
13061
13061
  reject(err2);
@@ -13064,8 +13064,8 @@ var require_queue = __commonJS({
13064
13064
  resolve2(result);
13065
13065
  });
13066
13066
  });
13067
- p2.catch(noop3);
13068
- return p2;
13067
+ p.catch(noop3);
13068
+ return p;
13069
13069
  }
13070
13070
  function drained() {
13071
13071
  if (queue.idle()) {
@@ -13074,13 +13074,13 @@ var require_queue = __commonJS({
13074
13074
  });
13075
13075
  }
13076
13076
  var previousDrain = queue.drain;
13077
- var p2 = new Promise(function(resolve2) {
13077
+ var p = new Promise(function(resolve2) {
13078
13078
  queue.drain = function() {
13079
13079
  previousDrain();
13080
13080
  resolve2();
13081
13081
  };
13082
13082
  });
13083
- return p2;
13083
+ return p;
13084
13084
  }
13085
13085
  }
13086
13086
  module2.exports = fastqueue;
@@ -14586,7 +14586,7 @@ var require_ignore = __commonJS({
14586
14586
  };
14587
14587
  var isNotRelative = (path5) => REGEX_TEST_INVALID_PATH.test(path5);
14588
14588
  checkPath.isNotRelative = isNotRelative;
14589
- checkPath.convert = (p2) => p2;
14589
+ checkPath.convert = (p) => p;
14590
14590
  var Ignore = class {
14591
14591
  constructor({
14592
14592
  ignorecase = true,
@@ -19100,12 +19100,12 @@ var init_file = __esm({
19100
19100
 
19101
19101
  // ../node_modules/.pnpm/formdata-polyfill@4.0.10/node_modules/formdata-polyfill/esm.min.js
19102
19102
  function formDataToBlob(F2, B = fetch_blob_default) {
19103
- var b = `${r()}${r()}`.replace(/\./g, "").slice(-28).padStart(32, "-"), c = [], p2 = `--${b}\r
19103
+ var b = `${r()}${r()}`.replace(/\./g, "").slice(-28).padStart(32, "-"), c = [], p = `--${b}\r
19104
19104
  Content-Disposition: form-data; name="`;
19105
- F2.forEach((v, n) => typeof v == "string" ? c.push(p2 + e(n) + `"\r
19105
+ F2.forEach((v, n) => typeof v == "string" ? c.push(p + e(n) + `"\r
19106
19106
  \r
19107
19107
  ${v.replace(/\r(?!\n)|(?<!\r)\n/g, "\r\n")}\r
19108
- `) : c.push(p2 + e(n) + `"; filename="${e(v.name, 1)}"\r
19108
+ `) : c.push(p + e(n) + `"; filename="${e(v.name, 1)}"\r
19109
19109
  Content-Type: ${v.type || "application/octet-stream"}\r
19110
19110
  \r
19111
19111
  `, v, "\r\n"));
@@ -22205,7 +22205,7 @@ var require_timestamp = __commonJS({
22205
22205
  const sign = str[0];
22206
22206
  const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
22207
22207
  const num = (n) => asBigInt ? BigInt(n) : Number(n);
22208
- const res = parts.replace(/_/g, "").split(":").reduce((res2, p2) => res2 * num(60) + num(p2), num(0));
22208
+ const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
22209
22209
  return sign === "-" ? num(-1) * res : res;
22210
22210
  }
22211
22211
  function stringifySexagesimal(node) {
@@ -26438,19 +26438,19 @@ var require_old = __commonJS({
26438
26438
  splitRootRe = /^[\/]*/;
26439
26439
  }
26440
26440
  var splitRootRe;
26441
- exports2.realpathSync = function realpathSync(p2, cache) {
26442
- p2 = pathModule.resolve(p2);
26443
- if (cache && Object.prototype.hasOwnProperty.call(cache, p2)) {
26444
- return cache[p2];
26441
+ exports2.realpathSync = function realpathSync(p, cache) {
26442
+ p = pathModule.resolve(p);
26443
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
26444
+ return cache[p];
26445
26445
  }
26446
- var original = p2, seenLinks = {}, knownHard = {};
26446
+ var original = p, seenLinks = {}, knownHard = {};
26447
26447
  var pos;
26448
26448
  var current;
26449
26449
  var base;
26450
26450
  var previous;
26451
26451
  start();
26452
26452
  function start() {
26453
- var m2 = splitRootRe.exec(p2);
26453
+ var m2 = splitRootRe.exec(p);
26454
26454
  pos = m2[0].length;
26455
26455
  current = m2[0];
26456
26456
  base = m2[0];
@@ -26460,9 +26460,9 @@ var require_old = __commonJS({
26460
26460
  knownHard[base] = true;
26461
26461
  }
26462
26462
  }
26463
- while (pos < p2.length) {
26463
+ while (pos < p.length) {
26464
26464
  nextPartRe.lastIndex = pos;
26465
- var result = nextPartRe.exec(p2);
26465
+ var result = nextPartRe.exec(p);
26466
26466
  previous = current;
26467
26467
  current += result[0];
26468
26468
  base = previous + result[1];
@@ -26498,30 +26498,30 @@ var require_old = __commonJS({
26498
26498
  if (!isWindows)
26499
26499
  seenLinks[id] = linkTarget;
26500
26500
  }
26501
- p2 = pathModule.resolve(resolvedLink, p2.slice(pos));
26501
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
26502
26502
  start();
26503
26503
  }
26504
26504
  if (cache)
26505
- cache[original] = p2;
26506
- return p2;
26505
+ cache[original] = p;
26506
+ return p;
26507
26507
  };
26508
- exports2.realpath = function realpath(p2, cache, cb) {
26508
+ exports2.realpath = function realpath(p, cache, cb) {
26509
26509
  if (typeof cb !== "function") {
26510
26510
  cb = maybeCallback(cache);
26511
26511
  cache = null;
26512
26512
  }
26513
- p2 = pathModule.resolve(p2);
26514
- if (cache && Object.prototype.hasOwnProperty.call(cache, p2)) {
26515
- return process.nextTick(cb.bind(null, null, cache[p2]));
26513
+ p = pathModule.resolve(p);
26514
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
26515
+ return process.nextTick(cb.bind(null, null, cache[p]));
26516
26516
  }
26517
- var original = p2, seenLinks = {}, knownHard = {};
26517
+ var original = p, seenLinks = {}, knownHard = {};
26518
26518
  var pos;
26519
26519
  var current;
26520
26520
  var base;
26521
26521
  var previous;
26522
26522
  start();
26523
26523
  function start() {
26524
- var m2 = splitRootRe.exec(p2);
26524
+ var m2 = splitRootRe.exec(p);
26525
26525
  pos = m2[0].length;
26526
26526
  current = m2[0];
26527
26527
  base = m2[0];
@@ -26538,13 +26538,13 @@ var require_old = __commonJS({
26538
26538
  }
26539
26539
  }
26540
26540
  function LOOP() {
26541
- if (pos >= p2.length) {
26541
+ if (pos >= p.length) {
26542
26542
  if (cache)
26543
- cache[original] = p2;
26544
- return cb(null, p2);
26543
+ cache[original] = p;
26544
+ return cb(null, p);
26545
26545
  }
26546
26546
  nextPartRe.lastIndex = pos;
26547
- var result = nextPartRe.exec(p2);
26547
+ var result = nextPartRe.exec(p);
26548
26548
  previous = current;
26549
26549
  current += result[0];
26550
26550
  base = previous + result[1];
@@ -26591,7 +26591,7 @@ var require_old = __commonJS({
26591
26591
  gotResolvedLink(resolvedLink);
26592
26592
  }
26593
26593
  function gotResolvedLink(resolvedLink) {
26594
- p2 = pathModule.resolve(resolvedLink, p2.slice(pos));
26594
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
26595
26595
  start();
26596
26596
  }
26597
26597
  };
@@ -26616,31 +26616,31 @@ var require_fs5 = __commonJS({
26616
26616
  function newError(er) {
26617
26617
  return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
26618
26618
  }
26619
- function realpath(p2, cache, cb) {
26619
+ function realpath(p, cache, cb) {
26620
26620
  if (ok) {
26621
- return origRealpath(p2, cache, cb);
26621
+ return origRealpath(p, cache, cb);
26622
26622
  }
26623
26623
  if (typeof cache === "function") {
26624
26624
  cb = cache;
26625
26625
  cache = null;
26626
26626
  }
26627
- origRealpath(p2, cache, function(er, result) {
26627
+ origRealpath(p, cache, function(er, result) {
26628
26628
  if (newError(er)) {
26629
- old.realpath(p2, cache, cb);
26629
+ old.realpath(p, cache, cb);
26630
26630
  } else {
26631
26631
  cb(er, result);
26632
26632
  }
26633
26633
  });
26634
26634
  }
26635
- function realpathSync(p2, cache) {
26635
+ function realpathSync(p, cache) {
26636
26636
  if (ok) {
26637
- return origRealpathSync(p2, cache);
26637
+ return origRealpathSync(p, cache);
26638
26638
  }
26639
26639
  try {
26640
- return origRealpathSync(p2, cache);
26640
+ return origRealpathSync(p, cache);
26641
26641
  } catch (er) {
26642
26642
  if (newError(er)) {
26643
- return old.realpathSync(p2, cache);
26643
+ return old.realpathSync(p, cache);
26644
26644
  } else {
26645
26645
  throw er;
26646
26646
  }
@@ -26754,14 +26754,14 @@ var require_brace_expansion = __commonJS({
26754
26754
  var pre = m2.pre;
26755
26755
  var body = m2.body;
26756
26756
  var post = m2.post;
26757
- var p2 = pre.split(",");
26758
- p2[p2.length - 1] += "{" + body + "}";
26757
+ var p = pre.split(",");
26758
+ p[p.length - 1] += "{" + body + "}";
26759
26759
  var postParts = parseCommaParts(post);
26760
26760
  if (post.length) {
26761
- p2[p2.length - 1] += postParts.shift();
26762
- p2.push.apply(p2, postParts);
26761
+ p[p.length - 1] += postParts.shift();
26762
+ p.push.apply(p, postParts);
26763
26763
  }
26764
- parts.push.apply(parts, p2);
26764
+ parts.push.apply(parts, p);
26765
26765
  return parts;
26766
26766
  }
26767
26767
  function expandTop(str) {
@@ -26816,8 +26816,8 @@ var require_brace_expansion = __commonJS({
26816
26816
  if (n.length === 1) {
26817
26817
  n = expand2(n[0], false).map(embrace);
26818
26818
  if (n.length === 1) {
26819
- return post.map(function(p2) {
26820
- return m2.pre + n[0] + p2;
26819
+ return post.map(function(p) {
26820
+ return m2.pre + n[0] + p;
26821
26821
  });
26822
26822
  }
26823
26823
  }
@@ -26879,12 +26879,12 @@ var require_brace_expansion = __commonJS({
26879
26879
  // ../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js
26880
26880
  var require_minimatch = __commonJS({
26881
26881
  "../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js"(exports2, module2) {
26882
- var minimatch2 = module2.exports = (p2, pattern, options = {}) => {
26882
+ var minimatch2 = module2.exports = (p, pattern, options = {}) => {
26883
26883
  assertValidPattern2(pattern);
26884
26884
  if (!options.nocomment && pattern.charAt(0) === "#") {
26885
26885
  return false;
26886
26886
  }
26887
- return new Minimatch2(pattern, options).match(p2);
26887
+ return new Minimatch2(pattern, options).match(p);
26888
26888
  };
26889
26889
  module2.exports = minimatch2;
26890
26890
  var path5 = require_path2();
@@ -26910,7 +26910,7 @@ var require_minimatch = __commonJS({
26910
26910
  var reSpecials2 = charSet2("().*{}+?[]^$\\!");
26911
26911
  var addPatternStartSet2 = charSet2("[.(");
26912
26912
  var slashSplit = /\/+/;
26913
- minimatch2.filter = (pattern, options = {}) => (p2, i2, list) => minimatch2(p2, pattern, options);
26913
+ minimatch2.filter = (pattern, options = {}) => (p, i2, list) => minimatch2(p, pattern, options);
26914
26914
  var ext2 = (a, b = {}) => {
26915
26915
  const t2 = {};
26916
26916
  Object.keys(a).forEach((k) => t2[k] = a[k]);
@@ -26922,7 +26922,7 @@ var require_minimatch = __commonJS({
26922
26922
  return minimatch2;
26923
26923
  }
26924
26924
  const orig = minimatch2;
26925
- const m2 = (p2, pattern, options) => orig(p2, pattern, ext2(def, options));
26925
+ const m2 = (p, pattern, options) => orig(p, pattern, ext2(def, options));
26926
26926
  m2.Minimatch = class Minimatch extends orig.Minimatch {
26927
26927
  constructor(pattern, options) {
26928
26928
  super(pattern, ext2(def, options));
@@ -27040,13 +27040,13 @@ var require_minimatch = __commonJS({
27040
27040
  this.debug("matchOne", file.length, pattern.length);
27041
27041
  for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
27042
27042
  this.debug("matchOne loop");
27043
- var p2 = pattern[pi];
27043
+ var p = pattern[pi];
27044
27044
  var f3 = file[fi];
27045
- this.debug(pattern, p2, f3);
27046
- if (p2 === false)
27045
+ this.debug(pattern, p, f3);
27046
+ if (p === false)
27047
27047
  return false;
27048
- if (p2 === GLOBSTAR2) {
27049
- this.debug("GLOBSTAR", [pattern, p2, f3]);
27048
+ if (p === GLOBSTAR2) {
27049
+ this.debug("GLOBSTAR", [pattern, p, f3]);
27050
27050
  var fr = fi;
27051
27051
  var pr = pi + 1;
27052
27052
  if (pr === pl) {
@@ -27080,12 +27080,12 @@ var require_minimatch = __commonJS({
27080
27080
  return false;
27081
27081
  }
27082
27082
  var hit;
27083
- if (typeof p2 === "string") {
27084
- hit = f3 === p2;
27085
- this.debug("string match", p2, f3, hit);
27083
+ if (typeof p === "string") {
27084
+ hit = f3 === p;
27085
+ this.debug("string match", p, f3, hit);
27086
27086
  } else {
27087
- hit = f3.match(p2);
27088
- this.debug("pattern match", p2, f3, hit);
27087
+ hit = f3.match(p);
27088
+ this.debug("pattern match", p, f3, hit);
27089
27089
  }
27090
27090
  if (!hit)
27091
27091
  return false;
@@ -27128,7 +27128,7 @@ var require_minimatch = __commonJS({
27128
27128
  let dotTravAllowed = pattern.charAt(0) === ".";
27129
27129
  let dotFileAllowed = options.dot || dotTravAllowed;
27130
27130
  const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
27131
- const subPatternStart = (p2) => p2.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
27131
+ const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
27132
27132
  const clearStateChar = () => {
27133
27133
  if (stateChar) {
27134
27134
  switch (stateChar) {
@@ -27364,15 +27364,15 @@ var require_minimatch = __commonJS({
27364
27364
  const flags = options.nocase ? "i" : "";
27365
27365
  let re = set.map((pattern) => {
27366
27366
  pattern = pattern.map(
27367
- (p2) => typeof p2 === "string" ? regExpEscape2(p2) : p2 === GLOBSTAR2 ? GLOBSTAR2 : p2._src
27368
- ).reduce((set2, p2) => {
27369
- if (!(set2[set2.length - 1] === GLOBSTAR2 && p2 === GLOBSTAR2)) {
27370
- set2.push(p2);
27367
+ (p) => typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR2 ? GLOBSTAR2 : p._src
27368
+ ).reduce((set2, p) => {
27369
+ if (!(set2[set2.length - 1] === GLOBSTAR2 && p === GLOBSTAR2)) {
27370
+ set2.push(p);
27371
27371
  }
27372
27372
  return set2;
27373
27373
  }, []);
27374
- pattern.forEach((p2, i2) => {
27375
- if (p2 !== GLOBSTAR2 || pattern[i2 - 1] === GLOBSTAR2) {
27374
+ pattern.forEach((p, i2) => {
27375
+ if (p !== GLOBSTAR2 || pattern[i2 - 1] === GLOBSTAR2) {
27376
27376
  return;
27377
27377
  }
27378
27378
  if (i2 === 0) {
@@ -27388,7 +27388,7 @@ var require_minimatch = __commonJS({
27388
27388
  pattern[i2 + 1] = GLOBSTAR2;
27389
27389
  }
27390
27390
  });
27391
- return pattern.filter((p2) => p2 !== GLOBSTAR2).join("/");
27391
+ return pattern.filter((p) => p !== GLOBSTAR2).join("/");
27392
27392
  }).join("|");
27393
27393
  re = "^(?:" + re + ")$";
27394
27394
  if (this.negate)
@@ -27641,18 +27641,18 @@ var require_common3 = __commonJS({
27641
27641
  });
27642
27642
  self2.found = all;
27643
27643
  }
27644
- function mark(self2, p2) {
27645
- var abs = makeAbs(self2, p2);
27644
+ function mark(self2, p) {
27645
+ var abs = makeAbs(self2, p);
27646
27646
  var c = self2.cache[abs];
27647
- var m2 = p2;
27647
+ var m2 = p;
27648
27648
  if (c) {
27649
27649
  var isDir = c === "DIR" || Array.isArray(c);
27650
- var slash2 = p2.slice(-1) === "/";
27650
+ var slash2 = p.slice(-1) === "/";
27651
27651
  if (isDir && !slash2)
27652
27652
  m2 += "/";
27653
27653
  else if (!isDir && slash2)
27654
27654
  m2 = m2.slice(0, -1);
27655
- if (m2 !== p2) {
27655
+ if (m2 !== p) {
27656
27656
  var mabs = makeAbs(self2, m2);
27657
27657
  self2.statCache[mabs] = self2.statCache[abs];
27658
27658
  self2.cache[mabs] = self2.cache[abs];
@@ -27738,14 +27738,14 @@ var require_sync7 = __commonJS({
27738
27738
  var self2 = this;
27739
27739
  this.matches.forEach(function(matchset, index5) {
27740
27740
  var set = self2.matches[index5] = /* @__PURE__ */ Object.create(null);
27741
- for (var p2 in matchset) {
27741
+ for (var p in matchset) {
27742
27742
  try {
27743
- p2 = self2._makeAbs(p2);
27744
- var real = rp.realpathSync(p2, self2.realpathCache);
27743
+ p = self2._makeAbs(p);
27744
+ var real = rp.realpathSync(p, self2.realpathCache);
27745
27745
  set[real] = true;
27746
27746
  } catch (er) {
27747
27747
  if (er.syscall === "stat")
27748
- set[self2._makeAbs(p2)] = true;
27748
+ set[self2._makeAbs(p)] = true;
27749
27749
  else
27750
27750
  throw er;
27751
27751
  }
@@ -27776,8 +27776,8 @@ var require_sync7 = __commonJS({
27776
27776
  var read;
27777
27777
  if (prefix2 === null)
27778
27778
  read = ".";
27779
- else if (isAbsolute(prefix2) || isAbsolute(pattern.map(function(p2) {
27780
- return typeof p2 === "string" ? p2 : "[*]";
27779
+ else if (isAbsolute(prefix2) || isAbsolute(pattern.map(function(p) {
27780
+ return typeof p === "string" ? p : "[*]";
27781
27781
  }).join("/"))) {
27782
27782
  if (!prefix2 || !isAbsolute(prefix2))
27783
27783
  prefix2 = "/" + prefix2;
@@ -28035,8 +28035,8 @@ var require_sync7 = __commonJS({
28035
28035
  return false;
28036
28036
  return c;
28037
28037
  };
28038
- GlobSync.prototype._mark = function(p2) {
28039
- return common.mark(this, p2);
28038
+ GlobSync.prototype._mark = function(p) {
28039
+ return common.mark(this, p);
28040
28040
  };
28041
28041
  GlobSync.prototype._makeAbs = function(f3) {
28042
28042
  return common.makeAbs(this, f3);
@@ -28315,13 +28315,13 @@ var require_glob = __commonJS({
28315
28315
  if (n === 0)
28316
28316
  return cb();
28317
28317
  var set = this.matches[index5] = /* @__PURE__ */ Object.create(null);
28318
- found.forEach(function(p2, i2) {
28319
- p2 = self2._makeAbs(p2);
28320
- rp.realpath(p2, self2.realpathCache, function(er, real) {
28318
+ found.forEach(function(p, i2) {
28319
+ p = self2._makeAbs(p);
28320
+ rp.realpath(p, self2.realpathCache, function(er, real) {
28321
28321
  if (!er)
28322
28322
  set[real] = true;
28323
28323
  else if (er.syscall === "stat")
28324
- set[p2] = true;
28324
+ set[p] = true;
28325
28325
  else
28326
28326
  self2.emit("error", er);
28327
28327
  if (--n === 0) {
@@ -28331,8 +28331,8 @@ var require_glob = __commonJS({
28331
28331
  });
28332
28332
  });
28333
28333
  };
28334
- Glob.prototype._mark = function(p2) {
28335
- return common.mark(this, p2);
28334
+ Glob.prototype._mark = function(p) {
28335
+ return common.mark(this, p);
28336
28336
  };
28337
28337
  Glob.prototype._makeAbs = function(f3) {
28338
28338
  return common.makeAbs(this, f3);
@@ -28363,9 +28363,9 @@ var require_glob = __commonJS({
28363
28363
  var pq = this._processQueue.slice(0);
28364
28364
  this._processQueue.length = 0;
28365
28365
  for (var i2 = 0; i2 < pq.length; i2++) {
28366
- var p2 = pq[i2];
28366
+ var p = pq[i2];
28367
28367
  this._processing--;
28368
- this._process(p2[0], p2[1], p2[2], p2[3]);
28368
+ this._process(p[0], p[1], p[2], p[3]);
28369
28369
  }
28370
28370
  }
28371
28371
  }
@@ -28400,8 +28400,8 @@ var require_glob = __commonJS({
28400
28400
  var read;
28401
28401
  if (prefix2 === null)
28402
28402
  read = ".";
28403
- else if (isAbsolute(prefix2) || isAbsolute(pattern.map(function(p2) {
28404
- return typeof p2 === "string" ? p2 : "[*]";
28403
+ else if (isAbsolute(prefix2) || isAbsolute(pattern.map(function(p) {
28404
+ return typeof p === "string" ? p : "[*]";
28405
28405
  }).join("/"))) {
28406
28406
  if (!prefix2 || !isAbsolute(prefix2))
28407
28407
  prefix2 = "/" + prefix2;
@@ -30978,13 +30978,13 @@ var require_node2 = __commonJS({
30978
30978
  function randomIntInRange(low, high) {
30979
30979
  return Math.round(low + Math.random() * (high - low));
30980
30980
  }
30981
- function doQuickSort(ary, comparator, p2, r2) {
30982
- if (p2 < r2) {
30983
- var pivotIndex = randomIntInRange(p2, r2);
30984
- var i2 = p2 - 1;
30981
+ function doQuickSort(ary, comparator, p, r2) {
30982
+ if (p < r2) {
30983
+ var pivotIndex = randomIntInRange(p, r2);
30984
+ var i2 = p - 1;
30985
30985
  swap(ary, pivotIndex, r2);
30986
30986
  var pivot = ary[r2];
30987
- for (var j = p2; j < r2; j++) {
30987
+ for (var j = p; j < r2; j++) {
30988
30988
  if (comparator(ary[j], pivot) <= 0) {
30989
30989
  i2 += 1;
30990
30990
  swap(ary, i2, j);
@@ -30992,7 +30992,7 @@ var require_node2 = __commonJS({
30992
30992
  }
30993
30993
  swap(ary, i2 + 1, j);
30994
30994
  var q = i2 + 1;
30995
- doQuickSort(ary, comparator, p2, q - 1);
30995
+ doQuickSort(ary, comparator, p, q - 1);
30996
30996
  doQuickSort(ary, comparator, q + 1, r2);
30997
30997
  }
30998
30998
  }
@@ -33689,8 +33689,8 @@ var require_node2 = __commonJS({
33689
33689
  }
33690
33690
  function literal(s2) {
33691
33691
  for (const c2 of s2) {
33692
- const p2 = peek();
33693
- if (p2 !== c2) {
33692
+ const p = peek();
33693
+ if (p !== c2) {
33694
33694
  throw invalidChar(read());
33695
33695
  }
33696
33696
  read();
@@ -34204,9 +34204,9 @@ var require_node2 = __commonJS({
34204
34204
  __assign3 = Object.assign || function(t2) {
34205
34205
  for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
34206
34206
  s2 = arguments[i2];
34207
- for (var p2 in s2)
34208
- if (Object.prototype.hasOwnProperty.call(s2, p2))
34209
- t2[p2] = s2[p2];
34207
+ for (var p in s2)
34208
+ if (Object.prototype.hasOwnProperty.call(s2, p))
34209
+ t2[p] = s2[p];
34210
34210
  }
34211
34211
  return t2;
34212
34212
  };
@@ -39042,7 +39042,7 @@ ${withStyle.errorWarning(`We've found duplicated unique constraint names in ${so
39042
39042
  if (typeof column9.default === "string") {
39043
39043
  columnToSet.default = `'${column9.default}'`;
39044
39044
  } else {
39045
- if (sqlTypeLowered === "json") {
39045
+ if (sqlTypeLowered === "json" || Array.isArray(column9.default)) {
39046
39046
  columnToSet.default = `'${JSON.stringify(column9.default)}'`;
39047
39047
  } else if (column9.default instanceof Date) {
39048
39048
  if (sqlTypeLowered === "date") {
@@ -40468,7 +40468,7 @@ var require_difflib = __commonJS({
40468
40468
  return lines;
40469
40469
  }
40470
40470
  _fancyReplace(a, alo, ahi, b, blo, bhi) {
40471
- var aelt, ai, ai1, ai2, atags, belt, bestRatio, besti, bestj, bj, bj1, bj2, btags, cruncher, cutoff, eqi, eqj, i2, j, l, la, lb, len, len1, len2, len3, len4, line, lines, m2, o, p2, q, r2, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, t2, tag;
40471
+ var aelt, ai, ai1, ai2, atags, belt, bestRatio, besti, bestj, bj, bj1, bj2, btags, cruncher, cutoff, eqi, eqj, i2, j, l, la, lb, len, len1, len2, len3, len4, line, lines, m2, o, p, q, r2, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, t2, tag;
40472
40472
  [bestRatio, cutoff] = [0.74, 0.75];
40473
40473
  cruncher = new SequenceMatcher(this.charjunk);
40474
40474
  [eqi, eqj] = [
@@ -40508,8 +40508,8 @@ var require_difflib = __commonJS({
40508
40508
  eqi = null;
40509
40509
  }
40510
40510
  ref5 = this._fancyHelper(a, alo, besti, b, blo, bestj);
40511
- for (p2 = 0, len1 = ref5.length; p2 < len1; p2++) {
40512
- line = ref5[p2];
40511
+ for (p = 0, len1 = ref5.length; p < len1; p++) {
40512
+ line = ref5[p];
40513
40513
  lines.push(line);
40514
40514
  }
40515
40515
  [aelt, belt] = [a[besti], b[bestj]];
@@ -40608,7 +40608,7 @@ var require_difflib = __commonJS({
40608
40608
  return `${beginning},${length}`;
40609
40609
  };
40610
40610
  unifiedDiff = function(a, b, { fromfile, tofile, fromfiledate, tofiledate, n, lineterm } = {}) {
40611
- var file1Range, file2Range, first, fromdate, group, i1, i2, j1, j2, l, last, len, len1, len2, len3, len4, line, lines, m2, o, p2, q, ref, ref1, ref2, ref3, started, tag, todate;
40611
+ var file1Range, file2Range, first, fromdate, group, i1, i2, j1, j2, l, last, len, len1, len2, len3, len4, line, lines, m2, o, p, q, ref, ref1, ref2, ref3, started, tag, todate;
40612
40612
  if (fromfile == null) {
40613
40613
  fromfile = "";
40614
40614
  }
@@ -40655,8 +40655,8 @@ var require_difflib = __commonJS({
40655
40655
  }
40656
40656
  if (tag === "replace" || tag === "delete") {
40657
40657
  ref2 = a.slice(i1, i2);
40658
- for (p2 = 0, len3 = ref2.length; p2 < len3; p2++) {
40659
- line = ref2[p2];
40658
+ for (p = 0, len3 = ref2.length; p < len3; p++) {
40659
+ line = ref2[p];
40660
40660
  lines.push("-" + line);
40661
40661
  }
40662
40662
  }
@@ -40684,7 +40684,7 @@ var require_difflib = __commonJS({
40684
40684
  return `${beginning},${beginning + length - 1}`;
40685
40685
  };
40686
40686
  contextDiff = function(a, b, { fromfile, tofile, fromfiledate, tofiledate, n, lineterm } = {}) {
40687
- var _2, file1Range, file2Range, first, fromdate, group, i1, i2, j1, j2, l, last, len, len1, len2, len3, len4, line, lines, m2, o, p2, prefix2, q, ref, ref1, ref2, started, tag, todate;
40687
+ var _2, file1Range, file2Range, first, fromdate, group, i1, i2, j1, j2, l, last, len, len1, len2, len3, len4, line, lines, m2, o, p, prefix2, q, ref, ref1, ref2, started, tag, todate;
40688
40688
  if (fromfile == null) {
40689
40689
  fromfile = "";
40690
40690
  }
@@ -40747,16 +40747,16 @@ var require_difflib = __commonJS({
40747
40747
  file2Range = _formatRangeContext(first[3], last[4]);
40748
40748
  lines.push(`--- ${file2Range} ----${lineterm}`);
40749
40749
  if (_any(function() {
40750
- var len32, p3, results;
40750
+ var len32, p2, results;
40751
40751
  results = [];
40752
- for (p3 = 0, len32 = group.length; p3 < len32; p3++) {
40753
- [tag, _2, _2, _2, _2] = group[p3];
40752
+ for (p2 = 0, len32 = group.length; p2 < len32; p2++) {
40753
+ [tag, _2, _2, _2, _2] = group[p2];
40754
40754
  results.push(tag === "replace" || tag === "insert");
40755
40755
  }
40756
40756
  return results;
40757
40757
  }())) {
40758
- for (p2 = 0, len3 = group.length; p2 < len3; p2++) {
40759
- [tag, _2, _2, j1, j2] = group[p2];
40758
+ for (p = 0, len3 = group.length; p < len3; p++) {
40759
+ [tag, _2, _2, j1, j2] = group[p];
40760
40760
  if (tag !== "delete") {
40761
40761
  ref2 = b.slice(j1, j2);
40762
40762
  for (q = 0, len4 = ref2.length; q < len4; q++) {
@@ -42597,7 +42597,7 @@ function fromJson(statements, dialect6, action, json2) {
42597
42597
  }).filter((it) => it !== "");
42598
42598
  return result;
42599
42599
  }
42600
- var parseType, Convertor, PgCreateRoleConvertor, PgDropRoleConvertor, PgRenameRoleConvertor, PgAlterRoleConvertor, PgCreatePolicyConvertor, PgDropPolicyConvertor, PgRenamePolicyConvertor, PgAlterPolicyConvertor, PgCreateIndPolicyConvertor, PgDropIndPolicyConvertor, PgRenameIndPolicyConvertor, PgAlterIndPolicyConvertor, PgEnableRlsConvertor, PgDisableRlsConvertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SingleStoreCreateTableConvertor, SQLiteCreateTableConvertor, PgCreateViewConvertor, MySqlCreateViewConvertor, SqliteCreateViewConvertor, PgDropViewConvertor, MySqlDropViewConvertor, SqliteDropViewConvertor, MySqlAlterViewConvertor, PgRenameViewConvertor, MySqlRenameViewConvertor, PgAlterViewSchemaConvertor, PgAlterViewAddWithOptionConvertor, PgAlterViewDropWithOptionConvertor, PgAlterViewAlterTablespaceConvertor, PgAlterViewAlterUsingConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, PgAlterTableAddCheckConstraintConvertor, PgAlterTableDeleteCheckConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, MySqlAlterTableAddCheckConstraintConvertor, SingleStoreAlterTableAddUniqueConstraintConvertor, SingleStoreAlterTableDropUniqueConstraintConvertor, MySqlAlterTableDeleteCheckConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, DropTypeEnumConvertor, AlterTypeAddValueConvertor, AlterTypeSetSchemaConvertor, AlterRenameTypeConvertor, AlterTypeDropValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SingleStoreDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, SingleStoreRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SingleStoreAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SingleStoreAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SingleStoreAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, SingleStoreAlterTableAlterColumnAlterrGeneratedConvertor, SingleStoreAlterTableAddPk, SingleStoreAlterTableDropPk, SingleStoreModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSingleStoreIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SingleStoreDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
42600
+ var parseType, Convertor, PgCreateRoleConvertor, PgDropRoleConvertor, PgRenameRoleConvertor, PgAlterRoleConvertor, PgCreatePolicyConvertor, PgDropPolicyConvertor, PgRenamePolicyConvertor, PgAlterPolicyConvertor, PgCreateIndPolicyConvertor, PgDropIndPolicyConvertor, PgRenameIndPolicyConvertor, PgAlterIndPolicyConvertor, PgEnableRlsConvertor, PgDisableRlsConvertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SingleStoreCreateTableConvertor, SQLiteCreateTableConvertor, PgCreateViewConvertor, MySqlCreateViewConvertor, SqliteCreateViewConvertor, PgDropViewConvertor, MySqlDropViewConvertor, SqliteDropViewConvertor, MySqlAlterViewConvertor, PgRenameViewConvertor, MySqlRenameViewConvertor, PgAlterViewSchemaConvertor, PgAlterViewAddWithOptionConvertor, PgAlterViewDropWithOptionConvertor, PgAlterViewAlterTablespaceConvertor, PgAlterViewAlterUsingConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, PgAlterTableAddCheckConstraintConvertor, PgAlterTableDeleteCheckConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, MySqlAlterTableAddCheckConstraintConvertor, SingleStoreAlterTableAddUniqueConstraintConvertor, SingleStoreAlterTableDropUniqueConstraintConvertor, MySqlAlterTableDeleteCheckConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, DropTypeEnumConvertor, AlterTypeAddValueConvertor, AlterTypeSetSchemaConvertor, AlterRenameTypeConvertor, AlterTypeDropValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SingleStoreDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, SingleStoreRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SingleStoreAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SingleStoreAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SingleStoreAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, SingleStoreAlterTableAlterColumnAlterrGeneratedConvertor, SingleStoreAlterTableAddPk, SingleStoreAlterTableDropPk, SingleStoreModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSingleStoreIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SingleStoreDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, SingleStoreRecreateTableConvertor, convertors;
42601
42601
  var init_sqlgenerator = __esm({
42602
42602
  "src/sqlgenerator.ts"() {
42603
42603
  "use strict";
@@ -42948,7 +42948,7 @@ var init_sqlgenerator = __esm({
42948
42948
  if (typeof compositePKs !== "undefined" && compositePKs.length > 0) {
42949
42949
  statement += ",\n";
42950
42950
  const compositePK5 = SingleStoreSquasher.unsquashPK(compositePKs[0]);
42951
- statement += ` CONSTRAINT \`${st.compositePkName}\` PRIMARY KEY(\`${compositePK5.columns.join(`\`,\``)}\`)`;
42951
+ statement += ` CONSTRAINT \`${compositePK5.name}\` PRIMARY KEY(\`${compositePK5.columns.join(`\`,\``)}\`)`;
42952
42952
  }
42953
42953
  if (typeof uniqueConstraints !== "undefined" && uniqueConstraints.length > 0) {
42954
42954
  for (const uniqueConstraint5 of uniqueConstraints) {
@@ -43532,11 +43532,11 @@ WITH ${withCheckOption} CHECK OPTION` : "";
43532
43532
  const { tableName, schema: schema6, policies } = statement;
43533
43533
  const tableNameWithSchema = schema6 ? `"${schema6}"."${tableName}"` : `"${tableName}"`;
43534
43534
  const dropPolicyConvertor = new PgDropPolicyConvertor();
43535
- const droppedPolicies = (policies == null ? void 0 : policies.map((p2) => {
43535
+ const droppedPolicies = (policies == null ? void 0 : policies.map((p) => {
43536
43536
  return dropPolicyConvertor.convert({
43537
43537
  type: "drop_policy",
43538
43538
  tableName,
43539
- data: action === "push" ? PgSquasher.unsquashPolicyPush(p2) : PgSquasher.unsquashPolicy(p2),
43539
+ data: action === "push" ? PgSquasher.unsquashPolicyPush(p) : PgSquasher.unsquashPolicy(p),
43540
43540
  schema: schema6
43541
43541
  });
43542
43542
  })) ?? [];
@@ -43608,7 +43608,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
43608
43608
  }
43609
43609
  convert(statement) {
43610
43610
  const { tableNameFrom, tableNameTo } = statement;
43611
- return `RENAME TABLE \`${tableNameFrom}\` TO \`${tableNameTo}\`;`;
43611
+ return `ALTER TABLE \`${tableNameFrom}\` RENAME TO \`${tableNameTo}\`;`;
43612
43612
  }
43613
43613
  };
43614
43614
  PgAlterTableRenameColumnConvertor = class extends Convertor {
@@ -43636,7 +43636,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
43636
43636
  }
43637
43637
  convert(statement) {
43638
43638
  const { tableName, oldColumnName, newColumnName } = statement;
43639
- return `ALTER TABLE \`${tableName}\` RENAME COLUMN \`${oldColumnName}\` TO \`${newColumnName}\`;`;
43639
+ return `ALTER TABLE \`${tableName}\` CHANGE \`${oldColumnName}\` \`${newColumnName}\`;`;
43640
43640
  }
43641
43641
  };
43642
43642
  SQLiteAlterTableRenameColumnConvertor = class extends Convertor {
@@ -44764,8 +44764,10 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
44764
44764
  return statement.type === "drop_index" && dialect6 === "postgresql";
44765
44765
  }
44766
44766
  convert(statement) {
44767
+ const { schema: schema6 } = statement;
44767
44768
  const { name } = PgSquasher.unsquashIdx(statement.data);
44768
- return `DROP INDEX "${name}";`;
44769
+ const indexNameWithSchema = schema6 ? `"${schema6}"."${name}"` : `"${name}"`;
44770
+ return `DROP INDEX ${indexNameWithSchema};`;
44769
44771
  }
44770
44772
  };
44771
44773
  PgCreateSchemaConvertor = class extends Convertor {
@@ -44949,10 +44951,52 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
44949
44951
  return sqlStatements;
44950
44952
  }
44951
44953
  };
44954
+ SingleStoreRecreateTableConvertor = class extends Convertor {
44955
+ can(statement, dialect6) {
44956
+ return statement.type === "singlestore_recreate_table" && dialect6 === "singlestore";
44957
+ }
44958
+ convert(statement) {
44959
+ const { tableName, columns, compositePKs, uniqueConstraints } = statement;
44960
+ const columnNames = columns.map((it) => `\`${it.name}\``).join(", ");
44961
+ const newTableName = `__new_${tableName}`;
44962
+ const sqlStatements = [];
44963
+ sqlStatements.push(
44964
+ new SingleStoreCreateTableConvertor().convert({
44965
+ type: "create_table",
44966
+ tableName: newTableName,
44967
+ columns,
44968
+ compositePKs,
44969
+ uniqueConstraints,
44970
+ schema: ""
44971
+ })
44972
+ );
44973
+ sqlStatements.push(
44974
+ `INSERT INTO \`${newTableName}\`(${columnNames}) SELECT ${columnNames} FROM \`${tableName}\`;`
44975
+ );
44976
+ sqlStatements.push(
44977
+ new SingleStoreDropTableConvertor().convert({
44978
+ type: "drop_table",
44979
+ tableName,
44980
+ schema: ""
44981
+ })
44982
+ );
44983
+ sqlStatements.push(
44984
+ new SingleStoreRenameTableConvertor().convert({
44985
+ fromSchema: "",
44986
+ tableNameFrom: newTableName,
44987
+ tableNameTo: tableName,
44988
+ toSchema: "",
44989
+ type: "rename_table"
44990
+ })
44991
+ );
44992
+ return sqlStatements;
44993
+ }
44994
+ };
44952
44995
  convertors = [];
44953
44996
  convertors.push(new PgCreateTableConvertor());
44954
44997
  convertors.push(new MySqlCreateTableConvertor());
44955
44998
  convertors.push(new SingleStoreCreateTableConvertor());
44999
+ convertors.push(new SingleStoreRecreateTableConvertor());
44956
45000
  convertors.push(new SQLiteCreateTableConvertor());
44957
45001
  convertors.push(new SQLiteRecreateTableConvertor());
44958
45002
  convertors.push(new LibSQLRecreateTableConvertor());
@@ -46961,7 +47005,7 @@ var init_jsonStatements = __esm({
46961
47005
  });
46962
47006
 
46963
47007
  // src/statementCombiner.ts
46964
- var prepareLibSQLRecreateTable, prepareSQLiteRecreateTable, libSQLCombineStatements, sqliteCombineStatements;
47008
+ var prepareLibSQLRecreateTable, prepareSQLiteRecreateTable, libSQLCombineStatements, sqliteCombineStatements, prepareSingleStoreRecreateTable, singleStoreCombineStatements;
46965
47009
  var init_statementCombiner = __esm({
46966
47010
  "src/statementCombiner.ts"() {
46967
47011
  "use strict";
@@ -47240,6 +47284,101 @@ var init_statementCombiner = __esm({
47240
47284
  const rest = combinedStatements.filter((it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column");
47241
47285
  return [...renamedTables, ...renamedColumns, ...rest];
47242
47286
  };
47287
+ prepareSingleStoreRecreateTable = (table5) => {
47288
+ const { name, columns, uniqueConstraints, indexes, compositePrimaryKeys } = table5;
47289
+ const composites = Object.values(compositePrimaryKeys);
47290
+ const statements = [
47291
+ {
47292
+ type: "singlestore_recreate_table",
47293
+ tableName: name,
47294
+ columns: Object.values(columns),
47295
+ compositePKs: composites,
47296
+ uniqueConstraints: Object.values(uniqueConstraints)
47297
+ }
47298
+ ];
47299
+ if (Object.keys(indexes).length) {
47300
+ statements.push(...prepareCreateIndexesJson(name, "", indexes));
47301
+ }
47302
+ return statements;
47303
+ };
47304
+ singleStoreCombineStatements = (statements, json2) => {
47305
+ const newStatements = {};
47306
+ for (const statement of statements) {
47307
+ if (statement.type === "alter_table_alter_column_set_type" || statement.type === "alter_table_alter_column_set_notnull" || statement.type === "alter_table_alter_column_drop_notnull" || statement.type === "alter_table_alter_column_drop_autoincrement" || statement.type === "alter_table_alter_column_set_autoincrement" || statement.type === "alter_table_alter_column_drop_pk" || statement.type === "alter_table_alter_column_set_pk" || statement.type === "create_composite_pk" || statement.type === "alter_composite_pk" || statement.type === "delete_composite_pk") {
47308
+ const tableName2 = statement.tableName;
47309
+ const statementsForTable2 = newStatements[tableName2];
47310
+ if (!statementsForTable2) {
47311
+ newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
47312
+ continue;
47313
+ }
47314
+ if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
47315
+ const wasRename = statementsForTable2.some(
47316
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
47317
+ );
47318
+ const preparedStatements = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
47319
+ if (wasRename) {
47320
+ newStatements[tableName2].push(...preparedStatements);
47321
+ } else {
47322
+ newStatements[tableName2] = preparedStatements;
47323
+ }
47324
+ continue;
47325
+ }
47326
+ continue;
47327
+ }
47328
+ if ((statement.type === "alter_table_alter_column_drop_default" || statement.type === "alter_table_alter_column_set_default") && statement.columnNotNull) {
47329
+ const tableName2 = statement.tableName;
47330
+ const statementsForTable2 = newStatements[tableName2];
47331
+ if (!statementsForTable2) {
47332
+ newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
47333
+ continue;
47334
+ }
47335
+ if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
47336
+ const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
47337
+ const preparedStatements = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
47338
+ if (wasRename) {
47339
+ newStatements[tableName2].push(...preparedStatements);
47340
+ } else {
47341
+ newStatements[tableName2] = preparedStatements;
47342
+ }
47343
+ continue;
47344
+ }
47345
+ continue;
47346
+ }
47347
+ if (statement.type === "alter_table_add_column" && statement.column.primaryKey) {
47348
+ const tableName2 = statement.tableName;
47349
+ const statementsForTable2 = newStatements[tableName2];
47350
+ if (!statementsForTable2) {
47351
+ newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
47352
+ continue;
47353
+ }
47354
+ if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
47355
+ const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
47356
+ const preparedStatements = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
47357
+ if (wasRename) {
47358
+ newStatements[tableName2].push(...preparedStatements);
47359
+ } else {
47360
+ newStatements[tableName2] = preparedStatements;
47361
+ }
47362
+ continue;
47363
+ }
47364
+ continue;
47365
+ }
47366
+ const tableName = statement.type === "rename_table" ? statement.tableNameTo : statement.tableName;
47367
+ const statementsForTable = newStatements[tableName];
47368
+ if (!statementsForTable) {
47369
+ newStatements[tableName] = [statement];
47370
+ continue;
47371
+ }
47372
+ if (!statementsForTable.some(({ type }) => type === "singlestore_recreate_table")) {
47373
+ newStatements[tableName].push(statement);
47374
+ }
47375
+ }
47376
+ const combinedStatements = Object.values(newStatements).flat();
47377
+ const renamedTables = combinedStatements.filter((it) => it.type === "rename_table");
47378
+ const renamedColumns = combinedStatements.filter((it) => it.type === "alter_table_rename_column");
47379
+ const rest = combinedStatements.filter((it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column");
47380
+ return [...renamedTables, ...renamedColumns, ...rest];
47381
+ };
47243
47382
  }
47244
47383
  });
47245
47384
 
@@ -49149,7 +49288,7 @@ var init_snapshotsDiffer = __esm({
49149
49288
  return [tableKey2, tableValue];
49150
49289
  }
49151
49290
  );
49152
- const diffResult = applyJsonDiff(tablesPatchedSnap1, json2);
49291
+ const diffResult = applyJsonDiff(columnsPatchedSnap1, json2);
49153
49292
  const typedResult = diffResultSchemeSingleStore.parse(diffResult);
49154
49293
  const jsonStatements = [];
49155
49294
  const jsonCreateIndexesForCreatedTables = createdTables.map((it) => {
@@ -49313,7 +49452,8 @@ var init_snapshotsDiffer = __esm({
49313
49452
  jsonStatements.push(...jsonDropColumnsStatemets);
49314
49453
  jsonStatements.push(...jsonAddedCompositePKs);
49315
49454
  jsonStatements.push(...jsonAlteredUniqueConstraints);
49316
- const sqlStatements = fromJson(jsonStatements, "singlestore");
49455
+ const combinedJsonStatements = singleStoreCombineStatements(jsonStatements, json2);
49456
+ const sqlStatements = fromJson(combinedJsonStatements, "singlestore");
49317
49457
  const uniqueSqlStatements = [];
49318
49458
  sqlStatements.forEach((ss) => {
49319
49459
  if (!uniqueSqlStatements.includes(ss)) {
@@ -49325,7 +49465,7 @@ var init_snapshotsDiffer = __esm({
49325
49465
  });
49326
49466
  const _meta = prepareMigrationMeta([], rTables, rColumns);
49327
49467
  return {
49328
- statements: jsonStatements,
49468
+ statements: combinedJsonStatements,
49329
49469
  sqlStatements: uniqueSqlStatements,
49330
49470
  _meta
49331
49471
  };
@@ -51874,7 +52014,7 @@ var init_migrate = __esm({
51874
52014
  validatedCur,
51875
52015
  "push"
51876
52016
  );
51877
- return { sqlStatements, statements, validatedCur, validatedPrev };
52017
+ return { sqlStatements, statements, squashedPrev, squashedCur };
51878
52018
  } catch (e2) {
51879
52019
  console.error(e2);
51880
52020
  process.exit(1);
@@ -53472,20 +53612,20 @@ var require_range = __commonJS({
53472
53612
  };
53473
53613
  var replaceTilde = (comp, options) => {
53474
53614
  const r2 = options.loose ? re[t2.TILDELOOSE] : re[t2.TILDE];
53475
- return comp.replace(r2, (_2, M, m2, p2, pr) => {
53476
- debug("tilde", comp, _2, M, m2, p2, pr);
53615
+ return comp.replace(r2, (_2, M, m2, p, pr) => {
53616
+ debug("tilde", comp, _2, M, m2, p, pr);
53477
53617
  let ret;
53478
53618
  if (isX(M)) {
53479
53619
  ret = "";
53480
53620
  } else if (isX(m2)) {
53481
53621
  ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
53482
- } else if (isX(p2)) {
53622
+ } else if (isX(p)) {
53483
53623
  ret = `>=${M}.${m2}.0 <${M}.${+m2 + 1}.0-0`;
53484
53624
  } else if (pr) {
53485
53625
  debug("replaceTilde pr", pr);
53486
- ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
53626
+ ret = `>=${M}.${m2}.${p}-${pr} <${M}.${+m2 + 1}.0-0`;
53487
53627
  } else {
53488
- ret = `>=${M}.${m2}.${p2} <${M}.${+m2 + 1}.0-0`;
53628
+ ret = `>=${M}.${m2}.${p} <${M}.${+m2 + 1}.0-0`;
53489
53629
  }
53490
53630
  debug("tilde return", ret);
53491
53631
  return ret;
@@ -53498,14 +53638,14 @@ var require_range = __commonJS({
53498
53638
  debug("caret", comp, options);
53499
53639
  const r2 = options.loose ? re[t2.CARETLOOSE] : re[t2.CARET];
53500
53640
  const z2 = options.includePrerelease ? "-0" : "";
53501
- return comp.replace(r2, (_2, M, m2, p2, pr) => {
53502
- debug("caret", comp, _2, M, m2, p2, pr);
53641
+ return comp.replace(r2, (_2, M, m2, p, pr) => {
53642
+ debug("caret", comp, _2, M, m2, p, pr);
53503
53643
  let ret;
53504
53644
  if (isX(M)) {
53505
53645
  ret = "";
53506
53646
  } else if (isX(m2)) {
53507
53647
  ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
53508
- } else if (isX(p2)) {
53648
+ } else if (isX(p)) {
53509
53649
  if (M === "0") {
53510
53650
  ret = `>=${M}.${m2}.0${z2} <${M}.${+m2 + 1}.0-0`;
53511
53651
  } else {
@@ -53515,23 +53655,23 @@ var require_range = __commonJS({
53515
53655
  debug("replaceCaret pr", pr);
53516
53656
  if (M === "0") {
53517
53657
  if (m2 === "0") {
53518
- ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${m2}.${+p2 + 1}-0`;
53658
+ ret = `>=${M}.${m2}.${p}-${pr} <${M}.${m2}.${+p + 1}-0`;
53519
53659
  } else {
53520
- ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
53660
+ ret = `>=${M}.${m2}.${p}-${pr} <${M}.${+m2 + 1}.0-0`;
53521
53661
  }
53522
53662
  } else {
53523
- ret = `>=${M}.${m2}.${p2}-${pr} <${+M + 1}.0.0-0`;
53663
+ ret = `>=${M}.${m2}.${p}-${pr} <${+M + 1}.0.0-0`;
53524
53664
  }
53525
53665
  } else {
53526
53666
  debug("no pr");
53527
53667
  if (M === "0") {
53528
53668
  if (m2 === "0") {
53529
- ret = `>=${M}.${m2}.${p2}${z2} <${M}.${m2}.${+p2 + 1}-0`;
53669
+ ret = `>=${M}.${m2}.${p}${z2} <${M}.${m2}.${+p + 1}-0`;
53530
53670
  } else {
53531
- ret = `>=${M}.${m2}.${p2}${z2} <${M}.${+m2 + 1}.0-0`;
53671
+ ret = `>=${M}.${m2}.${p}${z2} <${M}.${+m2 + 1}.0-0`;
53532
53672
  }
53533
53673
  } else {
53534
- ret = `>=${M}.${m2}.${p2} <${+M + 1}.0.0-0`;
53674
+ ret = `>=${M}.${m2}.${p} <${+M + 1}.0.0-0`;
53535
53675
  }
53536
53676
  }
53537
53677
  debug("caret return", ret);
@@ -53545,11 +53685,11 @@ var require_range = __commonJS({
53545
53685
  var replaceXRange = (comp, options) => {
53546
53686
  comp = comp.trim();
53547
53687
  const r2 = options.loose ? re[t2.XRANGELOOSE] : re[t2.XRANGE];
53548
- return comp.replace(r2, (ret, gtlt, M, m2, p2, pr) => {
53549
- debug("xRange", comp, ret, gtlt, M, m2, p2, pr);
53688
+ return comp.replace(r2, (ret, gtlt, M, m2, p, pr) => {
53689
+ debug("xRange", comp, ret, gtlt, M, m2, p, pr);
53550
53690
  const xM = isX(M);
53551
53691
  const xm = xM || isX(m2);
53552
- const xp = xm || isX(p2);
53692
+ const xp = xm || isX(p);
53553
53693
  const anyX = xp;
53554
53694
  if (gtlt === "=" && anyX) {
53555
53695
  gtlt = "";
@@ -53565,16 +53705,16 @@ var require_range = __commonJS({
53565
53705
  if (xm) {
53566
53706
  m2 = 0;
53567
53707
  }
53568
- p2 = 0;
53708
+ p = 0;
53569
53709
  if (gtlt === ">") {
53570
53710
  gtlt = ">=";
53571
53711
  if (xm) {
53572
53712
  M = +M + 1;
53573
53713
  m2 = 0;
53574
- p2 = 0;
53714
+ p = 0;
53575
53715
  } else {
53576
53716
  m2 = +m2 + 1;
53577
- p2 = 0;
53717
+ p = 0;
53578
53718
  }
53579
53719
  } else if (gtlt === "<=") {
53580
53720
  gtlt = "<";
@@ -53587,7 +53727,7 @@ var require_range = __commonJS({
53587
53727
  if (gtlt === "<") {
53588
53728
  pr = "-0";
53589
53729
  }
53590
- ret = `${gtlt + M}.${m2}.${p2}${pr}`;
53730
+ ret = `${gtlt + M}.${m2}.${p}${pr}`;
53591
53731
  } else if (xm) {
53592
53732
  ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
53593
53733
  } else if (xp) {
@@ -55169,14 +55309,14 @@ var init_headers = __esm({
55169
55309
  }) : void 0;
55170
55310
  super(result);
55171
55311
  return new Proxy(this, {
55172
- get(target, p2, receiver) {
55173
- switch (p2) {
55312
+ get(target, p, receiver) {
55313
+ switch (p) {
55174
55314
  case "append":
55175
55315
  case "set":
55176
55316
  return (name, value) => {
55177
55317
  validateHeaderName(name);
55178
55318
  validateHeaderValue(name, String(value));
55179
- return URLSearchParams.prototype[p2].call(
55319
+ return URLSearchParams.prototype[p].call(
55180
55320
  target,
55181
55321
  String(name).toLowerCase(),
55182
55322
  String(value)
@@ -55187,7 +55327,7 @@ var init_headers = __esm({
55187
55327
  case "getAll":
55188
55328
  return (name) => {
55189
55329
  validateHeaderName(name);
55190
- return URLSearchParams.prototype[p2].call(
55330
+ return URLSearchParams.prototype[p].call(
55191
55331
  target,
55192
55332
  String(name).toLowerCase()
55193
55333
  );
@@ -55198,7 +55338,7 @@ var init_headers = __esm({
55198
55338
  return new Set(URLSearchParams.prototype.keys.call(target)).keys();
55199
55339
  };
55200
55340
  default:
55201
- return Reflect.get(target, p2, receiver);
55341
+ return Reflect.get(target, p, receiver);
55202
55342
  }
55203
55343
  }
55204
55344
  });
@@ -67209,13 +67349,13 @@ function __extends(d, b) {
67209
67349
  }
67210
67350
  function __rest(s2, e2) {
67211
67351
  var t2 = {};
67212
- for (var p2 in s2)
67213
- if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
67214
- t2[p2] = s2[p2];
67352
+ for (var p in s2)
67353
+ if (Object.prototype.hasOwnProperty.call(s2, p) && e2.indexOf(p) < 0)
67354
+ t2[p] = s2[p];
67215
67355
  if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
67216
- for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
67217
- if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2]))
67218
- t2[p2[i2]] = s2[p2[i2]];
67356
+ for (var i2 = 0, p = Object.getOwnPropertySymbols(s2); i2 < p.length; i2++) {
67357
+ if (e2.indexOf(p[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p[i2]))
67358
+ t2[p[i2]] = s2[p[i2]];
67219
67359
  }
67220
67360
  return t2;
67221
67361
  }
@@ -67246,10 +67386,10 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
67246
67386
  var _2, done = false;
67247
67387
  for (var i2 = decorators.length - 1; i2 >= 0; i2--) {
67248
67388
  var context = {};
67249
- for (var p2 in contextIn)
67250
- context[p2] = p2 === "access" ? {} : contextIn[p2];
67251
- for (var p2 in contextIn.access)
67252
- context.access[p2] = contextIn.access[p2];
67389
+ for (var p in contextIn)
67390
+ context[p] = p === "access" ? {} : contextIn[p];
67391
+ for (var p in contextIn.access)
67392
+ context.access[p] = contextIn.access[p];
67253
67393
  context.addInitializer = function(f3) {
67254
67394
  if (done)
67255
67395
  throw new TypeError("Cannot add initializers after decoration has completed");
@@ -67401,9 +67541,9 @@ function __generator(thisArg, body) {
67401
67541
  }
67402
67542
  }
67403
67543
  function __exportStar(m2, o) {
67404
- for (var p2 in m2)
67405
- if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(o, p2))
67406
- __createBinding(o, m2, p2);
67544
+ for (var p in m2)
67545
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
67546
+ __createBinding(o, m2, p);
67407
67547
  }
67408
67548
  function __values(o) {
67409
67549
  var s2 = typeof Symbol === "function" && Symbol.iterator, m2 = s2 && o[s2], i2 = 0;
@@ -67512,7 +67652,7 @@ function __asyncGenerator(thisArg, _arguments, generator) {
67512
67652
  }
67513
67653
  }
67514
67654
  function __asyncDelegator(o) {
67515
- var i2, p2;
67655
+ var i2, p;
67516
67656
  return i2 = {}, verb("next"), verb("throw", function(e2) {
67517
67657
  throw e2;
67518
67658
  }), verb("return"), i2[Symbol.iterator] = function() {
@@ -67520,7 +67660,7 @@ function __asyncDelegator(o) {
67520
67660
  }, i2;
67521
67661
  function verb(n, f3) {
67522
67662
  i2[n] = o[n] ? function(v) {
67523
- return (p2 = !p2) ? { value: __await(o[n](v)), done: false } : f3 ? f3(v) : v;
67663
+ return (p = !p) ? { value: __await(o[n](v)), done: false } : f3 ? f3(v) : v;
67524
67664
  } : f3;
67525
67665
  }
67526
67666
  }
@@ -67667,9 +67807,9 @@ var init_tslib_es6 = __esm({
67667
67807
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
67668
67808
  d2.__proto__ = b2;
67669
67809
  } || function(d2, b2) {
67670
- for (var p2 in b2)
67671
- if (Object.prototype.hasOwnProperty.call(b2, p2))
67672
- d2[p2] = b2[p2];
67810
+ for (var p in b2)
67811
+ if (Object.prototype.hasOwnProperty.call(b2, p))
67812
+ d2[p] = b2[p];
67673
67813
  };
67674
67814
  return extendStatics(d, b);
67675
67815
  };
@@ -67677,9 +67817,9 @@ var init_tslib_es6 = __esm({
67677
67817
  __assign = Object.assign || function __assign3(t2) {
67678
67818
  for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
67679
67819
  s2 = arguments[i2];
67680
- for (var p2 in s2)
67681
- if (Object.prototype.hasOwnProperty.call(s2, p2))
67682
- t2[p2] = s2[p2];
67820
+ for (var p in s2)
67821
+ if (Object.prototype.hasOwnProperty.call(s2, p))
67822
+ t2[p] = s2[p];
67683
67823
  }
67684
67824
  return t2;
67685
67825
  };
@@ -70568,13 +70708,13 @@ function __extends2(d, b) {
70568
70708
  }
70569
70709
  function __rest2(s2, e2) {
70570
70710
  var t2 = {};
70571
- for (var p2 in s2)
70572
- if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
70573
- t2[p2] = s2[p2];
70711
+ for (var p in s2)
70712
+ if (Object.prototype.hasOwnProperty.call(s2, p) && e2.indexOf(p) < 0)
70713
+ t2[p] = s2[p];
70574
70714
  if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
70575
- for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
70576
- if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2]))
70577
- t2[p2[i2]] = s2[p2[i2]];
70715
+ for (var i2 = 0, p = Object.getOwnPropertySymbols(s2); i2 < p.length; i2++) {
70716
+ if (e2.indexOf(p[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p[i2]))
70717
+ t2[p[i2]] = s2[p[i2]];
70578
70718
  }
70579
70719
  return t2;
70580
70720
  }
@@ -70605,10 +70745,10 @@ function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers,
70605
70745
  var _2, done = false;
70606
70746
  for (var i2 = decorators.length - 1; i2 >= 0; i2--) {
70607
70747
  var context = {};
70608
- for (var p2 in contextIn)
70609
- context[p2] = p2 === "access" ? {} : contextIn[p2];
70610
- for (var p2 in contextIn.access)
70611
- context.access[p2] = contextIn.access[p2];
70748
+ for (var p in contextIn)
70749
+ context[p] = p === "access" ? {} : contextIn[p];
70750
+ for (var p in contextIn.access)
70751
+ context.access[p] = contextIn.access[p];
70612
70752
  context.addInitializer = function(f3) {
70613
70753
  if (done)
70614
70754
  throw new TypeError("Cannot add initializers after decoration has completed");
@@ -70760,9 +70900,9 @@ function __generator2(thisArg, body) {
70760
70900
  }
70761
70901
  }
70762
70902
  function __exportStar2(m2, o) {
70763
- for (var p2 in m2)
70764
- if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(o, p2))
70765
- __createBinding2(o, m2, p2);
70903
+ for (var p in m2)
70904
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
70905
+ __createBinding2(o, m2, p);
70766
70906
  }
70767
70907
  function __values2(o) {
70768
70908
  var s2 = typeof Symbol === "function" && Symbol.iterator, m2 = s2 && o[s2], i2 = 0;
@@ -70863,7 +71003,7 @@ function __asyncGenerator2(thisArg, _arguments, generator) {
70863
71003
  }
70864
71004
  }
70865
71005
  function __asyncDelegator2(o) {
70866
- var i2, p2;
71006
+ var i2, p;
70867
71007
  return i2 = {}, verb("next"), verb("throw", function(e2) {
70868
71008
  throw e2;
70869
71009
  }), verb("return"), i2[Symbol.iterator] = function() {
@@ -70871,7 +71011,7 @@ function __asyncDelegator2(o) {
70871
71011
  }, i2;
70872
71012
  function verb(n, f3) {
70873
71013
  i2[n] = o[n] ? function(v) {
70874
- return (p2 = !p2) ? { value: __await2(o[n](v)), done: false } : f3 ? f3(v) : v;
71014
+ return (p = !p) ? { value: __await2(o[n](v)), done: false } : f3 ? f3(v) : v;
70875
71015
  } : f3;
70876
71016
  }
70877
71017
  }
@@ -70993,9 +71133,9 @@ var init_tslib_es62 = __esm({
70993
71133
  extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
70994
71134
  d2.__proto__ = b2;
70995
71135
  } || function(d2, b2) {
70996
- for (var p2 in b2)
70997
- if (Object.prototype.hasOwnProperty.call(b2, p2))
70998
- d2[p2] = b2[p2];
71136
+ for (var p in b2)
71137
+ if (Object.prototype.hasOwnProperty.call(b2, p))
71138
+ d2[p] = b2[p];
70999
71139
  };
71000
71140
  return extendStatics2(d, b);
71001
71141
  };
@@ -71003,9 +71143,9 @@ var init_tslib_es62 = __esm({
71003
71143
  __assign2 = Object.assign || function __assign3(t2) {
71004
71144
  for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
71005
71145
  s2 = arguments[i2];
71006
- for (var p2 in s2)
71007
- if (Object.prototype.hasOwnProperty.call(s2, p2))
71008
- t2[p2] = s2[p2];
71146
+ for (var p in s2)
71147
+ if (Object.prototype.hasOwnProperty.call(s2, p))
71148
+ t2[p] = s2[p];
71009
71149
  }
71010
71150
  return t2;
71011
71151
  };
@@ -72226,12 +72366,12 @@ var require_ruleset = __commonJS({
72226
72366
  var m2 = { [v]: c, [w]: [{ [x2]: "UseDualStack" }, true] };
72227
72367
  var n = {};
72228
72368
  var o = { [v]: h2, [w]: [{ [x2]: g }, "supportsFIPS"] };
72229
- var p2 = { [x2]: g };
72230
- var q = { [v]: c, [w]: [true, { [v]: h2, [w]: [p2, "supportsDualStack"] }] };
72369
+ var p = { [x2]: g };
72370
+ var q = { [v]: c, [w]: [true, { [v]: h2, [w]: [p, "supportsDualStack"] }] };
72231
72371
  var r2 = [l];
72232
72372
  var s2 = [m2];
72233
72373
  var t2 = [{ [x2]: "Region" }];
72234
- var _data = { version: "1.0", parameters: { Region: i2, UseDualStack: j, UseFIPS: j, Endpoint: i2 }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r2, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s2, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e2 }], type: f3 }, { conditions: [{ [v]: b, [w]: t2 }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t2, assign: g }], rules: [{ conditions: [l, m2], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f3 }, { conditions: r2, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h2, [w]: [p2, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e2 }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f3 }, { conditions: s2, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f3 }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }], type: f3 }, { error: "Invalid Configuration: Missing Region", type: d }] };
72374
+ var _data = { version: "1.0", parameters: { Region: i2, UseDualStack: j, UseFIPS: j, Endpoint: i2 }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r2, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s2, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e2 }], type: f3 }, { conditions: [{ [v]: b, [w]: t2 }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t2, assign: g }], rules: [{ conditions: [l, m2], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f3 }, { conditions: r2, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h2, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e2 }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f3 }, { conditions: s2, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f3 }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }], type: f3 }, { error: "Invalid Configuration: Missing Region", type: d }] };
72235
72375
  exports2.ruleSet = _data;
72236
72376
  }
72237
72377
  });
@@ -73306,12 +73446,12 @@ var require_ruleset2 = __commonJS({
73306
73446
  var m2 = { [v]: c, [w]: [{ [x2]: "UseDualStack" }, true] };
73307
73447
  var n = {};
73308
73448
  var o = { [v]: h2, [w]: [{ [x2]: g }, "supportsFIPS"] };
73309
- var p2 = { [x2]: g };
73310
- var q = { [v]: c, [w]: [true, { [v]: h2, [w]: [p2, "supportsDualStack"] }] };
73449
+ var p = { [x2]: g };
73450
+ var q = { [v]: c, [w]: [true, { [v]: h2, [w]: [p, "supportsDualStack"] }] };
73311
73451
  var r2 = [l];
73312
73452
  var s2 = [m2];
73313
73453
  var t2 = [{ [x2]: "Region" }];
73314
- var _data = { version: "1.0", parameters: { Region: i2, UseDualStack: j, UseFIPS: j, Endpoint: i2 }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r2, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s2, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e2 }], type: f3 }, { conditions: [{ [v]: b, [w]: t2 }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t2, assign: g }], rules: [{ conditions: [l, m2], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f3 }, { conditions: r2, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h2, [w]: [p2, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e2 }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f3 }, { conditions: s2, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f3 }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }], type: f3 }, { error: "Invalid Configuration: Missing Region", type: d }] };
73454
+ var _data = { version: "1.0", parameters: { Region: i2, UseDualStack: j, UseFIPS: j, Endpoint: i2 }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r2, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s2, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e2 }], type: f3 }, { conditions: [{ [v]: b, [w]: t2 }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t2, assign: g }], rules: [{ conditions: [l, m2], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f3 }, { conditions: r2, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h2, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e2 }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f3 }, { conditions: s2, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f3 }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }], type: f3 }, { error: "Invalid Configuration: Missing Region", type: d }] };
73315
73455
  exports2.ruleSet = _data;
73316
73456
  }
73317
73457
  });
@@ -75015,7 +75155,7 @@ var require_ruleset3 = __commonJS({
75015
75155
  var m2 = { [F2]: false, [G]: "String" };
75016
75156
  var n = { [F2]: true, "default": false, [G]: "Boolean" };
75017
75157
  var o = { [J]: "Endpoint" };
75018
- var p2 = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
75158
+ var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
75019
75159
  var q = { [J]: "Region" };
75020
75160
  var r2 = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" };
75021
75161
  var s2 = { [J]: "UseFIPS" };
@@ -75031,7 +75171,7 @@ var require_ruleset3 = __commonJS({
75031
75171
  var C = [{ [H]: "isSet", [I]: [o] }];
75032
75172
  var D = [x2];
75033
75173
  var E = [y];
75034
- var _data = { version: "1.0", parameters: { Region: m2, UseDualStack: n, UseFIPS: n, Endpoint: m2, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p2, r2, { [H]: c, [I]: [s2, a] }, { [H]: c, [I]: [t2, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h2 }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h2 }, { endpoint: { url: i2, properties: { authSchemes: [{ name: e2, signingName: f3, signingRegion: "{Region}" }] }, headers: v }, [G]: h2 }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h2 }], [G]: j }, { conditions: [p2], rules: [{ conditions: [r2], rules: [{ conditions: [x2, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z2] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z2, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A2, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h2 }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i2, properties: v, headers: v }, [G]: h2 }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
75174
+ var _data = { version: "1.0", parameters: { Region: m2, UseDualStack: n, UseFIPS: n, Endpoint: m2, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r2, { [H]: c, [I]: [s2, a] }, { [H]: c, [I]: [t2, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h2 }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h2 }, { endpoint: { url: i2, properties: { authSchemes: [{ name: e2, signingName: f3, signingRegion: "{Region}" }] }, headers: v }, [G]: h2 }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h2 }], [G]: j }, { conditions: [p], rules: [{ conditions: [r2], rules: [{ conditions: [x2, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z2] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z2, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A2, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h2 }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i2, properties: v, headers: v }, [G]: h2 }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
75035
75175
  exports2.ruleSet = _data;
75036
75176
  }
75037
75177
  });
@@ -77186,10 +77326,10 @@ var require_ruleset4 = __commonJS({
77186
77326
  var m2 = {};
77187
77327
  var n = { [t2]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] };
77188
77328
  var o = { [t2]: c, [u]: [true, { [t2]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] };
77189
- var p2 = [k];
77329
+ var p = [k];
77190
77330
  var q = [l];
77191
77331
  var r2 = [{ [v]: "Region" }];
77192
- var _data = { version: "1.0", parameters: { Region: h2, UseDualStack: i2, UseFIPS: i2, Endpoint: h2 }, rules: [{ conditions: [{ [t2]: b, [u]: [j] }], rules: [{ conditions: p2, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m2, headers: m2 }, type: e2 }], type: f3 }, { conditions: [{ [t2]: b, [u]: r2 }], rules: [{ conditions: [{ [t2]: "aws.partition", [u]: r2, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t2]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: "https://rds-data-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m2, headers: m2 }, type: e2 }], type: f3 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f3 }, { conditions: p2, rules: [{ conditions: [{ [t2]: c, [u]: [n, a] }], rules: [{ endpoint: { url: "https://rds-data-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m2, headers: m2 }, type: e2 }], type: f3 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f3 }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: "https://rds-data.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m2, headers: m2 }, type: e2 }], type: f3 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f3 }, { endpoint: { url: "https://rds-data.{Region}.{PartitionResult#dnsSuffix}", properties: m2, headers: m2 }, type: e2 }], type: f3 }], type: f3 }, { error: "Invalid Configuration: Missing Region", type: d }] };
77332
+ var _data = { version: "1.0", parameters: { Region: h2, UseDualStack: i2, UseFIPS: i2, Endpoint: h2 }, rules: [{ conditions: [{ [t2]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m2, headers: m2 }, type: e2 }], type: f3 }, { conditions: [{ [t2]: b, [u]: r2 }], rules: [{ conditions: [{ [t2]: "aws.partition", [u]: r2, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t2]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: "https://rds-data-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m2, headers: m2 }, type: e2 }], type: f3 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f3 }, { conditions: p, rules: [{ conditions: [{ [t2]: c, [u]: [n, a] }], rules: [{ endpoint: { url: "https://rds-data-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m2, headers: m2 }, type: e2 }], type: f3 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f3 }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: "https://rds-data.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m2, headers: m2 }, type: e2 }], type: f3 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f3 }, { endpoint: { url: "https://rds-data.{Region}.{PartitionResult#dnsSuffix}", properties: m2, headers: m2 }, type: e2 }], type: f3 }], type: f3 }, { error: "Invalid Configuration: Missing Region", type: d }] };
77193
77333
  exports2.ruleSet = _data;
77194
77334
  }
77195
77335
  });
@@ -80016,13 +80156,28 @@ var init_pgPushUtils = __esm({
80016
80156
  });
80017
80157
 
80018
80158
  // src/cli/commands/singlestorePushUtils.ts
80159
+ function findColumnTypeAlternations(columns1, columns2) {
80160
+ const changes = [];
80161
+ for (const key in columns1) {
80162
+ if (columns1.hasOwnProperty(key) && columns2.hasOwnProperty(key)) {
80163
+ const col1 = columns1[key];
80164
+ const col2 = columns2[key];
80165
+ if (col1.type !== col2.type) {
80166
+ changes.push(col2.name);
80167
+ }
80168
+ }
80169
+ }
80170
+ return changes;
80171
+ }
80019
80172
  var import_hanji8, filterStatements2, logSuggestionsAndReturn3;
80020
80173
  var init_singlestorePushUtils = __esm({
80021
80174
  "src/cli/commands/singlestorePushUtils.ts"() {
80022
80175
  "use strict";
80023
80176
  init_source();
80024
80177
  import_hanji8 = __toESM(require_hanji());
80178
+ init_sqlgenerator();
80025
80179
  init_singlestoreSchema();
80180
+ init_utils2();
80026
80181
  init_selector_ui();
80027
80182
  init_outputs();
80028
80183
  filterStatements2 = (statements, currentSchema, prevSchema) => {
@@ -80066,7 +80221,7 @@ var init_singlestorePushUtils = __esm({
80066
80221
  return true;
80067
80222
  });
80068
80223
  };
80069
- logSuggestionsAndReturn3 = async (db, statements, json2) => {
80224
+ logSuggestionsAndReturn3 = async (db, statements, json2, json1) => {
80070
80225
  let shouldAskForApprove = false;
80071
80226
  const statementsToExecute = [];
80072
80227
  const infoToPrint = [];
@@ -80247,6 +80402,71 @@ var init_singlestorePushUtils = __esm({
80247
80402
  shouldAskForApprove = true;
80248
80403
  }
80249
80404
  }
80405
+ } else if (statement.type === "singlestore_recreate_table") {
80406
+ const tableName = statement.tableName;
80407
+ const prevColumns = json1.tables[tableName].columns;
80408
+ const currentColumns = json2.tables[tableName].columns;
80409
+ const { removedColumns, addedColumns } = findAddedAndRemoved(
80410
+ Object.keys(prevColumns),
80411
+ Object.keys(currentColumns)
80412
+ );
80413
+ if (removedColumns.length) {
80414
+ for (const removedColumn of removedColumns) {
80415
+ const res = await db.query(
80416
+ `select count(\`${tableName}\`.\`${removedColumn}\`) as count from \`${tableName}\``
80417
+ );
80418
+ const count = Number(res[0].count);
80419
+ if (count > 0) {
80420
+ infoToPrint.push(
80421
+ `\xB7 You're about to delete ${source_default.underline(
80422
+ removedColumn
80423
+ )} column in ${tableName} table with ${count} items`
80424
+ );
80425
+ columnsToRemove.push(removedColumn);
80426
+ shouldAskForApprove = true;
80427
+ }
80428
+ }
80429
+ }
80430
+ if (addedColumns.length) {
80431
+ for (const addedColumn of addedColumns) {
80432
+ const [res] = await db.query(
80433
+ `select count(*) as count from \`${tableName}\``
80434
+ );
80435
+ const columnConf = json2.tables[tableName].columns[addedColumn];
80436
+ const count = Number(res.count);
80437
+ if (count > 0 && columnConf.notNull && !columnConf.default) {
80438
+ infoToPrint.push(
80439
+ `\xB7 You're about to add not-null ${source_default.underline(
80440
+ addedColumn
80441
+ )} column without default value to table, which contains ${count} items`
80442
+ );
80443
+ shouldAskForApprove = true;
80444
+ tablesToTruncate.push(tableName);
80445
+ statementsToExecute.push(`TRUNCATE TABLE \`${tableName}\`;`);
80446
+ }
80447
+ }
80448
+ }
80449
+ const columnWithChangedType = findColumnTypeAlternations(prevColumns, currentColumns);
80450
+ for (const column9 of columnWithChangedType) {
80451
+ const [res] = await db.query(
80452
+ `select count(*) as count from \`${tableName}\` WHERE \`${tableName}\`.\`${column9}\` IS NOT NULL;`
80453
+ );
80454
+ const count = Number(res.count);
80455
+ if (count > 0) {
80456
+ infoToPrint.push(
80457
+ `\xB7 You're about recreate ${source_default.underline(tableName)} table with data type changing for ${source_default.underline(
80458
+ column9
80459
+ )} column, which contains ${count} items`
80460
+ );
80461
+ shouldAskForApprove = true;
80462
+ tablesToTruncate.push(tableName);
80463
+ statementsToExecute.push(`TRUNCATE TABLE \`${tableName}\`;`);
80464
+ }
80465
+ }
80466
+ }
80467
+ const stmnt = fromJson([statement], "singlestore", "push");
80468
+ if (typeof stmnt !== "undefined") {
80469
+ statementsToExecute.push(...stmnt);
80250
80470
  }
80251
80471
  }
80252
80472
  return {
@@ -80407,12 +80627,12 @@ var init_mjs = __esm({
80407
80627
  init_unescape();
80408
80628
  init_escape();
80409
80629
  init_unescape();
80410
- minimatch = (p2, pattern, options = {}) => {
80630
+ minimatch = (p, pattern, options = {}) => {
80411
80631
  assertValidPattern(pattern);
80412
80632
  if (!options.nocomment && pattern.charAt(0) === "#") {
80413
80633
  return false;
80414
80634
  }
80415
- return new Minimatch(pattern, options).match(p2);
80635
+ return new Minimatch(pattern, options).match(p);
80416
80636
  };
80417
80637
  starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
80418
80638
  starDotExtTest = (ext2) => (f3) => !f3.startsWith(".") && f3.endsWith(ext2);
@@ -80490,7 +80710,7 @@ var init_mjs = __esm({
80490
80710
  }, {});
80491
80711
  reSpecials = charSet("().*{}+?[]^$\\!");
80492
80712
  addPatternStartSet = charSet("[.(");
80493
- filter = (pattern, options = {}) => (p2) => minimatch(p2, pattern, options);
80713
+ filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
80494
80714
  minimatch.filter = filter;
80495
80715
  ext = (a, b = {}) => Object.assign({}, a, b);
80496
80716
  defaults2 = (def) => {
@@ -80498,7 +80718,7 @@ var init_mjs = __esm({
80498
80718
  return minimatch;
80499
80719
  }
80500
80720
  const orig = minimatch;
80501
- const m2 = (p2, pattern, options = {}) => orig(p2, pattern, ext(def, options));
80721
+ const m2 = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
80502
80722
  return Object.assign(m2, {
80503
80723
  Minimatch: class Minimatch extends orig.Minimatch {
80504
80724
  constructor(pattern, options = {}) {
@@ -80644,9 +80864,9 @@ var init_mjs = __esm({
80644
80864
  this.set = set.filter((s2) => s2.indexOf(false) === -1);
80645
80865
  if (this.isWindows) {
80646
80866
  for (let i2 = 0; i2 < this.set.length; i2++) {
80647
- const p2 = this.set[i2];
80648
- if (p2[0] === "" && p2[1] === "" && this.globParts[i2][2] === "?" && typeof p2[3] === "string" && /^[a-z]:$/i.test(p2[3])) {
80649
- p2[2] = "?";
80867
+ const p = this.set[i2];
80868
+ if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
80869
+ p[2] = "?";
80650
80870
  }
80651
80871
  }
80652
80872
  }
@@ -80723,10 +80943,10 @@ var init_mjs = __esm({
80723
80943
  didSomething = false;
80724
80944
  if (!this.preserveMultipleSlashes) {
80725
80945
  for (let i2 = 1; i2 < parts.length - 1; i2++) {
80726
- const p2 = parts[i2];
80727
- if (i2 === 1 && p2 === "" && parts[0] === "")
80946
+ const p = parts[i2];
80947
+ if (i2 === 1 && p === "" && parts[0] === "")
80728
80948
  continue;
80729
- if (p2 === "." || p2 === "") {
80949
+ if (p === "." || p === "") {
80730
80950
  didSomething = true;
80731
80951
  parts.splice(i2, 1);
80732
80952
  i2--;
@@ -80739,8 +80959,8 @@ var init_mjs = __esm({
80739
80959
  }
80740
80960
  let dd = 0;
80741
80961
  while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
80742
- const p2 = parts[dd - 1];
80743
- if (p2 && p2 !== "." && p2 !== ".." && p2 !== "**") {
80962
+ const p = parts[dd - 1];
80963
+ if (p && p !== "." && p !== ".." && p !== "**") {
80744
80964
  didSomething = true;
80745
80965
  parts.splice(dd - 1, 2);
80746
80966
  dd -= 2;
@@ -80782,11 +81002,11 @@ var init_mjs = __esm({
80782
81002
  parts.splice(gs + 1, gss - gs);
80783
81003
  }
80784
81004
  let next = parts[gs + 1];
80785
- const p2 = parts[gs + 2];
80786
- const p22 = parts[gs + 3];
81005
+ const p = parts[gs + 2];
81006
+ const p2 = parts[gs + 3];
80787
81007
  if (next !== "..")
80788
81008
  continue;
80789
- if (!p2 || p2 === "." || p2 === ".." || !p22 || p22 === "." || p22 === "..") {
81009
+ if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
80790
81010
  continue;
80791
81011
  }
80792
81012
  didSomething = true;
@@ -80798,10 +81018,10 @@ var init_mjs = __esm({
80798
81018
  }
80799
81019
  if (!this.preserveMultipleSlashes) {
80800
81020
  for (let i2 = 1; i2 < parts.length - 1; i2++) {
80801
- const p2 = parts[i2];
80802
- if (i2 === 1 && p2 === "" && parts[0] === "")
81021
+ const p = parts[i2];
81022
+ if (i2 === 1 && p === "" && parts[0] === "")
80803
81023
  continue;
80804
- if (p2 === "." || p2 === "") {
81024
+ if (p === "." || p === "") {
80805
81025
  didSomething = true;
80806
81026
  parts.splice(i2, 1);
80807
81027
  i2--;
@@ -80814,8 +81034,8 @@ var init_mjs = __esm({
80814
81034
  }
80815
81035
  let dd = 0;
80816
81036
  while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
80817
- const p2 = parts[dd - 1];
80818
- if (p2 && p2 !== "." && p2 !== ".." && p2 !== "**") {
81037
+ const p = parts[dd - 1];
81038
+ if (p && p !== "." && p !== ".." && p !== "**") {
80819
81039
  didSomething = true;
80820
81040
  const needDot = dd === 1 && parts[dd + 1] === "**";
80821
81041
  const splin = needDot ? ["."] : [];
@@ -80937,14 +81157,14 @@ var init_mjs = __esm({
80937
81157
  this.debug("matchOne", file.length, pattern.length);
80938
81158
  for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
80939
81159
  this.debug("matchOne loop");
80940
- var p2 = pattern[pi];
81160
+ var p = pattern[pi];
80941
81161
  var f3 = file[fi];
80942
- this.debug(pattern, p2, f3);
80943
- if (p2 === false) {
81162
+ this.debug(pattern, p, f3);
81163
+ if (p === false) {
80944
81164
  return false;
80945
81165
  }
80946
- if (p2 === GLOBSTAR) {
80947
- this.debug("GLOBSTAR", [pattern, p2, f3]);
81166
+ if (p === GLOBSTAR) {
81167
+ this.debug("GLOBSTAR", [pattern, p, f3]);
80948
81168
  var fr = fi;
80949
81169
  var pr = pi + 1;
80950
81170
  if (pr === pl) {
@@ -80979,12 +81199,12 @@ var init_mjs = __esm({
80979
81199
  return false;
80980
81200
  }
80981
81201
  let hit;
80982
- if (typeof p2 === "string") {
80983
- hit = f3 === p2;
80984
- this.debug("string match", p2, f3, hit);
81202
+ if (typeof p === "string") {
81203
+ hit = f3 === p;
81204
+ this.debug("string match", p, f3, hit);
80985
81205
  } else {
80986
- hit = p2.test(f3);
80987
- this.debug("pattern match", p2, f3, hit);
81206
+ hit = p.test(f3);
81207
+ this.debug("pattern match", p, f3, hit);
80988
81208
  }
80989
81209
  if (!hit)
80990
81210
  return false;
@@ -81033,7 +81253,7 @@ var init_mjs = __esm({
81033
81253
  let dotTravAllowed = pattern.charAt(0) === ".";
81034
81254
  let dotFileAllowed = options.dot || dotTravAllowed;
81035
81255
  const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
81036
- const subPatternStart = (p2) => p2.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
81256
+ const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
81037
81257
  const clearStateChar = () => {
81038
81258
  if (stateChar) {
81039
81259
  switch (stateChar) {
@@ -81236,11 +81456,11 @@ var init_mjs = __esm({
81236
81456
  const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
81237
81457
  const flags = options.nocase ? "i" : "";
81238
81458
  let re = set.map((pattern) => {
81239
- const pp = pattern.map((p2) => typeof p2 === "string" ? regExpEscape(p2) : p2 === GLOBSTAR ? GLOBSTAR : p2._src);
81240
- pp.forEach((p2, i2) => {
81459
+ const pp = pattern.map((p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src);
81460
+ pp.forEach((p, i2) => {
81241
81461
  const next = pp[i2 + 1];
81242
81462
  const prev = pp[i2 - 1];
81243
- if (p2 !== GLOBSTAR || prev === GLOBSTAR) {
81463
+ if (p !== GLOBSTAR || prev === GLOBSTAR) {
81244
81464
  return;
81245
81465
  }
81246
81466
  if (prev === void 0) {
@@ -81256,7 +81476,7 @@ var init_mjs = __esm({
81256
81476
  pp[i2 + 1] = GLOBSTAR;
81257
81477
  }
81258
81478
  });
81259
- return pp.filter((p2) => p2 !== GLOBSTAR).join("/");
81479
+ return pp.filter((p) => p !== GLOBSTAR).join("/");
81260
81480
  }).join("|");
81261
81481
  re = "^(?:" + re + ")$";
81262
81482
  if (this.negate)
@@ -81268,13 +81488,13 @@ var init_mjs = __esm({
81268
81488
  }
81269
81489
  return this.regexp;
81270
81490
  }
81271
- slashSplit(p2) {
81491
+ slashSplit(p) {
81272
81492
  if (this.preserveMultipleSlashes) {
81273
- return p2.split("/");
81274
- } else if (this.isWindows && /^\/\/[^\/]+/.test(p2)) {
81275
- return ["", ...p2.split(/\/+/)];
81493
+ return p.split("/");
81494
+ } else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
81495
+ return ["", ...p.split(/\/+/)];
81276
81496
  } else {
81277
- return p2.split(/\/+/);
81497
+ return p.split(/\/+/);
81278
81498
  }
81279
81499
  }
81280
81500
  match(f3, partial = this.partial) {
@@ -82079,8 +82299,8 @@ var init_push = __esm({
82079
82299
  const statements = await prepareSingleStorePush2(schemaPath, schema6, casing2);
82080
82300
  const filteredStatements = filterStatements2(
82081
82301
  statements.statements ?? [],
82082
- statements.validatedCur,
82083
- statements.validatedPrev
82302
+ statements.squashedCur,
82303
+ statements.squashedPrev
82084
82304
  );
82085
82305
  try {
82086
82306
  if (filteredStatements.length === 0) {
@@ -82097,30 +82317,16 @@ var init_push = __esm({
82097
82317
  } = await logSuggestionsAndReturn3(
82098
82318
  db,
82099
82319
  filteredStatements,
82100
- statements.validatedCur
82320
+ statements.squashedCur,
82321
+ statements.squashedPrev
82101
82322
  );
82102
- const filteredSqlStatements = fromJson(filteredStatements, "singlestore");
82103
- const uniqueSqlStatementsToExecute = [];
82104
- statementsToExecute.forEach((ss) => {
82105
- if (!uniqueSqlStatementsToExecute.includes(ss)) {
82106
- uniqueSqlStatementsToExecute.push(ss);
82107
- }
82108
- });
82109
- const uniqueFilteredSqlStatements = [];
82110
- filteredSqlStatements.forEach((ss) => {
82111
- if (!uniqueFilteredSqlStatements.includes(ss)) {
82112
- uniqueFilteredSqlStatements.push(ss);
82113
- }
82114
- });
82115
82323
  if (verbose) {
82116
82324
  console.log();
82117
82325
  console.log(
82118
82326
  withStyle.warning("You are about to execute current statements:")
82119
82327
  );
82120
82328
  console.log();
82121
- console.log(
82122
- [...uniqueSqlStatementsToExecute, ...uniqueFilteredSqlStatements].map((s2) => source_default.blue(s2)).join("\n")
82123
- );
82329
+ console.log(statementsToExecute.map((s2) => source_default.blue(s2)).join("\n"));
82124
82330
  console.log();
82125
82331
  }
82126
82332
  if (!force && strict) {
@@ -82155,12 +82361,9 @@ var init_push = __esm({
82155
82361
  process.exit(0);
82156
82362
  }
82157
82363
  }
82158
- for (const dStmnt of uniqueSqlStatementsToExecute) {
82364
+ for (const dStmnt of statementsToExecute) {
82159
82365
  await db.query(dStmnt);
82160
82366
  }
82161
- for (const statement of uniqueFilteredSqlStatements) {
82162
- await db.query(statement);
82163
- }
82164
82367
  if (filteredStatements.length > 0) {
82165
82368
  (0, import_hanji13.render)(`[${source_default.green("\u2713")}] Changes applied`);
82166
82369
  } else {
@@ -84343,6 +84546,7 @@ var init_introspect_singlestore = __esm({
84343
84546
  "tinyint",
84344
84547
  "varbinary",
84345
84548
  "varchar",
84549
+ "vector",
84346
84550
  "year",
84347
84551
  "enum"
84348
84552
  ]);
@@ -84740,6 +84944,12 @@ import { sql } from "drizzle-orm"
84740
84944
  out += defaultValue;
84741
84945
  return out;
84742
84946
  }
84947
+ if (lowered.startsWith("vector")) {
84948
+ const [dimensions, elementType] = lowered.substring("vector".length + 1, lowered.length - 1).split(",");
84949
+ let out = `${casing2(name)}: vector(${dbColumnName4({ name, casing: rawCasing, withMode: true })}{ dimensions: ${dimensions}, elementType: ${elementType} })`;
84950
+ out += defaultValue ? `.default(${mapColumnDefault4(defaultValue, isExpression)})` : "";
84951
+ return out;
84952
+ }
84743
84953
  console.log("uknown", type);
84744
84954
  return `// Warning: Can't parse ${type} from database
84745
84955
  // ${type}Type: ${type}("${name}")`;
@@ -85901,26 +86111,26 @@ var init_url = __esm({
85901
86111
  return result.length > 1 && result[result.length - 1] === "/" ? result.slice(0, -1) : result;
85902
86112
  };
85903
86113
  mergePath = (...paths) => {
85904
- let p2 = "";
86114
+ let p = "";
85905
86115
  let endsWithSlash = false;
85906
86116
  for (let path5 of paths) {
85907
- if (p2[p2.length - 1] === "/") {
85908
- p2 = p2.slice(0, -1);
86117
+ if (p[p.length - 1] === "/") {
86118
+ p = p.slice(0, -1);
85909
86119
  endsWithSlash = true;
85910
86120
  }
85911
86121
  if (path5[0] !== "/") {
85912
86122
  path5 = `/${path5}`;
85913
86123
  }
85914
86124
  if (path5 === "/" && endsWithSlash) {
85915
- p2 = `${p2}/`;
86125
+ p = `${p}/`;
85916
86126
  } else if (path5 !== "/") {
85917
- p2 = `${p2}${path5}`;
86127
+ p = `${p}${path5}`;
85918
86128
  }
85919
- if (path5 === "/" && p2 === "") {
85920
- p2 = "/";
86129
+ if (path5 === "/" && p === "") {
86130
+ p = "/";
85921
86131
  }
85922
86132
  }
85923
- return p2;
86133
+ return p;
85924
86134
  };
85925
86135
  checkOptionalParameter = (path5) => {
85926
86136
  if (!path5.match(/\:.+\?$/)) {
@@ -86848,8 +87058,8 @@ var init_hono_base = __esm({
86848
87058
  };
86849
87059
  });
86850
87060
  this.on = (method, path5, ...handlers) => {
86851
- for (const p2 of [path5].flat()) {
86852
- this.#path = p2;
87061
+ for (const p of [path5].flat()) {
87062
+ this.#path = p;
86853
87063
  for (const m2 of [method].flat()) {
86854
87064
  handlers.map((handler) => {
86855
87065
  this.addRoute(m2.toUpperCase(), this.#path, handler);
@@ -87314,8 +87524,8 @@ var init_router2 = __esm({
87314
87524
  ;
87315
87525
  [middleware, routes].forEach((handlerMap) => {
87316
87526
  handlerMap[method] = /* @__PURE__ */ Object.create(null);
87317
- Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p2) => {
87318
- handlerMap[method][p2] = [...handlerMap[METHOD_NAME_ALL][p2]];
87527
+ Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p) => {
87528
+ handlerMap[method][p] = [...handlerMap[METHOD_NAME_ALL][p]];
87319
87529
  });
87320
87530
  });
87321
87531
  }
@@ -87334,15 +87544,15 @@ var init_router2 = __esm({
87334
87544
  }
87335
87545
  Object.keys(middleware).forEach((m2) => {
87336
87546
  if (method === METHOD_NAME_ALL || method === m2) {
87337
- Object.keys(middleware[m2]).forEach((p2) => {
87338
- re.test(p2) && middleware[m2][p2].push([handler, paramCount]);
87547
+ Object.keys(middleware[m2]).forEach((p) => {
87548
+ re.test(p) && middleware[m2][p].push([handler, paramCount]);
87339
87549
  });
87340
87550
  }
87341
87551
  });
87342
87552
  Object.keys(routes).forEach((m2) => {
87343
87553
  if (method === METHOD_NAME_ALL || method === m2) {
87344
87554
  Object.keys(routes[m2]).forEach(
87345
- (p2) => re.test(p2) && routes[m2][p2].push([handler, paramCount])
87555
+ (p) => re.test(p) && routes[m2][p].push([handler, paramCount])
87346
87556
  );
87347
87557
  }
87348
87558
  });
@@ -87516,22 +87726,22 @@ var init_node2 = __esm({
87516
87726
  const parts = splitRoutingPath(path5);
87517
87727
  const possibleKeys = [];
87518
87728
  for (let i2 = 0, len = parts.length; i2 < len; i2++) {
87519
- const p2 = parts[i2];
87520
- if (Object.keys(curNode.children).includes(p2)) {
87521
- curNode = curNode.children[p2];
87522
- const pattern2 = getPattern(p2);
87729
+ const p = parts[i2];
87730
+ if (Object.keys(curNode.children).includes(p)) {
87731
+ curNode = curNode.children[p];
87732
+ const pattern2 = getPattern(p);
87523
87733
  if (pattern2) {
87524
87734
  possibleKeys.push(pattern2[1]);
87525
87735
  }
87526
87736
  continue;
87527
87737
  }
87528
- curNode.children[p2] = new Node2();
87529
- const pattern = getPattern(p2);
87738
+ curNode.children[p] = new Node2();
87739
+ const pattern = getPattern(p);
87530
87740
  if (pattern) {
87531
87741
  curNode.patterns.push(pattern);
87532
87742
  possibleKeys.push(pattern[1]);
87533
87743
  }
87534
- curNode = curNode.children[p2];
87744
+ curNode = curNode.children[p];
87535
87745
  }
87536
87746
  if (!curNode.methods.length) {
87537
87747
  curNode.methods = [];
@@ -87655,8 +87865,8 @@ var init_router4 = __esm({
87655
87865
  add(method, path5, handler) {
87656
87866
  const results = checkOptionalParameter(path5);
87657
87867
  if (results) {
87658
- for (const p2 of results) {
87659
- this.node.insert(method, p2, handler);
87868
+ for (const p of results) {
87869
+ this.node.insert(method, p, handler);
87660
87870
  }
87661
87871
  return;
87662
87872
  }
@@ -88789,7 +88999,7 @@ var init_studio2 = __esm({
88789
88999
  };
88790
89000
  prepareSingleStoreSchema = async (path5) => {
88791
89001
  const imports = prepareFilenames(path5);
88792
- const singlestoreSchema3 = {
89002
+ const singlestoreSchema2 = {
88793
89003
  public: {}
88794
89004
  };
88795
89005
  const relations4 = {};
@@ -88806,7 +89016,7 @@ var init_studio2 = __esm({
88806
89016
  i0values.forEach(([k, t2]) => {
88807
89017
  if ((0, import_drizzle_orm10.is)(t2, import_singlestore_core3.SingleStoreTable)) {
88808
89018
  const schema6 = (0, import_singlestore_core3.getTableConfig)(t2).schema || "public";
88809
- singlestoreSchema3[schema6][k] = t2;
89019
+ singlestoreSchema2[schema6][k] = t2;
88810
89020
  }
88811
89021
  if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
88812
89022
  relations4[k] = t2;
@@ -88814,7 +89024,7 @@ var init_studio2 = __esm({
88814
89024
  });
88815
89025
  }
88816
89026
  unregister();
88817
- return { schema: singlestoreSchema3, relations: relations4, files };
89027
+ return { schema: singlestoreSchema2, relations: relations4, files };
88818
89028
  };
88819
89029
  getCustomDefaults = (schema6) => {
88820
89030
  const customDefaults = [];
@@ -88940,10 +89150,10 @@ var init_studio2 = __esm({
88940
89150
  schemaFiles
88941
89151
  };
88942
89152
  };
88943
- drizzleForSingleStore = async (credentials2, singlestoreSchema3, relations4, schemaFiles) => {
89153
+ drizzleForSingleStore = async (credentials2, singlestoreSchema2, relations4, schemaFiles) => {
88944
89154
  const { connectToSingleStore: connectToSingleStore2 } = await Promise.resolve().then(() => (init_connections(), connections_exports));
88945
89155
  const { proxy } = await connectToSingleStore2(credentials2);
88946
- const customDefaults = getCustomDefaults(singlestoreSchema3);
89156
+ const customDefaults = getCustomDefaults(singlestoreSchema2);
88947
89157
  let dbUrl;
88948
89158
  if ("url" in credentials2) {
88949
89159
  dbUrl = credentials2.url;
@@ -88956,7 +89166,7 @@ var init_studio2 = __esm({
88956
89166
  dialect: "singlestore",
88957
89167
  proxy,
88958
89168
  customDefaults,
88959
- schema: singlestoreSchema3,
89169
+ schema: singlestoreSchema2,
88960
89170
  relations: relations4,
88961
89171
  schemaFiles
88962
89172
  };
@@ -89688,7 +89898,7 @@ ${desc}`);
89688
89898
  console.log("\nUsage:");
89689
89899
  if (command3.handler) {
89690
89900
  console.log(
89691
- ` ${cliName ? cliName + " " : ""}${commandName}${positionals.length ? " " + positionals.map(({ config: p2 }) => getOptionTypeText(p2)).join(" ") : ""} [flags]`
89901
+ ` ${cliName ? cliName + " " : ""}${commandName}${positionals.length ? " " + positionals.map(({ config: p }) => getOptionTypeText(p)).join(" ") : ""} [flags]`
89692
89902
  );
89693
89903
  } else
89694
89904
  console.log(` ${cliName ? cliName + " " : ""}${commandName} [command]`);
@@ -89700,7 +89910,7 @@ Aliases:`);
89700
89910
  if (subcommands) {
89701
89911
  console.log("\nAvailable Commands:");
89702
89912
  const padding = 3;
89703
- const maxLength = subcommands.reduce((p2, e2) => e2.name.length > p2 ? e2.name.length : p2, 0);
89913
+ const maxLength = subcommands.reduce((p, e2) => e2.name.length > p ? e2.name.length : p, 0);
89704
89914
  const paddedLength = maxLength + padding;
89705
89915
  const preDescPad = 2 + paddedLength;
89706
89916
  const data = subcommands.map(
@@ -89717,15 +89927,15 @@ Aliases:`);
89717
89927
  console.log(data);
89718
89928
  }
89719
89929
  if (options.length) {
89720
- const aliasLength = options.reduce((p2, e2) => {
89930
+ const aliasLength = options.reduce((p, e2) => {
89721
89931
  const currentLength = e2.config.aliases.reduce((pa, a) => pa + a.length, 0) + (e2.config.aliases.length - 1) * 2 + 1;
89722
- return currentLength > p2 ? currentLength : p2;
89932
+ return currentLength > p ? currentLength : p;
89723
89933
  }, 0);
89724
89934
  const paddedAliasLength = aliasLength > 0 ? aliasLength + 1 : 0;
89725
- const nameLength = options.reduce((p2, e2) => {
89935
+ const nameLength = options.reduce((p, e2) => {
89726
89936
  const typeLen = getOptionTypeText(e2.config).length;
89727
89937
  const length = typeLen > 0 ? e2.config.name.length + 1 + typeLen : e2.config.name.length;
89728
- return length > p2 ? length : p2;
89938
+ return length > p ? length : p;
89729
89939
  }, 0) + 3;
89730
89940
  const preDescPad = paddedAliasLength + nameLength + 2;
89731
89941
  const data = options.map(
@@ -89772,7 +89982,7 @@ Use "${cliName ? cliName + " " : ""}${commandName} [command] --help" for more in
89772
89982
  if (commands.length) {
89773
89983
  console.log("\nAvailable Commands:");
89774
89984
  const padding = 3;
89775
- const maxLength = commands.reduce((p2, e2) => e2.name.length > p2 ? e2.name.length : p2, 0);
89985
+ const maxLength = commands.reduce((p, e2) => e2.name.length > p ? e2.name.length : p, 0);
89776
89986
  const paddedLength = maxLength + padding;
89777
89987
  const data = commands.map(
89778
89988
  (c) => ` ${c.name.padEnd(paddedLength)}${(() => {
@@ -91079,7 +91289,7 @@ function getStore() {
91079
91289
  }
91080
91290
  var $ = new Proxy(function(pieces, ...args) {
91081
91291
  const from = new Error().stack.split(/^\s*at\s/m)[2].trim();
91082
- if (pieces.some((p2) => p2 == void 0)) {
91292
+ if (pieces.some((p) => p == void 0)) {
91083
91293
  throw new Error(`Malformed command at ${from}`);
91084
91294
  }
91085
91295
  let resolve2, reject;
@@ -91227,7 +91437,7 @@ var ProcessPromise = class _ProcessPromise extends Promise {
91227
91437
  return this.child.stderr;
91228
91438
  }
91229
91439
  get exitCode() {
91230
- return this.then((p2) => p2.exitCode, (p2) => p2.exitCode);
91440
+ return this.then((p) => p.exitCode, (p) => p.exitCode);
91231
91441
  }
91232
91442
  then(onfulfilled, onrejected) {
91233
91443
  if (this.isHalted && !this.child) {
@@ -91267,9 +91477,9 @@ var ProcessPromise = class _ProcessPromise extends Promise {
91267
91477
  if (!this.child.pid)
91268
91478
  throw new Error("The process pid is undefined.");
91269
91479
  let children = await psTree(this.child.pid);
91270
- for (const p2 of children) {
91480
+ for (const p of children) {
91271
91481
  try {
91272
- process.kill(+p2.PID, signal);
91482
+ process.kill(+p.PID, signal);
91273
91483
  } catch (e2) {
91274
91484
  }
91275
91485
  }
@@ -91666,17 +91876,17 @@ var globby2 = Object.assign(function globby3(patterns, options) {
91666
91876
  }, globby_exports);
91667
91877
 
91668
91878
  // src/utils/certs.ts
91669
- var p = envPaths("drizzle-studio", {
91670
- suffix: ""
91671
- });
91672
- $.verbose = false;
91673
- $.cwd = p.data;
91674
- (0, import_fs2.mkdirSync)(p.data, { recursive: true });
91675
91879
  var certs = async () => {
91880
+ $.verbose = false;
91676
91881
  const res = await $`mkcert --help`.nothrow();
91677
- const keyPath = (0, import_path2.join)(p.data, "localhost-key.pem");
91678
- const certPath = (0, import_path2.join)(p.data, "localhost.pem");
91679
91882
  if (res.exitCode === 0) {
91883
+ const p = envPaths("drizzle-studio", {
91884
+ suffix: ""
91885
+ });
91886
+ $.cwd = p.data;
91887
+ (0, import_fs2.mkdirSync)(p.data, { recursive: true });
91888
+ const keyPath = (0, import_path2.join)(p.data, "localhost-key.pem");
91889
+ const certPath = (0, import_path2.join)(p.data, "localhost.pem");
91680
91890
  try {
91681
91891
  await Promise.all([(0, import_promises.access)(keyPath), (0, import_promises.access)(certPath)]);
91682
91892
  } catch (e2) {
@@ -91690,7 +91900,6 @@ var certs = async () => {
91690
91900
  }
91691
91901
  return null;
91692
91902
  };
91693
- certs();
91694
91903
 
91695
91904
  // src/cli/commands/check.ts
91696
91905
  init_utils2();
@@ -92609,7 +92818,7 @@ init_utils5();
92609
92818
  var version2 = async () => {
92610
92819
  const { npmVersion } = await ormCoreVersions();
92611
92820
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
92612
- const envVersion = "0.30.1";
92821
+ const envVersion = "0.30.2-0a0cdd2";
92613
92822
  const kitVersion = envVersion ? `v${envVersion}` : "--";
92614
92823
  const versions = `drizzle-kit: ${kitVersion}
92615
92824
  ${ormVersion}`;