drizzle-kit 0.25.0-178591 → 0.25.0-1800fdd

Sign up to get free protection for your applications and to get access to all the features.
Files changed (8) hide show
  1. package/api.d.mts +0 -82
  2. package/api.d.ts +0 -82
  3. package/api.js +604 -1024
  4. package/api.mjs +603 -1023
  5. package/bin.cjs +139 -793
  6. package/package.json +1 -1
  7. package/utils.js +6 -24
  8. package/utils.mjs +6 -24
package/api.js CHANGED
@@ -1056,8 +1056,8 @@ var require_minimatch = __commonJS({
1056
1056
  return new Minimatch2(pattern, options).match(p7);
1057
1057
  };
1058
1058
  module2.exports = minimatch2;
1059
- var path3 = require_path();
1060
- minimatch2.sep = path3.sep;
1059
+ var path2 = require_path();
1060
+ minimatch2.sep = path2.sep;
1061
1061
  var GLOBSTAR2 = Symbol("globstar **");
1062
1062
  minimatch2.GLOBSTAR = GLOBSTAR2;
1063
1063
  var expand2 = require_brace_expansion();
@@ -1562,8 +1562,8 @@ var require_minimatch = __commonJS({
1562
1562
  if (this.empty) return f5 === "";
1563
1563
  if (f5 === "/" && partial) return true;
1564
1564
  const options = this.options;
1565
- if (path3.sep !== "/") {
1566
- f5 = f5.split(path3.sep).join("/");
1565
+ if (path2.sep !== "/") {
1566
+ f5 = f5.split(path2.sep).join("/");
1567
1567
  }
1568
1568
  f5 = f5.split(slashSplit);
1569
1569
  this.debug(this.pattern, "split", f5);
@@ -1660,7 +1660,7 @@ var require_common = __commonJS({
1660
1660
  return Object.prototype.hasOwnProperty.call(obj, field);
1661
1661
  }
1662
1662
  var fs5 = require("fs");
1663
- var path3 = require("path");
1663
+ var path2 = require("path");
1664
1664
  var minimatch2 = require_minimatch();
1665
1665
  var isAbsolute = require("path").isAbsolute;
1666
1666
  var Minimatch2 = minimatch2.Minimatch;
@@ -1727,13 +1727,13 @@ var require_common = __commonJS({
1727
1727
  self2.changedCwd = false;
1728
1728
  var cwd = process.cwd();
1729
1729
  if (!ownProp(options, "cwd"))
1730
- self2.cwd = path3.resolve(cwd);
1730
+ self2.cwd = path2.resolve(cwd);
1731
1731
  else {
1732
- self2.cwd = path3.resolve(options.cwd);
1732
+ self2.cwd = path2.resolve(options.cwd);
1733
1733
  self2.changedCwd = self2.cwd !== cwd;
1734
1734
  }
1735
- self2.root = options.root || path3.resolve(self2.cwd, "/");
1736
- self2.root = path3.resolve(self2.root);
1735
+ self2.root = options.root || path2.resolve(self2.cwd, "/");
1736
+ self2.root = path2.resolve(self2.root);
1737
1737
  self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
1738
1738
  self2.nomount = !!options.nomount;
1739
1739
  if (process.platform === "win32") {
@@ -1815,30 +1815,30 @@ var require_common = __commonJS({
1815
1815
  function makeAbs(self2, f5) {
1816
1816
  var abs = f5;
1817
1817
  if (f5.charAt(0) === "/") {
1818
- abs = path3.join(self2.root, f5);
1818
+ abs = path2.join(self2.root, f5);
1819
1819
  } else if (isAbsolute(f5) || f5 === "") {
1820
1820
  abs = f5;
1821
1821
  } else if (self2.changedCwd) {
1822
- abs = path3.resolve(self2.cwd, f5);
1822
+ abs = path2.resolve(self2.cwd, f5);
1823
1823
  } else {
1824
- abs = path3.resolve(f5);
1824
+ abs = path2.resolve(f5);
1825
1825
  }
1826
1826
  if (process.platform === "win32")
1827
1827
  abs = abs.replace(/\\/g, "/");
1828
1828
  return abs;
1829
1829
  }
1830
- function isIgnored(self2, path4) {
1830
+ function isIgnored(self2, path3) {
1831
1831
  if (!self2.ignore.length)
1832
1832
  return false;
1833
1833
  return self2.ignore.some(function(item) {
1834
- return item.matcher.match(path4) || !!(item.gmatcher && item.gmatcher.match(path4));
1834
+ return item.matcher.match(path3) || !!(item.gmatcher && item.gmatcher.match(path3));
1835
1835
  });
1836
1836
  }
1837
- function childrenIgnored(self2, path4) {
1837
+ function childrenIgnored(self2, path3) {
1838
1838
  if (!self2.ignore.length)
1839
1839
  return false;
1840
1840
  return self2.ignore.some(function(item) {
1841
- return !!(item.gmatcher && item.gmatcher.match(path4));
1841
+ return !!(item.gmatcher && item.gmatcher.match(path3));
1842
1842
  });
1843
1843
  }
1844
1844
  }
@@ -1855,7 +1855,7 @@ var require_sync = __commonJS({
1855
1855
  var Minimatch2 = minimatch2.Minimatch;
1856
1856
  var Glob = require_glob().Glob;
1857
1857
  var util2 = require("util");
1858
- var path3 = require("path");
1858
+ var path2 = require("path");
1859
1859
  var assert = require("assert");
1860
1860
  var isAbsolute = require("path").isAbsolute;
1861
1861
  var common = require_common();
@@ -1983,7 +1983,7 @@ var require_sync = __commonJS({
1983
1983
  e5 = prefix2 + e5;
1984
1984
  }
1985
1985
  if (e5.charAt(0) === "/" && !this.nomount) {
1986
- e5 = path3.join(this.root, e5);
1986
+ e5 = path2.join(this.root, e5);
1987
1987
  }
1988
1988
  this._emitMatch(index4, e5);
1989
1989
  }
@@ -2132,9 +2132,9 @@ var require_sync = __commonJS({
2132
2132
  if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
2133
2133
  var trail = /[\/\\]$/.test(prefix2);
2134
2134
  if (prefix2.charAt(0) === "/") {
2135
- prefix2 = path3.join(this.root, prefix2);
2135
+ prefix2 = path2.join(this.root, prefix2);
2136
2136
  } else {
2137
- prefix2 = path3.resolve(this.root, prefix2);
2137
+ prefix2 = path2.resolve(this.root, prefix2);
2138
2138
  if (trail)
2139
2139
  prefix2 += "/";
2140
2140
  }
@@ -2330,7 +2330,7 @@ var require_glob = __commonJS({
2330
2330
  var Minimatch2 = minimatch2.Minimatch;
2331
2331
  var inherits = require_inherits();
2332
2332
  var EE = require("events").EventEmitter;
2333
- var path3 = require("path");
2333
+ var path2 = require("path");
2334
2334
  var assert = require("assert");
2335
2335
  var isAbsolute = require("path").isAbsolute;
2336
2336
  var globSync = require_sync();
@@ -2611,7 +2611,7 @@ var require_glob = __commonJS({
2611
2611
  e5 = prefix2 + e5;
2612
2612
  }
2613
2613
  if (e5.charAt(0) === "/" && !this.nomount) {
2614
- e5 = path3.join(this.root, e5);
2614
+ e5 = path2.join(this.root, e5);
2615
2615
  }
2616
2616
  this._emitMatch(index4, e5);
2617
2617
  }
@@ -2798,9 +2798,9 @@ var require_glob = __commonJS({
2798
2798
  if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
2799
2799
  var trail = /[\/\\]$/.test(prefix2);
2800
2800
  if (prefix2.charAt(0) === "/") {
2801
- prefix2 = path3.join(this.root, prefix2);
2801
+ prefix2 = path2.join(this.root, prefix2);
2802
2802
  } else {
2803
- prefix2 = path3.resolve(this.root, prefix2);
2803
+ prefix2 = path2.resolve(this.root, prefix2);
2804
2804
  if (trail)
2805
2805
  prefix2 += "/";
2806
2806
  }
@@ -3952,8 +3952,8 @@ var init_lib = __esm({
3952
3952
  };
3953
3953
  overrideErrorMap = errorMap;
3954
3954
  makeIssue = (params) => {
3955
- const { data, path: path3, errorMaps, issueData } = params;
3956
- const fullPath = [...path3, ...issueData.path || []];
3955
+ const { data, path: path2, errorMaps, issueData } = params;
3956
+ const fullPath = [...path2, ...issueData.path || []];
3957
3957
  const fullIssue = {
3958
3958
  ...issueData,
3959
3959
  path: fullPath
@@ -4044,11 +4044,11 @@ var init_lib = __esm({
4044
4044
  errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
4045
4045
  })(errorUtil || (errorUtil = {}));
4046
4046
  ParseInputLazyPath = class {
4047
- constructor(parent, value, path3, key) {
4047
+ constructor(parent, value, path2, key) {
4048
4048
  this._cachedPath = [];
4049
4049
  this.parent = parent;
4050
4050
  this.data = value;
4051
- this._path = path3;
4051
+ this._path = path2;
4052
4052
  this._key = key;
4053
4053
  }
4054
4054
  get path() {
@@ -7214,7 +7214,7 @@ var init_lib = __esm({
7214
7214
  });
7215
7215
 
7216
7216
  // src/serializer/mysqlSchema.ts
7217
- var index, fk, column, tableV3, compositePK, uniqueConstraint, checkConstraint, tableV4, table, kitInternals, dialect, schemaHash, schemaInternalV3, schemaInternalV4, schemaInternalV5, schemaInternal, schemaV3, schemaV4, schemaV5, schema, tableSquashedV4, tableSquashed, schemaSquashed, schemaSquashedV4, MySqlSquasher, squashMysqlScheme, mysqlSchema, mysqlSchemaV5, mysqlSchemaSquashed, backwardCompatibleMysqlSchema, dryMySql;
7217
+ var index, fk, column, tableV3, compositePK, uniqueConstraint, tableV4, table, kitInternals, dialect, schemaHash, schemaInternalV3, schemaInternalV4, schemaInternalV5, schemaInternal, schemaV3, schemaV4, schemaV5, schema, tableSquashedV4, tableSquashed, schemaSquashed, schemaSquashedV4, MySqlSquasher, squashMysqlScheme, mysqlSchema, mysqlSchemaV5, mysqlSchemaSquashed, backwardCompatibleMysqlSchema, dryMySql;
7218
7218
  var init_mysqlSchema = __esm({
7219
7219
  "src/serializer/mysqlSchema.ts"() {
7220
7220
  "use strict";
@@ -7264,10 +7264,6 @@ var init_mysqlSchema = __esm({
7264
7264
  name: stringType(),
7265
7265
  columns: stringType().array()
7266
7266
  }).strict();
7267
- checkConstraint = objectType({
7268
- name: stringType(),
7269
- value: stringType()
7270
- }).strict();
7271
7267
  tableV4 = objectType({
7272
7268
  name: stringType(),
7273
7269
  schema: stringType().optional(),
@@ -7281,8 +7277,7 @@ var init_mysqlSchema = __esm({
7281
7277
  indexes: recordType(stringType(), index),
7282
7278
  foreignKeys: recordType(stringType(), fk),
7283
7279
  compositePrimaryKeys: recordType(stringType(), compositePK),
7284
- uniqueConstraints: recordType(stringType(), uniqueConstraint).default({}),
7285
- checkConstraint: recordType(stringType(), checkConstraint).default({})
7280
+ uniqueConstraints: recordType(stringType(), uniqueConstraint).default({})
7286
7281
  }).strict();
7287
7282
  kitInternals = objectType({
7288
7283
  tables: recordType(
@@ -7359,8 +7354,7 @@ var init_mysqlSchema = __esm({
7359
7354
  indexes: recordType(stringType(), stringType()),
7360
7355
  foreignKeys: recordType(stringType(), stringType()),
7361
7356
  compositePrimaryKeys: recordType(stringType(), stringType()),
7362
- uniqueConstraints: recordType(stringType(), stringType()).default({}),
7363
- checkConstraints: recordType(stringType(), stringType()).default({})
7357
+ uniqueConstraints: recordType(stringType(), stringType()).default({})
7364
7358
  }).strict();
7365
7359
  schemaSquashed = objectType({
7366
7360
  version: literalType("5"),
@@ -7427,13 +7421,6 @@ var init_mysqlSchema = __esm({
7427
7421
  onDelete
7428
7422
  });
7429
7423
  return result;
7430
- },
7431
- squashCheck: (input) => {
7432
- return `${input.name};${input.value}`;
7433
- },
7434
- unsquashCheck: (input) => {
7435
- const [name2, value] = input.split(";");
7436
- return { name: name2, value };
7437
7424
  }
7438
7425
  };
7439
7426
  squashMysqlScheme = (json) => {
@@ -7454,9 +7441,6 @@ var init_mysqlSchema = __esm({
7454
7441
  return MySqlSquasher.squashUnique(unq);
7455
7442
  }
7456
7443
  );
7457
- const squashedCheckConstraints = mapValues(it[1].checkConstraint, (check) => {
7458
- return MySqlSquasher.squashCheck(check);
7459
- });
7460
7444
  return [
7461
7445
  it[0],
7462
7446
  {
@@ -7465,8 +7449,7 @@ var init_mysqlSchema = __esm({
7465
7449
  indexes: squashedIndexes,
7466
7450
  foreignKeys: squashedFKs,
7467
7451
  compositePrimaryKeys: squashedPKs,
7468
- uniqueConstraints: squashedUniqueConstraints,
7469
- checkConstraints: squashedCheckConstraints
7452
+ uniqueConstraints: squashedUniqueConstraints
7470
7453
  }
7471
7454
  ];
7472
7455
  })
@@ -7516,7 +7499,7 @@ var init_vector = __esm({
7516
7499
  });
7517
7500
 
7518
7501
  // src/serializer/pgSchema.ts
7519
- var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2, indexV4, indexV5, indexV6, fk2, sequenceSchema, sequenceSquashed, columnV7, column2, checkConstraint2, columnSquashed, tableV32, compositePK2, uniqueConstraint2, tableV42, tableV5, tableV6, tableV7, table2, schemaHash2, kitInternals2, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaInternalV5, pgSchemaInternalV6, pgSchemaExternal, pgSchemaInternalV7, pgSchemaInternal, tableSquashed2, tableSquashedV42, pgSchemaSquashedV4, pgSchemaSquashedV6, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchemaV5, pgSchemaV6, pgSchemaV7, pgSchema, backwardCompatiblePgSchema, PgSquasher, squashPgScheme, dryPg;
7502
+ var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2, indexV4, indexV5, indexV6, fk2, sequenceSchema, sequenceSquashed, columnV7, column2, columnSquashed, tableV32, compositePK2, uniqueConstraint2, tableV42, tableV5, tableV6, tableV7, table2, schemaHash2, kitInternals2, pgSchemaInternalV3, pgSchemaInternalV4, pgSchemaInternalV5, pgSchemaInternalV6, pgSchemaExternal, pgSchemaInternalV7, pgSchemaInternal, tableSquashed2, tableSquashedV42, pgSchemaSquashedV4, pgSchemaSquashedV6, pgSchemaSquashed, pgSchemaV3, pgSchemaV4, pgSchemaV5, pgSchemaV6, pgSchemaV7, pgSchema, backwardCompatiblePgSchema, PgSquasher, squashPgScheme, dryPg;
7520
7503
  var init_pgSchema = __esm({
7521
7504
  "src/serializer/pgSchema.ts"() {
7522
7505
  "use strict";
@@ -7680,10 +7663,6 @@ var init_pgSchema = __esm({
7680
7663
  }).optional(),
7681
7664
  identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
7682
7665
  }).strict();
7683
- checkConstraint2 = objectType({
7684
- name: stringType(),
7685
- value: stringType()
7686
- }).strict();
7687
7666
  columnSquashed = objectType({
7688
7667
  name: stringType(),
7689
7668
  type: stringType(),
@@ -7756,8 +7735,7 @@ var init_pgSchema = __esm({
7756
7735
  indexes: recordType(stringType(), index2),
7757
7736
  foreignKeys: recordType(stringType(), fk2),
7758
7737
  compositePrimaryKeys: recordType(stringType(), compositePK2),
7759
- uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
7760
- checkConstraints: recordType(stringType(), checkConstraint2).default({})
7738
+ uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
7761
7739
  }).strict();
7762
7740
  schemaHash2 = objectType({
7763
7741
  id: stringType(),
@@ -7865,8 +7843,7 @@ var init_pgSchema = __esm({
7865
7843
  indexes: recordType(stringType(), stringType()),
7866
7844
  foreignKeys: recordType(stringType(), stringType()),
7867
7845
  compositePrimaryKeys: recordType(stringType(), stringType()),
7868
- uniqueConstraints: recordType(stringType(), stringType()),
7869
- checkConstraints: recordType(stringType(), stringType())
7846
+ uniqueConstraints: recordType(stringType(), stringType())
7870
7847
  }).strict();
7871
7848
  tableSquashedV42 = objectType({
7872
7849
  name: stringType(),
@@ -8048,16 +8025,6 @@ var init_pgSchema = __esm({
8048
8025
  cache: splitted[6] !== "undefined" ? splitted[6] : void 0,
8049
8026
  cycle: splitted[7] === "true"
8050
8027
  };
8051
- },
8052
- squashCheck: (check) => {
8053
- return `${check.name};${check.value}`;
8054
- },
8055
- unsquashCheck: (input) => {
8056
- const [
8057
- name2,
8058
- value
8059
- ] = input.split(";");
8060
- return { name: name2, value };
8061
8028
  }
8062
8029
  };
8063
8030
  squashPgScheme = (json, action) => {
@@ -8090,12 +8057,6 @@ var init_pgSchema = __esm({
8090
8057
  return PgSquasher.squashUnique(unq);
8091
8058
  }
8092
8059
  );
8093
- const squashedChecksContraints = mapValues(
8094
- it[1].checkConstraints,
8095
- (check) => {
8096
- return PgSquasher.squashCheck(check);
8097
- }
8098
- );
8099
8060
  return [
8100
8061
  it[0],
8101
8062
  {
@@ -8105,8 +8066,7 @@ var init_pgSchema = __esm({
8105
8066
  indexes: squashedIndexes,
8106
8067
  foreignKeys: squashedFKs,
8107
8068
  compositePrimaryKeys: squashedPKs,
8108
- uniqueConstraints: squashedUniqueConstraints,
8109
- checkConstraints: squashedChecksContraints
8069
+ uniqueConstraints: squashedUniqueConstraints
8110
8070
  }
8111
8071
  ];
8112
8072
  })
@@ -8151,7 +8111,7 @@ var init_pgSchema = __esm({
8151
8111
  });
8152
8112
 
8153
8113
  // src/serializer/sqliteSchema.ts
8154
- var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, checkConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, kitInternals3, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, SQLiteSquasher, squashSqliteScheme, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema;
8114
+ var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, schemaInternalV52, kitInternals3, latestVersion, schemaInternal2, schemaV32, schemaV42, schemaV52, schema2, tableSquashed3, schemaSquashed2, SQLiteSquasher, squashSqliteScheme, drySQLite, sqliteSchemaV5, sqliteSchema, SQLiteSchemaSquashed, backwardCompatibleSqliteSchema;
8155
8115
  var init_sqliteSchema = __esm({
8156
8116
  "src/serializer/sqliteSchema.ts"() {
8157
8117
  "use strict";
@@ -8198,18 +8158,13 @@ var init_sqliteSchema = __esm({
8198
8158
  name: stringType(),
8199
8159
  columns: stringType().array()
8200
8160
  }).strict();
8201
- checkConstraint3 = objectType({
8202
- name: stringType(),
8203
- value: stringType()
8204
- }).strict();
8205
8161
  table3 = objectType({
8206
8162
  name: stringType(),
8207
8163
  columns: recordType(stringType(), column3),
8208
8164
  indexes: recordType(stringType(), index3),
8209
8165
  foreignKeys: recordType(stringType(), fk3),
8210
8166
  compositePrimaryKeys: recordType(stringType(), compositePK3),
8211
- uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({}),
8212
- checkConstraints: recordType(stringType(), checkConstraint3).default({})
8167
+ uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
8213
8168
  }).strict();
8214
8169
  dialect2 = enumType(["sqlite"]);
8215
8170
  schemaHash3 = objectType({
@@ -8271,8 +8226,7 @@ var init_sqliteSchema = __esm({
8271
8226
  indexes: recordType(stringType(), stringType()),
8272
8227
  foreignKeys: recordType(stringType(), stringType()),
8273
8228
  compositePrimaryKeys: recordType(stringType(), stringType()),
8274
- uniqueConstraints: recordType(stringType(), stringType()).default({}),
8275
- checkConstraints: recordType(stringType(), stringType()).default({})
8229
+ uniqueConstraints: recordType(stringType(), stringType()).default({})
8276
8230
  }).strict();
8277
8231
  schemaSquashed2 = objectType({
8278
8232
  version: latestVersion,
@@ -8354,16 +8308,6 @@ var init_sqliteSchema = __esm({
8354
8308
  },
8355
8309
  unsquashPK: (pk) => {
8356
8310
  return pk.split(",");
8357
- },
8358
- squashCheck: (check) => {
8359
- return `${check.name};${check.value}`;
8360
- },
8361
- unsquashCheck: (input) => {
8362
- const [
8363
- name2,
8364
- value
8365
- ] = input.split(";");
8366
- return { name: name2, value };
8367
8311
  }
8368
8312
  };
8369
8313
  squashSqliteScheme = (json, action) => {
@@ -8390,12 +8334,6 @@ var init_sqliteSchema = __esm({
8390
8334
  return SQLiteSquasher.squashUnique(unq);
8391
8335
  }
8392
8336
  );
8393
- const squashedCheckConstraints = mapValues(
8394
- it[1].checkConstraints,
8395
- (check) => {
8396
- return SQLiteSquasher.squashCheck(check);
8397
- }
8398
- );
8399
8337
  return [
8400
8338
  it[0],
8401
8339
  {
@@ -8404,8 +8342,7 @@ var init_sqliteSchema = __esm({
8404
8342
  indexes: squashedIndexes,
8405
8343
  foreignKeys: squashedFKs,
8406
8344
  compositePrimaryKeys: squashedPKs,
8407
- uniqueConstraints: squashedUniqueConstraints,
8408
- checkConstraints: squashedCheckConstraints
8345
+ uniqueConstraints: squashedUniqueConstraints
8409
8346
  }
8410
8347
  ];
8411
8348
  })
@@ -11279,21 +11216,6 @@ var init_jsonDiffer = __esm({
11279
11216
  return !it[0].endsWith("__deleted") && !it[0].endsWith("__added");
11280
11217
  })
11281
11218
  );
11282
- const addedCheckConstraints = Object.fromEntries(
11283
- Object.entries(table4.checkConstraints || {}).filter((it) => {
11284
- return it[0].endsWith("__added");
11285
- })
11286
- );
11287
- const deletedCheckConstraints = Object.fromEntries(
11288
- Object.entries(table4.checkConstraints || {}).filter((it) => {
11289
- return it[0].endsWith("__deleted");
11290
- })
11291
- );
11292
- const alteredCheckConstraints = Object.fromEntries(
11293
- Object.entries(table4.checkConstraints || {}).filter((it) => {
11294
- return !it[0].endsWith("__deleted") && !it[0].endsWith("__added");
11295
- })
11296
- );
11297
11219
  const mappedAltered = altered.map((it) => alternationsInColumn(it)).filter(Boolean);
11298
11220
  return {
11299
11221
  name: table4.name,
@@ -11310,10 +11232,7 @@ var init_jsonDiffer = __esm({
11310
11232
  alteredCompositePKs,
11311
11233
  addedUniqueConstraints,
11312
11234
  deletedUniqueConstraints,
11313
- alteredUniqueConstraints,
11314
- addedCheckConstraints,
11315
- deletedCheckConstraints,
11316
- alteredCheckConstraints
11235
+ alteredUniqueConstraints
11317
11236
  };
11318
11237
  };
11319
11238
  alternationsInColumn = (column4) => {
@@ -11567,32 +11486,6 @@ var init_jsonDiffer = __esm({
11567
11486
  };
11568
11487
  }
11569
11488
  return it;
11570
- }).map((it) => {
11571
- if ("" in it) {
11572
- return {
11573
- ...it,
11574
- autoincrement: {
11575
- type: "changed",
11576
- old: it.autoincrement.__old,
11577
- new: it.autoincrement.__new
11578
- }
11579
- };
11580
- }
11581
- if ("autoincrement__added" in it) {
11582
- const { autoincrement__added, ...others } = it;
11583
- return {
11584
- ...others,
11585
- autoincrement: { type: "added", value: it.autoincrement__added }
11586
- };
11587
- }
11588
- if ("autoincrement__deleted" in it) {
11589
- const { autoincrement__deleted, ...others } = it;
11590
- return {
11591
- ...others,
11592
- autoincrement: { type: "deleted", value: it.autoincrement__deleted }
11593
- };
11594
- }
11595
- return it;
11596
11489
  }).filter(Boolean);
11597
11490
  return result[0];
11598
11491
  };
@@ -11613,7 +11506,7 @@ function fromJson(statements, dialect7, action, json2) {
11613
11506
  }).filter((it) => it !== "");
11614
11507
  return result;
11615
11508
  }
11616
- var pgNativeTypes, isPgNativeType, Convertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SQLiteCreateTableConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, PgAlterTableAddCheckConstraintConvertor, PgAlterTableDeleteCheckConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, MySqlAlterTableAddCheckConstraintConvertor, MySqlAlterTableDeleteCheckConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, AlterTypeAddValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
11509
+ var pgNativeTypes, isPgNativeType, Convertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SQLiteCreateTableConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, AlterTypeAddValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
11617
11510
  var init_sqlgenerator = __esm({
11618
11511
  "src/sqlgenerator.ts"() {
11619
11512
  "use strict";
@@ -11674,7 +11567,7 @@ var init_sqlgenerator = __esm({
11674
11567
  return statement.type === "create_table" && dialect7 === "postgresql";
11675
11568
  }
11676
11569
  convert(st) {
11677
- const { tableName, schema: schema4, columns, compositePKs, uniqueConstraints, checkConstraints } = st;
11570
+ const { tableName, schema: schema4, columns, compositePKs, uniqueConstraints } = st;
11678
11571
  let statement = "";
11679
11572
  const name2 = schema4 ? `"${schema4}"."${tableName}"` : `"${tableName}"`;
11680
11573
  statement += `CREATE TABLE IF NOT EXISTS ${name2} (
@@ -11707,13 +11600,6 @@ var init_sqlgenerator = __esm({
11707
11600
  statement += ` CONSTRAINT "${unsquashedUnique.name}" UNIQUE${unsquashedUnique.nullsNotDistinct ? " NULLS NOT DISTINCT" : ""}("${unsquashedUnique.columns.join(`","`)}")`;
11708
11601
  }
11709
11602
  }
11710
- if (typeof checkConstraints !== "undefined" && checkConstraints.length > 0) {
11711
- for (const checkConstraint4 of checkConstraints) {
11712
- statement += ",\n";
11713
- const unsquashedCheck = PgSquasher.unsquashCheck(checkConstraint4);
11714
- statement += ` CONSTRAINT "${unsquashedCheck.name}" CHECK (${unsquashedCheck.value})`;
11715
- }
11716
- }
11717
11603
  statement += `
11718
11604
  );`;
11719
11605
  statement += `
@@ -11730,7 +11616,6 @@ var init_sqlgenerator = __esm({
11730
11616
  tableName,
11731
11617
  columns,
11732
11618
  schema: schema4,
11733
- checkConstraints,
11734
11619
  compositePKs,
11735
11620
  uniqueConstraints,
11736
11621
  internals
@@ -11764,13 +11649,6 @@ var init_sqlgenerator = __esm({
11764
11649
  statement += ` CONSTRAINT \`${unsquashedUnique.name}\` UNIQUE(${uniqueString})`;
11765
11650
  }
11766
11651
  }
11767
- if (typeof checkConstraints !== "undefined" && checkConstraints.length > 0) {
11768
- for (const checkConstraint4 of checkConstraints) {
11769
- statement += ",\n";
11770
- const unsquashedCheck = MySqlSquasher.unsquashCheck(checkConstraint4);
11771
- statement += ` CONSTRAINT \`${unsquashedCheck.name}\` CHECK(${unsquashedCheck.value})`;
11772
- }
11773
- }
11774
11652
  statement += `
11775
11653
  );`;
11776
11654
  statement += `
@@ -11788,8 +11666,7 @@ var init_sqlgenerator = __esm({
11788
11666
  columns,
11789
11667
  referenceData,
11790
11668
  compositePKs,
11791
- uniqueConstraints,
11792
- checkConstraints
11669
+ uniqueConstraints
11793
11670
  } = st;
11794
11671
  let statement = "";
11795
11672
  statement += `CREATE TABLE \`${tableName}\` (
@@ -11830,17 +11707,10 @@ var init_sqlgenerator = __esm({
11830
11707
  if (typeof uniqueConstraints !== "undefined" && uniqueConstraints.length > 0) {
11831
11708
  for (const uniqueConstraint4 of uniqueConstraints) {
11832
11709
  statement += ",\n";
11833
- const unsquashedUnique = SQLiteSquasher.unsquashUnique(uniqueConstraint4);
11710
+ const unsquashedUnique = MySqlSquasher.unsquashUnique(uniqueConstraint4);
11834
11711
  statement += ` CONSTRAINT ${unsquashedUnique.name} UNIQUE(\`${unsquashedUnique.columns.join(`\`,\``)}\`)`;
11835
11712
  }
11836
11713
  }
11837
- if (typeof checkConstraints !== "undefined" && checkConstraints.length > 0) {
11838
- for (const check of checkConstraints) {
11839
- statement += ",\n";
11840
- const { value, name: name2 } = SQLiteSquasher.unsquashCheck(check);
11841
- statement += ` CONSTRAINT "${name2}" CHECK(${value})`;
11842
- }
11843
- }
11844
11714
  statement += `
11845
11715
  `;
11846
11716
  statement += `);`;
@@ -11940,25 +11810,6 @@ var init_sqlgenerator = __esm({
11940
11810
  return `ALTER TABLE ${tableNameWithSchema} DROP CONSTRAINT "${unsquashed.name}";`;
11941
11811
  }
11942
11812
  };
11943
- PgAlterTableAddCheckConstraintConvertor = class extends Convertor {
11944
- can(statement, dialect7) {
11945
- return statement.type === "create_check_constraint" && dialect7 === "postgresql";
11946
- }
11947
- convert(statement) {
11948
- const unsquashed = PgSquasher.unsquashCheck(statement.data);
11949
- const tableNameWithSchema = statement.schema ? `"${statement.schema}"."${statement.tableName}"` : `"${statement.tableName}"`;
11950
- return `ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${unsquashed.name}" CHECK (${unsquashed.value});`;
11951
- }
11952
- };
11953
- PgAlterTableDeleteCheckConstraintConvertor = class extends Convertor {
11954
- can(statement, dialect7) {
11955
- return statement.type === "delete_check_constraint" && dialect7 === "postgresql";
11956
- }
11957
- convert(statement) {
11958
- const tableNameWithSchema = statement.schema ? `"${statement.schema}"."${statement.tableName}"` : `"${statement.tableName}"`;
11959
- return `ALTER TABLE ${tableNameWithSchema} DROP CONSTRAINT "${statement.constraintName}";`;
11960
- }
11961
- };
11962
11813
  MySQLAlterTableAddUniqueConstraintConvertor = class extends Convertor {
11963
11814
  can(statement, dialect7) {
11964
11815
  return statement.type === "create_unique_constraint" && dialect7 === "mysql";
@@ -11977,25 +11828,6 @@ var init_sqlgenerator = __esm({
11977
11828
  return `ALTER TABLE \`${statement.tableName}\` DROP INDEX \`${unsquashed.name}\`;`;
11978
11829
  }
11979
11830
  };
11980
- MySqlAlterTableAddCheckConstraintConvertor = class extends Convertor {
11981
- can(statement, dialect7) {
11982
- return statement.type === "create_check_constraint" && dialect7 === "mysql";
11983
- }
11984
- convert(statement) {
11985
- const unsquashed = MySqlSquasher.unsquashCheck(statement.data);
11986
- const { tableName } = statement;
11987
- return `ALTER TABLE \`${tableName}\` ADD CONSTRAINT \`${unsquashed.name}\` CHECK (${unsquashed.value});`;
11988
- }
11989
- };
11990
- MySqlAlterTableDeleteCheckConstraintConvertor = class extends Convertor {
11991
- can(statement, dialect7) {
11992
- return statement.type === "delete_check_constraint" && dialect7 === "mysql";
11993
- }
11994
- convert(statement) {
11995
- const { tableName } = statement;
11996
- return `ALTER TABLE \`${tableName}\` DROP CONSTRAINT \`${statement.constraintName}\`;`;
11997
- }
11998
- };
11999
11831
  CreatePgSequenceConvertor = class extends Convertor {
12000
11832
  can(statement, dialect7) {
12001
11833
  return statement.type === "create_sequence" && dialect7 === "postgresql";
@@ -12550,7 +12382,7 @@ var init_sqlgenerator = __esm({
12550
12382
  };
12551
12383
  LibSQLModifyColumn = class extends Convertor {
12552
12384
  can(statement, dialect7) {
12553
- return (statement.type === "alter_table_alter_column_set_type" || statement.type === "alter_table_alter_column_drop_notnull" || statement.type === "alter_table_alter_column_set_notnull" || statement.type === "alter_table_alter_column_set_default" || statement.type === "alter_table_alter_column_drop_default" || statement.type === "create_check_constraint" || statement.type === "delete_check_constraint") && dialect7 === "turso";
12385
+ return (statement.type === "alter_table_alter_column_set_type" || statement.type === "alter_table_alter_column_drop_notnull" || statement.type === "alter_table_alter_column_set_notnull" || statement.type === "alter_table_alter_column_set_default" || statement.type === "alter_table_alter_column_drop_default") && dialect7 === "turso";
12554
12386
  }
12555
12387
  convert(statement, json2) {
12556
12388
  const { tableName, columnName } = statement;
@@ -13137,22 +12969,18 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
13137
12969
  return statement.type === "recreate_table" && dialect7 === "sqlite";
13138
12970
  }
13139
12971
  convert(statement) {
13140
- const { tableName, columns, compositePKs, referenceData, checkConstraints } = statement;
12972
+ const { tableName, columns, compositePKs, referenceData } = statement;
13141
12973
  const columnNames = columns.map((it) => `"${it.name}"`).join(", ");
13142
12974
  const newTableName = `__new_${tableName}`;
13143
12975
  const sqlStatements = [];
13144
12976
  sqlStatements.push(`PRAGMA foreign_keys=OFF;`);
13145
- const mappedCheckConstraints = checkConstraints.map(
13146
- (it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `'${newTableName}'.`)
13147
- );
13148
12977
  sqlStatements.push(
13149
12978
  new SQLiteCreateTableConvertor().convert({
13150
12979
  type: "sqlite_create_table",
13151
12980
  tableName: newTableName,
13152
12981
  columns,
13153
12982
  referenceData,
13154
- compositePKs,
13155
- checkConstraints: mappedCheckConstraints
12983
+ compositePKs
13156
12984
  })
13157
12985
  );
13158
12986
  sqlStatements.push(
@@ -13183,13 +13011,10 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
13183
13011
  return statement.type === "recreate_table" && dialect7 === "turso";
13184
13012
  }
13185
13013
  convert(statement) {
13186
- const { tableName, columns, compositePKs, referenceData, checkConstraints } = statement;
13014
+ const { tableName, columns, compositePKs, referenceData } = statement;
13187
13015
  const columnNames = columns.map((it) => `"${it.name}"`).join(", ");
13188
13016
  const newTableName = `__new_${tableName}`;
13189
13017
  const sqlStatements = [];
13190
- const mappedCheckConstraints = checkConstraints.map(
13191
- (it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `\`${newTableName}\`.`)
13192
- );
13193
13018
  sqlStatements.push(`PRAGMA foreign_keys=OFF;`);
13194
13019
  sqlStatements.push(
13195
13020
  new SQLiteCreateTableConvertor().convert({
@@ -13197,8 +13022,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
13197
13022
  tableName: newTableName,
13198
13023
  columns,
13199
13024
  referenceData,
13200
- compositePKs,
13201
- checkConstraints: mappedCheckConstraints
13025
+ compositePKs
13202
13026
  })
13203
13027
  );
13204
13028
  sqlStatements.push(
@@ -13254,10 +13078,6 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
13254
13078
  convertors.push(new PgAlterTableAlterColumnSetTypeConvertor());
13255
13079
  convertors.push(new PgAlterTableAddUniqueConstraintConvertor());
13256
13080
  convertors.push(new PgAlterTableDropUniqueConstraintConvertor());
13257
- convertors.push(new PgAlterTableAddCheckConstraintConvertor());
13258
- convertors.push(new PgAlterTableDeleteCheckConstraintConvertor());
13259
- convertors.push(new MySqlAlterTableAddCheckConstraintConvertor());
13260
- convertors.push(new MySqlAlterTableDeleteCheckConstraintConvertor());
13261
13081
  convertors.push(new MySQLAlterTableAddUniqueConstraintConvertor());
13262
13082
  convertors.push(new MySQLAlterTableDropUniqueConstraintConvertor());
13263
13083
  convertors.push(new CreatePgIndexConvertor());
@@ -13348,10 +13168,6 @@ var init_sqlitePushUtils = __esm({
13348
13168
  const compositePKs = Object.values(
13349
13169
  json.tables[tableName].compositePrimaryKeys
13350
13170
  ).map((it) => SQLiteSquasher.unsquashPK(it));
13351
- const checkConstraints = Object.values(json.tables[tableName].checkConstraints);
13352
- const mappedCheckConstraints = checkConstraints.map(
13353
- (it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `\`${newTableName}\`.`)
13354
- );
13355
13171
  const fks = referenceData.map((it) => SQLiteSquasher.unsquashPushFK(it));
13356
13172
  statements.push(
13357
13173
  new SQLiteCreateTableConvertor().convert({
@@ -13359,8 +13175,7 @@ var init_sqlitePushUtils = __esm({
13359
13175
  tableName: newTableName,
13360
13176
  columns: tableColumns,
13361
13177
  referenceData: fks,
13362
- compositePKs,
13363
- checkConstraints: mappedCheckConstraints
13178
+ compositePKs
13364
13179
  })
13365
13180
  );
13366
13181
  if (!dataLoss) {
@@ -13572,7 +13387,7 @@ var init_sqlitePushUtils = __esm({
13572
13387
  });
13573
13388
 
13574
13389
  // src/jsonStatements.ts
13575
- var preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCheckConstraint, prepareDeleteCheckConstraint, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql;
13390
+ var preparePgCreateTableJson, prepareMySqlCreateTableJson, prepareSQLiteCreateTable, prepareDropTableJson, prepareRenameTableJson, prepareCreateEnumJson, prepareAddValuesToEnumJson, prepareDropEnumJson, prepareMoveEnumJson, prepareRenameEnumJson, prepareCreateSequenceJson, prepareAlterSequenceJson, prepareDropSequenceJson, prepareMoveSequenceJson, prepareRenameSequenceJson, prepareCreateSchemasJson, prepareRenameSchemasJson, prepareDeleteSchemasJson, prepareRenameColumns, _prepareDropColumns, _prepareAddColumns, _prepareSqliteAddColumns, prepareAlterColumnsMysql, preparePgAlterColumns, prepareSqliteAlterColumns, preparePgCreateIndexesJson, prepareCreateIndexesJson, prepareCreateReferencesJson, prepareLibSQLCreateReferencesJson, prepareDropReferencesJson, prepareLibSQLDropReferencesJson, prepareAlterReferencesJson, prepareDropIndexesJson, prepareAddCompositePrimaryKeySqlite, prepareDeleteCompositePrimaryKeySqlite, prepareAlterCompositePrimaryKeySqlite, prepareAddCompositePrimaryKeyPg, prepareDeleteCompositePrimaryKeyPg, prepareAlterCompositePrimaryKeyPg, prepareAddUniqueConstraintPg, prepareDeleteUniqueConstraintPg, prepareAddCompositePrimaryKeyMySql, prepareDeleteCompositePrimaryKeyMySql, prepareAlterCompositePrimaryKeyMySql;
13576
13391
  var init_jsonStatements = __esm({
13577
13392
  "src/jsonStatements.ts"() {
13578
13393
  "use strict";
@@ -13583,7 +13398,7 @@ var init_jsonStatements = __esm({
13583
13398
  init_pgSchema();
13584
13399
  init_sqliteSchema();
13585
13400
  preparePgCreateTableJson = (table4, json2) => {
13586
- const { name: name2, schema: schema4, columns, compositePrimaryKeys, uniqueConstraints, checkConstraints } = table4;
13401
+ const { name: name2, schema: schema4, columns, compositePrimaryKeys, uniqueConstraints } = table4;
13587
13402
  const tableKey2 = `${schema4 || "public"}.${name2}`;
13588
13403
  const compositePkName = Object.values(compositePrimaryKeys).length > 0 ? json2.tables[tableKey2].compositePrimaryKeys[`${PgSquasher.unsquashPK(Object.values(compositePrimaryKeys)[0]).name}`].name : "";
13589
13404
  return {
@@ -13593,12 +13408,11 @@ var init_jsonStatements = __esm({
13593
13408
  columns: Object.values(columns),
13594
13409
  compositePKs: Object.values(compositePrimaryKeys),
13595
13410
  compositePkName,
13596
- uniqueConstraints: Object.values(uniqueConstraints),
13597
- checkConstraints: Object.values(checkConstraints)
13411
+ uniqueConstraints: Object.values(uniqueConstraints)
13598
13412
  };
13599
13413
  };
13600
13414
  prepareMySqlCreateTableJson = (table4, json2, internals) => {
13601
- const { name: name2, schema: schema4, columns, compositePrimaryKeys, uniqueConstraints, checkConstraints } = table4;
13415
+ const { name: name2, schema: schema4, columns, compositePrimaryKeys, uniqueConstraints } = table4;
13602
13416
  return {
13603
13417
  type: "create_table",
13604
13418
  tableName: name2,
@@ -13607,12 +13421,11 @@ var init_jsonStatements = __esm({
13607
13421
  compositePKs: Object.values(compositePrimaryKeys),
13608
13422
  compositePkName: Object.values(compositePrimaryKeys).length > 0 ? json2.tables[name2].compositePrimaryKeys[MySqlSquasher.unsquashPK(Object.values(compositePrimaryKeys)[0]).name].name : "",
13609
13423
  uniqueConstraints: Object.values(uniqueConstraints),
13610
- internals,
13611
- checkConstraints: Object.values(checkConstraints)
13424
+ internals
13612
13425
  };
13613
13426
  };
13614
13427
  prepareSQLiteCreateTable = (table4, action) => {
13615
- const { name: name2, columns, uniqueConstraints, checkConstraints } = table4;
13428
+ const { name: name2, columns, uniqueConstraints } = table4;
13616
13429
  const references2 = Object.values(table4.foreignKeys);
13617
13430
  const composites = Object.values(table4.compositePrimaryKeys).map(
13618
13431
  (it) => SQLiteSquasher.unsquashPK(it)
@@ -13626,8 +13439,7 @@ var init_jsonStatements = __esm({
13626
13439
  columns: Object.values(columns),
13627
13440
  referenceData: fks,
13628
13441
  compositePKs: composites,
13629
- uniqueConstraints: Object.values(uniqueConstraints),
13630
- checkConstraints: Object.values(checkConstraints)
13442
+ uniqueConstraints: Object.values(uniqueConstraints)
13631
13443
  };
13632
13444
  };
13633
13445
  prepareDropTableJson = (table4) => {
@@ -14870,26 +14682,6 @@ var init_jsonStatements = __esm({
14870
14682
  };
14871
14683
  });
14872
14684
  };
14873
- prepareAddCheckConstraint = (tableName, schema4, check) => {
14874
- return Object.values(check).map((it) => {
14875
- return {
14876
- type: "create_check_constraint",
14877
- tableName,
14878
- data: it,
14879
- schema: schema4
14880
- };
14881
- });
14882
- };
14883
- prepareDeleteCheckConstraint = (tableName, schema4, check) => {
14884
- return Object.values(check).map((it) => {
14885
- return {
14886
- type: "delete_check_constraint",
14887
- tableName,
14888
- constraintName: PgSquasher.unsquashCheck(it).name,
14889
- schema: schema4
14890
- };
14891
- });
14892
- };
14893
14685
  prepareAddCompositePrimaryKeyMySql = (tableName, pks, json1, json2) => {
14894
14686
  const res = [];
14895
14687
  for (const it of Object.values(pks)) {
@@ -14939,7 +14731,7 @@ var init_statementCombiner = __esm({
14939
14731
  init_jsonStatements();
14940
14732
  init_sqliteSchema();
14941
14733
  prepareLibSQLRecreateTable = (table4, action) => {
14942
- const { name: name2, columns, uniqueConstraints, indexes, checkConstraints } = table4;
14734
+ const { name: name2, columns, uniqueConstraints, indexes } = table4;
14943
14735
  const composites = Object.values(table4.compositePrimaryKeys).map(
14944
14736
  (it) => SQLiteSquasher.unsquashPK(it)
14945
14737
  );
@@ -14954,8 +14746,7 @@ var init_statementCombiner = __esm({
14954
14746
  columns: Object.values(columns),
14955
14747
  compositePKs: composites,
14956
14748
  referenceData: fks,
14957
- uniqueConstraints: Object.values(uniqueConstraints),
14958
- checkConstraints: Object.values(checkConstraints)
14749
+ uniqueConstraints: Object.values(uniqueConstraints)
14959
14750
  }
14960
14751
  ];
14961
14752
  if (Object.keys(indexes).length) {
@@ -14964,7 +14755,7 @@ var init_statementCombiner = __esm({
14964
14755
  return statements;
14965
14756
  };
14966
14757
  prepareSQLiteRecreateTable = (table4, action) => {
14967
- const { name: name2, columns, uniqueConstraints, indexes, checkConstraints } = table4;
14758
+ const { name: name2, columns, uniqueConstraints, indexes } = table4;
14968
14759
  const composites = Object.values(table4.compositePrimaryKeys).map(
14969
14760
  (it) => SQLiteSquasher.unsquashPK(it)
14970
14761
  );
@@ -14979,8 +14770,7 @@ var init_statementCombiner = __esm({
14979
14770
  columns: Object.values(columns),
14980
14771
  compositePKs: composites,
14981
14772
  referenceData: fks,
14982
- uniqueConstraints: Object.values(uniqueConstraints),
14983
- checkConstraints: Object.values(checkConstraints)
14773
+ uniqueConstraints: Object.values(uniqueConstraints)
14984
14774
  }
14985
14775
  ];
14986
14776
  if (Object.keys(indexes).length) {
@@ -14991,7 +14781,7 @@ var init_statementCombiner = __esm({
14991
14781
  libSQLCombineStatements = (statements, json2, action) => {
14992
14782
  const newStatements = {};
14993
14783
  for (const statement of statements) {
14994
- if (statement.type === "alter_table_alter_column_drop_autoincrement" || statement.type === "alter_table_alter_column_set_autoincrement" || statement.type === "alter_table_alter_column_drop_pk" || statement.type === "alter_table_alter_column_set_pk" || statement.type === "create_composite_pk" || statement.type === "alter_composite_pk" || statement.type === "delete_composite_pk" || statement.type === "create_check_constraint" || statement.type === "delete_check_constraint") {
14784
+ if (statement.type === "alter_table_alter_column_drop_autoincrement" || statement.type === "alter_table_alter_column_set_autoincrement" || statement.type === "alter_table_alter_column_drop_pk" || statement.type === "alter_table_alter_column_set_pk" || statement.type === "create_composite_pk" || statement.type === "alter_composite_pk" || statement.type === "delete_composite_pk") {
14995
14785
  const tableName2 = statement.tableName;
14996
14786
  const statementsForTable2 = newStatements[tableName2];
14997
14787
  if (!statementsForTable2) {
@@ -15132,16 +14922,16 @@ var init_statementCombiner = __esm({
15132
14922
  sqliteCombineStatements = (statements, json2, action) => {
15133
14923
  const newStatements = {};
15134
14924
  for (const statement of statements) {
15135
- if (statement.type === "alter_table_alter_column_set_type" || statement.type === "alter_table_alter_column_set_default" || statement.type === "alter_table_alter_column_drop_default" || statement.type === "alter_table_alter_column_set_notnull" || statement.type === "alter_table_alter_column_drop_notnull" || statement.type === "alter_table_alter_column_drop_autoincrement" || statement.type === "alter_table_alter_column_set_autoincrement" || statement.type === "alter_table_alter_column_drop_pk" || statement.type === "alter_table_alter_column_set_pk" || statement.type === "delete_reference" || statement.type === "alter_reference" || statement.type === "create_composite_pk" || statement.type === "alter_composite_pk" || statement.type === "delete_composite_pk" || statement.type === "create_unique_constraint" || statement.type === "delete_unique_constraint" || statement.type === "create_check_constraint" || statement.type === "delete_check_constraint") {
14925
+ if (statement.type === "alter_table_alter_column_set_type" || statement.type === "alter_table_alter_column_set_default" || statement.type === "alter_table_alter_column_drop_default" || statement.type === "alter_table_alter_column_set_notnull" || statement.type === "alter_table_alter_column_drop_notnull" || statement.type === "alter_table_alter_column_drop_autoincrement" || statement.type === "alter_table_alter_column_set_autoincrement" || statement.type === "alter_table_alter_column_drop_pk" || statement.type === "alter_table_alter_column_set_pk" || statement.type === "delete_reference" || statement.type === "alter_reference" || statement.type === "create_composite_pk" || statement.type === "alter_composite_pk" || statement.type === "delete_composite_pk" || statement.type === "create_unique_constraint" || statement.type === "delete_unique_constraint") {
15136
14926
  const tableName2 = statement.tableName;
15137
14927
  const statementsForTable2 = newStatements[tableName2];
15138
14928
  if (!statementsForTable2) {
15139
- newStatements[tableName2] = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
14929
+ newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
15140
14930
  continue;
15141
14931
  }
15142
14932
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
15143
14933
  const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
15144
- const preparedStatements = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
14934
+ const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
15145
14935
  if (wasRename) {
15146
14936
  newStatements[tableName2].push(...preparedStatements);
15147
14937
  } else {
@@ -15155,12 +14945,12 @@ var init_statementCombiner = __esm({
15155
14945
  const tableName2 = statement.tableName;
15156
14946
  const statementsForTable2 = newStatements[tableName2];
15157
14947
  if (!statementsForTable2) {
15158
- newStatements[tableName2] = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
14948
+ newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
15159
14949
  continue;
15160
14950
  }
15161
14951
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
15162
14952
  const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
15163
- const preparedStatements = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
14953
+ const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
15164
14954
  if (wasRename) {
15165
14955
  newStatements[tableName2].push(...preparedStatements);
15166
14956
  } else {
@@ -15185,7 +14975,7 @@ var init_statementCombiner = __esm({
15185
14975
  }
15186
14976
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
15187
14977
  const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
15188
- const preparedStatements = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
14978
+ const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
15189
14979
  if (wasRename) {
15190
14980
  newStatements[tableName2].push(...preparedStatements);
15191
14981
  } else {
@@ -15354,8 +15144,7 @@ var init_snapshotsDiffer = __esm({
15354
15144
  indexes: recordType(stringType(), stringType()),
15355
15145
  foreignKeys: recordType(stringType(), stringType()),
15356
15146
  compositePrimaryKeys: recordType(stringType(), stringType()).default({}),
15357
- uniqueConstraints: recordType(stringType(), stringType()).default({}),
15358
- checkConstraints: recordType(stringType(), stringType()).default({})
15147
+ uniqueConstraints: recordType(stringType(), stringType()).default({})
15359
15148
  }).strict();
15360
15149
  alteredTableScheme = objectType({
15361
15150
  name: stringType(),
@@ -15396,21 +15185,6 @@ var init_snapshotsDiffer = __esm({
15396
15185
  __new: stringType(),
15397
15186
  __old: stringType()
15398
15187
  })
15399
- ),
15400
- addedCheckConstraints: recordType(
15401
- stringType(),
15402
- stringType()
15403
- ),
15404
- deletedCheckConstraints: recordType(
15405
- stringType(),
15406
- stringType()
15407
- ),
15408
- alteredCheckConstraints: recordType(
15409
- stringType(),
15410
- objectType({
15411
- __new: stringType(),
15412
- __old: stringType()
15413
- })
15414
15188
  )
15415
15189
  }).strict();
15416
15190
  diffResultScheme = objectType({
@@ -15751,8 +15525,6 @@ var init_snapshotsDiffer = __esm({
15751
15525
  schemaTo: it.schemaTo || "public"
15752
15526
  });
15753
15527
  }
15754
- const jsonDeletedCheckConstraints = [];
15755
- const jsonCreatedCheckConstraints = [];
15756
15528
  for (let it of alteredTables) {
15757
15529
  let addedColumns = [];
15758
15530
  for (const addedPkName of Object.keys(it.addedCompositePKs)) {
@@ -15792,8 +15564,6 @@ var init_snapshotsDiffer = __esm({
15792
15564
  let addedUniqueConstraints = [];
15793
15565
  let deletedUniqueConstraints = [];
15794
15566
  let alteredUniqueConstraints = [];
15795
- let createCheckConstraints = [];
15796
- let deleteCheckConstraints = [];
15797
15567
  addedUniqueConstraints = prepareAddUniqueConstraintPg(
15798
15568
  it.name,
15799
15569
  it.schema,
@@ -15818,24 +15588,6 @@ var init_snapshotsDiffer = __esm({
15818
15588
  ...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
15819
15589
  );
15820
15590
  }
15821
- createCheckConstraints = prepareAddCheckConstraint(it.name, it.schema, it.addedCheckConstraints);
15822
- deleteCheckConstraints = prepareDeleteCheckConstraint(
15823
- it.name,
15824
- it.schema,
15825
- it.deletedCheckConstraints
15826
- );
15827
- if (it.alteredCheckConstraints && action !== "push") {
15828
- const added = {};
15829
- const deleted = {};
15830
- for (const k6 of Object.keys(it.alteredCheckConstraints)) {
15831
- added[k6] = it.alteredCheckConstraints[k6].__new;
15832
- deleted[k6] = it.alteredCheckConstraints[k6].__old;
15833
- }
15834
- createCheckConstraints.push(...prepareAddCheckConstraint(it.name, it.schema, added));
15835
- deleteCheckConstraints.push(...prepareDeleteCheckConstraint(it.name, it.schema, deleted));
15836
- }
15837
- jsonCreatedCheckConstraints.push(...createCheckConstraints);
15838
- jsonDeletedCheckConstraints.push(...deleteCheckConstraints);
15839
15591
  jsonAddedCompositePKs.push(...addedCompositePKs);
15840
15592
  jsonDeletedCompositePKs.push(...deletedCompositePKs);
15841
15593
  jsonAlteredCompositePKs.push(...alteredCompositePKs);
@@ -15989,7 +15741,6 @@ var init_snapshotsDiffer = __esm({
15989
15741
  jsonStatements.push(...jsonRenameTables);
15990
15742
  jsonStatements.push(...jsonRenameColumnsStatements);
15991
15743
  jsonStatements.push(...jsonDeletedUniqueConstraints);
15992
- jsonStatements.push(...jsonDeletedCheckConstraints);
15993
15744
  jsonStatements.push(...jsonDroppedReferencesForAlteredTables);
15994
15745
  jsonStatements.push(...jsonDropIndexesForAllAlteredTables);
15995
15746
  jsonStatements.push(...jsonDeletedCompositePKs);
@@ -16003,7 +15754,6 @@ var init_snapshotsDiffer = __esm({
16003
15754
  jsonStatements.push(...jsonDropColumnsStatemets);
16004
15755
  jsonStatements.push(...jsonAlteredCompositePKs);
16005
15756
  jsonStatements.push(...jsonAddedUniqueConstraints);
16006
- jsonStatements.push(...jsonCreatedCheckConstraints);
16007
15757
  jsonStatements.push(...jsonAlteredUniqueConstraints);
16008
15758
  jsonStatements.push(...dropEnums);
16009
15759
  jsonStatements.push(...dropSequences);
@@ -16167,8 +15917,6 @@ var init_snapshotsDiffer = __esm({
16167
15917
  const jsonAddedUniqueConstraints = [];
16168
15918
  const jsonDeletedUniqueConstraints = [];
16169
15919
  const jsonAlteredUniqueConstraints = [];
16170
- const jsonCreatedCheckConstraints = [];
16171
- const jsonDeletedCheckConstraints = [];
16172
15920
  const jsonRenameColumnsStatements = columnRenames.map((it) => prepareRenameColumns(it.table, "", it.renames)).flat();
16173
15921
  const jsonAddColumnsStatemets = columnCreates.map((it) => _prepareAddColumns(it.table, "", it.columns)).flat();
16174
15922
  const jsonDropColumnsStatemets = columnDeletes.map((it) => _prepareDropColumns(it.table, "", it.columns)).flat();
@@ -16207,8 +15955,6 @@ var init_snapshotsDiffer = __esm({
16207
15955
  let addedUniqueConstraints = [];
16208
15956
  let deletedUniqueConstraints = [];
16209
15957
  let alteredUniqueConstraints = [];
16210
- let createdCheckConstraints = [];
16211
- let deletedCheckConstraints = [];
16212
15958
  addedUniqueConstraints = prepareAddUniqueConstraintPg(
16213
15959
  it.name,
16214
15960
  it.schema,
@@ -16233,30 +15979,12 @@ var init_snapshotsDiffer = __esm({
16233
15979
  ...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
16234
15980
  );
16235
15981
  }
16236
- createdCheckConstraints = prepareAddCheckConstraint(it.name, it.schema, it.addedCheckConstraints);
16237
- deletedCheckConstraints = prepareDeleteCheckConstraint(
16238
- it.name,
16239
- it.schema,
16240
- it.deletedCheckConstraints
16241
- );
16242
- if (it.alteredCheckConstraints && action !== "push") {
16243
- const added = {};
16244
- const deleted = {};
16245
- for (const k6 of Object.keys(it.alteredCheckConstraints)) {
16246
- added[k6] = it.alteredCheckConstraints[k6].__new;
16247
- deleted[k6] = it.alteredCheckConstraints[k6].__old;
16248
- }
16249
- createdCheckConstraints.push(...prepareAddCheckConstraint(it.name, it.schema, added));
16250
- deletedCheckConstraints.push(...prepareDeleteCheckConstraint(it.name, it.schema, deleted));
16251
- }
16252
15982
  jsonAddedCompositePKs.push(...addedCompositePKs);
16253
15983
  jsonDeletedCompositePKs.push(...deletedCompositePKs);
16254
15984
  jsonAlteredCompositePKs.push(...alteredCompositePKs);
16255
15985
  jsonAddedUniqueConstraints.push(...addedUniqueConstraints);
16256
15986
  jsonDeletedUniqueConstraints.push(...deletedUniqueConstraints);
16257
15987
  jsonAlteredUniqueConstraints.push(...alteredUniqueConstraints);
16258
- jsonCreatedCheckConstraints.push(...createdCheckConstraints);
16259
- jsonDeletedCheckConstraints.push(...deletedCheckConstraints);
16260
15988
  });
16261
15989
  const rColumns = jsonRenameColumnsStatements.map((it) => {
16262
15990
  const tableName = it.tableName;
@@ -16352,7 +16080,6 @@ var init_snapshotsDiffer = __esm({
16352
16080
  jsonStatements.push(...jsonRenameTables);
16353
16081
  jsonStatements.push(...jsonRenameColumnsStatements);
16354
16082
  jsonStatements.push(...jsonDeletedUniqueConstraints);
16355
- jsonStatements.push(...jsonDeletedCheckConstraints);
16356
16083
  jsonStatements.push(...jsonDroppedReferencesForAlteredTables);
16357
16084
  jsonStatements.push(...jsonDropIndexesForAllAlteredTables);
16358
16085
  jsonStatements.push(...jsonDeletedCompositePKs);
@@ -16363,11 +16090,11 @@ var init_snapshotsDiffer = __esm({
16363
16090
  jsonStatements.push(...jsonAddColumnsStatemets);
16364
16091
  jsonStatements.push(...jsonCreateReferencesForCreatedTables);
16365
16092
  jsonStatements.push(...jsonCreateIndexesForCreatedTables);
16366
- jsonStatements.push(...jsonCreatedCheckConstraints);
16367
16093
  jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
16368
16094
  jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
16369
16095
  jsonStatements.push(...jsonDropColumnsStatemets);
16370
16096
  jsonStatements.push(...jsonAlteredCompositePKs);
16097
+ jsonStatements.push(...jsonAddedUniqueConstraints);
16371
16098
  jsonStatements.push(...jsonAlteredUniqueConstraints);
16372
16099
  const sqlStatements = fromJson(jsonStatements, "mysql");
16373
16100
  const uniqueSqlStatements = [];
@@ -16495,8 +16222,6 @@ var init_snapshotsDiffer = __esm({
16495
16222
  const jsonAddedUniqueConstraints = [];
16496
16223
  const jsonDeletedUniqueConstraints = [];
16497
16224
  const jsonAlteredUniqueConstraints = [];
16498
- const jsonDeletedCheckConstraints = [];
16499
- const jsonCreatedCheckConstraints = [];
16500
16225
  allAltered.forEach((it) => {
16501
16226
  let addedColumns = [];
16502
16227
  for (const addedPkName of Object.keys(it.addedCompositePKs)) {
@@ -16553,56 +16278,12 @@ var init_snapshotsDiffer = __esm({
16553
16278
  ...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
16554
16279
  );
16555
16280
  }
16556
- let createdCheckConstraints = [];
16557
- let deletedCheckConstraints = [];
16558
- addedUniqueConstraints = prepareAddUniqueConstraintPg(
16559
- it.name,
16560
- it.schema,
16561
- it.addedUniqueConstraints
16562
- );
16563
- deletedUniqueConstraints = prepareDeleteUniqueConstraintPg(
16564
- it.name,
16565
- it.schema,
16566
- it.deletedUniqueConstraints
16567
- );
16568
- if (it.alteredUniqueConstraints) {
16569
- const added = {};
16570
- const deleted = {};
16571
- for (const k6 of Object.keys(it.alteredUniqueConstraints)) {
16572
- added[k6] = it.alteredUniqueConstraints[k6].__new;
16573
- deleted[k6] = it.alteredUniqueConstraints[k6].__old;
16574
- }
16575
- addedUniqueConstraints.push(
16576
- ...prepareAddUniqueConstraintPg(it.name, it.schema, added)
16577
- );
16578
- deletedUniqueConstraints.push(
16579
- ...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
16580
- );
16581
- }
16582
- createdCheckConstraints = prepareAddCheckConstraint(it.name, it.schema, it.addedCheckConstraints);
16583
- deletedCheckConstraints = prepareDeleteCheckConstraint(
16584
- it.name,
16585
- it.schema,
16586
- it.deletedCheckConstraints
16587
- );
16588
- if (it.alteredCheckConstraints && action !== "push") {
16589
- const added = {};
16590
- const deleted = {};
16591
- for (const k6 of Object.keys(it.alteredCheckConstraints)) {
16592
- added[k6] = it.alteredCheckConstraints[k6].__new;
16593
- deleted[k6] = it.alteredCheckConstraints[k6].__old;
16594
- }
16595
- createdCheckConstraints.push(...prepareAddCheckConstraint(it.name, it.schema, added));
16596
- deletedCheckConstraints.push(...prepareDeleteCheckConstraint(it.name, it.schema, deleted));
16597
- }
16598
16281
  jsonAddedCompositePKs.push(...addedCompositePKs);
16599
16282
  jsonDeletedCompositePKs.push(...deletedCompositePKs);
16600
16283
  jsonAlteredCompositePKs.push(...alteredCompositePKs);
16601
16284
  jsonAddedUniqueConstraints.push(...addedUniqueConstraints);
16602
16285
  jsonDeletedUniqueConstraints.push(...deletedUniqueConstraints);
16603
16286
  jsonAlteredUniqueConstraints.push(...alteredUniqueConstraints);
16604
- jsonCreatedCheckConstraints.push(...createdCheckConstraints);
16605
- jsonDeletedCheckConstraints.push(...deletedCheckConstraints);
16606
16287
  });
16607
16288
  const rColumns = jsonRenameColumnsStatements.map((it) => {
16608
16289
  const tableName = it.tableName;
@@ -16687,7 +16368,6 @@ var init_snapshotsDiffer = __esm({
16687
16368
  jsonStatements.push(...jsonRenameTables);
16688
16369
  jsonStatements.push(...jsonRenameColumnsStatements);
16689
16370
  jsonStatements.push(...jsonDroppedReferencesForAlteredTables);
16690
- jsonStatements.push(...jsonDeletedCheckConstraints);
16691
16371
  jsonStatements.push(...jsonDropIndexesForAllAlteredTables);
16692
16372
  jsonStatements.push(...jsonDeletedCompositePKs);
16693
16373
  jsonStatements.push(...jsonTableAlternations);
@@ -16695,7 +16375,6 @@ var init_snapshotsDiffer = __esm({
16695
16375
  jsonStatements.push(...jsonAddColumnsStatemets);
16696
16376
  jsonStatements.push(...jsonCreateIndexesForCreatedTables);
16697
16377
  jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
16698
- jsonStatements.push(...jsonCreatedCheckConstraints);
16699
16378
  jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
16700
16379
  jsonStatements.push(...jsonDropColumnsStatemets);
16701
16380
  jsonStatements.push(...jsonAlteredCompositePKs);
@@ -16839,8 +16518,6 @@ var init_snapshotsDiffer = __esm({
16839
16518
  const jsonAddedUniqueConstraints = [];
16840
16519
  const jsonDeletedUniqueConstraints = [];
16841
16520
  const jsonAlteredUniqueConstraints = [];
16842
- const jsonDeletedCheckConstraints = [];
16843
- const jsonCreatedCheckConstraints = [];
16844
16521
  allAltered.forEach((it) => {
16845
16522
  let addedColumns = [];
16846
16523
  for (const addedPkName of Object.keys(it.addedCompositePKs)) {
@@ -16873,8 +16550,6 @@ var init_snapshotsDiffer = __esm({
16873
16550
  let addedUniqueConstraints = [];
16874
16551
  let deletedUniqueConstraints = [];
16875
16552
  let alteredUniqueConstraints = [];
16876
- let createdCheckConstraints = [];
16877
- let deletedCheckConstraints = [];
16878
16553
  addedUniqueConstraints = prepareAddUniqueConstraintPg(
16879
16554
  it.name,
16880
16555
  it.schema,
@@ -16899,30 +16574,12 @@ var init_snapshotsDiffer = __esm({
16899
16574
  ...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
16900
16575
  );
16901
16576
  }
16902
- createdCheckConstraints = prepareAddCheckConstraint(it.name, it.schema, it.addedCheckConstraints);
16903
- deletedCheckConstraints = prepareDeleteCheckConstraint(
16904
- it.name,
16905
- it.schema,
16906
- it.deletedCheckConstraints
16907
- );
16908
- if (it.alteredCheckConstraints && action !== "push") {
16909
- const added = {};
16910
- const deleted = {};
16911
- for (const k6 of Object.keys(it.alteredCheckConstraints)) {
16912
- added[k6] = it.alteredCheckConstraints[k6].__new;
16913
- deleted[k6] = it.alteredCheckConstraints[k6].__old;
16914
- }
16915
- createdCheckConstraints.push(...prepareAddCheckConstraint(it.name, it.schema, added));
16916
- deletedCheckConstraints.push(...prepareDeleteCheckConstraint(it.name, it.schema, deleted));
16917
- }
16918
16577
  jsonAddedCompositePKs.push(...addedCompositePKs);
16919
16578
  jsonDeletedCompositePKs.push(...deletedCompositePKs);
16920
16579
  jsonAlteredCompositePKs.push(...alteredCompositePKs);
16921
16580
  jsonAddedUniqueConstraints.push(...addedUniqueConstraints);
16922
16581
  jsonDeletedUniqueConstraints.push(...deletedUniqueConstraints);
16923
16582
  jsonAlteredUniqueConstraints.push(...alteredUniqueConstraints);
16924
- jsonCreatedCheckConstraints.push(...createdCheckConstraints);
16925
- jsonDeletedCheckConstraints.push(...deletedCheckConstraints);
16926
16583
  });
16927
16584
  const jsonTableAlternations = allAltered.map((it) => {
16928
16585
  return prepareSqliteAlterColumns(it.name, it.schema, it.altered, json2);
@@ -17000,7 +16657,6 @@ var init_snapshotsDiffer = __esm({
17000
16657
  jsonStatements.push(...jsonRenameTables);
17001
16658
  jsonStatements.push(...jsonRenameColumnsStatements);
17002
16659
  jsonStatements.push(...jsonDroppedReferencesForAlteredTables);
17003
- jsonStatements.push(...jsonDeletedCheckConstraints);
17004
16660
  jsonStatements.push(...jsonDropIndexesForAllAlteredTables);
17005
16661
  jsonStatements.push(...jsonDeletedCompositePKs);
17006
16662
  jsonStatements.push(...jsonTableAlternations);
@@ -17008,7 +16664,6 @@ var init_snapshotsDiffer = __esm({
17008
16664
  jsonStatements.push(...jsonAddColumnsStatemets);
17009
16665
  jsonStatements.push(...jsonCreateIndexesForCreatedTables);
17010
16666
  jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
17011
- jsonStatements.push(...jsonCreatedCheckConstraints);
17012
16667
  jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
17013
16668
  jsonStatements.push(...jsonDropColumnsStatemets);
17014
16669
  jsonStatements.push(...jsonAlteredCompositePKs);
@@ -23248,7 +22903,7 @@ var require_split2 = __commonJS({
23248
22903
  var require_helper = __commonJS({
23249
22904
  "../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/helper.js"(exports2, module2) {
23250
22905
  "use strict";
23251
- var path3 = require("path");
22906
+ var path2 = require("path");
23252
22907
  var Stream4 = require("stream").Stream;
23253
22908
  var split = require_split2();
23254
22909
  var util2 = require("util");
@@ -23287,7 +22942,7 @@ var require_helper = __commonJS({
23287
22942
  };
23288
22943
  module2.exports.getFileName = function(rawEnv) {
23289
22944
  var env3 = rawEnv || process.env;
23290
- var file = env3.PGPASSFILE || (isWin ? path3.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path3.join(env3.HOME || "./", ".pgpass"));
22945
+ var file = env3.PGPASSFILE || (isWin ? path2.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path2.join(env3.HOME || "./", ".pgpass"));
23291
22946
  return file;
23292
22947
  };
23293
22948
  module2.exports.usePgPass = function(stats, fname) {
@@ -23419,7 +23074,7 @@ var require_helper = __commonJS({
23419
23074
  var require_lib2 = __commonJS({
23420
23075
  "../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/index.js"(exports2, module2) {
23421
23076
  "use strict";
23422
- var path3 = require("path");
23077
+ var path2 = require("path");
23423
23078
  var fs5 = require("fs");
23424
23079
  var helper = require_helper();
23425
23080
  module2.exports = function(connInfo, cb) {
@@ -24808,7 +24463,7 @@ var init_query_promise = __esm({
24808
24463
  function mapResultRow(columns, row, joinsNotNullableMap) {
24809
24464
  const nullifyMap = {};
24810
24465
  const result = columns.reduce(
24811
- (result2, { path: path3, field }, columnIndex) => {
24466
+ (result2, { path: path2, field }, columnIndex) => {
24812
24467
  let decoder2;
24813
24468
  if (is(field, Column2)) {
24814
24469
  decoder2 = field;
@@ -24818,8 +24473,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
24818
24473
  decoder2 = field.sql.decoder;
24819
24474
  }
24820
24475
  let node = result2;
24821
- for (const [pathChunkIndex, pathChunk] of path3.entries()) {
24822
- if (pathChunkIndex < path3.length - 1) {
24476
+ for (const [pathChunkIndex, pathChunk] of path2.entries()) {
24477
+ if (pathChunkIndex < path2.length - 1) {
24823
24478
  if (!(pathChunk in node)) {
24824
24479
  node[pathChunk] = {};
24825
24480
  }
@@ -24827,8 +24482,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
24827
24482
  } else {
24828
24483
  const rawValue = row[columnIndex];
24829
24484
  const value = node[pathChunk] = rawValue === null ? null : decoder2.mapFromDriverValue(rawValue);
24830
- if (joinsNotNullableMap && is(field, Column2) && path3.length === 2) {
24831
- const objectName = path3[0];
24485
+ if (joinsNotNullableMap && is(field, Column2) && path2.length === 2) {
24486
+ const objectName = path2[0];
24832
24487
  if (!(objectName in nullifyMap)) {
24833
24488
  nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
24834
24489
  } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) {
@@ -27186,6 +26841,46 @@ var init_dialect = __esm({
27186
26841
  });
27187
26842
  return sql.join(chunks);
27188
26843
  }
26844
+ buildOptimizedSelection(fields, { isSingleTable = false } = {}) {
26845
+ const columnsLen = fields.length;
26846
+ const chunks = fields.flatMap(({ field }, i5) => {
26847
+ const chunk = [];
26848
+ if (is(field, SQL.Aliased) && field.isSelectionField) {
26849
+ chunk.push(sql.identifier(field.fieldAlias));
26850
+ } else if (is(field, SQL.Aliased) || is(field, SQL)) {
26851
+ const query = is(field, SQL.Aliased) ? field.sql : field;
26852
+ if (isSingleTable) {
26853
+ const parts = [];
26854
+ for (const c5 of query.queryChunks) {
26855
+ if (is(c5, PgColumn)) {
26856
+ parts.push(sql.raw(c5.name), sql`, `, sql.identifier(c5.name));
26857
+ continue;
26858
+ }
26859
+ parts.push(c5);
26860
+ }
26861
+ chunk.push(new SQL(parts));
26862
+ } else {
26863
+ chunk.push(query);
26864
+ }
26865
+ if (is(field, SQL.Aliased)) {
26866
+ chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
26867
+ }
26868
+ } else if (is(field, Column2)) {
26869
+ if (isSingleTable) {
26870
+ chunk.push(sql`'${sql.raw(field.name)}', ${sql.identifier(field.name)}`);
26871
+ } else {
26872
+ chunk.push(field);
26873
+ }
26874
+ }
26875
+ if (i5 < columnsLen - 1) {
26876
+ chunk.push(sql`, `);
26877
+ }
26878
+ return chunk;
26879
+ });
26880
+ chunks.unshift(sql`json_build_object(`);
26881
+ chunks.push(sql`)`);
26882
+ return sql.join(chunks);
26883
+ }
27189
26884
  buildSelectQuery({
27190
26885
  withList,
27191
26886
  fields,
@@ -27200,7 +26895,8 @@ var init_dialect = __esm({
27200
26895
  offset,
27201
26896
  lockingClause,
27202
26897
  distinct,
27203
- setOperators
26898
+ setOperators,
26899
+ optimize
27204
26900
  }) {
27205
26901
  const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
27206
26902
  for (const f5 of fieldsList) {
@@ -27219,7 +26915,9 @@ var init_dialect = __esm({
27219
26915
  if (distinct) {
27220
26916
  distinctSql = distinct === true ? sql` distinct` : sql` distinct on (${sql.join(distinct.on, sql`, `)})`;
27221
26917
  }
27222
- const selection = this.buildSelection(fieldsList, { isSingleTable });
26918
+ const selection = optimize ? this.buildOptimizedSelection(fieldsList, {
26919
+ isSingleTable
26920
+ }) : this.buildSelection(fieldsList, { isSingleTable });
27223
26921
  const tableSql = (() => {
27224
26922
  if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
27225
26923
  let fullName = sql`${sql.identifier(table4[Table2.Symbol.OriginalName])}`;
@@ -28900,6 +28598,10 @@ var init_select2 = __esm({
28900
28598
  $dynamic() {
28901
28599
  return this;
28902
28600
  }
28601
+ $optimize() {
28602
+ this.config.optimize = true;
28603
+ return this;
28604
+ }
28903
28605
  };
28904
28606
  __publicField(PgSelectQueryBuilderBase, _a130, "PgSelectQueryBuilder");
28905
28607
  PgSelectBase = class extends (_b101 = PgSelectQueryBuilderBase, _a131 = entityKind, _b101) {
@@ -28919,7 +28621,7 @@ var init_select2 = __esm({
28919
28621
  }
28920
28622
  return tracer.startActiveSpan("drizzle.prepareQuery", () => {
28921
28623
  const fieldsList = orderSelectedFields(config.fields);
28922
- const query = session.prepareQuery(dialect7.sqlToQuery(this.getSQL()), fieldsList, name2, true);
28624
+ const query = session.prepareQuery(dialect7.sqlToQuery(this.getSQL()), fieldsList, name2, true, void 0, config.optimize);
28923
28625
  query.joinsNotNullableMap = joinsNotNullableMap;
28924
28626
  return query;
28925
28627
  });
@@ -29444,6 +29146,7 @@ var init_db = __esm({
29444
29146
  init_entity();
29445
29147
  init_query_builders();
29446
29148
  init_selection_proxy();
29149
+ init_sql();
29447
29150
  init_subquery();
29448
29151
  init_count();
29449
29152
  init_query();
@@ -29698,8 +29401,8 @@ var init_db = __esm({
29698
29401
  return new PgRefreshMaterializedView(view, this.session, this.dialect);
29699
29402
  }
29700
29403
  execute(query) {
29701
- const sql3 = query.getSQL();
29702
- const builtQuery = this.dialect.sqlToQuery(sql3);
29404
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
29405
+ const builtQuery = this.dialect.sqlToQuery(sequel);
29703
29406
  const prepared = this.session.prepareQuery(
29704
29407
  builtQuery,
29705
29408
  void 0,
@@ -29708,7 +29411,7 @@ var init_db = __esm({
29708
29411
  );
29709
29412
  return new PgRaw(
29710
29413
  () => prepared.execute(),
29711
- sql3,
29414
+ sequel,
29712
29415
  builtQuery,
29713
29416
  (result) => prepared.mapResult(result, true)
29714
29417
  );
@@ -30394,7 +30097,7 @@ var init_session2 = __esm({
30394
30097
  init_utils2();
30395
30098
  ({ Pool } = import_pg.default);
30396
30099
  NodePgPreparedQuery = class extends (_b114 = PgPreparedQuery, _a159 = entityKind, _b114) {
30397
- constructor(client, queryString, params, logger2, fields, name2, _isResponseInArrayMode, customResultMapper) {
30100
+ constructor(client, queryString, params, logger2, fields, name2, _isResponseInArrayMode, customResultMapper, isOptimized) {
30398
30101
  super({ sql: queryString, params });
30399
30102
  __publicField(this, "rawQueryConfig");
30400
30103
  __publicField(this, "queryConfig");
@@ -30404,6 +30107,7 @@ var init_session2 = __esm({
30404
30107
  this.fields = fields;
30405
30108
  this._isResponseInArrayMode = _isResponseInArrayMode;
30406
30109
  this.customResultMapper = customResultMapper;
30110
+ this.isOptimized = isOptimized;
30407
30111
  this.rawQueryConfig = {
30408
30112
  name: name2,
30409
30113
  text: queryString
@@ -30418,7 +30122,15 @@ var init_session2 = __esm({
30418
30122
  return tracer.startActiveSpan("drizzle.execute", async () => {
30419
30123
  const params = fillPlaceholders(this.params, placeholderValues);
30420
30124
  this.logger.logQuery(this.rawQueryConfig.text, params);
30421
- const { fields, rawQueryConfig: rawQuery, client, queryConfig: query, joinsNotNullableMap, customResultMapper } = this;
30125
+ const {
30126
+ fields,
30127
+ rawQueryConfig: rawQuery,
30128
+ client,
30129
+ queryConfig: query,
30130
+ joinsNotNullableMap,
30131
+ customResultMapper,
30132
+ isOptimized
30133
+ } = this;
30422
30134
  if (!fields && !customResultMapper) {
30423
30135
  return tracer.startActiveSpan("drizzle.driver.execute", async (span) => {
30424
30136
  span?.setAttributes({
@@ -30438,7 +30150,7 @@ var init_session2 = __esm({
30438
30150
  return client.query(query, params);
30439
30151
  });
30440
30152
  return tracer.startActiveSpan("drizzle.mapResponse", () => {
30441
- return customResultMapper ? customResultMapper(result.rows) : result.rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
30153
+ return isOptimized ? result.rows.flat(1) : customResultMapper ? customResultMapper(result.rows) : result.rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
30442
30154
  });
30443
30155
  });
30444
30156
  }
@@ -30471,7 +30183,7 @@ var init_session2 = __esm({
30471
30183
  this.options = options;
30472
30184
  this.logger = options.logger ?? new NoopLogger();
30473
30185
  }
30474
- prepareQuery(query, fields, name2, isResponseInArrayMode, customResultMapper) {
30186
+ prepareQuery(query, fields, name2, isResponseInArrayMode, customResultMapper, isOptimized) {
30475
30187
  return new NodePgPreparedQuery(
30476
30188
  this.client,
30477
30189
  query.sql,
@@ -30480,7 +30192,8 @@ var init_session2 = __esm({
30480
30192
  fields,
30481
30193
  name2,
30482
30194
  isResponseInArrayMode,
30483
- customResultMapper
30195
+ customResultMapper,
30196
+ isOptimized
30484
30197
  );
30485
30198
  }
30486
30199
  async transaction(transaction, config) {
@@ -30557,7 +30270,9 @@ function drizzle(client, config = {}) {
30557
30270
  }
30558
30271
  const driver2 = new NodePgDriver(client, dialect7, { logger: logger2 });
30559
30272
  const session = driver2.createSession(schema4);
30560
- return new NodePgDatabase(dialect7, session, schema4);
30273
+ const db2 = new NodePgDatabase(dialect7, session, schema4);
30274
+ db2.$client = client;
30275
+ return db2;
30561
30276
  }
30562
30277
  var import_pg2, types, _a162, NodePgDriver, _a163, _b117, NodePgDatabase;
30563
30278
  var init_driver = __esm({
@@ -31647,18 +31362,18 @@ var init_getAttrPathList = __esm({
31647
31362
  "../node_modules/.pnpm/@smithy+util-endpoints@2.0.0/node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js"() {
31648
31363
  "use strict";
31649
31364
  init_types2();
31650
- getAttrPathList = (path3) => {
31651
- const parts = path3.split(".");
31365
+ getAttrPathList = (path2) => {
31366
+ const parts = path2.split(".");
31652
31367
  const pathList = [];
31653
31368
  for (const part of parts) {
31654
31369
  const squareBracketIndex = part.indexOf("[");
31655
31370
  if (squareBracketIndex !== -1) {
31656
31371
  if (part.indexOf("]") !== part.length - 1) {
31657
- throw new EndpointError(`Path: '${path3}' does not end with ']'`);
31372
+ throw new EndpointError(`Path: '${path2}' does not end with ']'`);
31658
31373
  }
31659
31374
  const arrayIndex = part.slice(squareBracketIndex + 1, -1);
31660
31375
  if (Number.isNaN(parseInt(arrayIndex))) {
31661
- throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path3}'`);
31376
+ throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path2}'`);
31662
31377
  }
31663
31378
  if (squareBracketIndex !== 0) {
31664
31379
  pathList.push(part.slice(0, squareBracketIndex));
@@ -31680,9 +31395,9 @@ var init_getAttr = __esm({
31680
31395
  "use strict";
31681
31396
  init_types2();
31682
31397
  init_getAttrPathList();
31683
- getAttr = (value, path3) => getAttrPathList(path3).reduce((acc, index4) => {
31398
+ getAttr = (value, path2) => getAttrPathList(path2).reduce((acc, index4) => {
31684
31399
  if (typeof acc !== "object") {
31685
- throw new EndpointError(`Index '${index4}' in '${path3}' not found in '${JSON.stringify(value)}'`);
31400
+ throw new EndpointError(`Index '${index4}' in '${path2}' not found in '${JSON.stringify(value)}'`);
31686
31401
  } else if (Array.isArray(acc)) {
31687
31402
  return acc[parseInt(index4)];
31688
31403
  }
@@ -31727,8 +31442,8 @@ var init_parseURL = __esm({
31727
31442
  return value;
31728
31443
  }
31729
31444
  if (typeof value === "object" && "hostname" in value) {
31730
- const { hostname: hostname2, port, protocol: protocol3 = "", path: path3 = "", query = {} } = value;
31731
- const url = new URL(`${protocol3}//${hostname2}${port ? `:${port}` : ""}${path3}`);
31445
+ const { hostname: hostname2, port, protocol: protocol3 = "", path: path2 = "", query = {} } = value;
31446
+ const url = new URL(`${protocol3}//${hostname2}${port ? `:${port}` : ""}${path2}`);
31732
31447
  url.search = Object.entries(query).map(([k6, v8]) => `${k6}=${v8}`).join("&");
31733
31448
  return url;
31734
31449
  }
@@ -33184,8 +32899,8 @@ var init_createConfigValueProvider = __esm({
33184
32899
  return endpoint.url.href;
33185
32900
  }
33186
32901
  if ("hostname" in endpoint) {
33187
- const { protocol: protocol2, hostname, port, path: path3 } = endpoint;
33188
- return `${protocol2}//${hostname}${port ? ":" + port : ""}${path3}`;
32902
+ const { protocol: protocol2, hostname, port, path: path2 } = endpoint;
32903
+ return `${protocol2}//${hostname}${port ? ":" + port : ""}${path2}`;
33189
32904
  }
33190
32905
  }
33191
32906
  return endpoint;
@@ -33557,11 +33272,11 @@ var init_slurpFile = __esm({
33557
33272
  import_fs2 = require("fs");
33558
33273
  ({ readFile: readFile2 } = import_fs2.promises);
33559
33274
  filePromisesHash = {};
33560
- slurpFile = (path3, options) => {
33561
- if (!filePromisesHash[path3] || options?.ignoreCache) {
33562
- filePromisesHash[path3] = readFile2(path3, "utf8");
33275
+ slurpFile = (path2, options) => {
33276
+ if (!filePromisesHash[path2] || options?.ignoreCache) {
33277
+ filePromisesHash[path2] = readFile2(path2, "utf8");
33563
33278
  }
33564
- return filePromisesHash[path3];
33279
+ return filePromisesHash[path2];
33565
33280
  };
33566
33281
  }
33567
33282
  });
@@ -35625,18 +35340,18 @@ var init_node_http_handler = __esm({
35625
35340
  const password = request2.password ?? "";
35626
35341
  auth = `${username}:${password}`;
35627
35342
  }
35628
- let path3 = request2.path;
35343
+ let path2 = request2.path;
35629
35344
  if (queryString) {
35630
- path3 += `?${queryString}`;
35345
+ path2 += `?${queryString}`;
35631
35346
  }
35632
35347
  if (request2.fragment) {
35633
- path3 += `#${request2.fragment}`;
35348
+ path2 += `#${request2.fragment}`;
35634
35349
  }
35635
35350
  const nodeHttpsOptions = {
35636
35351
  headers: request2.headers,
35637
35352
  host: request2.hostname,
35638
35353
  method: request2.method,
35639
- path: path3,
35354
+ path: path2,
35640
35355
  port: request2.port,
35641
35356
  agent,
35642
35357
  auth
@@ -37637,8 +37352,8 @@ var init_requestBuilder = __esm({
37637
37352
  return this;
37638
37353
  }
37639
37354
  p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
37640
- this.resolvePathStack.push((path3) => {
37641
- this.path = resolvedPath(path3, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
37355
+ this.resolvePathStack.push((path2) => {
37356
+ this.path = resolvedPath(path2, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
37642
37357
  });
37643
37358
  return this;
37644
37359
  }
@@ -37693,9 +37408,9 @@ var init_createPaginator = __esm({
37693
37408
  makePagedClientRequest = async (CommandCtor, client, input, ...args) => {
37694
37409
  return await client.send(new CommandCtor(input), ...args);
37695
37410
  };
37696
- get = (fromObject, path3) => {
37411
+ get = (fromObject, path2) => {
37697
37412
  let cursor = fromObject;
37698
- const pathComponents = path3.split(".");
37413
+ const pathComponents = path2.split(".");
37699
37414
  for (const step of pathComponents) {
37700
37415
  if (!cursor || typeof cursor !== "object") {
37701
37416
  return void 0;
@@ -38852,10 +38567,10 @@ ${longDate}
38852
38567
  ${credentialScope}
38853
38568
  ${toHex(hashedRequest)}`;
38854
38569
  }
38855
- getCanonicalPath({ path: path3 }) {
38570
+ getCanonicalPath({ path: path2 }) {
38856
38571
  if (this.uriEscapePath) {
38857
38572
  const normalizedPathSegments = [];
38858
- for (const pathSegment of path3.split("/")) {
38573
+ for (const pathSegment of path2.split("/")) {
38859
38574
  if (pathSegment?.length === 0)
38860
38575
  continue;
38861
38576
  if (pathSegment === ".")
@@ -38866,11 +38581,11 @@ ${toHex(hashedRequest)}`;
38866
38581
  normalizedPathSegments.push(pathSegment);
38867
38582
  }
38868
38583
  }
38869
- const normalizedPath = `${path3?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path3?.endsWith("/") ? "/" : ""}`;
38584
+ const normalizedPath = `${path2?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path2?.endsWith("/") ? "/" : ""}`;
38870
38585
  const doubleEncoded = escapeUri(normalizedPath);
38871
38586
  return doubleEncoded.replace(/%2F/g, "/");
38872
38587
  }
38873
- return path3;
38588
+ return path2;
38874
38589
  }
38875
38590
  async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
38876
38591
  const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);
@@ -41909,7 +41624,7 @@ var init_constants7 = __esm({
41909
41624
  }
41910
41625
  });
41911
41626
 
41912
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js
41627
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js
41913
41628
  function createAwsAuthSigv4HttpAuthOption2(authParameters) {
41914
41629
  return {
41915
41630
  schemeId: "aws.auth#sigv4",
@@ -41932,7 +41647,7 @@ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
41932
41647
  }
41933
41648
  var import_core2, defaultSSOOIDCHttpAuthSchemeParametersProvider, defaultSSOOIDCHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig2;
41934
41649
  var init_httpAuthSchemeProvider2 = __esm({
41935
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js"() {
41650
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js"() {
41936
41651
  "use strict";
41937
41652
  import_core2 = __toESM(require_dist_cjs());
41938
41653
  init_dist_es10();
@@ -41974,10 +41689,10 @@ var init_httpAuthSchemeProvider2 = __esm({
41974
41689
  }
41975
41690
  });
41976
41691
 
41977
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js
41692
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js
41978
41693
  var resolveClientEndpointParameters2, commonParams2;
41979
41694
  var init_EndpointParameters2 = __esm({
41980
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js"() {
41695
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js"() {
41981
41696
  "use strict";
41982
41697
  resolveClientEndpointParameters2 = (options) => {
41983
41698
  return {
@@ -41996,10 +41711,10 @@ var init_EndpointParameters2 = __esm({
41996
41711
  }
41997
41712
  });
41998
41713
 
41999
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
41714
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
42000
41715
  var package_default2;
42001
41716
  var init_package2 = __esm({
42002
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"() {
41717
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"() {
42003
41718
  package_default2 = {
42004
41719
  name: "@aws-sdk/client-sso-oidc",
42005
41720
  description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
@@ -42252,10 +41967,10 @@ var init_dist_es42 = __esm({
42252
41967
  }
42253
41968
  });
42254
41969
 
42255
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js
41970
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js
42256
41971
  var u, v, w, x, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, _data, ruleSet;
42257
41972
  var init_ruleset = __esm({
42258
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js"() {
41973
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js"() {
42259
41974
  "use strict";
42260
41975
  u = "required";
42261
41976
  v = "fn";
@@ -42286,10 +42001,10 @@ var init_ruleset = __esm({
42286
42001
  }
42287
42002
  });
42288
42003
 
42289
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js
42004
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js
42290
42005
  var defaultEndpointResolver;
42291
42006
  var init_endpointResolver = __esm({
42292
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js"() {
42007
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js"() {
42293
42008
  "use strict";
42294
42009
  init_dist_es7();
42295
42010
  init_dist_es6();
@@ -42304,10 +42019,10 @@ var init_endpointResolver = __esm({
42304
42019
  }
42305
42020
  });
42306
42021
 
42307
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js
42022
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js
42308
42023
  var import_core3, getRuntimeConfig;
42309
42024
  var init_runtimeConfig_shared = __esm({
42310
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js"() {
42025
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js"() {
42311
42026
  "use strict";
42312
42027
  import_core3 = __toESM(require_dist_cjs());
42313
42028
  init_dist_es34();
@@ -42447,10 +42162,10 @@ var init_dist_es43 = __esm({
42447
42162
  }
42448
42163
  });
42449
42164
 
42450
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js
42165
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js
42451
42166
  var import_core5, getRuntimeConfig2;
42452
42167
  var init_runtimeConfig = __esm({
42453
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js"() {
42168
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js"() {
42454
42169
  "use strict";
42455
42170
  init_package2();
42456
42171
  import_core5 = __toESM(require_dist_cjs());
@@ -42579,10 +42294,10 @@ var init_dist_es44 = __esm({
42579
42294
  }
42580
42295
  });
42581
42296
 
42582
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js
42297
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js
42583
42298
  var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig;
42584
42299
  var init_httpAuthExtensionConfiguration = __esm({
42585
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js"() {
42300
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js"() {
42586
42301
  "use strict";
42587
42302
  getHttpAuthExtensionConfiguration = (runtimeConfig) => {
42588
42303
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
@@ -42624,10 +42339,10 @@ var init_httpAuthExtensionConfiguration = __esm({
42624
42339
  }
42625
42340
  });
42626
42341
 
42627
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js
42342
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js
42628
42343
  var asPartial, resolveRuntimeExtensions;
42629
42344
  var init_runtimeExtensions = __esm({
42630
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js"() {
42345
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js"() {
42631
42346
  "use strict";
42632
42347
  init_dist_es44();
42633
42348
  init_dist_es2();
@@ -42653,10 +42368,10 @@ var init_runtimeExtensions = __esm({
42653
42368
  }
42654
42369
  });
42655
42370
 
42656
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js
42371
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js
42657
42372
  var SSOOIDCClient;
42658
42373
  var init_SSOOIDCClient = __esm({
42659
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js"() {
42374
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js"() {
42660
42375
  "use strict";
42661
42376
  init_dist_es3();
42662
42377
  init_dist_es4();
@@ -42712,10 +42427,10 @@ var init_SSOOIDCClient = __esm({
42712
42427
  }
42713
42428
  });
42714
42429
 
42715
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js
42430
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js
42716
42431
  var SSOOIDCServiceException;
42717
42432
  var init_SSOOIDCServiceException = __esm({
42718
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js"() {
42433
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js"() {
42719
42434
  "use strict";
42720
42435
  init_dist_es32();
42721
42436
  SSOOIDCServiceException = class _SSOOIDCServiceException extends ServiceException {
@@ -42727,10 +42442,10 @@ var init_SSOOIDCServiceException = __esm({
42727
42442
  }
42728
42443
  });
42729
42444
 
42730
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js
42445
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js
42731
42446
  var AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidGrantException, InvalidRequestException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, InvalidRequestRegionException, InvalidClientMetadataException, InvalidRedirectUriException, CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog, CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog, RegisterClientResponseFilterSensitiveLog, StartDeviceAuthorizationRequestFilterSensitiveLog;
42732
42447
  var init_models_0 = __esm({
42733
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js"() {
42448
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js"() {
42734
42449
  "use strict";
42735
42450
  init_dist_es32();
42736
42451
  init_SSOOIDCServiceException();
@@ -42968,10 +42683,10 @@ var init_models_0 = __esm({
42968
42683
  }
42969
42684
  });
42970
42685
 
42971
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js
42686
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js
42972
42687
  var import_core7, se_CreateTokenCommand, se_CreateTokenWithIAMCommand, se_RegisterClientCommand, se_StartDeviceAuthorizationCommand, de_CreateTokenCommand, de_CreateTokenWithIAMCommand, de_RegisterClientCommand, de_StartDeviceAuthorizationCommand, de_CommandError, throwDefaultError2, de_AccessDeniedExceptionRes, de_AuthorizationPendingExceptionRes, de_ExpiredTokenExceptionRes, de_InternalServerExceptionRes, de_InvalidClientExceptionRes, de_InvalidClientMetadataExceptionRes, de_InvalidGrantExceptionRes, de_InvalidRedirectUriExceptionRes, de_InvalidRequestExceptionRes, de_InvalidRequestRegionExceptionRes, de_InvalidScopeExceptionRes, de_SlowDownExceptionRes, de_UnauthorizedClientExceptionRes, de_UnsupportedGrantTypeExceptionRes, deserializeMetadata2, _ai;
42973
42688
  var init_Aws_restJson1 = __esm({
42974
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js"() {
42689
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js"() {
42975
42690
  "use strict";
42976
42691
  import_core7 = __toESM(require_dist_cjs());
42977
42692
  init_dist_es34();
@@ -43402,10 +43117,10 @@ var init_Aws_restJson1 = __esm({
43402
43117
  }
43403
43118
  });
43404
43119
 
43405
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js
43120
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js
43406
43121
  var CreateTokenCommand;
43407
43122
  var init_CreateTokenCommand = __esm({
43408
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js"() {
43123
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js"() {
43409
43124
  "use strict";
43410
43125
  init_dist_es18();
43411
43126
  init_dist_es17();
@@ -43425,10 +43140,10 @@ var init_CreateTokenCommand = __esm({
43425
43140
  }
43426
43141
  });
43427
43142
 
43428
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js
43143
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js
43429
43144
  var CreateTokenWithIAMCommand;
43430
43145
  var init_CreateTokenWithIAMCommand = __esm({
43431
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js"() {
43146
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js"() {
43432
43147
  "use strict";
43433
43148
  init_dist_es18();
43434
43149
  init_dist_es17();
@@ -43448,10 +43163,10 @@ var init_CreateTokenWithIAMCommand = __esm({
43448
43163
  }
43449
43164
  });
43450
43165
 
43451
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js
43166
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js
43452
43167
  var RegisterClientCommand;
43453
43168
  var init_RegisterClientCommand = __esm({
43454
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js"() {
43169
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js"() {
43455
43170
  "use strict";
43456
43171
  init_dist_es18();
43457
43172
  init_dist_es17();
@@ -43471,10 +43186,10 @@ var init_RegisterClientCommand = __esm({
43471
43186
  }
43472
43187
  });
43473
43188
 
43474
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js
43189
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js
43475
43190
  var StartDeviceAuthorizationCommand;
43476
43191
  var init_StartDeviceAuthorizationCommand = __esm({
43477
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js"() {
43192
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js"() {
43478
43193
  "use strict";
43479
43194
  init_dist_es18();
43480
43195
  init_dist_es17();
@@ -43494,10 +43209,10 @@ var init_StartDeviceAuthorizationCommand = __esm({
43494
43209
  }
43495
43210
  });
43496
43211
 
43497
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js
43212
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js
43498
43213
  var commands, SSOOIDC;
43499
43214
  var init_SSOOIDC = __esm({
43500
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js"() {
43215
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js"() {
43501
43216
  "use strict";
43502
43217
  init_dist_es32();
43503
43218
  init_CreateTokenCommand();
@@ -43517,9 +43232,9 @@ var init_SSOOIDC = __esm({
43517
43232
  }
43518
43233
  });
43519
43234
 
43520
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js
43235
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js
43521
43236
  var init_commands = __esm({
43522
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js"() {
43237
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js"() {
43523
43238
  "use strict";
43524
43239
  init_CreateTokenCommand();
43525
43240
  init_CreateTokenWithIAMCommand();
@@ -43528,15 +43243,15 @@ var init_commands = __esm({
43528
43243
  }
43529
43244
  });
43530
43245
 
43531
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js
43246
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js
43532
43247
  var init_models = __esm({
43533
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js"() {
43248
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js"() {
43534
43249
  "use strict";
43535
43250
  init_models_0();
43536
43251
  }
43537
43252
  });
43538
43253
 
43539
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js
43254
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js
43540
43255
  var dist_es_exports8 = {};
43541
43256
  __export(dist_es_exports8, {
43542
43257
  $Command: () => Command,
@@ -43570,7 +43285,7 @@ __export(dist_es_exports8, {
43570
43285
  __Client: () => Client
43571
43286
  });
43572
43287
  var init_dist_es45 = __esm({
43573
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js"() {
43288
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js"() {
43574
43289
  "use strict";
43575
43290
  init_SSOOIDCClient();
43576
43291
  init_SSOOIDC();
@@ -44945,7 +44660,7 @@ var init_resolveCredentialSource = __esm({
44945
44660
  }
44946
44661
  });
44947
44662
 
44948
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js
44663
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js
44949
44664
  function createAwsAuthSigv4HttpAuthOption4(authParameters) {
44950
44665
  return {
44951
44666
  schemeId: "aws.auth#sigv4",
@@ -44968,7 +44683,7 @@ function createSmithyApiNoAuthHttpAuthOption3(authParameters) {
44968
44683
  }
44969
44684
  var import_core18, defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeProvider, resolveStsAuthConfig, resolveHttpAuthSchemeConfig4;
44970
44685
  var init_httpAuthSchemeProvider4 = __esm({
44971
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js"() {
44686
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js"() {
44972
44687
  "use strict";
44973
44688
  import_core18 = __toESM(require_dist_cjs());
44974
44689
  init_dist_es10();
@@ -45012,10 +44727,10 @@ var init_httpAuthSchemeProvider4 = __esm({
45012
44727
  }
45013
44728
  });
45014
44729
 
45015
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js
44730
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js
45016
44731
  var resolveClientEndpointParameters4, commonParams4;
45017
44732
  var init_EndpointParameters4 = __esm({
45018
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js"() {
44733
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js"() {
45019
44734
  "use strict";
45020
44735
  resolveClientEndpointParameters4 = (options) => {
45021
44736
  return {
@@ -45036,10 +44751,10 @@ var init_EndpointParameters4 = __esm({
45036
44751
  }
45037
44752
  });
45038
44753
 
45039
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json
44754
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/package.json
45040
44755
  var package_default4;
45041
44756
  var init_package4 = __esm({
45042
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json"() {
44757
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/package.json"() {
45043
44758
  package_default4 = {
45044
44759
  name: "@aws-sdk/client-sts",
45045
44760
  description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
@@ -45145,10 +44860,10 @@ var init_package4 = __esm({
45145
44860
  }
45146
44861
  });
45147
44862
 
45148
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js
44863
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js
45149
44864
  var F, G, H, I, J, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3, q3, r3, s3, t3, u3, v3, w3, x3, y, z, A, B, C, D, E, _data3, ruleSet3;
45150
44865
  var init_ruleset3 = __esm({
45151
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js"() {
44866
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js"() {
45152
44867
  "use strict";
45153
44868
  F = "required";
45154
44869
  G = "type";
@@ -45191,10 +44906,10 @@ var init_ruleset3 = __esm({
45191
44906
  }
45192
44907
  });
45193
44908
 
45194
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js
44909
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js
45195
44910
  var defaultEndpointResolver3;
45196
44911
  var init_endpointResolver3 = __esm({
45197
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js"() {
44912
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js"() {
45198
44913
  "use strict";
45199
44914
  init_dist_es7();
45200
44915
  init_dist_es6();
@@ -45209,10 +44924,10 @@ var init_endpointResolver3 = __esm({
45209
44924
  }
45210
44925
  });
45211
44926
 
45212
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js
44927
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js
45213
44928
  var import_core19, getRuntimeConfig5;
45214
44929
  var init_runtimeConfig_shared3 = __esm({
45215
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js"() {
44930
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js"() {
45216
44931
  "use strict";
45217
44932
  import_core19 = __toESM(require_dist_cjs());
45218
44933
  init_dist_es34();
@@ -45253,10 +44968,10 @@ var init_runtimeConfig_shared3 = __esm({
45253
44968
  }
45254
44969
  });
45255
44970
 
45256
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js
44971
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js
45257
44972
  var import_core21, getRuntimeConfig6;
45258
44973
  var init_runtimeConfig3 = __esm({
45259
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js"() {
44974
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js"() {
45260
44975
  "use strict";
45261
44976
  init_package4();
45262
44977
  import_core21 = __toESM(require_dist_cjs());
@@ -45316,10 +45031,10 @@ var init_runtimeConfig3 = __esm({
45316
45031
  }
45317
45032
  });
45318
45033
 
45319
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js
45034
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js
45320
45035
  var getHttpAuthExtensionConfiguration3, resolveHttpAuthRuntimeConfig3;
45321
45036
  var init_httpAuthExtensionConfiguration3 = __esm({
45322
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js"() {
45037
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js"() {
45323
45038
  "use strict";
45324
45039
  getHttpAuthExtensionConfiguration3 = (runtimeConfig) => {
45325
45040
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
@@ -45361,10 +45076,10 @@ var init_httpAuthExtensionConfiguration3 = __esm({
45361
45076
  }
45362
45077
  });
45363
45078
 
45364
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js
45079
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js
45365
45080
  var asPartial3, resolveRuntimeExtensions3;
45366
45081
  var init_runtimeExtensions3 = __esm({
45367
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js"() {
45082
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js"() {
45368
45083
  "use strict";
45369
45084
  init_dist_es44();
45370
45085
  init_dist_es2();
@@ -45390,10 +45105,10 @@ var init_runtimeExtensions3 = __esm({
45390
45105
  }
45391
45106
  });
45392
45107
 
45393
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js
45108
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js
45394
45109
  var STSClient;
45395
45110
  var init_STSClient = __esm({
45396
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js"() {
45111
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js"() {
45397
45112
  "use strict";
45398
45113
  init_dist_es3();
45399
45114
  init_dist_es4();
@@ -45449,10 +45164,10 @@ var init_STSClient = __esm({
45449
45164
  }
45450
45165
  });
45451
45166
 
45452
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js
45167
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js
45453
45168
  var STSServiceException;
45454
45169
  var init_STSServiceException = __esm({
45455
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js"() {
45170
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js"() {
45456
45171
  "use strict";
45457
45172
  init_dist_es32();
45458
45173
  STSServiceException = class _STSServiceException extends ServiceException {
@@ -45464,10 +45179,10 @@ var init_STSServiceException = __esm({
45464
45179
  }
45465
45180
  });
45466
45181
 
45467
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js
45182
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js
45468
45183
  var ExpiredTokenException2, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, IDPRejectedClaimException, InvalidIdentityTokenException, IDPCommunicationErrorException, InvalidAuthorizationMessageException, CredentialsFilterSensitiveLog, AssumeRoleResponseFilterSensitiveLog, AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog, AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog, GetFederationTokenResponseFilterSensitiveLog, GetSessionTokenResponseFilterSensitiveLog;
45469
45184
  var init_models_03 = __esm({
45470
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js"() {
45185
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js"() {
45471
45186
  "use strict";
45472
45187
  init_dist_es32();
45473
45188
  init_STSServiceException();
@@ -45602,10 +45317,10 @@ var init_models_03 = __esm({
45602
45317
  }
45603
45318
  });
45604
45319
 
45605
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js
45320
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js
45606
45321
  var import_core24, se_AssumeRoleCommand, se_AssumeRoleWithSAMLCommand, se_AssumeRoleWithWebIdentityCommand, se_DecodeAuthorizationMessageCommand, se_GetAccessKeyInfoCommand, se_GetCallerIdentityCommand, se_GetFederationTokenCommand, se_GetSessionTokenCommand, de_AssumeRoleCommand, de_AssumeRoleWithSAMLCommand, de_AssumeRoleWithWebIdentityCommand, de_DecodeAuthorizationMessageCommand, de_GetAccessKeyInfoCommand, de_GetCallerIdentityCommand, de_GetFederationTokenCommand, de_GetSessionTokenCommand, de_CommandError3, de_ExpiredTokenExceptionRes2, de_IDPCommunicationErrorExceptionRes, de_IDPRejectedClaimExceptionRes, de_InvalidAuthorizationMessageExceptionRes, de_InvalidIdentityTokenExceptionRes, de_MalformedPolicyDocumentExceptionRes, de_PackedPolicyTooLargeExceptionRes, de_RegionDisabledExceptionRes, se_AssumeRoleRequest, se_AssumeRoleWithSAMLRequest, se_AssumeRoleWithWebIdentityRequest, se_DecodeAuthorizationMessageRequest, se_GetAccessKeyInfoRequest, se_GetCallerIdentityRequest, se_GetFederationTokenRequest, se_GetSessionTokenRequest, se_policyDescriptorListType, se_PolicyDescriptorType, se_ProvidedContext, se_ProvidedContextsListType, se_Tag, se_tagKeyListType, se_tagListType, de_AssumedRoleUser, de_AssumeRoleResponse, de_AssumeRoleWithSAMLResponse, de_AssumeRoleWithWebIdentityResponse, de_Credentials, de_DecodeAuthorizationMessageResponse, de_ExpiredTokenException, de_FederatedUser, de_GetAccessKeyInfoResponse, de_GetCallerIdentityResponse, de_GetFederationTokenResponse, de_GetSessionTokenResponse, de_IDPCommunicationErrorException, de_IDPRejectedClaimException, de_InvalidAuthorizationMessageException, de_InvalidIdentityTokenException, de_MalformedPolicyDocumentException, de_PackedPolicyTooLargeException, de_RegionDisabledException, deserializeMetadata4, throwDefaultError4, buildHttpRpcRequest, SHARED_HEADERS, _, _A, _AKI, _AR, _ARI, _ARU, _ARWSAML, _ARWWI, _Ac, _Ar, _Au, _C, _CA, _DAM, _DM, _DS, _E, _EI, _EM, _FU, _FUI, _GAKI, _GCI, _GFT, _GST, _I, _K, _N, _NQ, _P, _PA, _PAr, _PAro, _PC, _PI, _PPS, _Pr, _RA, _RSN, _S, _SAK, _SAMLA, _SFWIT, _SI, _SN, _ST, _STe, _T, _TC, _TTK, _UI, _V, _Va, _WIT, _a164, _m, buildFormUrlencodedString, loadQueryErrorCode;
45607
45322
  var init_Aws_query = __esm({
45608
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js"() {
45323
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js"() {
45609
45324
  "use strict";
45610
45325
  import_core24 = __toESM(require_dist_cjs());
45611
45326
  init_dist_es2();
@@ -46403,14 +46118,14 @@ var init_Aws_query = __esm({
46403
46118
  cfId: output.headers["x-amz-cf-id"]
46404
46119
  });
46405
46120
  throwDefaultError4 = withBaseException(STSServiceException);
46406
- buildHttpRpcRequest = async (context, headers, path3, resolvedHostname, body) => {
46121
+ buildHttpRpcRequest = async (context, headers, path2, resolvedHostname, body) => {
46407
46122
  const { hostname, protocol: protocol2 = "https", port, path: basePath } = await context.endpoint();
46408
46123
  const contents = {
46409
46124
  protocol: protocol2,
46410
46125
  hostname,
46411
46126
  port,
46412
46127
  method: "POST",
46413
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path3 : basePath + path3,
46128
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path2 : basePath + path2,
46414
46129
  headers
46415
46130
  };
46416
46131
  if (resolvedHostname !== void 0) {
@@ -46492,10 +46207,10 @@ var init_Aws_query = __esm({
46492
46207
  }
46493
46208
  });
46494
46209
 
46495
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js
46210
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js
46496
46211
  var AssumeRoleCommand;
46497
46212
  var init_AssumeRoleCommand = __esm({
46498
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js"() {
46213
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js"() {
46499
46214
  "use strict";
46500
46215
  init_dist_es18();
46501
46216
  init_dist_es17();
@@ -46515,10 +46230,10 @@ var init_AssumeRoleCommand = __esm({
46515
46230
  }
46516
46231
  });
46517
46232
 
46518
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js
46233
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js
46519
46234
  var AssumeRoleWithSAMLCommand;
46520
46235
  var init_AssumeRoleWithSAMLCommand = __esm({
46521
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js"() {
46236
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js"() {
46522
46237
  "use strict";
46523
46238
  init_dist_es18();
46524
46239
  init_dist_es17();
@@ -46538,10 +46253,10 @@ var init_AssumeRoleWithSAMLCommand = __esm({
46538
46253
  }
46539
46254
  });
46540
46255
 
46541
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js
46256
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js
46542
46257
  var AssumeRoleWithWebIdentityCommand;
46543
46258
  var init_AssumeRoleWithWebIdentityCommand = __esm({
46544
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js"() {
46259
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js"() {
46545
46260
  "use strict";
46546
46261
  init_dist_es18();
46547
46262
  init_dist_es17();
@@ -46561,10 +46276,10 @@ var init_AssumeRoleWithWebIdentityCommand = __esm({
46561
46276
  }
46562
46277
  });
46563
46278
 
46564
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js
46279
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js
46565
46280
  var DecodeAuthorizationMessageCommand;
46566
46281
  var init_DecodeAuthorizationMessageCommand = __esm({
46567
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js"() {
46282
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js"() {
46568
46283
  "use strict";
46569
46284
  init_dist_es18();
46570
46285
  init_dist_es17();
@@ -46583,10 +46298,10 @@ var init_DecodeAuthorizationMessageCommand = __esm({
46583
46298
  }
46584
46299
  });
46585
46300
 
46586
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js
46301
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js
46587
46302
  var GetAccessKeyInfoCommand;
46588
46303
  var init_GetAccessKeyInfoCommand = __esm({
46589
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js"() {
46304
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js"() {
46590
46305
  "use strict";
46591
46306
  init_dist_es18();
46592
46307
  init_dist_es17();
@@ -46605,10 +46320,10 @@ var init_GetAccessKeyInfoCommand = __esm({
46605
46320
  }
46606
46321
  });
46607
46322
 
46608
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js
46323
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js
46609
46324
  var GetCallerIdentityCommand;
46610
46325
  var init_GetCallerIdentityCommand = __esm({
46611
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js"() {
46326
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js"() {
46612
46327
  "use strict";
46613
46328
  init_dist_es18();
46614
46329
  init_dist_es17();
@@ -46627,10 +46342,10 @@ var init_GetCallerIdentityCommand = __esm({
46627
46342
  }
46628
46343
  });
46629
46344
 
46630
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js
46345
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js
46631
46346
  var GetFederationTokenCommand;
46632
46347
  var init_GetFederationTokenCommand = __esm({
46633
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js"() {
46348
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js"() {
46634
46349
  "use strict";
46635
46350
  init_dist_es18();
46636
46351
  init_dist_es17();
@@ -46650,10 +46365,10 @@ var init_GetFederationTokenCommand = __esm({
46650
46365
  }
46651
46366
  });
46652
46367
 
46653
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js
46368
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js
46654
46369
  var GetSessionTokenCommand;
46655
46370
  var init_GetSessionTokenCommand = __esm({
46656
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js"() {
46371
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js"() {
46657
46372
  "use strict";
46658
46373
  init_dist_es18();
46659
46374
  init_dist_es17();
@@ -46673,10 +46388,10 @@ var init_GetSessionTokenCommand = __esm({
46673
46388
  }
46674
46389
  });
46675
46390
 
46676
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STS.js
46391
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STS.js
46677
46392
  var commands3, STS;
46678
46393
  var init_STS = __esm({
46679
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STS.js"() {
46394
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STS.js"() {
46680
46395
  "use strict";
46681
46396
  init_dist_es32();
46682
46397
  init_AssumeRoleCommand();
@@ -46704,9 +46419,9 @@ var init_STS = __esm({
46704
46419
  }
46705
46420
  });
46706
46421
 
46707
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js
46422
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js
46708
46423
  var init_commands3 = __esm({
46709
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js"() {
46424
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js"() {
46710
46425
  "use strict";
46711
46426
  init_AssumeRoleCommand();
46712
46427
  init_AssumeRoleWithSAMLCommand();
@@ -46719,18 +46434,18 @@ var init_commands3 = __esm({
46719
46434
  }
46720
46435
  });
46721
46436
 
46722
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/index.js
46437
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/index.js
46723
46438
  var init_models3 = __esm({
46724
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/index.js"() {
46439
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/index.js"() {
46725
46440
  "use strict";
46726
46441
  init_models_03();
46727
46442
  }
46728
46443
  });
46729
46444
 
46730
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js
46445
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js
46731
46446
  var ASSUME_ROLE_DEFAULT_REGION, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity;
46732
46447
  var init_defaultStsRoleAssumers = __esm({
46733
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js"() {
46448
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js"() {
46734
46449
  "use strict";
46735
46450
  init_AssumeRoleCommand();
46736
46451
  init_AssumeRoleWithWebIdentityCommand();
@@ -46797,10 +46512,10 @@ var init_defaultStsRoleAssumers = __esm({
46797
46512
  }
46798
46513
  });
46799
46514
 
46800
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js
46515
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js
46801
46516
  var getCustomizableStsClientCtor, getDefaultRoleAssumer2, getDefaultRoleAssumerWithWebIdentity2, decorateDefaultCredentialProvider;
46802
46517
  var init_defaultRoleAssumers = __esm({
46803
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js"() {
46518
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js"() {
46804
46519
  "use strict";
46805
46520
  init_defaultStsRoleAssumers();
46806
46521
  init_STSClient();
@@ -46827,7 +46542,7 @@ var init_defaultRoleAssumers = __esm({
46827
46542
  }
46828
46543
  });
46829
46544
 
46830
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/index.js
46545
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/index.js
46831
46546
  var dist_es_exports10 = {};
46832
46547
  __export(dist_es_exports10, {
46833
46548
  $Command: () => Command,
@@ -46864,7 +46579,7 @@ __export(dist_es_exports10, {
46864
46579
  getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2
46865
46580
  });
46866
46581
  var init_dist_es49 = __esm({
46867
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/index.js"() {
46582
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/index.js"() {
46868
46583
  "use strict";
46869
46584
  init_STSClient();
46870
46585
  init_STS();
@@ -48957,6 +48672,7 @@ var init_session3 = __esm({
48957
48672
  database: options.database
48958
48673
  };
48959
48674
  }
48675
+ // @ts-ignore
48960
48676
  prepareQuery(query, fields, name2, isResponseInArrayMode, customResultMapper, transactionId) {
48961
48677
  return new AwsDataApiPreparedQuery(
48962
48678
  this.client,
@@ -48977,6 +48693,8 @@ var init_session3 = __esm({
48977
48693
  void 0,
48978
48694
  false,
48979
48695
  void 0,
48696
+ void 0,
48697
+ // @ts-ignore
48980
48698
  this.transactionId
48981
48699
  ).execute();
48982
48700
  }
@@ -49046,7 +48764,9 @@ function drizzle2(client, config) {
49046
48764
  };
49047
48765
  }
49048
48766
  const session = new AwsDataApiSession(client, dialect7, schema4, { ...config, logger: logger2 }, void 0);
49049
- return new PgDatabase(dialect7, session, schema4);
48767
+ const db2 = new AwsDataApiPgDatabase(dialect7, session, schema4);
48768
+ db2.$client = client;
48769
+ return db2;
49050
48770
  }
49051
48771
  var _a168, _b121, AwsDataApiPgDatabase, _a169, _b122, AwsPgDialect;
49052
48772
  var init_driver2 = __esm({
@@ -49169,20 +48889,20 @@ var require_file_uri_to_path = __commonJS({
49169
48889
  var rest = decodeURI(uri.substring(7));
49170
48890
  var firstSlash = rest.indexOf("/");
49171
48891
  var host = rest.substring(0, firstSlash);
49172
- var path3 = rest.substring(firstSlash + 1);
48892
+ var path2 = rest.substring(firstSlash + 1);
49173
48893
  if ("localhost" == host) host = "";
49174
48894
  if (host) {
49175
48895
  host = sep3 + sep3 + host;
49176
48896
  }
49177
- path3 = path3.replace(/^(.+)\|/, "$1:");
48897
+ path2 = path2.replace(/^(.+)\|/, "$1:");
49178
48898
  if (sep3 == "\\") {
49179
- path3 = path3.replace(/\//g, "\\");
48899
+ path2 = path2.replace(/\//g, "\\");
49180
48900
  }
49181
- if (/^.+\:/.test(path3)) {
48901
+ if (/^.+\:/.test(path2)) {
49182
48902
  } else {
49183
- path3 = sep3 + path3;
48903
+ path2 = sep3 + path2;
49184
48904
  }
49185
- return host + path3;
48905
+ return host + path2;
49186
48906
  }
49187
48907
  }
49188
48908
  });
@@ -49192,18 +48912,18 @@ var require_bindings = __commonJS({
49192
48912
  "../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js"(exports2, module2) {
49193
48913
  "use strict";
49194
48914
  var fs5 = require("fs");
49195
- var path3 = require("path");
48915
+ var path2 = require("path");
49196
48916
  var fileURLToPath = require_file_uri_to_path();
49197
- var join4 = path3.join;
49198
- var dirname = path3.dirname;
49199
- var exists2 = fs5.accessSync && function(path4) {
48917
+ var join4 = path2.join;
48918
+ var dirname = path2.dirname;
48919
+ var exists2 = fs5.accessSync && function(path3) {
49200
48920
  try {
49201
- fs5.accessSync(path4);
48921
+ fs5.accessSync(path3);
49202
48922
  } catch (e5) {
49203
48923
  return false;
49204
48924
  }
49205
48925
  return true;
49206
- } || fs5.existsSync || path3.existsSync;
48926
+ } || fs5.existsSync || path2.existsSync;
49207
48927
  var defaults2 = {
49208
48928
  arrow: process.env.NODE_BINDINGS_ARROW || " \u2192 ",
49209
48929
  compiled: process.env.NODE_BINDINGS_COMPILED_DIR || "compiled",
@@ -49248,7 +48968,7 @@ var require_bindings = __commonJS({
49248
48968
  if (!opts.module_root) {
49249
48969
  opts.module_root = exports2.getRoot(exports2.getFileName());
49250
48970
  }
49251
- if (path3.extname(opts.bindings) != ".node") {
48971
+ if (path2.extname(opts.bindings) != ".node") {
49252
48972
  opts.bindings += ".node";
49253
48973
  }
49254
48974
  var requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
@@ -49484,7 +49204,7 @@ var require_backup = __commonJS({
49484
49204
  "../node_modules/.pnpm/better-sqlite3@8.7.0/node_modules/better-sqlite3/lib/methods/backup.js"(exports2, module2) {
49485
49205
  "use strict";
49486
49206
  var fs5 = require("fs");
49487
- var path3 = require("path");
49207
+ var path2 = require("path");
49488
49208
  var { promisify: promisify2 } = require("util");
49489
49209
  var { cppdb } = require_util3();
49490
49210
  var fsAccess = promisify2(fs5.access);
@@ -49500,7 +49220,7 @@ var require_backup = __commonJS({
49500
49220
  if (typeof attachedName !== "string") throw new TypeError('Expected the "attached" option to be a string');
49501
49221
  if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
49502
49222
  if (handler != null && typeof handler !== "function") throw new TypeError('Expected the "progress" option to be a function');
49503
- await fsAccess(path3.dirname(filename)).catch(() => {
49223
+ await fsAccess(path2.dirname(filename)).catch(() => {
49504
49224
  throw new TypeError("Cannot save backup because the directory does not exist");
49505
49225
  });
49506
49226
  const isNewFile = await fsAccess(filename).then(() => false, () => true);
@@ -49806,7 +49526,7 @@ var require_database = __commonJS({
49806
49526
  "../node_modules/.pnpm/better-sqlite3@8.7.0/node_modules/better-sqlite3/lib/database.js"(exports2, module2) {
49807
49527
  "use strict";
49808
49528
  var fs5 = require("fs");
49809
- var path3 = require("path");
49529
+ var path2 = require("path");
49810
49530
  var util2 = require_util3();
49811
49531
  var SqliteError = require_sqlite_error();
49812
49532
  var DEFAULT_ADDON;
@@ -49842,7 +49562,7 @@ var require_database = __commonJS({
49842
49562
  addon = DEFAULT_ADDON || (DEFAULT_ADDON = require_bindings()("better_sqlite3.node"));
49843
49563
  } else if (typeof nativeBinding === "string") {
49844
49564
  const requireFunc = typeof __non_webpack_require__ === "function" ? __non_webpack_require__ : require;
49845
- addon = requireFunc(path3.resolve(nativeBinding).replace(/(\.node)?$/, ".node"));
49565
+ addon = requireFunc(path2.resolve(nativeBinding).replace(/(\.node)?$/, ".node"));
49846
49566
  } else {
49847
49567
  addon = nativeBinding;
49848
49568
  }
@@ -49850,7 +49570,7 @@ var require_database = __commonJS({
49850
49570
  addon.setErrorConstructor(SqliteError);
49851
49571
  addon.isInitialized = true;
49852
49572
  }
49853
- if (!anonymous && !fs5.existsSync(path3.dirname(filename))) {
49573
+ if (!anonymous && !fs5.existsSync(path2.dirname(filename))) {
49854
49574
  throw new TypeError("Cannot open database because the directory does not exist");
49855
49575
  }
49856
49576
  Object.defineProperties(this, {
@@ -52454,6 +52174,7 @@ var init_db2 = __esm({
52454
52174
  "use strict";
52455
52175
  init_entity();
52456
52176
  init_selection_proxy();
52177
+ init_sql();
52457
52178
  init_query_builders2();
52458
52179
  init_subquery();
52459
52180
  init_count2();
@@ -52685,56 +52406,56 @@ var init_db2 = __esm({
52685
52406
  return new SQLiteDeleteBase(from, this.session, this.dialect);
52686
52407
  }
52687
52408
  run(query) {
52688
- const sql3 = query.getSQL();
52409
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
52689
52410
  if (this.resultKind === "async") {
52690
52411
  return new SQLiteRaw(
52691
- async () => this.session.run(sql3),
52692
- () => sql3,
52412
+ async () => this.session.run(sequel),
52413
+ () => sequel,
52693
52414
  "run",
52694
52415
  this.dialect,
52695
52416
  this.session.extractRawRunValueFromBatchResult.bind(this.session)
52696
52417
  );
52697
52418
  }
52698
- return this.session.run(sql3);
52419
+ return this.session.run(sequel);
52699
52420
  }
52700
52421
  all(query) {
52701
- const sql3 = query.getSQL();
52422
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
52702
52423
  if (this.resultKind === "async") {
52703
52424
  return new SQLiteRaw(
52704
- async () => this.session.all(sql3),
52705
- () => sql3,
52425
+ async () => this.session.all(sequel),
52426
+ () => sequel,
52706
52427
  "all",
52707
52428
  this.dialect,
52708
52429
  this.session.extractRawAllValueFromBatchResult.bind(this.session)
52709
52430
  );
52710
52431
  }
52711
- return this.session.all(sql3);
52432
+ return this.session.all(sequel);
52712
52433
  }
52713
52434
  get(query) {
52714
- const sql3 = query.getSQL();
52435
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
52715
52436
  if (this.resultKind === "async") {
52716
52437
  return new SQLiteRaw(
52717
- async () => this.session.get(sql3),
52718
- () => sql3,
52438
+ async () => this.session.get(sequel),
52439
+ () => sequel,
52719
52440
  "get",
52720
52441
  this.dialect,
52721
52442
  this.session.extractRawGetValueFromBatchResult.bind(this.session)
52722
52443
  );
52723
52444
  }
52724
- return this.session.get(sql3);
52445
+ return this.session.get(sequel);
52725
52446
  }
52726
52447
  values(query) {
52727
- const sql3 = query.getSQL();
52448
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
52728
52449
  if (this.resultKind === "async") {
52729
52450
  return new SQLiteRaw(
52730
- async () => this.session.values(sql3),
52731
- () => sql3,
52451
+ async () => this.session.values(sequel),
52452
+ () => sequel,
52732
52453
  "values",
52733
52454
  this.dialect,
52734
52455
  this.session.extractRawValuesValueFromBatchResult.bind(this.session)
52735
52456
  );
52736
52457
  }
52737
- return this.session.values(sql3);
52458
+ return this.session.values(sequel);
52738
52459
  }
52739
52460
  transaction(transaction, config) {
52740
52461
  return this.session.transaction(transaction, config);
@@ -53328,7 +53049,9 @@ function drizzle3(client, config = {}) {
53328
53049
  };
53329
53050
  }
53330
53051
  const session = new BetterSQLiteSession(client, dialect7, schema4, { logger: logger2 });
53331
- return new BetterSQLite3Database("sync", dialect7, session, schema4);
53052
+ const db2 = new BetterSQLite3Database("sync", dialect7, session, schema4);
53053
+ db2.$client = client;
53054
+ return db2;
53332
53055
  }
53333
53056
  var _a239, _b170, BetterSQLite3Database;
53334
53057
  var init_driver3 = __esm({
@@ -53504,7 +53227,9 @@ function drizzle4(client, config = {}) {
53504
53227
  };
53505
53228
  }
53506
53229
  const session = new SQLiteBunSession(client, dialect7, schema4, { logger: logger2 });
53507
- return new BunSQLiteDatabase("sync", dialect7, session, schema4);
53230
+ const db2 = new BunSQLiteDatabase("sync", dialect7, session, schema4);
53231
+ db2.$client = client;
53232
+ return db2;
53508
53233
  }
53509
53234
  var _a243, _b174, BunSQLiteDatabase;
53510
53235
  var init_driver4 = __esm({
@@ -53744,7 +53469,9 @@ function drizzle5(client, config = {}) {
53744
53469
  };
53745
53470
  }
53746
53471
  const session = new SQLiteD1Session(client, dialect7, schema4, { logger: logger2 });
53747
- return new DrizzleD1Database("async", dialect7, session, schema4);
53472
+ const db2 = new DrizzleD1Database("async", dialect7, session, schema4);
53473
+ db2.$client = client;
53474
+ return db2;
53748
53475
  }
53749
53476
  var _a247, _b178, DrizzleD1Database;
53750
53477
  var init_driver5 = __esm({
@@ -53814,10 +53541,10 @@ function parseUri(text) {
53814
53541
  const groups = match2.groups;
53815
53542
  const scheme = groups["scheme"];
53816
53543
  const authority = groups["authority"] !== void 0 ? parseAuthority(groups["authority"]) : void 0;
53817
- const path3 = percentDecode(groups["path"]);
53544
+ const path2 = percentDecode(groups["path"]);
53818
53545
  const query = groups["query"] !== void 0 ? parseQuery(groups["query"]) : void 0;
53819
53546
  const fragment2 = groups["fragment"] !== void 0 ? percentDecode(groups["fragment"]) : void 0;
53820
- return { scheme, authority, path: path3, query, fragment: fragment2 };
53547
+ return { scheme, authority, path: path2, query, fragment: fragment2 };
53821
53548
  }
53822
53549
  function parseAuthority(text) {
53823
53550
  const match2 = AUTHORITY_RE.exec(text);
@@ -53867,7 +53594,7 @@ function percentDecode(text) {
53867
53594
  throw e5;
53868
53595
  }
53869
53596
  }
53870
- function encodeBaseUrl(scheme, authority, path3) {
53597
+ function encodeBaseUrl(scheme, authority, path2) {
53871
53598
  if (authority === void 0) {
53872
53599
  throw new LibsqlError(`URL with scheme ${JSON.stringify(scheme + ":")} requires authority (the "//" part)`, "URL_INVALID");
53873
53600
  }
@@ -53876,7 +53603,7 @@ function encodeBaseUrl(scheme, authority, path3) {
53876
53603
  const portText = encodePort(authority.port);
53877
53604
  const userinfoText = encodeUserinfo(authority.userinfo);
53878
53605
  const authorityText = `//${userinfoText}${hostText}${portText}`;
53879
- let pathText = path3.split("/").map(encodeURIComponent).join("/");
53606
+ let pathText = path2.split("/").map(encodeURIComponent).join("/");
53880
53607
  if (pathText !== "" && !pathText.startsWith("/")) {
53881
53608
  pathText = "/" + pathText;
53882
53609
  }
@@ -54182,7 +53909,7 @@ function expandConfig(config, preferHttp) {
54182
53909
  }
54183
53910
  }
54184
53911
  const connectionQueryParamsString = connectionQueryParams.length === 0 ? "" : `?${connectionQueryParams.join("&")}`;
54185
- const path3 = uri.path + connectionQueryParamsString;
53912
+ const path2 = uri.path + connectionQueryParamsString;
54186
53913
  let scheme;
54187
53914
  if (originalUriScheme === "libsql") {
54188
53915
  if (tls2 === false) {
@@ -54214,7 +53941,7 @@ function expandConfig(config, preferHttp) {
54214
53941
  return {
54215
53942
  scheme: "file",
54216
53943
  tls: false,
54217
- path: path3,
53944
+ path: path2,
54218
53945
  intMode,
54219
53946
  concurrency,
54220
53947
  syncUrl: config.syncUrl,
@@ -54229,7 +53956,7 @@ function expandConfig(config, preferHttp) {
54229
53956
  scheme,
54230
53957
  tls: tls2,
54231
53958
  authority: uri.authority,
54232
- path: path3,
53959
+ path: path2,
54233
53960
  authToken,
54234
53961
  intMode,
54235
53962
  concurrency,
@@ -54283,7 +54010,7 @@ var require_dist2 = __commonJS({
54283
54010
  };
54284
54011
  Object.defineProperty(exports2, "__esModule", { value: true });
54285
54012
  exports2.load = exports2.currentTarget = void 0;
54286
- var path3 = __importStar2(require("path"));
54013
+ var path2 = __importStar2(require("path"));
54287
54014
  var fs5 = __importStar2(require("fs"));
54288
54015
  function currentTarget() {
54289
54016
  let os3 = null;
@@ -54349,7 +54076,7 @@ var require_dist2 = __commonJS({
54349
54076
  return typeof header === "object" && !!header && "glibcVersionRuntime" in header;
54350
54077
  }
54351
54078
  function load(dirname) {
54352
- const m7 = path3.join(dirname, "index.node");
54079
+ const m7 = path2.join(dirname, "index.node");
54353
54080
  return fs5.existsSync(m7) ? require(m7) : null;
54354
54081
  }
54355
54082
  exports2.load = load;
@@ -54378,9 +54105,9 @@ var require_filesystem = __commonJS({
54378
54105
  "use strict";
54379
54106
  var fs5 = require("fs");
54380
54107
  var LDD_PATH = "/usr/bin/ldd";
54381
- var readFileSync2 = (path3) => fs5.readFileSync(path3, "utf-8");
54382
- var readFile3 = (path3) => new Promise((resolve, reject) => {
54383
- fs5.readFile(path3, "utf-8", (err, data) => {
54108
+ var readFileSync2 = (path2) => fs5.readFileSync(path2, "utf-8");
54109
+ var readFile3 = (path2) => new Promise((resolve, reject) => {
54110
+ fs5.readFile(path2, "utf-8", (err, data) => {
54384
54111
  if (err) {
54385
54112
  reject(err);
54386
54113
  } else {
@@ -54690,7 +54417,7 @@ var require_libsql = __commonJS({
54690
54417
  * @constructor
54691
54418
  * @param {string} path - Path to the database file.
54692
54419
  */
54693
- constructor(path3, opts) {
54420
+ constructor(path2, opts) {
54694
54421
  const encryptionCipher = opts?.encryptionCipher ?? "aes256cbc";
54695
54422
  if (opts && opts.syncUrl) {
54696
54423
  var authToken = "";
@@ -54703,13 +54430,13 @@ var require_libsql = __commonJS({
54703
54430
  const encryptionKey = opts?.encryptionKey ?? "";
54704
54431
  const syncPeriod = opts?.syncPeriod ?? 0;
54705
54432
  const readYourWrites = opts?.readYourWrites ?? true;
54706
- this.db = databaseOpenWithRpcSync(path3, opts.syncUrl, authToken, encryptionCipher, encryptionKey, syncPeriod, readYourWrites);
54433
+ this.db = databaseOpenWithRpcSync(path2, opts.syncUrl, authToken, encryptionCipher, encryptionKey, syncPeriod, readYourWrites);
54707
54434
  } else {
54708
54435
  const authToken2 = opts?.authToken ?? "";
54709
54436
  const encryptionKey = opts?.encryptionKey ?? "";
54710
- this.db = databaseOpen(path3, authToken2, encryptionCipher, encryptionKey);
54437
+ this.db = databaseOpen(path2, authToken2, encryptionCipher, encryptionKey);
54711
54438
  }
54712
- this.memory = path3 === ":memory:";
54439
+ this.memory = path2 === ":memory:";
54713
54440
  this.readonly = false;
54714
54441
  this.name = "";
54715
54442
  this.open = true;
@@ -54987,9 +54714,9 @@ function _createClient(config) {
54987
54714
  if (isInMemory && config.syncUrl) {
54988
54715
  throw new LibsqlError(`Embedded replica must use file for local db but URI with in-memory mode were provided instead: ${config.path}`, "URL_INVALID");
54989
54716
  }
54990
- let path3 = config.path;
54717
+ let path2 = config.path;
54991
54718
  if (isInMemory) {
54992
- path3 = `${config.scheme}:${config.path}`;
54719
+ path2 = `${config.scheme}:${config.path}`;
54993
54720
  }
54994
54721
  const options = {
54995
54722
  authToken: config.authToken,
@@ -54997,9 +54724,9 @@ function _createClient(config) {
54997
54724
  syncUrl: config.syncUrl,
54998
54725
  syncPeriod: config.syncInterval
54999
54726
  };
55000
- const db2 = new import_libsql.default(path3, options);
54727
+ const db2 = new import_libsql.default(path2, options);
55001
54728
  executeStmt(db2, "SELECT 1 AS checkThatTheDatabaseCanBeOpened", config.intMode);
55002
- return new Sqlite3Client(path3, options, db2, config.intMode);
54729
+ return new Sqlite3Client(path2, options, db2, config.intMode);
55003
54730
  }
55004
54731
  function executeStmt(db2, stmt, intMode) {
55005
54732
  let sql3;
@@ -55139,7 +54866,7 @@ var init_sqlite3 = __esm({
55139
54866
  init_api();
55140
54867
  Sqlite3Client = class {
55141
54868
  /** @private */
55142
- constructor(path3, options, db2, intMode) {
54869
+ constructor(path2, options, db2, intMode) {
55143
54870
  __privateAdd(this, _Sqlite3Client_instances);
55144
54871
  __privateAdd(this, _path);
55145
54872
  __privateAdd(this, _options);
@@ -55147,7 +54874,7 @@ var init_sqlite3 = __esm({
55147
54874
  __privateAdd(this, _intMode);
55148
54875
  __publicField(this, "closed");
55149
54876
  __publicField(this, "protocol");
55150
- __privateSet(this, _path, path3);
54877
+ __privateSet(this, _path, path2);
55151
54878
  __privateSet(this, _options, options);
55152
54879
  __privateSet(this, _db, db2);
55153
54880
  __privateSet(this, _intMode, intMode);
@@ -55447,7 +55174,7 @@ var require_node_gyp_build = __commonJS({
55447
55174
  "../node_modules/.pnpm/node-gyp-build@4.8.1/node_modules/node-gyp-build/node-gyp-build.js"(exports2, module2) {
55448
55175
  "use strict";
55449
55176
  var fs5 = require("fs");
55450
- var path3 = require("path");
55177
+ var path2 = require("path");
55451
55178
  var os3 = require("os");
55452
55179
  var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
55453
55180
  var vars = process.config && process.config.variables || {};
@@ -55464,21 +55191,21 @@ var require_node_gyp_build = __commonJS({
55464
55191
  return runtimeRequire(load.resolve(dir));
55465
55192
  }
55466
55193
  load.resolve = load.path = function(dir) {
55467
- dir = path3.resolve(dir || ".");
55194
+ dir = path2.resolve(dir || ".");
55468
55195
  try {
55469
- var name2 = runtimeRequire(path3.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
55196
+ var name2 = runtimeRequire(path2.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
55470
55197
  if (process.env[name2 + "_PREBUILD"]) dir = process.env[name2 + "_PREBUILD"];
55471
55198
  } catch (err) {
55472
55199
  }
55473
55200
  if (!prebuildsOnly) {
55474
- var release2 = getFirst(path3.join(dir, "build/Release"), matchBuild);
55201
+ var release2 = getFirst(path2.join(dir, "build/Release"), matchBuild);
55475
55202
  if (release2) return release2;
55476
- var debug = getFirst(path3.join(dir, "build/Debug"), matchBuild);
55203
+ var debug = getFirst(path2.join(dir, "build/Debug"), matchBuild);
55477
55204
  if (debug) return debug;
55478
55205
  }
55479
55206
  var prebuild = resolve(dir);
55480
55207
  if (prebuild) return prebuild;
55481
- var nearby = resolve(path3.dirname(process.execPath));
55208
+ var nearby = resolve(path2.dirname(process.execPath));
55482
55209
  if (nearby) return nearby;
55483
55210
  var target = [
55484
55211
  "platform=" + platform2,
@@ -55495,14 +55222,14 @@ var require_node_gyp_build = __commonJS({
55495
55222
  ].filter(Boolean).join(" ");
55496
55223
  throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
55497
55224
  function resolve(dir2) {
55498
- var tuples2 = readdirSync(path3.join(dir2, "prebuilds")).map(parseTuple);
55225
+ var tuples2 = readdirSync(path2.join(dir2, "prebuilds")).map(parseTuple);
55499
55226
  var tuple = tuples2.filter(matchTuple(platform2, arch)).sort(compareTuples)[0];
55500
55227
  if (!tuple) return;
55501
- var prebuilds = path3.join(dir2, "prebuilds", tuple.name);
55228
+ var prebuilds = path2.join(dir2, "prebuilds", tuple.name);
55502
55229
  var parsed = readdirSync(prebuilds).map(parseTags);
55503
55230
  var candidates = parsed.filter(matchTags(runtime, abi));
55504
55231
  var winner = candidates.sort(compareTags(runtime))[0];
55505
- if (winner) return path3.join(prebuilds, winner.file);
55232
+ if (winner) return path2.join(prebuilds, winner.file);
55506
55233
  }
55507
55234
  };
55508
55235
  function readdirSync(dir) {
@@ -55514,7 +55241,7 @@ var require_node_gyp_build = __commonJS({
55514
55241
  }
55515
55242
  function getFirst(dir, filter2) {
55516
55243
  var files = readdirSync(dir).filter(filter2);
55517
- return files[0] && path3.join(dir, files[0]);
55244
+ return files[0] && path2.join(dir, files[0]);
55518
55245
  }
55519
55246
  function matchBuild(name2) {
55520
55247
  return /\.node$/.test(name2);
@@ -64176,7 +63903,9 @@ function drizzle6(client, config = {}) {
64176
63903
  };
64177
63904
  }
64178
63905
  const session = new LibSQLSession(client, dialect7, schema4, { logger: logger2 }, void 0);
64179
- return new LibSQLDatabase("async", dialect7, session, schema4);
63906
+ const db2 = new LibSQLDatabase("async", dialect7, session, schema4);
63907
+ db2.$client = client;
63908
+ return db2;
64180
63909
  }
64181
63910
  var _a251, _b182, LibSQLDatabase;
64182
63911
  var init_driver6 = __esm({
@@ -78789,12 +78518,12 @@ var require_query4 = __commonJS({
78789
78518
  this._fields.push([]);
78790
78519
  return this.readField;
78791
78520
  }
78792
- _streamLocalInfile(connection2, path3) {
78521
+ _streamLocalInfile(connection2, path2) {
78793
78522
  if (this._streamFactory) {
78794
- this._localStream = this._streamFactory(path3);
78523
+ this._localStream = this._streamFactory(path2);
78795
78524
  } else {
78796
78525
  this._localStreamError = new Error(
78797
- `As a result of LOCAL INFILE command server wants to read ${path3} file, but as of v2.0 you must provide streamFactory option returning ReadStream.`
78526
+ `As a result of LOCAL INFILE command server wants to read ${path2} file, but as of v2.0 you must provide streamFactory option returning ReadStream.`
78798
78527
  );
78799
78528
  connection2.writePacket(EmptyPacket);
78800
78529
  return this.infileOk;
@@ -85650,6 +85379,7 @@ var init_db3 = __esm({
85650
85379
  "use strict";
85651
85380
  init_entity();
85652
85381
  init_selection_proxy();
85382
+ init_sql();
85653
85383
  init_subquery();
85654
85384
  init_count3();
85655
85385
  init_query_builders3();
@@ -85860,7 +85590,7 @@ var init_db3 = __esm({
85860
85590
  return new MySqlDeleteBase(table4, this.session, this.dialect);
85861
85591
  }
85862
85592
  execute(query) {
85863
- return this.session.execute(query.getSQL());
85593
+ return this.session.execute(typeof query === "string" ? sql.raw(query) : query.getSQL());
85864
85594
  }
85865
85595
  transaction(transaction, config) {
85866
85596
  return this.session.transaction(transaction, config);
@@ -86186,9 +85916,7 @@ function drizzle7(client, config = {}) {
86186
85916
  } else if (config.logger !== false) {
86187
85917
  logger2 = config.logger;
86188
85918
  }
86189
- if (isCallbackClient(client)) {
86190
- client = client.promise();
86191
- }
85919
+ const clientForInstance = isCallbackClient(client) ? client.promise() : client;
86192
85920
  let schema4;
86193
85921
  if (config.schema) {
86194
85922
  if (config.mode === void 0) {
@@ -86207,9 +85935,11 @@ function drizzle7(client, config = {}) {
86207
85935
  };
86208
85936
  }
86209
85937
  const mode = config.mode ?? "default";
86210
- const driver2 = new MySql2Driver(client, dialect7, { logger: logger2 });
85938
+ const driver2 = new MySql2Driver(clientForInstance, dialect7, { logger: logger2 });
86211
85939
  const session = driver2.createSession(schema4, mode);
86212
- return new MySql2Database(dialect7, session, schema4, mode);
85940
+ const db2 = new MySql2Database(dialect7, session, schema4, mode);
85941
+ db2.$client = client;
85942
+ return db2;
86213
85943
  }
86214
85944
  function isCallbackClient(client) {
86215
85945
  return typeof client.promise === "function";
@@ -91778,11 +91508,13 @@ function drizzle8(client, config = {}) {
91778
91508
  }
91779
91509
  const driver2 = new NeonHttpDriver(client, dialect7, { logger: logger2 });
91780
91510
  const session = driver2.createSession(schema4);
91781
- return new NeonHttpDatabase(
91511
+ const db2 = new NeonHttpDatabase(
91782
91512
  dialect7,
91783
91513
  session,
91784
91514
  schema4
91785
91515
  );
91516
+ db2.$client = client;
91517
+ return db2;
91786
91518
  }
91787
91519
  var _a288, NeonHttpDriver, _a289, _b204, NeonHttpDatabase;
91788
91520
  var init_driver8 = __esm({
@@ -91996,7 +91728,9 @@ function drizzle9(client, config = {}) {
91996
91728
  }
91997
91729
  const driver2 = new NeonDriver(client, dialect7, { logger: logger2 });
91998
91730
  const session = driver2.createSession(schema4);
91999
- return new NeonDatabase(dialect7, session, schema4);
91731
+ const db2 = new NeonDatabase(dialect7, session, schema4);
91732
+ db2.$client = client;
91733
+ return db2;
92000
91734
  }
92001
91735
  var _a293, NeonDriver, _a294, _b208, NeonDatabase;
92002
91736
  var init_driver9 = __esm({
@@ -92626,7 +92360,9 @@ Please make the necessary changes now to prevent any runtime errors in the futur
92626
92360
  };
92627
92361
  }
92628
92362
  const session = new PlanetscaleSession(client, dialect7, void 0, schema4, { logger: logger2 });
92629
- return new PlanetScaleDatabase(dialect7, session, schema4, "planetscale");
92363
+ const db2 = new PlanetScaleDatabase(dialect7, session, schema4, "planetscale");
92364
+ db2.$client = client;
92365
+ return db2;
92630
92366
  }
92631
92367
  var _a298, _b212, PlanetScaleDatabase;
92632
92368
  var init_driver10 = __esm({
@@ -94208,13 +93944,13 @@ function Subscribe(postgres2, options) {
94208
93944
  }
94209
93945
  }
94210
93946
  function handle(a7, b8) {
94211
- const path3 = b8.relation.schema + "." + b8.relation.table;
93947
+ const path2 = b8.relation.schema + "." + b8.relation.table;
94212
93948
  call("*", a7, b8);
94213
- call("*:" + path3, a7, b8);
94214
- b8.relation.keys.length && call("*:" + path3 + "=" + b8.relation.keys.map((x6) => a7[x6.name]), a7, b8);
93949
+ call("*:" + path2, a7, b8);
93950
+ b8.relation.keys.length && call("*:" + path2 + "=" + b8.relation.keys.map((x6) => a7[x6.name]), a7, b8);
94215
93951
  call(b8.command, a7, b8);
94216
- call(b8.command + ":" + path3, a7, b8);
94217
- b8.relation.keys.length && call(b8.command + ":" + path3 + "=" + b8.relation.keys.map((x6) => a7[x6.name]), a7, b8);
93952
+ call(b8.command + ":" + path2, a7, b8);
93953
+ b8.relation.keys.length && call(b8.command + ":" + path2 + "=" + b8.relation.keys.map((x6) => a7[x6.name]), a7, b8);
94218
93954
  }
94219
93955
  function pong() {
94220
93956
  const x6 = Buffer.alloc(34);
@@ -94327,8 +94063,8 @@ function parseEvent(x5) {
94327
94063
  const xs2 = x5.match(/^(\*|insert|update|delete)?:?([^.]+?\.?[^=]+)?=?(.+)?/i) || [];
94328
94064
  if (!xs2)
94329
94065
  throw new Error("Malformed subscribe pattern: " + x5);
94330
- const [, command, path3, key] = xs2;
94331
- return (command || "*") + (path3 ? ":" + (path3.indexOf(".") === -1 ? "public." + path3 : path3) : "") + (key ? "=" + key : "");
94066
+ const [, command, path2, key] = xs2;
94067
+ return (command || "*") + (path2 ? ":" + (path2.indexOf(".") === -1 ? "public." + path2 : path2) : "") + (key ? "=" + key : "");
94332
94068
  }
94333
94069
  var noop2;
94334
94070
  var init_subscribe = __esm({
@@ -94471,10 +94207,10 @@ function Postgres(a7, b8) {
94471
94207
  });
94472
94208
  return query;
94473
94209
  }
94474
- function file(path3, args = [], options2 = {}) {
94210
+ function file(path2, args = [], options2 = {}) {
94475
94211
  arguments.length === 2 && !Array.isArray(args) && (options2 = args, args = []);
94476
94212
  const query = new Query([], args, (query2) => {
94477
- import_fs6.default.readFile(path3, "utf8", (err, string2) => {
94213
+ import_fs6.default.readFile(path2, "utf8", (err, string2) => {
94478
94214
  if (err)
94479
94215
  return query2.reject(err);
94480
94216
  query2.strings = [string2];
@@ -94844,7 +94580,7 @@ var init_session14 = __esm({
94844
94580
  init_tracing();
94845
94581
  init_utils2();
94846
94582
  PostgresJsPreparedQuery = class extends (_b213 = PgPreparedQuery, _a299 = entityKind, _b213) {
94847
- constructor(client, queryString, params, logger2, fields, _isResponseInArrayMode, customResultMapper) {
94583
+ constructor(client, queryString, params, logger2, fields, _isResponseInArrayMode, customResultMapper, isOptimized) {
94848
94584
  super({ sql: queryString, params });
94849
94585
  this.client = client;
94850
94586
  this.queryString = queryString;
@@ -94853,6 +94589,7 @@ var init_session14 = __esm({
94853
94589
  this.fields = fields;
94854
94590
  this._isResponseInArrayMode = _isResponseInArrayMode;
94855
94591
  this.customResultMapper = customResultMapper;
94592
+ this.isOptimized = isOptimized;
94856
94593
  }
94857
94594
  async execute(placeholderValues = {}) {
94858
94595
  return tracer.startActiveSpan("drizzle.execute", async (span) => {
@@ -94862,7 +94599,7 @@ var init_session14 = __esm({
94862
94599
  "drizzle.query.params": JSON.stringify(params)
94863
94600
  });
94864
94601
  this.logger.logQuery(this.queryString, params);
94865
- const { fields, queryString: query, client, joinsNotNullableMap, customResultMapper } = this;
94602
+ const { fields, queryString: query, client, joinsNotNullableMap, customResultMapper, isOptimized } = this;
94866
94603
  if (!fields && !customResultMapper) {
94867
94604
  return tracer.startActiveSpan("drizzle.driver.execute", () => {
94868
94605
  return client.unsafe(query, params);
@@ -94876,7 +94613,7 @@ var init_session14 = __esm({
94876
94613
  return client.unsafe(query, params).values();
94877
94614
  });
94878
94615
  return tracer.startActiveSpan("drizzle.mapResponse", () => {
94879
- return customResultMapper ? customResultMapper(rows) : rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
94616
+ return isOptimized ? rows.flat(1) : customResultMapper ? customResultMapper(rows) : rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
94880
94617
  });
94881
94618
  });
94882
94619
  }
@@ -94912,7 +94649,7 @@ var init_session14 = __esm({
94912
94649
  this.options = options;
94913
94650
  this.logger = options.logger ?? new NoopLogger();
94914
94651
  }
94915
- prepareQuery(query, fields, name2, isResponseInArrayMode, customResultMapper) {
94652
+ prepareQuery(query, fields, name2, isResponseInArrayMode, customResultMapper, isOptimized) {
94916
94653
  return new PostgresJsPreparedQuery(
94917
94654
  this.client,
94918
94655
  query.sql,
@@ -94920,7 +94657,8 @@ var init_session14 = __esm({
94920
94657
  this.logger,
94921
94658
  fields,
94922
94659
  isResponseInArrayMode,
94923
- customResultMapper
94660
+ customResultMapper,
94661
+ isOptimized
94924
94662
  );
94925
94663
  }
94926
94664
  query(query, params) {
@@ -95000,7 +94738,9 @@ function drizzle11(client, config = {}) {
95000
94738
  };
95001
94739
  }
95002
94740
  const session = new PostgresJsSession(client, dialect7, schema4, { logger: logger2 });
95003
- return new PostgresJsDatabase(dialect7, session, schema4);
94741
+ const db2 = new PostgresJsDatabase(dialect7, session, schema4);
94742
+ db2.$client = client;
94743
+ return db2;
95004
94744
  }
95005
94745
  var _a302, _b216, PostgresJsDatabase;
95006
94746
  var init_driver11 = __esm({
@@ -95570,7 +95310,9 @@ function drizzle12(client, config = {}) {
95570
95310
  };
95571
95311
  }
95572
95312
  const session = new TiDBServerlessSession(client, dialect7, void 0, schema4, { logger: logger2 });
95573
- return new TiDBServerlessDatabase(dialect7, session, schema4, "default");
95313
+ const db2 = new TiDBServerlessDatabase(dialect7, session, schema4, "default");
95314
+ db2.$client = client;
95315
+ return db2;
95574
95316
  }
95575
95317
  var _a306, _b220, TiDBServerlessDatabase;
95576
95318
  var init_driver12 = __esm({
@@ -104762,7 +104504,9 @@ function drizzle13(client, config = {}) {
104762
104504
  }
104763
104505
  const driver2 = new VercelPgDriver(client, dialect7, { logger: logger2 });
104764
104506
  const session = driver2.createSession(schema4);
104765
- return new VercelPgDatabase(dialect7, session, schema4);
104507
+ const db2 = new VercelPgDatabase(dialect7, session, schema4);
104508
+ db2.$client = client;
104509
+ return db2;
104766
104510
  }
104767
104511
  var _a310, VercelPgDriver, _a311, _b224, VercelPgDatabase;
104768
104512
  var init_driver13 = __esm({
@@ -104822,132 +104566,219 @@ var init_vercel_postgres = __esm({
104822
104566
  function assertUnreachable2(_3) {
104823
104567
  throw new Error("Didn't expect to get here");
104824
104568
  }
104825
- async function drizzle14(client, params) {
104826
- const { connection: connection2, ws: ws3, ...drizzleConfig } = params;
104569
+ async function drizzle14(client, ...params) {
104827
104570
  switch (client) {
104828
104571
  case "node-postgres": {
104829
- const { Pool: Pool2 } = await Promise.resolve().then(() => __toESM(require_lib3(), 1)).catch(() => importError("pg"));
104572
+ const defpg = await Promise.resolve().then(() => __toESM(require_lib3(), 1)).catch(() => importError("pg"));
104830
104573
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_node_postgres(), node_postgres_exports));
104831
- const instance = new Pool2(connection2);
104832
- const db2 = drizzle22(instance, drizzleConfig);
104833
- db2.$client = instance;
104574
+ if (typeof params[0] === "object") {
104575
+ const { connection: connection2, ...drizzleConfig } = params[0];
104576
+ const instance2 = typeof connection2 === "string" ? new defpg.default.Pool({
104577
+ connectionString: connection2
104578
+ }) : new defpg.default.Pool(connection2);
104579
+ const db22 = drizzle22(instance2, drizzleConfig);
104580
+ return db22;
104581
+ }
104582
+ const instance = typeof params[0] === "string" ? new defpg.default.Pool({
104583
+ connectionString: params[0]
104584
+ }) : new defpg.default.Pool(params[0]);
104585
+ const db2 = drizzle22(instance);
104834
104586
  return db2;
104835
104587
  }
104836
104588
  case "aws-data-api-pg": {
104589
+ const { connection: connection2, ...drizzleConfig } = params[0];
104590
+ const { resourceArn, database, secretArn, ...rdsConfig } = connection2;
104837
104591
  const { RDSDataClient: RDSDataClient2 } = await Promise.resolve().then(() => (init_dist_es54(), dist_es_exports14)).catch(
104838
104592
  () => importError("@aws-sdk/client-rds-data")
104839
104593
  );
104840
104594
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_pg(), pg_exports));
104841
- const instance = new RDSDataClient2(connection2);
104842
- const db2 = drizzle22(instance, drizzleConfig);
104843
- db2.$client = instance;
104595
+ const instance = new RDSDataClient2(rdsConfig);
104596
+ const db2 = drizzle22(instance, { resourceArn, database, secretArn, ...drizzleConfig });
104844
104597
  return db2;
104845
104598
  }
104846
104599
  case "better-sqlite3": {
104847
104600
  const { default: Client4 } = await Promise.resolve().then(() => __toESM(require_lib4(), 1)).catch(() => importError("better-sqlite3"));
104848
104601
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_better_sqlite3(), better_sqlite3_exports));
104849
- if (typeof connection2 === "object") {
104850
- const { filename, options } = connection2;
104851
- const instance2 = new Client4(filename, options);
104602
+ if (typeof params[0] === "object") {
104603
+ const { connection: connection2, ...drizzleConfig } = params[0];
104604
+ if (typeof connection2 === "object") {
104605
+ const { source, ...options } = connection2;
104606
+ const instance3 = new Client4(source, options);
104607
+ const db3 = drizzle22(instance3, drizzleConfig);
104608
+ return db3;
104609
+ }
104610
+ const instance2 = new Client4(connection2);
104852
104611
  const db22 = drizzle22(instance2, drizzleConfig);
104853
- db22.$client = instance2;
104854
104612
  return db22;
104855
104613
  }
104856
- const instance = new Client4(connection2);
104857
- const db2 = drizzle22(instance, drizzleConfig);
104858
- db2.$client = instance;
104614
+ const instance = new Client4(params[0]);
104615
+ const db2 = drizzle22(instance);
104859
104616
  return db2;
104860
104617
  }
104861
104618
  case "bun:sqlite": {
104862
- const { Database: Client4 } = require("bun:sqlite").catch(() => importError("bun:sqlite"));
104619
+ const { Database: Client4 } = require("bun:sqlite").catch(() => {
104620
+ throw new Error(`Please use bun to use 'bun:sqlite' for Drizzle ORM to connect to database`);
104621
+ });
104863
104622
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_bun_sqlite(), bun_sqlite_exports));
104864
- if (typeof connection2 === "object") {
104865
- const { filename, options } = connection2;
104866
- const instance2 = new Client4(filename, options);
104623
+ if (typeof params[0] === "object") {
104624
+ const { connection: connection2, ...drizzleConfig } = params[0];
104625
+ if (typeof connection2 === "object") {
104626
+ const { source, ...opts } = connection2;
104627
+ const options = Object.values(opts).filter((v8) => v8 !== void 0).length ? opts : void 0;
104628
+ const instance3 = new Client4(source, options);
104629
+ const db3 = drizzle22(instance3, drizzleConfig);
104630
+ return db3;
104631
+ }
104632
+ const instance2 = new Client4(connection2);
104867
104633
  const db22 = drizzle22(instance2, drizzleConfig);
104868
- db22.$client = instance2;
104869
104634
  return db22;
104870
104635
  }
104871
- const instance = new Client4(connection2);
104872
- const db2 = drizzle22(instance, drizzleConfig);
104873
- db2.$client = instance;
104636
+ const instance = new Client4(params[0]);
104637
+ const db2 = drizzle22(instance);
104874
104638
  return db2;
104875
104639
  }
104876
104640
  case "d1": {
104641
+ const { connection: connection2, ...drizzleConfig } = params[0];
104877
104642
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_d1(), d1_exports));
104878
104643
  const db2 = drizzle22(connection2, drizzleConfig);
104879
- db2.$client = connection2;
104880
104644
  return db2;
104881
104645
  }
104882
- case "libsql": {
104646
+ case "libsql":
104647
+ case "turso": {
104883
104648
  const { createClient: createClient3 } = await Promise.resolve().then(() => (init_node3(), node_exports)).catch(() => importError("@libsql/client"));
104884
104649
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_libsql(), libsql_exports));
104885
- const instance = createClient3(connection2);
104650
+ if (typeof params[0] === "string") {
104651
+ const instance2 = createClient3({
104652
+ url: params[0]
104653
+ });
104654
+ const db22 = drizzle22(instance2);
104655
+ return db22;
104656
+ }
104657
+ const { connection: connection2, ...drizzleConfig } = params[0];
104658
+ const instance = typeof connection2 === "string" ? createClient3({ url: connection2 }) : createClient3(connection2);
104886
104659
  const db2 = drizzle22(instance, drizzleConfig);
104887
- db2.$client = instance;
104888
104660
  return db2;
104889
104661
  }
104890
104662
  case "mysql2": {
104891
- const { createPool: createPool2 } = await Promise.resolve().then(() => __toESM(require_promise(), 1)).catch(() => importError("mysql2/promise"));
104892
- const instance = createPool2(connection2);
104663
+ const { createPool: createPool2 } = await Promise.resolve().then(() => __toESM(require_promise(), 1)).catch(() => importError("mysql2"));
104893
104664
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_mysql2(), mysql2_exports));
104894
- const db2 = drizzle22(instance, drizzleConfig);
104895
- db2.$client = instance;
104665
+ if (typeof params[0] === "object") {
104666
+ const { connection: connection2, ...drizzleConfig } = params[0];
104667
+ const instance2 = createPool2(connection2);
104668
+ const db22 = drizzle22(instance2, drizzleConfig);
104669
+ return db22;
104670
+ }
104671
+ const connectionString = params[0];
104672
+ const instance = createPool2(connectionString);
104673
+ const db2 = drizzle22(instance);
104896
104674
  return db2;
104897
104675
  }
104898
104676
  case "neon-http": {
104899
104677
  const { neon } = await Promise.resolve().then(() => (init_serverless(), serverless_exports)).catch(() => importError("@neondatabase/serverless"));
104900
- const { connectionString, options } = connection2;
104901
104678
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_neon_http(), neon_http_exports));
104902
- const instance = neon(connectionString, options);
104903
- const db2 = drizzle22(instance, drizzleConfig);
104904
- db2.$client = instance;
104679
+ if (typeof params[0] === "object") {
104680
+ const { connection: connection2, ...drizzleConfig } = params[0];
104681
+ if (typeof connection2 === "object") {
104682
+ const { connectionString, ...options } = connection2;
104683
+ const instance3 = neon(connectionString, options);
104684
+ const db3 = drizzle22(instance3, drizzleConfig);
104685
+ return db3;
104686
+ }
104687
+ const instance2 = neon(connection2);
104688
+ const db22 = drizzle22(instance2, drizzleConfig);
104689
+ return db22;
104690
+ }
104691
+ const instance = neon(params[0]);
104692
+ const db2 = drizzle22(instance);
104905
104693
  return db2;
104906
104694
  }
104907
- case "neon-serverless": {
104695
+ case "neon-websocket": {
104908
104696
  const { Pool: Pool2, neonConfig } = await Promise.resolve().then(() => (init_serverless(), serverless_exports)).catch(
104909
104697
  () => importError("@neondatabase/serverless")
104910
104698
  );
104911
104699
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_neon_serverless(), neon_serverless_exports));
104912
- const instance = new Pool2(connection2);
104913
- if (ws3) {
104914
- neonConfig.webSocketConstructor = ws3;
104700
+ if (typeof params[0] === "string") {
104701
+ const instance2 = new Pool2({
104702
+ connectionString: params[0]
104703
+ });
104704
+ const db22 = drizzle22(instance2);
104705
+ return db22;
104915
104706
  }
104916
- const db2 = drizzle22(instance, drizzleConfig);
104917
- db2.$client = instance;
104707
+ if (typeof params[0] === "object") {
104708
+ const { connection: connection2, ws: ws3, ...drizzleConfig } = params[0];
104709
+ if (ws3) {
104710
+ neonConfig.webSocketConstructor = ws3;
104711
+ }
104712
+ const instance2 = typeof connection2 === "string" ? new Pool2({
104713
+ connectionString: connection2
104714
+ }) : new Pool2(connection2);
104715
+ const db22 = drizzle22(instance2, drizzleConfig);
104716
+ return db22;
104717
+ }
104718
+ const instance = new Pool2();
104719
+ const db2 = drizzle22(instance);
104918
104720
  return db2;
104919
104721
  }
104920
104722
  case "planetscale": {
104921
104723
  const { Client: Client4 } = await Promise.resolve().then(() => (init_dist(), dist_exports)).catch(() => importError("@planetscale/database"));
104922
104724
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_planetscale_serverless(), planetscale_serverless_exports));
104923
- const instance = new Client4(
104924
- connection2
104925
- );
104926
- const db2 = drizzle22(instance, drizzleConfig);
104927
- db2.$client = instance;
104725
+ if (typeof params[0] === "object") {
104726
+ const { connection: connection2, ...drizzleConfig } = params[0];
104727
+ const instance2 = typeof connection2 === "string" ? new Client4({
104728
+ url: connection2
104729
+ }) : new Client4(
104730
+ connection2
104731
+ );
104732
+ const db22 = drizzle22(instance2, drizzleConfig);
104733
+ return db22;
104734
+ }
104735
+ const instance = new Client4({
104736
+ url: params[0]
104737
+ });
104738
+ const db2 = drizzle22(instance);
104928
104739
  return db2;
104929
104740
  }
104930
104741
  case "postgres-js": {
104931
104742
  const { default: client2 } = await Promise.resolve().then(() => (init_src(), src_exports)).catch(() => importError("postgres"));
104932
104743
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_postgres_js(), postgres_js_exports));
104933
- const instance = client2(connection2);
104934
- const db2 = drizzle22(instance, drizzleConfig);
104935
- db2.$client = instance;
104744
+ if (typeof params[0] === "object") {
104745
+ const { connection: connection2, ...drizzleConfig } = params[0];
104746
+ if (typeof connection2 === "object" && connection2.url !== void 0) {
104747
+ const { url, ...config } = connection2;
104748
+ const instance3 = client2(url, config);
104749
+ const db3 = drizzle22(instance3, drizzleConfig);
104750
+ return db3;
104751
+ }
104752
+ const instance2 = client2(connection2);
104753
+ const db22 = drizzle22(instance2, drizzleConfig);
104754
+ return db22;
104755
+ }
104756
+ const instance = client2(params[0]);
104757
+ const db2 = drizzle22(instance);
104936
104758
  return db2;
104937
104759
  }
104938
104760
  case "tidb-serverless": {
104939
104761
  const { connect: connect3 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2)).catch(() => importError("@tidbcloud/serverless"));
104940
104762
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_tidb_serverless(), tidb_serverless_exports));
104941
- const instance = connect3(connection2);
104763
+ if (typeof params[0] === "string") {
104764
+ const instance2 = connect3({
104765
+ url: params[0]
104766
+ });
104767
+ const db22 = drizzle22(instance2);
104768
+ return db22;
104769
+ }
104770
+ const { connection: connection2, ...drizzleConfig } = params[0];
104771
+ const instance = typeof connection2 === "string" ? connect3({
104772
+ url: connection2
104773
+ }) : connect3(connection2);
104942
104774
  const db2 = drizzle22(instance, drizzleConfig);
104943
- db2.$client = instance;
104944
104775
  return db2;
104945
104776
  }
104946
104777
  case "vercel-postgres": {
104778
+ const drizzleConfig = params[0];
104947
104779
  const { sql: sql3 } = await Promise.resolve().then(() => (init_index_node(), index_node_exports)).catch(() => importError("@vercel/postgres"));
104948
104780
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_vercel_postgres(), vercel_postgres_exports));
104949
104781
  const db2 = drizzle22(sql3, drizzleConfig);
104950
- db2.$client = sql3;
104951
104782
  return db2;
104952
104783
  }
104953
104784
  }
@@ -104967,17 +104798,7 @@ var init_monodriver = __esm({
104967
104798
 
104968
104799
  // ../drizzle-orm/dist/migrator.js
104969
104800
  function readMigrationFiles(config) {
104970
- let migrationFolderTo;
104971
- if (typeof config === "string") {
104972
- const configAsString = import_node_fs.default.readFileSync(import_node_path.default.resolve(".", config), "utf8");
104973
- const jsonConfig = JSON.parse(configAsString);
104974
- migrationFolderTo = jsonConfig.out;
104975
- } else {
104976
- migrationFolderTo = config.migrationsFolder;
104977
- }
104978
- if (!migrationFolderTo) {
104979
- throw new Error("no migration folder defined");
104980
- }
104801
+ const migrationFolderTo = config.migrationsFolder;
104981
104802
  const migrationQueries = [];
104982
104803
  const journalPath = `${migrationFolderTo}/meta/_journal.json`;
104983
104804
  if (!import_node_fs.default.existsSync(journalPath)) {
@@ -105004,13 +104825,12 @@ function readMigrationFiles(config) {
105004
104825
  }
105005
104826
  return migrationQueries;
105006
104827
  }
105007
- var import_node_crypto, import_node_fs, import_node_path;
104828
+ var import_node_crypto, import_node_fs;
105008
104829
  var init_migrator = __esm({
105009
104830
  "../drizzle-orm/dist/migrator.js"() {
105010
104831
  "use strict";
105011
104832
  import_node_crypto = __toESM(require("crypto"), 1);
105012
104833
  import_node_fs = __toESM(require("fs"), 1);
105013
- import_node_path = __toESM(require("path"), 1);
105014
104834
  }
105015
104835
  });
105016
104836
 
@@ -105069,7 +104889,7 @@ __export(migrator_exports4, {
105069
104889
  });
105070
104890
  async function migrate4(db2, config) {
105071
104891
  const migrations = readMigrationFiles(config);
105072
- const migrationsTable = config === void 0 ? "__drizzle_migrations" : typeof config === "string" ? "__drizzle_migrations" : config.migrationsTable ?? "__drizzle_migrations";
104892
+ const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
105073
104893
  const migrationTableCreate = sql`
105074
104894
  CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (
105075
104895
  id SERIAL PRIMARY KEY,
@@ -105114,7 +104934,7 @@ __export(migrator_exports5, {
105114
104934
  });
105115
104935
  async function migrate5(db2, config) {
105116
104936
  const migrations = readMigrationFiles(config);
105117
- const migrationsTable = config === void 0 ? "__drizzle_migrations" : typeof config === "string" ? "__drizzle_migrations" : config.migrationsTable ?? "__drizzle_migrations";
104937
+ const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
105118
104938
  const migrationTableCreate = sql`
105119
104939
  CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (
105120
104940
  id SERIAL PRIMARY KEY,
@@ -105157,10 +104977,7 @@ __export(migrator_exports6, {
105157
104977
  });
105158
104978
  async function migrate6(db2, config) {
105159
104979
  const migrations = readMigrationFiles(config);
105160
- const preparedConfig = typeof config === "string" ? {
105161
- migrationsFolder: config
105162
- } : config;
105163
- await db2.dialect.migrate(migrations, db2.session, preparedConfig);
104980
+ await db2.dialect.migrate(migrations, db2.session, config);
105164
104981
  }
105165
104982
  var init_migrator7 = __esm({
105166
104983
  "../drizzle-orm/dist/mysql2/migrator.js"() {
@@ -105176,8 +104993,8 @@ __export(migrator_exports7, {
105176
104993
  });
105177
104994
  async function migrate7(db2, config) {
105178
104995
  const migrations = readMigrationFiles(config);
105179
- const migrationsTable = typeof config === "string" ? "__drizzle_migrations" : config.migrationsTable ?? "__drizzle_migrations";
105180
- const migrationsSchema = typeof config === "string" ? "drizzle" : config.migrationsSchema ?? "drizzle";
104996
+ const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
104997
+ const migrationsSchema = config.migrationsSchema ?? "drizzle";
105181
104998
  const migrationTableCreate = sql`
105182
104999
  CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsSchema)}.${sql.identifier(migrationsTable)} (
105183
105000
  id SERIAL PRIMARY KEY,
@@ -105253,10 +105070,7 @@ __export(migrator_exports10, {
105253
105070
  });
105254
105071
  async function migrate10(db2, config) {
105255
105072
  const migrations = readMigrationFiles(config);
105256
- const preparedConfig = typeof config === "string" ? {
105257
- migrationsFolder: config
105258
- } : config;
105259
- await db2.dialect.migrate(migrations, db2.session, preparedConfig);
105073
+ await db2.dialect.migrate(migrations, db2.session, config);
105260
105074
  }
105261
105075
  var init_migrator11 = __esm({
105262
105076
  "../drizzle-orm/dist/planetscale-serverless/migrator.js"() {
@@ -105583,7 +105397,6 @@ var init_pgSerializer = __esm({
105583
105397
  const sequencesToReturn = {};
105584
105398
  const indexesInSchema = {};
105585
105399
  for (const table4 of tables) {
105586
- const checksInTable = {};
105587
105400
  const {
105588
105401
  name: tableName,
105589
105402
  columns,
@@ -105599,7 +105412,6 @@ var init_pgSerializer = __esm({
105599
105412
  }
105600
105413
  const columnsObject = {};
105601
105414
  const indexesObject = {};
105602
- const checksObject = {};
105603
105415
  const foreignKeysObject = {};
105604
105416
  const primaryKeysObject = {};
105605
105417
  const uniqueConstraintObject = {};
@@ -105846,33 +105658,6 @@ ${withStyle.errorWarning(
105846
105658
  with: value.config.with ?? {}
105847
105659
  };
105848
105660
  });
105849
- checks.forEach((check) => {
105850
- const checkName = check.name;
105851
- if (typeof checksInTable[`"${schema4 ?? "public"}"."${tableName}"`] !== "undefined") {
105852
- if (checksInTable[`"${schema4 ?? "public"}"."${tableName}"`].includes(check.name)) {
105853
- console.log(
105854
- `
105855
- ${withStyle.errorWarning(
105856
- `We've found duplicated check constraint name across ${source_default.underline.blue(
105857
- schema4 ?? "public"
105858
- )} schema in ${source_default.underline.blue(
105859
- tableName
105860
- )}. Please rename your check constraint in either the ${source_default.underline.blue(
105861
- tableName
105862
- )} table or the table with the duplicated check contraint name`
105863
- )}`
105864
- );
105865
- process.exit(1);
105866
- }
105867
- checksInTable[`"${schema4 ?? "public"}"."${tableName}"`].push(checkName);
105868
- } else {
105869
- checksInTable[`"${schema4 ?? "public"}"."${tableName}"`] = [check.name];
105870
- }
105871
- checksObject[checkName] = {
105872
- name: checkName,
105873
- value: dialect4.sqlToQuery(check.value).sql
105874
- };
105875
- });
105876
105661
  const tableKey2 = `${schema4 ?? "public"}.${tableName}`;
105877
105662
  result[tableKey2] = {
105878
105663
  name: tableName,
@@ -105881,8 +105666,7 @@ ${withStyle.errorWarning(
105881
105666
  indexes: indexesObject,
105882
105667
  foreignKeys: foreignKeysObject,
105883
105668
  compositePrimaryKeys: primaryKeysObject,
105884
- uniqueConstraints: uniqueConstraintObject,
105885
- checkConstraints: checksObject
105669
+ uniqueConstraints: uniqueConstraintObject
105886
105670
  };
105887
105671
  }
105888
105672
  for (const sequence of sequences) {
@@ -105971,7 +105755,6 @@ ${withStyle.errorWarning(
105971
105755
  let indexesCount = 0;
105972
105756
  let foreignKeysCount = 0;
105973
105757
  let tableCount = 0;
105974
- let checksCount = 0;
105975
105758
  const sequencesToReturn = {};
105976
105759
  const seqWhere = schemaFilters.map((t5) => `schemaname = '${t5}'`).join(" or ");
105977
105760
  const allSequences = await db2.query(
@@ -106041,8 +105824,7 @@ ${withStyle.errorWarning(
106041
105824
  const indexToReturn = {};
106042
105825
  const foreignKeysToReturn = {};
106043
105826
  const primaryKeys = {};
106044
- const uniqueConstraints = {};
106045
- const checkConstraints = {};
105827
+ const uniqueConstrains = {};
106046
105828
  const tableResponse = await db2.query(
106047
105829
  `SELECT a.attrelid::regclass::text, a.attname, is_nullable, a.attndims as array_dimensions
106048
105830
  , CASE WHEN a.atttypid = ANY ('{int,int8,int2}'::regtype[])
@@ -106080,97 +105862,55 @@ ${withStyle.errorWarning(
106080
105862
  ORDER BY a.attnum;`
106081
105863
  );
106082
105864
  const tableConstraints = await db2.query(
106083
- `SELECT c.column_name,
106084
- c.data_type,
106085
- tc.constraint_type,
106086
- tc.constraint_name,
106087
- tc.constraint_schema,
106088
- pg_get_constraintdef(con.oid) AS check_constraint_definition
106089
- FROM information_schema.table_constraints tc
106090
- JOIN information_schema.constraint_column_usage AS ccu
106091
- USING (constraint_schema, constraint_name)
106092
- JOIN information_schema.columns AS c
106093
- ON c.table_schema = tc.constraint_schema
106094
- AND tc.table_name = c.table_name
106095
- AND ccu.column_name = c.column_name
106096
- JOIN pg_constraint con
106097
- ON con.conname = tc.constraint_name
106098
- AND con.conrelid = (
106099
- SELECT oid
106100
- FROM pg_class
106101
- WHERE relname = tc.table_name
106102
- AND relnamespace = (
106103
- SELECT oid
106104
- FROM pg_namespace
106105
- WHERE nspname = tc.constraint_schema
106106
- )
106107
- )
106108
- WHERE tc.table_name = '${tableName}' AND tc.constraint_schema = '${tableSchema}';`
105865
+ `SELECT c.column_name, c.data_type, constraint_type, constraint_name, constraint_schema
105866
+ FROM information_schema.table_constraints tc
105867
+ JOIN information_schema.constraint_column_usage AS ccu USING (constraint_schema, constraint_name)
105868
+ JOIN information_schema.columns AS c ON c.table_schema = tc.constraint_schema
105869
+ AND tc.table_name = c.table_name AND ccu.column_name = c.column_name
105870
+ WHERE tc.table_name = '${tableName}' and constraint_schema = '${tableSchema}';`
106109
105871
  );
106110
- const tableChecks = await db2.query(`SELECT
106111
- tc.constraint_name,
106112
- tc.constraint_type,
106113
- pg_get_constraintdef(con.oid) AS constraint_definition
106114
- FROM
106115
- information_schema.table_constraints AS tc
106116
- JOIN pg_constraint AS con
106117
- ON tc.constraint_name = con.conname
106118
- AND con.conrelid = (
106119
- SELECT oid
106120
- FROM pg_class
106121
- WHERE relname = tc.table_name
106122
- AND relnamespace = (
106123
- SELECT oid
106124
- FROM pg_namespace
106125
- WHERE nspname = tc.constraint_schema
106126
- )
106127
- )
106128
- WHERE
106129
- tc.table_name = '${tableName}'
106130
- AND tc.constraint_schema = '${tableSchema}'
106131
- AND tc.constraint_type = 'CHECK';`);
106132
105872
  columnsCount += tableResponse.length;
106133
105873
  if (progressCallback) {
106134
105874
  progressCallback("columns", columnsCount, "fetching");
106135
105875
  }
106136
105876
  const tableForeignKeys = await db2.query(
106137
105877
  `SELECT
106138
- con.contype AS constraint_type,
106139
- nsp.nspname AS constraint_schema,
106140
- con.conname AS constraint_name,
106141
- rel.relname AS table_name,
106142
- att.attname AS column_name,
106143
- fnsp.nspname AS foreign_table_schema,
106144
- frel.relname AS foreign_table_name,
106145
- fatt.attname AS foreign_column_name,
106146
- CASE con.confupdtype
106147
- WHEN 'a' THEN 'NO ACTION'
106148
- WHEN 'r' THEN 'RESTRICT'
106149
- WHEN 'n' THEN 'SET NULL'
106150
- WHEN 'c' THEN 'CASCADE'
106151
- WHEN 'd' THEN 'SET DEFAULT'
106152
- END AS update_rule,
106153
- CASE con.confdeltype
106154
- WHEN 'a' THEN 'NO ACTION'
106155
- WHEN 'r' THEN 'RESTRICT'
106156
- WHEN 'n' THEN 'SET NULL'
106157
- WHEN 'c' THEN 'CASCADE'
106158
- WHEN 'd' THEN 'SET DEFAULT'
106159
- END AS delete_rule
106160
- FROM
106161
- pg_catalog.pg_constraint con
106162
- JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelid
106163
- JOIN pg_catalog.pg_namespace nsp ON nsp.oid = con.connamespace
106164
- LEFT JOIN pg_catalog.pg_attribute att ON att.attnum = ANY (con.conkey)
106165
- AND att.attrelid = con.conrelid
106166
- LEFT JOIN pg_catalog.pg_class frel ON frel.oid = con.confrelid
106167
- LEFT JOIN pg_catalog.pg_namespace fnsp ON fnsp.oid = frel.relnamespace
106168
- LEFT JOIN pg_catalog.pg_attribute fatt ON fatt.attnum = ANY (con.confkey)
106169
- AND fatt.attrelid = con.confrelid
106170
- WHERE
106171
- nsp.nspname = '${tableSchema}'
106172
- AND rel.relname = '${tableName}'
106173
- AND con.contype IN ('f');`
105878
+ con.contype AS constraint_type,
105879
+ nsp.nspname AS constraint_schema,
105880
+ con.conname AS constraint_name,
105881
+ rel.relname AS table_name,
105882
+ att.attname AS column_name,
105883
+ fnsp.nspname AS foreign_table_schema,
105884
+ frel.relname AS foreign_table_name,
105885
+ fatt.attname AS foreign_column_name,
105886
+ CASE con.confupdtype
105887
+ WHEN 'a' THEN 'NO ACTION'
105888
+ WHEN 'r' THEN 'RESTRICT'
105889
+ WHEN 'n' THEN 'SET NULL'
105890
+ WHEN 'c' THEN 'CASCADE'
105891
+ WHEN 'd' THEN 'SET DEFAULT'
105892
+ END AS update_rule,
105893
+ CASE con.confdeltype
105894
+ WHEN 'a' THEN 'NO ACTION'
105895
+ WHEN 'r' THEN 'RESTRICT'
105896
+ WHEN 'n' THEN 'SET NULL'
105897
+ WHEN 'c' THEN 'CASCADE'
105898
+ WHEN 'd' THEN 'SET DEFAULT'
105899
+ END AS delete_rule
105900
+ FROM
105901
+ pg_catalog.pg_constraint con
105902
+ JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelid
105903
+ JOIN pg_catalog.pg_namespace nsp ON nsp.oid = con.connamespace
105904
+ LEFT JOIN pg_catalog.pg_attribute att ON att.attnum = ANY (con.conkey)
105905
+ AND att.attrelid = con.conrelid
105906
+ LEFT JOIN pg_catalog.pg_class frel ON frel.oid = con.confrelid
105907
+ LEFT JOIN pg_catalog.pg_namespace fnsp ON fnsp.oid = frel.relnamespace
105908
+ LEFT JOIN pg_catalog.pg_attribute fatt ON fatt.attnum = ANY (con.confkey)
105909
+ AND fatt.attrelid = con.confrelid
105910
+ WHERE
105911
+ nsp.nspname = '${tableSchema}'
105912
+ AND rel.relname = '${tableName}'
105913
+ AND con.contype IN ('f');`
106174
105914
  );
106175
105915
  foreignKeysCount += tableForeignKeys.length;
106176
105916
  if (progressCallback) {
@@ -106212,29 +105952,16 @@ ${withStyle.errorWarning(
106212
105952
  for (const unqs of uniqueConstrainsRows) {
106213
105953
  const columnName = unqs.column_name;
106214
105954
  const constraintName = unqs.constraint_name;
106215
- if (typeof uniqueConstraints[constraintName] !== "undefined") {
106216
- uniqueConstraints[constraintName].columns.push(columnName);
105955
+ if (typeof uniqueConstrains[constraintName] !== "undefined") {
105956
+ uniqueConstrains[constraintName].columns.push(columnName);
106217
105957
  } else {
106218
- uniqueConstraints[constraintName] = {
105958
+ uniqueConstrains[constraintName] = {
106219
105959
  columns: [columnName],
106220
105960
  nullsNotDistinct: false,
106221
105961
  name: constraintName
106222
105962
  };
106223
105963
  }
106224
105964
  }
106225
- checksCount += tableChecks.length;
106226
- if (progressCallback) {
106227
- progressCallback("checks", checksCount, "fetching");
106228
- }
106229
- for (const checks of tableChecks) {
106230
- let checkValue = checks.constraint_definition;
106231
- const constraintName = checks.constraint_name;
106232
- checkValue = checkValue.replace(/^CHECK\s*\(\(/, "").replace(/\)\)\s*$/, "");
106233
- checkConstraints[constraintName] = {
106234
- name: constraintName,
106235
- value: checkValue
106236
- };
106237
- }
106238
105965
  for (const columnResponse of tableResponse) {
106239
105966
  const columnName = columnResponse.attname;
106240
105967
  const columnAdditionalDT = columnResponse.additional_dt;
@@ -106478,8 +106205,7 @@ ${withStyle.errorWarning(
106478
106205
  indexes: indexToReturn,
106479
106206
  foreignKeys: foreignKeysToReturn,
106480
106207
  compositePrimaryKeys: primaryKeys,
106481
- uniqueConstraints,
106482
- checkConstraints
106208
+ uniqueConstraints: uniqueConstrains
106483
106209
  };
106484
106210
  } catch (e5) {
106485
106211
  rej(e5);
@@ -106497,7 +106223,6 @@ ${withStyle.errorWarning(
106497
106223
  progressCallback("columns", columnsCount, "done");
106498
106224
  progressCallback("indexes", indexesCount, "done");
106499
106225
  progressCallback("fks", foreignKeysCount, "done");
106500
- progressCallback("checks", checksCount, "done");
106501
106226
  }
106502
106227
  const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
106503
106228
  return {
@@ -106702,13 +106427,10 @@ var init_sqliteSerializer = __esm({
106702
106427
  const foreignKeysObject = {};
106703
106428
  const primaryKeysObject = {};
106704
106429
  const uniqueConstraintObject = {};
106705
- const checkConstraintObject = {};
106706
- const checksInTable = {};
106707
106430
  const {
106708
106431
  name: tableName,
106709
106432
  columns,
106710
106433
  indexes,
106711
- checks,
106712
106434
  foreignKeys: tableForeignKeys,
106713
106435
  primaryKeys,
106714
106436
  uniqueConstraints
@@ -106865,39 +106587,13 @@ The unique constraint ${source_default.underline.blue(
106865
106587
  columnsObject[it.columns[0].name].primaryKey = true;
106866
106588
  }
106867
106589
  });
106868
- checks.forEach((check) => {
106869
- const checkName = check.name;
106870
- if (typeof checksInTable[tableName] !== "undefined") {
106871
- if (checksInTable[tableName].includes(check.name)) {
106872
- console.log(
106873
- `
106874
- ${withStyle.errorWarning(
106875
- `We've found duplicated check constraint name in ${source_default.underline.blue(
106876
- tableName
106877
- )}. Please rename your check constraint in the ${source_default.underline.blue(
106878
- tableName
106879
- )} table`
106880
- )}`
106881
- );
106882
- process.exit(1);
106883
- }
106884
- checksInTable[tableName].push(checkName);
106885
- } else {
106886
- checksInTable[tableName] = [check.name];
106887
- }
106888
- checkConstraintObject[checkName] = {
106889
- name: checkName,
106890
- value: dialect5.sqlToQuery(check.value).sql
106891
- };
106892
- });
106893
106590
  result[tableName] = {
106894
106591
  name: tableName,
106895
106592
  columns: columnsObject,
106896
106593
  indexes: indexesObject,
106897
106594
  foreignKeys: foreignKeysObject,
106898
106595
  compositePrimaryKeys: primaryKeysObject,
106899
- uniqueConstraints: uniqueConstraintObject,
106900
- checkConstraints: checkConstraintObject
106596
+ uniqueConstraints: uniqueConstraintObject
106901
106597
  };
106902
106598
  }
106903
106599
  return {
@@ -106944,7 +106640,6 @@ ${withStyle.errorWarning(
106944
106640
  let tablesCount = /* @__PURE__ */ new Set();
106945
106641
  let indexesCount = 0;
106946
106642
  let foreignKeysCount = 0;
106947
- let checksCount = 0;
106948
106643
  const tableToPk = {};
106949
106644
  let tableToGeneratedColumnsInfo = {};
106950
106645
  for (const column4 of columns) {
@@ -107002,8 +106697,7 @@ ${withStyle.errorWarning(
107002
106697
  compositePrimaryKeys: {},
107003
106698
  indexes: {},
107004
106699
  foreignKeys: {},
107005
- uniqueConstraints: {},
107006
- checkConstraints: {}
106700
+ uniqueConstraints: {}
107007
106701
  };
107008
106702
  } else {
107009
106703
  result[tableName].columns[columnName] = newColumn;
@@ -107117,56 +106811,6 @@ WHERE
107117
106811
  progressCallback("indexes", indexesCount, "done");
107118
106812
  progressCallback("enums", 0, "done");
107119
106813
  }
107120
- const namedCheckPattern = /CONSTRAINT\s*["']?(\w+)["']?\s*CHECK\s*\((.*?)\)/gi;
107121
- const unnamedCheckPattern = /CHECK\s*\((.*?)\)/gi;
107122
- let checkCounter = 0;
107123
- const checkConstraints = {};
107124
- const checks = await db2.query(`SELECT name as "tableName", sql as "sql"
107125
- FROM sqlite_master
107126
- WHERE type = 'table' AND name != 'sqlite_sequence';`);
107127
- for (const check of checks) {
107128
- if (!tablesFilter(check.tableName)) continue;
107129
- const { tableName, sql: sql3 } = check;
107130
- let namedChecks = [...sql3.matchAll(namedCheckPattern)];
107131
- if (namedChecks.length > 0) {
107132
- namedChecks.forEach(([_3, checkName, checkValue]) => {
107133
- checkConstraints[checkName] = {
107134
- name: checkName,
107135
- value: checkValue.trim()
107136
- };
107137
- });
107138
- } else {
107139
- let unnamedChecks = [...sql3.matchAll(unnamedCheckPattern)];
107140
- unnamedChecks.forEach(([_3, checkValue]) => {
107141
- let checkName = `${tableName}_check_${++checkCounter}`;
107142
- checkConstraints[checkName] = {
107143
- name: checkName,
107144
- value: checkValue.trim()
107145
- };
107146
- });
107147
- }
107148
- checksCount += Object.values(checkConstraints).length;
107149
- if (progressCallback) {
107150
- progressCallback("checks", checksCount, "fetching");
107151
- }
107152
- const table4 = result[tableName];
107153
- if (!table4) {
107154
- result[tableName] = {
107155
- name: tableName,
107156
- columns: {},
107157
- compositePrimaryKeys: {},
107158
- indexes: {},
107159
- foreignKeys: {},
107160
- uniqueConstraints: {},
107161
- checkConstraints
107162
- };
107163
- } else {
107164
- result[tableName].checkConstraints = checkConstraints;
107165
- }
107166
- }
107167
- if (progressCallback) {
107168
- progressCallback("checks", checksCount, "done");
107169
- }
107170
106814
  return {
107171
106815
  version: "6",
107172
106816
  dialect: "sqlite",
@@ -108608,7 +108252,6 @@ var init_mysqlSerializer = __esm({
108608
108252
  indexes,
108609
108253
  foreignKeys,
108610
108254
  schema: schema4,
108611
- checks,
108612
108255
  primaryKeys,
108613
108256
  uniqueConstraints
108614
108257
  } = getTableConfig3(table4);
@@ -108617,8 +108260,6 @@ var init_mysqlSerializer = __esm({
108617
108260
  const foreignKeysObject = {};
108618
108261
  const primaryKeysObject = {};
108619
108262
  const uniqueConstraintObject = {};
108620
- const checkConstraintObject = {};
108621
- let checksInTable = {};
108622
108263
  columns.forEach((column4) => {
108623
108264
  const notNull = column4.notNull;
108624
108265
  const sqlTypeLowered = column4.getSQLType().toLowerCase();
@@ -108831,32 +108472,6 @@ We have encountered a collision between the index name on columns ${source_defau
108831
108472
  lock: value.config.lock
108832
108473
  };
108833
108474
  });
108834
- checks.forEach((check) => {
108835
- check;
108836
- const checkName = check.name;
108837
- if (typeof checksInTable[tableName] !== "undefined") {
108838
- if (checksInTable[tableName].includes(check.name)) {
108839
- console.log(
108840
- `
108841
- ${withStyle.errorWarning(
108842
- `We've found duplicated check constraint name in ${source_default.underline.blue(
108843
- tableName
108844
- )}. Please rename your check constraint in the ${source_default.underline.blue(
108845
- tableName
108846
- )} table`
108847
- )}`
108848
- );
108849
- process.exit(1);
108850
- }
108851
- checksInTable[tableName].push(checkName);
108852
- } else {
108853
- checksInTable[tableName] = [check.name];
108854
- }
108855
- checkConstraintObject[checkName] = {
108856
- name: checkName,
108857
- value: dialect6.sqlToQuery(check.value).sql
108858
- };
108859
- });
108860
108475
  if (!schema4) {
108861
108476
  result[tableName] = {
108862
108477
  name: tableName,
@@ -108864,8 +108479,7 @@ ${withStyle.errorWarning(
108864
108479
  indexes: indexesObject,
108865
108480
  foreignKeys: foreignKeysObject,
108866
108481
  compositePrimaryKeys: primaryKeysObject,
108867
- uniqueConstraints: uniqueConstraintObject,
108868
- checkConstraint: checkConstraintObject
108482
+ uniqueConstraints: uniqueConstraintObject
108869
108483
  };
108870
108484
  }
108871
108485
  }
@@ -108892,7 +108506,6 @@ ${withStyle.errorWarning(
108892
108506
  let tablesCount = /* @__PURE__ */ new Set();
108893
108507
  let indexesCount = 0;
108894
108508
  let foreignKeysCount = 0;
108895
- let checksCount = 0;
108896
108509
  const idxs = await db2.query(
108897
108510
  `select * from INFORMATION_SCHEMA.STATISTICS
108898
108511
  WHERE INFORMATION_SCHEMA.STATISTICS.TABLE_SCHEMA = '${inputSchema}' and INFORMATION_SCHEMA.STATISTICS.INDEX_NAME != 'PRIMARY';`
@@ -108987,8 +108600,7 @@ ${withStyle.errorWarning(
108987
108600
  compositePrimaryKeys: {},
108988
108601
  indexes: {},
108989
108602
  foreignKeys: {},
108990
- uniqueConstraints: {},
108991
- checkConstraint: {}
108603
+ uniqueConstraints: {}
108992
108604
  };
108993
108605
  } else {
108994
108606
  result[tableName].columns[columnName] = newColumn;
@@ -109137,38 +108749,6 @@ ${withStyle.errorWarning(
109137
108749
  progressCallback("indexes", indexesCount, "done");
109138
108750
  progressCallback("enums", 0, "done");
109139
108751
  }
109140
- const checkConstraints = await db2.query(
109141
- `SELECT
109142
- tc.table_name,
109143
- tc.constraint_name,
109144
- cc.check_clause
109145
- FROM
109146
- information_schema.table_constraints tc
109147
- JOIN
109148
- information_schema.check_constraints cc
109149
- ON tc.constraint_name = cc.constraint_name
109150
- WHERE
109151
- tc.constraint_schema = '${inputSchema}'
109152
- AND
109153
- tc.constraint_type = 'CHECK';`
109154
- );
109155
- checksCount += checkConstraints.length;
109156
- if (progressCallback) {
109157
- progressCallback("checks", checksCount, "fetching");
109158
- }
109159
- for (const checkConstraintRow of checkConstraints) {
109160
- const constraintName = checkConstraintRow["CONSTRAINT_NAME"];
109161
- const constraintValue = checkConstraintRow["CHECK_CLAUSE"];
109162
- const tableName = checkConstraintRow["TABLE_NAME"];
109163
- const tableInResult = result[tableName];
109164
- tableInResult.checkConstraint[constraintName] = {
109165
- name: constraintName,
109166
- value: constraintValue
109167
- };
109168
- }
109169
- if (progressCallback) {
109170
- progressCallback("checks", checksCount, "done");
109171
- }
109172
108752
  return {
109173
108753
  version: "5",
109174
108754
  dialect: "mysql",