drizzle-kit 0.25.0-178591 → 0.25.0-680d055

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 +529 -1011
  4. package/api.mjs +528 -1010
  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)) {
@@ -29444,6 +29099,7 @@ var init_db = __esm({
29444
29099
  init_entity();
29445
29100
  init_query_builders();
29446
29101
  init_selection_proxy();
29102
+ init_sql();
29447
29103
  init_subquery();
29448
29104
  init_count();
29449
29105
  init_query();
@@ -29698,8 +29354,8 @@ var init_db = __esm({
29698
29354
  return new PgRefreshMaterializedView(view, this.session, this.dialect);
29699
29355
  }
29700
29356
  execute(query) {
29701
- const sql3 = query.getSQL();
29702
- const builtQuery = this.dialect.sqlToQuery(sql3);
29357
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
29358
+ const builtQuery = this.dialect.sqlToQuery(sequel);
29703
29359
  const prepared = this.session.prepareQuery(
29704
29360
  builtQuery,
29705
29361
  void 0,
@@ -29708,7 +29364,7 @@ var init_db = __esm({
29708
29364
  );
29709
29365
  return new PgRaw(
29710
29366
  () => prepared.execute(),
29711
- sql3,
29367
+ sequel,
29712
29368
  builtQuery,
29713
29369
  (result) => prepared.mapResult(result, true)
29714
29370
  );
@@ -30557,7 +30213,9 @@ function drizzle(client, config = {}) {
30557
30213
  }
30558
30214
  const driver2 = new NodePgDriver(client, dialect7, { logger: logger2 });
30559
30215
  const session = driver2.createSession(schema4);
30560
- return new NodePgDatabase(dialect7, session, schema4);
30216
+ const db2 = new NodePgDatabase(dialect7, session, schema4);
30217
+ db2.$client = client;
30218
+ return db2;
30561
30219
  }
30562
30220
  var import_pg2, types, _a162, NodePgDriver, _a163, _b117, NodePgDatabase;
30563
30221
  var init_driver = __esm({
@@ -31647,18 +31305,18 @@ var init_getAttrPathList = __esm({
31647
31305
  "../node_modules/.pnpm/@smithy+util-endpoints@2.0.0/node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js"() {
31648
31306
  "use strict";
31649
31307
  init_types2();
31650
- getAttrPathList = (path3) => {
31651
- const parts = path3.split(".");
31308
+ getAttrPathList = (path2) => {
31309
+ const parts = path2.split(".");
31652
31310
  const pathList = [];
31653
31311
  for (const part of parts) {
31654
31312
  const squareBracketIndex = part.indexOf("[");
31655
31313
  if (squareBracketIndex !== -1) {
31656
31314
  if (part.indexOf("]") !== part.length - 1) {
31657
- throw new EndpointError(`Path: '${path3}' does not end with ']'`);
31315
+ throw new EndpointError(`Path: '${path2}' does not end with ']'`);
31658
31316
  }
31659
31317
  const arrayIndex = part.slice(squareBracketIndex + 1, -1);
31660
31318
  if (Number.isNaN(parseInt(arrayIndex))) {
31661
- throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path3}'`);
31319
+ throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path2}'`);
31662
31320
  }
31663
31321
  if (squareBracketIndex !== 0) {
31664
31322
  pathList.push(part.slice(0, squareBracketIndex));
@@ -31680,9 +31338,9 @@ var init_getAttr = __esm({
31680
31338
  "use strict";
31681
31339
  init_types2();
31682
31340
  init_getAttrPathList();
31683
- getAttr = (value, path3) => getAttrPathList(path3).reduce((acc, index4) => {
31341
+ getAttr = (value, path2) => getAttrPathList(path2).reduce((acc, index4) => {
31684
31342
  if (typeof acc !== "object") {
31685
- throw new EndpointError(`Index '${index4}' in '${path3}' not found in '${JSON.stringify(value)}'`);
31343
+ throw new EndpointError(`Index '${index4}' in '${path2}' not found in '${JSON.stringify(value)}'`);
31686
31344
  } else if (Array.isArray(acc)) {
31687
31345
  return acc[parseInt(index4)];
31688
31346
  }
@@ -31727,8 +31385,8 @@ var init_parseURL = __esm({
31727
31385
  return value;
31728
31386
  }
31729
31387
  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}`);
31388
+ const { hostname: hostname2, port, protocol: protocol3 = "", path: path2 = "", query = {} } = value;
31389
+ const url = new URL(`${protocol3}//${hostname2}${port ? `:${port}` : ""}${path2}`);
31732
31390
  url.search = Object.entries(query).map(([k6, v8]) => `${k6}=${v8}`).join("&");
31733
31391
  return url;
31734
31392
  }
@@ -33184,8 +32842,8 @@ var init_createConfigValueProvider = __esm({
33184
32842
  return endpoint.url.href;
33185
32843
  }
33186
32844
  if ("hostname" in endpoint) {
33187
- const { protocol: protocol2, hostname, port, path: path3 } = endpoint;
33188
- return `${protocol2}//${hostname}${port ? ":" + port : ""}${path3}`;
32845
+ const { protocol: protocol2, hostname, port, path: path2 } = endpoint;
32846
+ return `${protocol2}//${hostname}${port ? ":" + port : ""}${path2}`;
33189
32847
  }
33190
32848
  }
33191
32849
  return endpoint;
@@ -33557,11 +33215,11 @@ var init_slurpFile = __esm({
33557
33215
  import_fs2 = require("fs");
33558
33216
  ({ readFile: readFile2 } = import_fs2.promises);
33559
33217
  filePromisesHash = {};
33560
- slurpFile = (path3, options) => {
33561
- if (!filePromisesHash[path3] || options?.ignoreCache) {
33562
- filePromisesHash[path3] = readFile2(path3, "utf8");
33218
+ slurpFile = (path2, options) => {
33219
+ if (!filePromisesHash[path2] || options?.ignoreCache) {
33220
+ filePromisesHash[path2] = readFile2(path2, "utf8");
33563
33221
  }
33564
- return filePromisesHash[path3];
33222
+ return filePromisesHash[path2];
33565
33223
  };
33566
33224
  }
33567
33225
  });
@@ -35625,18 +35283,18 @@ var init_node_http_handler = __esm({
35625
35283
  const password = request2.password ?? "";
35626
35284
  auth = `${username}:${password}`;
35627
35285
  }
35628
- let path3 = request2.path;
35286
+ let path2 = request2.path;
35629
35287
  if (queryString) {
35630
- path3 += `?${queryString}`;
35288
+ path2 += `?${queryString}`;
35631
35289
  }
35632
35290
  if (request2.fragment) {
35633
- path3 += `#${request2.fragment}`;
35291
+ path2 += `#${request2.fragment}`;
35634
35292
  }
35635
35293
  const nodeHttpsOptions = {
35636
35294
  headers: request2.headers,
35637
35295
  host: request2.hostname,
35638
35296
  method: request2.method,
35639
- path: path3,
35297
+ path: path2,
35640
35298
  port: request2.port,
35641
35299
  agent,
35642
35300
  auth
@@ -37637,8 +37295,8 @@ var init_requestBuilder = __esm({
37637
37295
  return this;
37638
37296
  }
37639
37297
  p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
37640
- this.resolvePathStack.push((path3) => {
37641
- this.path = resolvedPath(path3, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
37298
+ this.resolvePathStack.push((path2) => {
37299
+ this.path = resolvedPath(path2, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
37642
37300
  });
37643
37301
  return this;
37644
37302
  }
@@ -37693,9 +37351,9 @@ var init_createPaginator = __esm({
37693
37351
  makePagedClientRequest = async (CommandCtor, client, input, ...args) => {
37694
37352
  return await client.send(new CommandCtor(input), ...args);
37695
37353
  };
37696
- get = (fromObject, path3) => {
37354
+ get = (fromObject, path2) => {
37697
37355
  let cursor = fromObject;
37698
- const pathComponents = path3.split(".");
37356
+ const pathComponents = path2.split(".");
37699
37357
  for (const step of pathComponents) {
37700
37358
  if (!cursor || typeof cursor !== "object") {
37701
37359
  return void 0;
@@ -38852,10 +38510,10 @@ ${longDate}
38852
38510
  ${credentialScope}
38853
38511
  ${toHex(hashedRequest)}`;
38854
38512
  }
38855
- getCanonicalPath({ path: path3 }) {
38513
+ getCanonicalPath({ path: path2 }) {
38856
38514
  if (this.uriEscapePath) {
38857
38515
  const normalizedPathSegments = [];
38858
- for (const pathSegment of path3.split("/")) {
38516
+ for (const pathSegment of path2.split("/")) {
38859
38517
  if (pathSegment?.length === 0)
38860
38518
  continue;
38861
38519
  if (pathSegment === ".")
@@ -38866,11 +38524,11 @@ ${toHex(hashedRequest)}`;
38866
38524
  normalizedPathSegments.push(pathSegment);
38867
38525
  }
38868
38526
  }
38869
- const normalizedPath = `${path3?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path3?.endsWith("/") ? "/" : ""}`;
38527
+ const normalizedPath = `${path2?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path2?.endsWith("/") ? "/" : ""}`;
38870
38528
  const doubleEncoded = escapeUri(normalizedPath);
38871
38529
  return doubleEncoded.replace(/%2F/g, "/");
38872
38530
  }
38873
- return path3;
38531
+ return path2;
38874
38532
  }
38875
38533
  async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
38876
38534
  const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);
@@ -41909,7 +41567,7 @@ var init_constants7 = __esm({
41909
41567
  }
41910
41568
  });
41911
41569
 
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
41570
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js
41913
41571
  function createAwsAuthSigv4HttpAuthOption2(authParameters) {
41914
41572
  return {
41915
41573
  schemeId: "aws.auth#sigv4",
@@ -41932,7 +41590,7 @@ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
41932
41590
  }
41933
41591
  var import_core2, defaultSSOOIDCHttpAuthSchemeParametersProvider, defaultSSOOIDCHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig2;
41934
41592
  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"() {
41593
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js"() {
41936
41594
  "use strict";
41937
41595
  import_core2 = __toESM(require_dist_cjs());
41938
41596
  init_dist_es10();
@@ -41974,10 +41632,10 @@ var init_httpAuthSchemeProvider2 = __esm({
41974
41632
  }
41975
41633
  });
41976
41634
 
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
41635
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js
41978
41636
  var resolveClientEndpointParameters2, commonParams2;
41979
41637
  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"() {
41638
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js"() {
41981
41639
  "use strict";
41982
41640
  resolveClientEndpointParameters2 = (options) => {
41983
41641
  return {
@@ -41996,10 +41654,10 @@ var init_EndpointParameters2 = __esm({
41996
41654
  }
41997
41655
  });
41998
41656
 
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
41657
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
42000
41658
  var package_default2;
42001
41659
  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"() {
41660
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"() {
42003
41661
  package_default2 = {
42004
41662
  name: "@aws-sdk/client-sso-oidc",
42005
41663
  description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
@@ -42252,10 +41910,10 @@ var init_dist_es42 = __esm({
42252
41910
  }
42253
41911
  });
42254
41912
 
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
41913
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js
42256
41914
  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
41915
  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"() {
41916
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js"() {
42259
41917
  "use strict";
42260
41918
  u = "required";
42261
41919
  v = "fn";
@@ -42286,10 +41944,10 @@ var init_ruleset = __esm({
42286
41944
  }
42287
41945
  });
42288
41946
 
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
41947
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js
42290
41948
  var defaultEndpointResolver;
42291
41949
  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"() {
41950
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js"() {
42293
41951
  "use strict";
42294
41952
  init_dist_es7();
42295
41953
  init_dist_es6();
@@ -42304,10 +41962,10 @@ var init_endpointResolver = __esm({
42304
41962
  }
42305
41963
  });
42306
41964
 
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
41965
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js
42308
41966
  var import_core3, getRuntimeConfig;
42309
41967
  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"() {
41968
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js"() {
42311
41969
  "use strict";
42312
41970
  import_core3 = __toESM(require_dist_cjs());
42313
41971
  init_dist_es34();
@@ -42447,10 +42105,10 @@ var init_dist_es43 = __esm({
42447
42105
  }
42448
42106
  });
42449
42107
 
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
42108
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js
42451
42109
  var import_core5, getRuntimeConfig2;
42452
42110
  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"() {
42111
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js"() {
42454
42112
  "use strict";
42455
42113
  init_package2();
42456
42114
  import_core5 = __toESM(require_dist_cjs());
@@ -42579,10 +42237,10 @@ var init_dist_es44 = __esm({
42579
42237
  }
42580
42238
  });
42581
42239
 
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
42240
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js
42583
42241
  var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig;
42584
42242
  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"() {
42243
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js"() {
42586
42244
  "use strict";
42587
42245
  getHttpAuthExtensionConfiguration = (runtimeConfig) => {
42588
42246
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
@@ -42624,10 +42282,10 @@ var init_httpAuthExtensionConfiguration = __esm({
42624
42282
  }
42625
42283
  });
42626
42284
 
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
42285
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js
42628
42286
  var asPartial, resolveRuntimeExtensions;
42629
42287
  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"() {
42288
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js"() {
42631
42289
  "use strict";
42632
42290
  init_dist_es44();
42633
42291
  init_dist_es2();
@@ -42653,10 +42311,10 @@ var init_runtimeExtensions = __esm({
42653
42311
  }
42654
42312
  });
42655
42313
 
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
42314
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js
42657
42315
  var SSOOIDCClient;
42658
42316
  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"() {
42317
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js"() {
42660
42318
  "use strict";
42661
42319
  init_dist_es3();
42662
42320
  init_dist_es4();
@@ -42712,10 +42370,10 @@ var init_SSOOIDCClient = __esm({
42712
42370
  }
42713
42371
  });
42714
42372
 
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
42373
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js
42716
42374
  var SSOOIDCServiceException;
42717
42375
  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"() {
42376
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js"() {
42719
42377
  "use strict";
42720
42378
  init_dist_es32();
42721
42379
  SSOOIDCServiceException = class _SSOOIDCServiceException extends ServiceException {
@@ -42727,10 +42385,10 @@ var init_SSOOIDCServiceException = __esm({
42727
42385
  }
42728
42386
  });
42729
42387
 
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
42388
+ // ../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
42389
  var AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidGrantException, InvalidRequestException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, InvalidRequestRegionException, InvalidClientMetadataException, InvalidRedirectUriException, CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog, CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog, RegisterClientResponseFilterSensitiveLog, StartDeviceAuthorizationRequestFilterSensitiveLog;
42732
42390
  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"() {
42391
+ "../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
42392
  "use strict";
42735
42393
  init_dist_es32();
42736
42394
  init_SSOOIDCServiceException();
@@ -42968,10 +42626,10 @@ var init_models_0 = __esm({
42968
42626
  }
42969
42627
  });
42970
42628
 
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
42629
+ // ../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
42630
  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
42631
  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"() {
42632
+ "../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
42633
  "use strict";
42976
42634
  import_core7 = __toESM(require_dist_cjs());
42977
42635
  init_dist_es34();
@@ -43402,10 +43060,10 @@ var init_Aws_restJson1 = __esm({
43402
43060
  }
43403
43061
  });
43404
43062
 
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
43063
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js
43406
43064
  var CreateTokenCommand;
43407
43065
  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"() {
43066
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js"() {
43409
43067
  "use strict";
43410
43068
  init_dist_es18();
43411
43069
  init_dist_es17();
@@ -43425,10 +43083,10 @@ var init_CreateTokenCommand = __esm({
43425
43083
  }
43426
43084
  });
43427
43085
 
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
43086
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js
43429
43087
  var CreateTokenWithIAMCommand;
43430
43088
  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"() {
43089
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js"() {
43432
43090
  "use strict";
43433
43091
  init_dist_es18();
43434
43092
  init_dist_es17();
@@ -43448,10 +43106,10 @@ var init_CreateTokenWithIAMCommand = __esm({
43448
43106
  }
43449
43107
  });
43450
43108
 
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
43109
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js
43452
43110
  var RegisterClientCommand;
43453
43111
  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"() {
43112
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js"() {
43455
43113
  "use strict";
43456
43114
  init_dist_es18();
43457
43115
  init_dist_es17();
@@ -43471,10 +43129,10 @@ var init_RegisterClientCommand = __esm({
43471
43129
  }
43472
43130
  });
43473
43131
 
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
43132
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js
43475
43133
  var StartDeviceAuthorizationCommand;
43476
43134
  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"() {
43135
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js"() {
43478
43136
  "use strict";
43479
43137
  init_dist_es18();
43480
43138
  init_dist_es17();
@@ -43494,10 +43152,10 @@ var init_StartDeviceAuthorizationCommand = __esm({
43494
43152
  }
43495
43153
  });
43496
43154
 
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
43155
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js
43498
43156
  var commands, SSOOIDC;
43499
43157
  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"() {
43158
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js"() {
43501
43159
  "use strict";
43502
43160
  init_dist_es32();
43503
43161
  init_CreateTokenCommand();
@@ -43517,9 +43175,9 @@ var init_SSOOIDC = __esm({
43517
43175
  }
43518
43176
  });
43519
43177
 
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
43178
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js
43521
43179
  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"() {
43180
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js"() {
43523
43181
  "use strict";
43524
43182
  init_CreateTokenCommand();
43525
43183
  init_CreateTokenWithIAMCommand();
@@ -43528,15 +43186,15 @@ var init_commands = __esm({
43528
43186
  }
43529
43187
  });
43530
43188
 
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
43189
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js
43532
43190
  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"() {
43191
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js"() {
43534
43192
  "use strict";
43535
43193
  init_models_0();
43536
43194
  }
43537
43195
  });
43538
43196
 
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
43197
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js
43540
43198
  var dist_es_exports8 = {};
43541
43199
  __export(dist_es_exports8, {
43542
43200
  $Command: () => Command,
@@ -43570,7 +43228,7 @@ __export(dist_es_exports8, {
43570
43228
  __Client: () => Client
43571
43229
  });
43572
43230
  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"() {
43231
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js"() {
43574
43232
  "use strict";
43575
43233
  init_SSOOIDCClient();
43576
43234
  init_SSOOIDC();
@@ -44945,7 +44603,7 @@ var init_resolveCredentialSource = __esm({
44945
44603
  }
44946
44604
  });
44947
44605
 
44948
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js
44606
+ // ../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
44607
  function createAwsAuthSigv4HttpAuthOption4(authParameters) {
44950
44608
  return {
44951
44609
  schemeId: "aws.auth#sigv4",
@@ -44968,7 +44626,7 @@ function createSmithyApiNoAuthHttpAuthOption3(authParameters) {
44968
44626
  }
44969
44627
  var import_core18, defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeProvider, resolveStsAuthConfig, resolveHttpAuthSchemeConfig4;
44970
44628
  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"() {
44629
+ "../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
44630
  "use strict";
44973
44631
  import_core18 = __toESM(require_dist_cjs());
44974
44632
  init_dist_es10();
@@ -45012,10 +44670,10 @@ var init_httpAuthSchemeProvider4 = __esm({
45012
44670
  }
45013
44671
  });
45014
44672
 
45015
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js
44673
+ // ../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
44674
  var resolveClientEndpointParameters4, commonParams4;
45017
44675
  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"() {
44676
+ "../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
44677
  "use strict";
45020
44678
  resolveClientEndpointParameters4 = (options) => {
45021
44679
  return {
@@ -45036,10 +44694,10 @@ var init_EndpointParameters4 = __esm({
45036
44694
  }
45037
44695
  });
45038
44696
 
45039
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json
44697
+ // ../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
44698
  var package_default4;
45041
44699
  var init_package4 = __esm({
45042
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json"() {
44700
+ "../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
44701
  package_default4 = {
45044
44702
  name: "@aws-sdk/client-sts",
45045
44703
  description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
@@ -45145,10 +44803,10 @@ var init_package4 = __esm({
45145
44803
  }
45146
44804
  });
45147
44805
 
45148
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js
44806
+ // ../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
44807
  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
44808
  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"() {
44809
+ "../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
44810
  "use strict";
45153
44811
  F = "required";
45154
44812
  G = "type";
@@ -45191,10 +44849,10 @@ var init_ruleset3 = __esm({
45191
44849
  }
45192
44850
  });
45193
44851
 
45194
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js
44852
+ // ../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
44853
  var defaultEndpointResolver3;
45196
44854
  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"() {
44855
+ "../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
44856
  "use strict";
45199
44857
  init_dist_es7();
45200
44858
  init_dist_es6();
@@ -45209,10 +44867,10 @@ var init_endpointResolver3 = __esm({
45209
44867
  }
45210
44868
  });
45211
44869
 
45212
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js
44870
+ // ../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
44871
  var import_core19, getRuntimeConfig5;
45214
44872
  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"() {
44873
+ "../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
44874
  "use strict";
45217
44875
  import_core19 = __toESM(require_dist_cjs());
45218
44876
  init_dist_es34();
@@ -45253,10 +44911,10 @@ var init_runtimeConfig_shared3 = __esm({
45253
44911
  }
45254
44912
  });
45255
44913
 
45256
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js
44914
+ // ../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
44915
  var import_core21, getRuntimeConfig6;
45258
44916
  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"() {
44917
+ "../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
44918
  "use strict";
45261
44919
  init_package4();
45262
44920
  import_core21 = __toESM(require_dist_cjs());
@@ -45316,10 +44974,10 @@ var init_runtimeConfig3 = __esm({
45316
44974
  }
45317
44975
  });
45318
44976
 
45319
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js
44977
+ // ../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
44978
  var getHttpAuthExtensionConfiguration3, resolveHttpAuthRuntimeConfig3;
45321
44979
  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"() {
44980
+ "../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
44981
  "use strict";
45324
44982
  getHttpAuthExtensionConfiguration3 = (runtimeConfig) => {
45325
44983
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
@@ -45361,10 +45019,10 @@ var init_httpAuthExtensionConfiguration3 = __esm({
45361
45019
  }
45362
45020
  });
45363
45021
 
45364
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js
45022
+ // ../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
45023
  var asPartial3, resolveRuntimeExtensions3;
45366
45024
  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"() {
45025
+ "../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
45026
  "use strict";
45369
45027
  init_dist_es44();
45370
45028
  init_dist_es2();
@@ -45390,10 +45048,10 @@ var init_runtimeExtensions3 = __esm({
45390
45048
  }
45391
45049
  });
45392
45050
 
45393
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js
45051
+ // ../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
45052
  var STSClient;
45395
45053
  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"() {
45054
+ "../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
45055
  "use strict";
45398
45056
  init_dist_es3();
45399
45057
  init_dist_es4();
@@ -45449,10 +45107,10 @@ var init_STSClient = __esm({
45449
45107
  }
45450
45108
  });
45451
45109
 
45452
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js
45110
+ // ../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
45111
  var STSServiceException;
45454
45112
  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"() {
45113
+ "../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
45114
  "use strict";
45457
45115
  init_dist_es32();
45458
45116
  STSServiceException = class _STSServiceException extends ServiceException {
@@ -45464,10 +45122,10 @@ var init_STSServiceException = __esm({
45464
45122
  }
45465
45123
  });
45466
45124
 
45467
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js
45125
+ // ../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
45126
  var ExpiredTokenException2, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, IDPRejectedClaimException, InvalidIdentityTokenException, IDPCommunicationErrorException, InvalidAuthorizationMessageException, CredentialsFilterSensitiveLog, AssumeRoleResponseFilterSensitiveLog, AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog, AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog, GetFederationTokenResponseFilterSensitiveLog, GetSessionTokenResponseFilterSensitiveLog;
45469
45127
  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"() {
45128
+ "../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
45129
  "use strict";
45472
45130
  init_dist_es32();
45473
45131
  init_STSServiceException();
@@ -45602,10 +45260,10 @@ var init_models_03 = __esm({
45602
45260
  }
45603
45261
  });
45604
45262
 
45605
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js
45263
+ // ../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
45264
  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
45265
  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"() {
45266
+ "../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
45267
  "use strict";
45610
45268
  import_core24 = __toESM(require_dist_cjs());
45611
45269
  init_dist_es2();
@@ -46403,14 +46061,14 @@ var init_Aws_query = __esm({
46403
46061
  cfId: output.headers["x-amz-cf-id"]
46404
46062
  });
46405
46063
  throwDefaultError4 = withBaseException(STSServiceException);
46406
- buildHttpRpcRequest = async (context, headers, path3, resolvedHostname, body) => {
46064
+ buildHttpRpcRequest = async (context, headers, path2, resolvedHostname, body) => {
46407
46065
  const { hostname, protocol: protocol2 = "https", port, path: basePath } = await context.endpoint();
46408
46066
  const contents = {
46409
46067
  protocol: protocol2,
46410
46068
  hostname,
46411
46069
  port,
46412
46070
  method: "POST",
46413
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path3 : basePath + path3,
46071
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path2 : basePath + path2,
46414
46072
  headers
46415
46073
  };
46416
46074
  if (resolvedHostname !== void 0) {
@@ -46492,10 +46150,10 @@ var init_Aws_query = __esm({
46492
46150
  }
46493
46151
  });
46494
46152
 
46495
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js
46153
+ // ../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
46154
  var AssumeRoleCommand;
46497
46155
  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"() {
46156
+ "../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
46157
  "use strict";
46500
46158
  init_dist_es18();
46501
46159
  init_dist_es17();
@@ -46515,10 +46173,10 @@ var init_AssumeRoleCommand = __esm({
46515
46173
  }
46516
46174
  });
46517
46175
 
46518
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js
46176
+ // ../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
46177
  var AssumeRoleWithSAMLCommand;
46520
46178
  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"() {
46179
+ "../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
46180
  "use strict";
46523
46181
  init_dist_es18();
46524
46182
  init_dist_es17();
@@ -46538,10 +46196,10 @@ var init_AssumeRoleWithSAMLCommand = __esm({
46538
46196
  }
46539
46197
  });
46540
46198
 
46541
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js
46199
+ // ../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
46200
  var AssumeRoleWithWebIdentityCommand;
46543
46201
  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"() {
46202
+ "../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
46203
  "use strict";
46546
46204
  init_dist_es18();
46547
46205
  init_dist_es17();
@@ -46561,10 +46219,10 @@ var init_AssumeRoleWithWebIdentityCommand = __esm({
46561
46219
  }
46562
46220
  });
46563
46221
 
46564
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js
46222
+ // ../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
46223
  var DecodeAuthorizationMessageCommand;
46566
46224
  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"() {
46225
+ "../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
46226
  "use strict";
46569
46227
  init_dist_es18();
46570
46228
  init_dist_es17();
@@ -46583,10 +46241,10 @@ var init_DecodeAuthorizationMessageCommand = __esm({
46583
46241
  }
46584
46242
  });
46585
46243
 
46586
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js
46244
+ // ../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
46245
  var GetAccessKeyInfoCommand;
46588
46246
  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"() {
46247
+ "../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
46248
  "use strict";
46591
46249
  init_dist_es18();
46592
46250
  init_dist_es17();
@@ -46605,10 +46263,10 @@ var init_GetAccessKeyInfoCommand = __esm({
46605
46263
  }
46606
46264
  });
46607
46265
 
46608
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js
46266
+ // ../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
46267
  var GetCallerIdentityCommand;
46610
46268
  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"() {
46269
+ "../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
46270
  "use strict";
46613
46271
  init_dist_es18();
46614
46272
  init_dist_es17();
@@ -46627,10 +46285,10 @@ var init_GetCallerIdentityCommand = __esm({
46627
46285
  }
46628
46286
  });
46629
46287
 
46630
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js
46288
+ // ../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
46289
  var GetFederationTokenCommand;
46632
46290
  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"() {
46291
+ "../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
46292
  "use strict";
46635
46293
  init_dist_es18();
46636
46294
  init_dist_es17();
@@ -46650,10 +46308,10 @@ var init_GetFederationTokenCommand = __esm({
46650
46308
  }
46651
46309
  });
46652
46310
 
46653
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js
46311
+ // ../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
46312
  var GetSessionTokenCommand;
46655
46313
  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"() {
46314
+ "../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
46315
  "use strict";
46658
46316
  init_dist_es18();
46659
46317
  init_dist_es17();
@@ -46673,10 +46331,10 @@ var init_GetSessionTokenCommand = __esm({
46673
46331
  }
46674
46332
  });
46675
46333
 
46676
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STS.js
46334
+ // ../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
46335
  var commands3, STS;
46678
46336
  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"() {
46337
+ "../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
46338
  "use strict";
46681
46339
  init_dist_es32();
46682
46340
  init_AssumeRoleCommand();
@@ -46704,9 +46362,9 @@ var init_STS = __esm({
46704
46362
  }
46705
46363
  });
46706
46364
 
46707
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js
46365
+ // ../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
46366
  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"() {
46367
+ "../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
46368
  "use strict";
46711
46369
  init_AssumeRoleCommand();
46712
46370
  init_AssumeRoleWithSAMLCommand();
@@ -46719,18 +46377,18 @@ var init_commands3 = __esm({
46719
46377
  }
46720
46378
  });
