drizzle-kit 0.20.7-c9519c9 → 0.20.8-883376b

Sign up to get free protection for your applications and to get access to all the features.
package/bin.cjs CHANGED
@@ -469,8 +469,8 @@ var init_lib = __esm({
469
469
  };
470
470
  overrideErrorMap = errorMap;
471
471
  makeIssue = (params) => {
472
- const { data, path: path4, errorMaps, issueData } = params;
473
- const fullPath = [...path4, ...issueData.path || []];
472
+ const { data, path: path5, errorMaps, issueData } = params;
473
+ const fullPath = [...path5, ...issueData.path || []];
474
474
  const fullIssue = {
475
475
  ...issueData,
476
476
  path: fullPath
@@ -552,10 +552,10 @@ var init_lib = __esm({
552
552
  errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
553
553
  })(errorUtil || (errorUtil = {}));
554
554
  ParseInputLazyPath = class {
555
- constructor(parent, value, path4, key) {
555
+ constructor(parent, value, path5, key) {
556
556
  this.parent = parent;
557
557
  this.data = value;
558
- this._path = path4;
558
+ this._path = path5;
559
559
  this._key = key;
560
560
  }
561
561
  get path() {
@@ -5774,7 +5774,7 @@ var require_ms = __commonJS({
5774
5774
  // node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
5775
5775
  var require_common = __commonJS({
5776
5776
  "node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports, module2) {
5777
- function setup(env2) {
5777
+ function setup(env3) {
5778
5778
  createDebug.debug = createDebug;
5779
5779
  createDebug.default = createDebug;
5780
5780
  createDebug.coerce = coerce2;
@@ -5783,8 +5783,8 @@ var require_common = __commonJS({
5783
5783
  createDebug.enabled = enabled;
5784
5784
  createDebug.humanize = require_ms();
5785
5785
  createDebug.destroy = destroy;
5786
- Object.keys(env2).forEach((key) => {
5787
- createDebug[key] = env2[key];
5786
+ Object.keys(env3).forEach((key) => {
5787
+ createDebug[key] = env3[key];
5788
5788
  });
5789
5789
  createDebug.names = [];
5790
5790
  createDebug.skips = [];
@@ -6120,23 +6120,23 @@ var require_has_flag = __commonJS({
6120
6120
  var require_supports_color = __commonJS({
6121
6121
  "node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) {
6122
6122
  "use strict";
6123
- var os2 = require("os");
6123
+ var os3 = require("os");
6124
6124
  var tty2 = require("tty");
6125
6125
  var hasFlag2 = require_has_flag();
6126
- var { env: env2 } = process;
6126
+ var { env: env3 } = process;
6127
6127
  var forceColor;
6128
6128
  if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
6129
6129
  forceColor = 0;
6130
6130
  } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
6131
6131
  forceColor = 1;
6132
6132
  }
6133
- if ("FORCE_COLOR" in env2) {
6134
- if (env2.FORCE_COLOR === "true") {
6133
+ if ("FORCE_COLOR" in env3) {
6134
+ if (env3.FORCE_COLOR === "true") {
6135
6135
  forceColor = 1;
6136
- } else if (env2.FORCE_COLOR === "false") {
6136
+ } else if (env3.FORCE_COLOR === "false") {
6137
6137
  forceColor = 0;
6138
6138
  } else {
6139
- forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
6139
+ forceColor = env3.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env3.FORCE_COLOR, 10), 3);
6140
6140
  }
6141
6141
  }
6142
6142
  function translateLevel2(level) {
@@ -6164,44 +6164,44 @@ var require_supports_color = __commonJS({
6164
6164
  return 0;
6165
6165
  }
6166
6166
  const min = forceColor || 0;
6167
- if (env2.TERM === "dumb") {
6167
+ if (env3.TERM === "dumb") {
6168
6168
  return min;
6169
6169
  }
6170
6170
  if (process.platform === "win32") {
6171
- const osRelease = os2.release().split(".");
6171
+ const osRelease = os3.release().split(".");
6172
6172
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
6173
6173
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
6174
6174
  }
6175
6175
  return 1;
6176
6176
  }
6177
- if ("CI" in env2) {
6178
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
6177
+ if ("CI" in env3) {
6178
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
6179
6179
  return 1;
6180
6180
  }
6181
6181
  return min;
6182
6182
  }
6183
- if ("TEAMCITY_VERSION" in env2) {
6184
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
6183
+ if ("TEAMCITY_VERSION" in env3) {
6184
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env3.TEAMCITY_VERSION) ? 1 : 0;
6185
6185
  }
6186
- if (env2.COLORTERM === "truecolor") {
6186
+ if (env3.COLORTERM === "truecolor") {
6187
6187
  return 3;
6188
6188
  }
6189
- if ("TERM_PROGRAM" in env2) {
6190
- const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
6191
- switch (env2.TERM_PROGRAM) {
6189
+ if ("TERM_PROGRAM" in env3) {
6190
+ const version = parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
6191
+ switch (env3.TERM_PROGRAM) {
6192
6192
  case "iTerm.app":
6193
6193
  return version >= 3 ? 3 : 2;
6194
6194
  case "Apple_Terminal":
6195
6195
  return 2;
6196
6196
  }
6197
6197
  }
6198
- if (/-256(color)?$/i.test(env2.TERM)) {
6198
+ if (/-256(color)?$/i.test(env3.TERM)) {
6199
6199
  return 2;
6200
6200
  }
6201
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
6201
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM)) {
6202
6202
  return 1;
6203
6203
  }
6204
- if ("COLORTERM" in env2) {
6204
+ if ("COLORTERM" in env3) {
6205
6205
  return 1;
6206
6206
  }
6207
6207
  return min;
@@ -6572,16 +6572,16 @@ var require_node2 = __commonJS({
6572
6572
  }
6573
6573
  exports2.urlGenerate = urlGenerate;
6574
6574
  function normalize(aPath) {
6575
- var path4 = aPath;
6575
+ var path5 = aPath;
6576
6576
  var url = urlParse(aPath);
6577
6577
  if (url) {
6578
6578
  if (!url.path) {
6579
6579
  return aPath;
6580
6580
  }
6581
- path4 = url.path;
6581
+ path5 = url.path;
6582
6582
  }
6583
- var isAbsolute = exports2.isAbsolute(path4);
6584
- var parts = path4.split(/\/+/);
6583
+ var isAbsolute = exports2.isAbsolute(path5);
6584
+ var parts = path5.split(/\/+/);
6585
6585
  for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
6586
6586
  part = parts[i];
6587
6587
  if (part === ".") {
@@ -6598,15 +6598,15 @@ var require_node2 = __commonJS({
6598
6598
  }
6599
6599
  }
6600
6600
  }
6601
- path4 = parts.join("/");
6602
- if (path4 === "") {
6603
- path4 = isAbsolute ? "/" : ".";
6601
+ path5 = parts.join("/");
6602
+ if (path5 === "") {
6603
+ path5 = isAbsolute ? "/" : ".";
6604
6604
  }
6605
6605
  if (url) {
6606
- url.path = path4;
6606
+ url.path = path5;
6607
6607
  return urlGenerate(url);
6608
6608
  }
6609
- return path4;
6609
+ return path5;
6610
6610
  }
6611
6611
  exports2.normalize = normalize;
6612
6612
  function join22(aRoot, aPath) {
@@ -7243,13 +7243,13 @@ var require_node2 = __commonJS({
7243
7243
  function randomIntInRange(low, high) {
7244
7244
  return Math.round(low + Math.random() * (high - low));
7245
7245
  }
7246
- function doQuickSort(ary, comparator, p, r) {
7247
- if (p < r) {
7248
- var pivotIndex = randomIntInRange(p, r);
7249
- var i = p - 1;
7246
+ function doQuickSort(ary, comparator, p2, r) {
7247
+ if (p2 < r) {
7248
+ var pivotIndex = randomIntInRange(p2, r);
7249
+ var i = p2 - 1;
7250
7250
  swap(ary, pivotIndex, r);
7251
7251
  var pivot = ary[r];
7252
- for (var j = p; j < r; j++) {
7252
+ for (var j = p2; j < r; j++) {
7253
7253
  if (comparator(ary[j], pivot) <= 0) {
7254
7254
  i += 1;
7255
7255
  swap(ary, i, j);
@@ -7257,7 +7257,7 @@ var require_node2 = __commonJS({
7257
7257
  }
7258
7258
  swap(ary, i + 1, j);
7259
7259
  var q = i + 1;
7260
- doQuickSort(ary, comparator, p, q - 1);
7260
+ doQuickSort(ary, comparator, p2, q - 1);
7261
7261
  doQuickSort(ary, comparator, q + 1, r);
7262
7262
  }
7263
7263
  }
@@ -8136,7 +8136,7 @@ var require_node2 = __commonJS({
8136
8136
  });
8137
8137
  var require_source_map_support = __commonJS2((exports2, module22) => {
8138
8138
  var SourceMapConsumer = require_source_map().SourceMapConsumer;
8139
- var path4 = require("path");
8139
+ var path5 = require("path");
8140
8140
  var fs32;
8141
8141
  try {
8142
8142
  fs32 = require("fs");
@@ -8209,15 +8209,15 @@ var require_node2 = __commonJS({
8209
8209
  function supportRelativeURL(file, url) {
8210
8210
  if (!file)
8211
8211
  return url;
8212
- var dir = path4.dirname(file);
8212
+ var dir = path5.dirname(file);
8213
8213
  var match2 = /^\w+:\/\/[^\/]*/.exec(dir);
8214
8214
  var protocol = match2 ? match2[0] : "";
8215
8215
  var startPath = dir.slice(protocol.length);
8216
8216
  if (protocol && /^\/\w\:/.test(startPath)) {
8217
8217
  protocol += "/";
8218
- return protocol + path4.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
8218
+ return protocol + path5.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
8219
8219
  }
8220
- return protocol + path4.resolve(dir.slice(protocol.length), url);
8220
+ return protocol + path5.resolve(dir.slice(protocol.length), url);
8221
8221
  }
8222
8222
  function retrieveSourceMapURL(source) {
8223
8223
  var fileData;
@@ -8697,7 +8697,7 @@ var require_node2 = __commonJS({
8697
8697
  });
8698
8698
  };
8699
8699
  }
8700
- var readFile = (fp) => new Promise((resolve2, reject) => {
8700
+ var readFile2 = (fp) => new Promise((resolve2, reject) => {
8701
8701
  _fs.default.readFile(fp, "utf8", (err2, data) => {
8702
8702
  if (err2)
8703
8703
  return reject(err2);
@@ -8895,7 +8895,7 @@ var require_node2 = __commonJS({
8895
8895
  data: _this3.packageJsonCache.get(filepath)[options.packageKey]
8896
8896
  };
8897
8897
  }
8898
- const data = _this3.options.parseJSON(yield readFile(filepath));
8898
+ const data = _this3.options.parseJSON(yield readFile2(filepath));
8899
8899
  return {
8900
8900
  path: filepath,
8901
8901
  data
@@ -8903,7 +8903,7 @@ var require_node2 = __commonJS({
8903
8903
  }
8904
8904
  return {
8905
8905
  path: filepath,
8906
- data: yield readFile(filepath)
8906
+ data: yield readFile2(filepath)
8907
8907
  };
8908
8908
  }
8909
8909
  return {};
@@ -9013,12 +9013,12 @@ var require_node2 = __commonJS({
9013
9013
  Object.defineProperty(exports2, "__esModule", { value: true });
9014
9014
  exports2.removeExtension = exports2.fileExistsAsync = exports2.readJsonFromDiskAsync = exports2.readJsonFromDiskSync = exports2.fileExistsSync = void 0;
9015
9015
  var fs32 = require("fs");
9016
- function fileExistsSync(path4) {
9017
- if (!fs32.existsSync(path4)) {
9016
+ function fileExistsSync(path5) {
9017
+ if (!fs32.existsSync(path5)) {
9018
9018
  return false;
9019
9019
  }
9020
9020
  try {
9021
- var stats = fs32.statSync(path4);
9021
+ var stats = fs32.statSync(path5);
9022
9022
  return stats.isFile();
9023
9023
  } catch (err2) {
9024
9024
  return false;
@@ -9032,8 +9032,8 @@ var require_node2 = __commonJS({
9032
9032
  return require(packageJsonPath);
9033
9033
  }
9034
9034
  exports2.readJsonFromDiskSync = readJsonFromDiskSync;
9035
- function readJsonFromDiskAsync(path4, callback) {
9036
- fs32.readFile(path4, "utf8", function(err2, result) {
9035
+ function readJsonFromDiskAsync(path5, callback) {
9036
+ fs32.readFile(path5, "utf8", function(err2, result) {
9037
9037
  if (err2 || !result) {
9038
9038
  return callback();
9039
9039
  }
@@ -9051,8 +9051,8 @@ var require_node2 = __commonJS({
9051
9051
  });
9052
9052
  }
9053
9053
  exports2.fileExistsAsync = fileExistsAsync;
9054
- function removeExtension(path4) {
9055
- return path4.substring(0, path4.lastIndexOf(".")) || path4;
9054
+ function removeExtension(path5) {
9055
+ return path5.substring(0, path5.lastIndexOf(".")) || path5;
9056
9056
  }
9057
9057
  exports2.removeExtension = removeExtension;
9058
9058
  });
@@ -9060,7 +9060,7 @@ var require_node2 = __commonJS({
9060
9060
  "use strict";
9061
9061
  Object.defineProperty(exports2, "__esModule", { value: true });
9062
9062
  exports2.getAbsoluteMappingEntries = void 0;
9063
- var path4 = require("path");
9063
+ var path5 = require("path");
9064
9064
  function getAbsoluteMappingEntries(absoluteBaseUrl, paths, addMatchAll) {
9065
9065
  var sortedKeys = sortByLongestPrefix(Object.keys(paths));
9066
9066
  var absolutePaths = [];
@@ -9069,7 +9069,7 @@ var require_node2 = __commonJS({
9069
9069
  absolutePaths.push({
9070
9070
  pattern: key,
9071
9071
  paths: paths[key].map(function(pathToResolve) {
9072
- return path4.resolve(absoluteBaseUrl, pathToResolve);
9072
+ return path5.resolve(absoluteBaseUrl, pathToResolve);
9073
9073
  })
9074
9074
  });
9075
9075
  }
@@ -9096,7 +9096,7 @@ var require_node2 = __commonJS({
9096
9096
  "use strict";
9097
9097
  Object.defineProperty(exports2, "__esModule", { value: true });
9098
9098
  exports2.exhaustiveTypeException = exports2.getStrippedPath = exports2.getPathsToTry = void 0;
9099
- var path4 = require("path");
9099
+ var path5 = require("path");
9100
9100
  var path_1 = require("path");
9101
9101
  var filesystem_1 = require_filesystem();
9102
9102
  function getPathsToTry(extensions, absolutePathMappings, requestedModule) {
@@ -9116,9 +9116,9 @@ var require_node2 = __commonJS({
9116
9116
  }));
9117
9117
  pathsToTry.push({
9118
9118
  type: "package",
9119
- path: path4.join(physicalPath, "/package.json")
9119
+ path: path5.join(physicalPath, "/package.json")
9120
9120
  });
9121
- var indexPath = path4.join(physicalPath, "/index");
9121
+ var indexPath = path5.join(physicalPath, "/index");
9122
9122
  pathsToTry.push.apply(pathsToTry, extensions.map(function(e) {
9123
9123
  return { type: "index", path: indexPath + e };
9124
9124
  }));
@@ -9166,7 +9166,7 @@ var require_node2 = __commonJS({
9166
9166
  "use strict";
9167
9167
  Object.defineProperty(exports2, "__esModule", { value: true });
9168
9168
  exports2.matchFromAbsolutePaths = exports2.createMatchPath = void 0;
9169
- var path4 = require("path");
9169
+ var path5 = require("path");
9170
9170
  var Filesystem = require_filesystem();
9171
9171
  var MappingEntry = require_mapping_entry();
9172
9172
  var TryPath = require_try_path();
@@ -9210,7 +9210,7 @@ var require_node2 = __commonJS({
9210
9210
  return obj[key];
9211
9211
  }, packageJson);
9212
9212
  if (candidateMapping && typeof candidateMapping === "string") {
9213
- var candidateFilePath = path4.join(path4.dirname(packageJsonPath), candidateMapping);
9213
+ var candidateFilePath = path5.join(path5.dirname(packageJsonPath), candidateMapping);
9214
9214
  if (fileExists(candidateFilePath)) {
9215
9215
  return candidateFilePath;
9216
9216
  }
@@ -9250,7 +9250,7 @@ var require_node2 = __commonJS({
9250
9250
  "use strict";
9251
9251
  Object.defineProperty(exports2, "__esModule", { value: true });
9252
9252
  exports2.matchFromAbsolutePathsAsync = exports2.createMatchPathAsync = void 0;
9253
- var path4 = require("path");
9253
+ var path5 = require("path");
9254
9254
  var TryPath = require_try_path();
9255
9255
  var MappingEntry = require_mapping_entry();
9256
9256
  var Filesystem = require_filesystem();
@@ -9304,7 +9304,7 @@ var require_node2 = __commonJS({
9304
9304
  if (typeof mainFieldMapping !== "string") {
9305
9305
  return tryNext();
9306
9306
  }
9307
- var mappedFilePath = path4.join(path4.dirname(packageJsonPath), mainFieldMapping);
9307
+ var mappedFilePath = path5.join(path5.dirname(packageJsonPath), mainFieldMapping);
9308
9308
  fileExistsAsync(mappedFilePath, function(err2, exists) {
9309
9309
  if (err2) {
9310
9310
  return doneCallback(err2);
@@ -9954,8 +9954,8 @@ var require_node2 = __commonJS({
9954
9954
  }
9955
9955
  function literal(s) {
9956
9956
  for (const c2 of s) {
9957
- const p = peek();
9958
- if (p !== c2) {
9957
+ const p2 = peek();
9958
+ if (p2 !== c2) {
9959
9959
  throw invalidChar(read());
9960
9960
  }
9961
9961
  read();
@@ -10469,9 +10469,9 @@ var require_node2 = __commonJS({
10469
10469
  __assign = Object.assign || function(t) {
10470
10470
  for (var s, i = 1, n = arguments.length; i < n; i++) {
10471
10471
  s = arguments[i];
10472
- for (var p in s)
10473
- if (Object.prototype.hasOwnProperty.call(s, p))
10474
- t[p] = s[p];
10472
+ for (var p2 in s)
10473
+ if (Object.prototype.hasOwnProperty.call(s, p2))
10474
+ t[p2] = s[p2];
10475
10475
  }
10476
10476
  return t;
10477
10477
  };
@@ -10479,7 +10479,7 @@ var require_node2 = __commonJS({
10479
10479
  };
10480
10480
  Object.defineProperty(exports2, "__esModule", { value: true });
10481
10481
  exports2.loadTsconfig = exports2.walkForTsConfig = exports2.tsConfigLoader = void 0;
10482
- var path4 = require("path");
10482
+ var path5 = require("path");
10483
10483
  var fs32 = require("fs");
10484
10484
  var JSON5 = require_lib32();
10485
10485
  var StripBom = require_strip_bom();
@@ -10509,14 +10509,14 @@ var require_node2 = __commonJS({
10509
10509
  }
10510
10510
  function resolveConfigPath(cwd, filename) {
10511
10511
  if (filename) {
10512
- var absolutePath = fs32.lstatSync(filename).isDirectory() ? path4.resolve(filename, "./tsconfig.json") : path4.resolve(cwd, filename);
10512
+ var absolutePath = fs32.lstatSync(filename).isDirectory() ? path5.resolve(filename, "./tsconfig.json") : path5.resolve(cwd, filename);
10513
10513
  return absolutePath;
10514
10514
  }
10515
10515
  if (fs32.statSync(cwd).isFile()) {
10516
- return path4.resolve(cwd);
10516
+ return path5.resolve(cwd);
10517
10517
  }
10518
10518
  var configAbsolutePath = walkForTsConfig(cwd);
10519
- return configAbsolutePath ? path4.resolve(configAbsolutePath) : void 0;
10519
+ return configAbsolutePath ? path5.resolve(configAbsolutePath) : void 0;
10520
10520
  }
10521
10521
  function walkForTsConfig(directory, readdirSync3) {
10522
10522
  if (readdirSync3 === void 0) {
@@ -10527,10 +10527,10 @@ var require_node2 = __commonJS({
10527
10527
  for (var _i = 0, filesToCheck_1 = filesToCheck; _i < filesToCheck_1.length; _i++) {
10528
10528
  var fileToCheck = filesToCheck_1[_i];
10529
10529
  if (files.indexOf(fileToCheck) !== -1) {
10530
- return path4.join(directory, fileToCheck);
10530
+ return path5.join(directory, fileToCheck);
10531
10531
  }
10532
10532
  }
10533
- var parentDirectory = path4.dirname(directory);
10533
+ var parentDirectory = path5.dirname(directory);
10534
10534
  if (directory === parentDirectory) {
10535
10535
  return void 0;
10536
10536
  }
@@ -10577,15 +10577,15 @@ var require_node2 = __commonJS({
10577
10577
  if (typeof extendedConfigValue === "string" && extendedConfigValue.indexOf(".json") === -1) {
10578
10578
  extendedConfigValue += ".json";
10579
10579
  }
10580
- var currentDir = path4.dirname(configFilePath);
10581
- var extendedConfigPath = path4.join(currentDir, extendedConfigValue);
10580
+ var currentDir = path5.dirname(configFilePath);
10581
+ var extendedConfigPath = path5.join(currentDir, extendedConfigValue);
10582
10582
  if (extendedConfigValue.indexOf("/") !== -1 && extendedConfigValue.indexOf(".") !== -1 && !existsSync4(extendedConfigPath)) {
10583
- extendedConfigPath = path4.join(currentDir, "node_modules", extendedConfigValue);
10583
+ extendedConfigPath = path5.join(currentDir, "node_modules", extendedConfigValue);
10584
10584
  }
10585
10585
  var config = loadTsconfig(extendedConfigPath, existsSync4, readFileSync4) || {};
10586
10586
  if ((_a3 = config.compilerOptions) === null || _a3 === void 0 ? void 0 : _a3.baseUrl) {
10587
- var extendsDir = path4.dirname(extendedConfigValue);
10588
- config.compilerOptions.baseUrl = path4.join(extendsDir, config.compilerOptions.baseUrl);
10587
+ var extendsDir = path5.dirname(extendedConfigValue);
10588
+ config.compilerOptions.baseUrl = path5.join(extendsDir, config.compilerOptions.baseUrl);
10589
10589
  }
10590
10590
  return config;
10591
10591
  }
@@ -10600,7 +10600,7 @@ var require_node2 = __commonJS({
10600
10600
  Object.defineProperty(exports2, "__esModule", { value: true });
10601
10601
  exports2.configLoader = exports2.loadConfig = void 0;
10602
10602
  var TsConfigLoader2 = require_tsconfig_loader();
10603
- var path4 = require("path");
10603
+ var path5 = require("path");
10604
10604
  function loadConfig2(cwd) {
10605
10605
  if (cwd === void 0) {
10606
10606
  cwd = process.cwd();
@@ -10611,7 +10611,7 @@ var require_node2 = __commonJS({
10611
10611
  function configLoader(_a3) {
10612
10612
  var cwd = _a3.cwd, explicitParams = _a3.explicitParams, _b = _a3.tsConfigLoader, tsConfigLoader = _b === void 0 ? TsConfigLoader2.tsConfigLoader : _b;
10613
10613
  if (explicitParams) {
10614
- var absoluteBaseUrl = path4.isAbsolute(explicitParams.baseUrl) ? explicitParams.baseUrl : path4.join(cwd, explicitParams.baseUrl);
10614
+ var absoluteBaseUrl = path5.isAbsolute(explicitParams.baseUrl) ? explicitParams.baseUrl : path5.join(cwd, explicitParams.baseUrl);
10615
10615
  return {
10616
10616
  resultType: "success",
10617
10617
  configFileAbsolutePath: "",
@@ -10638,7 +10638,7 @@ var require_node2 = __commonJS({
10638
10638
  resultType: "success",
10639
10639
  configFileAbsolutePath: loadResult.tsConfigPath,
10640
10640
  baseUrl: loadResult.baseUrl,
10641
- absoluteBaseUrl: path4.resolve(path4.dirname(loadResult.tsConfigPath), loadResult.baseUrl || ""),
10641
+ absoluteBaseUrl: path5.resolve(path5.dirname(loadResult.tsConfigPath), loadResult.baseUrl || ""),
10642
10642
  paths: loadResult.paths || {},
10643
10643
  addMatchAll: loadResult.baseUrl !== void 0
10644
10644
  };
@@ -11094,8 +11094,8 @@ var require_node2 = __commonJS({
11094
11094
  });
11095
11095
  var getOptions = (cwd) => {
11096
11096
  var _a3, _b, _c, _d;
11097
- const { data, path: path4 } = joycon.loadSync(["tsconfig.json", "jsconfig.json"], cwd);
11098
- if (path4 && data) {
11097
+ const { data, path: path5 } = joycon.loadSync(["tsconfig.json", "jsconfig.json"], cwd);
11098
+ if (path5 && data) {
11099
11099
  return {
11100
11100
  jsxFactory: (_a3 = data.compilerOptions) == null ? void 0 : _a3.jsxFactory,
11101
11101
  jsxFragment: (_b = data.compilerOptions) == null ? void 0 : _b.jsxFragmentFactory,
@@ -11261,7 +11261,7 @@ var require_node2 = __commonJS({
11261
11261
  });
11262
11262
 
11263
11263
  // src/cli/commands/utils.ts
11264
- var import_path, import_fs, import_hanji2, assertES5, safeRegister, prepareGenerateConfig, assertOutFolder, configCommonSchema, introspectCasing, configIntrospectSchema, configIntrospectCliSchema, configGenerateSchema, configPushSchema, mysqlConnectionSchema, mySqlCliConfigSchema, mySqlIntrospectConfigSchema, drizzleConfigFromFile, readDrizzleConfig;
11264
+ var import_path, import_fs, import_hanji2, assertES5, safeRegister, prepareGenerateConfig, assertOutFolder, driver, configCommonSchema, introspectCasing, configIntrospectSchema, configIntrospectCliSchema, configGenerateSchema, configPushSchema, mysqlConnectionSchema, mySqlCliConfigSchema, mySqlIntrospectConfigSchema, drizzleConfigFromFile, readDrizzleConfig;
11265
11265
  var init_utils = __esm({
11266
11266
  "src/cli/commands/utils.ts"() {
11267
11267
  init_serializer();
@@ -11324,7 +11324,8 @@ var init_utils = __esm({
11324
11324
  custom,
11325
11325
  breakpoints: drizzleConfig.breakpoints ?? false,
11326
11326
  schema: drizzleConfig.schema,
11327
- out: drizzleConfig.out
11327
+ out: drizzleConfig.out,
11328
+ bundle: drizzleConfig.driver === "expo"
11328
11329
  };
11329
11330
  }
11330
11331
  if (!schema4) {
@@ -11340,7 +11341,7 @@ var init_utils = __esm({
11340
11341
  console.error(`'out' param must be set`);
11341
11342
  process.exit(1);
11342
11343
  }
11343
- return { schema: schema4, out, breakpoints, custom };
11344
+ return { schema: schema4, out, breakpoints, custom, bundle: false };
11344
11345
  };
11345
11346
  assertOutFolder = async (it) => {
11346
11347
  if ("out" in it)
@@ -11356,10 +11357,20 @@ var init_utils = __esm({
11356
11357
  }
11357
11358
  return cliConfig.out;
11358
11359
  };
11360
+ driver = unionType([
11361
+ literalType("better-sqlite"),
11362
+ literalType("turso"),
11363
+ literalType("libsql"),
11364
+ literalType("d1"),
11365
+ literalType("expo"),
11366
+ literalType("pg"),
11367
+ literalType("mysql2")
11368
+ ]);
11359
11369
  configCommonSchema = objectType({
11360
11370
  schema: unionType([stringType(), stringType().array()]),
11361
11371
  out: stringType().optional(),
11362
11372
  breakpoints: booleanType().default(true),
11373
+ driver: driver.optional(),
11363
11374
  tablesFilter: unionType([stringType(), stringType().array()]).optional(),
11364
11375
  schemaFilter: unionType([stringType(), stringType().array()]).default(["public"])
11365
11376
  });
@@ -11432,14 +11443,14 @@ var init_utils = __esm({
11432
11443
  )
11433
11444
  );
11434
11445
  }
11435
- const path4 = (0, import_path.join)((0, import_path.resolve)(configPath ?? defaultConfigPath));
11436
- if (!(0, import_fs.existsSync)(path4)) {
11437
- console.log(`${path4} file does not exist`);
11446
+ const path5 = (0, import_path.join)((0, import_path.resolve)(configPath ?? defaultConfigPath));
11447
+ if (!(0, import_fs.existsSync)(path5)) {
11448
+ console.log(`${path5} file does not exist`);
11438
11449
  process.exit(1);
11439
11450
  }
11440
- console.log(source_default.grey(`Reading config file '${path4}'`));
11451
+ console.log(source_default.grey(`Reading config file '${path5}'`));
11441
11452
  const { unregister } = await safeRegister();
11442
- const required = require(`${path4}`);
11453
+ const required = require(`${path5}`);
11443
11454
  const content = required.default ?? required;
11444
11455
  unregister();
11445
11456
  const res = mySqlCliConfigSchema.safeParse(content);
@@ -11462,14 +11473,14 @@ var init_utils = __esm({
11462
11473
  if (!configPath) {
11463
11474
  console.log(source_default.gray(`No config path provided, using default path`));
11464
11475
  }
11465
- const path4 = (0, import_path.join)((0, import_path.resolve)(configPath ?? defaultConfigPath));
11466
- if (!(0, import_fs.existsSync)(path4)) {
11467
- console.log(source_default.red(`${path4} file does not exist`));
11476
+ const path5 = (0, import_path.join)((0, import_path.resolve)(configPath ?? defaultConfigPath));
11477
+ if (!(0, import_fs.existsSync)(path5)) {
11478
+ console.log(source_default.red(`${path5} file does not exist`));
11468
11479
  process.exit(1);
11469
11480
  }
11470
- console.log(source_default.grey(`Reading config file '${path4}'`));
11481
+ console.log(source_default.grey(`Reading config file '${path5}'`));
11471
11482
  const { unregister } = await safeRegister();
11472
- const required = require(`${path4}`);
11483
+ const required = require(`${path5}`);
11473
11484
  const content = required.default ?? required;
11474
11485
  unregister();
11475
11486
  return content;
@@ -11566,9 +11577,9 @@ var init_outputs = __esm({
11566
11577
  driver: () => withStyle.error(
11567
11578
  `Either "turso", "libsql", "better-sqlite" are available options for "--driver"`
11568
11579
  ),
11569
- url: (driver) => withStyle.error(`"url" is a required option for driver "${driver}". You can read more about drizzle.config: https://orm.drizzle.team/kit-docs/config-reference`),
11570
- authToken: (driver) => withStyle.error(
11571
- `"authToken" is a required option for driver "${driver}". You can read more about drizzle.config: https://orm.drizzle.team/kit-docs/config-reference`
11580
+ url: (driver2) => withStyle.error(`"url" is a required option for driver "${driver2}". You can read more about drizzle.config: https://orm.drizzle.team/kit-docs/config-reference`),
11581
+ authToken: (driver2) => withStyle.error(
11582
+ `"authToken" is a required option for driver "${driver2}". You can read more about drizzle.config: https://orm.drizzle.team/kit-docs/config-reference`
11572
11583
  )
11573
11584
  },
11574
11585
  introspect: {},
@@ -12162,10 +12173,9 @@ var pgSerializer_exports = {};
12162
12173
  __export(pgSerializer_exports, {
12163
12174
  fromDatabase: () => fromDatabase2,
12164
12175
  generatePgSnapshot: () => generatePgSnapshot,
12165
- indexName: () => indexName2,
12166
- toDrizzle: () => toDrizzle
12176
+ indexName: () => indexName2
12167
12177
  });
12168
- var import_pg_core2, import_pg_core3, import_drizzle_orm5, dialect4, indexName2, generatePgSnapshot, trimChar, fromDatabase2, columnToDefault, defaultForColumn, toDrizzle;
12178
+ var import_pg_core2, import_pg_core3, import_drizzle_orm5, dialect4, indexName2, generatePgSnapshot, trimChar, fromDatabase2, columnToDefault, defaultForColumn;
12169
12179
  var init_pgSerializer = __esm({
12170
12180
  "src/serializer/pgSerializer.ts"() {
12171
12181
  import_pg_core2 = require("drizzle-orm/pg-core");
@@ -12795,108 +12805,6 @@ ${withStyle.errorWarning(
12795
12805
  }
12796
12806
  }
12797
12807
  };
12798
- toDrizzle = (schema4, schemaName) => {
12799
- const tables = {};
12800
- Object.values(schema4.tables).forEach((t) => {
12801
- const columns = {};
12802
- Object.values(t.columns).forEach((c) => {
12803
- const columnName = c.name;
12804
- const type = c.type;
12805
- let columnBuilder;
12806
- if (type === "bigint") {
12807
- columnBuilder = new import_pg_core2.PgBigInt53Builder(columnName);
12808
- } else if (type === "bigserial") {
12809
- columnBuilder = new import_pg_core2.PgBigSerial53Builder(columnName);
12810
- } else if (type === "boolean") {
12811
- columnBuilder = new import_pg_core2.PgBooleanBuilder(columnName);
12812
- } else if (type === "cidr") {
12813
- columnBuilder = new import_pg_core2.PgCidrBuilder(columnName);
12814
- } else if (type === "date") {
12815
- columnBuilder = new import_pg_core2.PgDateBuilder(columnName);
12816
- } else if (type === "double precision") {
12817
- columnBuilder = new import_pg_core2.PgDoublePrecisionBuilder(columnName);
12818
- } else if (type === "inet") {
12819
- columnBuilder = new import_pg_core2.PgInetBuilder(columnName);
12820
- } else if (type === "integer") {
12821
- columnBuilder = new import_pg_core2.PgIntegerBuilder(columnName);
12822
- } else if (type === "interval" || type.startsWith("interval ")) {
12823
- columnBuilder = new import_pg_core2.PgIntervalBuilder(columnName, {});
12824
- } else if (type === "json") {
12825
- columnBuilder = new import_pg_core2.PgJsonBuilder(columnName);
12826
- } else if (type === "jsonb") {
12827
- columnBuilder = new import_pg_core2.PgJsonbBuilder(columnName);
12828
- } else if (type === "macaddr") {
12829
- columnBuilder = new import_pg_core2.PgMacaddrBuilder(columnName);
12830
- } else if (type === "macaddr8") {
12831
- columnBuilder = new import_pg_core2.PgMacaddr8Builder(columnName);
12832
- } else if (type === "numeric" || type.startsWith("numeric(")) {
12833
- columnBuilder = new import_pg_core2.PgNumericBuilder(columnName);
12834
- } else if (type === "real") {
12835
- columnBuilder = new import_pg_core2.PgRealBuilder(columnName);
12836
- } else if (type === "serial") {
12837
- columnBuilder = new import_pg_core2.PgSerialBuilder(columnName);
12838
- } else if (type === "smallint") {
12839
- columnBuilder = new import_pg_core2.PgSmallIntBuilder(columnName);
12840
- } else if (type === "smallserial") {
12841
- columnBuilder = new import_pg_core2.PgSmallSerialBuilder(columnName);
12842
- } else if (type === "text") {
12843
- columnBuilder = new import_pg_core2.PgTextBuilder(columnName, {});
12844
- } else if (type === "time" || type.startsWith("time(") || type === "time with time zone") {
12845
- columnBuilder = new import_pg_core2.PgTimeBuilder(columnName, false, void 0);
12846
- } else if (type === "timestamp" || type.startsWith("timestamp(") || type === "timestamp with time zone") {
12847
- columnBuilder = new import_pg_core2.PgTimestampBuilder(columnName, false, void 0);
12848
- } else if (type === "uuid") {
12849
- columnBuilder = new import_pg_core2.PgUUIDBuilder(columnName);
12850
- } else if (type === "varchar" || type.startsWith("varchar(")) {
12851
- columnBuilder = new import_pg_core2.PgVarcharBuilder(columnName, {});
12852
- } else if (type === "char" || type.startsWith("char(")) {
12853
- columnBuilder = new import_pg_core2.PgCharBuilder(columnName, {});
12854
- } else {
12855
- columnBuilder = (0, import_pg_core2.customType)({
12856
- dataType() {
12857
- return type;
12858
- }
12859
- })(columnName);
12860
- }
12861
- if (c.notNull) {
12862
- columnBuilder = columnBuilder.notNull();
12863
- }
12864
- if (c.default) {
12865
- columnBuilder = columnBuilder.default(c.default);
12866
- }
12867
- if (c.primaryKey) {
12868
- columnBuilder = columnBuilder.primaryKey();
12869
- }
12870
- columns[columnName] = columnBuilder;
12871
- });
12872
- if (schemaName === "public") {
12873
- tables[t.name] = (0, import_pg_core2.pgTable)(t.name, columns, (cb) => {
12874
- const res = {};
12875
- Object.values(t.compositePrimaryKeys).forEach((cpk) => {
12876
- const gh = cpk.columns.map((c) => cb[c]);
12877
- res[cpk.name] = new import_pg_core2.PrimaryKeyBuilder(
12878
- gh,
12879
- cpk.name
12880
- );
12881
- });
12882
- return res;
12883
- });
12884
- } else {
12885
- tables[t.name] = (0, import_pg_core2.pgSchema)(schemaName).table(t.name, columns, (cb) => {
12886
- const res = {};
12887
- Object.values(t.compositePrimaryKeys).forEach((cpk) => {
12888
- const gh = cpk.columns.map((c) => cb[c]);
12889
- res[cpk.name] = new import_pg_core2.PrimaryKeyBuilder(
12890
- gh,
12891
- cpk.name
12892
- );
12893
- });
12894
- return res;
12895
- });
12896
- }
12897
- });
12898
- return tables;
12899
- };
12900
12808
  }
12901
12809
  });
12902
12810
 
@@ -12935,8 +12843,7 @@ var init_sqliteImports = __esm({
12935
12843
  var sqliteSerializer_exports = {};
12936
12844
  __export(sqliteSerializer_exports, {
12937
12845
  fromDatabase: () => fromDatabase3,
12938
- generateSqliteSnapshot: () => generateSqliteSnapshot,
12939
- toDrizzle: () => toDrizzle2
12846
+ generateSqliteSnapshot: () => generateSqliteSnapshot
12940
12847
  });
12941
12848
  function mapSqlToSqliteType(sqlType) {
12942
12849
  if ([
@@ -12973,7 +12880,7 @@ function mapSqlToSqliteType(sqlType) {
12973
12880
  return "numeric";
12974
12881
  }
12975
12882
  }
12976
- var import_drizzle_orm7, import_sqlite_core2, dialect5, generateSqliteSnapshot, fromDatabase3, toDrizzle2;
12883
+ var import_drizzle_orm7, import_sqlite_core2, dialect5, generateSqliteSnapshot, fromDatabase3;
12977
12884
  var init_sqliteSerializer = __esm({
12978
12885
  "src/serializer/sqliteSerializer.ts"() {
12979
12886
  import_drizzle_orm7 = require("drizzle-orm");
@@ -13341,50 +13248,6 @@ WHERE
13341
13248
  }
13342
13249
  };
13343
13250
  };
13344
- toDrizzle2 = (schema4) => {
13345
- const tables = {};
13346
- Object.values(schema4.tables).forEach((t) => {
13347
- const columns = {};
13348
- Object.values(t.columns).forEach((c) => {
13349
- const columnName = c.name;
13350
- const type = c.type;
13351
- let columnBuilder;
13352
- if (type === "integer") {
13353
- columnBuilder = new import_sqlite_core2.SQLiteIntegerBuilder(columnName);
13354
- } else if (type === "text") {
13355
- columnBuilder = new import_sqlite_core2.SQLiteTextBuilder(columnName, {});
13356
- } else if (type === "blob") {
13357
- columnBuilder = new import_sqlite_core2.SQLiteBlobBufferBuilder(columnName);
13358
- } else if (type === "real") {
13359
- columnBuilder = new import_sqlite_core2.SQLiteRealBuilder(columnName);
13360
- } else {
13361
- columnBuilder = new import_sqlite_core2.SQLiteNumericBuilder(columnName);
13362
- }
13363
- if (c.notNull) {
13364
- columnBuilder = columnBuilder.notNull();
13365
- }
13366
- if (c.default) {
13367
- columnBuilder = columnBuilder.default(c.default);
13368
- }
13369
- if (c.primaryKey) {
13370
- columnBuilder = columnBuilder.primaryKey();
13371
- }
13372
- columns[columnName] = columnBuilder;
13373
- });
13374
- tables[t.name] = (0, import_sqlite_core2.sqliteTable)(t.name, columns, (cb) => {
13375
- const res = {};
13376
- Object.values(t.compositePrimaryKeys).forEach((cpk) => {
13377
- const gh = cpk.columns.map((c) => cb[c]);
13378
- res[cpk.name] = new import_sqlite_core2.PrimaryKeyBuilder(
13379
- gh,
13380
- cpk.name
13381
- );
13382
- });
13383
- return res;
13384
- });
13385
- });
13386
- return tables;
13387
- };
13388
13251
  }
13389
13252
  });
13390
13253
 
@@ -13418,8 +13281,8 @@ var init_serializer = __esm({
13418
13281
  }
13419
13282
  }).sql;
13420
13283
  };
13421
- serializeMySql = async (path4) => {
13422
- const filenames = prepareFilenames(path4);
13284
+ serializeMySql = async (path5) => {
13285
+ const filenames = prepareFilenames(path5);
13423
13286
  console.log(source_default.gray(`Reading schema files:
13424
13287
  ${filenames.join("\n")}
13425
13288
  `));
@@ -13428,25 +13291,25 @@ ${filenames.join("\n")}
13428
13291
  const { tables, enums, schemas } = await prepareFromMySqlImports2(filenames);
13429
13292
  return generateMySqlSnapshot2(tables, enums, schemas);
13430
13293
  };
13431
- serializePg = async (path4, schemaFilter) => {
13432
- const filenames = prepareFilenames(path4);
13294
+ serializePg = async (path5, schemaFilter) => {
13295
+ const filenames = prepareFilenames(path5);
13433
13296
  const { prepareFromPgImports: prepareFromPgImports2 } = await Promise.resolve().then(() => (init_pgImports(), pgImports_exports));
13434
13297
  const { generatePgSnapshot: generatePgSnapshot2 } = await Promise.resolve().then(() => (init_pgSerializer(), pgSerializer_exports));
13435
13298
  const { tables, enums, schemas } = await prepareFromPgImports2(filenames);
13436
13299
  return generatePgSnapshot2(tables, enums, schemas, schemaFilter);
13437
13300
  };
13438
- serializeSQLite = async (path4) => {
13439
- const filenames = prepareFilenames(path4);
13301
+ serializeSQLite = async (path5) => {
13302
+ const filenames = prepareFilenames(path5);
13440
13303
  const { prepareFromSqliteImports: prepareFromSqliteImports2 } = await Promise.resolve().then(() => (init_sqliteImports(), sqliteImports_exports));
13441
13304
  const { generateSqliteSnapshot: generateSqliteSnapshot2 } = await Promise.resolve().then(() => (init_sqliteSerializer(), sqliteSerializer_exports));
13442
13305
  const { tables, enums } = await prepareFromSqliteImports2(filenames);
13443
13306
  return generateSqliteSnapshot2(tables, enums);
13444
13307
  };
13445
- prepareFilenames = (path4) => {
13446
- if (typeof path4 === "string") {
13447
- path4 = [path4];
13308
+ prepareFilenames = (path5) => {
13309
+ if (typeof path5 === "string") {
13310
+ path5 = [path5];
13448
13311
  }
13449
- const result = path4.reduce((result2, cur) => {
13312
+ const result = path5.reduce((result2, cur) => {
13450
13313
  const globbed = glob.sync(cur);
13451
13314
  globbed.forEach((it) => {
13452
13315
  const fileName = import_fs2.default.lstatSync(it).isDirectory() ? null : import_path2.default.resolve(it);
@@ -13460,7 +13323,7 @@ ${filenames.join("\n")}
13460
13323
  return !(it.endsWith(".ts") || it.endsWith(".js") || it.endsWith(".cjs") || it.endsWith(".mjs") || it.endsWith(".mts") || it.endsWith(".cts"));
13461
13324
  });
13462
13325
  if (res.length === 0) {
13463
- console.log(error(`No schema files found for path config [${path4.map((it) => `'${it}'`).join(", ")}]`));
13326
+ console.log(error(`No schema files found for path config [${path5.map((it) => `'${it}'`).join(", ")}]`));
13464
13327
  console.log(error(`If path represents a file - please make sure to use .ts or other extension in the path`));
13465
13328
  process.exit(1);
13466
13329
  }
@@ -14904,6 +14767,7 @@ var init_words = __esm({
14904
14767
  var migrate_exports = {};
14905
14768
  __export(migrate_exports, {
14906
14769
  BREAKPOINT: () => BREAKPOINT,
14770
+ embeddedMigrations: () => embeddedMigrations,
14907
14771
  prepareAndMigrateMySql: () => prepareAndMigrateMySql,
14908
14772
  prepareAndMigratePg: () => prepareAndMigratePg,
14909
14773
  prepareAndMigrateSqlite: () => prepareAndMigrateSqlite,
@@ -14914,7 +14778,7 @@ __export(migrate_exports, {
14914
14778
  prepareSnapshotFolderName: () => prepareSnapshotFolderName,
14915
14779
  writeResult: () => writeResult
14916
14780
  });
14917
- var import_fs4, import_path3, import_hanji3, prepareAndMigratePg, prepareMySQLPush, prepareSQLitePush, preparePgPush, prepareAndMigrateMySql, prepareAndMigrateSqlite, prepareSQL, promptColumnsConflicts, promptTablesConflict, promptSchemasConflict, BREAKPOINT, writeResult, prepareSnapshotFolderName, two;
14781
+ var import_fs4, import_path3, import_hanji3, prepareAndMigratePg, prepareMySQLPush, prepareSQLitePush, preparePgPush, prepareAndMigrateMySql, prepareAndMigrateSqlite, prepareSQL, promptColumnsConflicts, promptTablesConflict, promptSchemasConflict, BREAKPOINT, writeResult, embeddedMigrations, prepareSnapshotFolderName, two;
14918
14782
  var init_migrate = __esm({
14919
14783
  "src/cli/commands/migrate.ts"() {
14920
14784
  import_fs4 = __toESM(require("fs"));
@@ -14943,19 +14807,14 @@ var init_migrate = __esm({
14943
14807
  const validatedPrev = pgSchema.parse(prev);
14944
14808
  const validatedCur = pgSchema.parse(cur);
14945
14809
  if (config.custom) {
14946
- writeResult(
14947
- custom,
14948
- [],
14810
+ writeResult({
14811
+ cur: custom,
14812
+ sqlStatements: [],
14949
14813
  journal,
14950
- {
14951
- columns: {},
14952
- schemas: {},
14953
- tables: {}
14954
- },
14955
14814
  outFolder,
14956
- config.breakpoints,
14957
- "custom"
14958
- );
14815
+ breakpoints: config.breakpoints,
14816
+ type: "custom"
14817
+ });
14959
14818
  return;
14960
14819
  }
14961
14820
  const squashedPrev = squashPgScheme(validatedPrev);
@@ -14967,14 +14826,13 @@ var init_migrate = __esm({
14967
14826
  validatedPrev,
14968
14827
  validatedCur
14969
14828
  );
14970
- writeResult(
14829
+ writeResult({
14971
14830
  cur,
14972
14831
  sqlStatements,
14973
14832
  journal,
14974
- _meta,
14975
14833
  outFolder,
14976
- config.breakpoints
14977
- );
14834
+ breakpoints: config.breakpoints
14835
+ });
14978
14836
  } catch (e) {
14979
14837
  console.error(e);
14980
14838
  }
@@ -15068,19 +14926,14 @@ var init_migrate = __esm({
15068
14926
  const validatedPrev = mysqlSchema.parse(prev);
15069
14927
  const validatedCur = mysqlSchema.parse(cur);
15070
14928
  if (config.custom) {
15071
- writeResult(
15072
- custom,
15073
- [],
14929
+ writeResult({
14930
+ cur: custom,
14931
+ sqlStatements: [],
15074
14932
  journal,
15075
- {
15076
- columns: {},
15077
- schemas: {},
15078
- tables: {}
15079
- },
15080
14933
  outFolder,
15081
- config.breakpoints,
15082
- "custom"
15083
- );
14934
+ breakpoints: config.breakpoints,
14935
+ type: "custom"
14936
+ });
15084
14937
  return;
15085
14938
  }
15086
14939
  const squashedPrev = squashMysqlScheme(validatedPrev);
@@ -15092,14 +14945,14 @@ var init_migrate = __esm({
15092
14945
  validatedPrev,
15093
14946
  validatedCur
15094
14947
  );
15095
- writeResult(
14948
+ writeResult({
15096
14949
  cur,
15097
14950
  sqlStatements,
15098
14951
  journal,
15099
14952
  _meta,
15100
14953
  outFolder,
15101
- config.breakpoints
15102
- );
14954
+ breakpoints: config.breakpoints
14955
+ });
15103
14956
  } catch (e) {
15104
14957
  console.error(e);
15105
14958
  }
@@ -15117,19 +14970,15 @@ var init_migrate = __esm({
15117
14970
  const validatedPrev = sqliteSchema.parse(prev);
15118
14971
  const validatedCur = sqliteSchema.parse(cur);
15119
14972
  if (config.custom) {
15120
- writeResult(
15121
- custom,
15122
- [],
14973
+ writeResult({
14974
+ cur: custom,
14975
+ sqlStatements: [],
15123
14976
  journal,
15124
- {
15125
- columns: {},
15126
- schemas: {},
15127
- tables: {}
15128
- },
15129
14977
  outFolder,
15130
- config.breakpoints,
15131
- "custom"
15132
- );
14978
+ breakpoints: config.breakpoints,
14979
+ bundle: config.bundle,
14980
+ type: "custom"
14981
+ });
15133
14982
  return;
15134
14983
  }
15135
14984
  const squashedPrev = squashSqliteScheme(validatedPrev);
@@ -15139,14 +14988,15 @@ var init_migrate = __esm({
15139
14988
  squashedCur,
15140
14989
  "sqlite"
15141
14990
  );
15142
- writeResult(
14991
+ writeResult({
15143
14992
  cur,
15144
14993
  sqlStatements,
15145
14994
  journal,
15146
14995
  _meta,
15147
14996
  outFolder,
15148
- config.breakpoints
15149
- );
14997
+ breakpoints: config.breakpoints,
14998
+ bundle: config.bundle
14999
+ });
15150
15000
  } catch (e) {
15151
15001
  console.error(e);
15152
15002
  }
@@ -15334,7 +15184,20 @@ var init_migrate = __esm({
15334
15184
  return result;
15335
15185
  };
15336
15186
  BREAKPOINT = "--> statement-breakpoint\n";
15337
- writeResult = (cur, sqlStatements, journal, _meta, outFolder, breakpoints, type = "none") => {
15187
+ writeResult = ({
15188
+ cur,
15189
+ sqlStatements,
15190
+ journal,
15191
+ _meta = {
15192
+ columns: {},
15193
+ schemas: {},
15194
+ tables: {}
15195
+ },
15196
+ outFolder,
15197
+ breakpoints,
15198
+ bundle = false,
15199
+ type = "none"
15200
+ }) => {
15338
15201
  if (type === "none") {
15339
15202
  console.log(schema(cur));
15340
15203
  if (sqlStatements.length === 0) {
@@ -15375,6 +15238,10 @@ ${sql2}
15375
15238
  });
15376
15239
  import_fs4.default.writeFileSync(metaJournal, JSON.stringify(journal, null, 2));
15377
15240
  import_fs4.default.writeFileSync(`${outFolder}/${tag}.sql`, sql2);
15241
+ if (bundle) {
15242
+ const js = embeddedMigrations(journal);
15243
+ import_fs4.default.writeFileSync(`${outFolder}/migrations.js`, js);
15244
+ }
15378
15245
  (0, import_hanji3.render)(
15379
15246
  `[${source_default.green(
15380
15247
  "\u2713"
@@ -15383,6 +15250,23 @@ ${sql2}
15383
15250
  )} \u{1F680}`
15384
15251
  );
15385
15252
  };
15253
+ embeddedMigrations = (journal) => {
15254
+ let content = "// This file is required for Expo/React Native SQLite migrations - https://orm.drizzle.team/quick-sqlite/expo\n\n";
15255
+ content += "import journal from './meta/_journal.json';\n";
15256
+ journal.entries.forEach((entry) => {
15257
+ content += `import m${entry.idx.toString().padStart(4, "0")} from './${entry.tag}.sql';
15258
+ `;
15259
+ });
15260
+ content += `
15261
+ export default {
15262
+ journal,
15263
+ migrations: {
15264
+ ${journal.entries.map((it) => `m${it.idx.toString().padStart(4, "0")}`).join(",\n")}
15265
+ }
15266
+ }
15267
+ `;
15268
+ return content;
15269
+ };
15386
15270
  prepareSnapshotFolderName = () => {
15387
15271
  const now = /* @__PURE__ */ new Date();
15388
15272
  return `${now.getFullYear()}${two(now.getUTCMonth() + 1)}${two(
@@ -17982,11 +17866,11 @@ var init_pgUp = __esm({
17982
17866
  path: it,
17983
17867
  raw: report.rawMap[it]
17984
17868
  })).forEach((it) => {
17985
- const path4 = it.path;
17869
+ const path5 = it.path;
17986
17870
  const result = updateUpToV4(it.raw, prevId);
17987
17871
  prevId = result.id;
17988
- console.log(`[${source_default.green("\u2713")}] ${path4}`);
17989
- (0, import_fs5.writeFileSync)(path4, JSON.stringify(result, null, 2));
17872
+ console.log(`[${source_default.green("\u2713")}] ${path5}`);
17873
+ (0, import_fs5.writeFileSync)(path5, JSON.stringify(result, null, 2));
17990
17874
  });
17991
17875
  console.log("Everything's fine \u{1F436}\u{1F525}");
17992
17876
  };
@@ -18237,10 +18121,10 @@ var init_mysqlUp = __esm({
18237
18121
  path: it,
18238
18122
  raw: report.rawMap[it]
18239
18123
  })).forEach((it) => {
18240
- const path4 = it.path;
18124
+ const path5 = it.path;
18241
18125
  const result = updateToLatestV4(it.raw);
18242
- console.log(`[${source_default.green("\u2713")}] ${path4}`);
18243
- import_fs6.default.writeFileSync(path4, JSON.stringify(result, null, 2));
18126
+ console.log(`[${source_default.green("\u2713")}] ${path5}`);
18127
+ import_fs6.default.writeFileSync(path5, JSON.stringify(result, null, 2));
18244
18128
  });
18245
18129
  console.log("Everything's fine \u{1F436}\u{1F525}");
18246
18130
  };
@@ -18733,7 +18617,7 @@ var init_upFolders = __esm({
18733
18617
  date.setUTCMinutes(Number(it.substring(10, 12)));
18734
18618
  date.setUTCSeconds(Number(it.substring(12, 14)));
18735
18619
  date.setUTCMilliseconds(0);
18736
- const path4 = (0, import_path4.join)(out, it);
18620
+ const path5 = (0, import_path4.join)(out, it);
18737
18621
  const pathJson = (0, import_path4.join)(out, it, "snapshot.json");
18738
18622
  const pathSQL = (0, import_path4.join)(out, it, "migration.sql");
18739
18623
  const snapshot = JSON.parse((0, import_fs7.readFileSync)(pathJson).toString());
@@ -18744,7 +18628,7 @@ var init_upFolders = __esm({
18744
18628
  json: snapshot,
18745
18629
  date,
18746
18630
  sql: sql2,
18747
- path: path4
18631
+ path: path5
18748
18632
  });
18749
18633
  res2.idx += 1;
18750
18634
  return res2;
@@ -19645,14 +19529,14 @@ var require_brace_expansion = __commonJS({
19645
19529
  var pre = m.pre;
19646
19530
  var body = m.body;
19647
19531
  var post = m.post;
19648
- var p = pre.split(",");
19649
- p[p.length - 1] += "{" + body + "}";
19532
+ var p2 = pre.split(",");
19533
+ p2[p2.length - 1] += "{" + body + "}";
19650
19534
  var postParts = parseCommaParts(post);
19651
19535
  if (post.length) {
19652
- p[p.length - 1] += postParts.shift();
19653
- p.push.apply(p, postParts);
19536
+ p2[p2.length - 1] += postParts.shift();
19537
+ p2.push.apply(p2, postParts);
19654
19538
  }
19655
- parts.push.apply(parts, p);
19539
+ parts.push.apply(parts, p2);
19656
19540
  return parts;
19657
19541
  }
19658
19542
  function expandTop(str) {
@@ -19707,8 +19591,8 @@ var require_brace_expansion = __commonJS({
19707
19591
  if (n.length === 1) {
19708
19592
  n = expand2(n[0], false).map(embrace);
19709
19593
  if (n.length === 1) {
19710
- return post.map(function(p) {
19711
- return m.pre + n[0] + p;
19594
+ return post.map(function(p2) {
19595
+ return m.pre + n[0] + p2;
19712
19596
  });
19713
19597
  }
19714
19598
  }
@@ -19912,12 +19796,12 @@ var init_mjs = __esm({
19912
19796
  init_unescape();
19913
19797
  init_escape();
19914
19798
  init_unescape();
19915
- minimatch = (p, pattern, options = {}) => {
19799
+ minimatch = (p2, pattern, options = {}) => {
19916
19800
  assertValidPattern(pattern);
19917
19801
  if (!options.nocomment && pattern.charAt(0) === "#") {
19918
19802
  return false;
19919
19803
  }
19920
- return new Minimatch(pattern, options).match(p);
19804
+ return new Minimatch(pattern, options).match(p2);
19921
19805
  };
19922
19806
  starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
19923
19807
  starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
@@ -19995,7 +19879,7 @@ var init_mjs = __esm({
19995
19879
  }, {});
19996
19880
  reSpecials = charSet("().*{}+?[]^$\\!");
19997
19881
  addPatternStartSet = charSet("[.(");
19998
- filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
19882
+ filter = (pattern, options = {}) => (p2) => minimatch(p2, pattern, options);
19999
19883
  minimatch.filter = filter;
20000
19884
  ext = (a, b = {}) => Object.assign({}, a, b);
20001
19885
  defaults = (def) => {
@@ -20003,7 +19887,7 @@ var init_mjs = __esm({
20003
19887
  return minimatch;
20004
19888
  }
20005
19889
  const orig = minimatch;
20006
- const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
19890
+ const m = (p2, pattern, options = {}) => orig(p2, pattern, ext(def, options));
20007
19891
  return Object.assign(m, {
20008
19892
  Minimatch: class Minimatch extends orig.Minimatch {
20009
19893
  constructor(pattern, options = {}) {
@@ -20149,9 +20033,9 @@ var init_mjs = __esm({
20149
20033
  this.set = set2.filter((s) => s.indexOf(false) === -1);
20150
20034
  if (this.isWindows) {
20151
20035
  for (let i = 0; i < this.set.length; i++) {
20152
- const p = this.set[i];
20153
- if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
20154
- p[2] = "?";
20036
+ const p2 = this.set[i];
20037
+ if (p2[0] === "" && p2[1] === "" && this.globParts[i][2] === "?" && typeof p2[3] === "string" && /^[a-z]:$/i.test(p2[3])) {
20038
+ p2[2] = "?";
20155
20039
  }
20156
20040
  }
20157
20041
  }
@@ -20228,10 +20112,10 @@ var init_mjs = __esm({
20228
20112
  didSomething = false;
20229
20113
  if (!this.preserveMultipleSlashes) {
20230
20114
  for (let i = 1; i < parts.length - 1; i++) {
20231
- const p = parts[i];
20232
- if (i === 1 && p === "" && parts[0] === "")
20115
+ const p2 = parts[i];
20116
+ if (i === 1 && p2 === "" && parts[0] === "")
20233
20117
  continue;
20234
- if (p === "." || p === "") {
20118
+ if (p2 === "." || p2 === "") {
20235
20119
  didSomething = true;
20236
20120
  parts.splice(i, 1);
20237
20121
  i--;
@@ -20244,8 +20128,8 @@ var init_mjs = __esm({
20244
20128
  }
20245
20129
  let dd = 0;
20246
20130
  while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
20247
- const p = parts[dd - 1];
20248
- if (p && p !== "." && p !== ".." && p !== "**") {
20131
+ const p2 = parts[dd - 1];
20132
+ if (p2 && p2 !== "." && p2 !== ".." && p2 !== "**") {
20249
20133
  didSomething = true;
20250
20134
  parts.splice(dd - 1, 2);
20251
20135
  dd -= 2;
@@ -20287,11 +20171,11 @@ var init_mjs = __esm({
20287
20171
  parts.splice(gs + 1, gss - gs);
20288
20172
  }
20289
20173
  let next = parts[gs + 1];
20290
- const p = parts[gs + 2];
20291
- const p2 = parts[gs + 3];
20174
+ const p2 = parts[gs + 2];
20175
+ const p22 = parts[gs + 3];
20292
20176
  if (next !== "..")
20293
20177
  continue;
20294
- if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
20178
+ if (!p2 || p2 === "." || p2 === ".." || !p22 || p22 === "." || p22 === "..") {
20295
20179
  continue;
20296
20180
  }
20297
20181
  didSomething = true;
@@ -20303,10 +20187,10 @@ var init_mjs = __esm({
20303
20187
  }
20304
20188
  if (!this.preserveMultipleSlashes) {
20305
20189
  for (let i = 1; i < parts.length - 1; i++) {
20306
- const p = parts[i];
20307
- if (i === 1 && p === "" && parts[0] === "")
20190
+ const p2 = parts[i];
20191
+ if (i === 1 && p2 === "" && parts[0] === "")
20308
20192
  continue;
20309
- if (p === "." || p === "") {
20193
+ if (p2 === "." || p2 === "") {
20310
20194
  didSomething = true;
20311
20195
  parts.splice(i, 1);
20312
20196
  i--;
@@ -20319,8 +20203,8 @@ var init_mjs = __esm({
20319
20203
  }
20320
20204
  let dd = 0;
20321
20205
  while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
20322
- const p = parts[dd - 1];
20323
- if (p && p !== "." && p !== ".." && p !== "**") {
20206
+ const p2 = parts[dd - 1];
20207
+ if (p2 && p2 !== "." && p2 !== ".." && p2 !== "**") {
20324
20208
  didSomething = true;
20325
20209
  const needDot = dd === 1 && parts[dd + 1] === "**";
20326
20210
  const splin = needDot ? ["."] : [];
@@ -20442,14 +20326,14 @@ var init_mjs = __esm({
20442
20326
  this.debug("matchOne", file.length, pattern.length);
20443
20327
  for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
20444
20328
  this.debug("matchOne loop");
20445
- var p = pattern[pi];
20329
+ var p2 = pattern[pi];
20446
20330
  var f = file[fi];
20447
- this.debug(pattern, p, f);
20448
- if (p === false) {
20331
+ this.debug(pattern, p2, f);
20332
+ if (p2 === false) {
20449
20333
  return false;
20450
20334
  }
20451
- if (p === GLOBSTAR) {
20452
- this.debug("GLOBSTAR", [pattern, p, f]);
20335
+ if (p2 === GLOBSTAR) {
20336
+ this.debug("GLOBSTAR", [pattern, p2, f]);
20453
20337
  var fr = fi;
20454
20338
  var pr = pi + 1;
20455
20339
  if (pr === pl) {
@@ -20484,12 +20368,12 @@ var init_mjs = __esm({
20484
20368
  return false;
20485
20369
  }
20486
20370
  let hit;
20487
- if (typeof p === "string") {
20488
- hit = f === p;
20489
- this.debug("string match", p, f, hit);
20371
+ if (typeof p2 === "string") {
20372
+ hit = f === p2;
20373
+ this.debug("string match", p2, f, hit);
20490
20374
  } else {
20491
- hit = p.test(f);
20492
- this.debug("pattern match", p, f, hit);
20375
+ hit = p2.test(f);
20376
+ this.debug("pattern match", p2, f, hit);
20493
20377
  }
20494
20378
  if (!hit)
20495
20379
  return false;
@@ -20538,7 +20422,7 @@ var init_mjs = __esm({
20538
20422
  let dotTravAllowed = pattern.charAt(0) === ".";
20539
20423
  let dotFileAllowed = options.dot || dotTravAllowed;
20540
20424
  const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
20541
- const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
20425
+ const subPatternStart = (p2) => p2.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
20542
20426
  const clearStateChar = () => {
20543
20427
  if (stateChar) {
20544
20428
  switch (stateChar) {
@@ -20741,11 +20625,11 @@ var init_mjs = __esm({
20741
20625
  const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
20742
20626
  const flags = options.nocase ? "i" : "";
20743
20627
  let re = set2.map((pattern) => {
20744
- const pp = pattern.map((p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src);
20745
- pp.forEach((p, i) => {
20628
+ const pp = pattern.map((p2) => typeof p2 === "string" ? regExpEscape(p2) : p2 === GLOBSTAR ? GLOBSTAR : p2._src);
20629
+ pp.forEach((p2, i) => {
20746
20630
  const next = pp[i + 1];
20747
20631
  const prev = pp[i - 1];
20748
- if (p !== GLOBSTAR || prev === GLOBSTAR) {
20632
+ if (p2 !== GLOBSTAR || prev === GLOBSTAR) {
20749
20633
  return;
20750
20634
  }
20751
20635
  if (prev === void 0) {
@@ -20761,7 +20645,7 @@ var init_mjs = __esm({
20761
20645
  pp[i + 1] = GLOBSTAR;
20762
20646
  }
20763
20647
  });
20764
- return pp.filter((p) => p !== GLOBSTAR).join("/");
20648
+ return pp.filter((p2) => p2 !== GLOBSTAR).join("/");
20765
20649
  }).join("|");
20766
20650
  re = "^(?:" + re + ")$";
20767
20651
  if (this.negate)
@@ -20773,13 +20657,13 @@ var init_mjs = __esm({
20773
20657
  }
20774
20658
  return this.regexp;
20775
20659
  }
20776
- slashSplit(p) {
20660
+ slashSplit(p2) {
20777
20661
  if (this.preserveMultipleSlashes) {
20778
- return p.split("/");
20779
- } else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
20780
- return ["", ...p.split(/\/+/)];
20662
+ return p2.split("/");
20663
+ } else if (this.isWindows && /^\/\/[^\/]+/.test(p2)) {
20664
+ return ["", ...p2.split(/\/+/)];
20781
20665
  } else {
20782
- return p.split(/\/+/);
20666
+ return p2.split(/\/+/);
20783
20667
  }
20784
20668
  }
20785
20669
  match(f, partial = this.partial) {
@@ -21231,56 +21115,56 @@ var require_textParsers = __commonJS({
21231
21115
  if (!value) {
21232
21116
  return null;
21233
21117
  }
21234
- var p = arrayParser.create(value, function(entry) {
21118
+ var p2 = arrayParser.create(value, function(entry) {
21235
21119
  if (entry !== null) {
21236
21120
  entry = parsePoint(entry);
21237
21121
  }
21238
21122
  return entry;
21239
21123
  });
21240
- return p.parse();
21124
+ return p2.parse();
21241
21125
  };
21242
21126
  var parseFloatArray = function(value) {
21243
21127
  if (!value) {
21244
21128
  return null;
21245
21129
  }
21246
- var p = arrayParser.create(value, function(entry) {
21130
+ var p2 = arrayParser.create(value, function(entry) {
21247
21131
  if (entry !== null) {
21248
21132
  entry = parseFloat(entry);
21249
21133
  }
21250
21134
  return entry;
21251
21135
  });
21252
- return p.parse();
21136
+ return p2.parse();
21253
21137
  };
21254
21138
  var parseStringArray = function(value) {
21255
21139
  if (!value) {
21256
21140
  return null;
21257
21141
  }
21258
- var p = arrayParser.create(value);
21259
- return p.parse();
21142
+ var p2 = arrayParser.create(value);
21143
+ return p2.parse();
21260
21144
  };
21261
21145
  var parseDateArray = function(value) {
21262
21146
  if (!value) {
21263
21147
  return null;
21264
21148
  }
21265
- var p = arrayParser.create(value, function(entry) {
21149
+ var p2 = arrayParser.create(value, function(entry) {
21266
21150
  if (entry !== null) {
21267
21151
  entry = parseDate(entry);
21268
21152
  }
21269
21153
  return entry;
21270
21154
  });
21271
- return p.parse();
21155
+ return p2.parse();
21272
21156
  };
21273
21157
  var parseIntervalArray = function(value) {
21274
21158
  if (!value) {
21275
21159
  return null;
21276
21160
  }
21277
- var p = arrayParser.create(value, function(entry) {
21161
+ var p2 = arrayParser.create(value, function(entry) {
21278
21162
  if (entry !== null) {
21279
21163
  entry = parseInterval(entry);
21280
21164
  }
21281
21165
  return entry;
21282
21166
  });
21283
- return p.parse();
21167
+ return p2.parse();
21284
21168
  };
21285
21169
  var parseByteAArray = function(value) {
21286
21170
  if (!value) {
@@ -22326,15 +22210,15 @@ var require_pg_connection_string = __commonJS({
22326
22210
  if (config.sslcert || config.sslkey || config.sslrootcert || config.sslmode) {
22327
22211
  config.ssl = {};
22328
22212
  }
22329
- const fs8 = config.sslcert || config.sslkey || config.sslrootcert ? require("fs") : null;
22213
+ const fs9 = config.sslcert || config.sslkey || config.sslrootcert ? require("fs") : null;
22330
22214
  if (config.sslcert) {
22331
- config.ssl.cert = fs8.readFileSync(config.sslcert).toString();
22215
+ config.ssl.cert = fs9.readFileSync(config.sslcert).toString();
22332
22216
  }
22333
22217
  if (config.sslkey) {
22334
- config.ssl.key = fs8.readFileSync(config.sslkey).toString();
22218
+ config.ssl.key = fs9.readFileSync(config.sslkey).toString();
22335
22219
  }
22336
22220
  if (config.sslrootcert) {
22337
- config.ssl.ca = fs8.readFileSync(config.sslrootcert).toString();
22221
+ config.ssl.ca = fs9.readFileSync(config.sslrootcert).toString();
22338
22222
  }
22339
22223
  switch (config.sslmode) {
22340
22224
  case "disable": {
@@ -23946,7 +23830,7 @@ var require_split2 = __commonJS({
23946
23830
  var require_helper = __commonJS({
23947
23831
  "node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/helper.js"(exports, module2) {
23948
23832
  "use strict";
23949
- var path4 = require("path");
23833
+ var path5 = require("path");
23950
23834
  var Stream = require("stream").Stream;
23951
23835
  var split = require_split2();
23952
23836
  var util2 = require("util");
@@ -23984,8 +23868,8 @@ var require_helper = __commonJS({
23984
23868
  return old;
23985
23869
  };
23986
23870
  module2.exports.getFileName = function(rawEnv) {
23987
- var env2 = rawEnv || process.env;
23988
- var file = env2.PGPASSFILE || (isWin ? path4.join(env2.APPDATA || "./", "postgresql", "pgpass.conf") : path4.join(env2.HOME || "./", ".pgpass"));
23871
+ var env3 = rawEnv || process.env;
23872
+ var file = env3.PGPASSFILE || (isWin ? path5.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path5.join(env3.HOME || "./", ".pgpass"));
23989
23873
  return file;
23990
23874
  };
23991
23875
  module2.exports.usePgPass = function(stats, fname) {
@@ -24117,16 +24001,16 @@ var require_helper = __commonJS({
24117
24001
  var require_lib = __commonJS({
24118
24002
  "node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/index.js"(exports, module2) {
24119
24003
  "use strict";
24120
- var path4 = require("path");
24121
- var fs8 = require("fs");
24004
+ var path5 = require("path");
24005
+ var fs9 = require("fs");
24122
24006
  var helper = require_helper();
24123
24007
  module2.exports = function(connInfo, cb) {
24124
24008
  var file = helper.getFileName();
24125
- fs8.stat(file, function(err2, stat) {
24009
+ fs9.stat(file, function(err2, stat) {
24126
24010
  if (err2 || !helper.usePgPass(stat, file)) {
24127
24011
  return cb(void 0);
24128
24012
  }
24129
- var st = fs8.createReadStream(file);
24013
+ var st = fs9.createReadStream(file);
24130
24014
  helper.getPassword(connInfo, st, cb);
24131
24015
  });
24132
24016
  };
@@ -26287,6 +26171,15 @@ var init_sqliteIntrospect = __esm({
26287
26171
  }
26288
26172
  });
26289
26173
 
26174
+ // src/serializer/schemaToDrizzle.ts
26175
+ var import_pg_core4, import_sqlite_core3;
26176
+ var init_schemaToDrizzle = __esm({
26177
+ "src/serializer/schemaToDrizzle.ts"() {
26178
+ import_pg_core4 = require("drizzle-orm/pg-core");
26179
+ import_sqlite_core3 = require("drizzle-orm/sqlite-core");
26180
+ }
26181
+ });
26182
+
26290
26183
  // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js
26291
26184
  var require_constants = __commonJS({
26292
26185
  "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js"(exports, module2) {
@@ -27365,9 +27258,9 @@ var require_yallist = __commonJS({
27365
27258
  var head = this.head;
27366
27259
  var tail = this.tail;
27367
27260
  for (var walker = head; walker !== null; walker = walker.prev) {
27368
- var p = walker.prev;
27261
+ var p2 = walker.prev;
27369
27262
  walker.prev = walker.next;
27370
- walker.next = p;
27263
+ walker.next = p2;
27371
27264
  }
27372
27265
  this.head = tail;
27373
27266
  this.tail = head;
@@ -27865,20 +27758,20 @@ var require_range = __commonJS({
27865
27758
  };
27866
27759
  var replaceTilde = (comp, options) => {
27867
27760
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
27868
- return comp.replace(r, (_2, M, m, p, pr) => {
27869
- debug("tilde", comp, _2, M, m, p, pr);
27761
+ return comp.replace(r, (_2, M, m, p2, pr) => {
27762
+ debug("tilde", comp, _2, M, m, p2, pr);
27870
27763
  let ret;
27871
27764
  if (isX(M)) {
27872
27765
  ret = "";
27873
27766
  } else if (isX(m)) {
27874
27767
  ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
27875
- } else if (isX(p)) {
27768
+ } else if (isX(p2)) {
27876
27769
  ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
27877
27770
  } else if (pr) {
27878
27771
  debug("replaceTilde pr", pr);
27879
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
27772
+ ret = `>=${M}.${m}.${p2}-${pr} <${M}.${+m + 1}.0-0`;
27880
27773
  } else {
27881
- ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
27774
+ ret = `>=${M}.${m}.${p2} <${M}.${+m + 1}.0-0`;
27882
27775
  }
27883
27776
  debug("tilde return", ret);
27884
27777
  return ret;
@@ -27891,14 +27784,14 @@ var require_range = __commonJS({
27891
27784
  debug("caret", comp, options);
27892
27785
  const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
27893
27786
  const z2 = options.includePrerelease ? "-0" : "";
27894
- return comp.replace(r, (_2, M, m, p, pr) => {
27895
- debug("caret", comp, _2, M, m, p, pr);
27787
+ return comp.replace(r, (_2, M, m, p2, pr) => {
27788
+ debug("caret", comp, _2, M, m, p2, pr);
27896
27789
  let ret;
27897
27790
  if (isX(M)) {
27898
27791
  ret = "";
27899
27792
  } else if (isX(m)) {
27900
27793
  ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
27901
- } else if (isX(p)) {
27794
+ } else if (isX(p2)) {
27902
27795
  if (M === "0") {
27903
27796
  ret = `>=${M}.${m}.0${z2} <${M}.${+m + 1}.0-0`;
27904
27797
  } else {
@@ -27908,23 +27801,23 @@ var require_range = __commonJS({
27908
27801
  debug("replaceCaret pr", pr);
27909
27802
  if (M === "0") {
27910
27803
  if (m === "0") {
27911
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
27804
+ ret = `>=${M}.${m}.${p2}-${pr} <${M}.${m}.${+p2 + 1}-0`;
27912
27805
  } else {
27913
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
27806
+ ret = `>=${M}.${m}.${p2}-${pr} <${M}.${+m + 1}.0-0`;
27914
27807
  }
27915
27808
  } else {
27916
- ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
27809
+ ret = `>=${M}.${m}.${p2}-${pr} <${+M + 1}.0.0-0`;
27917
27810
  }
27918
27811
  } else {
27919
27812
  debug("no pr");
27920
27813
  if (M === "0") {
27921
27814
  if (m === "0") {
27922
- ret = `>=${M}.${m}.${p}${z2} <${M}.${m}.${+p + 1}-0`;
27815
+ ret = `>=${M}.${m}.${p2}${z2} <${M}.${m}.${+p2 + 1}-0`;
27923
27816
  } else {
27924
- ret = `>=${M}.${m}.${p}${z2} <${M}.${+m + 1}.0-0`;
27817
+ ret = `>=${M}.${m}.${p2}${z2} <${M}.${+m + 1}.0-0`;
27925
27818
  }
27926
27819
  } else {
27927
- ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
27820
+ ret = `>=${M}.${m}.${p2} <${+M + 1}.0.0-0`;
27928
27821
  }
27929
27822
  }
27930
27823
  debug("caret return", ret);
@@ -27938,11 +27831,11 @@ var require_range = __commonJS({
27938
27831
  var replaceXRange = (comp, options) => {
27939
27832
  comp = comp.trim();
27940
27833
  const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
27941
- return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
27942
- debug("xRange", comp, ret, gtlt, M, m, p, pr);
27834
+ return comp.replace(r, (ret, gtlt, M, m, p2, pr) => {
27835
+ debug("xRange", comp, ret, gtlt, M, m, p2, pr);
27943
27836
  const xM = isX(M);
27944
27837
  const xm = xM || isX(m);
27945
- const xp = xm || isX(p);
27838
+ const xp = xm || isX(p2);
27946
27839
  const anyX = xp;
27947
27840
  if (gtlt === "=" && anyX) {
27948
27841
  gtlt = "";
@@ -27958,16 +27851,16 @@ var require_range = __commonJS({
27958
27851
  if (xm) {
27959
27852
  m = 0;
27960
27853
  }
27961
- p = 0;
27854
+ p2 = 0;
27962
27855
  if (gtlt === ">") {
27963
27856
  gtlt = ">=";
27964
27857
  if (xm) {
27965
27858
  M = +M + 1;
27966
27859
  m = 0;
27967
- p = 0;
27860
+ p2 = 0;
27968
27861
  } else {
27969
27862
  m = +m + 1;
27970
- p = 0;
27863
+ p2 = 0;
27971
27864
  }
27972
27865
  } else if (gtlt === "<=") {
27973
27866
  gtlt = "<";
@@ -27980,7 +27873,7 @@ var require_range = __commonJS({
27980
27873
  if (gtlt === "<") {
27981
27874
  pr = "-0";
27982
27875
  }
27983
- ret = `${gtlt + M}.${m}.${p}${pr}`;
27876
+ ret = `${gtlt + M}.${m}.${p2}${pr}`;
27984
27877
  } else if (xm) {
27985
27878
  ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
27986
27879
  } else if (xp) {
@@ -31782,10 +31675,10 @@ var require_long = __commonJS({
31782
31675
  radix = radix || 10;
31783
31676
  if (radix < 2 || 36 < radix)
31784
31677
  throw RangeError("radix");
31785
- var p;
31786
- if ((p = str.indexOf("-")) > 0)
31678
+ var p2;
31679
+ if ((p2 = str.indexOf("-")) > 0)
31787
31680
  throw Error("interior hyphen");
31788
- else if (p === 0) {
31681
+ else if (p2 === 0) {
31789
31682
  return fromString(str.substring(1), unsigned, radix).neg();
31790
31683
  }
31791
31684
  var radixToPower = fromNumber(pow_dbl(radix, 8));
@@ -37658,8 +37551,8 @@ var require_change_user = __commonJS({
37658
37551
  if (typeof this.database !== "string") {
37659
37552
  throw new Error('"database" connection config property must be a string');
37660
37553
  }
37661
- const p = this.serializeToBuffer(Packet.MockBuffer());
37662
- return this.serializeToBuffer(Buffer.allocUnsafe(p.offset));
37554
+ const p2 = this.serializeToBuffer(Packet.MockBuffer());
37555
+ return this.serializeToBuffer(Buffer.allocUnsafe(p2.offset));
37663
37556
  }
37664
37557
  };
37665
37558
  module2.exports = ChangeUser;
@@ -38142,8 +38035,8 @@ var require_handshake_response = __commonJS({
38142
38035
  if (typeof this.database !== "string") {
38143
38036
  throw new Error('"database" connection config property must be a string');
38144
38037
  }
38145
- const p = this.serializeResponse(Packet.MockBuffer());
38146
- return this.serializeResponse(Buffer.alloc(p.offset));
38038
+ const p2 = this.serializeResponse(Packet.MockBuffer());
38039
+ return this.serializeResponse(Buffer.alloc(p2.offset));
38147
38040
  }
38148
38041
  static fromPacket(packet) {
38149
38042
  const args = {};
@@ -38573,7 +38466,7 @@ var require_text_row = __commonJS({
38573
38466
  var require_packets = __commonJS({
38574
38467
  "node_modules/.pnpm/mysql2@2.3.3/node_modules/mysql2/lib/packets/index.js"(exports, module2) {
38575
38468
  "use strict";
38576
- var process4 = require("process");
38469
+ var process5 = require("process");
38577
38470
  var AuthSwitchRequest = require_auth_switch_request();
38578
38471
  var AuthSwitchRequestMoreData = require_auth_switch_request_more_data();
38579
38472
  var AuthSwitchResponse = require_auth_switch_response();
@@ -38614,13 +38507,13 @@ var require_packets = __commonJS({
38614
38507
  };
38615
38508
  Object.entries(ctorMap).forEach(([name, ctor]) => {
38616
38509
  module2.exports[name] = ctor;
38617
- if (process4.env.NODE_DEBUG) {
38510
+ if (process5.env.NODE_DEBUG) {
38618
38511
  if (ctor.prototype.toPacket) {
38619
38512
  const old = ctor.prototype.toPacket;
38620
38513
  ctor.prototype.toPacket = function() {
38621
- const p = old.call(this);
38622
- p._name = name;
38623
- return p;
38514
+ const p2 = old.call(this);
38515
+ p2._name = name;
38516
+ return p2;
38624
38517
  };
38625
38518
  }
38626
38519
  }
@@ -39217,8 +39110,8 @@ var require_compressed_protocol = __commonJS({
39217
39110
  connection._lastWrittenPacketId = 0;
39218
39111
  connection._lastReceivedPacketId = 0;
39219
39112
  connection._handleCompressedPacket = handleCompressedPacket;
39220
- connection._inflatedPacketsParser = new PacketParser((p) => {
39221
- connection.handlePacket(p);
39113
+ connection._inflatedPacketsParser = new PacketParser((p2) => {
39114
+ connection.handlePacket(p2);
39222
39115
  }, 4);
39223
39116
  connection._inflatedPacketsParser._lastPacket = 0;
39224
39117
  connection.packetParser = new PacketParser((packet) => {
@@ -40257,7 +40150,7 @@ var require_text_parser = __commonJS({
40257
40150
  var require_query4 = __commonJS({
40258
40151
  "node_modules/.pnpm/mysql2@2.3.3/node_modules/mysql2/lib/commands/query.js"(exports, module2) {
40259
40152
  "use strict";
40260
- var process4 = require("process");
40153
+ var process5 = require("process");
40261
40154
  var Timers = require("timers");
40262
40155
  var Readable = require("stream").Readable;
40263
40156
  var Command2 = require_command();
@@ -40326,11 +40219,11 @@ var require_query4 = __commonJS({
40326
40219
  fields = this._fields;
40327
40220
  }
40328
40221
  if (fields) {
40329
- process4.nextTick(() => {
40222
+ process5.nextTick(() => {
40330
40223
  this.onResult(null, rows, fields);
40331
40224
  });
40332
40225
  } else {
40333
- process4.nextTick(() => {
40226
+ process5.nextTick(() => {
40334
40227
  this.onResult(null, rows);
40335
40228
  });
40336
40229
  }
@@ -40375,12 +40268,12 @@ var require_query4 = __commonJS({
40375
40268
  this._fields.push([]);
40376
40269
  return this.readField;
40377
40270
  }
40378
- _streamLocalInfile(connection, path4) {
40271
+ _streamLocalInfile(connection, path5) {
40379
40272
  if (this._streamFactory) {
40380
- this._localStream = this._streamFactory(path4);
40273
+ this._localStream = this._streamFactory(path5);
40381
40274
  } else {
40382
40275
  this._localStreamError = new Error(
40383
- `As a result of LOCAL INFILE command server wants to read ${path4} file, but as of v2.0 you must provide streamFactory option returning ReadStream.`
40276
+ `As a result of LOCAL INFILE command server wants to read ${path5} file, but as of v2.0 you must provide streamFactory option returning ReadStream.`
40384
40277
  );
40385
40278
  connection.writePacket(EmptyPacket);
40386
40279
  return this.infileOk;
@@ -42305,10 +42198,10 @@ var require_lru_cache2 = __commonJS({
42305
42198
  if (aborted && !ignoreAbort && !updateCache) {
42306
42199
  return fetchFail(ac.signal.reason);
42307
42200
  }
42308
- if (this.valList[index4] === p) {
42201
+ if (this.valList[index4] === p2) {
42309
42202
  if (v2 === void 0) {
42310
- if (p.__staleWhileFetching) {
42311
- this.valList[index4] = p.__staleWhileFetching;
42203
+ if (p2.__staleWhileFetching) {
42204
+ this.valList[index4] = p2.__staleWhileFetching;
42312
42205
  } else {
42313
42206
  this.delete(k);
42314
42207
  }
@@ -42332,20 +42225,20 @@ var require_lru_cache2 = __commonJS({
42332
42225
  const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
42333
42226
  const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
42334
42227
  const noDelete = allowStale || options.noDeleteOnFetchRejection;
42335
- if (this.valList[index4] === p) {
42336
- const del = !noDelete || p.__staleWhileFetching === void 0;
42228
+ if (this.valList[index4] === p2) {
42229
+ const del = !noDelete || p2.__staleWhileFetching === void 0;
42337
42230
  if (del) {
42338
42231
  this.delete(k);
42339
42232
  } else if (!allowStaleAborted) {
42340
- this.valList[index4] = p.__staleWhileFetching;
42233
+ this.valList[index4] = p2.__staleWhileFetching;
42341
42234
  }
42342
42235
  }
42343
42236
  if (allowStale) {
42344
- if (options.status && p.__staleWhileFetching !== void 0) {
42237
+ if (options.status && p2.__staleWhileFetching !== void 0) {
42345
42238
  options.status.returnedStale = true;
42346
42239
  }
42347
- return p.__staleWhileFetching;
42348
- } else if (p.__returned === p) {
42240
+ return p2.__staleWhileFetching;
42241
+ } else if (p2.__returned === p2) {
42349
42242
  throw er;
42350
42243
  }
42351
42244
  };
@@ -42362,23 +42255,23 @@ var require_lru_cache2 = __commonJS({
42362
42255
  };
42363
42256
  if (options.status)
42364
42257
  options.status.fetchDispatched = true;
42365
- const p = new Promise(pcall).then(cb, eb);
42366
- p.__abortController = ac;
42367
- p.__staleWhileFetching = v;
42368
- p.__returned = null;
42258
+ const p2 = new Promise(pcall).then(cb, eb);
42259
+ p2.__abortController = ac;
42260
+ p2.__staleWhileFetching = v;
42261
+ p2.__returned = null;
42369
42262
  if (index4 === void 0) {
42370
- this.set(k, p, { ...fetchOpts.options, status: void 0 });
42263
+ this.set(k, p2, { ...fetchOpts.options, status: void 0 });
42371
42264
  index4 = this.keyMap.get(k);
42372
42265
  } else {
42373
- this.valList[index4] = p;
42266
+ this.valList[index4] = p2;
42374
42267
  }
42375
- return p;
42268
+ return p2;
42376
42269
  }
42377
- isBackgroundFetch(p) {
42378
- return p && typeof p === "object" && typeof p.then === "function" && Object.prototype.hasOwnProperty.call(
42379
- p,
42270
+ isBackgroundFetch(p2) {
42271
+ return p2 && typeof p2 === "object" && typeof p2.then === "function" && Object.prototype.hasOwnProperty.call(
42272
+ p2,
42380
42273
  "__staleWhileFetching"
42381
- ) && Object.prototype.hasOwnProperty.call(p, "__returned") && (p.__returned === p || p.__returned === null);
42274
+ ) && Object.prototype.hasOwnProperty.call(p2, "__returned") && (p2.__returned === p2 || p2.__returned === null);
42382
42275
  }
42383
42276
  // this takes the union of get() and set() opts, because it does both
42384
42277
  async fetch(k, {
@@ -42432,8 +42325,8 @@ var require_lru_cache2 = __commonJS({
42432
42325
  if (index4 === void 0) {
42433
42326
  if (status)
42434
42327
  status.fetch = "miss";
42435
- const p = this.backgroundFetch(k, index4, options, fetchContext);
42436
- return p.__returned = p;
42328
+ const p2 = this.backgroundFetch(k, index4, options, fetchContext);
42329
+ return p2.__returned = p2;
42437
42330
  } else {
42438
42331
  const v = this.valList[index4];
42439
42332
  if (this.isBackgroundFetch(v)) {
@@ -42456,15 +42349,15 @@ var require_lru_cache2 = __commonJS({
42456
42349
  this.statusTTL(status, index4);
42457
42350
  return v;
42458
42351
  }
42459
- const p = this.backgroundFetch(k, index4, options, fetchContext);
42460
- const hasStale = p.__staleWhileFetching !== void 0;
42352
+ const p2 = this.backgroundFetch(k, index4, options, fetchContext);
42353
+ const hasStale = p2.__staleWhileFetching !== void 0;
42461
42354
  const staleVal = hasStale && allowStale;
42462
42355
  if (status) {
42463
42356
  status.fetch = hasStale && isStale ? "stale" : "refresh";
42464
42357
  if (staleVal && isStale)
42465
42358
  status.returnedStale = true;
42466
42359
  }
42467
- return staleVal ? p.__staleWhileFetching : p.__returned = p;
42360
+ return staleVal ? p2.__staleWhileFetching : p2.__returned = p2;
42468
42361
  }
42469
42362
  }
42470
42363
  get(k, {
@@ -42510,9 +42403,9 @@ var require_lru_cache2 = __commonJS({
42510
42403
  status.get = "miss";
42511
42404
  }
42512
42405
  }
42513
- connect(p, n) {
42514
- this.prev[n] = p;
42515
- this.next[p] = n;
42406
+ connect(p2, n) {
42407
+ this.prev[n] = p2;
42408
+ this.next[p2] = n;
42516
42409
  }
42517
42410
  moveToTail(index4) {
42518
42411
  if (index4 !== this.tail) {
@@ -42722,7 +42615,7 @@ var require_named_placeholders = __commonJS({
42722
42615
  }
42723
42616
  return s;
42724
42617
  }
42725
- function join6(tree) {
42618
+ function join7(tree) {
42726
42619
  if (tree.length == 1) {
42727
42620
  return tree;
42728
42621
  }
@@ -42748,7 +42641,7 @@ var require_named_placeholders = __commonJS({
42748
42641
  if (cache && (tree = cache.get(query))) {
42749
42642
  return toArrayParams(tree, paramsObj);
42750
42643
  }
42751
- tree = join6(parse(query));
42644
+ tree = join7(parse(query));
42752
42645
  if (cache) {
42753
42646
  cache.set(query, tree);
42754
42647
  }
@@ -42848,8 +42741,8 @@ var require_connection2 = __commonJS({
42848
42741
  this._outOfOrderPackets = [];
42849
42742
  this.clientEncoding = CharsetToEncoding[this.config.charsetNumber];
42850
42743
  this.stream.on("error", this._handleNetworkError.bind(this));
42851
- this.packetParser = new PacketParser((p) => {
42852
- this.handlePacket(p);
42744
+ this.packetParser = new PacketParser((p2) => {
42745
+ this.handlePacket(p2);
42853
42746
  });
42854
42747
  this.stream.on("data", (data) => {
42855
42748
  if (this.connectTimeout) {
@@ -43630,7 +43523,7 @@ var require_pool_connection = __commonJS({
43630
43523
  var require_pool = __commonJS({
43631
43524
  "node_modules/.pnpm/mysql2@2.3.3/node_modules/mysql2/lib/pool.js"(exports, module2) {
43632
43525
  "use strict";
43633
- var process4 = require("process");
43526
+ var process5 = require("process");
43634
43527
  var mysql = require_mysql2();
43635
43528
  var EventEmitter = require("events").EventEmitter;
43636
43529
  var PoolConnection = require_pool_connection();
@@ -43661,13 +43554,13 @@ var require_pool = __commonJS({
43661
43554
  }
43662
43555
  getConnection(cb) {
43663
43556
  if (this._closed) {
43664
- return process4.nextTick(() => cb(new Error("Pool is closed.")));
43557
+ return process5.nextTick(() => cb(new Error("Pool is closed.")));
43665
43558
  }
43666
43559
  let connection;
43667
43560
  if (this._freeConnections.length > 0) {
43668
43561
  connection = this._freeConnections.shift();
43669
43562
  this.emit("acquire", connection);
43670
- return process4.nextTick(() => cb(null, connection));
43563
+ return process5.nextTick(() => cb(null, connection));
43671
43564
  }
43672
43565
  if (this.config.connectionLimit === 0 || this._allConnections.length < this.config.connectionLimit) {
43673
43566
  connection = new PoolConnection(this, {
@@ -43687,7 +43580,7 @@ var require_pool = __commonJS({
43687
43580
  });
43688
43581
  }
43689
43582
  if (!this.config.waitForConnections) {
43690
- return process4.nextTick(() => cb(new Error("No connections available.")));
43583
+ return process5.nextTick(() => cb(new Error("No connections available.")));
43691
43584
  }
43692
43585
  if (this.config.queueLimit && this._connectionQueue.length >= this.config.queueLimit) {
43693
43586
  return cb(new Error("Queue limit reached."));
@@ -43700,11 +43593,11 @@ var require_pool = __commonJS({
43700
43593
  if (!connection._pool) {
43701
43594
  if (this._connectionQueue.length) {
43702
43595
  cb = this._connectionQueue.shift();
43703
- process4.nextTick(this.getConnection.bind(this, cb));
43596
+ process5.nextTick(this.getConnection.bind(this, cb));
43704
43597
  }
43705
43598
  } else if (this._connectionQueue.length) {
43706
43599
  cb = this._connectionQueue.shift();
43707
- process4.nextTick(cb.bind(null, null, connection));
43600
+ process5.nextTick(cb.bind(null, null, connection));
43708
43601
  } else {
43709
43602
  this._freeConnections.push(connection);
43710
43603
  this.emit("release", connection);
@@ -43842,7 +43735,7 @@ var require_pool_config = __commonJS({
43842
43735
  var require_pool_cluster = __commonJS({
43843
43736
  "node_modules/.pnpm/mysql2@2.3.3/node_modules/mysql2/lib/pool_cluster.js"(exports, module2) {
43844
43737
  "use strict";
43845
- var process4 = require("process");
43738
+ var process5 = require("process");
43846
43739
  var Pool = require_pool();
43847
43740
  var PoolConfig = require_pool_config();
43848
43741
  var Connection2 = require_connection2();
@@ -44006,7 +43899,7 @@ var require_pool_cluster = __commonJS({
44006
43899
  }
44007
43900
  };
44008
43901
  if (this._closed) {
44009
- process4.nextTick(cb);
43902
+ process5.nextTick(cb);
44010
43903
  return;
44011
43904
  }
44012
43905
  this._closed = true;
@@ -44023,7 +43916,7 @@ var require_pool_cluster = __commonJS({
44023
43916
  this._nodes[id].pool.end(onEnd);
44024
43917
  }
44025
43918
  if (waitingClose === 0) {
44026
- process4.nextTick(onEnd);
43919
+ process5.nextTick(onEnd);
44027
43920
  }
44028
43921
  }
44029
43922
  _findNodeIds(pattern) {
@@ -44677,15 +44570,15 @@ var require_promise = __commonJS({
44677
44570
  });
44678
44571
 
44679
44572
  // src/orm-extenstions/d1-driver/session.ts
44680
- var import_drizzle_orm10, import_drizzle_orm11, import_drizzle_orm12, import_sqlite_core3, import_drizzle_orm13, _a, SQLiteWranglerD1Session, _a2, PreparedQuery;
44573
+ var import_drizzle_orm10, import_drizzle_orm11, import_drizzle_orm12, import_sqlite_core4, import_drizzle_orm13, _a, SQLiteWranglerD1Session, _a2, PreparedQuery;
44681
44574
  var init_session = __esm({
44682
44575
  "src/orm-extenstions/d1-driver/session.ts"() {
44683
44576
  import_drizzle_orm10 = require("drizzle-orm");
44684
44577
  import_drizzle_orm11 = require("drizzle-orm");
44685
44578
  import_drizzle_orm12 = require("drizzle-orm");
44686
- import_sqlite_core3 = require("drizzle-orm/sqlite-core");
44579
+ import_sqlite_core4 = require("drizzle-orm/sqlite-core");
44687
44580
  import_drizzle_orm13 = require("drizzle-orm");
44688
- SQLiteWranglerD1Session = class extends import_sqlite_core3.SQLiteSession {
44581
+ SQLiteWranglerD1Session = class extends import_sqlite_core4.SQLiteSession {
44689
44582
  constructor(client, configPath, dbName, dialect6, schema4, options = {}) {
44690
44583
  super(dialect6);
44691
44584
  this.client = client;
@@ -44714,7 +44607,7 @@ var init_session = __esm({
44714
44607
  };
44715
44608
  _a = import_drizzle_orm10.entityKind;
44716
44609
  SQLiteWranglerD1Session[_a] = "SQLiteD1Session";
44717
- PreparedQuery = class extends import_sqlite_core3.SQLitePreparedQuery {
44610
+ PreparedQuery = class extends import_sqlite_core4.SQLitePreparedQuery {
44718
44611
  constructor(stmt, configPath, dbName, queryString, params, logger, fields, executeMethod, customResultMapper) {
44719
44612
  super("async", executeMethod, {
44720
44613
  sql: queryString,
@@ -44839,20 +44732,20 @@ function drizzle(client, configPath, dbName, config = {}) {
44839
44732
  const session = new SQLiteWranglerD1Session(client, configPath, dbName, dialect6, schema4, {
44840
44733
  logger
44841
44734
  });
44842
- return new import_sqlite_core4.BaseSQLiteDatabase(
44735
+ return new import_sqlite_core5.BaseSQLiteDatabase(
44843
44736
  "async",
44844
44737
  dialect6,
44845
44738
  session,
44846
44739
  schema4
44847
44740
  );
44848
44741
  }
44849
- var import_drizzle_orm14, import_sqlite_core4, WranglerDialect;
44742
+ var import_drizzle_orm14, import_sqlite_core5, WranglerDialect;
44850
44743
  var init_driver = __esm({
44851
44744
  "src/orm-extenstions/d1-driver/driver.ts"() {
44852
44745
  import_drizzle_orm14 = require("drizzle-orm");
44853
- import_sqlite_core4 = require("drizzle-orm/sqlite-core");
44746
+ import_sqlite_core5 = require("drizzle-orm/sqlite-core");
44854
44747
  init_session();
44855
- WranglerDialect = class extends import_sqlite_core4.SQLiteAsyncDialect {
44748
+ WranglerDialect = class extends import_sqlite_core5.SQLiteAsyncDialect {
44856
44749
  sqlToQuery(sql2) {
44857
44750
  return sql2.toQuery({
44858
44751
  escapeName: this.escapeName,
@@ -44871,8 +44764,8 @@ var require_windows = __commonJS({
44871
44764
  "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) {
44872
44765
  module2.exports = isexe;
44873
44766
  isexe.sync = sync2;
44874
- var fs8 = require("fs");
44875
- function checkPathExt(path4, options) {
44767
+ var fs9 = require("fs");
44768
+ function checkPathExt(path5, options) {
44876
44769
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
44877
44770
  if (!pathext) {
44878
44771
  return true;
@@ -44882,26 +44775,26 @@ var require_windows = __commonJS({
44882
44775
  return true;
44883
44776
  }
44884
44777
  for (var i = 0; i < pathext.length; i++) {
44885
- var p = pathext[i].toLowerCase();
44886
- if (p && path4.substr(-p.length).toLowerCase() === p) {
44778
+ var p2 = pathext[i].toLowerCase();
44779
+ if (p2 && path5.substr(-p2.length).toLowerCase() === p2) {
44887
44780
  return true;
44888
44781
  }
44889
44782
  }
44890
44783
  return false;
44891
44784
  }
44892
- function checkStat(stat, path4, options) {
44785
+ function checkStat(stat, path5, options) {
44893
44786
  if (!stat.isSymbolicLink() && !stat.isFile()) {
44894
44787
  return false;
44895
44788
  }
44896
- return checkPathExt(path4, options);
44789
+ return checkPathExt(path5, options);
44897
44790
  }
44898
- function isexe(path4, options, cb) {
44899
- fs8.stat(path4, function(er, stat) {
44900
- cb(er, er ? false : checkStat(stat, path4, options));
44791
+ function isexe(path5, options, cb) {
44792
+ fs9.stat(path5, function(er, stat) {
44793
+ cb(er, er ? false : checkStat(stat, path5, options));
44901
44794
  });
44902
44795
  }
44903
- function sync2(path4, options) {
44904
- return checkStat(fs8.statSync(path4), path4, options);
44796
+ function sync2(path5, options) {
44797
+ return checkStat(fs9.statSync(path5), path5, options);
44905
44798
  }
44906
44799
  }
44907
44800
  });
@@ -44911,14 +44804,14 @@ var require_mode = __commonJS({
44911
44804
  "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module2) {
44912
44805
  module2.exports = isexe;
44913
44806
  isexe.sync = sync2;
44914
- var fs8 = require("fs");
44915
- function isexe(path4, options, cb) {
44916
- fs8.stat(path4, function(er, stat) {
44807
+ var fs9 = require("fs");
44808
+ function isexe(path5, options, cb) {
44809
+ fs9.stat(path5, function(er, stat) {
44917
44810
  cb(er, er ? false : checkStat(stat, options));
44918
44811
  });
44919
44812
  }
44920
- function sync2(path4, options) {
44921
- return checkStat(fs8.statSync(path4), options);
44813
+ function sync2(path5, options) {
44814
+ return checkStat(fs9.statSync(path5), options);
44922
44815
  }
44923
44816
  function checkStat(stat, options) {
44924
44817
  return stat.isFile() && checkMode(stat, options);
@@ -44942,7 +44835,7 @@ var require_mode = __commonJS({
44942
44835
  // node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
44943
44836
  var require_isexe = __commonJS({
44944
44837
  "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) {
44945
- var fs8 = require("fs");
44838
+ var fs9 = require("fs");
44946
44839
  var core;
44947
44840
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
44948
44841
  core = require_windows();
@@ -44951,7 +44844,7 @@ var require_isexe = __commonJS({
44951
44844
  }
44952
44845
  module2.exports = isexe;
44953
44846
  isexe.sync = sync2;
44954
- function isexe(path4, options, cb) {
44847
+ function isexe(path5, options, cb) {
44955
44848
  if (typeof options === "function") {
44956
44849
  cb = options;
44957
44850
  options = {};
@@ -44961,7 +44854,7 @@ var require_isexe = __commonJS({
44961
44854
  throw new TypeError("callback not provided");
44962
44855
  }
44963
44856
  return new Promise(function(resolve2, reject) {
44964
- isexe(path4, options || {}, function(er, is9) {
44857
+ isexe(path5, options || {}, function(er, is9) {
44965
44858
  if (er) {
44966
44859
  reject(er);
44967
44860
  } else {
@@ -44970,7 +44863,7 @@ var require_isexe = __commonJS({
44970
44863
  });
44971
44864
  });
44972
44865
  }
44973
- core(path4, options || {}, function(er, is9) {
44866
+ core(path5, options || {}, function(er, is9) {
44974
44867
  if (er) {
44975
44868
  if (er.code === "EACCES" || options && options.ignoreErrors) {
44976
44869
  er = null;
@@ -44980,9 +44873,9 @@ var require_isexe = __commonJS({
44980
44873
  cb(er, is9);
44981
44874
  });
44982
44875
  }
44983
- function sync2(path4, options) {
44876
+ function sync2(path5, options) {
44984
44877
  try {
44985
- return core.sync(path4, options || {});
44878
+ return core.sync(path5, options || {});
44986
44879
  } catch (er) {
44987
44880
  if (options && options.ignoreErrors || er.code === "EACCES") {
44988
44881
  return false;
@@ -44998,7 +44891,7 @@ var require_isexe = __commonJS({
44998
44891
  var require_lib4 = __commonJS({
44999
44892
  "node_modules/.pnpm/which@3.0.1/node_modules/which/lib/index.js"(exports, module2) {
45000
44893
  var isexe = require_isexe();
45001
- var { join: join6, delimiter, sep: sep2, posix } = require("path");
44894
+ var { join: join7, delimiter, sep: sep2, posix } = require("path");
45002
44895
  var isWindows = process.platform === "win32";
45003
44896
  var rSlash = new RegExp(`[${posix.sep}${sep2 === posix.sep ? "" : sep2}]`.replace(/(\\)/g, "\\$1"));
45004
44897
  var rRel = new RegExp(`^\\.${rSlash.source}`);
@@ -45031,15 +44924,15 @@ var require_lib4 = __commonJS({
45031
44924
  var getPathPart = (raw, cmd) => {
45032
44925
  const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
45033
44926
  const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
45034
- return prefix + join6(pathPart, cmd);
44927
+ return prefix + join7(pathPart, cmd);
45035
44928
  };
45036
44929
  var which2 = async (cmd, opt = {}) => {
45037
44930
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
45038
44931
  const found = [];
45039
44932
  for (const envPart of pathEnv) {
45040
- const p = getPathPart(envPart, cmd);
44933
+ const p2 = getPathPart(envPart, cmd);
45041
44934
  for (const ext2 of pathExt) {
45042
- const withExt = p + ext2;
44935
+ const withExt = p2 + ext2;
45043
44936
  const is9 = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
45044
44937
  if (is9) {
45045
44938
  if (!opt.all) {
@@ -45061,9 +44954,9 @@ var require_lib4 = __commonJS({
45061
44954
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
45062
44955
  const found = [];
45063
44956
  for (const pathEnvPart of pathEnv) {
45064
- const p = getPathPart(pathEnvPart, cmd);
44957
+ const p2 = getPathPart(pathEnvPart, cmd);
45065
44958
  for (const ext2 of pathExt) {
45066
- const withExt = p + ext2;
44959
+ const withExt = p2 + ext2;
45067
44960
  const is9 = isexe.sync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
45068
44961
  if (is9) {
45069
44962
  if (!opt.all) {
@@ -46224,7 +46117,7 @@ var init_core = __esm({
46224
46117
  }
46225
46118
  $ = new Proxy(function(pieces, ...args) {
46226
46119
  const from = new Error().stack.split(/^\s*at\s/m)[2].trim();
46227
- if (pieces.some((p) => p == void 0)) {
46120
+ if (pieces.some((p2) => p2 == void 0)) {
46228
46121
  throw new Error(`Malformed command at ${from}`);
46229
46122
  }
46230
46123
  let resolve2, reject;
@@ -46366,7 +46259,7 @@ var init_core = __esm({
46366
46259
  return this.child.stderr;
46367
46260
  }
46368
46261
  get exitCode() {
46369
- return this.then((p) => p.exitCode, (p) => p.exitCode);
46262
+ return this.then((p2) => p2.exitCode, (p2) => p2.exitCode);
46370
46263
  }
46371
46264
  then(onfulfilled, onrejected) {
46372
46265
  if (this.isHalted && !this.child) {
@@ -46406,9 +46299,9 @@ var init_core = __esm({
46406
46299
  if (!this.child.pid)
46407
46300
  throw new Error("The process pid is undefined.");
46408
46301
  let children = await psTree(this.child.pid);
46409
- for (const p of children) {
46302
+ for (const p2 of children) {
46410
46303
  try {
46411
- process.kill(+p.PID, signal);
46304
+ process.kill(+p2.PID, signal);
46412
46305
  } catch (e) {
46413
46306
  }
46414
46307
  }
@@ -46669,9 +46562,9 @@ var require_path = __commonJS({
46669
46562
  "use strict";
46670
46563
  Object.defineProperty(exports, "__esModule", { value: true });
46671
46564
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
46672
- var os2 = require("os");
46673
- var path4 = require("path");
46674
- var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
46565
+ var os3 = require("os");
46566
+ var path5 = require("path");
46567
+ var IS_WINDOWS_PLATFORM = os3.platform() === "win32";
46675
46568
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
46676
46569
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
46677
46570
  var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([(){}]|^!|[!+@](?=\())/g;
@@ -46682,7 +46575,7 @@ var require_path = __commonJS({
46682
46575
  }
46683
46576
  exports.unixify = unixify;
46684
46577
  function makeAbsolute(cwd, filepath) {
46685
- return path4.resolve(cwd, filepath);
46578
+ return path5.resolve(cwd, filepath);
46686
46579
  }
46687
46580
  exports.makeAbsolute = makeAbsolute;
46688
46581
  function removeLeadingDotSegment(entry) {
@@ -47529,11 +47422,11 @@ var require_expand = __commonJS({
47529
47422
  let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
47530
47423
  let walk = (node, parent = {}) => {
47531
47424
  node.queue = [];
47532
- let p = parent;
47425
+ let p2 = parent;
47533
47426
  let q = parent.queue;
47534
- while (p.type !== "brace" && p.type !== "root" && p.parent) {
47535
- p = p.parent;
47536
- q = p.queue;
47427
+ while (p2.type !== "brace" && p2.type !== "root" && p2.parent) {
47428
+ p2 = p2.parent;
47429
+ q = p2.queue;
47537
47430
  }
47538
47431
  if (node.invalid || node.dollar) {
47539
47432
  q.push(append(q.pop(), stringify(node, options)));
@@ -48003,7 +47896,7 @@ var require_braces = __commonJS({
48003
47896
  var require_constants3 = __commonJS({
48004
47897
  "node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports, module2) {
48005
47898
  "use strict";
48006
- var path4 = require("path");
47899
+ var path5 = require("path");
48007
47900
  var WIN_SLASH = "\\\\/";
48008
47901
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
48009
47902
  var DOT_LITERAL = "\\.";
@@ -48173,7 +48066,7 @@ var require_constants3 = __commonJS({
48173
48066
  /* | */
48174
48067
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
48175
48068
  /* \uFEFF */
48176
- SEP: path4.sep,
48069
+ SEP: path5.sep,
48177
48070
  /**
48178
48071
  * Create EXTGLOB_CHARS
48179
48072
  */
@@ -48200,7 +48093,7 @@ var require_constants3 = __commonJS({
48200
48093
  var require_utils5 = __commonJS({
48201
48094
  "node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"(exports) {
48202
48095
  "use strict";
48203
- var path4 = require("path");
48096
+ var path5 = require("path");
48204
48097
  var win32 = process.platform === "win32";
48205
48098
  var {
48206
48099
  REGEX_BACKSLASH,
@@ -48229,7 +48122,7 @@ var require_utils5 = __commonJS({
48229
48122
  if (options && typeof options.windows === "boolean") {
48230
48123
  return options.windows;
48231
48124
  }
48232
- return win32 === true || path4.sep === "\\";
48125
+ return win32 === true || path5.sep === "\\";
48233
48126
  };
48234
48127
  exports.escapeLast = (input, char, lastIdx) => {
48235
48128
  const idx = input.lastIndexOf(char, lastIdx);
@@ -49377,7 +49270,7 @@ var require_parse3 = __commonJS({
49377
49270
  var require_picomatch = __commonJS({
49378
49271
  "node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports, module2) {
49379
49272
  "use strict";
49380
- var path4 = require("path");
49273
+ var path5 = require("path");
49381
49274
  var scan = require_scan();
49382
49275
  var parse = require_parse3();
49383
49276
  var utils = require_utils5();
@@ -49463,12 +49356,12 @@ var require_picomatch = __commonJS({
49463
49356
  };
49464
49357
  picomatch.matchBase = (input, glob2, options, posix = utils.isWindows(options)) => {
49465
49358
  const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options);
49466
- return regex.test(path4.basename(input));
49359
+ return regex.test(path5.basename(input));
49467
49360
  };
49468
49361
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
49469
49362
  picomatch.parse = (pattern, options) => {
49470
49363
  if (Array.isArray(pattern))
49471
- return pattern.map((p) => picomatch.parse(p, options));
49364
+ return pattern.map((p2) => picomatch.parse(p2, options));
49472
49365
  return parse(pattern, { ...options, fastpaths: false });
49473
49366
  };
49474
49367
  picomatch.scan = (input, options) => scan(input, options);
@@ -49572,7 +49465,7 @@ var require_micromatch = __commonJS({
49572
49465
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
49573
49466
  }
49574
49467
  if (options.nonull === true || options.nullglob === true) {
49575
- return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
49468
+ return options.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
49576
49469
  }
49577
49470
  }
49578
49471
  return matches;
@@ -49603,7 +49496,7 @@ var require_micromatch = __commonJS({
49603
49496
  throw new TypeError(`Expected a string: "${util2.inspect(str)}"`);
49604
49497
  }
49605
49498
  if (Array.isArray(pattern)) {
49606
- return pattern.some((p) => micromatch.contains(str, p, options));
49499
+ return pattern.some((p2) => micromatch.contains(str, p2, options));
49607
49500
  }
49608
49501
  if (typeof pattern === "string") {
49609
49502
  if (isEmptyString(str) || isEmptyString(pattern)) {
@@ -49649,7 +49542,7 @@ var require_micromatch = __commonJS({
49649
49542
  if (typeof str !== "string") {
49650
49543
  throw new TypeError(`Expected a string: "${util2.inspect(str)}"`);
49651
49544
  }
49652
- return [].concat(patterns).every((p) => picomatch(p, options)(str));
49545
+ return [].concat(patterns).every((p2) => picomatch(p2, options)(str));
49653
49546
  };
49654
49547
  micromatch.capture = (glob2, input, options) => {
49655
49548
  let posix = utils.isWindows(options);
@@ -49693,7 +49586,7 @@ var require_pattern = __commonJS({
49693
49586
  "use strict";
49694
49587
  Object.defineProperty(exports, "__esModule", { value: true });
49695
49588
  exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
49696
- var path4 = require("path");
49589
+ var path5 = require("path");
49697
49590
  var globParent = require_glob_parent();
49698
49591
  var micromatch = require_micromatch();
49699
49592
  var GLOBSTAR2 = "**";
@@ -49788,7 +49681,7 @@ var require_pattern = __commonJS({
49788
49681
  }
49789
49682
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
49790
49683
  function isAffectDepthOfReadingPattern(pattern) {
49791
- const basename = path4.basename(pattern);
49684
+ const basename = path5.basename(pattern);
49792
49685
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
49793
49686
  }
49794
49687
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -49885,10 +49778,10 @@ var require_utils6 = __commonJS({
49885
49778
  exports.array = array;
49886
49779
  var errno = require_errno();
49887
49780
  exports.errno = errno;
49888
- var fs8 = require_fs();
49889
- exports.fs = fs8;
49890
- var path4 = require_path();
49891
- exports.path = path4;
49781
+ var fs9 = require_fs();
49782
+ exports.fs = fs9;
49783
+ var path5 = require_path();
49784
+ exports.path = path5;
49892
49785
  var pattern = require_pattern();
49893
49786
  exports.pattern = pattern;
49894
49787
  var stream = require_stream2();
@@ -50000,8 +49893,8 @@ var require_async = __commonJS({
50000
49893
  "use strict";
50001
49894
  Object.defineProperty(exports, "__esModule", { value: true });
50002
49895
  exports.read = void 0;
50003
- function read(path4, settings, callback) {
50004
- settings.fs.lstat(path4, (lstatError, lstat) => {
49896
+ function read(path5, settings, callback) {
49897
+ settings.fs.lstat(path5, (lstatError, lstat) => {
50005
49898
  if (lstatError !== null) {
50006
49899
  callFailureCallback(callback, lstatError);
50007
49900
  return;
@@ -50010,7 +49903,7 @@ var require_async = __commonJS({
50010
49903
  callSuccessCallback(callback, lstat);
50011
49904
  return;
50012
49905
  }
50013
- settings.fs.stat(path4, (statError, stat) => {
49906
+ settings.fs.stat(path5, (statError, stat) => {
50014
49907
  if (statError !== null) {
50015
49908
  if (settings.throwErrorOnBrokenSymbolicLink) {
50016
49909
  callFailureCallback(callback, statError);
@@ -50042,13 +49935,13 @@ var require_sync = __commonJS({
50042
49935
  "use strict";
50043
49936
  Object.defineProperty(exports, "__esModule", { value: true });
50044
49937
  exports.read = void 0;
50045
- function read(path4, settings) {
50046
- const lstat = settings.fs.lstatSync(path4);
49938
+ function read(path5, settings) {
49939
+ const lstat = settings.fs.lstatSync(path5);
50047
49940
  if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
50048
49941
  return lstat;
50049
49942
  }
50050
49943
  try {
50051
- const stat = settings.fs.statSync(path4);
49944
+ const stat = settings.fs.statSync(path5);
50052
49945
  if (settings.markSymbolicLink) {
50053
49946
  stat.isSymbolicLink = () => true;
50054
49947
  }
@@ -50070,12 +49963,12 @@ var require_fs2 = __commonJS({
50070
49963
  "use strict";
50071
49964
  Object.defineProperty(exports, "__esModule", { value: true });
50072
49965
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
50073
- var fs8 = require("fs");
49966
+ var fs9 = require("fs");
50074
49967
  exports.FILE_SYSTEM_ADAPTER = {
50075
- lstat: fs8.lstat,
50076
- stat: fs8.stat,
50077
- lstatSync: fs8.lstatSync,
50078
- statSync: fs8.statSync
49968
+ lstat: fs9.lstat,
49969
+ stat: fs9.stat,
49970
+ lstatSync: fs9.lstatSync,
49971
+ statSync: fs9.statSync
50079
49972
  };
50080
49973
  function createFileSystemAdapter(fsMethods) {
50081
49974
  if (fsMethods === void 0) {
@@ -50092,12 +49985,12 @@ var require_settings = __commonJS({
50092
49985
  "node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports) {
50093
49986
  "use strict";
50094
49987
  Object.defineProperty(exports, "__esModule", { value: true });
50095
- var fs8 = require_fs2();
49988
+ var fs9 = require_fs2();
50096
49989
  var Settings = class {
50097
49990
  constructor(_options = {}) {
50098
49991
  this._options = _options;
50099
49992
  this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
50100
- this.fs = fs8.createFileSystemAdapter(this._options.fs);
49993
+ this.fs = fs9.createFileSystemAdapter(this._options.fs);
50101
49994
  this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
50102
49995
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
50103
49996
  }
@@ -50119,17 +50012,17 @@ var require_out = __commonJS({
50119
50012
  var sync2 = require_sync();
50120
50013
  var settings_1 = require_settings();
50121
50014
  exports.Settings = settings_1.default;
50122
- function stat(path4, optionsOrSettingsOrCallback, callback) {
50015
+ function stat(path5, optionsOrSettingsOrCallback, callback) {
50123
50016
  if (typeof optionsOrSettingsOrCallback === "function") {
50124
- async.read(path4, getSettings(), optionsOrSettingsOrCallback);
50017
+ async.read(path5, getSettings(), optionsOrSettingsOrCallback);
50125
50018
  return;
50126
50019
  }
50127
- async.read(path4, getSettings(optionsOrSettingsOrCallback), callback);
50020
+ async.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
50128
50021
  }
50129
50022
  exports.stat = stat;
50130
- function statSync(path4, optionsOrSettings) {
50023
+ function statSync(path5, optionsOrSettings) {
50131
50024
  const settings = getSettings(optionsOrSettings);
50132
- return sync2.read(path4, settings);
50025
+ return sync2.read(path5, settings);
50133
50026
  }
50134
50027
  exports.statSync = statSync;
50135
50028
  function getSettings(settingsOrOptions = {}) {
@@ -50255,8 +50148,8 @@ var require_utils7 = __commonJS({
50255
50148
  "use strict";
50256
50149
  Object.defineProperty(exports, "__esModule", { value: true });
50257
50150
  exports.fs = void 0;
50258
- var fs8 = require_fs3();
50259
- exports.fs = fs8;
50151
+ var fs9 = require_fs3();
50152
+ exports.fs = fs9;
50260
50153
  }
50261
50154
  });
50262
50155
 
@@ -50348,16 +50241,16 @@ var require_async2 = __commonJS({
50348
50241
  return;
50349
50242
  }
50350
50243
  const tasks = names.map((name) => {
50351
- const path4 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
50244
+ const path5 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
50352
50245
  return (done) => {
50353
- fsStat.stat(path4, settings.fsStatSettings, (error2, stats) => {
50246
+ fsStat.stat(path5, settings.fsStatSettings, (error2, stats) => {
50354
50247
  if (error2 !== null) {
50355
50248
  done(error2);
50356
50249
  return;
50357
50250
  }
50358
50251
  const entry = {
50359
50252
  name,
50360
- path: path4,
50253
+ path: path5,
50361
50254
  dirent: utils.fs.createDirentFromStats(name, stats)
50362
50255
  };
50363
50256
  if (settings.stats) {
@@ -50451,14 +50344,14 @@ var require_fs4 = __commonJS({
50451
50344
  "use strict";
50452
50345
  Object.defineProperty(exports, "__esModule", { value: true });
50453
50346
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
50454
- var fs8 = require("fs");
50347
+ var fs9 = require("fs");
50455
50348
  exports.FILE_SYSTEM_ADAPTER = {
50456
- lstat: fs8.lstat,
50457
- stat: fs8.stat,
50458
- lstatSync: fs8.lstatSync,
50459
- statSync: fs8.statSync,
50460
- readdir: fs8.readdir,
50461
- readdirSync: fs8.readdirSync
50349
+ lstat: fs9.lstat,
50350
+ stat: fs9.stat,
50351
+ lstatSync: fs9.lstatSync,
50352
+ statSync: fs9.statSync,
50353
+ readdir: fs9.readdir,
50354
+ readdirSync: fs9.readdirSync
50462
50355
  };
50463
50356
  function createFileSystemAdapter(fsMethods) {
50464
50357
  if (fsMethods === void 0) {
@@ -50475,15 +50368,15 @@ var require_settings2 = __commonJS({
50475
50368
  "node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports) {
50476
50369
  "use strict";
50477
50370
  Object.defineProperty(exports, "__esModule", { value: true });
50478
- var path4 = require("path");
50371
+ var path5 = require("path");
50479
50372
  var fsStat = require_out();
50480
- var fs8 = require_fs4();
50373
+ var fs9 = require_fs4();
50481
50374
  var Settings = class {
50482
50375
  constructor(_options = {}) {
50483
50376
  this._options = _options;
50484
50377
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
50485
- this.fs = fs8.createFileSystemAdapter(this._options.fs);
50486
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path4.sep);
50378
+ this.fs = fs9.createFileSystemAdapter(this._options.fs);
50379
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
50487
50380
  this.stats = this._getValue(this._options.stats, false);
50488
50381
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
50489
50382
  this.fsStatSettings = new fsStat.Settings({
@@ -50510,17 +50403,17 @@ var require_out2 = __commonJS({
50510
50403
  var sync2 = require_sync2();
50511
50404
  var settings_1 = require_settings2();
50512
50405
  exports.Settings = settings_1.default;
50513
- function scandir(path4, optionsOrSettingsOrCallback, callback) {
50406
+ function scandir(path5, optionsOrSettingsOrCallback, callback) {
50514
50407
  if (typeof optionsOrSettingsOrCallback === "function") {
50515
- async.read(path4, getSettings(), optionsOrSettingsOrCallback);
50408
+ async.read(path5, getSettings(), optionsOrSettingsOrCallback);
50516
50409
  return;
50517
50410
  }
50518
- async.read(path4, getSettings(optionsOrSettingsOrCallback), callback);
50411
+ async.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
50519
50412
  }
50520
50413
  exports.scandir = scandir;
50521
- function scandirSync(path4, optionsOrSettings) {
50414
+ function scandirSync(path5, optionsOrSettings) {
50522
50415
  const settings = getSettings(optionsOrSettings);
50523
- return sync2.read(path4, settings);
50416
+ return sync2.read(path5, settings);
50524
50417
  }
50525
50418
  exports.scandirSync = scandirSync;
50526
50419
  function getSettings(settingsOrOptions = {}) {
@@ -50758,7 +50651,7 @@ var require_queue = __commonJS({
50758
50651
  queue.drained = drained;
50759
50652
  return queue;
50760
50653
  function push(value) {
50761
- var p = new Promise(function(resolve2, reject) {
50654
+ var p2 = new Promise(function(resolve2, reject) {
50762
50655
  pushCb(value, function(err2, result) {
50763
50656
  if (err2) {
50764
50657
  reject(err2);
@@ -50767,11 +50660,11 @@ var require_queue = __commonJS({
50767
50660
  resolve2(result);
50768
50661
  });
50769
50662
  });
50770
- p.catch(noop2);
50771
- return p;
50663
+ p2.catch(noop2);
50664
+ return p2;
50772
50665
  }
50773
50666
  function unshift(value) {
50774
- var p = new Promise(function(resolve2, reject) {
50667
+ var p2 = new Promise(function(resolve2, reject) {
50775
50668
  unshiftCb(value, function(err2, result) {
50776
50669
  if (err2) {
50777
50670
  reject(err2);
@@ -50780,8 +50673,8 @@ var require_queue = __commonJS({
50780
50673
  resolve2(result);
50781
50674
  });
50782
50675
  });
50783
- p.catch(noop2);
50784
- return p;
50676
+ p2.catch(noop2);
50677
+ return p2;
50785
50678
  }
50786
50679
  function drained() {
50787
50680
  if (queue.idle()) {
@@ -50790,13 +50683,13 @@ var require_queue = __commonJS({
50790
50683
  });
50791
50684
  }
50792
50685
  var previousDrain = queue.drain;
50793
- var p = new Promise(function(resolve2) {
50686
+ var p2 = new Promise(function(resolve2) {
50794
50687
  queue.drain = function() {
50795
50688
  previousDrain();
50796
50689
  resolve2();
50797
50690
  };
50798
50691
  });
50799
- return p;
50692
+ return p2;
50800
50693
  }
50801
50694
  }
50802
50695
  module2.exports = fastqueue;
@@ -51124,7 +51017,7 @@ var require_settings3 = __commonJS({
51124
51017
  "node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports) {
51125
51018
  "use strict";
51126
51019
  Object.defineProperty(exports, "__esModule", { value: true });
51127
- var path4 = require("path");
51020
+ var path5 = require("path");
51128
51021
  var fsScandir = require_out2();
51129
51022
  var Settings = class {
51130
51023
  constructor(_options = {}) {
@@ -51134,7 +51027,7 @@ var require_settings3 = __commonJS({
51134
51027
  this.deepFilter = this._getValue(this._options.deepFilter, null);
51135
51028
  this.entryFilter = this._getValue(this._options.entryFilter, null);
51136
51029
  this.errorFilter = this._getValue(this._options.errorFilter, null);
51137
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path4.sep);
51030
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
51138
51031
  this.fsScandirSettings = new fsScandir.Settings({
51139
51032
  followSymbolicLinks: this._options.followSymbolicLinks,
51140
51033
  fs: this._options.fs,
@@ -51196,7 +51089,7 @@ var require_reader2 = __commonJS({
51196
51089
  "node_modules/.pnpm/fast-glob@3.3.1/node_modules/fast-glob/out/readers/reader.js"(exports) {
51197
51090
  "use strict";
51198
51091
  Object.defineProperty(exports, "__esModule", { value: true });
51199
- var path4 = require("path");
51092
+ var path5 = require("path");
51200
51093
  var fsStat = require_out();
51201
51094
  var utils = require_utils6();
51202
51095
  var Reader = class {
@@ -51209,7 +51102,7 @@ var require_reader2 = __commonJS({
51209
51102
  });
51210
51103
  }
51211
51104
  _getFullEntryPath(filepath) {
51212
- return path4.resolve(this._settings.cwd, filepath);
51105
+ return path5.resolve(this._settings.cwd, filepath);
51213
51106
  }
51214
51107
  _makeEntry(stats, pattern) {
51215
51108
  const entry = {
@@ -51603,7 +51496,7 @@ var require_provider = __commonJS({
51603
51496
  "node_modules/.pnpm/fast-glob@3.3.1/node_modules/fast-glob/out/providers/provider.js"(exports) {
51604
51497
  "use strict";
51605
51498
  Object.defineProperty(exports, "__esModule", { value: true });
51606
- var path4 = require("path");
51499
+ var path5 = require("path");
51607
51500
  var deep_1 = require_deep();
51608
51501
  var entry_1 = require_entry();
51609
51502
  var error_1 = require_error();
@@ -51617,7 +51510,7 @@ var require_provider = __commonJS({
51617
51510
  this.entryTransformer = new entry_2.default(this._settings);
51618
51511
  }
51619
51512
  _getRootDirectory(task) {
51620
- return path4.resolve(this._settings.cwd, task.base);
51513
+ return path5.resolve(this._settings.cwd, task.base);
51621
51514
  }
51622
51515
  _getReaderOptions(task) {
51623
51516
  const basePath = task.base === "." ? "" : task.base;
@@ -51798,16 +51691,16 @@ var require_settings4 = __commonJS({
51798
51691
  "use strict";
51799
51692
  Object.defineProperty(exports, "__esModule", { value: true });
51800
51693
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
51801
- var fs8 = require("fs");
51802
- var os2 = require("os");
51803
- var CPU_COUNT = Math.max(os2.cpus().length, 1);
51694
+ var fs9 = require("fs");
51695
+ var os3 = require("os");
51696
+ var CPU_COUNT = Math.max(os3.cpus().length, 1);
51804
51697
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
51805
- lstat: fs8.lstat,
51806
- lstatSync: fs8.lstatSync,
51807
- stat: fs8.stat,
51808
- statSync: fs8.statSync,
51809
- readdir: fs8.readdir,
51810
- readdirSync: fs8.readdirSync
51698
+ lstat: fs9.lstat,
51699
+ lstatSync: fs9.lstatSync,
51700
+ stat: fs9.stat,
51701
+ statSync: fs9.statSync,
51702
+ readdir: fs9.readdir,
51703
+ readdirSync: fs9.readdirSync
51811
51704
  };
51812
51705
  var Settings = class {
51813
51706
  constructor(_options = {}) {
@@ -51958,13 +51851,13 @@ var require_path_type = __commonJS({
51958
51851
  "node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js"(exports) {
51959
51852
  "use strict";
51960
51853
  var { promisify: promisify2 } = require("util");
51961
- var fs8 = require("fs");
51854
+ var fs9 = require("fs");
51962
51855
  async function isType(fsStatType, statsMethodName, filePath) {
51963
51856
  if (typeof filePath !== "string") {
51964
51857
  throw new TypeError(`Expected a string, got ${typeof filePath}`);
51965
51858
  }
51966
51859
  try {
51967
- const stats = await promisify2(fs8[fsStatType])(filePath);
51860
+ const stats = await promisify2(fs9[fsStatType])(filePath);
51968
51861
  return stats[statsMethodName]();
51969
51862
  } catch (error2) {
51970
51863
  if (error2.code === "ENOENT") {
@@ -51978,7 +51871,7 @@ var require_path_type = __commonJS({
51978
51871
  throw new TypeError(`Expected a string, got ${typeof filePath}`);
51979
51872
  }
51980
51873
  try {
51981
- return fs8[fsStatType](filePath)[statsMethodName]();
51874
+ return fs9[fsStatType](filePath)[statsMethodName]();
51982
51875
  } catch (error2) {
51983
51876
  if (error2.code === "ENOENT") {
51984
51877
  return false;
@@ -51999,15 +51892,15 @@ var require_path_type = __commonJS({
51999
51892
  var require_dir_glob = __commonJS({
52000
51893
  "node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.js"(exports, module2) {
52001
51894
  "use strict";
52002
- var path4 = require("path");
51895
+ var path5 = require("path");
52003
51896
  var pathType = require_path_type();
52004
51897
  var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0];
52005
51898
  var getPath = (filepath, cwd) => {
52006
51899
  const pth = filepath[0] === "!" ? filepath.slice(1) : filepath;
52007
- return path4.isAbsolute(pth) ? pth : path4.join(cwd, pth);
51900
+ return path5.isAbsolute(pth) ? pth : path5.join(cwd, pth);
52008
51901
  };
52009
51902
  var addExtensions = (file, extensions) => {
52010
- if (path4.extname(file)) {
51903
+ if (path5.extname(file)) {
52011
51904
  return `**/${file}`;
52012
51905
  }
52013
51906
  return `**/${file}.${getExtensions(extensions)}`;
@@ -52020,15 +51913,15 @@ var require_dir_glob = __commonJS({
52020
51913
  throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``);
52021
51914
  }
52022
51915
  if (options.files && options.extensions) {
52023
- return options.files.map((x) => path4.posix.join(directory, addExtensions(x, options.extensions)));
51916
+ return options.files.map((x) => path5.posix.join(directory, addExtensions(x, options.extensions)));
52024
51917
  }
52025
51918
  if (options.files) {
52026
- return options.files.map((x) => path4.posix.join(directory, `**/${x}`));
51919
+ return options.files.map((x) => path5.posix.join(directory, `**/${x}`));
52027
51920
  }
52028
51921
  if (options.extensions) {
52029
- return [path4.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
51922
+ return [path5.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
52030
51923
  }
52031
- return [path4.posix.join(directory, "**")];
51924
+ return [path5.posix.join(directory, "**")];
52032
51925
  };
52033
51926
  module2.exports = async (input, options) => {
52034
51927
  options = {
@@ -52274,17 +52167,17 @@ var require_ignore = __commonJS({
52274
52167
  var throwError = (message, Ctor) => {
52275
52168
  throw new Ctor(message);
52276
52169
  };
52277
- var checkPath = (path4, originalPath, doThrow) => {
52278
- if (!isString2(path4)) {
52170
+ var checkPath = (path5, originalPath, doThrow) => {
52171
+ if (!isString2(path5)) {
52279
52172
  return doThrow(
52280
52173
  `path must be a string, but got \`${originalPath}\``,
52281
52174
  TypeError
52282
52175
  );
52283
52176
  }
52284
- if (!path4) {
52177
+ if (!path5) {
52285
52178
  return doThrow(`path must not be empty`, TypeError);
52286
52179
  }
52287
- if (checkPath.isNotRelative(path4)) {
52180
+ if (checkPath.isNotRelative(path5)) {
52288
52181
  const r = "`path.relative()`d";
52289
52182
  return doThrow(
52290
52183
  `path should be a ${r} string, but got "${originalPath}"`,
@@ -52293,9 +52186,9 @@ var require_ignore = __commonJS({
52293
52186
  }
52294
52187
  return true;
52295
52188
  };
52296
- var isNotRelative = (path4) => REGEX_TEST_INVALID_PATH.test(path4);
52189
+ var isNotRelative = (path5) => REGEX_TEST_INVALID_PATH.test(path5);
52297
52190
  checkPath.isNotRelative = isNotRelative;
52298
- checkPath.convert = (p) => p;
52191
+ checkPath.convert = (p2) => p2;
52299
52192
  var Ignore = class {
52300
52193
  constructor({
52301
52194
  ignorecase = true,
@@ -52352,7 +52245,7 @@ var require_ignore = __commonJS({
52352
52245
  // setting `checkUnignored` to `false` could reduce additional
52353
52246
  // path matching.
52354
52247
  // @returns {TestResult} true if a file is ignored
52355
- _testOne(path4, checkUnignored) {
52248
+ _testOne(path5, checkUnignored) {
52356
52249
  let ignored = false;
52357
52250
  let unignored = false;
52358
52251
  this._rules.forEach((rule) => {
@@ -52360,7 +52253,7 @@ var require_ignore = __commonJS({
52360
52253
  if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
52361
52254
  return;
52362
52255
  }
52363
- const matched = rule.regex.test(path4);
52256
+ const matched = rule.regex.test(path5);
52364
52257
  if (matched) {
52365
52258
  ignored = !negative;
52366
52259
  unignored = negative;
@@ -52373,24 +52266,24 @@ var require_ignore = __commonJS({
52373
52266
  }
52374
52267
  // @returns {TestResult}
52375
52268
  _test(originalPath, cache, checkUnignored, slices) {
52376
- const path4 = originalPath && checkPath.convert(originalPath);
52269
+ const path5 = originalPath && checkPath.convert(originalPath);
52377
52270
  checkPath(
52378
- path4,
52271
+ path5,
52379
52272
  originalPath,
52380
52273
  this._allowRelativePaths ? RETURN_FALSE : throwError
52381
52274
  );
52382
- return this._t(path4, cache, checkUnignored, slices);
52275
+ return this._t(path5, cache, checkUnignored, slices);
52383
52276
  }
52384
- _t(path4, cache, checkUnignored, slices) {
52385
- if (path4 in cache) {
52386
- return cache[path4];
52277
+ _t(path5, cache, checkUnignored, slices) {
52278
+ if (path5 in cache) {
52279
+ return cache[path5];
52387
52280
  }
52388
52281
  if (!slices) {
52389
- slices = path4.split(SLASH);
52282
+ slices = path5.split(SLASH);
52390
52283
  }
52391
52284
  slices.pop();
52392
52285
  if (!slices.length) {
52393
- return cache[path4] = this._testOne(path4, checkUnignored);
52286
+ return cache[path5] = this._testOne(path5, checkUnignored);
52394
52287
  }
52395
52288
  const parent = this._t(
52396
52289
  slices.join(SLASH) + SLASH,
@@ -52398,24 +52291,24 @@ var require_ignore = __commonJS({
52398
52291
  checkUnignored,
52399
52292
  slices
52400
52293
  );
52401
- return cache[path4] = parent.ignored ? parent : this._testOne(path4, checkUnignored);
52294
+ return cache[path5] = parent.ignored ? parent : this._testOne(path5, checkUnignored);
52402
52295
  }
52403
- ignores(path4) {
52404
- return this._test(path4, this._ignoreCache, false).ignored;
52296
+ ignores(path5) {
52297
+ return this._test(path5, this._ignoreCache, false).ignored;
52405
52298
  }
52406
52299
  createFilter() {
52407
- return (path4) => !this.ignores(path4);
52300
+ return (path5) => !this.ignores(path5);
52408
52301
  }
52409
52302
  filter(paths) {
52410
52303
  return makeArray(paths).filter(this.createFilter());
52411
52304
  }
52412
52305
  // @returns {TestResult}
52413
- test(path4) {
52414
- return this._test(path4, this._testCache, true);
52306
+ test(path5) {
52307
+ return this._test(path5, this._testCache, true);
52415
52308
  }
52416
52309
  };
52417
52310
  var factory = (options) => new Ignore(options);
52418
- var isPathValid = (path4) => checkPath(path4 && checkPath.convert(path4), path4, RETURN_FALSE);
52311
+ var isPathValid = (path5) => checkPath(path5 && checkPath.convert(path5), path5, RETURN_FALSE);
52419
52312
  factory.isPathValid = isPathValid;
52420
52313
  factory.default = factory;
52421
52314
  module2.exports = factory;
@@ -52426,19 +52319,19 @@ var require_ignore = __commonJS({
52426
52319
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
52427
52320
  checkPath.convert = makePosix;
52428
52321
  const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
52429
- checkPath.isNotRelative = (path4) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path4) || isNotRelative(path4);
52322
+ checkPath.isNotRelative = (path5) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path5) || isNotRelative(path5);
52430
52323
  }
52431
52324
  }
52432
52325
  });
52433
52326
 
52434
52327
  // node_modules/.pnpm/slash@4.0.0/node_modules/slash/index.js
52435
- function slash(path4) {
52436
- const isExtendedLengthPath = /^\\\\\?\\/.test(path4);
52437
- const hasNonAscii = /[^\u0000-\u0080]+/.test(path4);
52328
+ function slash(path5) {
52329
+ const isExtendedLengthPath = /^\\\\\?\\/.test(path5);
52330
+ const hasNonAscii = /[^\u0000-\u0080]+/.test(path5);
52438
52331
  if (isExtendedLengthPath || hasNonAscii) {
52439
- return path4;
52332
+ return path5;
52440
52333
  }
52441
- return path4.replace(/\\/g, "/");
52334
+ return path5.replace(/\\/g, "/");
52442
52335
  }
52443
52336
  var init_slash = __esm({
52444
52337
  "node_modules/.pnpm/slash@4.0.0/node_modules/slash/index.js"() {
@@ -52624,9 +52517,9 @@ var init_globby = __esm({
52624
52517
  createFilterFunction = (isIgnored) => {
52625
52518
  const seen = /* @__PURE__ */ new Set();
52626
52519
  return (fastGlobResult) => {
52627
- const path4 = fastGlobResult.path || fastGlobResult;
52628
- const pathKey = import_node_path2.default.normalize(path4);
52629
- const seenOrIgnored = seen.has(pathKey) || isIgnored && isIgnored(path4);
52520
+ const path5 = fastGlobResult.path || fastGlobResult;
52521
+ const pathKey = import_node_path2.default.normalize(path5);
52522
+ const seenOrIgnored = seen.has(pathKey) || isIgnored && isIgnored(path5);
52630
52523
  seen.add(pathKey);
52631
52524
  return !seenOrIgnored;
52632
52525
  };
@@ -53032,17 +52925,17 @@ var require_visit = __commonJS({
53032
52925
  visit.BREAK = BREAK;
53033
52926
  visit.SKIP = SKIP;
53034
52927
  visit.REMOVE = REMOVE;
53035
- function visit_(key, node, visitor, path4) {
53036
- const ctrl = callVisitor(key, node, visitor, path4);
52928
+ function visit_(key, node, visitor, path5) {
52929
+ const ctrl = callVisitor(key, node, visitor, path5);
53037
52930
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
53038
- replaceNode(key, path4, ctrl);
53039
- return visit_(key, ctrl, visitor, path4);
52931
+ replaceNode(key, path5, ctrl);
52932
+ return visit_(key, ctrl, visitor, path5);
53040
52933
  }
53041
52934
  if (typeof ctrl !== "symbol") {
53042
52935
  if (identity.isCollection(node)) {
53043
- path4 = Object.freeze(path4.concat(node));
52936
+ path5 = Object.freeze(path5.concat(node));
53044
52937
  for (let i = 0; i < node.items.length; ++i) {
53045
- const ci = visit_(i, node.items[i], visitor, path4);
52938
+ const ci = visit_(i, node.items[i], visitor, path5);
53046
52939
  if (typeof ci === "number")
53047
52940
  i = ci - 1;
53048
52941
  else if (ci === BREAK)
@@ -53053,13 +52946,13 @@ var require_visit = __commonJS({
53053
52946
  }
53054
52947
  }
53055
52948
  } else if (identity.isPair(node)) {
53056
- path4 = Object.freeze(path4.concat(node));
53057
- const ck = visit_("key", node.key, visitor, path4);
52949
+ path5 = Object.freeze(path5.concat(node));
52950
+ const ck = visit_("key", node.key, visitor, path5);
53058
52951
  if (ck === BREAK)
53059
52952
  return BREAK;
53060
52953
  else if (ck === REMOVE)
53061
52954
  node.key = null;
53062
- const cv = visit_("value", node.value, visitor, path4);
52955
+ const cv = visit_("value", node.value, visitor, path5);
53063
52956
  if (cv === BREAK)
53064
52957
  return BREAK;
53065
52958
  else if (cv === REMOVE)
@@ -53080,17 +52973,17 @@ var require_visit = __commonJS({
53080
52973
  visitAsync.BREAK = BREAK;
53081
52974
  visitAsync.SKIP = SKIP;
53082
52975
  visitAsync.REMOVE = REMOVE;
53083
- async function visitAsync_(key, node, visitor, path4) {
53084
- const ctrl = await callVisitor(key, node, visitor, path4);
52976
+ async function visitAsync_(key, node, visitor, path5) {
52977
+ const ctrl = await callVisitor(key, node, visitor, path5);
53085
52978
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
53086
- replaceNode(key, path4, ctrl);
53087
- return visitAsync_(key, ctrl, visitor, path4);
52979
+ replaceNode(key, path5, ctrl);
52980
+ return visitAsync_(key, ctrl, visitor, path5);
53088
52981
  }
53089
52982
  if (typeof ctrl !== "symbol") {
53090
52983
  if (identity.isCollection(node)) {
53091
- path4 = Object.freeze(path4.concat(node));
52984
+ path5 = Object.freeze(path5.concat(node));
53092
52985
  for (let i = 0; i < node.items.length; ++i) {
53093
- const ci = await visitAsync_(i, node.items[i], visitor, path4);
52986
+ const ci = await visitAsync_(i, node.items[i], visitor, path5);
53094
52987
  if (typeof ci === "number")
53095
52988
  i = ci - 1;
53096
52989
  else if (ci === BREAK)
@@ -53101,13 +52994,13 @@ var require_visit = __commonJS({
53101
52994
  }
53102
52995
  }
53103
52996
  } else if (identity.isPair(node)) {
53104
- path4 = Object.freeze(path4.concat(node));
53105
- const ck = await visitAsync_("key", node.key, visitor, path4);
52997
+ path5 = Object.freeze(path5.concat(node));
52998
+ const ck = await visitAsync_("key", node.key, visitor, path5);
53106
52999
  if (ck === BREAK)
53107
53000
  return BREAK;
53108
53001
  else if (ck === REMOVE)
53109
53002
  node.key = null;
53110
- const cv = await visitAsync_("value", node.value, visitor, path4);
53003
+ const cv = await visitAsync_("value", node.value, visitor, path5);
53111
53004
  if (cv === BREAK)
53112
53005
  return BREAK;
53113
53006
  else if (cv === REMOVE)
@@ -53134,24 +53027,24 @@ var require_visit = __commonJS({
53134
53027
  }
53135
53028
  return visitor;
53136
53029
  }
53137
- function callVisitor(key, node, visitor, path4) {
53030
+ function callVisitor(key, node, visitor, path5) {
53138
53031
  var _a3, _b, _c, _d, _e;
53139
53032
  if (typeof visitor === "function")
53140
- return visitor(key, node, path4);
53033
+ return visitor(key, node, path5);
53141
53034
  if (identity.isMap(node))
53142
- return (_a3 = visitor.Map) == null ? void 0 : _a3.call(visitor, key, node, path4);
53035
+ return (_a3 = visitor.Map) == null ? void 0 : _a3.call(visitor, key, node, path5);
53143
53036
  if (identity.isSeq(node))
53144
- return (_b = visitor.Seq) == null ? void 0 : _b.call(visitor, key, node, path4);
53037
+ return (_b = visitor.Seq) == null ? void 0 : _b.call(visitor, key, node, path5);
53145
53038
  if (identity.isPair(node))
53146
- return (_c = visitor.Pair) == null ? void 0 : _c.call(visitor, key, node, path4);
53039
+ return (_c = visitor.Pair) == null ? void 0 : _c.call(visitor, key, node, path5);
53147
53040
  if (identity.isScalar(node))
53148
- return (_d = visitor.Scalar) == null ? void 0 : _d.call(visitor, key, node, path4);
53041
+ return (_d = visitor.Scalar) == null ? void 0 : _d.call(visitor, key, node, path5);
53149
53042
  if (identity.isAlias(node))
53150
- return (_e = visitor.Alias) == null ? void 0 : _e.call(visitor, key, node, path4);
53043
+ return (_e = visitor.Alias) == null ? void 0 : _e.call(visitor, key, node, path5);
53151
53044
  return void 0;
53152
53045
  }
53153
- function replaceNode(key, path4, node) {
53154
- const parent = path4[path4.length - 1];
53046
+ function replaceNode(key, path5, node) {
53047
+ const parent = path5[path5.length - 1];
53155
53048
  if (identity.isCollection(parent)) {
53156
53049
  parent.items[key] = node;
53157
53050
  } else if (identity.isPair(parent)) {
@@ -53747,10 +53640,10 @@ var require_Collection = __commonJS({
53747
53640
  var createNode = require_createNode();
53748
53641
  var identity = require_identity();
53749
53642
  var Node = require_Node();
53750
- function collectionFromPath(schema4, path4, value) {
53643
+ function collectionFromPath(schema4, path5, value) {
53751
53644
  let v = value;
53752
- for (let i = path4.length - 1; i >= 0; --i) {
53753
- const k = path4[i];
53645
+ for (let i = path5.length - 1; i >= 0; --i) {
53646
+ const k = path5[i];
53754
53647
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
53755
53648
  const a = [];
53756
53649
  a[k] = v;
@@ -53769,7 +53662,7 @@ var require_Collection = __commonJS({
53769
53662
  sourceObjects: /* @__PURE__ */ new Map()
53770
53663
  });
53771
53664
  }
53772
- var isEmptyPath = (path4) => path4 == null || typeof path4 === "object" && !!path4[Symbol.iterator]().next().done;
53665
+ var isEmptyPath = (path5) => path5 == null || typeof path5 === "object" && !!path5[Symbol.iterator]().next().done;
53773
53666
  var Collection = class extends Node.NodeBase {
53774
53667
  constructor(type, schema4) {
53775
53668
  super(type);
@@ -53799,11 +53692,11 @@ var require_Collection = __commonJS({
53799
53692
  * be a Pair instance or a `{ key, value }` object, which may not have a key
53800
53693
  * that already exists in the map.
53801
53694
  */
53802
- addIn(path4, value) {
53803
- if (isEmptyPath(path4))
53695
+ addIn(path5, value) {
53696
+ if (isEmptyPath(path5))
53804
53697
  this.add(value);
53805
53698
  else {
53806
- const [key, ...rest] = path4;
53699
+ const [key, ...rest] = path5;
53807
53700
  const node = this.get(key, true);
53808
53701
  if (identity.isCollection(node))
53809
53702
  node.addIn(rest, value);
@@ -53817,8 +53710,8 @@ var require_Collection = __commonJS({
53817
53710
  * Removes a value from the collection.
53818
53711
  * @returns `true` if the item was found and removed.
53819
53712
  */
53820
- deleteIn(path4) {
53821
- const [key, ...rest] = path4;
53713
+ deleteIn(path5) {
53714
+ const [key, ...rest] = path5;
53822
53715
  if (rest.length === 0)
53823
53716
  return this.delete(key);
53824
53717
  const node = this.get(key, true);
@@ -53832,8 +53725,8 @@ var require_Collection = __commonJS({
53832
53725
  * scalar values from their surrounding node; to disable set `keepScalar` to
53833
53726
  * `true` (collections are always returned intact).
53834
53727
  */
53835
- getIn(path4, keepScalar) {
53836
- const [key, ...rest] = path4;
53728
+ getIn(path5, keepScalar) {
53729
+ const [key, ...rest] = path5;
53837
53730
  const node = this.get(key, true);
53838
53731
  if (rest.length === 0)
53839
53732
  return !keepScalar && identity.isScalar(node) ? node.value : node;
@@ -53851,8 +53744,8 @@ var require_Collection = __commonJS({
53851
53744
  /**
53852
53745
  * Checks if the collection includes a value with the key `key`.
53853
53746
  */
53854
- hasIn(path4) {
53855
- const [key, ...rest] = path4;
53747
+ hasIn(path5) {
53748
+ const [key, ...rest] = path5;
53856
53749
  if (rest.length === 0)
53857
53750
  return this.has(key);
53858
53751
  const node = this.get(key, true);
@@ -53862,8 +53755,8 @@ var require_Collection = __commonJS({
53862
53755
  * Sets a value in this collection. For `!!set`, `value` needs to be a
53863
53756
  * boolean to add/remove the item from the set.
53864
53757
  */
53865
- setIn(path4, value) {
53866
- const [key, ...rest] = path4;
53758
+ setIn(path5, value) {
53759
+ const [key, ...rest] = path5;
53867
53760
  if (rest.length === 0) {
53868
53761
  this.set(key, value);
53869
53762
  } else {
@@ -55925,7 +55818,7 @@ var require_timestamp = __commonJS({
55925
55818
  const sign = str[0];
55926
55819
  const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
55927
55820
  const num = (n) => asBigInt ? BigInt(n) : Number(n);
55928
- const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
55821
+ const res = parts.replace(/_/g, "").split(":").reduce((res2, p2) => res2 * num(60) + num(p2), num(0));
55929
55822
  return sign === "-" ? num(-1) * res : res;
55930
55823
  }
55931
55824
  function stringifySexagesimal(node) {
@@ -56320,9 +56213,9 @@ var require_Document = __commonJS({
56320
56213
  this.contents.add(value);
56321
56214
  }
56322
56215
  /** Adds a value to the document. */
56323
- addIn(path4, value) {
56216
+ addIn(path5, value) {
56324
56217
  if (assertCollection(this.contents))
56325
- this.contents.addIn(path4, value);
56218
+ this.contents.addIn(path5, value);
56326
56219
  }
56327
56220
  /**
56328
56221
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -56397,14 +56290,14 @@ var require_Document = __commonJS({
56397
56290
  * Removes a value from the document.
56398
56291
  * @returns `true` if the item was found and removed.
56399
56292
  */
56400
- deleteIn(path4) {
56401
- if (Collection.isEmptyPath(path4)) {
56293
+ deleteIn(path5) {
56294
+ if (Collection.isEmptyPath(path5)) {
56402
56295
  if (this.contents == null)
56403
56296
  return false;
56404
56297
  this.contents = null;
56405
56298
  return true;
56406
56299
  }
56407
- return assertCollection(this.contents) ? this.contents.deleteIn(path4) : false;
56300
+ return assertCollection(this.contents) ? this.contents.deleteIn(path5) : false;
56408
56301
  }
56409
56302
  /**
56410
56303
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -56419,10 +56312,10 @@ var require_Document = __commonJS({
56419
56312
  * scalar values from their surrounding node; to disable set `keepScalar` to
56420
56313
  * `true` (collections are always returned intact).
56421
56314
  */
56422
- getIn(path4, keepScalar) {
56423
- if (Collection.isEmptyPath(path4))
56315
+ getIn(path5, keepScalar) {
56316
+ if (Collection.isEmptyPath(path5))
56424
56317
  return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;
56425
- return identity.isCollection(this.contents) ? this.contents.getIn(path4, keepScalar) : void 0;
56318
+ return identity.isCollection(this.contents) ? this.contents.getIn(path5, keepScalar) : void 0;
56426
56319
  }
56427
56320
  /**
56428
56321
  * Checks if the document includes a value with the key `key`.
@@ -56433,10 +56326,10 @@ var require_Document = __commonJS({
56433
56326
  /**
56434
56327
  * Checks if the document includes a value at `path`.
56435
56328
  */
56436
- hasIn(path4) {
56437
- if (Collection.isEmptyPath(path4))
56329
+ hasIn(path5) {
56330
+ if (Collection.isEmptyPath(path5))
56438
56331
  return this.contents !== void 0;
56439
- return identity.isCollection(this.contents) ? this.contents.hasIn(path4) : false;
56332
+ return identity.isCollection(this.contents) ? this.contents.hasIn(path5) : false;
56440
56333
  }
56441
56334
  /**
56442
56335
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -56453,13 +56346,13 @@ var require_Document = __commonJS({
56453
56346
  * Sets a value in this document. For `!!set`, `value` needs to be a
56454
56347
  * boolean to add/remove the item from the set.
56455
56348
  */
56456
- setIn(path4, value) {
56457
- if (Collection.isEmptyPath(path4)) {
56349
+ setIn(path5, value) {
56350
+ if (Collection.isEmptyPath(path5)) {
56458
56351
  this.contents = value;
56459
56352
  } else if (this.contents == null) {
56460
- this.contents = Collection.collectionFromPath(this.schema, Array.from(path4), value);
56353
+ this.contents = Collection.collectionFromPath(this.schema, Array.from(path5), value);
56461
56354
  } else if (assertCollection(this.contents)) {
56462
- this.contents.setIn(path4, value);
56355
+ this.contents.setIn(path5, value);
56463
56356
  }
56464
56357
  }
56465
56358
  /**
@@ -58351,9 +58244,9 @@ var require_cst_visit = __commonJS({
58351
58244
  visit.BREAK = BREAK;
58352
58245
  visit.SKIP = SKIP;
58353
58246
  visit.REMOVE = REMOVE;
58354
- visit.itemAtPath = (cst, path4) => {
58247
+ visit.itemAtPath = (cst, path5) => {
58355
58248
  let item = cst;
58356
- for (const [field, index4] of path4) {
58249
+ for (const [field, index4] of path5) {
58357
58250
  const tok = item == null ? void 0 : item[field];
58358
58251
  if (tok && "items" in tok) {
58359
58252
  item = tok.items[index4];
@@ -58362,23 +58255,23 @@ var require_cst_visit = __commonJS({
58362
58255
  }
58363
58256
  return item;
58364
58257
  };
58365
- visit.parentCollection = (cst, path4) => {
58366
- const parent = visit.itemAtPath(cst, path4.slice(0, -1));
58367
- const field = path4[path4.length - 1][0];
58258
+ visit.parentCollection = (cst, path5) => {
58259
+ const parent = visit.itemAtPath(cst, path5.slice(0, -1));
58260
+ const field = path5[path5.length - 1][0];
58368
58261
  const coll = parent == null ? void 0 : parent[field];
58369
58262
  if (coll && "items" in coll)
58370
58263
  return coll;
58371
58264
  throw new Error("Parent collection not found");
58372
58265
  };
58373
- function _visit(path4, item, visitor) {
58374
- let ctrl = visitor(item, path4);
58266
+ function _visit(path5, item, visitor) {
58267
+ let ctrl = visitor(item, path5);
58375
58268
  if (typeof ctrl === "symbol")
58376
58269
  return ctrl;
58377
58270
  for (const field of ["key", "value"]) {
58378
58271
  const token = item[field];
58379
58272
  if (token && "items" in token) {
58380
58273
  for (let i = 0; i < token.items.length; ++i) {
58381
- const ci = _visit(Object.freeze(path4.concat([[field, i]])), token.items[i], visitor);
58274
+ const ci = _visit(Object.freeze(path5.concat([[field, i]])), token.items[i], visitor);
58382
58275
  if (typeof ci === "number")
58383
58276
  i = ci - 1;
58384
58277
  else if (ci === BREAK)
@@ -58389,10 +58282,10 @@ var require_cst_visit = __commonJS({
58389
58282
  }
58390
58283
  }
58391
58284
  if (typeof ctrl === "function" && field === "key")
58392
- ctrl = ctrl(item, path4);
58285
+ ctrl = ctrl(item, path5);
58393
58286
  }
58394
58287
  }
58395
- return typeof ctrl === "function" ? ctrl(item, path4) : ctrl;
58288
+ return typeof ctrl === "function" ? ctrl(item, path5) : ctrl;
58396
58289
  }
58397
58290
  exports.visit = visit;
58398
58291
  }
@@ -59657,14 +59550,14 @@ var require_parser2 = __commonJS({
59657
59550
  case "scalar":
59658
59551
  case "single-quoted-scalar":
59659
59552
  case "double-quoted-scalar": {
59660
- const fs8 = this.flowScalar(this.type);
59553
+ const fs9 = this.flowScalar(this.type);
59661
59554
  if (atNextItem || it.value) {
59662
- map.items.push({ start, key: fs8, sep: [] });
59555
+ map.items.push({ start, key: fs9, sep: [] });
59663
59556
  this.onKeyLine = true;
59664
59557
  } else if (it.sep) {
59665
- this.stack.push(fs8);
59558
+ this.stack.push(fs9);
59666
59559
  } else {
59667
- Object.assign(it, { key: fs8, sep: [] });
59560
+ Object.assign(it, { key: fs9, sep: [] });
59668
59561
  this.onKeyLine = true;
59669
59562
  }
59670
59563
  return;
@@ -59783,13 +59676,13 @@ var require_parser2 = __commonJS({
59783
59676
  case "scalar":
59784
59677
  case "single-quoted-scalar":
59785
59678
  case "double-quoted-scalar": {
59786
- const fs8 = this.flowScalar(this.type);
59679
+ const fs9 = this.flowScalar(this.type);
59787
59680
  if (!it || it.value)
59788
- fc.items.push({ start: [], key: fs8, sep: [] });
59681
+ fc.items.push({ start: [], key: fs9, sep: [] });
59789
59682
  else if (it.sep)
59790
- this.stack.push(fs8);
59683
+ this.stack.push(fs9);
59791
59684
  else
59792
- Object.assign(it, { key: fs8, sep: [] });
59685
+ Object.assign(it, { key: fs9, sep: [] });
59793
59686
  return;
59794
59687
  }
59795
59688
  case "flow-map-end":
@@ -60179,19 +60072,19 @@ __export(studioUtils_exports, {
60179
60072
  preparePgSchema: () => preparePgSchema,
60180
60073
  prepareSQLiteSchema: () => prepareSQLiteSchema
60181
60074
  });
60182
- var import_drizzle_orm15, import_mysql_core4, import_pg_core4, import_sqlite_core5, preparePgSchema, prepareMySqlSchema, prepareSQLiteSchema, prepareModels, drizzleForPostgres, drizzleForMySQL, drizzleForSQLite, drizzleDb;
60075
+ var import_drizzle_orm15, import_mysql_core4, import_pg_core5, import_sqlite_core6, preparePgSchema, prepareMySqlSchema, prepareSQLiteSchema, prepareModels, drizzleForPostgres, drizzleForMySQL, drizzleForSQLite, drizzleDb;
60183
60076
  var init_studioUtils = __esm({
60184
60077
  "src/serializer/studioUtils.ts"() {
60185
60078
  import_drizzle_orm15 = require("drizzle-orm");
60186
60079
  import_mysql_core4 = require("drizzle-orm/mysql-core");
60187
- import_pg_core4 = require("drizzle-orm/pg-core");
60188
- import_sqlite_core5 = require("drizzle-orm/sqlite-core");
60080
+ import_pg_core5 = require("drizzle-orm/pg-core");
60081
+ import_sqlite_core6 = require("drizzle-orm/sqlite-core");
60189
60082
  init_utils();
60190
60083
  init_utils3();
60191
60084
  init_global();
60192
60085
  init_serializer();
60193
- preparePgSchema = async (path4) => {
60194
- const imports = prepareFilenames(path4);
60086
+ preparePgSchema = async (path5) => {
60087
+ const imports = prepareFilenames(path5);
60195
60088
  const pgSchema4 = {};
60196
60089
  const relations4 = {};
60197
60090
  const { unregister } = await safeRegister();
@@ -60200,8 +60093,8 @@ var init_studioUtils = __esm({
60200
60093
  const i0 = require(`${it}`);
60201
60094
  const i0values = Object.entries(i0);
60202
60095
  i0values.forEach(([k, t]) => {
60203
- if ((0, import_drizzle_orm15.is)(t, import_pg_core4.PgTable)) {
60204
- const schema4 = (0, import_pg_core4.getTableConfig)(t).schema || "public";
60096
+ if ((0, import_drizzle_orm15.is)(t, import_pg_core5.PgTable)) {
60097
+ const schema4 = (0, import_pg_core5.getTableConfig)(t).schema || "public";
60205
60098
  pgSchema4[schema4] = pgSchema4[schema4] || {};
60206
60099
  pgSchema4[schema4][k] = t;
60207
60100
  }
@@ -60213,8 +60106,8 @@ var init_studioUtils = __esm({
60213
60106
  unregister();
60214
60107
  return { schema: pgSchema4, relations: relations4 };
60215
60108
  };
60216
- prepareMySqlSchema = async (path4) => {
60217
- const imports = prepareFilenames(path4);
60109
+ prepareMySqlSchema = async (path5) => {
60110
+ const imports = prepareFilenames(path5);
60218
60111
  const mysqlSchema4 = {
60219
60112
  public: {}
60220
60113
  };
@@ -60237,8 +60130,8 @@ var init_studioUtils = __esm({
60237
60130
  unregister();
60238
60131
  return { schema: mysqlSchema4, relations: relations4 };
60239
60132
  };
60240
- prepareSQLiteSchema = async (path4) => {
60241
- const imports = prepareFilenames(path4);
60133
+ prepareSQLiteSchema = async (path5) => {
60134
+ const imports = prepareFilenames(path5);
60242
60135
  const sqliteSchema2 = {
60243
60136
  public: {}
60244
60137
  };
@@ -60249,7 +60142,7 @@ var init_studioUtils = __esm({
60249
60142
  const i0 = require(`${it}`);
60250
60143
  const i0values = Object.entries(i0);
60251
60144
  i0values.forEach(([k, t]) => {
60252
- if ((0, import_drizzle_orm15.is)(t, import_sqlite_core5.SQLiteTable)) {
60145
+ if ((0, import_drizzle_orm15.is)(t, import_sqlite_core6.SQLiteTable)) {
60253
60146
  const schema4 = "public";
60254
60147
  sqliteSchema2[schema4][k] = t;
60255
60148
  }
@@ -60261,8 +60154,8 @@ var init_studioUtils = __esm({
60261
60154
  unregister();
60262
60155
  return { schema: sqliteSchema2, relations: relations4 };
60263
60156
  };
60264
- prepareModels = async (path4) => {
60265
- const imports = prepareFilenames(path4);
60157
+ prepareModels = async (path5) => {
60158
+ const imports = prepareFilenames(path5);
60266
60159
  const sqliteSchema2 = {};
60267
60160
  const pgSchema4 = {};
60268
60161
  const mysqlSchema4 = {};
@@ -60272,13 +60165,13 @@ var init_studioUtils = __esm({
60272
60165
  const i0 = require(`${it}`);
60273
60166
  const i0values = Object.entries(i0);
60274
60167
  i0values.forEach(([k, t]) => {
60275
- if ((0, import_drizzle_orm15.is)(t, import_pg_core4.PgTable)) {
60168
+ if ((0, import_drizzle_orm15.is)(t, import_pg_core5.PgTable)) {
60276
60169
  pgSchema4[k] = t;
60277
60170
  }
60278
60171
  if ((0, import_drizzle_orm15.is)(t, import_mysql_core4.MySqlTable)) {
60279
60172
  mysqlSchema4[k] = t;
60280
60173
  }
60281
- if ((0, import_drizzle_orm15.is)(t, import_sqlite_core5.SQLiteTable)) {
60174
+ if ((0, import_drizzle_orm15.is)(t, import_sqlite_core6.SQLiteTable)) {
60282
60175
  sqliteSchema2[k] = t;
60283
60176
  }
60284
60177
  if ((0, import_drizzle_orm15.is)(t, import_drizzle_orm15.Relations)) {
@@ -60340,8 +60233,8 @@ var init_studioUtils = __esm({
60340
60233
  };
60341
60234
  };
60342
60235
  drizzleForSQLite = async (config, sqliteSchema2, relations4, ts, verbose) => {
60343
- const { driver, dbCredentials: creds } = config;
60344
- if (driver === "d1") {
60236
+ const { driver: driver2, dbCredentials: creds } = config;
60237
+ if (driver2 === "d1") {
60345
60238
  const { drizzle: drizzle2 } = await Promise.resolve().then(() => (init_driver(), driver_exports));
60346
60239
  const { execute: execute2 } = await Promise.resolve().then(() => (init_wrangler_client(), wrangler_client_exports));
60347
60240
  const db = drizzle2(execute2, creds.wranglerConfigPath, creds.dbName, {
@@ -60359,7 +60252,7 @@ var init_studioUtils = __esm({
60359
60252
  ts
60360
60253
  };
60361
60254
  }
60362
- if (driver === "better-sqlite") {
60255
+ if (driver2 === "better-sqlite") {
60363
60256
  assertPackages("better-sqlite3");
60364
60257
  const { drizzle: drizzle2 } = await import("drizzle-orm/better-sqlite3");
60365
60258
  const Database = await import("better-sqlite3");
@@ -60378,7 +60271,7 @@ var init_studioUtils = __esm({
60378
60271
  ts
60379
60272
  };
60380
60273
  }
60381
- if (driver === "libsql" || driver === "turso") {
60274
+ if (driver2 === "libsql" || driver2 === "turso") {
60382
60275
  assertPackages("@libsql/client");
60383
60276
  const { drizzle: drizzle2 } = await import("drizzle-orm/libsql");
60384
60277
  const { createClient } = await import("@libsql/client");
@@ -60402,7 +60295,7 @@ var init_studioUtils = __esm({
60402
60295
  ts
60403
60296
  };
60404
60297
  }
60405
- assertUnreachable(driver);
60298
+ assertUnreachable(driver2);
60406
60299
  };
60407
60300
  drizzleDb = async (drizzleConfig, models, logger) => {
60408
60301
  if (drizzleConfig.driver === "pg") {
@@ -60486,8 +60379,7 @@ var init_utils5 = __esm({
60486
60379
  init_pgIntrospect();
60487
60380
  init_pgPushUtils();
60488
60381
  init_sqliteIntrospect();
60489
- init_sqliteSerializer();
60490
- init_pgSerializer();
60382
+ init_schemaToDrizzle();
60491
60383
  init_studioUtils();
60492
60384
  init_pgConnect();
60493
60385
  assertV1OutFolder = (out, dialect6) => {
@@ -61116,8 +61008,8 @@ var init_mysql = __esm({
61116
61008
  mysqlConnectionConfig
61117
61009
  );
61118
61010
  printCliConnectionIssues3 = (options) => {
61119
- const { driver, uri, host, database } = options || {};
61120
- if (driver !== "mysql2") {
61011
+ const { driver: driver2, uri, host, database } = options || {};
61012
+ if (driver2 !== "mysql2") {
61121
61013
  console.log(outputs.mysql.connection.driver());
61122
61014
  }
61123
61015
  if (!uri && (!host || !database)) {
@@ -61156,7 +61048,7 @@ var init_mysql = __esm({
61156
61048
  const {
61157
61049
  out,
61158
61050
  schema: schema4,
61159
- driver,
61051
+ driver: driver2,
61160
61052
  schemaFilter,
61161
61053
  tablesFilter,
61162
61054
  breakpoints,
@@ -61166,7 +61058,7 @@ var init_mysql = __esm({
61166
61058
  return {
61167
61059
  out,
61168
61060
  schema: schema4,
61169
- driver,
61061
+ driver: driver2,
61170
61062
  schemaFilter,
61171
61063
  tablesFilter,
61172
61064
  breakpoints,
@@ -61202,13 +61094,13 @@ var init_mysql = __esm({
61202
61094
  strict,
61203
61095
  verbose,
61204
61096
  schema: schema4,
61205
- driver,
61097
+ driver: driver2,
61206
61098
  schemaFilter,
61207
61099
  tablesFilter,
61208
61100
  ...rest
61209
61101
  } = cliRes.data;
61210
61102
  return {
61211
- driver,
61103
+ driver: driver2,
61212
61104
  schema: schema4,
61213
61105
  strict,
61214
61106
  verbose,
@@ -61289,9 +61181,9 @@ var require_package = __commonJS({
61289
61181
  // node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/lib/main.js
61290
61182
  var require_main = __commonJS({
61291
61183
  "node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/lib/main.js"(exports, module2) {
61292
- var fs8 = require("fs");
61293
- var path4 = require("path");
61294
- var os2 = require("os");
61184
+ var fs9 = require("fs");
61185
+ var path5 = require("path");
61186
+ var os3 = require("os");
61295
61187
  var packageJson = require_package();
61296
61188
  var version = packageJson.version;
61297
61189
  var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
@@ -61318,10 +61210,10 @@ var require_main = __commonJS({
61318
61210
  console.log(`[dotenv@${version}][DEBUG] ${message}`);
61319
61211
  }
61320
61212
  function _resolveHome(envPath) {
61321
- return envPath[0] === "~" ? path4.join(os2.homedir(), envPath.slice(1)) : envPath;
61213
+ return envPath[0] === "~" ? path5.join(os3.homedir(), envPath.slice(1)) : envPath;
61322
61214
  }
61323
61215
  function config(options) {
61324
- let dotenvPath = path4.resolve(process.cwd(), ".env");
61216
+ let dotenvPath = path5.resolve(process.cwd(), ".env");
61325
61217
  let encoding = "utf8";
61326
61218
  const debug = Boolean(options && options.debug);
61327
61219
  const override = Boolean(options && options.override);
@@ -61334,7 +61226,7 @@ var require_main = __commonJS({
61334
61226
  }
61335
61227
  }
61336
61228
  try {
61337
- const parsed = DotenvModule.parse(fs8.readFileSync(dotenvPath, { encoding }));
61229
+ const parsed = DotenvModule.parse(fs9.readFileSync(dotenvPath, { encoding }));
61338
61230
  Object.keys(parsed).forEach(function(key) {
61339
61231
  if (!Object.prototype.hasOwnProperty.call(process.env, key)) {
61340
61232
  process.env[key] = parsed[key];
@@ -62128,7 +62020,7 @@ __export(cli_exports, {
62128
62020
  });
62129
62021
  module.exports = __toCommonJS(cli_exports);
62130
62022
  var import_commander = require("commander");
62131
- var import_fs11 = require("fs");
62023
+ var import_fs13 = require("fs");
62132
62024
  init_lib();
62133
62025
 
62134
62026
  // src/cli/commands/check.ts
@@ -62170,14 +62062,14 @@ var checkHandler = (out, dialect6) => {
62170
62062
 
62171
62063
  // src/cli/index.ts
62172
62064
  var import_hanji11 = __toESM(require_hanji());
62173
- var import_path7 = __toESM(require("path"));
62065
+ var import_path8 = __toESM(require("path"));
62174
62066
  init_utils3();
62175
62067
  init_source();
62176
62068
 
62177
62069
  // package.json
62178
62070
  var package_default = {
62179
62071
  name: "drizzle-kit",
62180
- version: "0.20.7",
62072
+ version: "0.20.8",
62181
62073
  repository: "https://github.com/drizzle-team/drizzle-kit-mirror",
62182
62074
  author: "Drizzle Team",
62183
62075
  license: "MIT",
@@ -62233,11 +62125,12 @@ var package_default = {
62233
62125
  ]
62234
62126
  },
62235
62127
  dependencies: {
62236
- "@drizzle-team/studio": "^0.0.35",
62128
+ "@drizzle-team/studio": "^0.0.37",
62237
62129
  "@esbuild-kit/esm-loader": "^2.5.5",
62238
62130
  camelcase: "^7.0.1",
62239
62131
  chalk: "^5.2.0",
62240
62132
  commander: "^9.4.1",
62133
+ "env-paths": "^3.0.0",
62241
62134
  esbuild: "^0.19.7",
62242
62135
  "esbuild-register": "^3.5.0",
62243
62136
  glob: "^8.1.0",
@@ -62328,10 +62221,10 @@ var upSqliteHandlerV4 = (out) => {
62328
62221
  path: it,
62329
62222
  raw: report.rawMap[it]
62330
62223
  })).forEach((it) => {
62331
- const path4 = it.path;
62224
+ const path5 = it.path;
62332
62225
  const result = updateToLatestV42(it.raw);
62333
- console.log(`[${source_default.green("\u2713")}] ${path4}`);
62334
- import_fs9.default.writeFileSync(path4, JSON.stringify(result, null, 2));
62226
+ console.log(`[${source_default.green("\u2713")}] ${path5}`);
62227
+ import_fs9.default.writeFileSync(path5, JSON.stringify(result, null, 2));
62335
62228
  });
62336
62229
  console.log("Everything's fine \u{1F436}\u{1F525}");
62337
62230
  };
@@ -62369,13 +62262,18 @@ var import_fs10 = require("fs");
62369
62262
  var import_hanji8 = __toESM(require_hanji());
62370
62263
  var import_path6 = require("path");
62371
62264
  init_views();
62372
- var dropMigration = async (out) => {
62265
+ init_migrate();
62266
+ var import_fs11 = __toESM(require("fs"));
62267
+ var dropMigration = async ({
62268
+ out,
62269
+ bundle
62270
+ }) => {
62373
62271
  const metaFilePath = (0, import_path6.join)(out, "meta", "_journal.json");
62374
- const journal = JSON.parse(
62375
- (0, import_fs10.readFileSync)(metaFilePath, "utf-8")
62376
- );
62272
+ const journal = JSON.parse((0, import_fs10.readFileSync)(metaFilePath, "utf-8"));
62377
62273
  if (journal.entries.length === 0) {
62378
- console.log(`[${source_default.blue("i")}] no migration entries found in ${metaFilePath}`);
62274
+ console.log(
62275
+ `[${source_default.blue("i")}] no migration entries found in ${metaFilePath}`
62276
+ );
62379
62277
  return;
62380
62278
  }
62381
62279
  const result = await (0, import_hanji8.render)(new DropMigrationView(journal.entries));
@@ -62387,11 +62285,25 @@ var dropMigration = async (out) => {
62387
62285
  entries: journal.entries.filter(Boolean)
62388
62286
  };
62389
62287
  const sqlFilePath = (0, import_path6.join)(out, `${result.data.tag}.sql`);
62390
- const snapshotFilePath = (0, import_path6.join)(out, "meta", `${result.data.idx.toFixed(0).padStart(4, "0")}_snapshot.json`);
62288
+ const snapshotFilePath = (0, import_path6.join)(
62289
+ out,
62290
+ "meta",
62291
+ `${result.data.idx.toFixed(0).padStart(4, "0")}_snapshot.json`
62292
+ );
62391
62293
  (0, import_fs10.rmSync)(sqlFilePath);
62392
62294
  (0, import_fs10.rmSync)(snapshotFilePath);
62393
62295
  (0, import_fs10.writeFileSync)(metaFilePath, JSON.stringify(resultJournal));
62394
- console.log(`[${source_default.green("\u2713")}] ${source_default.bold(result.data.tag)} migration successfully dropped`);
62296
+ if (bundle) {
62297
+ import_fs11.default.writeFileSync(
62298
+ (0, import_path6.join)(out, `migrations.js`),
62299
+ embeddedMigrations(resultJournal)
62300
+ );
62301
+ }
62302
+ console.log(
62303
+ `[${source_default.green("\u2713")}] ${source_default.bold(
62304
+ result.data.tag
62305
+ )} migration successfully dropped`
62306
+ );
62395
62307
  };
62396
62308
 
62397
62309
  // src/cli/index.ts
@@ -62949,6 +62861,97 @@ init_sqlgenerator();
62949
62861
  init_selector_ui();
62950
62862
  var import_studio = require("@drizzle-team/studio");
62951
62863
  init_global();
62864
+
62865
+ // src/utils/certs.ts
62866
+ init_build();
62867
+ var import_path7 = require("path");
62868
+
62869
+ // node_modules/.pnpm/env-paths@3.0.0/node_modules/env-paths/index.js
62870
+ var import_node_path3 = __toESM(require("node:path"), 1);
62871
+ var import_node_os2 = __toESM(require("node:os"), 1);
62872
+ var import_node_process3 = __toESM(require("node:process"), 1);
62873
+ var homedir = import_node_os2.default.homedir();
62874
+ var tmpdir = import_node_os2.default.tmpdir();
62875
+ var { env: env2 } = import_node_process3.default;
62876
+ var macos = (name) => {
62877
+ const library = import_node_path3.default.join(homedir, "Library");
62878
+ return {
62879
+ data: import_node_path3.default.join(library, "Application Support", name),
62880
+ config: import_node_path3.default.join(library, "Preferences", name),
62881
+ cache: import_node_path3.default.join(library, "Caches", name),
62882
+ log: import_node_path3.default.join(library, "Logs", name),
62883
+ temp: import_node_path3.default.join(tmpdir, name)
62884
+ };
62885
+ };
62886
+ var windows = (name) => {
62887
+ const appData = env2.APPDATA || import_node_path3.default.join(homedir, "AppData", "Roaming");
62888
+ const localAppData = env2.LOCALAPPDATA || import_node_path3.default.join(homedir, "AppData", "Local");
62889
+ return {
62890
+ // Data/config/cache/log are invented by me as Windows isn't opinionated about this
62891
+ data: import_node_path3.default.join(localAppData, name, "Data"),
62892
+ config: import_node_path3.default.join(appData, name, "Config"),
62893
+ cache: import_node_path3.default.join(localAppData, name, "Cache"),
62894
+ log: import_node_path3.default.join(localAppData, name, "Log"),
62895
+ temp: import_node_path3.default.join(tmpdir, name)
62896
+ };
62897
+ };
62898
+ var linux = (name) => {
62899
+ const username = import_node_path3.default.basename(homedir);
62900
+ return {
62901
+ data: import_node_path3.default.join(env2.XDG_DATA_HOME || import_node_path3.default.join(homedir, ".local", "share"), name),
62902
+ config: import_node_path3.default.join(env2.XDG_CONFIG_HOME || import_node_path3.default.join(homedir, ".config"), name),
62903
+ cache: import_node_path3.default.join(env2.XDG_CACHE_HOME || import_node_path3.default.join(homedir, ".cache"), name),
62904
+ // https://wiki.debian.org/XDGBaseDirectorySpecification#state
62905
+ log: import_node_path3.default.join(env2.XDG_STATE_HOME || import_node_path3.default.join(homedir, ".local", "state"), name),
62906
+ temp: import_node_path3.default.join(tmpdir, username, name)
62907
+ };
62908
+ };
62909
+ function envPaths(name, { suffix = "nodejs" } = {}) {
62910
+ if (typeof name !== "string") {
62911
+ throw new TypeError(`Expected a string, got ${typeof name}`);
62912
+ }
62913
+ if (suffix) {
62914
+ name += `-${suffix}`;
62915
+ }
62916
+ if (import_node_process3.default.platform === "darwin") {
62917
+ return macos(name);
62918
+ }
62919
+ if (import_node_process3.default.platform === "win32") {
62920
+ return windows(name);
62921
+ }
62922
+ return linux(name);
62923
+ }
62924
+
62925
+ // src/utils/certs.ts
62926
+ var import_promises = require("fs/promises");
62927
+ var import_fs12 = require("fs");
62928
+ var p = envPaths("drizzle-studio", {
62929
+ suffix: ""
62930
+ });
62931
+ $.verbose = false;
62932
+ $.cwd = p.data;
62933
+ (0, import_fs12.mkdirSync)(p.data, { recursive: true });
62934
+ var certs = async () => {
62935
+ const res = await $`mkcert --help`.nothrow();
62936
+ const keyPath = (0, import_path7.join)(p.data, "localhost-key.pem");
62937
+ const certPath = (0, import_path7.join)(p.data, "localhost.pem");
62938
+ if (res.exitCode === 0) {
62939
+ try {
62940
+ await Promise.all([(0, import_promises.access)(keyPath), (0, import_promises.access)(certPath)]);
62941
+ } catch (e) {
62942
+ await $`mkcert localhost`.nothrow();
62943
+ }
62944
+ const [key, cert] = await Promise.all([
62945
+ (0, import_promises.readFile)(keyPath, { encoding: "utf-8" }),
62946
+ (0, import_promises.readFile)(certPath, { encoding: "utf-8" })
62947
+ ]);
62948
+ return key && cert ? { key, cert } : null;
62949
+ }
62950
+ return null;
62951
+ };
62952
+ certs();
62953
+
62954
+ // src/cli/index.ts
62952
62955
  var printVersions = async () => {
62953
62956
  const v = await versions();
62954
62957
  console.log(`${source_default.gray(v)}
@@ -63013,7 +63016,7 @@ var generateMysqlCommand = new import_commander.Command("generate:mysql").option
63013
63016
  var dbPushMysqlCommand = new import_commander.Command("push:mysql").option(
63014
63017
  "--config <config>",
63015
63018
  "Path to a config.json file, drizzle.config.ts by default"
63016
- ).option("--schema <schema...>", "Path to a schema file or folder").option("--tablesFilter", `Table name filters`).option("--connectionString <connectionString>", "MySQL connection string").option("--driver <driver>", "MySQL database path").option("--connectionString <connectionString>", "MySQL connection string").option("--host <host>", "MySQL host").option("--port <port>", "MySQL port").option("--user <user>", "MySQL user").option("--password <password>", "MySQL password").option("--database <database>", "MySQL database name").option("--verbose", "Print all statements for each push").option("--strict", "Always ask for confirmation").action(async (options) => {
63019
+ ).option("--schema <schema...>", "Path to a schema file or folder").option("--tablesFilter", `Table name filters`).option("--connectionString <connectionString>", "MySQL connection string").option("--driver <driver>", "Driver used for querying the database").option("--connectionString <connectionString>", "MySQL connection string").option("--host <host>", "MySQL host").option("--port <port>", "MySQL port").option("--user <user>", "MySQL user").option("--password <password>", "MySQL password").option("--database <database>", "MySQL database name").option("--verbose", "Print all statements for each push").option("--strict", "Always ask for confirmation").action(async (options) => {
63017
63020
  await printVersions();
63018
63021
  await assertPackages("drizzle-orm");
63019
63022
  await assertOrmCoreVersion();
@@ -63130,7 +63133,7 @@ var dbPushPgCommand = new import_commander.Command("push:pg").option(
63130
63133
  ).option("--schema <schema...>", "Path to a schema file or folder").option("--tablesFilter", `Table name filters`).option("--schemaFilters", `Schema name filters`).option(
63131
63134
  "--connectionString <connectionString>",
63132
63135
  "PostgreSQL connection string"
63133
- ).option("--driver <driver>", "PostgreSQL database path").option(
63136
+ ).option("--driver <driver>", "Driver used for querying the database").option(
63134
63137
  "--connectionString <connectionString>",
63135
63138
  "PostgreSQL connection string"
63136
63139
  ).option("--host <host>", "PostgreSQL host").option("--port <port>", "PostgreSQL port").option("--user <user>", "PostgreSQL user").option("--password <password>", "PostgreSQL password").option("--ssl <ssl>", "Postgres ssl").option("--database <database>", "PostgreSQL database name").option("--verbose", "Print all statements for each push").option("--strict", "Always ask for confirmation").action(async (options) => {
@@ -63240,7 +63243,7 @@ var dbPushPgCommand = new import_commander.Command("push:pg").option(
63240
63243
  var dbPushSqliteCommand = new import_commander.Command("push:sqlite").option(
63241
63244
  "--config <config>",
63242
63245
  "Path to a config.ts file, drizzle.config.ts by default"
63243
- ).option("--schema <schema>", "Path to a schema file or folder").option("--tablesFilter", `Table name filters`).option("--connectionString <connectionString>", "SQLite connection string").option("--driver <driver>", "SQLite database path").option("--url <url>", "SQLite database path").option("--auth-token <authToken>", "SQLite database path").option("--verbose", "Print all statements for each push").option("--strict", "Always ask for confirmation").action(async (options) => {
63246
+ ).option("--schema <schema>", "Path to a schema file or folder").option("--tablesFilter", `Table name filters`).option("--connectionString <connectionString>", "SQLite connection string").option("--driver <driver>", "Driver used for querying the database").option("--url <url>", "SQLite database path").option("--auth-token <authToken>", "SQLite database path").option("--verbose", "Print all statements for each push").option("--strict", "Always ask for confirmation").action(async (options) => {
63244
63247
  printVersions();
63245
63248
  assertPackages("drizzle-orm");
63246
63249
  assertOrmCoreVersion();
@@ -63355,7 +63358,8 @@ var generateSqliteCommand = new import_commander.Command("generate:sqlite").opti
63355
63358
  });
63356
63359
  var checkSchema = objectType({
63357
63360
  out: stringType().optional(),
63358
- config: stringType().optional()
63361
+ config: stringType().optional(),
63362
+ driver: stringType().optional()
63359
63363
  }).strict();
63360
63364
  var checkPgCommand = new import_commander.Command("check:pg").option("--out <out>", `Output folder`).option("--config <config>", `Config path [default=drizzle.config.ts]`).action(async (options) => {
63361
63365
  await printVersions();
@@ -63461,7 +63465,7 @@ var upSqliteCommand = new import_commander.Command("up:sqlite").option("--out <o
63461
63465
  var introspectPgCommand = new import_commander.Command("introspect:pg").option("--out <out>", `Migrations folder`).option("--breakpoints", `Prepare SQL statements with breakpoints`).option(
63462
63466
  "--introspect-casing <introspectCasing>",
63463
63467
  "Column object keys naming strategy"
63464
- ).option("--tablesFilter", `Table name filters`).option("--driver <driver>", "Postgres connection string").option("--connectionString <connectionString>", "Postgres connection string").option("--host <host>", "Postgres host").option("--port <port>", "Postgres port").option("--user <user>", "Postgres user").option("--password <password>", "Postgres password").option("--database <database>", "Postgres database name").option("--ssl <ssl>", "Postgres ssl").option("--config <config>", `Config path [default=drizzle.config.ts]`).action(async (options) => {
63468
+ ).option("--tablesFilter", `Table name filters`).option("--driver <driver>", "Driver used for querying the database").option("--connectionString <connectionString>", "Postgres connection string").option("--host <host>", "Postgres host").option("--port <port>", "Postgres port").option("--user <user>", "Postgres user").option("--password <password>", "Postgres password").option("--database <database>", "Postgres database name").option("--ssl <ssl>", "Postgres ssl").option("--config <config>", `Config path [default=drizzle.config.ts]`).action(async (options) => {
63465
63469
  await printVersions();
63466
63470
  await assertPackages("drizzle-orm");
63467
63471
  await assertOrmCoreVersion();
@@ -63479,8 +63483,8 @@ var introspectPgCommand = new import_commander.Command("introspect:pg").option("
63479
63483
  tablesFilter,
63480
63484
  schemasFilter
63481
63485
  );
63482
- const schemaFile = import_path7.default.join(validatedConfig.out, "schema.ts");
63483
- (0, import_fs11.writeFileSync)(schemaFile, ts.file);
63486
+ const schemaFile = import_path8.default.join(validatedConfig.out, "schema.ts");
63487
+ (0, import_fs13.writeFileSync)(schemaFile, ts.file);
63484
63488
  console.log();
63485
63489
  if (snapshots.length === 0) {
63486
63490
  const { sqlStatements, _meta } = await prepareSQL(
@@ -63532,8 +63536,8 @@ var introspectMySqlCommand = new import_commander.Command("introspect:mysql").op
63532
63536
  const filterConfig = res.tablesFilter;
63533
63537
  const tablesFilter = filterConfig ? typeof filterConfig === "string" ? [filterConfig] : filterConfig : [];
63534
63538
  const { schema: schema4, ts } = await mysqlIntrospect2(res, tablesFilter);
63535
- const schemaFile = import_path7.default.join(out, "schema.ts");
63536
- (0, import_fs11.writeFileSync)(schemaFile, ts.file);
63539
+ const schemaFile = import_path8.default.join(out, "schema.ts");
63540
+ (0, import_fs13.writeFileSync)(schemaFile, ts.file);
63537
63541
  console.log();
63538
63542
  if (snapshots.length === 0) {
63539
63543
  const { sqlStatements, _meta } = await prepareSQL(
@@ -63574,7 +63578,7 @@ var introspectSQLiteCommand = new import_commander.Command("introspect:sqlite").
63574
63578
  ).option(
63575
63579
  "--introspect-casing <introspectCasing>",
63576
63580
  "Column object keys naming strategy"
63577
- ).option("--tablesFilter", `Table name filters`).option("--schema <schema>", `Migrations folder`).option("--out <out>", `Migrations folder`).option("--breakpoints", `Prepare SQL statements with breakpoints`).option("--driver <driver>", "SQLite database path").option("--url <url>", "SQLite database url").option("--auth-token <authToken>", "SQLite database path").action(async (options) => {
63581
+ ).option("--tablesFilter", `Table name filters`).option("--schema <schema>", `Migrations folder`).option("--out <out>", `Migrations folder`).option("--breakpoints", `Prepare SQL statements with breakpoints`).option("--driver <driver>", "Driver used for querying the database").option("--url <url>", "SQLite database url").option("--auth-token <authToken>", "SQLite database path").action(async (options) => {
63578
63582
  printVersions();
63579
63583
  assertPackages("drizzle-orm");
63580
63584
  assertOrmCoreVersion();
@@ -63585,8 +63589,8 @@ var introspectSQLiteCommand = new import_commander.Command("introspect:sqlite").
63585
63589
  const filterConfig = res.tablesFilter;
63586
63590
  const tablesFilter = filterConfig ? typeof filterConfig === "string" ? [filterConfig] : filterConfig : [];
63587
63591
  const { schema: schema4, ts } = await sqliteIntrospect2(res, tablesFilter);
63588
- const schemaFile = import_path7.default.join(out, "schema.ts");
63589
- (0, import_fs11.writeFileSync)(schemaFile, ts.file);
63592
+ const schemaFile = import_path8.default.join(out, "schema.ts");
63593
+ (0, import_fs13.writeFileSync)(schemaFile, ts.file);
63590
63594
  console.log();
63591
63595
  if (snapshots.length === 0) {
63592
63596
  const { sqlStatements, _meta } = await prepareSQL(
@@ -63621,7 +63625,7 @@ var introspectSQLiteCommand = new import_commander.Command("introspect:sqlite").
63621
63625
  );
63622
63626
  process.exit(0);
63623
63627
  });
63624
- var dropCommand = new import_commander.Command("drop").option("--out <out>", `Output folder`).option("--config <config>", `Config path [default=drizzle.config.ts]`).action(async (options) => {
63628
+ var dropCommand = new import_commander.Command("drop").option("--out <out>", `Output folder`).option("--driver <driver>", `Driver used for querying the database`).option("--config <config>", `Config path [default=drizzle.config.ts]`).action(async (options) => {
63625
63629
  await printVersions();
63626
63630
  await assertOrmCoreVersion();
63627
63631
  const collisionRes = checkCollisions(
@@ -63634,8 +63638,15 @@ var dropCommand = new import_commander.Command("drop").option("--out <out>", `Ou
63634
63638
  }
63635
63639
  const params = checkSchema.parse(options);
63636
63640
  const out = await assertOutFolder(params);
63641
+ let bundle = false;
63642
+ if (typeof options.driver !== "undefined") {
63643
+ bundle = options.driver === "expo";
63644
+ } else {
63645
+ const drizzleConfig = await drizzleConfigFromFile(options.config);
63646
+ bundle = drizzleConfig.driver === "expo";
63647
+ }
63637
63648
  assertV1OutFolder(out, "{dialect}");
63638
- await dropMigration(out);
63649
+ await dropMigration({ out, bundle });
63639
63650
  });
63640
63651
  var studioCommand = new import_commander.Command("studio").option("--port <port>", "Custom port for drizzle studio [default=4983]").option("--host <host>", "Custom host for drizzle studio [default=0.0.0.0]").option("--verbose", "Print all stataments that are executed by Studio").option("--config <config>", `Config path [default=drizzle.config.ts]`).action(async (options) => {
63641
63652
  await printVersions();
@@ -63651,9 +63662,9 @@ var studioCommand = new import_commander.Command("studio").option("--port <port>
63651
63662
  prepareSQLiteSchema: prepareSQLiteSchema2,
63652
63663
  drizzleForSQLite: drizzleForSQLite2
63653
63664
  } = await Promise.resolve().then(() => (init_studioUtils(), studioUtils_exports));
63654
- const { driver, schema: schemaPath } = drizzleConfig;
63665
+ const { driver: driver2, schema: schemaPath } = drizzleConfig;
63655
63666
  let setup;
63656
- if (driver === "pg") {
63667
+ if (driver2 === "pg") {
63657
63668
  const { schemaToTypeScript: schemaToTypeScript4, relationsToTypeScript: relationsToTypeScript2 } = await Promise.resolve().then(() => (init_introspect_pg(), introspect_pg_exports));
63658
63669
  const { serializePg: serializePg2 } = await Promise.resolve().then(() => (init_serializer(), serializer_exports));
63659
63670
  const { schema: schema4, relations: relations4 } = await preparePgSchema2(schemaPath);
@@ -63671,7 +63682,7 @@ var studioCommand = new import_commander.Command("studio").option("--port <port>
63671
63682
  },
63672
63683
  Boolean(options.verbose)
63673
63684
  );
63674
- } else if (driver === "mysql2") {
63685
+ } else if (driver2 === "mysql2") {
63675
63686
  const { schemaToTypeScript: schemaToTypeScript4 } = await Promise.resolve().then(() => (init_introspect_mysql(), introspect_mysql_exports));
63676
63687
  const { schema: schema4, relations: relations4 } = await prepareMySqlSchema2(schemaPath);
63677
63688
  const { serializeMySql: serializeMySql2 } = await Promise.resolve().then(() => (init_serializer(), serializer_exports));
@@ -63688,7 +63699,7 @@ var studioCommand = new import_commander.Command("studio").option("--port <port>
63688
63699
  },
63689
63700
  Boolean(options.verbose)
63690
63701
  );
63691
- } else if (driver === "better-sqlite" || driver === "d1" || driver === "libsql" || driver === "turso") {
63702
+ } else if (driver2 === "better-sqlite" || driver2 === "d1" || driver2 === "libsql" || driver2 === "turso") {
63692
63703
  const { schemaToTypeScript: schemaToTypeScript4 } = await Promise.resolve().then(() => (init_introspect_sqlite(), introspect_sqlite_exports));
63693
63704
  const { schema: schema4, relations: relations4 } = await prepareSQLiteSchema2(schemaPath);
63694
63705
  const { serializeSQLite: serializeSQLite2 } = await Promise.resolve().then(() => (init_serializer(), serializer_exports));
@@ -63706,7 +63717,7 @@ var studioCommand = new import_commander.Command("studio").option("--port <port>
63706
63717
  Boolean(options.verbose)
63707
63718
  );
63708
63719
  } else {
63709
- assertUnreachable(driver);
63720
+ assertUnreachable(driver2);
63710
63721
  }
63711
63722
  const qeueryEngine = (0, import_studio.queryEngineForSetup)(setup);
63712
63723
  const server = await (0, import_server.prepareServer)((_2) => {
@@ -63720,16 +63731,19 @@ var studioCommand = new import_commander.Command("studio").option("--port <port>
63720
63731
  "Drizzle Studio is currently in Beta. If you find anything that is not working as expected or should be improved, feel free to create an issue on GitHub: https://github.com/drizzle-team/drizzle-kit-mirror/issues/new or write to us on Discord: https://discord.gg/WcRKz2FFxN"
63721
63732
  )
63722
63733
  );
63723
- if (driver === "d1") {
63734
+ if (driver2 === "d1") {
63724
63735
  console.log(
63725
63736
  withStyle.fullWarning(
63726
63737
  "It seems like you are trying to access your D1 Database. Please make sure to run 'wrangler login' before using Drizzle Studio to ensure it has your token for making requests to the D1 Database. If you encounter an error related to CLOUDFLARE_TOKEN, please run 'wrangler login' and restart the studio"
63727
63738
  )
63728
63739
  );
63729
63740
  }
63741
+ const { key, cert } = await certs() || {};
63730
63742
  server.start({
63731
63743
  host,
63732
63744
  port,
63745
+ key,
63746
+ cert,
63733
63747
  cb: (err2, address) => {
63734
63748
  if (err2) {
63735
63749
  console.error(err2);
@@ -63741,7 +63755,7 @@ var studioCommand = new import_commander.Command("studio").option("--port <port>
63741
63755
  if (host !== "127.0.0.1") {
63742
63756
  queryParams.host = host;
63743
63757
  }
63744
- const queryString = Object.keys(queryParams).map((key) => `${key}=${queryParams[key]}`).join("&");
63758
+ const queryString = Object.keys(queryParams).map((key2) => `${key2}=${queryParams[key2]}`).join("&");
63745
63759
  console.log(
63746
63760
  `
63747
63761
  Drizzle Studio is up and running on ${source_default.blue(