46721
46379
 
46722
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/index.js
46380
+ // ../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
46381
  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"() {
46382
+ "../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
46383
  "use strict";
46726
46384
  init_models_03();
46727
46385
  }
46728
46386
  });
46729
46387
 
46730
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js
46388
+ // ../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
46389
  var ASSUME_ROLE_DEFAULT_REGION, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity;
46732
46390
  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"() {
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/defaultStsRoleAssumers.js"() {
46734
46392
  "use strict";
46735
46393
  init_AssumeRoleCommand();
46736
46394
  init_AssumeRoleWithWebIdentityCommand();
@@ -46797,10 +46455,10 @@ var init_defaultStsRoleAssumers = __esm({
46797
46455
  }
46798
46456
  });
46799
46457
 
46800
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js
46458
+ // ../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
46459
  var getCustomizableStsClientCtor, getDefaultRoleAssumer2, getDefaultRoleAssumerWithWebIdentity2, decorateDefaultCredentialProvider;
46802
46460
  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"() {
46461
+ "../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
46462
  "use strict";
46805
46463
  init_defaultStsRoleAssumers();
46806
46464
  init_STSClient();
@@ -46827,7 +46485,7 @@ var init_defaultRoleAssumers = __esm({
46827
46485
  }
46828
46486
  });
46829
46487
 
46830
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/index.js
46488
+ // ../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
46489
  var dist_es_exports10 = {};
46832
46490
  __export(dist_es_exports10, {
46833
46491
  $Command: () => Command,
@@ -46864,7 +46522,7 @@ __export(dist_es_exports10, {
46864
46522
  getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2
46865
46523
  });
46866
46524
  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"() {
46525
+ "../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
46526
  "use strict";
46869
46527
  init_STSClient();
46870
46528
  init_STS();
@@ -49046,7 +48704,9 @@ function drizzle2(client, config) {
49046
48704
  };
49047
48705
  }
49048
48706
  const session = new AwsDataApiSession(client, dialect7, schema4, { ...config, logger: logger2 }, void 0);
49049
- return new PgDatabase(dialect7, session, schema4);
48707
+ const db2 = new AwsDataApiPgDatabase(dialect7, session, schema4);
48708
+ db2.$client = client;
48709
+ return db2;
49050
48710
  }
49051
48711
  var _a168, _b121, AwsDataApiPgDatabase, _a169, _b122, AwsPgDialect;
49052
48712
  var init_driver2 = __esm({
@@ -49169,20 +48829,20 @@ var require_file_uri_to_path = __commonJS({
49169
48829
  var rest = decodeURI(uri.substring(7));
49170
48830
  var firstSlash = rest.indexOf("/");
49171
48831
  var host = rest.substring(0, firstSlash);
49172
- var path3 = rest.substring(firstSlash + 1);
48832
+ var path2 = rest.substring(firstSlash + 1);
49173
48833
  if ("localhost" == host) host = "";
49174
48834
  if (host) {
49175
48835
  host = sep3 + sep3 + host;
49176
48836
  }
49177
- path3 = path3.replace(/^(.+)\|/, "$1:");
48837
+ path2 = path2.replace(/^(.+)\|/, "$1:");
49178
48838
  if (sep3 == "\\") {
49179
- path3 = path3.replace(/\//g, "\\");
48839
+ path2 = path2.replace(/\//g, "\\");
49180
48840
  }
49181
- if (/^.+\:/.test(path3)) {
48841
+ if (/^.+\:/.test(path2)) {
49182
48842
  } else {
49183
- path3 = sep3 + path3;
48843
+ path2 = sep3 + path2;
49184
48844
  }
49185
- return host + path3;
48845
+ return host + path2;
49186
48846
  }
49187
48847
  }
49188
48848
  });
@@ -49192,18 +48852,18 @@ var require_bindings = __commonJS({
49192
48852
  "../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js"(exports2, module2) {
49193
48853
  "use strict";
49194
48854
  var fs5 = require("fs");
49195
- var path3 = require("path");
48855
+ var path2 = require("path");
49196
48856
  var fileURLToPath = require_file_uri_to_path();
49197
- var join4 = path3.join;
49198
- var dirname = path3.dirname;
49199
- var exists2 = fs5.accessSync && function(path4) {
48857
+ var join4 = path2.join;
48858
+ var dirname = path2.dirname;
48859
+ var exists2 = fs5.accessSync && function(path3) {
49200
48860
  try {
49201
- fs5.accessSync(path4);
48861
+ fs5.accessSync(path3);
49202
48862
  } catch (e5) {
49203
48863
  return false;
49204
48864
  }
49205
48865
  return true;
49206
- } || fs5.existsSync || path3.existsSync;
48866
+ } || fs5.existsSync || path2.existsSync;
49207
48867
  var defaults2 = {
49208
48868
  arrow: process.env.NODE_BINDINGS_ARROW || " \u2192 ",
49209
48869
  compiled: process.env.NODE_BINDINGS_COMPILED_DIR || "compiled",
@@ -49248,7 +48908,7 @@ var require_bindings = __commonJS({
49248
48908
  if (!opts.module_root) {
49249
48909
  opts.module_root = exports2.getRoot(exports2.getFileName());
49250
48910
  }
49251
- if (path3.extname(opts.bindings) != ".node") {
48911
+ if (path2.extname(opts.bindings) != ".node") {
49252
48912
  opts.bindings += ".node";
49253
48913
  }
49254
48914
  var requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
@@ -49484,7 +49144,7 @@ var require_backup = __commonJS({
49484
49144
  "../node_modules/.pnpm/better-sqlite3@8.7.0/node_modules/better-sqlite3/lib/methods/backup.js"(exports2, module2) {
49485
49145
  "use strict";
49486
49146
  var fs5 = require("fs");
49487
- var path3 = require("path");
49147
+ var path2 = require("path");
49488
49148
  var { promisify: promisify2 } = require("util");
49489
49149
  var { cppdb } = require_util3();
49490
49150
  var fsAccess = promisify2(fs5.access);
@@ -49500,7 +49160,7 @@ var require_backup = __commonJS({
49500
49160
  if (typeof attachedName !== "string") throw new TypeError('Expected the "attached" option to be a string');
49501
49161
  if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
49502
49162
  if (handler != null && typeof handler !== "function") throw new TypeError('Expected the "progress" option to be a function');
49503
- await fsAccess(path3.dirname(filename)).catch(() => {
49163
+ await fsAccess(path2.dirname(filename)).catch(() => {
49504
49164
  throw new TypeError("Cannot save backup because the directory does not exist");
49505
49165
  });
49506
49166
  const isNewFile = await fsAccess(filename).then(() => false, () => true);
@@ -49806,7 +49466,7 @@ var require_database = __commonJS({
49806
49466
  "../node_modules/.pnpm/better-sqlite3@8.7.0/node_modules/better-sqlite3/lib/database.js"(exports2, module2) {
49807
49467
  "use strict";
49808
49468
  var fs5 = require("fs");
49809
- var path3 = require("path");
49469
+ var path2 = require("path");
49810
49470
  var util2 = require_util3();
49811
49471
  var SqliteError = require_sqlite_error();
49812
49472
  var DEFAULT_ADDON;
@@ -49842,7 +49502,7 @@ var require_database = __commonJS({
49842
49502
  addon = DEFAULT_ADDON || (DEFAULT_ADDON = require_bindings()("better_sqlite3.node"));
49843
49503
  } else if (typeof nativeBinding === "string") {
49844
49504
  const requireFunc = typeof __non_webpack_require__ === "function" ? __non_webpack_require__ : require;
49845
- addon = requireFunc(path3.resolve(nativeBinding).replace(/(\.node)?$/, ".node"));
49505
+ addon = requireFunc(path2.resolve(nativeBinding).replace(/(\.node)?$/, ".node"));
49846
49506
  } else {
49847
49507
  addon = nativeBinding;
49848
49508
  }
@@ -49850,7 +49510,7 @@ var require_database = __commonJS({
49850
49510
  addon.setErrorConstructor(SqliteError);
49851
49511
  addon.isInitialized = true;
49852
49512
  }
49853
- if (!anonymous && !fs5.existsSync(path3.dirname(filename))) {
49513
+ if (!anonymous && !fs5.existsSync(path2.dirname(filename))) {
49854
49514
  throw new TypeError("Cannot open database because the directory does not exist");
49855
49515
  }
49856
49516
  Object.defineProperties(this, {
@@ -52454,6 +52114,7 @@ var init_db2 = __esm({
52454
52114
  "use strict";
52455
52115
  init_entity();
52456
52116
  init_selection_proxy();
52117
+ init_sql();
52457
52118
  init_query_builders2();
52458
52119
  init_subquery();
52459
52120
  init_count2();
@@ -52685,56 +52346,56 @@ var init_db2 = __esm({
52685
52346
  return new SQLiteDeleteBase(from, this.session, this.dialect);
52686
52347
  }
52687
52348
  run(query) {
52688
- const sql3 = query.getSQL();
52349
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
52689
52350
  if (this.resultKind === "async") {
52690
52351
  return new SQLiteRaw(
52691
- async () => this.session.run(sql3),
52692
- () => sql3,
52352
+ async () => this.session.run(sequel),
52353
+ () => sequel,
52693
52354
  "run",
52694
52355
  this.dialect,
52695
52356
  this.session.extractRawRunValueFromBatchResult.bind(this.session)
52696
52357
  );
52697
52358
  }
52698
- return this.session.run(sql3);
52359
+ return this.session.run(sequel);
52699
52360
  }
52700
52361
  all(query) {
52701
- const sql3 = query.getSQL();
52362
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
52702
52363
  if (this.resultKind === "async") {
52703
52364
  return new SQLiteRaw(
52704
- async () => this.session.all(sql3),
52705
- () => sql3,
52365
+ async () => this.session.all(sequel),
52366
+ () => sequel,
52706
52367
  "all",
52707
52368
  this.dialect,
52708
52369
  this.session.extractRawAllValueFromBatchResult.bind(this.session)
52709
52370
  );
52710
52371
  }
52711
- return this.session.all(sql3);
52372
+ return this.session.all(sequel);
52712
52373
  }
52713
52374
  get(query) {
52714
- const sql3 = query.getSQL();
52375
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
52715
52376
  if (this.resultKind === "async") {
52716
52377
  return new SQLiteRaw(
52717
- async () => this.session.get(sql3),
52718
- () => sql3,
52378
+ async () => this.session.get(sequel),
52379
+ () => sequel,
52719
52380
  "get",
52720
52381
  this.dialect,
52721
52382
  this.session.extractRawGetValueFromBatchResult.bind(this.session)
52722
52383
  );
52723
52384
  }
52724
- return this.session.get(sql3);
52385
+ return this.session.get(sequel);
52725
52386
  }
52726
52387
  values(query) {
52727
- const sql3 = query.getSQL();
52388
+ const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
52728
52389
  if (this.resultKind === "async") {
52729
52390
  return new SQLiteRaw(
52730
- async () => this.session.values(sql3),
52731
- () => sql3,
52391
+ async () => this.session.values(sequel),
52392
+ () => sequel,
52732
52393
  "values",
52733
52394
  this.dialect,
52734
52395
  this.session.extractRawValuesValueFromBatchResult.bind(this.session)
52735
52396
  );
52736
52397
  }
52737
- return this.session.values(sql3);
52398
+ return this.session.values(sequel);
52738
52399
  }
52739
52400
  transaction(transaction, config) {
52740
52401
  return this.session.transaction(transaction, config);
@@ -53328,7 +52989,9 @@ function drizzle3(client, config = {}) {
53328
52989
  };
53329
52990
  }
53330
52991
  const session = new BetterSQLiteSession(client, dialect7, schema4, { logger: logger2 });
53331
- return new BetterSQLite3Database("sync", dialect7, session, schema4);
52992
+ const db2 = new BetterSQLite3Database("sync", dialect7, session, schema4);
52993
+ db2.$client = client;
52994
+ return db2;
53332
52995
  }
53333
52996
  var _a239, _b170, BetterSQLite3Database;
53334
52997
  var init_driver3 = __esm({
@@ -53504,7 +53167,9 @@ function drizzle4(client, config = {}) {
53504
53167
  };
53505
53168
  }
53506
53169
  const session = new SQLiteBunSession(client, dialect7, schema4, { logger: logger2 });
53507
- return new BunSQLiteDatabase("sync", dialect7, session, schema4);
53170
+ const db2 = new BunSQLiteDatabase("sync", dialect7, session, schema4);
53171
+ db2.$client = client;
53172
+ return db2;
53508
53173
  }
53509
53174
  var _a243, _b174, BunSQLiteDatabase;
53510
53175
  var init_driver4 = __esm({
@@ -53744,7 +53409,9 @@ function drizzle5(client, config = {}) {
53744
53409
  };
53745
53410
  }
53746
53411
  const session = new SQLiteD1Session(client, dialect7, schema4, { logger: logger2 });
53747
- return new DrizzleD1Database("async", dialect7, session, schema4);
53412
+ const db2 = new DrizzleD1Database("async", dialect7, session, schema4);
53413
+ db2.$client = client;
53414
+ return db2;
53748
53415
  }
53749
53416
  var _a247, _b178, DrizzleD1Database;
53750
53417
  var init_driver5 = __esm({
@@ -53814,10 +53481,10 @@ function parseUri(text) {
53814
53481
  const groups = match2.groups;
53815
53482
  const scheme = groups["scheme"];
53816
53483
  const authority = groups["authority"] !== void 0 ? parseAuthority(groups["authority"]) : void 0;
53817
- const path3 = percentDecode(groups["path"]);
53484
+ const path2 = percentDecode(groups["path"]);
53818
53485
  const query = groups["query"] !== void 0 ? parseQuery(groups["query"]) : void 0;
53819
53486
  const fragment2 = groups["fragment"] !== void 0 ? percentDecode(groups["fragment"]) : void 0;
53820
- return { scheme, authority, path: path3, query, fragment: fragment2 };
53487
+ return { scheme, authority, path: path2, query, fragment: fragment2 };
53821
53488
  }
53822
53489
  function parseAuthority(text) {
53823
53490
  const match2 = AUTHORITY_RE.exec(text);
@@ -53867,7 +53534,7 @@ function percentDecode(text) {
53867
53534
  throw e5;
53868
53535
  }
53869
53536
  }
53870
- function encodeBaseUrl(scheme, authority, path3) {
53537
+ function encodeBaseUrl(scheme, authority, path2) {
53871
53538
  if (authority === void 0) {
53872
53539
  throw new LibsqlError(`URL with scheme ${JSON.stringify(scheme + ":")} requires authority (the "//" part)`, "URL_INVALID");
53873
53540
  }
@@ -53876,7 +53543,7 @@ function encodeBaseUrl(scheme, authority, path3) {
53876
53543
  const portText = encodePort(authority.port);
53877
53544
  const userinfoText = encodeUserinfo(authority.userinfo);
53878
53545
  const authorityText = `//${userinfoText}${hostText}${portText}`;
53879
- let pathText = path3.split("/").map(encodeURIComponent).join("/");
53546
+ let pathText = path2.split("/").map(encodeURIComponent).join("/");
53880
53547
  if (pathText !== "" && !pathText.startsWith("/")) {
53881
53548
  pathText = "/" + pathText;
53882
53549
  }
@@ -54182,7 +53849,7 @@ function expandConfig(config, preferHttp) {
54182
53849
  }
54183
53850
  }
54184
53851
  const connectionQueryParamsString = connectionQueryParams.length === 0 ? "" : `?${connectionQueryParams.join("&")}`;
54185
- const path3 = uri.path + connectionQueryParamsString;
53852
+ const path2 = uri.path + connectionQueryParamsString;
54186
53853
  let scheme;
54187
53854
  if (originalUriScheme === "libsql") {
54188
53855
  if (tls2 === false) {
@@ -54214,7 +53881,7 @@ function expandConfig(config, preferHttp) {
54214
53881
  return {
54215
53882
  scheme: "file",
54216
53883
  tls: false,
54217
- path: path3,
53884
+ path: path2,
54218
53885
  intMode,
54219
53886
  concurrency,
54220
53887
  syncUrl: config.syncUrl,
@@ -54229,7 +53896,7 @@ function expandConfig(config, preferHttp) {
54229
53896
  scheme,
54230
53897
  tls: tls2,
54231
53898
  authority: uri.authority,
54232
- path: path3,
53899
+ path: path2,
54233
53900
  authToken,
54234
53901
  intMode,
54235
53902
  concurrency,
@@ -54283,7 +53950,7 @@ var require_dist2 = __commonJS({
54283
53950
  };
54284
53951
  Object.defineProperty(exports2, "__esModule", { value: true });
54285
53952
  exports2.load = exports2.currentTarget = void 0;
54286
- var path3 = __importStar2(require("path"));
53953
+ var path2 = __importStar2(require("path"));
54287
53954
  var fs5 = __importStar2(require("fs"));
54288
53955
  function currentTarget() {
54289
53956
  let os3 = null;
@@ -54349,7 +54016,7 @@ var require_dist2 = __commonJS({
54349
54016
  return typeof header === "object" && !!header && "glibcVersionRuntime" in header;
54350
54017
  }
54351
54018
  function load(dirname) {
54352
- const m7 = path3.join(dirname, "index.node");
54019
+ const m7 = path2.join(dirname, "index.node");
54353
54020
  return fs5.existsSync(m7) ? require(m7) : null;
54354
54021
  }
54355
54022
  exports2.load = load;
@@ -54378,9 +54045,9 @@ var require_filesystem = __commonJS({
54378
54045
  "use strict";
54379
54046
  var fs5 = require("fs");
54380
54047
  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) => {
54048
+ var readFileSync2 = (path2) => fs5.readFileSync(path2, "utf-8");
54049
+ var readFile3 = (path2) => new Promise((resolve, reject) => {
54050
+ fs5.readFile(path2, "utf-8", (err, data) => {
54384
54051
  if (err) {
54385
54052
  reject(err);
54386
54053
  } else {
@@ -54690,7 +54357,7 @@ var require_libsql = __commonJS({
54690
54357
  * @constructor
54691
54358
  * @param {string} path - Path to the database file.
54692
54359
  */
54693
- constructor(path3, opts) {
54360
+ constructor(path2, opts) {
54694
54361
  const encryptionCipher = opts?.encryptionCipher ?? "aes256cbc";
54695
54362
  if (opts && opts.syncUrl) {
54696
54363
  var authToken = "";
@@ -54703,13 +54370,13 @@ var require_libsql = __commonJS({
54703
54370
  const encryptionKey = opts?.encryptionKey ?? "";
54704
54371
  const syncPeriod = opts?.syncPeriod ?? 0;
54705
54372
  const readYourWrites = opts?.readYourWrites ?? true;
54706
- this.db = databaseOpenWithRpcSync(path3, opts.syncUrl, authToken, encryptionCipher, encryptionKey, syncPeriod, readYourWrites);
54373
+ this.db = databaseOpenWithRpcSync(path2, opts.syncUrl, authToken, encryptionCipher, encryptionKey, syncPeriod, readYourWrites);
54707
54374
  } else {
54708
54375
  const authToken2 = opts?.authToken ?? "";
54709
54376
  const encryptionKey = opts?.encryptionKey ?? "";
54710
- this.db = databaseOpen(path3, authToken2, encryptionCipher, encryptionKey);
54377
+ this.db = databaseOpen(path2, authToken2, encryptionCipher, encryptionKey);
54711
54378
  }
54712
- this.memory = path3 === ":memory:";
54379
+ this.memory = path2 === ":memory:";
54713
54380
  this.readonly = false;
54714
54381
  this.name = "";
54715
54382
  this.open = true;
@@ -54987,9 +54654,9 @@ function _createClient(config) {
54987
54654
  if (isInMemory && config.syncUrl) {
54988
54655
  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
54656
  }
54990
- let path3 = config.path;
54657
+ let path2 = config.path;
54991
54658
  if (isInMemory) {
54992
- path3 = `${config.scheme}:${config.path}`;
54659
+ path2 = `${config.scheme}:${config.path}`;
54993
54660
  }
54994
54661
  const options = {
54995
54662
  authToken: config.authToken,
@@ -54997,9 +54664,9 @@ function _createClient(config) {
54997
54664
  syncUrl: config.syncUrl,
54998
54665
  syncPeriod: config.syncInterval
54999
54666
  };
55000
- const db2 = new import_libsql.default(path3, options);
54667
+ const db2 = new import_libsql.default(path2, options);
55001
54668
  executeStmt(db2, "SELECT 1 AS checkThatTheDatabaseCanBeOpened", config.intMode);
55002
- return new Sqlite3Client(path3, options, db2, config.intMode);
54669
+ return new Sqlite3Client(path2, options, db2, config.intMode);
55003
54670
  }
55004
54671
  function executeStmt(db2, stmt, intMode) {
55005
54672
  let sql3;
@@ -55139,7 +54806,7 @@ var init_sqlite3 = __esm({
55139
54806
  init_api();
55140
54807
  Sqlite3Client = class {
55141
54808
  /** @private */
55142
- constructor(path3, options, db2, intMode) {
54809
+ constructor(path2, options, db2, intMode) {
55143
54810
  __privateAdd(this, _Sqlite3Client_instances);
55144
54811
  __privateAdd(this, _path);
55145
54812
  __privateAdd(this, _options);
@@ -55147,7 +54814,7 @@ var init_sqlite3 = __esm({
55147
54814
  __privateAdd(this, _intMode);
55148
54815
  __publicField(this, "closed");
55149
54816
  __publicField(this, "protocol");
55150
- __privateSet(this, _path, path3);
54817
+ __privateSet(this, _path, path2);
55151
54818
  __privateSet(this, _options, options);
55152
54819
  __privateSet(this, _db, db2);
55153
54820
  __privateSet(this, _intMode, intMode);
@@ -55447,7 +55114,7 @@ var require_node_gyp_build = __commonJS({
55447
55114
  "../node_modules/.pnpm/node-gyp-build@4.8.1/node_modules/node-gyp-build/node-gyp-build.js"(exports2, module2) {
55448
55115
  "use strict";
55449
55116
  var fs5 = require("fs");
55450
- var path3 = require("path");
55117
+ var path2 = require("path");
55451
55118
  var os3 = require("os");
55452
55119
  var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
55453
55120
  var vars = process.config && process.config.variables || {};
@@ -55464,21 +55131,21 @@ var require_node_gyp_build = __commonJS({
55464
55131
  return runtimeRequire(load.resolve(dir));
55465
55132
  }
55466
55133
  load.resolve = load.path = function(dir) {
55467
- dir = path3.resolve(dir || ".");
55134
+ dir = path2.resolve(dir || ".");
55468
55135
  try {
55469
- var name2 = runtimeRequire(path3.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
55136
+ var name2 = runtimeRequire(path2.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
55470
55137
  if (process.env[name2 + "_PREBUILD"]) dir = process.env[name2 + "_PREBUILD"];
55471
55138
  } catch (err) {
55472
55139
  }
55473
55140
  if (!prebuildsOnly) {
55474
- var release2 = getFirst(path3.join(dir, "build/Release"), matchBuild);
55141
+ var release2 = getFirst(path2.join(dir, "build/Release"), matchBuild);
55475
55142
  if (release2) return release2;
55476
- var debug = getFirst(path3.join(dir, "build/Debug"), matchBuild);
55143
+ var debug = getFirst(path2.join(dir, "build/Debug"), matchBuild);
55477
55144
  if (debug) return debug;
55478
55145
  }
55479
55146
  var prebuild = resolve(dir);
55480
55147
  if (prebuild) return prebuild;
55481
- var nearby = resolve(path3.dirname(process.execPath));
55148
+ var nearby = resolve(path2.dirname(process.execPath));
55482
55149
  if (nearby) return nearby;
55483
55150
  var target = [
55484
55151
  "platform=" + platform2,
@@ -55495,14 +55162,14 @@ var require_node_gyp_build = __commonJS({
55495
55162
  ].filter(Boolean).join(" ");
55496
55163
  throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
55497
55164
  function resolve(dir2) {
55498
- var tuples2 = readdirSync(path3.join(dir2, "prebuilds")).map(parseTuple);
55165
+ var tuples2 = readdirSync(path2.join(dir2, "prebuilds")).map(parseTuple);
55499
55166
  var tuple = tuples2.filter(matchTuple(platform2, arch)).sort(compareTuples)[0];
55500
55167
  if (!tuple) return;
55501
- var prebuilds = path3.join(dir2, "prebuilds", tuple.name);
55168
+ var prebuilds = path2.join(dir2, "prebuilds", tuple.name);
55502
55169
  var parsed = readdirSync(prebuilds).map(parseTags);
55503
55170
  var candidates = parsed.filter(matchTags(runtime, abi));
55504
55171
  var winner = candidates.sort(compareTags(runtime))[0];
55505
- if (winner) return path3.join(prebuilds, winner.file);
55172
+ if (winner) return path2.join(prebuilds, winner.file);
55506
55173
  }
55507
55174
  };
55508
55175
  function readdirSync(dir) {
@@ -55514,7 +55181,7 @@ var require_node_gyp_build = __commonJS({
55514
55181
  }
55515
55182
  function getFirst(dir, filter2) {
55516
55183
  var files = readdirSync(dir).filter(filter2);
55517
- return files[0] && path3.join(dir, files[0]);
55184
+ return files[0] && path2.join(dir, files[0]);
55518
55185
  }
55519
55186
  function matchBuild(name2) {
55520
55187
  return /\.node$/.test(name2);
@@ -64176,7 +63843,9 @@ function drizzle6(client, config = {}) {
64176
63843
  };
64177
63844
  }
64178
63845
  const session = new LibSQLSession(client, dialect7, schema4, { logger: logger2 }, void 0);
64179
- return new LibSQLDatabase("async", dialect7, session, schema4);
63846
+ const db2 = new LibSQLDatabase("async", dialect7, session, schema4);
63847
+ db2.$client = client;
63848
+ return db2;
64180
63849
  }
64181
63850
  var _a251, _b182, LibSQLDatabase;
64182
63851
  var init_driver6 = __esm({
@@ -78789,12 +78458,12 @@ var require_query4 = __commonJS({
78789
78458
  this._fields.push([]);
78790
78459
  return this.readField;
78791
78460
  }
78792
- _streamLocalInfile(connection2, path3) {
78461
+ _streamLocalInfile(connection2, path2) {
78793
78462
  if (this._streamFactory) {
78794
- this._localStream = this._streamFactory(path3);
78463
+ this._localStream = this._streamFactory(path2);
78795
78464
  } else {
78796
78465
  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.`
78466
+ `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
78467
  );
78799
78468
  connection2.writePacket(EmptyPacket);
78800
78469
  return this.infileOk;
@@ -85650,6 +85319,7 @@ var init_db3 = __esm({
85650
85319
  "use strict";
85651
85320
  init_entity();
85652
85321
  init_selection_proxy();
85322
+ init_sql();
85653
85323
  init_subquery();
85654
85324
  init_count3();
85655
85325
  init_query_builders3();
@@ -85860,7 +85530,7 @@ var init_db3 = __esm({
85860
85530
  return new MySqlDeleteBase(table4, this.session, this.dialect);
85861
85531
  }
85862
85532
  execute(query) {
85863
- return this.session.execute(query.getSQL());
85533
+ return this.session.execute(typeof query === "string" ? sql.raw(query) : query.getSQL());
85864
85534
  }
85865
85535
  transaction(transaction, config) {
85866
85536
  return this.session.transaction(transaction, config);
@@ -86186,9 +85856,7 @@ function drizzle7(client, config = {}) {
86186
85856
  } else if (config.logger !== false) {
86187
85857
  logger2 = config.logger;
86188
85858
  }
86189
- if (isCallbackClient(client)) {
86190
- client = client.promise();
86191
- }
85859
+ const clientForInstance = isCallbackClient(client) ? client.promise() : client;
86192
85860
  let schema4;
86193
85861
  if (config.schema) {
86194
85862
  if (config.mode === void 0) {
@@ -86207,9 +85875,11 @@ function drizzle7(client, config = {}) {
86207
85875
  };
86208
85876
  }
86209
85877
  const mode = config.mode ?? "default";
86210
- const driver2 = new MySql2Driver(client, dialect7, { logger: logger2 });
85878
+ const driver2 = new MySql2Driver(clientForInstance, dialect7, { logger: logger2 });
86211
85879
  const session = driver2.createSession(schema4, mode);
86212
- return new MySql2Database(dialect7, session, schema4, mode);
85880
+ const db2 = new MySql2Database(dialect7, session, schema4, mode);
85881
+ db2.$client = client;
85882
+ return db2;
86213
85883
  }
86214
85884
  function isCallbackClient(client) {
86215
85885
  return typeof client.promise === "function";
@@ -91778,11 +91448,13 @@ function drizzle8(client, config = {}) {
91778
91448
  }
91779
91449
  const driver2 = new NeonHttpDriver(client, dialect7, { logger: logger2 });
91780
91450
  const session = driver2.createSession(schema4);
91781
- return new NeonHttpDatabase(
91451
+ const db2 = new NeonHttpDatabase(
91782
91452
  dialect7,
91783
91453
  session,
91784
91454
  schema4
91785
91455
  );
91456
+ db2.$client = client;
91457
+ return db2;
91786
91458
  }
91787
91459
  var _a288, NeonHttpDriver, _a289, _b204, NeonHttpDatabase;
91788
91460
  var init_driver8 = __esm({
@@ -91996,7 +91668,9 @@ function drizzle9(client, config = {}) {
91996
91668
  }
91997
91669
  const driver2 = new NeonDriver(client, dialect7, { logger: logger2 });
91998
91670
  const session = driver2.createSession(schema4);
91999
- return new NeonDatabase(dialect7, session, schema4);
91671
+ const db2 = new NeonDatabase(dialect7, session, schema4);
91672
+ db2.$client = client;
91673
+ return db2;
92000
91674
  }
92001
91675
  var _a293, NeonDriver, _a294, _b208, NeonDatabase;
92002
91676
  var init_driver9 = __esm({
@@ -92626,7 +92300,9 @@ Please make the necessary changes now to prevent any runtime errors in the futur
92626
92300
  };
92627
92301
  }
92628
92302
  const session = new PlanetscaleSession(client, dialect7, void 0, schema4, { logger: logger2 });
92629
- return new PlanetScaleDatabase(dialect7, session, schema4, "planetscale");
92303
+ const db2 = new PlanetScaleDatabase(dialect7, session, schema4, "planetscale");
92304
+ db2.$client = client;
92305
+ return db2;
92630
92306
  }
92631
92307
  var _a298, _b212, PlanetScaleDatabase;
92632
92308
  var init_driver10 = __esm({
@@ -94208,13 +93884,13 @@ function Subscribe(postgres2, options) {
94208
93884
  }
94209
93885
  }
94210
93886
  function handle(a7, b8) {
94211
- const path3 = b8.relation.schema + "." + b8.relation.table;
93887
+ const path2 = b8.relation.schema + "." + b8.relation.table;
94212
93888
  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);
93889
+ call("*:" + path2, a7, b8);
93890
+ b8.relation.keys.length && call("*:" + path2 + "=" + b8.relation.keys.map((x6) => a7[x6.name]), a7, b8);
94215
93891
  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);
93892
+ call(b8.command + ":" + path2, a7, b8);
93893
+ b8.relation.keys.length && call(b8.command + ":" + path2 + "=" + b8.relation.keys.map((x6) => a7[x6.name]), a7, b8);
94218
93894
  }
94219
93895
  function pong() {
94220
93896
  const x6 = Buffer.alloc(34);
@@ -94327,8 +94003,8 @@ function parseEvent(x5) {
94327
94003
  const xs2 = x5.match(/^(\*|insert|update|delete)?:?([^.]+?\.?[^=]+)?=?(.+)?/i) || [];
94328
94004
  if (!xs2)
94329
94005
  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 : "");
94006
+ const [, command, path2, key] = xs2;
94007
+ return (command || "*") + (path2 ? ":" + (path2.indexOf(".") === -1 ? "public." + path2 : path2) : "") + (key ? "=" + key : "");
94332
94008
  }
94333
94009
  var noop2;
94334
94010
  var init_subscribe = __esm({
@@ -94471,10 +94147,10 @@ function Postgres(a7, b8) {
94471
94147
  });
94472
94148
  return query;
94473
94149
  }
94474
- function file(path3, args = [], options2 = {}) {
94150
+ function file(path2, args = [], options2 = {}) {
94475
94151
  arguments.length === 2 && !Array.isArray(args) && (options2 = args, args = []);
94476
94152
  const query = new Query([], args, (query2) => {
94477
- import_fs6.default.readFile(path3, "utf8", (err, string2) => {
94153
+ import_fs6.default.readFile(path2, "utf8", (err, string2) => {
94478
94154
  if (err)
94479
94155
  return query2.reject(err);
94480
94156
  query2.strings = [string2];
@@ -95000,7 +94676,9 @@ function drizzle11(client, config = {}) {
95000
94676
  };
95001
94677
  }
95002
94678
  const session = new PostgresJsSession(client, dialect7, schema4, { logger: logger2 });
95003
- return new PostgresJsDatabase(dialect7, session, schema4);
94679
+ const db2 = new PostgresJsDatabase(dialect7, session, schema4);
94680
+ db2.$client = client;
94681
+ return db2;
95004
94682
  }
95005
94683
  var _a302, _b216, PostgresJsDatabase;
95006
94684
  var init_driver11 = __esm({
@@ -95570,7 +95248,9 @@ function drizzle12(client, config = {}) {
95570
95248
  };
95571
95249
  }
95572
95250
  const session = new TiDBServerlessSession(client, dialect7, void 0, schema4, { logger: logger2 });
95573
- return new TiDBServerlessDatabase(dialect7, session, schema4, "default");
95251
+ const db2 = new TiDBServerlessDatabase(dialect7, session, schema4, "default");
95252
+ db2.$client = client;
95253
+ return db2;
95574
95254
  }
95575
95255
  var _a306, _b220, TiDBServerlessDatabase;
95576
95256
  var init_driver12 = __esm({
@@ -104762,7 +104442,9 @@ function drizzle13(client, config = {}) {
104762
104442
  }
104763
104443
  const driver2 = new VercelPgDriver(client, dialect7, { logger: logger2 });
104764
104444
  const session = driver2.createSession(schema4);
104765
- return new VercelPgDatabase(dialect7, session, schema4);
104445
+ const db2 = new VercelPgDatabase(dialect7, session, schema4);
104446
+ db2.$client = client;
104447
+ return db2;
104766
104448
  }
104767
104449
  var _a310, VercelPgDriver, _a311, _b224, VercelPgDatabase;
104768
104450
  var init_driver13 = __esm({
@@ -104822,132 +104504,219 @@ var init_vercel_postgres = __esm({
104822
104504
  function assertUnreachable2(_3) {
104823
104505
  throw new Error("Didn't expect to get here");
104824
104506
  }
104825
- async function drizzle14(client, params) {
104826
- const { connection: connection2, ws: ws3, ...drizzleConfig } = params;
104507
+ async function drizzle14(client, ...params) {
104827
104508
  switch (client) {
104828
104509
  case "node-postgres": {
104829
- const { Pool: Pool2 } = await Promise.resolve().then(() => __toESM(require_lib3(), 1)).catch(() => importError("pg"));
104510
+ const defpg = await Promise.resolve().then(() => __toESM(require_lib3(), 1)).catch(() => importError("pg"));
104830
104511
  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;
104512
+ if (typeof params[0] === "object") {
104513
+ const { connection: connection2, ...drizzleConfig } = params[0];
104514
+ const instance2 = typeof connection2 === "string" ? new defpg.default.Pool({
104515
+ connectionString: connection2
104516
+ }) : new defpg.default.Pool(connection2);
104517
+ const db22 = drizzle22(instance2, drizzleConfig);
104518
+ return db22;
104519
+ }
104520
+ const instance = typeof params[0] === "string" ? new defpg.default.Pool({
104521
+ connectionString: params[0]
104522
+ }) : new defpg.default.Pool(params[0]);
104523
+ const db2 = drizzle22(instance);
104834
104524
  return db2;
104835
104525
  }
104836
104526
  case "aws-data-api-pg": {
104527
+ const { connection: connection2, ...drizzleConfig } = params[0];
104528
+ const { resourceArn, database, secretArn, ...rdsConfig } = connection2;
104837
104529
  const { RDSDataClient: RDSDataClient2 } = await Promise.resolve().then(() => (init_dist_es54(), dist_es_exports14)).catch(
104838
104530
  () => importError("@aws-sdk/client-rds-data")
104839
104531
  );
104840
104532
  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;
104533
+ const instance = new RDSDataClient2(rdsConfig);
104534
+ const db2 = drizzle22(instance, { resourceArn, database, secretArn, ...drizzleConfig });
104844
104535
  return db2;
104845
104536
  }
104846
104537
  case "better-sqlite3": {
104847
104538
  const { default: Client4 } = await Promise.resolve().then(() => __toESM(require_lib4(), 1)).catch(() => importError("better-sqlite3"));
104848
104539
  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);
104540
+ if (typeof params[0] === "object") {
104541
+ const { connection: connection2, ...drizzleConfig } = params[0];
104542
+ if (typeof connection2 === "object") {
104543
+ const { source, ...options } = connection2;
104544
+ const instance3 = new Client4(source, options);
104545
+ const db3 = drizzle22(instance3, drizzleConfig);
104546
+ return db3;
104547
+ }
104548
+ const instance2 = new Client4(connection2);
104852
104549
  const db22 = drizzle22(instance2, drizzleConfig);
104853
- db22.$client = instance2;
104854
104550
  return db22;
104855
104551
  }
104856
- const instance = new Client4(connection2);
104857
- const db2 = drizzle22(instance, drizzleConfig);
104858
- db2.$client = instance;
104552
+ const instance = new Client4(params[0]);
104553
+ const db2 = drizzle22(instance);
104859
104554
  return db2;
104860
104555
  }
104861
104556
  case "bun:sqlite": {
104862
- const { Database: Client4 } = require("bun:sqlite").catch(() => importError("bun:sqlite"));
104557
+ const { Database: Client4 } = require("bun:sqlite").catch(() => {
104558
+ throw new Error(`Please use bun to use 'bun:sqlite' for Drizzle ORM to connect to database`);
104559
+ });
104863
104560
  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);
104561
+ if (typeof params[0] === "object") {
104562
+ const { connection: connection2, ...drizzleConfig } = params[0];
104563
+ if (typeof connection2 === "object") {
104564
+ const { source, ...opts } = connection2;
104565
+ const options = Object.values(opts).filter((v8) => v8 !== void 0).length ? opts : void 0;
104566
+ const instance3 = new Client4(source, options);
104567
+ const db3 = drizzle22(instance3, drizzleConfig);
104568
+ return db3;
104569
+ }
104570
+ const instance2 = new Client4(connection2);
104867
104571
  const db22 = drizzle22(instance2, drizzleConfig);
104868
- db22.$client = instance2;
104869
104572
  return db22;
104870
104573
  }
104871
- const instance = new Client4(connection2);
104872
- const db2 = drizzle22(instance, drizzleConfig);
104873
- db2.$client = instance;
104574
+ const instance = new Client4(params[0]);
104575
+ const db2 = drizzle22(instance);
104874
104576
  return db2;
104875
104577
  }
104876
104578
  case "d1": {
104579
+ const { connection: connection2, ...drizzleConfig } = params[0];
104877
104580
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_d1(), d1_exports));
104878
104581
  const db2 = drizzle22(connection2, drizzleConfig);
104879
- db2.$client = connection2;
104880
104582
  return db2;
104881
104583
  }
104882
- case "libsql": {
104584
+ case "libsql":
104585
+ case "turso": {
104883
104586
  const { createClient: createClient3 } = await Promise.resolve().then(() => (init_node3(), node_exports)).catch(() => importError("@libsql/client"));
104884
104587
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_libsql(), libsql_exports));
104885
- const instance = createClient3(connection2);
104588
+ if (typeof params[0] === "string") {
104589
+ const instance2 = createClient3({
104590
+ url: params[0]
104591
+ });
104592
+ const db22 = drizzle22(instance2);
104593
+ return db22;
104594
+ }
104595
+ const { connection: connection2, ...drizzleConfig } = params[0];
104596
+ const instance = typeof connection2 === "string" ? createClient3({ url: connection2 }) : createClient3(connection2);
104886
104597
  const db2 = drizzle22(instance, drizzleConfig);
104887
- db2.$client = instance;
104888
104598
  return db2;
104889
104599
  }
104890
104600
  case "mysql2": {
104891
- const { createPool: createPool2 } = await Promise.resolve().then(() => __toESM(require_promise(), 1)).catch(() => importError("mysql2/promise"));
104892
- const instance = createPool2(connection2);
104601
+ const { createPool: createPool2 } = await Promise.resolve().then(() => __toESM(require_promise(), 1)).catch(() => importError("mysql2"));
104893
104602
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_mysql2(), mysql2_exports));
104894
- const db2 = drizzle22(instance, drizzleConfig);
104895
- db2.$client = instance;
104603
+ if (typeof params[0] === "object") {
104604
+ const { connection: connection2, ...drizzleConfig } = params[0];
104605
+ const instance2 = createPool2(connection2);
104606
+ const db22 = drizzle22(instance2, drizzleConfig);
104607
+ return db22;
104608
+ }
104609
+ const connectionString = params[0];
104610
+ const instance = createPool2(connectionString);
104611
+ const db2 = drizzle22(instance);
104896
104612
  return db2;
104897
104613
  }
104898
104614
  case "neon-http": {
104899
104615
  const { neon } = await Promise.resolve().then(() => (init_serverless(), serverless_exports)).catch(() => importError("@neondatabase/serverless"));
104900
- const { connectionString, options } = connection2;
104901
104616
  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;
104617
+ if (typeof params[0] === "object") {
104618
+ const { connection: connection2, ...drizzleConfig } = params[0];
104619
+ if (typeof connection2 === "object") {
104620
+ const { connectionString, ...options } = connection2;
104621
+ const instance3 = neon(connectionString, options);
104622
+ const db3 = drizzle22(instance3, drizzleConfig);
104623
+ return db3;
104624
+ }
104625
+ const instance2 = neon(connection2);
104626
+ const db22 = drizzle22(instance2, drizzleConfig);
104627
+ return db22;
104628
+ }
104629
+ const instance = neon(params[0]);
104630
+ const db2 = drizzle22(instance);
104905
104631
  return db2;
104906
104632
  }
104907
- case "neon-serverless": {
104633
+ case "neon-websocket": {
104908
104634
  const { Pool: Pool2, neonConfig } = await Promise.resolve().then(() => (init_serverless(), serverless_exports)).catch(
104909
104635
  () => importError("@neondatabase/serverless")
104910
104636
  );
104911
104637
  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;
104638
+ if (typeof params[0] === "string") {
104639
+ const instance2 = new Pool2({
104640
+ connectionString: params[0]
104641
+ });
104642
+ const db22 = drizzle22(instance2);
104643
+ return db22;
104915
104644
  }
104916
- const db2 = drizzle22(instance, drizzleConfig);
104917
- db2.$client = instance;
104645
+ if (typeof params[0] === "object") {
104646
+ const { connection: connection2, ws: ws3, ...drizzleConfig } = params[0];
104647
+ if (ws3) {
104648
+ neonConfig.webSocketConstructor = ws3;
104649
+ }
104650
+ const instance2 = typeof connection2 === "string" ? new Pool2({
104651
+ connectionString: connection2
104652
+ }) : new Pool2(connection2);
104653
+ const db22 = drizzle22(instance2, drizzleConfig);
104654
+ return db22;
104655
+ }
104656
+ const instance = new Pool2();
104657
+ const db2 = drizzle22(instance);
104918
104658
  return db2;
104919
104659
  }
104920
104660
  case "planetscale": {
104921
104661
  const { Client: Client4 } = await Promise.resolve().then(() => (init_dist(), dist_exports)).catch(() => importError("@planetscale/database"));
104922
104662
  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;
104663
+ if (typeof params[0] === "object") {
104664
+ const { connection: connection2, ...drizzleConfig } = params[0];
104665
+ const instance2 = typeof connection2 === "string" ? new Client4({
104666
+ url: connection2
104667
+ }) : new Client4(
104668
+ connection2
104669
+ );
104670
+ const db22 = drizzle22(instance2, drizzleConfig);
104671
+ return db22;
104672
+ }
104673
+ const instance = new Client4({
104674
+ url: params[0]
104675
+ });
104676
+ const db2 = drizzle22(instance);
104928
104677
  return db2;
104929
104678
  }
104930
104679
  case "postgres-js": {
104931
104680
  const { default: client2 } = await Promise.resolve().then(() => (init_src(), src_exports)).catch(() => importError("postgres"));
104932
104681
  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;
104682
+ if (typeof params[0] === "object") {
104683
+ const { connection: connection2, ...drizzleConfig } = params[0];
104684
+ if (typeof connection2 === "object" && connection2.url !== void 0) {
104685
+ const { url, ...config } = connection2;
104686
+ const instance3 = client2(url, config);
104687
+ const db3 = drizzle22(instance3, drizzleConfig);
104688
+ return db3;
104689
+ }
104690
+ const instance2 = client2(connection2);
104691
+ const db22 = drizzle22(instance2, drizzleConfig);
104692
+ return db22;
104693
+ }
104694
+ const instance = client2(params[0]);
104695
+ const db2 = drizzle22(instance);
104936
104696
  return db2;
104937
104697
  }
104938
104698
  case "tidb-serverless": {
104939
104699
  const { connect: connect3 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2)).catch(() => importError("@tidbcloud/serverless"));
104940
104700
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_tidb_serverless(), tidb_serverless_exports));
104941
- const instance = connect3(connection2);
104701
+ if (typeof params[0] === "string") {
104702
+ const instance2 = connect3({
104703
+ url: params[0]
104704
+ });
104705
+ const db22 = drizzle22(instance2);
104706
+ return db22;
104707
+ }
104708
+ const { connection: connection2, ...drizzleConfig } = params[0];
104709
+ const instance = typeof connection2 === "string" ? connect3({
104710
+ url: connection2
104711
+ }) : connect3(connection2);
104942
104712
  const db2 = drizzle22(instance, drizzleConfig);
104943
- db2.$client = instance;
104944
104713
  return db2;
104945
104714
  }
104946
104715
  case "vercel-postgres": {
104716
+ const drizzleConfig = params[0];
104947
104717
  const { sql: sql3 } = await Promise.resolve().then(() => (init_index_node(), index_node_exports)).catch(() => importError("@vercel/postgres"));
104948
104718
  const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_vercel_postgres(), vercel_postgres_exports));
104949
104719
  const db2 = drizzle22(sql3, drizzleConfig);
104950
- db2.$client = sql3;
104951
104720
  return db2;
104952
104721
  }
104953
104722
  }
@@ -104967,17 +104736,7 @@ var init_monodriver = __esm({
104967
104736
 
104968
104737
  // ../drizzle-orm/dist/migrator.js
104969
104738
  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
- }
104739
+ const migrationFolderTo = config.migrationsFolder;
104981
104740
  const migrationQueries = [];
104982
104741
  const journalPath = `${migrationFolderTo}/meta/_journal.json`;
104983
104742
  if (!import_node_fs.default.existsSync(journalPath)) {
@@ -105004,13 +104763,12 @@ function readMigrationFiles(config) {
105004
104763
  }
105005
104764
  return migrationQueries;
105006
104765
  }
105007
- var import_node_crypto, import_node_fs, import_node_path;
104766
+ var import_node_crypto, import_node_fs;
105008
104767
  var init_migrator = __esm({
105009
104768
  "../drizzle-orm/dist/migrator.js"() {
105010
104769
  "use strict";
105011
104770
  import_node_crypto = __toESM(require("crypto"), 1);
105012
104771
  import_node_fs = __toESM(require("fs"), 1);
105013
- import_node_path = __toESM(require("path"), 1);
105014
104772
  }
105015
104773
  });
105016
104774
 
@@ -105069,7 +104827,7 @@ __export(migrator_exports4, {
105069
104827
  });
105070
104828
  async function migrate4(db2, config) {
105071
104829
  const migrations = readMigrationFiles(config);
105072
- const migrationsTable = config === void 0 ? "__drizzle_migrations" : typeof config === "string" ? "__drizzle_migrations" : config.migrationsTable ?? "__drizzle_migrations";
104830
+ const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
105073
104831
  const migrationTableCreate = sql`
105074
104832
  CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (
105075
104833
  id SERIAL PRIMARY KEY,
@@ -105114,7 +104872,7 @@ __export(migrator_exports5, {
105114
104872
  });
105115
104873
  async function migrate5(db2, config) {
105116
104874
  const migrations = readMigrationFiles(config);
105117
- const migrationsTable = config === void 0 ? "__drizzle_migrations" : typeof config === "string" ? "__drizzle_migrations" : config.migrationsTable ?? "__drizzle_migrations";
104875
+ const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
105118
104876
  const migrationTableCreate = sql`
105119
104877
  CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (
105120
104878
  id SERIAL PRIMARY KEY,
@@ -105157,10 +104915,7 @@ __export(migrator_exports6, {
105157
104915
  });
105158
104916
  async function migrate6(db2, config) {
105159
104917
  const migrations = readMigrationFiles(config);
105160
- const preparedConfig = typeof config === "string" ? {
105161
- migrationsFolder: config
105162
- } : config;
105163
- await db2.dialect.migrate(migrations, db2.session, preparedConfig);
104918
+ await db2.dialect.migrate(migrations, db2.session, config);
105164
104919
  }
105165
104920
  var init_migrator7 = __esm({
105166
104921
  "../drizzle-orm/dist/mysql2/migrator.js"() {
@@ -105176,8 +104931,8 @@ __export(migrator_exports7, {
105176
104931
  });
105177
104932
  async function migrate7(db2, config) {
105178
104933
  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";
104934
+ const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
104935
+ const migrationsSchema = config.migrationsSchema ?? "drizzle";
105181
104936
  const migrationTableCreate = sql`
105182
104937
  CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsSchema)}.${sql.identifier(migrationsTable)} (
105183
104938
  id SERIAL PRIMARY KEY,
@@ -105253,10 +105008,7 @@ __export(migrator_exports10, {
105253
105008
  });
105254
105009
  async function migrate10(db2, config) {
105255
105010
  const migrations = readMigrationFiles(config);
105256
- const preparedConfig = typeof config === "string" ? {
105257
- migrationsFolder: config
105258
- } : config;
105259
- await db2.dialect.migrate(migrations, db2.session, preparedConfig);
105011
+ await db2.dialect.migrate(migrations, db2.session, config);
105260
105012
  }
105261
105013
  var init_migrator11 = __esm({
105262
105014
  "../drizzle-orm/dist/planetscale-serverless/migrator.js"() {
@@ -105583,7 +105335,6 @@ var init_pgSerializer = __esm({
105583
105335
  const sequencesToReturn = {};
105584
105336
  const indexesInSchema = {};
105585
105337
  for (const table4 of tables) {
105586
- const checksInTable = {};
105587
105338
  const {
105588
105339
  name: tableName,
105589
105340
  columns,
@@ -105599,7 +105350,6 @@ var init_pgSerializer = __esm({
105599
105350
  }
105600
105351
  const columnsObject = {};
105601
105352
  const indexesObject = {};
105602
- const checksObject = {};
105603
105353
  const foreignKeysObject = {};
105604
105354
  const primaryKeysObject = {};
105605
105355
  const uniqueConstraintObject = {};
@@ -105846,33 +105596,6 @@ ${withStyle.errorWarning(
105846
105596
  with: value.config.with ?? {}
105847
105597
  };
105848
105598
  });
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
105599
  const tableKey2 = `${schema4 ?? "public"}.${tableName}`;
105877
105600
  result[tableKey2] = {
105878
105601
  name: tableName,
@@ -105881,8 +105604,7 @@ ${withStyle.errorWarning(
105881
105604
  indexes: indexesObject,
105882
105605
  foreignKeys: foreignKeysObject,
105883
105606
  compositePrimaryKeys: primaryKeysObject,
105884
- uniqueConstraints: uniqueConstraintObject,
105885
- checkConstraints: checksObject
105607
+ uniqueConstraints: uniqueConstraintObject
105886
105608
  };
105887
105609
  }
105888
105610
  for (const sequence of sequences) {
@@ -105971,7 +105693,6 @@ ${withStyle.errorWarning(
105971
105693
  let indexesCount = 0;
105972
105694
  let foreignKeysCount = 0;
105973
105695
  let tableCount = 0;
105974
- let checksCount = 0;
105975
105696
  const sequencesToReturn = {};
105976
105697
  const seqWhere = schemaFilters.map((t5) => `schemaname = '${t5}'`).join(" or ");
105977
105698
  const allSequences = await db2.query(
@@ -106041,8 +105762,7 @@ ${withStyle.errorWarning(
106041
105762
  const indexToReturn = {};
106042
105763
  const foreignKeysToReturn = {};
106043
105764
  const primaryKeys = {};
106044
- const uniqueConstraints = {};
106045
- const checkConstraints = {};
105765
+ const uniqueConstrains = {};
106046
105766
  const tableResponse = await db2.query(
106047
105767
  `SELECT a.attrelid::regclass::text, a.attname, is_nullable, a.attndims as array_dimensions
106048
105768
  , CASE WHEN a.atttypid = ANY ('{int,int8,int2}'::regtype[])
@@ -106080,97 +105800,55 @@ ${withStyle.errorWarning(
106080
105800
  ORDER BY a.attnum;`
106081
105801
  );
106082
105802
  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}';`
105803
+ `SELECT c.column_name, c.data_type, constraint_type, constraint_name, constraint_schema
105804
+ FROM information_schema.table_constraints tc
105805
+ JOIN information_schema.constraint_column_usage AS ccu USING (constraint_schema, constraint_name)
105806
+ JOIN information_schema.columns AS c ON c.table_schema = tc.constraint_schema
105807
+ AND tc.table_name = c.table_name AND ccu.column_name = c.column_name
105808
+ WHERE tc.table_name = '${tableName}' and constraint_schema = '${tableSchema}';`
106109
105809
  );
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
105810
  columnsCount += tableResponse.length;
106133
105811
  if (progressCallback) {
106134
105812
  progressCallback("columns", columnsCount, "fetching");
106135
105813
  }
106136
105814
  const tableForeignKeys = await db2.query(
106137
105815
  `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');`
105816
+ con.contype AS constraint_type,
105817
+ nsp.nspname AS constraint_schema,
105818
+ con.conname AS constraint_name,
105819
+ rel.relname AS table_name,
105820
+ att.attname AS column_name,
105821
+ fnsp.nspname AS foreign_table_schema,
105822
+ frel.relname AS foreign_table_name,
105823
+ fatt.attname AS foreign_column_name,
105824
+ CASE con.confupdtype
105825
+ WHEN 'a' THEN 'NO ACTION'
105826
+ WHEN 'r' THEN 'RESTRICT'
105827
+ WHEN 'n' THEN 'SET NULL'
105828
+ WHEN 'c' THEN 'CASCADE'
105829
+ WHEN 'd' THEN 'SET DEFAULT'
105830
+ END AS update_rule,
105831
+ CASE con.confdeltype
105832
+ WHEN 'a' THEN 'NO ACTION'
105833
+ WHEN 'r' THEN 'RESTRICT'
105834
+ WHEN 'n' THEN 'SET NULL'
105835
+ WHEN 'c' THEN 'CASCADE'
105836
+ WHEN 'd' THEN 'SET DEFAULT'
105837
+ END AS delete_rule
105838
+ FROM
105839
+ pg_catalog.pg_constraint con
105840
+ JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelid
105841
+ JOIN pg_catalog.pg_namespace nsp ON nsp.oid = con.connamespace
105842
+ LEFT JOIN pg_catalog.pg_attribute att ON att.attnum = ANY (con.conkey)
105843
+ AND att.attrelid = con.conrelid
105844
+ LEFT JOIN pg_catalog.pg_class frel ON frel.oid = con.confrelid
105845
+ LEFT JOIN pg_catalog.pg_namespace fnsp ON fnsp.oid = frel.relnamespace
105846
+ LEFT JOIN pg_catalog.pg_attribute fatt ON fatt.attnum = ANY (con.confkey)
105847
+ AND fatt.attrelid = con.confrelid
105848
+ WHERE
105849
+ nsp.nspname = '${tableSchema}'
105850
+ AND rel.relname = '${tableName}'
105851
+ AND con.contype IN ('f');`
106174
105852
  );
106175
105853
  foreignKeysCount += tableForeignKeys.length;
106176
105854
  if (progressCallback) {
@@ -106212,29 +105890,16 @@ ${withStyle.errorWarning(
106212
105890
  for (const unqs of uniqueConstrainsRows) {
106213
105891
  const columnName = unqs.column_name;
106214
105892
  const constraintName = unqs.constraint_name;
106215
- if (typeof uniqueConstraints[constraintName] !== "undefined") {
106216
- uniqueConstraints[constraintName].columns.push(columnName);
105893
+ if (typeof uniqueConstrains[constraintName] !== "undefined") {
105894
+ uniqueConstrains[constraintName].columns.push(columnName);
106217
105895
  } else {
106218
- uniqueConstraints[constraintName] = {
105896
+ uniqueConstrains[constraintName] = {
106219
105897
  columns: [columnName],
106220
105898
  nullsNotDistinct: false,
106221
105899
  name: constraintName
106222
105900
  };
106223
105901
  }
106224
105902
  }
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
105903
  for (const columnResponse of tableResponse) {
106239
105904
  const columnName = columnResponse.attname;
106240
105905
  const columnAdditionalDT = columnResponse.additional_dt;
@@ -106478,8 +106143,7 @@ ${withStyle.errorWarning(
106478
106143
  indexes: indexToReturn,
106479
106144
  foreignKeys: foreignKeysToReturn,
106480
106145
  compositePrimaryKeys: primaryKeys,
106481
- uniqueConstraints,
106482
- checkConstraints
106146
+ uniqueConstraints: uniqueConstrains
106483
106147
  };
106484
106148
  } catch (e5) {
106485
106149
  rej(e5);
@@ -106497,7 +106161,6 @@ ${withStyle.errorWarning(
106497
106161
  progressCallback("columns", columnsCount, "done");
106498
106162
  progressCallback("indexes", indexesCount, "done");
106499
106163
  progressCallback("fks", foreignKeysCount, "done");
106500
- progressCallback("checks", checksCount, "done");
106501
106164
  }
106502
106165
  const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
106503
106166
  return {
@@ -106702,13 +106365,10 @@ var init_sqliteSerializer = __esm({
106702
106365
  const foreignKeysObject = {};
106703
106366
  const primaryKeysObject = {};
106704
106367
  const uniqueConstraintObject = {};
106705
- const checkConstraintObject = {};
106706
- const checksInTable = {};
106707
106368
  const {
106708
106369
  name: tableName,
106709
106370
  columns,
106710
106371
  indexes,
106711
- checks,
106712
106372
  foreignKeys: tableForeignKeys,
106713
106373
  primaryKeys,
106714
106374
  uniqueConstraints
@@ -106865,39 +106525,13 @@ The unique constraint ${source_default.underline.blue(
106865
106525
  columnsObject[it.columns[0].name].primaryKey = true;
106866
106526
  }
106867
106527
  });
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
106528
  result[tableName] = {
106894
106529
  name: tableName,
106895
106530
  columns: columnsObject,
106896
106531
  indexes: indexesObject,
106897
106532
  foreignKeys: foreignKeysObject,
106898
106533
  compositePrimaryKeys: primaryKeysObject,
106899
- uniqueConstraints: uniqueConstraintObject,
106900
- checkConstraints: checkConstraintObject
106534
+ uniqueConstraints: uniqueConstraintObject
106901
106535
  };
106902
106536
  }
106903
106537
  return {
@@ -106944,7 +106578,6 @@ ${withStyle.errorWarning(
106944
106578
  let tablesCount = /* @__PURE__ */ new Set();
106945
106579
  let indexesCount = 0;
106946
106580
  let foreignKeysCount = 0;
106947
- let checksCount = 0;
106948
106581
  const tableToPk = {};
106949
106582
  let tableToGeneratedColumnsInfo = {};
106950
106583
  for (const column4 of columns) {
@@ -107002,8 +106635,7 @@ ${withStyle.errorWarning(
107002
106635
  compositePrimaryKeys: {},
107003
106636
  indexes: {},
107004
106637
  foreignKeys: {},
107005
- uniqueConstraints: {},
107006
- checkConstraints: {}
106638
+ uniqueConstraints: {}
107007
106639
  };
107008
106640
  } else {
107009
106641
  result[tableName].columns[columnName] = newColumn;
@@ -107117,56 +106749,6 @@ WHERE
107117
106749
  progressCallback("indexes", indexesCount, "done");
107118
106750
  progressCallback("enums", 0, "done");
107119
106751
  }
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
106752
  return {
107171
106753
  version: "6",
107172
106754
  dialect: "sqlite",
@@ -108608,7 +108190,6 @@ var init_mysqlSerializer = __esm({
108608
108190
  indexes,
108609
108191
  foreignKeys,
108610
108192
  schema: schema4,
108611
- checks,
108612
108193
  primaryKeys,
108613
108194
  uniqueConstraints
108614
108195
  } = getTableConfig3(table4);
@@ -108617,8 +108198,6 @@ var init_mysqlSerializer = __esm({
108617
108198
  const foreignKeysObject = {};
108618
108199
  const primaryKeysObject = {};
108619
108200
  const uniqueConstraintObject = {};
108620
- const checkConstraintObject = {};
108621
- let checksInTable = {};
108622
108201
  columns.forEach((column4) => {
108623
108202
  const notNull = column4.notNull;
108624
108203
  const sqlTypeLowered = column4.getSQLType().toLowerCase();
@@ -108831,32 +108410,6 @@ We have encountered a collision between the index name on columns ${source_defau
108831
108410
  lock: value.config.lock
108832
108411
  };
108833
108412
  });
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
108413
  if (!schema4) {
108861
108414
  result[tableName] = {
108862
108415
  name: tableName,
@@ -108864,8 +108417,7 @@ ${withStyle.errorWarning(
108864
108417
  indexes: indexesObject,
108865
108418
  foreignKeys: foreignKeysObject,
108866
108419
  compositePrimaryKeys: primaryKeysObject,
108867
- uniqueConstraints: uniqueConstraintObject,
108868
- checkConstraint: checkConstraintObject
108420
+ uniqueConstraints: uniqueConstraintObject
108869
108421
  };
108870
108422
  }
108871
108423
  }
@@ -108892,7 +108444,6 @@ ${withStyle.errorWarning(
108892
108444
  let tablesCount = /* @__PURE__ */ new Set();
108893
108445
  let indexesCount = 0;
108894
108446
  let foreignKeysCount = 0;
108895
- let checksCount = 0;
108896
108447
  const idxs = await db2.query(
108897
108448
  `select * from INFORMATION_SCHEMA.STATISTICS
108898
108449
  WHERE INFORMATION_SCHEMA.STATISTICS.TABLE_SCHEMA = '${inputSchema}' and INFORMATION_SCHEMA.STATISTICS.INDEX_NAME != 'PRIMARY';`
@@ -108987,8 +108538,7 @@ ${withStyle.errorWarning(
108987
108538
  compositePrimaryKeys: {},
108988
108539
  indexes: {},
108989
108540
  foreignKeys: {},
108990
- uniqueConstraints: {},
108991
- checkConstraint: {}
108541
+ uniqueConstraints: {}
108992
108542
  };
108993
108543
  } else {
108994
108544
  result[tableName].columns[columnName] = newColumn;
@@ -109137,38 +108687,6 @@ ${withStyle.errorWarning(
109137
108687
  progressCallback("indexes", indexesCount, "done");
109138
108688
  progressCallback("enums", 0, "done");
109139
108689
  }
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
108690
  return {
109173
108691
  version: "5",
109174
108692
  dialect: "mysql",