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.
- package/api.d.mts +0 -82
- package/api.d.ts +0 -82
- package/api.js +529 -1011
- package/api.mjs +528 -1010
- package/bin.cjs +139 -793
- package/package.json +1 -1
- package/utils.js +6 -24
- package/utils.mjs +6 -24
package/api.mjs
CHANGED
@@ -1061,8 +1061,8 @@ var require_minimatch = __commonJS({
|
|
1061
1061
|
return new Minimatch2(pattern, options).match(p7);
|
1062
1062
|
};
|
1063
1063
|
module.exports = minimatch2;
|
1064
|
-
var
|
1065
|
-
minimatch2.sep =
|
1064
|
+
var path2 = require_path();
|
1065
|
+
minimatch2.sep = path2.sep;
|
1066
1066
|
var GLOBSTAR2 = Symbol("globstar **");
|
1067
1067
|
minimatch2.GLOBSTAR = GLOBSTAR2;
|
1068
1068
|
var expand2 = require_brace_expansion();
|
@@ -1567,8 +1567,8 @@ var require_minimatch = __commonJS({
|
|
1567
1567
|
if (this.empty) return f5 === "";
|
1568
1568
|
if (f5 === "/" && partial) return true;
|
1569
1569
|
const options = this.options;
|
1570
|
-
if (
|
1571
|
-
f5 = f5.split(
|
1570
|
+
if (path2.sep !== "/") {
|
1571
|
+
f5 = f5.split(path2.sep).join("/");
|
1572
1572
|
}
|
1573
1573
|
f5 = f5.split(slashSplit);
|
1574
1574
|
this.debug(this.pattern, "split", f5);
|
@@ -1665,7 +1665,7 @@ var require_common = __commonJS({
|
|
1665
1665
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
1666
1666
|
}
|
1667
1667
|
var fs5 = __require("fs");
|
1668
|
-
var
|
1668
|
+
var path2 = __require("path");
|
1669
1669
|
var minimatch2 = require_minimatch();
|
1670
1670
|
var isAbsolute = __require("path").isAbsolute;
|
1671
1671
|
var Minimatch2 = minimatch2.Minimatch;
|
@@ -1732,13 +1732,13 @@ var require_common = __commonJS({
|
|
1732
1732
|
self2.changedCwd = false;
|
1733
1733
|
var cwd = process.cwd();
|
1734
1734
|
if (!ownProp(options, "cwd"))
|
1735
|
-
self2.cwd =
|
1735
|
+
self2.cwd = path2.resolve(cwd);
|
1736
1736
|
else {
|
1737
|
-
self2.cwd =
|
1737
|
+
self2.cwd = path2.resolve(options.cwd);
|
1738
1738
|
self2.changedCwd = self2.cwd !== cwd;
|
1739
1739
|
}
|
1740
|
-
self2.root = options.root ||
|
1741
|
-
self2.root =
|
1740
|
+
self2.root = options.root || path2.resolve(self2.cwd, "/");
|
1741
|
+
self2.root = path2.resolve(self2.root);
|
1742
1742
|
self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
|
1743
1743
|
self2.nomount = !!options.nomount;
|
1744
1744
|
if (process.platform === "win32") {
|
@@ -1820,30 +1820,30 @@ var require_common = __commonJS({
|
|
1820
1820
|
function makeAbs(self2, f5) {
|
1821
1821
|
var abs = f5;
|
1822
1822
|
if (f5.charAt(0) === "/") {
|
1823
|
-
abs =
|
1823
|
+
abs = path2.join(self2.root, f5);
|
1824
1824
|
} else if (isAbsolute(f5) || f5 === "") {
|
1825
1825
|
abs = f5;
|
1826
1826
|
} else if (self2.changedCwd) {
|
1827
|
-
abs =
|
1827
|
+
abs = path2.resolve(self2.cwd, f5);
|
1828
1828
|
} else {
|
1829
|
-
abs =
|
1829
|
+
abs = path2.resolve(f5);
|
1830
1830
|
}
|
1831
1831
|
if (process.platform === "win32")
|
1832
1832
|
abs = abs.replace(/\\/g, "/");
|
1833
1833
|
return abs;
|
1834
1834
|
}
|
1835
|
-
function isIgnored(self2,
|
1835
|
+
function isIgnored(self2, path3) {
|
1836
1836
|
if (!self2.ignore.length)
|
1837
1837
|
return false;
|
1838
1838
|
return self2.ignore.some(function(item) {
|
1839
|
-
return item.matcher.match(
|
1839
|
+
return item.matcher.match(path3) || !!(item.gmatcher && item.gmatcher.match(path3));
|
1840
1840
|
});
|
1841
1841
|
}
|
1842
|
-
function childrenIgnored(self2,
|
1842
|
+
function childrenIgnored(self2, path3) {
|
1843
1843
|
if (!self2.ignore.length)
|
1844
1844
|
return false;
|
1845
1845
|
return self2.ignore.some(function(item) {
|
1846
|
-
return !!(item.gmatcher && item.gmatcher.match(
|
1846
|
+
return !!(item.gmatcher && item.gmatcher.match(path3));
|
1847
1847
|
});
|
1848
1848
|
}
|
1849
1849
|
}
|
@@ -1860,7 +1860,7 @@ var require_sync = __commonJS({
|
|
1860
1860
|
var Minimatch2 = minimatch2.Minimatch;
|
1861
1861
|
var Glob = require_glob().Glob;
|
1862
1862
|
var util2 = __require("util");
|
1863
|
-
var
|
1863
|
+
var path2 = __require("path");
|
1864
1864
|
var assert = __require("assert");
|
1865
1865
|
var isAbsolute = __require("path").isAbsolute;
|
1866
1866
|
var common = require_common();
|
@@ -1988,7 +1988,7 @@ var require_sync = __commonJS({
|
|
1988
1988
|
e5 = prefix2 + e5;
|
1989
1989
|
}
|
1990
1990
|
if (e5.charAt(0) === "/" && !this.nomount) {
|
1991
|
-
e5 =
|
1991
|
+
e5 = path2.join(this.root, e5);
|
1992
1992
|
}
|
1993
1993
|
this._emitMatch(index4, e5);
|
1994
1994
|
}
|
@@ -2137,9 +2137,9 @@ var require_sync = __commonJS({
|
|
2137
2137
|
if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
|
2138
2138
|
var trail = /[\/\\]$/.test(prefix2);
|
2139
2139
|
if (prefix2.charAt(0) === "/") {
|
2140
|
-
prefix2 =
|
2140
|
+
prefix2 = path2.join(this.root, prefix2);
|
2141
2141
|
} else {
|
2142
|
-
prefix2 =
|
2142
|
+
prefix2 = path2.resolve(this.root, prefix2);
|
2143
2143
|
if (trail)
|
2144
2144
|
prefix2 += "/";
|
2145
2145
|
}
|
@@ -2335,7 +2335,7 @@ var require_glob = __commonJS({
|
|
2335
2335
|
var Minimatch2 = minimatch2.Minimatch;
|
2336
2336
|
var inherits = require_inherits();
|
2337
2337
|
var EE = __require("events").EventEmitter;
|
2338
|
-
var
|
2338
|
+
var path2 = __require("path");
|
2339
2339
|
var assert = __require("assert");
|
2340
2340
|
var isAbsolute = __require("path").isAbsolute;
|
2341
2341
|
var globSync = require_sync();
|
@@ -2616,7 +2616,7 @@ var require_glob = __commonJS({
|
|
2616
2616
|
e5 = prefix2 + e5;
|
2617
2617
|
}
|
2618
2618
|
if (e5.charAt(0) === "/" && !this.nomount) {
|
2619
|
-
e5 =
|
2619
|
+
e5 = path2.join(this.root, e5);
|
2620
2620
|
}
|
2621
2621
|
this._emitMatch(index4, e5);
|
2622
2622
|
}
|
@@ -2803,9 +2803,9 @@ var require_glob = __commonJS({
|
|
2803
2803
|
if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
|
2804
2804
|
var trail = /[\/\\]$/.test(prefix2);
|
2805
2805
|
if (prefix2.charAt(0) === "/") {
|
2806
|
-
prefix2 =
|
2806
|
+
prefix2 = path2.join(this.root, prefix2);
|
2807
2807
|
} else {
|
2808
|
-
prefix2 =
|
2808
|
+
prefix2 = path2.resolve(this.root, prefix2);
|
2809
2809
|
if (trail)
|
2810
2810
|
prefix2 += "/";
|
2811
2811
|
}
|
@@ -3957,8 +3957,8 @@ var init_lib = __esm({
|
|
3957
3957
|
};
|
3958
3958
|
overrideErrorMap = errorMap;
|
3959
3959
|
makeIssue = (params) => {
|
3960
|
-
const { data, path:
|
3961
|
-
const fullPath = [...
|
3960
|
+
const { data, path: path2, errorMaps, issueData } = params;
|
3961
|
+
const fullPath = [...path2, ...issueData.path || []];
|
3962
3962
|
const fullIssue = {
|
3963
3963
|
...issueData,
|
3964
3964
|
path: fullPath
|
@@ -4049,11 +4049,11 @@ var init_lib = __esm({
|
|
4049
4049
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
|
4050
4050
|
})(errorUtil || (errorUtil = {}));
|
4051
4051
|
ParseInputLazyPath = class {
|
4052
|
-
constructor(parent, value,
|
4052
|
+
constructor(parent, value, path2, key) {
|
4053
4053
|
this._cachedPath = [];
|
4054
4054
|
this.parent = parent;
|
4055
4055
|
this.data = value;
|
4056
|
-
this._path =
|
4056
|
+
this._path = path2;
|
4057
4057
|
this._key = key;
|
4058
4058
|
}
|
4059
4059
|
get path() {
|
@@ -7219,7 +7219,7 @@ var init_lib = __esm({
|
|
7219
7219
|
});
|
7220
7220
|
|
7221
7221
|
// src/serializer/mysqlSchema.ts
|
7222
|
-
var index, fk, column, tableV3, compositePK, uniqueConstraint,
|
7222
|
+
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;
|
7223
7223
|
var init_mysqlSchema = __esm({
|
7224
7224
|
"src/serializer/mysqlSchema.ts"() {
|
7225
7225
|
"use strict";
|
@@ -7269,10 +7269,6 @@ var init_mysqlSchema = __esm({
|
|
7269
7269
|
name: stringType(),
|
7270
7270
|
columns: stringType().array()
|
7271
7271
|
}).strict();
|
7272
|
-
checkConstraint = objectType({
|
7273
|
-
name: stringType(),
|
7274
|
-
value: stringType()
|
7275
|
-
}).strict();
|
7276
7272
|
tableV4 = objectType({
|
7277
7273
|
name: stringType(),
|
7278
7274
|
schema: stringType().optional(),
|
@@ -7286,8 +7282,7 @@ var init_mysqlSchema = __esm({
|
|
7286
7282
|
indexes: recordType(stringType(), index),
|
7287
7283
|
foreignKeys: recordType(stringType(), fk),
|
7288
7284
|
compositePrimaryKeys: recordType(stringType(), compositePK),
|
7289
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint).default({})
|
7290
|
-
checkConstraint: recordType(stringType(), checkConstraint).default({})
|
7285
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint).default({})
|
7291
7286
|
}).strict();
|
7292
7287
|
kitInternals = objectType({
|
7293
7288
|
tables: recordType(
|
@@ -7364,8 +7359,7 @@ var init_mysqlSchema = __esm({
|
|
7364
7359
|
indexes: recordType(stringType(), stringType()),
|
7365
7360
|
foreignKeys: recordType(stringType(), stringType()),
|
7366
7361
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
7367
|
-
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
7368
|
-
checkConstraints: recordType(stringType(), stringType()).default({})
|
7362
|
+
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
7369
7363
|
}).strict();
|
7370
7364
|
schemaSquashed = objectType({
|
7371
7365
|
version: literalType("5"),
|
@@ -7432,13 +7426,6 @@ var init_mysqlSchema = __esm({
|
|
7432
7426
|
onDelete
|
7433
7427
|
});
|
7434
7428
|
return result;
|
7435
|
-
},
|
7436
|
-
squashCheck: (input) => {
|
7437
|
-
return `${input.name};${input.value}`;
|
7438
|
-
},
|
7439
|
-
unsquashCheck: (input) => {
|
7440
|
-
const [name2, value] = input.split(";");
|
7441
|
-
return { name: name2, value };
|
7442
7429
|
}
|
7443
7430
|
};
|
7444
7431
|
squashMysqlScheme = (json) => {
|
@@ -7459,9 +7446,6 @@ var init_mysqlSchema = __esm({
|
|
7459
7446
|
return MySqlSquasher.squashUnique(unq);
|
7460
7447
|
}
|
7461
7448
|
);
|
7462
|
-
const squashedCheckConstraints = mapValues(it[1].checkConstraint, (check) => {
|
7463
|
-
return MySqlSquasher.squashCheck(check);
|
7464
|
-
});
|
7465
7449
|
return [
|
7466
7450
|
it[0],
|
7467
7451
|
{
|
@@ -7470,8 +7454,7 @@ var init_mysqlSchema = __esm({
|
|
7470
7454
|
indexes: squashedIndexes,
|
7471
7455
|
foreignKeys: squashedFKs,
|
7472
7456
|
compositePrimaryKeys: squashedPKs,
|
7473
|
-
uniqueConstraints: squashedUniqueConstraints
|
7474
|
-
checkConstraints: squashedCheckConstraints
|
7457
|
+
uniqueConstraints: squashedUniqueConstraints
|
7475
7458
|
}
|
7476
7459
|
];
|
7477
7460
|
})
|
@@ -7521,7 +7504,7 @@ var init_vector = __esm({
|
|
7521
7504
|
});
|
7522
7505
|
|
7523
7506
|
// src/serializer/pgSchema.ts
|
7524
|
-
var indexV2, columnV2, tableV2, enumSchemaV1, enumSchema, pgSchemaV2, references, columnV1, tableV1, pgSchemaV1, indexColumn, index2, indexV4, indexV5, indexV6, fk2, sequenceSchema, sequenceSquashed, columnV7, column2,
|
7507
|
+
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;
|
7525
7508
|
var init_pgSchema = __esm({
|
7526
7509
|
"src/serializer/pgSchema.ts"() {
|
7527
7510
|
"use strict";
|
@@ -7685,10 +7668,6 @@ var init_pgSchema = __esm({
|
|
7685
7668
|
}).optional(),
|
7686
7669
|
identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
|
7687
7670
|
}).strict();
|
7688
|
-
checkConstraint2 = objectType({
|
7689
|
-
name: stringType(),
|
7690
|
-
value: stringType()
|
7691
|
-
}).strict();
|
7692
7671
|
columnSquashed = objectType({
|
7693
7672
|
name: stringType(),
|
7694
7673
|
type: stringType(),
|
@@ -7761,8 +7740,7 @@ var init_pgSchema = __esm({
|
|
7761
7740
|
indexes: recordType(stringType(), index2),
|
7762
7741
|
foreignKeys: recordType(stringType(), fk2),
|
7763
7742
|
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
7764
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
7765
|
-
checkConstraints: recordType(stringType(), checkConstraint2).default({})
|
7743
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
7766
7744
|
}).strict();
|
7767
7745
|
schemaHash2 = objectType({
|
7768
7746
|
id: stringType(),
|
@@ -7870,8 +7848,7 @@ var init_pgSchema = __esm({
|
|
7870
7848
|
indexes: recordType(stringType(), stringType()),
|
7871
7849
|
foreignKeys: recordType(stringType(), stringType()),
|
7872
7850
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
7873
|
-
uniqueConstraints: recordType(stringType(), stringType())
|
7874
|
-
checkConstraints: recordType(stringType(), stringType())
|
7851
|
+
uniqueConstraints: recordType(stringType(), stringType())
|
7875
7852
|
}).strict();
|
7876
7853
|
tableSquashedV42 = objectType({
|
7877
7854
|
name: stringType(),
|
@@ -8053,16 +8030,6 @@ var init_pgSchema = __esm({
|
|
8053
8030
|
cache: splitted[6] !== "undefined" ? splitted[6] : void 0,
|
8054
8031
|
cycle: splitted[7] === "true"
|
8055
8032
|
};
|
8056
|
-
},
|
8057
|
-
squashCheck: (check) => {
|
8058
|
-
return `${check.name};${check.value}`;
|
8059
|
-
},
|
8060
|
-
unsquashCheck: (input) => {
|
8061
|
-
const [
|
8062
|
-
name2,
|
8063
|
-
value
|
8064
|
-
] = input.split(";");
|
8065
|
-
return { name: name2, value };
|
8066
8033
|
}
|
8067
8034
|
};
|
8068
8035
|
squashPgScheme = (json, action) => {
|
@@ -8095,12 +8062,6 @@ var init_pgSchema = __esm({
|
|
8095
8062
|
return PgSquasher.squashUnique(unq);
|
8096
8063
|
}
|
8097
8064
|
);
|
8098
|
-
const squashedChecksContraints = mapValues(
|
8099
|
-
it[1].checkConstraints,
|
8100
|
-
(check) => {
|
8101
|
-
return PgSquasher.squashCheck(check);
|
8102
|
-
}
|
8103
|
-
);
|
8104
8065
|
return [
|
8105
8066
|
it[0],
|
8106
8067
|
{
|
@@ -8110,8 +8071,7 @@ var init_pgSchema = __esm({
|
|
8110
8071
|
indexes: squashedIndexes,
|
8111
8072
|
foreignKeys: squashedFKs,
|
8112
8073
|
compositePrimaryKeys: squashedPKs,
|
8113
|
-
uniqueConstraints: squashedUniqueConstraints
|
8114
|
-
checkConstraints: squashedChecksContraints
|
8074
|
+
uniqueConstraints: squashedUniqueConstraints
|
8115
8075
|
}
|
8116
8076
|
];
|
8117
8077
|
})
|
@@ -8156,7 +8116,7 @@ var init_pgSchema = __esm({
|
|
8156
8116
|
});
|
8157
8117
|
|
8158
8118
|
// src/serializer/sqliteSchema.ts
|
8159
|
-
var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3,
|
8119
|
+
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;
|
8160
8120
|
var init_sqliteSchema = __esm({
|
8161
8121
|
"src/serializer/sqliteSchema.ts"() {
|
8162
8122
|
"use strict";
|
@@ -8203,18 +8163,13 @@ var init_sqliteSchema = __esm({
|
|
8203
8163
|
name: stringType(),
|
8204
8164
|
columns: stringType().array()
|
8205
8165
|
}).strict();
|
8206
|
-
checkConstraint3 = objectType({
|
8207
|
-
name: stringType(),
|
8208
|
-
value: stringType()
|
8209
|
-
}).strict();
|
8210
8166
|
table3 = objectType({
|
8211
8167
|
name: stringType(),
|
8212
8168
|
columns: recordType(stringType(), column3),
|
8213
8169
|
indexes: recordType(stringType(), index3),
|
8214
8170
|
foreignKeys: recordType(stringType(), fk3),
|
8215
8171
|
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
8216
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
8217
|
-
checkConstraints: recordType(stringType(), checkConstraint3).default({})
|
8172
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
8218
8173
|
}).strict();
|
8219
8174
|
dialect2 = enumType(["sqlite"]);
|
8220
8175
|
schemaHash3 = objectType({
|
@@ -8276,8 +8231,7 @@ var init_sqliteSchema = __esm({
|
|
8276
8231
|
indexes: recordType(stringType(), stringType()),
|
8277
8232
|
foreignKeys: recordType(stringType(), stringType()),
|
8278
8233
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
8279
|
-
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
8280
|
-
checkConstraints: recordType(stringType(), stringType()).default({})
|
8234
|
+
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
8281
8235
|
}).strict();
|
8282
8236
|
schemaSquashed2 = objectType({
|
8283
8237
|
version: latestVersion,
|
@@ -8359,16 +8313,6 @@ var init_sqliteSchema = __esm({
|
|
8359
8313
|
},
|
8360
8314
|
unsquashPK: (pk) => {
|
8361
8315
|
return pk.split(",");
|
8362
|
-
},
|
8363
|
-
squashCheck: (check) => {
|
8364
|
-
return `${check.name};${check.value}`;
|
8365
|
-
},
|
8366
|
-
unsquashCheck: (input) => {
|
8367
|
-
const [
|
8368
|
-
name2,
|
8369
|
-
value
|
8370
|
-
] = input.split(";");
|
8371
|
-
return { name: name2, value };
|
8372
8316
|
}
|
8373
8317
|
};
|
8374
8318
|
squashSqliteScheme = (json, action) => {
|
@@ -8395,12 +8339,6 @@ var init_sqliteSchema = __esm({
|
|
8395
8339
|
return SQLiteSquasher.squashUnique(unq);
|
8396
8340
|
}
|
8397
8341
|
);
|
8398
|
-
const squashedCheckConstraints = mapValues(
|
8399
|
-
it[1].checkConstraints,
|
8400
|
-
(check) => {
|
8401
|
-
return SQLiteSquasher.squashCheck(check);
|
8402
|
-
}
|
8403
|
-
);
|
8404
8342
|
return [
|
8405
8343
|
it[0],
|
8406
8344
|
{
|
@@ -8409,8 +8347,7 @@ var init_sqliteSchema = __esm({
|
|
8409
8347
|
indexes: squashedIndexes,
|
8410
8348
|
foreignKeys: squashedFKs,
|
8411
8349
|
compositePrimaryKeys: squashedPKs,
|
8412
|
-
uniqueConstraints: squashedUniqueConstraints
|
8413
|
-
checkConstraints: squashedCheckConstraints
|
8350
|
+
uniqueConstraints: squashedUniqueConstraints
|
8414
8351
|
}
|
8415
8352
|
];
|
8416
8353
|
})
|
@@ -11284,21 +11221,6 @@ var init_jsonDiffer = __esm({
|
|
11284
11221
|
return !it[0].endsWith("__deleted") && !it[0].endsWith("__added");
|
11285
11222
|
})
|
11286
11223
|
);
|
11287
|
-
const addedCheckConstraints = Object.fromEntries(
|
11288
|
-
Object.entries(table4.checkConstraints || {}).filter((it) => {
|
11289
|
-
return it[0].endsWith("__added");
|
11290
|
-
})
|
11291
|
-
);
|
11292
|
-
const deletedCheckConstraints = Object.fromEntries(
|
11293
|
-
Object.entries(table4.checkConstraints || {}).filter((it) => {
|
11294
|
-
return it[0].endsWith("__deleted");
|
11295
|
-
})
|
11296
|
-
);
|
11297
|
-
const alteredCheckConstraints = Object.fromEntries(
|
11298
|
-
Object.entries(table4.checkConstraints || {}).filter((it) => {
|
11299
|
-
return !it[0].endsWith("__deleted") && !it[0].endsWith("__added");
|
11300
|
-
})
|
11301
|
-
);
|
11302
11224
|
const mappedAltered = altered.map((it) => alternationsInColumn(it)).filter(Boolean);
|
11303
11225
|
return {
|
11304
11226
|
name: table4.name,
|
@@ -11315,10 +11237,7 @@ var init_jsonDiffer = __esm({
|
|
11315
11237
|
alteredCompositePKs,
|
11316
11238
|
addedUniqueConstraints,
|
11317
11239
|
deletedUniqueConstraints,
|
11318
|
-
alteredUniqueConstraints
|
11319
|
-
addedCheckConstraints,
|
11320
|
-
deletedCheckConstraints,
|
11321
|
-
alteredCheckConstraints
|
11240
|
+
alteredUniqueConstraints
|
11322
11241
|
};
|
11323
11242
|
};
|
11324
11243
|
alternationsInColumn = (column4) => {
|
@@ -11572,32 +11491,6 @@ var init_jsonDiffer = __esm({
|
|
11572
11491
|
};
|
11573
11492
|
}
|
11574
11493
|
return it;
|
11575
|
-
}).map((it) => {
|
11576
|
-
if ("" in it) {
|
11577
|
-
return {
|
11578
|
-
...it,
|
11579
|
-
autoincrement: {
|
11580
|
-
type: "changed",
|
11581
|
-
old: it.autoincrement.__old,
|
11582
|
-
new: it.autoincrement.__new
|
11583
|
-
}
|
11584
|
-
};
|
11585
|
-
}
|
11586
|
-
if ("autoincrement__added" in it) {
|
11587
|
-
const { autoincrement__added, ...others } = it;
|
11588
|
-
return {
|
11589
|
-
...others,
|
11590
|
-
autoincrement: { type: "added", value: it.autoincrement__added }
|
11591
|
-
};
|
11592
|
-
}
|
11593
|
-
if ("autoincrement__deleted" in it) {
|
11594
|
-
const { autoincrement__deleted, ...others } = it;
|
11595
|
-
return {
|
11596
|
-
...others,
|
11597
|
-
autoincrement: { type: "deleted", value: it.autoincrement__deleted }
|
11598
|
-
};
|
11599
|
-
}
|
11600
|
-
return it;
|
11601
11494
|
}).filter(Boolean);
|
11602
11495
|
return result[0];
|
11603
11496
|
};
|
@@ -11618,7 +11511,7 @@ function fromJson(statements, dialect7, action, json2) {
|
|
11618
11511
|
}).filter((it) => it !== "");
|
11619
11512
|
return result;
|
11620
11513
|
}
|
11621
|
-
var pgNativeTypes, isPgNativeType, Convertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SQLiteCreateTableConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor,
|
11514
|
+
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;
|
11622
11515
|
var init_sqlgenerator = __esm({
|
11623
11516
|
"src/sqlgenerator.ts"() {
|
11624
11517
|
"use strict";
|
@@ -11679,7 +11572,7 @@ var init_sqlgenerator = __esm({
|
|
11679
11572
|
return statement.type === "create_table" && dialect7 === "postgresql";
|
11680
11573
|
}
|
11681
11574
|
convert(st) {
|
11682
|
-
const { tableName, schema: schema4, columns, compositePKs, uniqueConstraints
|
11575
|
+
const { tableName, schema: schema4, columns, compositePKs, uniqueConstraints } = st;
|
11683
11576
|
let statement = "";
|
11684
11577
|
const name2 = schema4 ? `"${schema4}"."${tableName}"` : `"${tableName}"`;
|
11685
11578
|
statement += `CREATE TABLE IF NOT EXISTS ${name2} (
|
@@ -11712,13 +11605,6 @@ var init_sqlgenerator = __esm({
|
|
11712
11605
|
statement += ` CONSTRAINT "${unsquashedUnique.name}" UNIQUE${unsquashedUnique.nullsNotDistinct ? " NULLS NOT DISTINCT" : ""}("${unsquashedUnique.columns.join(`","`)}")`;
|
11713
11606
|
}
|
11714
11607
|
}
|
11715
|
-
if (typeof checkConstraints !== "undefined" && checkConstraints.length > 0) {
|
11716
|
-
for (const checkConstraint4 of checkConstraints) {
|
11717
|
-
statement += ",\n";
|
11718
|
-
const unsquashedCheck = PgSquasher.unsquashCheck(checkConstraint4);
|
11719
|
-
statement += ` CONSTRAINT "${unsquashedCheck.name}" CHECK (${unsquashedCheck.value})`;
|
11720
|
-
}
|
11721
|
-
}
|
11722
11608
|
statement += `
|
11723
11609
|
);`;
|
11724
11610
|
statement += `
|
@@ -11735,7 +11621,6 @@ var init_sqlgenerator = __esm({
|
|
11735
11621
|
tableName,
|
11736
11622
|
columns,
|
11737
11623
|
schema: schema4,
|
11738
|
-
checkConstraints,
|
11739
11624
|
compositePKs,
|
11740
11625
|
uniqueConstraints,
|
11741
11626
|
internals
|
@@ -11769,13 +11654,6 @@ var init_sqlgenerator = __esm({
|
|
11769
11654
|
statement += ` CONSTRAINT \`${unsquashedUnique.name}\` UNIQUE(${uniqueString})`;
|
11770
11655
|
}
|
11771
11656
|
}
|
11772
|
-
if (typeof checkConstraints !== "undefined" && checkConstraints.length > 0) {
|
11773
|
-
for (const checkConstraint4 of checkConstraints) {
|
11774
|
-
statement += ",\n";
|
11775
|
-
const unsquashedCheck = MySqlSquasher.unsquashCheck(checkConstraint4);
|
11776
|
-
statement += ` CONSTRAINT \`${unsquashedCheck.name}\` CHECK(${unsquashedCheck.value})`;
|
11777
|
-
}
|
11778
|
-
}
|
11779
11657
|
statement += `
|
11780
11658
|
);`;
|
11781
11659
|
statement += `
|
@@ -11793,8 +11671,7 @@ var init_sqlgenerator = __esm({
|
|
11793
11671
|
columns,
|
11794
11672
|
referenceData,
|
11795
11673
|
compositePKs,
|
11796
|
-
uniqueConstraints
|
11797
|
-
checkConstraints
|
11674
|
+
uniqueConstraints
|
11798
11675
|
} = st;
|
11799
11676
|
let statement = "";
|
11800
11677
|
statement += `CREATE TABLE \`${tableName}\` (
|
@@ -11835,17 +11712,10 @@ var init_sqlgenerator = __esm({
|
|
11835
11712
|
if (typeof uniqueConstraints !== "undefined" && uniqueConstraints.length > 0) {
|
11836
11713
|
for (const uniqueConstraint4 of uniqueConstraints) {
|
11837
11714
|
statement += ",\n";
|
11838
|
-
const unsquashedUnique =
|
11715
|
+
const unsquashedUnique = MySqlSquasher.unsquashUnique(uniqueConstraint4);
|
11839
11716
|
statement += ` CONSTRAINT ${unsquashedUnique.name} UNIQUE(\`${unsquashedUnique.columns.join(`\`,\``)}\`)`;
|
11840
11717
|
}
|
11841
11718
|
}
|
11842
|
-
if (typeof checkConstraints !== "undefined" && checkConstraints.length > 0) {
|
11843
|
-
for (const check of checkConstraints) {
|
11844
|
-
statement += ",\n";
|
11845
|
-
const { value, name: name2 } = SQLiteSquasher.unsquashCheck(check);
|
11846
|
-
statement += ` CONSTRAINT "${name2}" CHECK(${value})`;
|
11847
|
-
}
|
11848
|
-
}
|
11849
11719
|
statement += `
|
11850
11720
|
`;
|
11851
11721
|
statement += `);`;
|
@@ -11945,25 +11815,6 @@ var init_sqlgenerator = __esm({
|
|
11945
11815
|
return `ALTER TABLE ${tableNameWithSchema} DROP CONSTRAINT "${unsquashed.name}";`;
|
11946
11816
|
}
|
11947
11817
|
};
|
11948
|
-
PgAlterTableAddCheckConstraintConvertor = class extends Convertor {
|
11949
|
-
can(statement, dialect7) {
|
11950
|
-
return statement.type === "create_check_constraint" && dialect7 === "postgresql";
|
11951
|
-
}
|
11952
|
-
convert(statement) {
|
11953
|
-
const unsquashed = PgSquasher.unsquashCheck(statement.data);
|
11954
|
-
const tableNameWithSchema = statement.schema ? `"${statement.schema}"."${statement.tableName}"` : `"${statement.tableName}"`;
|
11955
|
-
return `ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${unsquashed.name}" CHECK (${unsquashed.value});`;
|
11956
|
-
}
|
11957
|
-
};
|
11958
|
-
PgAlterTableDeleteCheckConstraintConvertor = class extends Convertor {
|
11959
|
-
can(statement, dialect7) {
|
11960
|
-
return statement.type === "delete_check_constraint" && dialect7 === "postgresql";
|
11961
|
-
}
|
11962
|
-
convert(statement) {
|
11963
|
-
const tableNameWithSchema = statement.schema ? `"${statement.schema}"."${statement.tableName}"` : `"${statement.tableName}"`;
|
11964
|
-
return `ALTER TABLE ${tableNameWithSchema} DROP CONSTRAINT "${statement.constraintName}";`;
|
11965
|
-
}
|
11966
|
-
};
|
11967
11818
|
MySQLAlterTableAddUniqueConstraintConvertor = class extends Convertor {
|
11968
11819
|
can(statement, dialect7) {
|
11969
11820
|
return statement.type === "create_unique_constraint" && dialect7 === "mysql";
|
@@ -11982,25 +11833,6 @@ var init_sqlgenerator = __esm({
|
|
11982
11833
|
return `ALTER TABLE \`${statement.tableName}\` DROP INDEX \`${unsquashed.name}\`;`;
|
11983
11834
|
}
|
11984
11835
|
};
|
11985
|
-
MySqlAlterTableAddCheckConstraintConvertor = class extends Convertor {
|
11986
|
-
can(statement, dialect7) {
|
11987
|
-
return statement.type === "create_check_constraint" && dialect7 === "mysql";
|
11988
|
-
}
|
11989
|
-
convert(statement) {
|
11990
|
-
const unsquashed = MySqlSquasher.unsquashCheck(statement.data);
|
11991
|
-
const { tableName } = statement;
|
11992
|
-
return `ALTER TABLE \`${tableName}\` ADD CONSTRAINT \`${unsquashed.name}\` CHECK (${unsquashed.value});`;
|
11993
|
-
}
|
11994
|
-
};
|
11995
|
-
MySqlAlterTableDeleteCheckConstraintConvertor = class extends Convertor {
|
11996
|
-
can(statement, dialect7) {
|
11997
|
-
return statement.type === "delete_check_constraint" && dialect7 === "mysql";
|
11998
|
-
}
|
11999
|
-
convert(statement) {
|
12000
|
-
const { tableName } = statement;
|
12001
|
-
return `ALTER TABLE \`${tableName}\` DROP CONSTRAINT \`${statement.constraintName}\`;`;
|
12002
|
-
}
|
12003
|
-
};
|
12004
11836
|
CreatePgSequenceConvertor = class extends Convertor {
|
12005
11837
|
can(statement, dialect7) {
|
12006
11838
|
return statement.type === "create_sequence" && dialect7 === "postgresql";
|
@@ -12555,7 +12387,7 @@ var init_sqlgenerator = __esm({
|
|
12555
12387
|
};
|
12556
12388
|
LibSQLModifyColumn = class extends Convertor {
|
12557
12389
|
can(statement, dialect7) {
|
12558
|
-
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"
|
12390
|
+
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";
|
12559
12391
|
}
|
12560
12392
|
convert(statement, json2) {
|
12561
12393
|
const { tableName, columnName } = statement;
|
@@ -13142,22 +12974,18 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
13142
12974
|
return statement.type === "recreate_table" && dialect7 === "sqlite";
|
13143
12975
|
}
|
13144
12976
|
convert(statement) {
|
13145
|
-
const { tableName, columns, compositePKs, referenceData
|
12977
|
+
const { tableName, columns, compositePKs, referenceData } = statement;
|
13146
12978
|
const columnNames = columns.map((it) => `"${it.name}"`).join(", ");
|
13147
12979
|
const newTableName = `__new_${tableName}`;
|
13148
12980
|
const sqlStatements = [];
|
13149
12981
|
sqlStatements.push(`PRAGMA foreign_keys=OFF;`);
|
13150
|
-
const mappedCheckConstraints = checkConstraints.map(
|
13151
|
-
(it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `'${newTableName}'.`)
|
13152
|
-
);
|
13153
12982
|
sqlStatements.push(
|
13154
12983
|
new SQLiteCreateTableConvertor().convert({
|
13155
12984
|
type: "sqlite_create_table",
|
13156
12985
|
tableName: newTableName,
|
13157
12986
|
columns,
|
13158
12987
|
referenceData,
|
13159
|
-
compositePKs
|
13160
|
-
checkConstraints: mappedCheckConstraints
|
12988
|
+
compositePKs
|
13161
12989
|
})
|
13162
12990
|
);
|
13163
12991
|
sqlStatements.push(
|
@@ -13188,13 +13016,10 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
13188
13016
|
return statement.type === "recreate_table" && dialect7 === "turso";
|
13189
13017
|
}
|
13190
13018
|
convert(statement) {
|
13191
|
-
const { tableName, columns, compositePKs, referenceData
|
13019
|
+
const { tableName, columns, compositePKs, referenceData } = statement;
|
13192
13020
|
const columnNames = columns.map((it) => `"${it.name}"`).join(", ");
|
13193
13021
|
const newTableName = `__new_${tableName}`;
|
13194
13022
|
const sqlStatements = [];
|
13195
|
-
const mappedCheckConstraints = checkConstraints.map(
|
13196
|
-
(it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `\`${newTableName}\`.`)
|
13197
|
-
);
|
13198
13023
|
sqlStatements.push(`PRAGMA foreign_keys=OFF;`);
|
13199
13024
|
sqlStatements.push(
|
13200
13025
|
new SQLiteCreateTableConvertor().convert({
|
@@ -13202,8 +13027,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
13202
13027
|
tableName: newTableName,
|
13203
13028
|
columns,
|
13204
13029
|
referenceData,
|
13205
|
-
compositePKs
|
13206
|
-
checkConstraints: mappedCheckConstraints
|
13030
|
+
compositePKs
|
13207
13031
|
})
|
13208
13032
|
);
|
13209
13033
|
sqlStatements.push(
|
@@ -13259,10 +13083,6 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT ${statement.newCo
|
|
13259
13083
|
convertors.push(new PgAlterTableAlterColumnSetTypeConvertor());
|
13260
13084
|
convertors.push(new PgAlterTableAddUniqueConstraintConvertor());
|
13261
13085
|
convertors.push(new PgAlterTableDropUniqueConstraintConvertor());
|
13262
|
-
convertors.push(new PgAlterTableAddCheckConstraintConvertor());
|
13263
|
-
convertors.push(new PgAlterTableDeleteCheckConstraintConvertor());
|
13264
|
-
convertors.push(new MySqlAlterTableAddCheckConstraintConvertor());
|
13265
|
-
convertors.push(new MySqlAlterTableDeleteCheckConstraintConvertor());
|
13266
13086
|
convertors.push(new MySQLAlterTableAddUniqueConstraintConvertor());
|
13267
13087
|
convertors.push(new MySQLAlterTableDropUniqueConstraintConvertor());
|
13268
13088
|
convertors.push(new CreatePgIndexConvertor());
|
@@ -13353,10 +13173,6 @@ var init_sqlitePushUtils = __esm({
|
|
13353
13173
|
const compositePKs = Object.values(
|
13354
13174
|
json.tables[tableName].compositePrimaryKeys
|
13355
13175
|
).map((it) => SQLiteSquasher.unsquashPK(it));
|
13356
|
-
const checkConstraints = Object.values(json.tables[tableName].checkConstraints);
|
13357
|
-
const mappedCheckConstraints = checkConstraints.map(
|
13358
|
-
(it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `\`${newTableName}\`.`)
|
13359
|
-
);
|
13360
13176
|
const fks = referenceData.map((it) => SQLiteSquasher.unsquashPushFK(it));
|
13361
13177
|
statements.push(
|
13362
13178
|
new SQLiteCreateTableConvertor().convert({
|
@@ -13364,8 +13180,7 @@ var init_sqlitePushUtils = __esm({
|
|
13364
13180
|
tableName: newTableName,
|
13365
13181
|
columns: tableColumns,
|
13366
13182
|
referenceData: fks,
|
13367
|
-
compositePKs
|
13368
|
-
checkConstraints: mappedCheckConstraints
|
13183
|
+
compositePKs
|
13369
13184
|
})
|
13370
13185
|
);
|
13371
13186
|
if (!dataLoss) {
|
@@ -13577,7 +13392,7 @@ var init_sqlitePushUtils = __esm({
|
|
13577
13392
|
});
|
13578
13393
|
|
13579
13394
|
// src/jsonStatements.ts
|
13580
|
-
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,
|
13395
|
+
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;
|
13581
13396
|
var init_jsonStatements = __esm({
|
13582
13397
|
"src/jsonStatements.ts"() {
|
13583
13398
|
"use strict";
|
@@ -13588,7 +13403,7 @@ var init_jsonStatements = __esm({
|
|
13588
13403
|
init_pgSchema();
|
13589
13404
|
init_sqliteSchema();
|
13590
13405
|
preparePgCreateTableJson = (table4, json2) => {
|
13591
|
-
const { name: name2, schema: schema4, columns, compositePrimaryKeys, uniqueConstraints
|
13406
|
+
const { name: name2, schema: schema4, columns, compositePrimaryKeys, uniqueConstraints } = table4;
|
13592
13407
|
const tableKey2 = `${schema4 || "public"}.${name2}`;
|
13593
13408
|
const compositePkName = Object.values(compositePrimaryKeys).length > 0 ? json2.tables[tableKey2].compositePrimaryKeys[`${PgSquasher.unsquashPK(Object.values(compositePrimaryKeys)[0]).name}`].name : "";
|
13594
13409
|
return {
|
@@ -13598,12 +13413,11 @@ var init_jsonStatements = __esm({
|
|
13598
13413
|
columns: Object.values(columns),
|
13599
13414
|
compositePKs: Object.values(compositePrimaryKeys),
|
13600
13415
|
compositePkName,
|
13601
|
-
uniqueConstraints: Object.values(uniqueConstraints)
|
13602
|
-
checkConstraints: Object.values(checkConstraints)
|
13416
|
+
uniqueConstraints: Object.values(uniqueConstraints)
|
13603
13417
|
};
|
13604
13418
|
};
|
13605
13419
|
prepareMySqlCreateTableJson = (table4, json2, internals) => {
|
13606
|
-
const { name: name2, schema: schema4, columns, compositePrimaryKeys, uniqueConstraints
|
13420
|
+
const { name: name2, schema: schema4, columns, compositePrimaryKeys, uniqueConstraints } = table4;
|
13607
13421
|
return {
|
13608
13422
|
type: "create_table",
|
13609
13423
|
tableName: name2,
|
@@ -13612,12 +13426,11 @@ var init_jsonStatements = __esm({
|
|
13612
13426
|
compositePKs: Object.values(compositePrimaryKeys),
|
13613
13427
|
compositePkName: Object.values(compositePrimaryKeys).length > 0 ? json2.tables[name2].compositePrimaryKeys[MySqlSquasher.unsquashPK(Object.values(compositePrimaryKeys)[0]).name].name : "",
|
13614
13428
|
uniqueConstraints: Object.values(uniqueConstraints),
|
13615
|
-
internals
|
13616
|
-
checkConstraints: Object.values(checkConstraints)
|
13429
|
+
internals
|
13617
13430
|
};
|
13618
13431
|
};
|
13619
13432
|
prepareSQLiteCreateTable = (table4, action) => {
|
13620
|
-
const { name: name2, columns, uniqueConstraints
|
13433
|
+
const { name: name2, columns, uniqueConstraints } = table4;
|
13621
13434
|
const references2 = Object.values(table4.foreignKeys);
|
13622
13435
|
const composites = Object.values(table4.compositePrimaryKeys).map(
|
13623
13436
|
(it) => SQLiteSquasher.unsquashPK(it)
|
@@ -13631,8 +13444,7 @@ var init_jsonStatements = __esm({
|
|
13631
13444
|
columns: Object.values(columns),
|
13632
13445
|
referenceData: fks,
|
13633
13446
|
compositePKs: composites,
|
13634
|
-
uniqueConstraints: Object.values(uniqueConstraints)
|
13635
|
-
checkConstraints: Object.values(checkConstraints)
|
13447
|
+
uniqueConstraints: Object.values(uniqueConstraints)
|
13636
13448
|
};
|
13637
13449
|
};
|
13638
13450
|
prepareDropTableJson = (table4) => {
|
@@ -14875,26 +14687,6 @@ var init_jsonStatements = __esm({
|
|
14875
14687
|
};
|
14876
14688
|
});
|
14877
14689
|
};
|
14878
|
-
prepareAddCheckConstraint = (tableName, schema4, check) => {
|
14879
|
-
return Object.values(check).map((it) => {
|
14880
|
-
return {
|
14881
|
-
type: "create_check_constraint",
|
14882
|
-
tableName,
|
14883
|
-
data: it,
|
14884
|
-
schema: schema4
|
14885
|
-
};
|
14886
|
-
});
|
14887
|
-
};
|
14888
|
-
prepareDeleteCheckConstraint = (tableName, schema4, check) => {
|
14889
|
-
return Object.values(check).map((it) => {
|
14890
|
-
return {
|
14891
|
-
type: "delete_check_constraint",
|
14892
|
-
tableName,
|
14893
|
-
constraintName: PgSquasher.unsquashCheck(it).name,
|
14894
|
-
schema: schema4
|
14895
|
-
};
|
14896
|
-
});
|
14897
|
-
};
|
14898
14690
|
prepareAddCompositePrimaryKeyMySql = (tableName, pks, json1, json2) => {
|
14899
14691
|
const res = [];
|
14900
14692
|
for (const it of Object.values(pks)) {
|
@@ -14944,7 +14736,7 @@ var init_statementCombiner = __esm({
|
|
14944
14736
|
init_jsonStatements();
|
14945
14737
|
init_sqliteSchema();
|
14946
14738
|
prepareLibSQLRecreateTable = (table4, action) => {
|
14947
|
-
const { name: name2, columns, uniqueConstraints, indexes
|
14739
|
+
const { name: name2, columns, uniqueConstraints, indexes } = table4;
|
14948
14740
|
const composites = Object.values(table4.compositePrimaryKeys).map(
|
14949
14741
|
(it) => SQLiteSquasher.unsquashPK(it)
|
14950
14742
|
);
|
@@ -14959,8 +14751,7 @@ var init_statementCombiner = __esm({
|
|
14959
14751
|
columns: Object.values(columns),
|
14960
14752
|
compositePKs: composites,
|
14961
14753
|
referenceData: fks,
|
14962
|
-
uniqueConstraints: Object.values(uniqueConstraints)
|
14963
|
-
checkConstraints: Object.values(checkConstraints)
|
14754
|
+
uniqueConstraints: Object.values(uniqueConstraints)
|
14964
14755
|
}
|
14965
14756
|
];
|
14966
14757
|
if (Object.keys(indexes).length) {
|
@@ -14969,7 +14760,7 @@ var init_statementCombiner = __esm({
|
|
14969
14760
|
return statements;
|
14970
14761
|
};
|
14971
14762
|
prepareSQLiteRecreateTable = (table4, action) => {
|
14972
|
-
const { name: name2, columns, uniqueConstraints, indexes
|
14763
|
+
const { name: name2, columns, uniqueConstraints, indexes } = table4;
|
14973
14764
|
const composites = Object.values(table4.compositePrimaryKeys).map(
|
14974
14765
|
(it) => SQLiteSquasher.unsquashPK(it)
|
14975
14766
|
);
|
@@ -14984,8 +14775,7 @@ var init_statementCombiner = __esm({
|
|
14984
14775
|
columns: Object.values(columns),
|
14985
14776
|
compositePKs: composites,
|
14986
14777
|
referenceData: fks,
|
14987
|
-
uniqueConstraints: Object.values(uniqueConstraints)
|
14988
|
-
checkConstraints: Object.values(checkConstraints)
|
14778
|
+
uniqueConstraints: Object.values(uniqueConstraints)
|
14989
14779
|
}
|
14990
14780
|
];
|
14991
14781
|
if (Object.keys(indexes).length) {
|
@@ -14996,7 +14786,7 @@ var init_statementCombiner = __esm({
|
|
14996
14786
|
libSQLCombineStatements = (statements, json2, action) => {
|
14997
14787
|
const newStatements = {};
|
14998
14788
|
for (const statement of statements) {
|
14999
|
-
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"
|
14789
|
+
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") {
|
15000
14790
|
const tableName2 = statement.tableName;
|
15001
14791
|
const statementsForTable2 = newStatements[tableName2];
|
15002
14792
|
if (!statementsForTable2) {
|
@@ -15137,16 +14927,16 @@ var init_statementCombiner = __esm({
|
|
15137
14927
|
sqliteCombineStatements = (statements, json2, action) => {
|
15138
14928
|
const newStatements = {};
|
15139
14929
|
for (const statement of statements) {
|
15140
|
-
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"
|
14930
|
+
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") {
|
15141
14931
|
const tableName2 = statement.tableName;
|
15142
14932
|
const statementsForTable2 = newStatements[tableName2];
|
15143
14933
|
if (!statementsForTable2) {
|
15144
|
-
newStatements[tableName2] =
|
14934
|
+
newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
|
15145
14935
|
continue;
|
15146
14936
|
}
|
15147
14937
|
if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
|
15148
14938
|
const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
|
15149
|
-
const preparedStatements =
|
14939
|
+
const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
|
15150
14940
|
if (wasRename) {
|
15151
14941
|
newStatements[tableName2].push(...preparedStatements);
|
15152
14942
|
} else {
|
@@ -15160,12 +14950,12 @@ var init_statementCombiner = __esm({
|
|
15160
14950
|
const tableName2 = statement.tableName;
|
15161
14951
|
const statementsForTable2 = newStatements[tableName2];
|
15162
14952
|
if (!statementsForTable2) {
|
15163
|
-
newStatements[tableName2] =
|
14953
|
+
newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
|
15164
14954
|
continue;
|
15165
14955
|
}
|
15166
14956
|
if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
|
15167
14957
|
const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
|
15168
|
-
const preparedStatements =
|
14958
|
+
const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
|
15169
14959
|
if (wasRename) {
|
15170
14960
|
newStatements[tableName2].push(...preparedStatements);
|
15171
14961
|
} else {
|
@@ -15190,7 +14980,7 @@ var init_statementCombiner = __esm({
|
|
15190
14980
|
}
|
15191
14981
|
if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
|
15192
14982
|
const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
|
15193
|
-
const preparedStatements =
|
14983
|
+
const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
|
15194
14984
|
if (wasRename) {
|
15195
14985
|
newStatements[tableName2].push(...preparedStatements);
|
15196
14986
|
} else {
|
@@ -15359,8 +15149,7 @@ var init_snapshotsDiffer = __esm({
|
|
15359
15149
|
indexes: recordType(stringType(), stringType()),
|
15360
15150
|
foreignKeys: recordType(stringType(), stringType()),
|
15361
15151
|
compositePrimaryKeys: recordType(stringType(), stringType()).default({}),
|
15362
|
-
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
15363
|
-
checkConstraints: recordType(stringType(), stringType()).default({})
|
15152
|
+
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
15364
15153
|
}).strict();
|
15365
15154
|
alteredTableScheme = objectType({
|
15366
15155
|
name: stringType(),
|
@@ -15401,21 +15190,6 @@ var init_snapshotsDiffer = __esm({
|
|
15401
15190
|
__new: stringType(),
|
15402
15191
|
__old: stringType()
|
15403
15192
|
})
|
15404
|
-
),
|
15405
|
-
addedCheckConstraints: recordType(
|
15406
|
-
stringType(),
|
15407
|
-
stringType()
|
15408
|
-
),
|
15409
|
-
deletedCheckConstraints: recordType(
|
15410
|
-
stringType(),
|
15411
|
-
stringType()
|
15412
|
-
),
|
15413
|
-
alteredCheckConstraints: recordType(
|
15414
|
-
stringType(),
|
15415
|
-
objectType({
|
15416
|
-
__new: stringType(),
|
15417
|
-
__old: stringType()
|
15418
|
-
})
|
15419
15193
|
)
|
15420
15194
|
}).strict();
|
15421
15195
|
diffResultScheme = objectType({
|
@@ -15756,8 +15530,6 @@ var init_snapshotsDiffer = __esm({
|
|
15756
15530
|
schemaTo: it.schemaTo || "public"
|
15757
15531
|
});
|
15758
15532
|
}
|
15759
|
-
const jsonDeletedCheckConstraints = [];
|
15760
|
-
const jsonCreatedCheckConstraints = [];
|
15761
15533
|
for (let it of alteredTables) {
|
15762
15534
|
let addedColumns = [];
|
15763
15535
|
for (const addedPkName of Object.keys(it.addedCompositePKs)) {
|
@@ -15797,8 +15569,6 @@ var init_snapshotsDiffer = __esm({
|
|
15797
15569
|
let addedUniqueConstraints = [];
|
15798
15570
|
let deletedUniqueConstraints = [];
|
15799
15571
|
let alteredUniqueConstraints = [];
|
15800
|
-
let createCheckConstraints = [];
|
15801
|
-
let deleteCheckConstraints = [];
|
15802
15572
|
addedUniqueConstraints = prepareAddUniqueConstraintPg(
|
15803
15573
|
it.name,
|
15804
15574
|
it.schema,
|
@@ -15823,24 +15593,6 @@ var init_snapshotsDiffer = __esm({
|
|
15823
15593
|
...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
|
15824
15594
|
);
|
15825
15595
|
}
|
15826
|
-
createCheckConstraints = prepareAddCheckConstraint(it.name, it.schema, it.addedCheckConstraints);
|
15827
|
-
deleteCheckConstraints = prepareDeleteCheckConstraint(
|
15828
|
-
it.name,
|
15829
|
-
it.schema,
|
15830
|
-
it.deletedCheckConstraints
|
15831
|
-
);
|
15832
|
-
if (it.alteredCheckConstraints && action !== "push") {
|
15833
|
-
const added = {};
|
15834
|
-
const deleted = {};
|
15835
|
-
for (const k6 of Object.keys(it.alteredCheckConstraints)) {
|
15836
|
-
added[k6] = it.alteredCheckConstraints[k6].__new;
|
15837
|
-
deleted[k6] = it.alteredCheckConstraints[k6].__old;
|
15838
|
-
}
|
15839
|
-
createCheckConstraints.push(...prepareAddCheckConstraint(it.name, it.schema, added));
|
15840
|
-
deleteCheckConstraints.push(...prepareDeleteCheckConstraint(it.name, it.schema, deleted));
|
15841
|
-
}
|
15842
|
-
jsonCreatedCheckConstraints.push(...createCheckConstraints);
|
15843
|
-
jsonDeletedCheckConstraints.push(...deleteCheckConstraints);
|
15844
15596
|
jsonAddedCompositePKs.push(...addedCompositePKs);
|
15845
15597
|
jsonDeletedCompositePKs.push(...deletedCompositePKs);
|
15846
15598
|
jsonAlteredCompositePKs.push(...alteredCompositePKs);
|
@@ -15994,7 +15746,6 @@ var init_snapshotsDiffer = __esm({
|
|
15994
15746
|
jsonStatements.push(...jsonRenameTables);
|
15995
15747
|
jsonStatements.push(...jsonRenameColumnsStatements);
|
15996
15748
|
jsonStatements.push(...jsonDeletedUniqueConstraints);
|
15997
|
-
jsonStatements.push(...jsonDeletedCheckConstraints);
|
15998
15749
|
jsonStatements.push(...jsonDroppedReferencesForAlteredTables);
|
15999
15750
|
jsonStatements.push(...jsonDropIndexesForAllAlteredTables);
|
16000
15751
|
jsonStatements.push(...jsonDeletedCompositePKs);
|
@@ -16008,7 +15759,6 @@ var init_snapshotsDiffer = __esm({
|
|
16008
15759
|
jsonStatements.push(...jsonDropColumnsStatemets);
|
16009
15760
|
jsonStatements.push(...jsonAlteredCompositePKs);
|
16010
15761
|
jsonStatements.push(...jsonAddedUniqueConstraints);
|
16011
|
-
jsonStatements.push(...jsonCreatedCheckConstraints);
|
16012
15762
|
jsonStatements.push(...jsonAlteredUniqueConstraints);
|
16013
15763
|
jsonStatements.push(...dropEnums);
|
16014
15764
|
jsonStatements.push(...dropSequences);
|
@@ -16172,8 +15922,6 @@ var init_snapshotsDiffer = __esm({
|
|
16172
15922
|
const jsonAddedUniqueConstraints = [];
|
16173
15923
|
const jsonDeletedUniqueConstraints = [];
|
16174
15924
|
const jsonAlteredUniqueConstraints = [];
|
16175
|
-
const jsonCreatedCheckConstraints = [];
|
16176
|
-
const jsonDeletedCheckConstraints = [];
|
16177
15925
|
const jsonRenameColumnsStatements = columnRenames.map((it) => prepareRenameColumns(it.table, "", it.renames)).flat();
|
16178
15926
|
const jsonAddColumnsStatemets = columnCreates.map((it) => _prepareAddColumns(it.table, "", it.columns)).flat();
|
16179
15927
|
const jsonDropColumnsStatemets = columnDeletes.map((it) => _prepareDropColumns(it.table, "", it.columns)).flat();
|
@@ -16212,8 +15960,6 @@ var init_snapshotsDiffer = __esm({
|
|
16212
15960
|
let addedUniqueConstraints = [];
|
16213
15961
|
let deletedUniqueConstraints = [];
|
16214
15962
|
let alteredUniqueConstraints = [];
|
16215
|
-
let createdCheckConstraints = [];
|
16216
|
-
let deletedCheckConstraints = [];
|
16217
15963
|
addedUniqueConstraints = prepareAddUniqueConstraintPg(
|
16218
15964
|
it.name,
|
16219
15965
|
it.schema,
|
@@ -16238,30 +15984,12 @@ var init_snapshotsDiffer = __esm({
|
|
16238
15984
|
...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
|
16239
15985
|
);
|
16240
15986
|
}
|
16241
|
-
createdCheckConstraints = prepareAddCheckConstraint(it.name, it.schema, it.addedCheckConstraints);
|
16242
|
-
deletedCheckConstraints = prepareDeleteCheckConstraint(
|
16243
|
-
it.name,
|
16244
|
-
it.schema,
|
16245
|
-
it.deletedCheckConstraints
|
16246
|
-
);
|
16247
|
-
if (it.alteredCheckConstraints && action !== "push") {
|
16248
|
-
const added = {};
|
16249
|
-
const deleted = {};
|
16250
|
-
for (const k6 of Object.keys(it.alteredCheckConstraints)) {
|
16251
|
-
added[k6] = it.alteredCheckConstraints[k6].__new;
|
16252
|
-
deleted[k6] = it.alteredCheckConstraints[k6].__old;
|
16253
|
-
}
|
16254
|
-
createdCheckConstraints.push(...prepareAddCheckConstraint(it.name, it.schema, added));
|
16255
|
-
deletedCheckConstraints.push(...prepareDeleteCheckConstraint(it.name, it.schema, deleted));
|
16256
|
-
}
|
16257
15987
|
jsonAddedCompositePKs.push(...addedCompositePKs);
|
16258
15988
|
jsonDeletedCompositePKs.push(...deletedCompositePKs);
|
16259
15989
|
jsonAlteredCompositePKs.push(...alteredCompositePKs);
|
16260
15990
|
jsonAddedUniqueConstraints.push(...addedUniqueConstraints);
|
16261
15991
|
jsonDeletedUniqueConstraints.push(...deletedUniqueConstraints);
|
16262
15992
|
jsonAlteredUniqueConstraints.push(...alteredUniqueConstraints);
|
16263
|
-
jsonCreatedCheckConstraints.push(...createdCheckConstraints);
|
16264
|
-
jsonDeletedCheckConstraints.push(...deletedCheckConstraints);
|
16265
15993
|
});
|
16266
15994
|
const rColumns = jsonRenameColumnsStatements.map((it) => {
|
16267
15995
|
const tableName = it.tableName;
|
@@ -16357,7 +16085,6 @@ var init_snapshotsDiffer = __esm({
|
|
16357
16085
|
jsonStatements.push(...jsonRenameTables);
|
16358
16086
|
jsonStatements.push(...jsonRenameColumnsStatements);
|
16359
16087
|
jsonStatements.push(...jsonDeletedUniqueConstraints);
|
16360
|
-
jsonStatements.push(...jsonDeletedCheckConstraints);
|
16361
16088
|
jsonStatements.push(...jsonDroppedReferencesForAlteredTables);
|
16362
16089
|
jsonStatements.push(...jsonDropIndexesForAllAlteredTables);
|
16363
16090
|
jsonStatements.push(...jsonDeletedCompositePKs);
|
@@ -16368,11 +16095,11 @@ var init_snapshotsDiffer = __esm({
|
|
16368
16095
|
jsonStatements.push(...jsonAddColumnsStatemets);
|
16369
16096
|
jsonStatements.push(...jsonCreateReferencesForCreatedTables);
|
16370
16097
|
jsonStatements.push(...jsonCreateIndexesForCreatedTables);
|
16371
|
-
jsonStatements.push(...jsonCreatedCheckConstraints);
|
16372
16098
|
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
16373
16099
|
jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
|
16374
16100
|
jsonStatements.push(...jsonDropColumnsStatemets);
|
16375
16101
|
jsonStatements.push(...jsonAlteredCompositePKs);
|
16102
|
+
jsonStatements.push(...jsonAddedUniqueConstraints);
|
16376
16103
|
jsonStatements.push(...jsonAlteredUniqueConstraints);
|
16377
16104
|
const sqlStatements = fromJson(jsonStatements, "mysql");
|
16378
16105
|
const uniqueSqlStatements = [];
|
@@ -16500,8 +16227,6 @@ var init_snapshotsDiffer = __esm({
|
|
16500
16227
|
const jsonAddedUniqueConstraints = [];
|
16501
16228
|
const jsonDeletedUniqueConstraints = [];
|
16502
16229
|
const jsonAlteredUniqueConstraints = [];
|
16503
|
-
const jsonDeletedCheckConstraints = [];
|
16504
|
-
const jsonCreatedCheckConstraints = [];
|
16505
16230
|
allAltered.forEach((it) => {
|
16506
16231
|
let addedColumns = [];
|
16507
16232
|
for (const addedPkName of Object.keys(it.addedCompositePKs)) {
|
@@ -16558,56 +16283,12 @@ var init_snapshotsDiffer = __esm({
|
|
16558
16283
|
...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
|
16559
16284
|
);
|
16560
16285
|
}
|
16561
|
-
let createdCheckConstraints = [];
|
16562
|
-
let deletedCheckConstraints = [];
|
16563
|
-
addedUniqueConstraints = prepareAddUniqueConstraintPg(
|
16564
|
-
it.name,
|
16565
|
-
it.schema,
|
16566
|
-
it.addedUniqueConstraints
|
16567
|
-
);
|
16568
|
-
deletedUniqueConstraints = prepareDeleteUniqueConstraintPg(
|
16569
|
-
it.name,
|
16570
|
-
it.schema,
|
16571
|
-
it.deletedUniqueConstraints
|
16572
|
-
);
|
16573
|
-
if (it.alteredUniqueConstraints) {
|
16574
|
-
const added = {};
|
16575
|
-
const deleted = {};
|
16576
|
-
for (const k6 of Object.keys(it.alteredUniqueConstraints)) {
|
16577
|
-
added[k6] = it.alteredUniqueConstraints[k6].__new;
|
16578
|
-
deleted[k6] = it.alteredUniqueConstraints[k6].__old;
|
16579
|
-
}
|
16580
|
-
addedUniqueConstraints.push(
|
16581
|
-
...prepareAddUniqueConstraintPg(it.name, it.schema, added)
|
16582
|
-
);
|
16583
|
-
deletedUniqueConstraints.push(
|
16584
|
-
...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
|
16585
|
-
);
|
16586
|
-
}
|
16587
|
-
createdCheckConstraints = prepareAddCheckConstraint(it.name, it.schema, it.addedCheckConstraints);
|
16588
|
-
deletedCheckConstraints = prepareDeleteCheckConstraint(
|
16589
|
-
it.name,
|
16590
|
-
it.schema,
|
16591
|
-
it.deletedCheckConstraints
|
16592
|
-
);
|
16593
|
-
if (it.alteredCheckConstraints && action !== "push") {
|
16594
|
-
const added = {};
|
16595
|
-
const deleted = {};
|
16596
|
-
for (const k6 of Object.keys(it.alteredCheckConstraints)) {
|
16597
|
-
added[k6] = it.alteredCheckConstraints[k6].__new;
|
16598
|
-
deleted[k6] = it.alteredCheckConstraints[k6].__old;
|
16599
|
-
}
|
16600
|
-
createdCheckConstraints.push(...prepareAddCheckConstraint(it.name, it.schema, added));
|
16601
|
-
deletedCheckConstraints.push(...prepareDeleteCheckConstraint(it.name, it.schema, deleted));
|
16602
|
-
}
|
16603
16286
|
jsonAddedCompositePKs.push(...addedCompositePKs);
|
16604
16287
|
jsonDeletedCompositePKs.push(...deletedCompositePKs);
|
16605
16288
|
jsonAlteredCompositePKs.push(...alteredCompositePKs);
|
16606
16289
|
jsonAddedUniqueConstraints.push(...addedUniqueConstraints);
|
16607
16290
|
jsonDeletedUniqueConstraints.push(...deletedUniqueConstraints);
|
16608
16291
|
jsonAlteredUniqueConstraints.push(...alteredUniqueConstraints);
|
16609
|
-
jsonCreatedCheckConstraints.push(...createdCheckConstraints);
|
16610
|
-
jsonDeletedCheckConstraints.push(...deletedCheckConstraints);
|
16611
16292
|
});
|
16612
16293
|
const rColumns = jsonRenameColumnsStatements.map((it) => {
|
16613
16294
|
const tableName = it.tableName;
|
@@ -16692,7 +16373,6 @@ var init_snapshotsDiffer = __esm({
|
|
16692
16373
|
jsonStatements.push(...jsonRenameTables);
|
16693
16374
|
jsonStatements.push(...jsonRenameColumnsStatements);
|
16694
16375
|
jsonStatements.push(...jsonDroppedReferencesForAlteredTables);
|
16695
|
-
jsonStatements.push(...jsonDeletedCheckConstraints);
|
16696
16376
|
jsonStatements.push(...jsonDropIndexesForAllAlteredTables);
|
16697
16377
|
jsonStatements.push(...jsonDeletedCompositePKs);
|
16698
16378
|
jsonStatements.push(...jsonTableAlternations);
|
@@ -16700,7 +16380,6 @@ var init_snapshotsDiffer = __esm({
|
|
16700
16380
|
jsonStatements.push(...jsonAddColumnsStatemets);
|
16701
16381
|
jsonStatements.push(...jsonCreateIndexesForCreatedTables);
|
16702
16382
|
jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
|
16703
|
-
jsonStatements.push(...jsonCreatedCheckConstraints);
|
16704
16383
|
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
16705
16384
|
jsonStatements.push(...jsonDropColumnsStatemets);
|
16706
16385
|
jsonStatements.push(...jsonAlteredCompositePKs);
|
@@ -16844,8 +16523,6 @@ var init_snapshotsDiffer = __esm({
|
|
16844
16523
|
const jsonAddedUniqueConstraints = [];
|
16845
16524
|
const jsonDeletedUniqueConstraints = [];
|
16846
16525
|
const jsonAlteredUniqueConstraints = [];
|
16847
|
-
const jsonDeletedCheckConstraints = [];
|
16848
|
-
const jsonCreatedCheckConstraints = [];
|
16849
16526
|
allAltered.forEach((it) => {
|
16850
16527
|
let addedColumns = [];
|
16851
16528
|
for (const addedPkName of Object.keys(it.addedCompositePKs)) {
|
@@ -16878,8 +16555,6 @@ var init_snapshotsDiffer = __esm({
|
|
16878
16555
|
let addedUniqueConstraints = [];
|
16879
16556
|
let deletedUniqueConstraints = [];
|
16880
16557
|
let alteredUniqueConstraints = [];
|
16881
|
-
let createdCheckConstraints = [];
|
16882
|
-
let deletedCheckConstraints = [];
|
16883
16558
|
addedUniqueConstraints = prepareAddUniqueConstraintPg(
|
16884
16559
|
it.name,
|
16885
16560
|
it.schema,
|
@@ -16904,30 +16579,12 @@ var init_snapshotsDiffer = __esm({
|
|
16904
16579
|
...prepareDeleteUniqueConstraintPg(it.name, it.schema, deleted)
|
16905
16580
|
);
|
16906
16581
|
}
|
16907
|
-
createdCheckConstraints = prepareAddCheckConstraint(it.name, it.schema, it.addedCheckConstraints);
|
16908
|
-
deletedCheckConstraints = prepareDeleteCheckConstraint(
|
16909
|
-
it.name,
|
16910
|
-
it.schema,
|
16911
|
-
it.deletedCheckConstraints
|
16912
|
-
);
|
16913
|
-
if (it.alteredCheckConstraints && action !== "push") {
|
16914
|
-
const added = {};
|
16915
|
-
const deleted = {};
|
16916
|
-
for (const k6 of Object.keys(it.alteredCheckConstraints)) {
|
16917
|
-
added[k6] = it.alteredCheckConstraints[k6].__new;
|
16918
|
-
deleted[k6] = it.alteredCheckConstraints[k6].__old;
|
16919
|
-
}
|
16920
|
-
createdCheckConstraints.push(...prepareAddCheckConstraint(it.name, it.schema, added));
|
16921
|
-
deletedCheckConstraints.push(...prepareDeleteCheckConstraint(it.name, it.schema, deleted));
|
16922
|
-
}
|
16923
16582
|
jsonAddedCompositePKs.push(...addedCompositePKs);
|
16924
16583
|
jsonDeletedCompositePKs.push(...deletedCompositePKs);
|
16925
16584
|
jsonAlteredCompositePKs.push(...alteredCompositePKs);
|
16926
16585
|
jsonAddedUniqueConstraints.push(...addedUniqueConstraints);
|
16927
16586
|
jsonDeletedUniqueConstraints.push(...deletedUniqueConstraints);
|
16928
16587
|
jsonAlteredUniqueConstraints.push(...alteredUniqueConstraints);
|
16929
|
-
jsonCreatedCheckConstraints.push(...createdCheckConstraints);
|
16930
|
-
jsonDeletedCheckConstraints.push(...deletedCheckConstraints);
|
16931
16588
|
});
|
16932
16589
|
const jsonTableAlternations = allAltered.map((it) => {
|
16933
16590
|
return prepareSqliteAlterColumns(it.name, it.schema, it.altered, json2);
|
@@ -17005,7 +16662,6 @@ var init_snapshotsDiffer = __esm({
|
|
17005
16662
|
jsonStatements.push(...jsonRenameTables);
|
17006
16663
|
jsonStatements.push(...jsonRenameColumnsStatements);
|
17007
16664
|
jsonStatements.push(...jsonDroppedReferencesForAlteredTables);
|
17008
|
-
jsonStatements.push(...jsonDeletedCheckConstraints);
|
17009
16665
|
jsonStatements.push(...jsonDropIndexesForAllAlteredTables);
|
17010
16666
|
jsonStatements.push(...jsonDeletedCompositePKs);
|
17011
16667
|
jsonStatements.push(...jsonTableAlternations);
|
@@ -17013,7 +16669,6 @@ var init_snapshotsDiffer = __esm({
|
|
17013
16669
|
jsonStatements.push(...jsonAddColumnsStatemets);
|
17014
16670
|
jsonStatements.push(...jsonCreateIndexesForCreatedTables);
|
17015
16671
|
jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
|
17016
|
-
jsonStatements.push(...jsonCreatedCheckConstraints);
|
17017
16672
|
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
17018
16673
|
jsonStatements.push(...jsonDropColumnsStatemets);
|
17019
16674
|
jsonStatements.push(...jsonAlteredCompositePKs);
|
@@ -23253,7 +22908,7 @@ var require_split2 = __commonJS({
|
|
23253
22908
|
var require_helper = __commonJS({
|
23254
22909
|
"../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/helper.js"(exports, module) {
|
23255
22910
|
"use strict";
|
23256
|
-
var
|
22911
|
+
var path2 = __require("path");
|
23257
22912
|
var Stream4 = __require("stream").Stream;
|
23258
22913
|
var split = require_split2();
|
23259
22914
|
var util2 = __require("util");
|
@@ -23292,7 +22947,7 @@ var require_helper = __commonJS({
|
|
23292
22947
|
};
|
23293
22948
|
module.exports.getFileName = function(rawEnv) {
|
23294
22949
|
var env3 = rawEnv || process.env;
|
23295
|
-
var file = env3.PGPASSFILE || (isWin ?
|
22950
|
+
var file = env3.PGPASSFILE || (isWin ? path2.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path2.join(env3.HOME || "./", ".pgpass"));
|
23296
22951
|
return file;
|
23297
22952
|
};
|
23298
22953
|
module.exports.usePgPass = function(stats, fname) {
|
@@ -23424,7 +23079,7 @@ var require_helper = __commonJS({
|
|
23424
23079
|
var require_lib2 = __commonJS({
|
23425
23080
|
"../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/index.js"(exports, module) {
|
23426
23081
|
"use strict";
|
23427
|
-
var
|
23082
|
+
var path2 = __require("path");
|
23428
23083
|
var fs5 = __require("fs");
|
23429
23084
|
var helper = require_helper();
|
23430
23085
|
module.exports = function(connInfo, cb) {
|
@@ -24813,7 +24468,7 @@ var init_query_promise = __esm({
|
|
24813
24468
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
24814
24469
|
const nullifyMap = {};
|
24815
24470
|
const result = columns.reduce(
|
24816
|
-
(result2, { path:
|
24471
|
+
(result2, { path: path2, field }, columnIndex) => {
|
24817
24472
|
let decoder2;
|
24818
24473
|
if (is(field, Column2)) {
|
24819
24474
|
decoder2 = field;
|
@@ -24823,8 +24478,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
24823
24478
|
decoder2 = field.sql.decoder;
|
24824
24479
|
}
|
24825
24480
|
let node = result2;
|
24826
|
-
for (const [pathChunkIndex, pathChunk] of
|
24827
|
-
if (pathChunkIndex <
|
24481
|
+
for (const [pathChunkIndex, pathChunk] of path2.entries()) {
|
24482
|
+
if (pathChunkIndex < path2.length - 1) {
|
24828
24483
|
if (!(pathChunk in node)) {
|
24829
24484
|
node[pathChunk] = {};
|
24830
24485
|
}
|
@@ -24832,8 +24487,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
24832
24487
|
} else {
|
24833
24488
|
const rawValue = row[columnIndex];
|
24834
24489
|
const value = node[pathChunk] = rawValue === null ? null : decoder2.mapFromDriverValue(rawValue);
|
24835
|
-
if (joinsNotNullableMap && is(field, Column2) &&
|
24836
|
-
const objectName =
|
24490
|
+
if (joinsNotNullableMap && is(field, Column2) && path2.length === 2) {
|
24491
|
+
const objectName = path2[0];
|
24837
24492
|
if (!(objectName in nullifyMap)) {
|
24838
24493
|
nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
|
24839
24494
|
} else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) {
|
@@ -29449,6 +29104,7 @@ var init_db = __esm({
|
|
29449
29104
|
init_entity();
|
29450
29105
|
init_query_builders();
|
29451
29106
|
init_selection_proxy();
|
29107
|
+
init_sql();
|
29452
29108
|
init_subquery();
|
29453
29109
|
init_count();
|
29454
29110
|
init_query();
|
@@ -29703,8 +29359,8 @@ var init_db = __esm({
|
|
29703
29359
|
return new PgRefreshMaterializedView(view, this.session, this.dialect);
|
29704
29360
|
}
|
29705
29361
|
execute(query) {
|
29706
|
-
const
|
29707
|
-
const builtQuery = this.dialect.sqlToQuery(
|
29362
|
+
const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
|
29363
|
+
const builtQuery = this.dialect.sqlToQuery(sequel);
|
29708
29364
|
const prepared = this.session.prepareQuery(
|
29709
29365
|
builtQuery,
|
29710
29366
|
void 0,
|
@@ -29713,7 +29369,7 @@ var init_db = __esm({
|
|
29713
29369
|
);
|
29714
29370
|
return new PgRaw(
|
29715
29371
|
() => prepared.execute(),
|
29716
|
-
|
29372
|
+
sequel,
|
29717
29373
|
builtQuery,
|
29718
29374
|
(result) => prepared.mapResult(result, true)
|
29719
29375
|
);
|
@@ -30562,7 +30218,9 @@ function drizzle(client, config = {}) {
|
|
30562
30218
|
}
|
30563
30219
|
const driver2 = new NodePgDriver(client, dialect7, { logger: logger2 });
|
30564
30220
|
const session = driver2.createSession(schema4);
|
30565
|
-
|
30221
|
+
const db2 = new NodePgDatabase(dialect7, session, schema4);
|
30222
|
+
db2.$client = client;
|
30223
|
+
return db2;
|
30566
30224
|
}
|
30567
30225
|
var import_pg2, types, _a162, NodePgDriver, _a163, _b117, NodePgDatabase;
|
30568
30226
|
var init_driver = __esm({
|
@@ -31652,18 +31310,18 @@ var init_getAttrPathList = __esm({
|
|
31652
31310
|
"../node_modules/.pnpm/@smithy+util-endpoints@2.0.0/node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js"() {
|
31653
31311
|
"use strict";
|
31654
31312
|
init_types2();
|
31655
|
-
getAttrPathList = (
|
31656
|
-
const parts =
|
31313
|
+
getAttrPathList = (path2) => {
|
31314
|
+
const parts = path2.split(".");
|
31657
31315
|
const pathList = [];
|
31658
31316
|
for (const part of parts) {
|
31659
31317
|
const squareBracketIndex = part.indexOf("[");
|
31660
31318
|
if (squareBracketIndex !== -1) {
|
31661
31319
|
if (part.indexOf("]") !== part.length - 1) {
|
31662
|
-
throw new EndpointError(`Path: '${
|
31320
|
+
throw new EndpointError(`Path: '${path2}' does not end with ']'`);
|
31663
31321
|
}
|
31664
31322
|
const arrayIndex = part.slice(squareBracketIndex + 1, -1);
|
31665
31323
|
if (Number.isNaN(parseInt(arrayIndex))) {
|
31666
|
-
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${
|
31324
|
+
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path2}'`);
|
31667
31325
|
}
|
31668
31326
|
if (squareBracketIndex !== 0) {
|
31669
31327
|
pathList.push(part.slice(0, squareBracketIndex));
|
@@ -31685,9 +31343,9 @@ var init_getAttr = __esm({
|
|
31685
31343
|
"use strict";
|
31686
31344
|
init_types2();
|
31687
31345
|
init_getAttrPathList();
|
31688
|
-
getAttr = (value,
|
31346
|
+
getAttr = (value, path2) => getAttrPathList(path2).reduce((acc, index4) => {
|
31689
31347
|
if (typeof acc !== "object") {
|
31690
|
-
throw new EndpointError(`Index '${index4}' in '${
|
31348
|
+
throw new EndpointError(`Index '${index4}' in '${path2}' not found in '${JSON.stringify(value)}'`);
|
31691
31349
|
} else if (Array.isArray(acc)) {
|
31692
31350
|
return acc[parseInt(index4)];
|
31693
31351
|
}
|
@@ -31732,8 +31390,8 @@ var init_parseURL = __esm({
|
|
31732
31390
|
return value;
|
31733
31391
|
}
|
31734
31392
|
if (typeof value === "object" && "hostname" in value) {
|
31735
|
-
const { hostname: hostname2, port, protocol: protocol3 = "", path:
|
31736
|
-
const url = new URL(`${protocol3}//${hostname2}${port ? `:${port}` : ""}${
|
31393
|
+
const { hostname: hostname2, port, protocol: protocol3 = "", path: path2 = "", query = {} } = value;
|
31394
|
+
const url = new URL(`${protocol3}//${hostname2}${port ? `:${port}` : ""}${path2}`);
|
31737
31395
|
url.search = Object.entries(query).map(([k6, v8]) => `${k6}=${v8}`).join("&");
|
31738
31396
|
return url;
|
31739
31397
|
}
|
@@ -33189,8 +32847,8 @@ var init_createConfigValueProvider = __esm({
|
|
33189
32847
|
return endpoint.url.href;
|
33190
32848
|
}
|
33191
32849
|
if ("hostname" in endpoint) {
|
33192
|
-
const { protocol: protocol2, hostname, port, path:
|
33193
|
-
return `${protocol2}//${hostname}${port ? ":" + port : ""}${
|
32850
|
+
const { protocol: protocol2, hostname, port, path: path2 } = endpoint;
|
32851
|
+
return `${protocol2}//${hostname}${port ? ":" + port : ""}${path2}`;
|
33194
32852
|
}
|
33195
32853
|
}
|
33196
32854
|
return endpoint;
|
@@ -33562,11 +33220,11 @@ var init_slurpFile = __esm({
|
|
33562
33220
|
"use strict";
|
33563
33221
|
({ readFile: readFile2 } = fsPromises2);
|
33564
33222
|
filePromisesHash = {};
|
33565
|
-
slurpFile = (
|
33566
|
-
if (!filePromisesHash[
|
33567
|
-
filePromisesHash[
|
33223
|
+
slurpFile = (path2, options) => {
|
33224
|
+
if (!filePromisesHash[path2] || options?.ignoreCache) {
|
33225
|
+
filePromisesHash[path2] = readFile2(path2, "utf8");
|
33568
33226
|
}
|
33569
|
-
return filePromisesHash[
|
33227
|
+
return filePromisesHash[path2];
|
33570
33228
|
};
|
33571
33229
|
}
|
33572
33230
|
});
|
@@ -35630,18 +35288,18 @@ var init_node_http_handler = __esm({
|
|
35630
35288
|
const password = request2.password ?? "";
|
35631
35289
|
auth = `${username}:${password}`;
|
35632
35290
|
}
|
35633
|
-
let
|
35291
|
+
let path2 = request2.path;
|
35634
35292
|
if (queryString) {
|
35635
|
-
|
35293
|
+
path2 += `?${queryString}`;
|
35636
35294
|
}
|
35637
35295
|
if (request2.fragment) {
|
35638
|
-
|
35296
|
+
path2 += `#${request2.fragment}`;
|
35639
35297
|
}
|
35640
35298
|
const nodeHttpsOptions = {
|
35641
35299
|
headers: request2.headers,
|
35642
35300
|
host: request2.hostname,
|
35643
35301
|
method: request2.method,
|
35644
|
-
path:
|
35302
|
+
path: path2,
|
35645
35303
|
port: request2.port,
|
35646
35304
|
agent,
|
35647
35305
|
auth
|
@@ -37642,8 +37300,8 @@ var init_requestBuilder = __esm({
|
|
37642
37300
|
return this;
|
37643
37301
|
}
|
37644
37302
|
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
37645
|
-
this.resolvePathStack.push((
|
37646
|
-
this.path = resolvedPath(
|
37303
|
+
this.resolvePathStack.push((path2) => {
|
37304
|
+
this.path = resolvedPath(path2, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
37647
37305
|
});
|
37648
37306
|
return this;
|
37649
37307
|
}
|
@@ -37698,9 +37356,9 @@ var init_createPaginator = __esm({
|
|
37698
37356
|
makePagedClientRequest = async (CommandCtor, client, input, ...args) => {
|
37699
37357
|
return await client.send(new CommandCtor(input), ...args);
|
37700
37358
|
};
|
37701
|
-
get = (fromObject,
|
37359
|
+
get = (fromObject, path2) => {
|
37702
37360
|
let cursor = fromObject;
|
37703
|
-
const pathComponents =
|
37361
|
+
const pathComponents = path2.split(".");
|
37704
37362
|
for (const step of pathComponents) {
|
37705
37363
|
if (!cursor || typeof cursor !== "object") {
|
37706
37364
|
return void 0;
|
@@ -38857,10 +38515,10 @@ ${longDate}
|
|
38857
38515
|
${credentialScope}
|
38858
38516
|
${toHex(hashedRequest)}`;
|
38859
38517
|
}
|
38860
|
-
getCanonicalPath({ path:
|
38518
|
+
getCanonicalPath({ path: path2 }) {
|
38861
38519
|
if (this.uriEscapePath) {
|
38862
38520
|
const normalizedPathSegments = [];
|
38863
|
-
for (const pathSegment of
|
38521
|
+
for (const pathSegment of path2.split("/")) {
|
38864
38522
|
if (pathSegment?.length === 0)
|
38865
38523
|
continue;
|
38866
38524
|
if (pathSegment === ".")
|
@@ -38871,11 +38529,11 @@ ${toHex(hashedRequest)}`;
|
|
38871
38529
|
normalizedPathSegments.push(pathSegment);
|
38872
38530
|
}
|
38873
38531
|
}
|
38874
|
-
const normalizedPath = `${
|
38532
|
+
const normalizedPath = `${path2?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path2?.endsWith("/") ? "/" : ""}`;
|
38875
38533
|
const doubleEncoded = escapeUri(normalizedPath);
|
38876
38534
|
return doubleEncoded.replace(/%2F/g, "/");
|
38877
38535
|
}
|
38878
|
-
return
|
38536
|
+
return path2;
|
38879
38537
|
}
|
38880
38538
|
async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
|
38881
38539
|
const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);
|
@@ -41913,7 +41571,7 @@ var init_constants7 = __esm({
|
|
41913
41571
|
}
|
41914
41572
|
});
|
41915
41573
|
|
41916
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41574
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js
|
41917
41575
|
function createAwsAuthSigv4HttpAuthOption2(authParameters) {
|
41918
41576
|
return {
|
41919
41577
|
schemeId: "aws.auth#sigv4",
|
@@ -41936,7 +41594,7 @@ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
41936
41594
|
}
|
41937
41595
|
var import_core2, defaultSSOOIDCHttpAuthSchemeParametersProvider, defaultSSOOIDCHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig2;
|
41938
41596
|
var init_httpAuthSchemeProvider2 = __esm({
|
41939
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41597
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js"() {
|
41940
41598
|
"use strict";
|
41941
41599
|
import_core2 = __toESM(require_dist_cjs());
|
41942
41600
|
init_dist_es10();
|
@@ -41978,10 +41636,10 @@ var init_httpAuthSchemeProvider2 = __esm({
|
|
41978
41636
|
}
|
41979
41637
|
});
|
41980
41638
|
|
41981
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41639
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js
|
41982
41640
|
var resolveClientEndpointParameters2, commonParams2;
|
41983
41641
|
var init_EndpointParameters2 = __esm({
|
41984
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41642
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js"() {
|
41985
41643
|
"use strict";
|
41986
41644
|
resolveClientEndpointParameters2 = (options) => {
|
41987
41645
|
return {
|
@@ -42000,10 +41658,10 @@ var init_EndpointParameters2 = __esm({
|
|
42000
41658
|
}
|
42001
41659
|
});
|
42002
41660
|
|
42003
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41661
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
|
42004
41662
|
var package_default2;
|
42005
41663
|
var init_package2 = __esm({
|
42006
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41664
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"() {
|
42007
41665
|
package_default2 = {
|
42008
41666
|
name: "@aws-sdk/client-sso-oidc",
|
42009
41667
|
description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
|
@@ -42256,10 +41914,10 @@ var init_dist_es42 = __esm({
|
|
42256
41914
|
}
|
42257
41915
|
});
|
42258
41916
|
|
42259
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41917
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js
|
42260
41918
|
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;
|
42261
41919
|
var init_ruleset = __esm({
|
42262
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41920
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js"() {
|
42263
41921
|
"use strict";
|
42264
41922
|
u = "required";
|
42265
41923
|
v = "fn";
|
@@ -42290,10 +41948,10 @@ var init_ruleset = __esm({
|
|
42290
41948
|
}
|
42291
41949
|
});
|
42292
41950
|
|
42293
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41951
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js
|
42294
41952
|
var defaultEndpointResolver;
|
42295
41953
|
var init_endpointResolver = __esm({
|
42296
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41954
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js"() {
|
42297
41955
|
"use strict";
|
42298
41956
|
init_dist_es7();
|
42299
41957
|
init_dist_es6();
|
@@ -42308,10 +41966,10 @@ var init_endpointResolver = __esm({
|
|
42308
41966
|
}
|
42309
41967
|
});
|
42310
41968
|
|
42311
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41969
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js
|
42312
41970
|
var import_core3, getRuntimeConfig;
|
42313
41971
|
var init_runtimeConfig_shared = __esm({
|
42314
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
41972
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js"() {
|
42315
41973
|
"use strict";
|
42316
41974
|
import_core3 = __toESM(require_dist_cjs());
|
42317
41975
|
init_dist_es34();
|
@@ -42451,10 +42109,10 @@ var init_dist_es43 = __esm({
|
|
42451
42109
|
}
|
42452
42110
|
});
|
42453
42111
|
|
42454
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42112
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js
|
42455
42113
|
var import_core5, getRuntimeConfig2;
|
42456
42114
|
var init_runtimeConfig = __esm({
|
42457
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42115
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js"() {
|
42458
42116
|
"use strict";
|
42459
42117
|
init_package2();
|
42460
42118
|
import_core5 = __toESM(require_dist_cjs());
|
@@ -42583,10 +42241,10 @@ var init_dist_es44 = __esm({
|
|
42583
42241
|
}
|
42584
42242
|
});
|
42585
42243
|
|
42586
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42244
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js
|
42587
42245
|
var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig;
|
42588
42246
|
var init_httpAuthExtensionConfiguration = __esm({
|
42589
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42247
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js"() {
|
42590
42248
|
"use strict";
|
42591
42249
|
getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
42592
42250
|
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
@@ -42628,10 +42286,10 @@ var init_httpAuthExtensionConfiguration = __esm({
|
|
42628
42286
|
}
|
42629
42287
|
});
|
42630
42288
|
|
42631
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42289
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js
|
42632
42290
|
var asPartial, resolveRuntimeExtensions;
|
42633
42291
|
var init_runtimeExtensions = __esm({
|
42634
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42292
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js"() {
|
42635
42293
|
"use strict";
|
42636
42294
|
init_dist_es44();
|
42637
42295
|
init_dist_es2();
|
@@ -42657,10 +42315,10 @@ var init_runtimeExtensions = __esm({
|
|
42657
42315
|
}
|
42658
42316
|
});
|
42659
42317
|
|
42660
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42318
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js
|
42661
42319
|
var SSOOIDCClient;
|
42662
42320
|
var init_SSOOIDCClient = __esm({
|
42663
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42321
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js"() {
|
42664
42322
|
"use strict";
|
42665
42323
|
init_dist_es3();
|
42666
42324
|
init_dist_es4();
|
@@ -42716,10 +42374,10 @@ var init_SSOOIDCClient = __esm({
|
|
42716
42374
|
}
|
42717
42375
|
});
|
42718
42376
|
|
42719
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42377
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js
|
42720
42378
|
var SSOOIDCServiceException;
|
42721
42379
|
var init_SSOOIDCServiceException = __esm({
|
42722
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42380
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js"() {
|
42723
42381
|
"use strict";
|
42724
42382
|
init_dist_es32();
|
42725
42383
|
SSOOIDCServiceException = class _SSOOIDCServiceException extends ServiceException {
|
@@ -42731,10 +42389,10 @@ var init_SSOOIDCServiceException = __esm({
|
|
42731
42389
|
}
|
42732
42390
|
});
|
42733
42391
|
|
42734
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42392
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js
|
42735
42393
|
var AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidGrantException, InvalidRequestException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, InvalidRequestRegionException, InvalidClientMetadataException, InvalidRedirectUriException, CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog, CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog, RegisterClientResponseFilterSensitiveLog, StartDeviceAuthorizationRequestFilterSensitiveLog;
|
42736
42394
|
var init_models_0 = __esm({
|
42737
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42395
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js"() {
|
42738
42396
|
"use strict";
|
42739
42397
|
init_dist_es32();
|
42740
42398
|
init_SSOOIDCServiceException();
|
@@ -42972,10 +42630,10 @@ var init_models_0 = __esm({
|
|
42972
42630
|
}
|
42973
42631
|
});
|
42974
42632
|
|
42975
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42633
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js
|
42976
42634
|
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;
|
42977
42635
|
var init_Aws_restJson1 = __esm({
|
42978
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
42636
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js"() {
|
42979
42637
|
"use strict";
|
42980
42638
|
import_core7 = __toESM(require_dist_cjs());
|
42981
42639
|
init_dist_es34();
|
@@ -43406,10 +43064,10 @@ var init_Aws_restJson1 = __esm({
|
|
43406
43064
|
}
|
43407
43065
|
});
|
43408
43066
|
|
43409
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43067
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js
|
43410
43068
|
var CreateTokenCommand;
|
43411
43069
|
var init_CreateTokenCommand = __esm({
|
43412
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43070
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js"() {
|
43413
43071
|
"use strict";
|
43414
43072
|
init_dist_es18();
|
43415
43073
|
init_dist_es17();
|
@@ -43429,10 +43087,10 @@ var init_CreateTokenCommand = __esm({
|
|
43429
43087
|
}
|
43430
43088
|
});
|
43431
43089
|
|
43432
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43090
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js
|
43433
43091
|
var CreateTokenWithIAMCommand;
|
43434
43092
|
var init_CreateTokenWithIAMCommand = __esm({
|
43435
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43093
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js"() {
|
43436
43094
|
"use strict";
|
43437
43095
|
init_dist_es18();
|
43438
43096
|
init_dist_es17();
|
@@ -43452,10 +43110,10 @@ var init_CreateTokenWithIAMCommand = __esm({
|
|
43452
43110
|
}
|
43453
43111
|
});
|
43454
43112
|
|
43455
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43113
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js
|
43456
43114
|
var RegisterClientCommand;
|
43457
43115
|
var init_RegisterClientCommand = __esm({
|
43458
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43116
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js"() {
|
43459
43117
|
"use strict";
|
43460
43118
|
init_dist_es18();
|
43461
43119
|
init_dist_es17();
|
@@ -43475,10 +43133,10 @@ var init_RegisterClientCommand = __esm({
|
|
43475
43133
|
}
|
43476
43134
|
});
|
43477
43135
|
|
43478
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43136
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js
|
43479
43137
|
var StartDeviceAuthorizationCommand;
|
43480
43138
|
var init_StartDeviceAuthorizationCommand = __esm({
|
43481
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43139
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js"() {
|
43482
43140
|
"use strict";
|
43483
43141
|
init_dist_es18();
|
43484
43142
|
init_dist_es17();
|
@@ -43498,10 +43156,10 @@ var init_StartDeviceAuthorizationCommand = __esm({
|
|
43498
43156
|
}
|
43499
43157
|
});
|
43500
43158
|
|
43501
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43159
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js
|
43502
43160
|
var commands, SSOOIDC;
|
43503
43161
|
var init_SSOOIDC = __esm({
|
43504
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43162
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js"() {
|
43505
43163
|
"use strict";
|
43506
43164
|
init_dist_es32();
|
43507
43165
|
init_CreateTokenCommand();
|
@@ -43521,9 +43179,9 @@ var init_SSOOIDC = __esm({
|
|
43521
43179
|
}
|
43522
43180
|
});
|
43523
43181
|
|
43524
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43182
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js
|
43525
43183
|
var init_commands = __esm({
|
43526
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43184
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js"() {
|
43527
43185
|
"use strict";
|
43528
43186
|
init_CreateTokenCommand();
|
43529
43187
|
init_CreateTokenWithIAMCommand();
|
@@ -43532,15 +43190,15 @@ var init_commands = __esm({
|
|
43532
43190
|
}
|
43533
43191
|
});
|
43534
43192
|
|
43535
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43193
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js
|
43536
43194
|
var init_models = __esm({
|
43537
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43195
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js"() {
|
43538
43196
|
"use strict";
|
43539
43197
|
init_models_0();
|
43540
43198
|
}
|
43541
43199
|
});
|
43542
43200
|
|
43543
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43201
|
+
// ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js
|
43544
43202
|
var dist_es_exports8 = {};
|
43545
43203
|
__export(dist_es_exports8, {
|
43546
43204
|
$Command: () => Command,
|
@@ -43574,7 +43232,7 @@ __export(dist_es_exports8, {
|
|
43574
43232
|
__Client: () => Client
|
43575
43233
|
});
|
43576
43234
|
var init_dist_es45 = __esm({
|
43577
|
-
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.
|
43235
|
+
"../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js"() {
|
43578
43236
|
"use strict";
|
43579
43237
|
init_SSOOIDCClient();
|
43580
43238
|
init_SSOOIDC();
|
@@ -44949,7 +44607,7 @@ var init_resolveCredentialSource = __esm({
|
|
44949
44607
|
}
|
44950
44608
|
});
|
44951
44609
|
|
44952
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js
|
44610
|
+
// ../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
|
44953
44611
|
function createAwsAuthSigv4HttpAuthOption4(authParameters) {
|
44954
44612
|
return {
|
44955
44613
|
schemeId: "aws.auth#sigv4",
|
@@ -44972,7 +44630,7 @@ function createSmithyApiNoAuthHttpAuthOption3(authParameters) {
|
|
44972
44630
|
}
|
44973
44631
|
var import_core18, defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeProvider, resolveStsAuthConfig, resolveHttpAuthSchemeConfig4;
|
44974
44632
|
var init_httpAuthSchemeProvider4 = __esm({
|
44975
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js"() {
|
44633
|
+
"../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"() {
|
44976
44634
|
"use strict";
|
44977
44635
|
import_core18 = __toESM(require_dist_cjs());
|
44978
44636
|
init_dist_es10();
|
@@ -45016,10 +44674,10 @@ var init_httpAuthSchemeProvider4 = __esm({
|
|
45016
44674
|
}
|
45017
44675
|
});
|
45018
44676
|
|
45019
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js
|
44677
|
+
// ../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
|
45020
44678
|
var resolveClientEndpointParameters4, commonParams4;
|
45021
44679
|
var init_EndpointParameters4 = __esm({
|
45022
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js"() {
|
44680
|
+
"../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"() {
|
45023
44681
|
"use strict";
|
45024
44682
|
resolveClientEndpointParameters4 = (options) => {
|
45025
44683
|
return {
|
@@ -45040,10 +44698,10 @@ var init_EndpointParameters4 = __esm({
|
|
45040
44698
|
}
|
45041
44699
|
});
|
45042
44700
|
|
45043
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json
|
44701
|
+
// ../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
|
45044
44702
|
var package_default4;
|
45045
44703
|
var init_package4 = __esm({
|
45046
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/package.json"() {
|
44704
|
+
"../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"() {
|
45047
44705
|
package_default4 = {
|
45048
44706
|
name: "@aws-sdk/client-sts",
|
45049
44707
|
description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
|
@@ -45149,10 +44807,10 @@ var init_package4 = __esm({
|
|
45149
44807
|
}
|
45150
44808
|
});
|
45151
44809
|
|
45152
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js
|
44810
|
+
// ../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
|
45153
44811
|
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;
|
45154
44812
|
var init_ruleset3 = __esm({
|
45155
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js"() {
|
44813
|
+
"../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"() {
|
45156
44814
|
"use strict";
|
45157
44815
|
F = "required";
|
45158
44816
|
G = "type";
|
@@ -45195,10 +44853,10 @@ var init_ruleset3 = __esm({
|
|
45195
44853
|
}
|
45196
44854
|
});
|
45197
44855
|
|
45198
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js
|
44856
|
+
// ../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
|
45199
44857
|
var defaultEndpointResolver3;
|
45200
44858
|
var init_endpointResolver3 = __esm({
|
45201
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js"() {
|
44859
|
+
"../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"() {
|
45202
44860
|
"use strict";
|
45203
44861
|
init_dist_es7();
|
45204
44862
|
init_dist_es6();
|
@@ -45213,10 +44871,10 @@ var init_endpointResolver3 = __esm({
|
|
45213
44871
|
}
|
45214
44872
|
});
|
45215
44873
|
|
45216
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js
|
44874
|
+
// ../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
|
45217
44875
|
var import_core19, getRuntimeConfig5;
|
45218
44876
|
var init_runtimeConfig_shared3 = __esm({
|
45219
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js"() {
|
44877
|
+
"../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"() {
|
45220
44878
|
"use strict";
|
45221
44879
|
import_core19 = __toESM(require_dist_cjs());
|
45222
44880
|
init_dist_es34();
|
@@ -45257,10 +44915,10 @@ var init_runtimeConfig_shared3 = __esm({
|
|
45257
44915
|
}
|
45258
44916
|
});
|
45259
44917
|
|
45260
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js
|
44918
|
+
// ../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
|
45261
44919
|
var import_core21, getRuntimeConfig6;
|
45262
44920
|
var init_runtimeConfig3 = __esm({
|
45263
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js"() {
|
44921
|
+
"../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"() {
|
45264
44922
|
"use strict";
|
45265
44923
|
init_package4();
|
45266
44924
|
import_core21 = __toESM(require_dist_cjs());
|
@@ -45320,10 +44978,10 @@ var init_runtimeConfig3 = __esm({
|
|
45320
44978
|
}
|
45321
44979
|
});
|
45322
44980
|
|
45323
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js
|
44981
|
+
// ../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
|
45324
44982
|
var getHttpAuthExtensionConfiguration3, resolveHttpAuthRuntimeConfig3;
|
45325
44983
|
var init_httpAuthExtensionConfiguration3 = __esm({
|
45326
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js"() {
|
44984
|
+
"../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"() {
|
45327
44985
|
"use strict";
|
45328
44986
|
getHttpAuthExtensionConfiguration3 = (runtimeConfig) => {
|
45329
44987
|
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
@@ -45365,10 +45023,10 @@ var init_httpAuthExtensionConfiguration3 = __esm({
|
|
45365
45023
|
}
|
45366
45024
|
});
|
45367
45025
|
|
45368
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js
|
45026
|
+
// ../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
|
45369
45027
|
var asPartial3, resolveRuntimeExtensions3;
|
45370
45028
|
var init_runtimeExtensions3 = __esm({
|
45371
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js"() {
|
45029
|
+
"../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"() {
|
45372
45030
|
"use strict";
|
45373
45031
|
init_dist_es44();
|
45374
45032
|
init_dist_es2();
|
@@ -45394,10 +45052,10 @@ var init_runtimeExtensions3 = __esm({
|
|
45394
45052
|
}
|
45395
45053
|
});
|
45396
45054
|
|
45397
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js
|
45055
|
+
// ../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
|
45398
45056
|
var STSClient;
|
45399
45057
|
var init_STSClient = __esm({
|
45400
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js"() {
|
45058
|
+
"../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"() {
|
45401
45059
|
"use strict";
|
45402
45060
|
init_dist_es3();
|
45403
45061
|
init_dist_es4();
|
@@ -45453,10 +45111,10 @@ var init_STSClient = __esm({
|
|
45453
45111
|
}
|
45454
45112
|
});
|
45455
45113
|
|
45456
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js
|
45114
|
+
// ../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
|
45457
45115
|
var STSServiceException;
|
45458
45116
|
var init_STSServiceException = __esm({
|
45459
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js"() {
|
45117
|
+
"../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"() {
|
45460
45118
|
"use strict";
|
45461
45119
|
init_dist_es32();
|
45462
45120
|
STSServiceException = class _STSServiceException extends ServiceException {
|
@@ -45468,10 +45126,10 @@ var init_STSServiceException = __esm({
|
|
45468
45126
|
}
|
45469
45127
|
});
|
45470
45128
|
|
45471
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js
|
45129
|
+
// ../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
|
45472
45130
|
var ExpiredTokenException2, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, IDPRejectedClaimException, InvalidIdentityTokenException, IDPCommunicationErrorException, InvalidAuthorizationMessageException, CredentialsFilterSensitiveLog, AssumeRoleResponseFilterSensitiveLog, AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog, AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog, GetFederationTokenResponseFilterSensitiveLog, GetSessionTokenResponseFilterSensitiveLog;
|
45473
45131
|
var init_models_03 = __esm({
|
45474
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js"() {
|
45132
|
+
"../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"() {
|
45475
45133
|
"use strict";
|
45476
45134
|
init_dist_es32();
|
45477
45135
|
init_STSServiceException();
|
@@ -45606,10 +45264,10 @@ var init_models_03 = __esm({
|
|
45606
45264
|
}
|
45607
45265
|
});
|
45608
45266
|
|
45609
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js
|
45267
|
+
// ../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
|
45610
45268
|
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;
|
45611
45269
|
var init_Aws_query = __esm({
|
45612
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js"() {
|
45270
|
+
"../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"() {
|
45613
45271
|
"use strict";
|
45614
45272
|
import_core24 = __toESM(require_dist_cjs());
|
45615
45273
|
init_dist_es2();
|
@@ -46407,14 +46065,14 @@ var init_Aws_query = __esm({
|
|
46407
46065
|
cfId: output.headers["x-amz-cf-id"]
|
46408
46066
|
});
|
46409
46067
|
throwDefaultError4 = withBaseException(STSServiceException);
|
46410
|
-
buildHttpRpcRequest = async (context, headers,
|
46068
|
+
buildHttpRpcRequest = async (context, headers, path2, resolvedHostname, body) => {
|
46411
46069
|
const { hostname, protocol: protocol2 = "https", port, path: basePath } = await context.endpoint();
|
46412
46070
|
const contents = {
|
46413
46071
|
protocol: protocol2,
|
46414
46072
|
hostname,
|
46415
46073
|
port,
|
46416
46074
|
method: "POST",
|
46417
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) +
|
46075
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path2 : basePath + path2,
|
46418
46076
|
headers
|
46419
46077
|
};
|
46420
46078
|
if (resolvedHostname !== void 0) {
|
@@ -46496,10 +46154,10 @@ var init_Aws_query = __esm({
|
|
46496
46154
|
}
|
46497
46155
|
});
|
46498
46156
|
|
46499
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js
|
46157
|
+
// ../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
|
46500
46158
|
var AssumeRoleCommand;
|
46501
46159
|
var init_AssumeRoleCommand = __esm({
|
46502
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js"() {
|
46160
|
+
"../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"() {
|
46503
46161
|
"use strict";
|
46504
46162
|
init_dist_es18();
|
46505
46163
|
init_dist_es17();
|
@@ -46519,10 +46177,10 @@ var init_AssumeRoleCommand = __esm({
|
|
46519
46177
|
}
|
46520
46178
|
});
|
46521
46179
|
|
46522
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js
|
46180
|
+
// ../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
|
46523
46181
|
var AssumeRoleWithSAMLCommand;
|
46524
46182
|
var init_AssumeRoleWithSAMLCommand = __esm({
|
46525
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js"() {
|
46183
|
+
"../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"() {
|
46526
46184
|
"use strict";
|
46527
46185
|
init_dist_es18();
|
46528
46186
|
init_dist_es17();
|
@@ -46542,10 +46200,10 @@ var init_AssumeRoleWithSAMLCommand = __esm({
|
|
46542
46200
|
}
|
46543
46201
|
});
|
46544
46202
|
|
46545
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js
|
46203
|
+
// ../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
|
46546
46204
|
var AssumeRoleWithWebIdentityCommand;
|
46547
46205
|
var init_AssumeRoleWithWebIdentityCommand = __esm({
|
46548
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js"() {
|
46206
|
+
"../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"() {
|
46549
46207
|
"use strict";
|
46550
46208
|
init_dist_es18();
|
46551
46209
|
init_dist_es17();
|
@@ -46565,10 +46223,10 @@ var init_AssumeRoleWithWebIdentityCommand = __esm({
|
|
46565
46223
|
}
|
46566
46224
|
});
|
46567
46225
|
|
46568
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js
|
46226
|
+
// ../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
|
46569
46227
|
var DecodeAuthorizationMessageCommand;
|
46570
46228
|
var init_DecodeAuthorizationMessageCommand = __esm({
|
46571
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js"() {
|
46229
|
+
"../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"() {
|
46572
46230
|
"use strict";
|
46573
46231
|
init_dist_es18();
|
46574
46232
|
init_dist_es17();
|
@@ -46587,10 +46245,10 @@ var init_DecodeAuthorizationMessageCommand = __esm({
|
|
46587
46245
|
}
|
46588
46246
|
});
|
46589
46247
|
|
46590
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js
|
46248
|
+
// ../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
|
46591
46249
|
var GetAccessKeyInfoCommand;
|
46592
46250
|
var init_GetAccessKeyInfoCommand = __esm({
|
46593
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js"() {
|
46251
|
+
"../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"() {
|
46594
46252
|
"use strict";
|
46595
46253
|
init_dist_es18();
|
46596
46254
|
init_dist_es17();
|
@@ -46609,10 +46267,10 @@ var init_GetAccessKeyInfoCommand = __esm({
|
|
46609
46267
|
}
|
46610
46268
|
});
|
46611
46269
|
|
46612
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js
|
46270
|
+
// ../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
|
46613
46271
|
var GetCallerIdentityCommand;
|
46614
46272
|
var init_GetCallerIdentityCommand = __esm({
|
46615
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js"() {
|
46273
|
+
"../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"() {
|
46616
46274
|
"use strict";
|
46617
46275
|
init_dist_es18();
|
46618
46276
|
init_dist_es17();
|
@@ -46631,10 +46289,10 @@ var init_GetCallerIdentityCommand = __esm({
|
|
46631
46289
|
}
|
46632
46290
|
});
|
46633
46291
|
|
46634
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js
|
46292
|
+
// ../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
|
46635
46293
|
var GetFederationTokenCommand;
|
46636
46294
|
var init_GetFederationTokenCommand = __esm({
|
46637
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js"() {
|
46295
|
+
"../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"() {
|
46638
46296
|
"use strict";
|
46639
46297
|
init_dist_es18();
|
46640
46298
|
init_dist_es17();
|
@@ -46654,10 +46312,10 @@ var init_GetFederationTokenCommand = __esm({
|
|
46654
46312
|
}
|
46655
46313
|
});
|
46656
46314
|
|
46657
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js
|
46315
|
+
// ../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
|
46658
46316
|
var GetSessionTokenCommand;
|
46659
46317
|
var init_GetSessionTokenCommand = __esm({
|
46660
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js"() {
|
46318
|
+
"../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"() {
|
46661
46319
|
"use strict";
|
46662
46320
|
init_dist_es18();
|
46663
46321
|
init_dist_es17();
|
@@ -46677,10 +46335,10 @@ var init_GetSessionTokenCommand = __esm({
|
|
46677
46335
|
}
|
46678
46336
|
});
|
46679
46337
|
|
46680
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STS.js
|
46338
|
+
// ../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
|
46681
46339
|
var commands3, STS;
|
46682
46340
|
var init_STS = __esm({
|
46683
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/STS.js"() {
|
46341
|
+
"../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"() {
|
46684
46342
|
"use strict";
|
46685
46343
|
init_dist_es32();
|
46686
46344
|
init_AssumeRoleCommand();
|
@@ -46708,9 +46366,9 @@ var init_STS = __esm({
|
|
46708
46366
|
}
|
46709
46367
|
});
|
46710
46368
|
|
46711
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js
|
46369
|
+
// ../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
|
46712
46370
|
var init_commands3 = __esm({
|
46713
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js"() {
|
46371
|
+
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0_@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js"() {
|
46714
46372
|
"use strict";
|
46715
46373
|
init_AssumeRoleCommand();
|
46716
46374
|
init_AssumeRoleWithSAMLCommand();
|
@@ -46723,18 +46381,18 @@ var init_commands3 = __esm({
|
|
46723
46381
|
}
|
46724
46382
|
});
|
46725
46383
|
|
46726
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/index.js
|
46384
|
+
// ../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
|
46727
46385
|
var init_models3 = __esm({
|
46728
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/models/index.js"() {
|
46386
|
+
"../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"() {
|
46729
46387
|
"use strict";
|
46730
46388
|
init_models_03();
|
46731
46389
|
}
|
46732
46390
|
});
|
46733
46391
|
|
46734
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js
|
46392
|
+
// ../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
|
46735
46393
|
var ASSUME_ROLE_DEFAULT_REGION, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity;
|
46736
46394
|
var init_defaultStsRoleAssumers = __esm({
|
46737
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js"() {
|
46395
|
+
"../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"() {
|
46738
46396
|
"use strict";
|
46739
46397
|
init_AssumeRoleCommand();
|
46740
46398
|
init_AssumeRoleWithWebIdentityCommand();
|
@@ -46801,10 +46459,10 @@ var init_defaultStsRoleAssumers = __esm({
|
|
46801
46459
|
}
|
46802
46460
|
});
|
46803
46461
|
|
46804
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js
|
46462
|
+
// ../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
|
46805
46463
|
var getCustomizableStsClientCtor, getDefaultRoleAssumer2, getDefaultRoleAssumerWithWebIdentity2, decorateDefaultCredentialProvider;
|
46806
46464
|
var init_defaultRoleAssumers = __esm({
|
46807
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js"() {
|
46465
|
+
"../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"() {
|
46808
46466
|
"use strict";
|
46809
46467
|
init_defaultStsRoleAssumers();
|
46810
46468
|
init_STSClient();
|
@@ -46831,7 +46489,7 @@ var init_defaultRoleAssumers = __esm({
|
|
46831
46489
|
}
|
46832
46490
|
});
|
46833
46491
|
|
46834
|
-
// ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/index.js
|
46492
|
+
// ../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
|
46835
46493
|
var dist_es_exports10 = {};
|
46836
46494
|
__export(dist_es_exports10, {
|
46837
46495
|
$Command: () => Command,
|
@@ -46868,7 +46526,7 @@ __export(dist_es_exports10, {
|
|
46868
46526
|
getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2
|
46869
46527
|
});
|
46870
46528
|
var init_dist_es49 = __esm({
|
46871
|
-
"../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-es/index.js"() {
|
46529
|
+
"../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"() {
|
46872
46530
|
"use strict";
|
46873
46531
|
init_STSClient();
|
46874
46532
|
init_STS();
|
@@ -49050,7 +48708,9 @@ function drizzle2(client, config) {
|
|
49050
48708
|
};
|
49051
48709
|
}
|
49052
48710
|
const session = new AwsDataApiSession(client, dialect7, schema4, { ...config, logger: logger2 }, void 0);
|
49053
|
-
|
48711
|
+
const db2 = new AwsDataApiPgDatabase(dialect7, session, schema4);
|
48712
|
+
db2.$client = client;
|
48713
|
+
return db2;
|
49054
48714
|
}
|
49055
48715
|
var _a168, _b121, AwsDataApiPgDatabase, _a169, _b122, AwsPgDialect;
|
49056
48716
|
var init_driver2 = __esm({
|
@@ -49173,20 +48833,20 @@ var require_file_uri_to_path = __commonJS({
|
|
49173
48833
|
var rest = decodeURI(uri.substring(7));
|
49174
48834
|
var firstSlash = rest.indexOf("/");
|
49175
48835
|
var host = rest.substring(0, firstSlash);
|
49176
|
-
var
|
48836
|
+
var path2 = rest.substring(firstSlash + 1);
|
49177
48837
|
if ("localhost" == host) host = "";
|
49178
48838
|
if (host) {
|
49179
48839
|
host = sep3 + sep3 + host;
|
49180
48840
|
}
|
49181
|
-
|
48841
|
+
path2 = path2.replace(/^(.+)\|/, "$1:");
|
49182
48842
|
if (sep3 == "\\") {
|
49183
|
-
|
48843
|
+
path2 = path2.replace(/\//g, "\\");
|
49184
48844
|
}
|
49185
|
-
if (/^.+\:/.test(
|
48845
|
+
if (/^.+\:/.test(path2)) {
|
49186
48846
|
} else {
|
49187
|
-
|
48847
|
+
path2 = sep3 + path2;
|
49188
48848
|
}
|
49189
|
-
return host +
|
48849
|
+
return host + path2;
|
49190
48850
|
}
|
49191
48851
|
}
|
49192
48852
|
});
|
@@ -49196,18 +48856,18 @@ var require_bindings = __commonJS({
|
|
49196
48856
|
"../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js"(exports, module) {
|
49197
48857
|
"use strict";
|
49198
48858
|
var fs5 = __require("fs");
|
49199
|
-
var
|
48859
|
+
var path2 = __require("path");
|
49200
48860
|
var fileURLToPath = require_file_uri_to_path();
|
49201
|
-
var join4 =
|
49202
|
-
var dirname =
|
49203
|
-
var exists2 = fs5.accessSync && function(
|
48861
|
+
var join4 = path2.join;
|
48862
|
+
var dirname = path2.dirname;
|
48863
|
+
var exists2 = fs5.accessSync && function(path3) {
|
49204
48864
|
try {
|
49205
|
-
fs5.accessSync(
|
48865
|
+
fs5.accessSync(path3);
|
49206
48866
|
} catch (e5) {
|
49207
48867
|
return false;
|
49208
48868
|
}
|
49209
48869
|
return true;
|
49210
|
-
} || fs5.existsSync ||
|
48870
|
+
} || fs5.existsSync || path2.existsSync;
|
49211
48871
|
var defaults2 = {
|
49212
48872
|
arrow: process.env.NODE_BINDINGS_ARROW || " \u2192 ",
|
49213
48873
|
compiled: process.env.NODE_BINDINGS_COMPILED_DIR || "compiled",
|
@@ -49252,7 +48912,7 @@ var require_bindings = __commonJS({
|
|
49252
48912
|
if (!opts.module_root) {
|
49253
48913
|
opts.module_root = exports.getRoot(exports.getFileName());
|
49254
48914
|
}
|
49255
|
-
if (
|
48915
|
+
if (path2.extname(opts.bindings) != ".node") {
|
49256
48916
|
opts.bindings += ".node";
|
49257
48917
|
}
|
49258
48918
|
var requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
@@ -49488,7 +49148,7 @@ var require_backup = __commonJS({
|
|
49488
49148
|
"../node_modules/.pnpm/better-sqlite3@8.7.0/node_modules/better-sqlite3/lib/methods/backup.js"(exports, module) {
|
49489
49149
|
"use strict";
|
49490
49150
|
var fs5 = __require("fs");
|
49491
|
-
var
|
49151
|
+
var path2 = __require("path");
|
49492
49152
|
var { promisify: promisify2 } = __require("util");
|
49493
49153
|
var { cppdb } = require_util3();
|
49494
49154
|
var fsAccess = promisify2(fs5.access);
|
@@ -49504,7 +49164,7 @@ var require_backup = __commonJS({
|
|
49504
49164
|
if (typeof attachedName !== "string") throw new TypeError('Expected the "attached" option to be a string');
|
49505
49165
|
if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
|
49506
49166
|
if (handler != null && typeof handler !== "function") throw new TypeError('Expected the "progress" option to be a function');
|
49507
|
-
await fsAccess(
|
49167
|
+
await fsAccess(path2.dirname(filename)).catch(() => {
|
49508
49168
|
throw new TypeError("Cannot save backup because the directory does not exist");
|
49509
49169
|
});
|
49510
49170
|
const isNewFile = await fsAccess(filename).then(() => false, () => true);
|
@@ -49810,7 +49470,7 @@ var require_database = __commonJS({
|
|
49810
49470
|
"../node_modules/.pnpm/better-sqlite3@8.7.0/node_modules/better-sqlite3/lib/database.js"(exports, module) {
|
49811
49471
|
"use strict";
|
49812
49472
|
var fs5 = __require("fs");
|
49813
|
-
var
|
49473
|
+
var path2 = __require("path");
|
49814
49474
|
var util2 = require_util3();
|
49815
49475
|
var SqliteError = require_sqlite_error();
|
49816
49476
|
var DEFAULT_ADDON;
|
@@ -49846,7 +49506,7 @@ var require_database = __commonJS({
|
|
49846
49506
|
addon = DEFAULT_ADDON || (DEFAULT_ADDON = require_bindings()("better_sqlite3.node"));
|
49847
49507
|
} else if (typeof nativeBinding === "string") {
|
49848
49508
|
const requireFunc = typeof __non_webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
49849
|
-
addon = requireFunc(
|
49509
|
+
addon = requireFunc(path2.resolve(nativeBinding).replace(/(\.node)?$/, ".node"));
|
49850
49510
|
} else {
|
49851
49511
|
addon = nativeBinding;
|
49852
49512
|
}
|
@@ -49854,7 +49514,7 @@ var require_database = __commonJS({
|
|
49854
49514
|
addon.setErrorConstructor(SqliteError);
|
49855
49515
|
addon.isInitialized = true;
|
49856
49516
|
}
|
49857
|
-
if (!anonymous && !fs5.existsSync(
|
49517
|
+
if (!anonymous && !fs5.existsSync(path2.dirname(filename))) {
|
49858
49518
|
throw new TypeError("Cannot open database because the directory does not exist");
|
49859
49519
|
}
|
49860
49520
|
Object.defineProperties(this, {
|
@@ -52458,6 +52118,7 @@ var init_db2 = __esm({
|
|
52458
52118
|
"use strict";
|
52459
52119
|
init_entity();
|
52460
52120
|
init_selection_proxy();
|
52121
|
+
init_sql();
|
52461
52122
|
init_query_builders2();
|
52462
52123
|
init_subquery();
|
52463
52124
|
init_count2();
|
@@ -52689,56 +52350,56 @@ var init_db2 = __esm({
|
|
52689
52350
|
return new SQLiteDeleteBase(from, this.session, this.dialect);
|
52690
52351
|
}
|
52691
52352
|
run(query) {
|
52692
|
-
const
|
52353
|
+
const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
|
52693
52354
|
if (this.resultKind === "async") {
|
52694
52355
|
return new SQLiteRaw(
|
52695
|
-
async () => this.session.run(
|
52696
|
-
() =>
|
52356
|
+
async () => this.session.run(sequel),
|
52357
|
+
() => sequel,
|
52697
52358
|
"run",
|
52698
52359
|
this.dialect,
|
52699
52360
|
this.session.extractRawRunValueFromBatchResult.bind(this.session)
|
52700
52361
|
);
|
52701
52362
|
}
|
52702
|
-
return this.session.run(
|
52363
|
+
return this.session.run(sequel);
|
52703
52364
|
}
|
52704
52365
|
all(query) {
|
52705
|
-
const
|
52366
|
+
const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
|
52706
52367
|
if (this.resultKind === "async") {
|
52707
52368
|
return new SQLiteRaw(
|
52708
|
-
async () => this.session.all(
|
52709
|
-
() =>
|
52369
|
+
async () => this.session.all(sequel),
|
52370
|
+
() => sequel,
|
52710
52371
|
"all",
|
52711
52372
|
this.dialect,
|
52712
52373
|
this.session.extractRawAllValueFromBatchResult.bind(this.session)
|
52713
52374
|
);
|
52714
52375
|
}
|
52715
|
-
return this.session.all(
|
52376
|
+
return this.session.all(sequel);
|
52716
52377
|
}
|
52717
52378
|
get(query) {
|
52718
|
-
const
|
52379
|
+
const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
|
52719
52380
|
if (this.resultKind === "async") {
|
52720
52381
|
return new SQLiteRaw(
|
52721
|
-
async () => this.session.get(
|
52722
|
-
() =>
|
52382
|
+
async () => this.session.get(sequel),
|
52383
|
+
() => sequel,
|
52723
52384
|
"get",
|
52724
52385
|
this.dialect,
|
52725
52386
|
this.session.extractRawGetValueFromBatchResult.bind(this.session)
|
52726
52387
|
);
|
52727
52388
|
}
|
52728
|
-
return this.session.get(
|
52389
|
+
return this.session.get(sequel);
|
52729
52390
|
}
|
52730
52391
|
values(query) {
|
52731
|
-
const
|
52392
|
+
const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
|
52732
52393
|
if (this.resultKind === "async") {
|
52733
52394
|
return new SQLiteRaw(
|
52734
|
-
async () => this.session.values(
|
52735
|
-
() =>
|
52395
|
+
async () => this.session.values(sequel),
|
52396
|
+
() => sequel,
|
52736
52397
|
"values",
|
52737
52398
|
this.dialect,
|
52738
52399
|
this.session.extractRawValuesValueFromBatchResult.bind(this.session)
|
52739
52400
|
);
|
52740
52401
|
}
|
52741
|
-
return this.session.values(
|
52402
|
+
return this.session.values(sequel);
|
52742
52403
|
}
|
52743
52404
|
transaction(transaction, config) {
|
52744
52405
|
return this.session.transaction(transaction, config);
|
@@ -53332,7 +52993,9 @@ function drizzle3(client, config = {}) {
|
|
53332
52993
|
};
|
53333
52994
|
}
|
53334
52995
|
const session = new BetterSQLiteSession(client, dialect7, schema4, { logger: logger2 });
|
53335
|
-
|
52996
|
+
const db2 = new BetterSQLite3Database("sync", dialect7, session, schema4);
|
52997
|
+
db2.$client = client;
|
52998
|
+
return db2;
|
53336
52999
|
}
|
53337
53000
|
var _a239, _b170, BetterSQLite3Database;
|
53338
53001
|
var init_driver3 = __esm({
|
@@ -53508,7 +53171,9 @@ function drizzle4(client, config = {}) {
|
|
53508
53171
|
};
|
53509
53172
|
}
|
53510
53173
|
const session = new SQLiteBunSession(client, dialect7, schema4, { logger: logger2 });
|
53511
|
-
|
53174
|
+
const db2 = new BunSQLiteDatabase("sync", dialect7, session, schema4);
|
53175
|
+
db2.$client = client;
|
53176
|
+
return db2;
|
53512
53177
|
}
|
53513
53178
|
var _a243, _b174, BunSQLiteDatabase;
|
53514
53179
|
var init_driver4 = __esm({
|
@@ -53748,7 +53413,9 @@ function drizzle5(client, config = {}) {
|
|
53748
53413
|
};
|
53749
53414
|
}
|
53750
53415
|
const session = new SQLiteD1Session(client, dialect7, schema4, { logger: logger2 });
|
53751
|
-
|
53416
|
+
const db2 = new DrizzleD1Database("async", dialect7, session, schema4);
|
53417
|
+
db2.$client = client;
|
53418
|
+
return db2;
|
53752
53419
|
}
|
53753
53420
|
var _a247, _b178, DrizzleD1Database;
|
53754
53421
|
var init_driver5 = __esm({
|
@@ -53818,10 +53485,10 @@ function parseUri(text) {
|
|
53818
53485
|
const groups = match2.groups;
|
53819
53486
|
const scheme = groups["scheme"];
|
53820
53487
|
const authority = groups["authority"] !== void 0 ? parseAuthority(groups["authority"]) : void 0;
|
53821
|
-
const
|
53488
|
+
const path2 = percentDecode(groups["path"]);
|
53822
53489
|
const query = groups["query"] !== void 0 ? parseQuery(groups["query"]) : void 0;
|
53823
53490
|
const fragment2 = groups["fragment"] !== void 0 ? percentDecode(groups["fragment"]) : void 0;
|
53824
|
-
return { scheme, authority, path:
|
53491
|
+
return { scheme, authority, path: path2, query, fragment: fragment2 };
|
53825
53492
|
}
|
53826
53493
|
function parseAuthority(text) {
|
53827
53494
|
const match2 = AUTHORITY_RE.exec(text);
|
@@ -53871,7 +53538,7 @@ function percentDecode(text) {
|
|
53871
53538
|
throw e5;
|
53872
53539
|
}
|
53873
53540
|
}
|
53874
|
-
function encodeBaseUrl(scheme, authority,
|
53541
|
+
function encodeBaseUrl(scheme, authority, path2) {
|
53875
53542
|
if (authority === void 0) {
|
53876
53543
|
throw new LibsqlError(`URL with scheme ${JSON.stringify(scheme + ":")} requires authority (the "//" part)`, "URL_INVALID");
|
53877
53544
|
}
|
@@ -53880,7 +53547,7 @@ function encodeBaseUrl(scheme, authority, path3) {
|
|
53880
53547
|
const portText = encodePort(authority.port);
|
53881
53548
|
const userinfoText = encodeUserinfo(authority.userinfo);
|
53882
53549
|
const authorityText = `//${userinfoText}${hostText}${portText}`;
|
53883
|
-
let pathText =
|
53550
|
+
let pathText = path2.split("/").map(encodeURIComponent).join("/");
|
53884
53551
|
if (pathText !== "" && !pathText.startsWith("/")) {
|
53885
53552
|
pathText = "/" + pathText;
|
53886
53553
|
}
|
@@ -54186,7 +53853,7 @@ function expandConfig(config, preferHttp) {
|
|
54186
53853
|
}
|
54187
53854
|
}
|
54188
53855
|
const connectionQueryParamsString = connectionQueryParams.length === 0 ? "" : `?${connectionQueryParams.join("&")}`;
|
54189
|
-
const
|
53856
|
+
const path2 = uri.path + connectionQueryParamsString;
|
54190
53857
|
let scheme;
|
54191
53858
|
if (originalUriScheme === "libsql") {
|
54192
53859
|
if (tls2 === false) {
|
@@ -54218,7 +53885,7 @@ function expandConfig(config, preferHttp) {
|
|
54218
53885
|
return {
|
54219
53886
|
scheme: "file",
|
54220
53887
|
tls: false,
|
54221
|
-
path:
|
53888
|
+
path: path2,
|
54222
53889
|
intMode,
|
54223
53890
|
concurrency,
|
54224
53891
|
syncUrl: config.syncUrl,
|
@@ -54233,7 +53900,7 @@ function expandConfig(config, preferHttp) {
|
|
54233
53900
|
scheme,
|
54234
53901
|
tls: tls2,
|
54235
53902
|
authority: uri.authority,
|
54236
|
-
path:
|
53903
|
+
path: path2,
|
54237
53904
|
authToken,
|
54238
53905
|
intMode,
|
54239
53906
|
concurrency,
|
@@ -54287,7 +53954,7 @@ var require_dist2 = __commonJS({
|
|
54287
53954
|
};
|
54288
53955
|
Object.defineProperty(exports, "__esModule", { value: true });
|
54289
53956
|
exports.load = exports.currentTarget = void 0;
|
54290
|
-
var
|
53957
|
+
var path2 = __importStar2(__require("path"));
|
54291
53958
|
var fs5 = __importStar2(__require("fs"));
|
54292
53959
|
function currentTarget() {
|
54293
53960
|
let os3 = null;
|
@@ -54353,7 +54020,7 @@ var require_dist2 = __commonJS({
|
|
54353
54020
|
return typeof header === "object" && !!header && "glibcVersionRuntime" in header;
|
54354
54021
|
}
|
54355
54022
|
function load(dirname) {
|
54356
|
-
const m7 =
|
54023
|
+
const m7 = path2.join(dirname, "index.node");
|
54357
54024
|
return fs5.existsSync(m7) ? __require(m7) : null;
|
54358
54025
|
}
|
54359
54026
|
exports.load = load;
|
@@ -54382,9 +54049,9 @@ var require_filesystem = __commonJS({
|
|
54382
54049
|
"use strict";
|
54383
54050
|
var fs5 = __require("fs");
|
54384
54051
|
var LDD_PATH = "/usr/bin/ldd";
|
54385
|
-
var readFileSync2 = (
|
54386
|
-
var readFile3 = (
|
54387
|
-
fs5.readFile(
|
54052
|
+
var readFileSync2 = (path2) => fs5.readFileSync(path2, "utf-8");
|
54053
|
+
var readFile3 = (path2) => new Promise((resolve, reject) => {
|
54054
|
+
fs5.readFile(path2, "utf-8", (err, data) => {
|
54388
54055
|
if (err) {
|
54389
54056
|
reject(err);
|
54390
54057
|
} else {
|
@@ -54694,7 +54361,7 @@ var require_libsql = __commonJS({
|
|
54694
54361
|
* @constructor
|
54695
54362
|
* @param {string} path - Path to the database file.
|
54696
54363
|
*/
|
54697
|
-
constructor(
|
54364
|
+
constructor(path2, opts) {
|
54698
54365
|
const encryptionCipher = opts?.encryptionCipher ?? "aes256cbc";
|
54699
54366
|
if (opts && opts.syncUrl) {
|
54700
54367
|
var authToken = "";
|
@@ -54707,13 +54374,13 @@ var require_libsql = __commonJS({
|
|
54707
54374
|
const encryptionKey = opts?.encryptionKey ?? "";
|
54708
54375
|
const syncPeriod = opts?.syncPeriod ?? 0;
|
54709
54376
|
const readYourWrites = opts?.readYourWrites ?? true;
|
54710
|
-
this.db = databaseOpenWithRpcSync(
|
54377
|
+
this.db = databaseOpenWithRpcSync(path2, opts.syncUrl, authToken, encryptionCipher, encryptionKey, syncPeriod, readYourWrites);
|
54711
54378
|
} else {
|
54712
54379
|
const authToken2 = opts?.authToken ?? "";
|
54713
54380
|
const encryptionKey = opts?.encryptionKey ?? "";
|
54714
|
-
this.db = databaseOpen(
|
54381
|
+
this.db = databaseOpen(path2, authToken2, encryptionCipher, encryptionKey);
|
54715
54382
|
}
|
54716
|
-
this.memory =
|
54383
|
+
this.memory = path2 === ":memory:";
|
54717
54384
|
this.readonly = false;
|
54718
54385
|
this.name = "";
|
54719
54386
|
this.open = true;
|
@@ -54992,9 +54659,9 @@ function _createClient(config) {
|
|
54992
54659
|
if (isInMemory && config.syncUrl) {
|
54993
54660
|
throw new LibsqlError(`Embedded replica must use file for local db but URI with in-memory mode were provided instead: ${config.path}`, "URL_INVALID");
|
54994
54661
|
}
|
54995
|
-
let
|
54662
|
+
let path2 = config.path;
|
54996
54663
|
if (isInMemory) {
|
54997
|
-
|
54664
|
+
path2 = `${config.scheme}:${config.path}`;
|
54998
54665
|
}
|
54999
54666
|
const options = {
|
55000
54667
|
authToken: config.authToken,
|
@@ -55002,9 +54669,9 @@ function _createClient(config) {
|
|
55002
54669
|
syncUrl: config.syncUrl,
|
55003
54670
|
syncPeriod: config.syncInterval
|
55004
54671
|
};
|
55005
|
-
const db2 = new import_libsql.default(
|
54672
|
+
const db2 = new import_libsql.default(path2, options);
|
55006
54673
|
executeStmt(db2, "SELECT 1 AS checkThatTheDatabaseCanBeOpened", config.intMode);
|
55007
|
-
return new Sqlite3Client(
|
54674
|
+
return new Sqlite3Client(path2, options, db2, config.intMode);
|
55008
54675
|
}
|
55009
54676
|
function executeStmt(db2, stmt, intMode) {
|
55010
54677
|
let sql3;
|
@@ -55143,7 +54810,7 @@ var init_sqlite3 = __esm({
|
|
55143
54810
|
init_api();
|
55144
54811
|
Sqlite3Client = class {
|
55145
54812
|
/** @private */
|
55146
|
-
constructor(
|
54813
|
+
constructor(path2, options, db2, intMode) {
|
55147
54814
|
__privateAdd(this, _Sqlite3Client_instances);
|
55148
54815
|
__privateAdd(this, _path);
|
55149
54816
|
__privateAdd(this, _options);
|
@@ -55151,7 +54818,7 @@ var init_sqlite3 = __esm({
|
|
55151
54818
|
__privateAdd(this, _intMode);
|
55152
54819
|
__publicField(this, "closed");
|
55153
54820
|
__publicField(this, "protocol");
|
55154
|
-
__privateSet(this, _path,
|
54821
|
+
__privateSet(this, _path, path2);
|
55155
54822
|
__privateSet(this, _options, options);
|
55156
54823
|
__privateSet(this, _db, db2);
|
55157
54824
|
__privateSet(this, _intMode, intMode);
|
@@ -55451,7 +55118,7 @@ var require_node_gyp_build = __commonJS({
|
|
55451
55118
|
"../node_modules/.pnpm/node-gyp-build@4.8.1/node_modules/node-gyp-build/node-gyp-build.js"(exports, module) {
|
55452
55119
|
"use strict";
|
55453
55120
|
var fs5 = __require("fs");
|
55454
|
-
var
|
55121
|
+
var path2 = __require("path");
|
55455
55122
|
var os3 = __require("os");
|
55456
55123
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
55457
55124
|
var vars = process.config && process.config.variables || {};
|
@@ -55468,21 +55135,21 @@ var require_node_gyp_build = __commonJS({
|
|
55468
55135
|
return runtimeRequire(load.resolve(dir));
|
55469
55136
|
}
|
55470
55137
|
load.resolve = load.path = function(dir) {
|
55471
|
-
dir =
|
55138
|
+
dir = path2.resolve(dir || ".");
|
55472
55139
|
try {
|
55473
|
-
var name2 = runtimeRequire(
|
55140
|
+
var name2 = runtimeRequire(path2.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
|
55474
55141
|
if (process.env[name2 + "_PREBUILD"]) dir = process.env[name2 + "_PREBUILD"];
|
55475
55142
|
} catch (err) {
|
55476
55143
|
}
|
55477
55144
|
if (!prebuildsOnly) {
|
55478
|
-
var release2 = getFirst(
|
55145
|
+
var release2 = getFirst(path2.join(dir, "build/Release"), matchBuild);
|
55479
55146
|
if (release2) return release2;
|
55480
|
-
var debug = getFirst(
|
55147
|
+
var debug = getFirst(path2.join(dir, "build/Debug"), matchBuild);
|
55481
55148
|
if (debug) return debug;
|
55482
55149
|
}
|
55483
55150
|
var prebuild = resolve(dir);
|
55484
55151
|
if (prebuild) return prebuild;
|
55485
|
-
var nearby = resolve(
|
55152
|
+
var nearby = resolve(path2.dirname(process.execPath));
|
55486
55153
|
if (nearby) return nearby;
|
55487
55154
|
var target = [
|
55488
55155
|
"platform=" + platform2,
|
@@ -55499,14 +55166,14 @@ var require_node_gyp_build = __commonJS({
|
|
55499
55166
|
].filter(Boolean).join(" ");
|
55500
55167
|
throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
|
55501
55168
|
function resolve(dir2) {
|
55502
|
-
var tuples2 = readdirSync(
|
55169
|
+
var tuples2 = readdirSync(path2.join(dir2, "prebuilds")).map(parseTuple);
|
55503
55170
|
var tuple = tuples2.filter(matchTuple(platform2, arch)).sort(compareTuples)[0];
|
55504
55171
|
if (!tuple) return;
|
55505
|
-
var prebuilds =
|
55172
|
+
var prebuilds = path2.join(dir2, "prebuilds", tuple.name);
|
55506
55173
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
55507
55174
|
var candidates = parsed.filter(matchTags(runtime, abi));
|
55508
55175
|
var winner = candidates.sort(compareTags(runtime))[0];
|
55509
|
-
if (winner) return
|
55176
|
+
if (winner) return path2.join(prebuilds, winner.file);
|
55510
55177
|
}
|
55511
55178
|
};
|
55512
55179
|
function readdirSync(dir) {
|
@@ -55518,7 +55185,7 @@ var require_node_gyp_build = __commonJS({
|
|
55518
55185
|
}
|
55519
55186
|
function getFirst(dir, filter2) {
|
55520
55187
|
var files = readdirSync(dir).filter(filter2);
|
55521
|
-
return files[0] &&
|
55188
|
+
return files[0] && path2.join(dir, files[0]);
|
55522
55189
|
}
|
55523
55190
|
function matchBuild(name2) {
|
55524
55191
|
return /\.node$/.test(name2);
|
@@ -64180,7 +63847,9 @@ function drizzle6(client, config = {}) {
|
|
64180
63847
|
};
|
64181
63848
|
}
|
64182
63849
|
const session = new LibSQLSession(client, dialect7, schema4, { logger: logger2 }, void 0);
|
64183
|
-
|
63850
|
+
const db2 = new LibSQLDatabase("async", dialect7, session, schema4);
|
63851
|
+
db2.$client = client;
|
63852
|
+
return db2;
|
64184
63853
|
}
|
64185
63854
|
var _a251, _b182, LibSQLDatabase;
|
64186
63855
|
var init_driver6 = __esm({
|
@@ -78793,12 +78462,12 @@ var require_query4 = __commonJS({
|
|
78793
78462
|
this._fields.push([]);
|
78794
78463
|
return this.readField;
|
78795
78464
|
}
|
78796
|
-
_streamLocalInfile(connection2,
|
78465
|
+
_streamLocalInfile(connection2, path2) {
|
78797
78466
|
if (this._streamFactory) {
|
78798
|
-
this._localStream = this._streamFactory(
|
78467
|
+
this._localStream = this._streamFactory(path2);
|
78799
78468
|
} else {
|
78800
78469
|
this._localStreamError = new Error(
|
78801
|
-
`As a result of LOCAL INFILE command server wants to read ${
|
78470
|
+
`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.`
|
78802
78471
|
);
|
78803
78472
|
connection2.writePacket(EmptyPacket);
|
78804
78473
|
return this.infileOk;
|
@@ -85654,6 +85323,7 @@ var init_db3 = __esm({
|
|
85654
85323
|
"use strict";
|
85655
85324
|
init_entity();
|
85656
85325
|
init_selection_proxy();
|
85326
|
+
init_sql();
|
85657
85327
|
init_subquery();
|
85658
85328
|
init_count3();
|
85659
85329
|
init_query_builders3();
|
@@ -85864,7 +85534,7 @@ var init_db3 = __esm({
|
|
85864
85534
|
return new MySqlDeleteBase(table4, this.session, this.dialect);
|
85865
85535
|
}
|
85866
85536
|
execute(query) {
|
85867
|
-
return this.session.execute(query.getSQL());
|
85537
|
+
return this.session.execute(typeof query === "string" ? sql.raw(query) : query.getSQL());
|
85868
85538
|
}
|
85869
85539
|
transaction(transaction, config) {
|
85870
85540
|
return this.session.transaction(transaction, config);
|
@@ -86190,9 +85860,7 @@ function drizzle7(client, config = {}) {
|
|
86190
85860
|
} else if (config.logger !== false) {
|
86191
85861
|
logger2 = config.logger;
|
86192
85862
|
}
|
86193
|
-
|
86194
|
-
client = client.promise();
|
86195
|
-
}
|
85863
|
+
const clientForInstance = isCallbackClient(client) ? client.promise() : client;
|
86196
85864
|
let schema4;
|
86197
85865
|
if (config.schema) {
|
86198
85866
|
if (config.mode === void 0) {
|
@@ -86211,9 +85879,11 @@ function drizzle7(client, config = {}) {
|
|
86211
85879
|
};
|
86212
85880
|
}
|
86213
85881
|
const mode = config.mode ?? "default";
|
86214
|
-
const driver2 = new MySql2Driver(
|
85882
|
+
const driver2 = new MySql2Driver(clientForInstance, dialect7, { logger: logger2 });
|
86215
85883
|
const session = driver2.createSession(schema4, mode);
|
86216
|
-
|
85884
|
+
const db2 = new MySql2Database(dialect7, session, schema4, mode);
|
85885
|
+
db2.$client = client;
|
85886
|
+
return db2;
|
86217
85887
|
}
|
86218
85888
|
function isCallbackClient(client) {
|
86219
85889
|
return typeof client.promise === "function";
|
@@ -91782,11 +91452,13 @@ function drizzle8(client, config = {}) {
|
|
91782
91452
|
}
|
91783
91453
|
const driver2 = new NeonHttpDriver(client, dialect7, { logger: logger2 });
|
91784
91454
|
const session = driver2.createSession(schema4);
|
91785
|
-
|
91455
|
+
const db2 = new NeonHttpDatabase(
|
91786
91456
|
dialect7,
|
91787
91457
|
session,
|
91788
91458
|
schema4
|
91789
91459
|
);
|
91460
|
+
db2.$client = client;
|
91461
|
+
return db2;
|
91790
91462
|
}
|
91791
91463
|
var _a288, NeonHttpDriver, _a289, _b204, NeonHttpDatabase;
|
91792
91464
|
var init_driver8 = __esm({
|
@@ -92000,7 +91672,9 @@ function drizzle9(client, config = {}) {
|
|
92000
91672
|
}
|
92001
91673
|
const driver2 = new NeonDriver(client, dialect7, { logger: logger2 });
|
92002
91674
|
const session = driver2.createSession(schema4);
|
92003
|
-
|
91675
|
+
const db2 = new NeonDatabase(dialect7, session, schema4);
|
91676
|
+
db2.$client = client;
|
91677
|
+
return db2;
|
92004
91678
|
}
|
92005
91679
|
var _a293, NeonDriver, _a294, _b208, NeonDatabase;
|
92006
91680
|
var init_driver9 = __esm({
|
@@ -92630,7 +92304,9 @@ Please make the necessary changes now to prevent any runtime errors in the futur
|
|
92630
92304
|
};
|
92631
92305
|
}
|
92632
92306
|
const session = new PlanetscaleSession(client, dialect7, void 0, schema4, { logger: logger2 });
|
92633
|
-
|
92307
|
+
const db2 = new PlanetScaleDatabase(dialect7, session, schema4, "planetscale");
|
92308
|
+
db2.$client = client;
|
92309
|
+
return db2;
|
92634
92310
|
}
|
92635
92311
|
var _a298, _b212, PlanetScaleDatabase;
|
92636
92312
|
var init_driver10 = __esm({
|
@@ -94212,13 +93888,13 @@ function Subscribe(postgres2, options) {
|
|
94212
93888
|
}
|
94213
93889
|
}
|
94214
93890
|
function handle(a7, b8) {
|
94215
|
-
const
|
93891
|
+
const path2 = b8.relation.schema + "." + b8.relation.table;
|
94216
93892
|
call("*", a7, b8);
|
94217
|
-
call("*:" +
|
94218
|
-
b8.relation.keys.length && call("*:" +
|
93893
|
+
call("*:" + path2, a7, b8);
|
93894
|
+
b8.relation.keys.length && call("*:" + path2 + "=" + b8.relation.keys.map((x6) => a7[x6.name]), a7, b8);
|
94219
93895
|
call(b8.command, a7, b8);
|
94220
|
-
call(b8.command + ":" +
|
94221
|
-
b8.relation.keys.length && call(b8.command + ":" +
|
93896
|
+
call(b8.command + ":" + path2, a7, b8);
|
93897
|
+
b8.relation.keys.length && call(b8.command + ":" + path2 + "=" + b8.relation.keys.map((x6) => a7[x6.name]), a7, b8);
|
94222
93898
|
}
|
94223
93899
|
function pong() {
|
94224
93900
|
const x6 = Buffer.alloc(34);
|
@@ -94331,8 +94007,8 @@ function parseEvent(x5) {
|
|
94331
94007
|
const xs2 = x5.match(/^(\*|insert|update|delete)?:?([^.]+?\.?[^=]+)?=?(.+)?/i) || [];
|
94332
94008
|
if (!xs2)
|
94333
94009
|
throw new Error("Malformed subscribe pattern: " + x5);
|
94334
|
-
const [, command,
|
94335
|
-
return (command || "*") + (
|
94010
|
+
const [, command, path2, key] = xs2;
|
94011
|
+
return (command || "*") + (path2 ? ":" + (path2.indexOf(".") === -1 ? "public." + path2 : path2) : "") + (key ? "=" + key : "");
|
94336
94012
|
}
|
94337
94013
|
var noop2;
|
94338
94014
|
var init_subscribe = __esm({
|
@@ -94476,10 +94152,10 @@ function Postgres(a7, b8) {
|
|
94476
94152
|
});
|
94477
94153
|
return query;
|
94478
94154
|
}
|
94479
|
-
function file(
|
94155
|
+
function file(path2, args = [], options2 = {}) {
|
94480
94156
|
arguments.length === 2 && !Array.isArray(args) && (options2 = args, args = []);
|
94481
94157
|
const query = new Query([], args, (query2) => {
|
94482
|
-
fs2.readFile(
|
94158
|
+
fs2.readFile(path2, "utf8", (err, string2) => {
|
94483
94159
|
if (err)
|
94484
94160
|
return query2.reject(err);
|
94485
94161
|
query2.strings = [string2];
|
@@ -95003,7 +94679,9 @@ function drizzle11(client, config = {}) {
|
|
95003
94679
|
};
|
95004
94680
|
}
|
95005
94681
|
const session = new PostgresJsSession(client, dialect7, schema4, { logger: logger2 });
|
95006
|
-
|
94682
|
+
const db2 = new PostgresJsDatabase(dialect7, session, schema4);
|
94683
|
+
db2.$client = client;
|
94684
|
+
return db2;
|
95007
94685
|
}
|
95008
94686
|
var _a302, _b216, PostgresJsDatabase;
|
95009
94687
|
var init_driver11 = __esm({
|
@@ -95573,7 +95251,9 @@ function drizzle12(client, config = {}) {
|
|
95573
95251
|
};
|
95574
95252
|
}
|
95575
95253
|
const session = new TiDBServerlessSession(client, dialect7, void 0, schema4, { logger: logger2 });
|
95576
|
-
|
95254
|
+
const db2 = new TiDBServerlessDatabase(dialect7, session, schema4, "default");
|
95255
|
+
db2.$client = client;
|
95256
|
+
return db2;
|
95577
95257
|
}
|
95578
95258
|
var _a306, _b220, TiDBServerlessDatabase;
|
95579
95259
|
var init_driver12 = __esm({
|
@@ -104765,7 +104445,9 @@ function drizzle13(client, config = {}) {
|
|
104765
104445
|
}
|
104766
104446
|
const driver2 = new VercelPgDriver(client, dialect7, { logger: logger2 });
|
104767
104447
|
const session = driver2.createSession(schema4);
|
104768
|
-
|
104448
|
+
const db2 = new VercelPgDatabase(dialect7, session, schema4);
|
104449
|
+
db2.$client = client;
|
104450
|
+
return db2;
|
104769
104451
|
}
|
104770
104452
|
var _a310, VercelPgDriver, _a311, _b224, VercelPgDatabase;
|
104771
104453
|
var init_driver13 = __esm({
|
@@ -104825,132 +104507,219 @@ var init_vercel_postgres = __esm({
|
|
104825
104507
|
function assertUnreachable2(_3) {
|
104826
104508
|
throw new Error("Didn't expect to get here");
|
104827
104509
|
}
|
104828
|
-
async function drizzle14(client, params) {
|
104829
|
-
const { connection: connection2, ws: ws3, ...drizzleConfig } = params;
|
104510
|
+
async function drizzle14(client, ...params) {
|
104830
104511
|
switch (client) {
|
104831
104512
|
case "node-postgres": {
|
104832
|
-
const
|
104513
|
+
const defpg = await Promise.resolve().then(() => __toESM(require_lib3(), 1)).catch(() => importError("pg"));
|
104833
104514
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_node_postgres(), node_postgres_exports));
|
104834
|
-
|
104835
|
-
|
104836
|
-
|
104515
|
+
if (typeof params[0] === "object") {
|
104516
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104517
|
+
const instance2 = typeof connection2 === "string" ? new defpg.default.Pool({
|
104518
|
+
connectionString: connection2
|
104519
|
+
}) : new defpg.default.Pool(connection2);
|
104520
|
+
const db22 = drizzle22(instance2, drizzleConfig);
|
104521
|
+
return db22;
|
104522
|
+
}
|
104523
|
+
const instance = typeof params[0] === "string" ? new defpg.default.Pool({
|
104524
|
+
connectionString: params[0]
|
104525
|
+
}) : new defpg.default.Pool(params[0]);
|
104526
|
+
const db2 = drizzle22(instance);
|
104837
104527
|
return db2;
|
104838
104528
|
}
|
104839
104529
|
case "aws-data-api-pg": {
|
104530
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104531
|
+
const { resourceArn, database, secretArn, ...rdsConfig } = connection2;
|
104840
104532
|
const { RDSDataClient: RDSDataClient2 } = await Promise.resolve().then(() => (init_dist_es54(), dist_es_exports14)).catch(
|
104841
104533
|
() => importError("@aws-sdk/client-rds-data")
|
104842
104534
|
);
|
104843
104535
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_pg(), pg_exports));
|
104844
|
-
const instance = new RDSDataClient2(
|
104845
|
-
const db2 = drizzle22(instance, drizzleConfig);
|
104846
|
-
db2.$client = instance;
|
104536
|
+
const instance = new RDSDataClient2(rdsConfig);
|
104537
|
+
const db2 = drizzle22(instance, { resourceArn, database, secretArn, ...drizzleConfig });
|
104847
104538
|
return db2;
|
104848
104539
|
}
|
104849
104540
|
case "better-sqlite3": {
|
104850
104541
|
const { default: Client4 } = await Promise.resolve().then(() => __toESM(require_lib4(), 1)).catch(() => importError("better-sqlite3"));
|
104851
104542
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_better_sqlite3(), better_sqlite3_exports));
|
104852
|
-
if (typeof
|
104853
|
-
const {
|
104854
|
-
|
104543
|
+
if (typeof params[0] === "object") {
|
104544
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104545
|
+
if (typeof connection2 === "object") {
|
104546
|
+
const { source, ...options } = connection2;
|
104547
|
+
const instance3 = new Client4(source, options);
|
104548
|
+
const db3 = drizzle22(instance3, drizzleConfig);
|
104549
|
+
return db3;
|
104550
|
+
}
|
104551
|
+
const instance2 = new Client4(connection2);
|
104855
104552
|
const db22 = drizzle22(instance2, drizzleConfig);
|
104856
|
-
db22.$client = instance2;
|
104857
104553
|
return db22;
|
104858
104554
|
}
|
104859
|
-
const instance = new Client4(
|
104860
|
-
const db2 = drizzle22(instance
|
104861
|
-
db2.$client = instance;
|
104555
|
+
const instance = new Client4(params[0]);
|
104556
|
+
const db2 = drizzle22(instance);
|
104862
104557
|
return db2;
|
104863
104558
|
}
|
104864
104559
|
case "bun:sqlite": {
|
104865
|
-
const { Database: Client4 } = await import("bun:sqlite").catch(() =>
|
104560
|
+
const { Database: Client4 } = await import("bun:sqlite").catch(() => {
|
104561
|
+
throw new Error(`Please use bun to use 'bun:sqlite' for Drizzle ORM to connect to database`);
|
104562
|
+
});
|
104866
104563
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_bun_sqlite(), bun_sqlite_exports));
|
104867
|
-
if (typeof
|
104868
|
-
const {
|
104869
|
-
|
104564
|
+
if (typeof params[0] === "object") {
|
104565
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104566
|
+
if (typeof connection2 === "object") {
|
104567
|
+
const { source, ...opts } = connection2;
|
104568
|
+
const options = Object.values(opts).filter((v8) => v8 !== void 0).length ? opts : void 0;
|
104569
|
+
const instance3 = new Client4(source, options);
|
104570
|
+
const db3 = drizzle22(instance3, drizzleConfig);
|
104571
|
+
return db3;
|
104572
|
+
}
|
104573
|
+
const instance2 = new Client4(connection2);
|
104870
104574
|
const db22 = drizzle22(instance2, drizzleConfig);
|
104871
|
-
db22.$client = instance2;
|
104872
104575
|
return db22;
|
104873
104576
|
}
|
104874
|
-
const instance = new Client4(
|
104875
|
-
const db2 = drizzle22(instance
|
104876
|
-
db2.$client = instance;
|
104577
|
+
const instance = new Client4(params[0]);
|
104578
|
+
const db2 = drizzle22(instance);
|
104877
104579
|
return db2;
|
104878
104580
|
}
|
104879
104581
|
case "d1": {
|
104582
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104880
104583
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_d1(), d1_exports));
|
104881
104584
|
const db2 = drizzle22(connection2, drizzleConfig);
|
104882
|
-
db2.$client = connection2;
|
104883
104585
|
return db2;
|
104884
104586
|
}
|
104885
|
-
case "libsql":
|
104587
|
+
case "libsql":
|
104588
|
+
case "turso": {
|
104886
104589
|
const { createClient: createClient3 } = await Promise.resolve().then(() => (init_node3(), node_exports)).catch(() => importError("@libsql/client"));
|
104887
104590
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_libsql(), libsql_exports));
|
104888
|
-
|
104591
|
+
if (typeof params[0] === "string") {
|
104592
|
+
const instance2 = createClient3({
|
104593
|
+
url: params[0]
|
104594
|
+
});
|
104595
|
+
const db22 = drizzle22(instance2);
|
104596
|
+
return db22;
|
104597
|
+
}
|
104598
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104599
|
+
const instance = typeof connection2 === "string" ? createClient3({ url: connection2 }) : createClient3(connection2);
|
104889
104600
|
const db2 = drizzle22(instance, drizzleConfig);
|
104890
|
-
db2.$client = instance;
|
104891
104601
|
return db2;
|
104892
104602
|
}
|
104893
104603
|
case "mysql2": {
|
104894
|
-
const { createPool: createPool2 } = await Promise.resolve().then(() => __toESM(require_promise(), 1)).catch(() => importError("mysql2
|
104895
|
-
const instance = createPool2(connection2);
|
104604
|
+
const { createPool: createPool2 } = await Promise.resolve().then(() => __toESM(require_promise(), 1)).catch(() => importError("mysql2"));
|
104896
104605
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_mysql2(), mysql2_exports));
|
104897
|
-
|
104898
|
-
|
104606
|
+
if (typeof params[0] === "object") {
|
104607
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104608
|
+
const instance2 = createPool2(connection2);
|
104609
|
+
const db22 = drizzle22(instance2, drizzleConfig);
|
104610
|
+
return db22;
|
104611
|
+
}
|
104612
|
+
const connectionString = params[0];
|
104613
|
+
const instance = createPool2(connectionString);
|
104614
|
+
const db2 = drizzle22(instance);
|
104899
104615
|
return db2;
|
104900
104616
|
}
|
104901
104617
|
case "neon-http": {
|
104902
104618
|
const { neon } = await Promise.resolve().then(() => (init_serverless(), serverless_exports)).catch(() => importError("@neondatabase/serverless"));
|
104903
|
-
const { connectionString, options } = connection2;
|
104904
104619
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_neon_http(), neon_http_exports));
|
104905
|
-
|
104906
|
-
|
104907
|
-
|
104620
|
+
if (typeof params[0] === "object") {
|
104621
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104622
|
+
if (typeof connection2 === "object") {
|
104623
|
+
const { connectionString, ...options } = connection2;
|
104624
|
+
const instance3 = neon(connectionString, options);
|
104625
|
+
const db3 = drizzle22(instance3, drizzleConfig);
|
104626
|
+
return db3;
|
104627
|
+
}
|
104628
|
+
const instance2 = neon(connection2);
|
104629
|
+
const db22 = drizzle22(instance2, drizzleConfig);
|
104630
|
+
return db22;
|
104631
|
+
}
|
104632
|
+
const instance = neon(params[0]);
|
104633
|
+
const db2 = drizzle22(instance);
|
104908
104634
|
return db2;
|
104909
104635
|
}
|
104910
|
-
case "neon-
|
104636
|
+
case "neon-websocket": {
|
104911
104637
|
const { Pool: Pool2, neonConfig } = await Promise.resolve().then(() => (init_serverless(), serverless_exports)).catch(
|
104912
104638
|
() => importError("@neondatabase/serverless")
|
104913
104639
|
);
|
104914
104640
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_neon_serverless(), neon_serverless_exports));
|
104915
|
-
|
104916
|
-
|
104917
|
-
|
104641
|
+
if (typeof params[0] === "string") {
|
104642
|
+
const instance2 = new Pool2({
|
104643
|
+
connectionString: params[0]
|
104644
|
+
});
|
104645
|
+
const db22 = drizzle22(instance2);
|
104646
|
+
return db22;
|
104918
104647
|
}
|
104919
|
-
|
104920
|
-
|
104648
|
+
if (typeof params[0] === "object") {
|
104649
|
+
const { connection: connection2, ws: ws3, ...drizzleConfig } = params[0];
|
104650
|
+
if (ws3) {
|
104651
|
+
neonConfig.webSocketConstructor = ws3;
|
104652
|
+
}
|
104653
|
+
const instance2 = typeof connection2 === "string" ? new Pool2({
|
104654
|
+
connectionString: connection2
|
104655
|
+
}) : new Pool2(connection2);
|
104656
|
+
const db22 = drizzle22(instance2, drizzleConfig);
|
104657
|
+
return db22;
|
104658
|
+
}
|
104659
|
+
const instance = new Pool2();
|
104660
|
+
const db2 = drizzle22(instance);
|
104921
104661
|
return db2;
|
104922
104662
|
}
|
104923
104663
|
case "planetscale": {
|
104924
104664
|
const { Client: Client4 } = await Promise.resolve().then(() => (init_dist(), dist_exports)).catch(() => importError("@planetscale/database"));
|
104925
104665
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_planetscale_serverless(), planetscale_serverless_exports));
|
104926
|
-
|
104927
|
-
connection2
|
104928
|
-
|
104929
|
-
|
104930
|
-
|
104666
|
+
if (typeof params[0] === "object") {
|
104667
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104668
|
+
const instance2 = typeof connection2 === "string" ? new Client4({
|
104669
|
+
url: connection2
|
104670
|
+
}) : new Client4(
|
104671
|
+
connection2
|
104672
|
+
);
|
104673
|
+
const db22 = drizzle22(instance2, drizzleConfig);
|
104674
|
+
return db22;
|
104675
|
+
}
|
104676
|
+
const instance = new Client4({
|
104677
|
+
url: params[0]
|
104678
|
+
});
|
104679
|
+
const db2 = drizzle22(instance);
|
104931
104680
|
return db2;
|
104932
104681
|
}
|
104933
104682
|
case "postgres-js": {
|
104934
104683
|
const { default: client2 } = await Promise.resolve().then(() => (init_src(), src_exports)).catch(() => importError("postgres"));
|
104935
104684
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_postgres_js(), postgres_js_exports));
|
104936
|
-
|
104937
|
-
|
104938
|
-
|
104685
|
+
if (typeof params[0] === "object") {
|
104686
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104687
|
+
if (typeof connection2 === "object" && connection2.url !== void 0) {
|
104688
|
+
const { url, ...config } = connection2;
|
104689
|
+
const instance3 = client2(url, config);
|
104690
|
+
const db3 = drizzle22(instance3, drizzleConfig);
|
104691
|
+
return db3;
|
104692
|
+
}
|
104693
|
+
const instance2 = client2(connection2);
|
104694
|
+
const db22 = drizzle22(instance2, drizzleConfig);
|
104695
|
+
return db22;
|
104696
|
+
}
|
104697
|
+
const instance = client2(params[0]);
|
104698
|
+
const db2 = drizzle22(instance);
|
104939
104699
|
return db2;
|
104940
104700
|
}
|
104941
104701
|
case "tidb-serverless": {
|
104942
104702
|
const { connect: connect3 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2)).catch(() => importError("@tidbcloud/serverless"));
|
104943
104703
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_tidb_serverless(), tidb_serverless_exports));
|
104944
|
-
|
104704
|
+
if (typeof params[0] === "string") {
|
104705
|
+
const instance2 = connect3({
|
104706
|
+
url: params[0]
|
104707
|
+
});
|
104708
|
+
const db22 = drizzle22(instance2);
|
104709
|
+
return db22;
|
104710
|
+
}
|
104711
|
+
const { connection: connection2, ...drizzleConfig } = params[0];
|
104712
|
+
const instance = typeof connection2 === "string" ? connect3({
|
104713
|
+
url: connection2
|
104714
|
+
}) : connect3(connection2);
|
104945
104715
|
const db2 = drizzle22(instance, drizzleConfig);
|
104946
|
-
db2.$client = instance;
|
104947
104716
|
return db2;
|
104948
104717
|
}
|
104949
104718
|
case "vercel-postgres": {
|
104719
|
+
const drizzleConfig = params[0];
|
104950
104720
|
const { sql: sql3 } = await Promise.resolve().then(() => (init_index_node(), index_node_exports)).catch(() => importError("@vercel/postgres"));
|
104951
104721
|
const { drizzle: drizzle22 } = await Promise.resolve().then(() => (init_vercel_postgres(), vercel_postgres_exports));
|
104952
104722
|
const db2 = drizzle22(sql3, drizzleConfig);
|
104953
|
-
db2.$client = sql3;
|
104954
104723
|
return db2;
|
104955
104724
|
}
|
104956
104725
|
}
|
@@ -104971,19 +104740,8 @@ var init_monodriver = __esm({
|
|
104971
104740
|
// ../drizzle-orm/dist/migrator.js
|
104972
104741
|
import crypto4 from "crypto";
|
104973
104742
|
import fs4 from "fs";
|
104974
|
-
import path2 from "path";
|
104975
104743
|
function readMigrationFiles(config) {
|
104976
|
-
|
104977
|
-
if (typeof config === "string") {
|
104978
|
-
const configAsString = fs4.readFileSync(path2.resolve(".", config), "utf8");
|
104979
|
-
const jsonConfig = JSON.parse(configAsString);
|
104980
|
-
migrationFolderTo = jsonConfig.out;
|
104981
|
-
} else {
|
104982
|
-
migrationFolderTo = config.migrationsFolder;
|
104983
|
-
}
|
104984
|
-
if (!migrationFolderTo) {
|
104985
|
-
throw new Error("no migration folder defined");
|
104986
|
-
}
|
104744
|
+
const migrationFolderTo = config.migrationsFolder;
|
104987
104745
|
const migrationQueries = [];
|
104988
104746
|
const journalPath = `${migrationFolderTo}/meta/_journal.json`;
|
104989
104747
|
if (!fs4.existsSync(journalPath)) {
|
@@ -105071,7 +104829,7 @@ __export(migrator_exports4, {
|
|
105071
104829
|
});
|
105072
104830
|
async function migrate4(db2, config) {
|
105073
104831
|
const migrations = readMigrationFiles(config);
|
105074
|
-
const migrationsTable = config
|
104832
|
+
const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
|
105075
104833
|
const migrationTableCreate = sql`
|
105076
104834
|
CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (
|
105077
104835
|
id SERIAL PRIMARY KEY,
|
@@ -105116,7 +104874,7 @@ __export(migrator_exports5, {
|
|
105116
104874
|
});
|
105117
104875
|
async function migrate5(db2, config) {
|
105118
104876
|
const migrations = readMigrationFiles(config);
|
105119
|
-
const migrationsTable = config
|
104877
|
+
const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
|
105120
104878
|
const migrationTableCreate = sql`
|
105121
104879
|
CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (
|
105122
104880
|
id SERIAL PRIMARY KEY,
|
@@ -105159,10 +104917,7 @@ __export(migrator_exports6, {
|
|
105159
104917
|
});
|
105160
104918
|
async function migrate6(db2, config) {
|
105161
104919
|
const migrations = readMigrationFiles(config);
|
105162
|
-
|
105163
|
-
migrationsFolder: config
|
105164
|
-
} : config;
|
105165
|
-
await db2.dialect.migrate(migrations, db2.session, preparedConfig);
|
104920
|
+
await db2.dialect.migrate(migrations, db2.session, config);
|
105166
104921
|
}
|
105167
104922
|
var init_migrator7 = __esm({
|
105168
104923
|
"../drizzle-orm/dist/mysql2/migrator.js"() {
|
@@ -105178,8 +104933,8 @@ __export(migrator_exports7, {
|
|
105178
104933
|
});
|
105179
104934
|
async function migrate7(db2, config) {
|
105180
104935
|
const migrations = readMigrationFiles(config);
|
105181
|
-
const migrationsTable =
|
105182
|
-
const migrationsSchema =
|
104936
|
+
const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
|
104937
|
+
const migrationsSchema = config.migrationsSchema ?? "drizzle";
|
105183
104938
|
const migrationTableCreate = sql`
|
105184
104939
|
CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsSchema)}.${sql.identifier(migrationsTable)} (
|
105185
104940
|
id SERIAL PRIMARY KEY,
|
@@ -105255,10 +105010,7 @@ __export(migrator_exports10, {
|
|
105255
105010
|
});
|
105256
105011
|
async function migrate10(db2, config) {
|
105257
105012
|
const migrations = readMigrationFiles(config);
|
105258
|
-
|
105259
|
-
migrationsFolder: config
|
105260
|
-
} : config;
|
105261
|
-
await db2.dialect.migrate(migrations, db2.session, preparedConfig);
|
105013
|
+
await db2.dialect.migrate(migrations, db2.session, config);
|
105262
105014
|
}
|
105263
105015
|
var init_migrator11 = __esm({
|
105264
105016
|
"../drizzle-orm/dist/planetscale-serverless/migrator.js"() {
|
@@ -105585,7 +105337,6 @@ var init_pgSerializer = __esm({
|
|
105585
105337
|
const sequencesToReturn = {};
|
105586
105338
|
const indexesInSchema = {};
|
105587
105339
|
for (const table4 of tables) {
|
105588
|
-
const checksInTable = {};
|
105589
105340
|
const {
|
105590
105341
|
name: tableName,
|
105591
105342
|
columns,
|
@@ -105601,7 +105352,6 @@ var init_pgSerializer = __esm({
|
|
105601
105352
|
}
|
105602
105353
|
const columnsObject = {};
|
105603
105354
|
const indexesObject = {};
|
105604
|
-
const checksObject = {};
|
105605
105355
|
const foreignKeysObject = {};
|
105606
105356
|
const primaryKeysObject = {};
|
105607
105357
|
const uniqueConstraintObject = {};
|
@@ -105848,33 +105598,6 @@ ${withStyle.errorWarning(
|
|
105848
105598
|
with: value.config.with ?? {}
|
105849
105599
|
};
|
105850
105600
|
});
|
105851
|
-
checks.forEach((check) => {
|
105852
|
-
const checkName = check.name;
|
105853
|
-
if (typeof checksInTable[`"${schema4 ?? "public"}"."${tableName}"`] !== "undefined") {
|
105854
|
-
if (checksInTable[`"${schema4 ?? "public"}"."${tableName}"`].includes(check.name)) {
|
105855
|
-
console.log(
|
105856
|
-
`
|
105857
|
-
${withStyle.errorWarning(
|
105858
|
-
`We've found duplicated check constraint name across ${source_default.underline.blue(
|
105859
|
-
schema4 ?? "public"
|
105860
|
-
)} schema in ${source_default.underline.blue(
|
105861
|
-
tableName
|
105862
|
-
)}. Please rename your check constraint in either the ${source_default.underline.blue(
|
105863
|
-
tableName
|
105864
|
-
)} table or the table with the duplicated check contraint name`
|
105865
|
-
)}`
|
105866
|
-
);
|
105867
|
-
process.exit(1);
|
105868
|
-
}
|
105869
|
-
checksInTable[`"${schema4 ?? "public"}"."${tableName}"`].push(checkName);
|
105870
|
-
} else {
|
105871
|
-
checksInTable[`"${schema4 ?? "public"}"."${tableName}"`] = [check.name];
|
105872
|
-
}
|
105873
|
-
checksObject[checkName] = {
|
105874
|
-
name: checkName,
|
105875
|
-
value: dialect4.sqlToQuery(check.value).sql
|
105876
|
-
};
|
105877
|
-
});
|
105878
105601
|
const tableKey2 = `${schema4 ?? "public"}.${tableName}`;
|
105879
105602
|
result[tableKey2] = {
|
105880
105603
|
name: tableName,
|
@@ -105883,8 +105606,7 @@ ${withStyle.errorWarning(
|
|
105883
105606
|
indexes: indexesObject,
|
105884
105607
|
foreignKeys: foreignKeysObject,
|
105885
105608
|
compositePrimaryKeys: primaryKeysObject,
|
105886
|
-
uniqueConstraints: uniqueConstraintObject
|
105887
|
-
checkConstraints: checksObject
|
105609
|
+
uniqueConstraints: uniqueConstraintObject
|
105888
105610
|
};
|
105889
105611
|
}
|
105890
105612
|
for (const sequence of sequences) {
|
@@ -105973,7 +105695,6 @@ ${withStyle.errorWarning(
|
|
105973
105695
|
let indexesCount = 0;
|
105974
105696
|
let foreignKeysCount = 0;
|
105975
105697
|
let tableCount = 0;
|
105976
|
-
let checksCount = 0;
|
105977
105698
|
const sequencesToReturn = {};
|
105978
105699
|
const seqWhere = schemaFilters.map((t5) => `schemaname = '${t5}'`).join(" or ");
|
105979
105700
|
const allSequences = await db2.query(
|
@@ -106043,8 +105764,7 @@ ${withStyle.errorWarning(
|
|
106043
105764
|
const indexToReturn = {};
|
106044
105765
|
const foreignKeysToReturn = {};
|
106045
105766
|
const primaryKeys = {};
|
106046
|
-
const
|
106047
|
-
const checkConstraints = {};
|
105767
|
+
const uniqueConstrains = {};
|
106048
105768
|
const tableResponse = await db2.query(
|
106049
105769
|
`SELECT a.attrelid::regclass::text, a.attname, is_nullable, a.attndims as array_dimensions
|
106050
105770
|
, CASE WHEN a.atttypid = ANY ('{int,int8,int2}'::regtype[])
|
@@ -106082,97 +105802,55 @@ ${withStyle.errorWarning(
|
|
106082
105802
|
ORDER BY a.attnum;`
|
106083
105803
|
);
|
106084
105804
|
const tableConstraints = await db2.query(
|
106085
|
-
`SELECT c.column_name,
|
106086
|
-
|
106087
|
-
|
106088
|
-
|
106089
|
-
|
106090
|
-
|
106091
|
-
FROM information_schema.table_constraints tc
|
106092
|
-
JOIN information_schema.constraint_column_usage AS ccu
|
106093
|
-
USING (constraint_schema, constraint_name)
|
106094
|
-
JOIN information_schema.columns AS c
|
106095
|
-
ON c.table_schema = tc.constraint_schema
|
106096
|
-
AND tc.table_name = c.table_name
|
106097
|
-
AND ccu.column_name = c.column_name
|
106098
|
-
JOIN pg_constraint con
|
106099
|
-
ON con.conname = tc.constraint_name
|
106100
|
-
AND con.conrelid = (
|
106101
|
-
SELECT oid
|
106102
|
-
FROM pg_class
|
106103
|
-
WHERE relname = tc.table_name
|
106104
|
-
AND relnamespace = (
|
106105
|
-
SELECT oid
|
106106
|
-
FROM pg_namespace
|
106107
|
-
WHERE nspname = tc.constraint_schema
|
106108
|
-
)
|
106109
|
-
)
|
106110
|
-
WHERE tc.table_name = '${tableName}' AND tc.constraint_schema = '${tableSchema}';`
|
105805
|
+
`SELECT c.column_name, c.data_type, constraint_type, constraint_name, constraint_schema
|
105806
|
+
FROM information_schema.table_constraints tc
|
105807
|
+
JOIN information_schema.constraint_column_usage AS ccu USING (constraint_schema, constraint_name)
|
105808
|
+
JOIN information_schema.columns AS c ON c.table_schema = tc.constraint_schema
|
105809
|
+
AND tc.table_name = c.table_name AND ccu.column_name = c.column_name
|
105810
|
+
WHERE tc.table_name = '${tableName}' and constraint_schema = '${tableSchema}';`
|
106111
105811
|
);
|
106112
|
-
const tableChecks = await db2.query(`SELECT
|
106113
|
-
tc.constraint_name,
|
106114
|
-
tc.constraint_type,
|
106115
|
-
pg_get_constraintdef(con.oid) AS constraint_definition
|
106116
|
-
FROM
|
106117
|
-
information_schema.table_constraints AS tc
|
106118
|
-
JOIN pg_constraint AS con
|
106119
|
-
ON tc.constraint_name = con.conname
|
106120
|
-
AND con.conrelid = (
|
106121
|
-
SELECT oid
|
106122
|
-
FROM pg_class
|
106123
|
-
WHERE relname = tc.table_name
|
106124
|
-
AND relnamespace = (
|
106125
|
-
SELECT oid
|
106126
|
-
FROM pg_namespace
|
106127
|
-
WHERE nspname = tc.constraint_schema
|
106128
|
-
)
|
106129
|
-
)
|
106130
|
-
WHERE
|
106131
|
-
tc.table_name = '${tableName}'
|
106132
|
-
AND tc.constraint_schema = '${tableSchema}'
|
106133
|
-
AND tc.constraint_type = 'CHECK';`);
|
106134
105812
|
columnsCount += tableResponse.length;
|
106135
105813
|
if (progressCallback) {
|
106136
105814
|
progressCallback("columns", columnsCount, "fetching");
|
106137
105815
|
}
|
106138
105816
|
const tableForeignKeys = await db2.query(
|
106139
105817
|
`SELECT
|
106140
|
-
|
106141
|
-
|
106142
|
-
|
106143
|
-
|
106144
|
-
|
106145
|
-
|
106146
|
-
|
106147
|
-
|
106148
|
-
|
106149
|
-
|
106150
|
-
|
106151
|
-
|
106152
|
-
|
106153
|
-
|
106154
|
-
|
106155
|
-
|
106156
|
-
|
106157
|
-
|
106158
|
-
|
106159
|
-
|
106160
|
-
|
106161
|
-
|
106162
|
-
|
106163
|
-
|
106164
|
-
|
106165
|
-
|
106166
|
-
|
106167
|
-
|
106168
|
-
|
106169
|
-
|
106170
|
-
|
106171
|
-
|
106172
|
-
|
106173
|
-
|
106174
|
-
|
106175
|
-
|
105818
|
+
con.contype AS constraint_type,
|
105819
|
+
nsp.nspname AS constraint_schema,
|
105820
|
+
con.conname AS constraint_name,
|
105821
|
+
rel.relname AS table_name,
|
105822
|
+
att.attname AS column_name,
|
105823
|
+
fnsp.nspname AS foreign_table_schema,
|
105824
|
+
frel.relname AS foreign_table_name,
|
105825
|
+
fatt.attname AS foreign_column_name,
|
105826
|
+
CASE con.confupdtype
|
105827
|
+
WHEN 'a' THEN 'NO ACTION'
|
105828
|
+
WHEN 'r' THEN 'RESTRICT'
|
105829
|
+
WHEN 'n' THEN 'SET NULL'
|
105830
|
+
WHEN 'c' THEN 'CASCADE'
|
105831
|
+
WHEN 'd' THEN 'SET DEFAULT'
|
105832
|
+
END AS update_rule,
|
105833
|
+
CASE con.confdeltype
|
105834
|
+
WHEN 'a' THEN 'NO ACTION'
|
105835
|
+
WHEN 'r' THEN 'RESTRICT'
|
105836
|
+
WHEN 'n' THEN 'SET NULL'
|
105837
|
+
WHEN 'c' THEN 'CASCADE'
|
105838
|
+
WHEN 'd' THEN 'SET DEFAULT'
|
105839
|
+
END AS delete_rule
|
105840
|
+
FROM
|
105841
|
+
pg_catalog.pg_constraint con
|
105842
|
+
JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelid
|
105843
|
+
JOIN pg_catalog.pg_namespace nsp ON nsp.oid = con.connamespace
|
105844
|
+
LEFT JOIN pg_catalog.pg_attribute att ON att.attnum = ANY (con.conkey)
|
105845
|
+
AND att.attrelid = con.conrelid
|
105846
|
+
LEFT JOIN pg_catalog.pg_class frel ON frel.oid = con.confrelid
|
105847
|
+
LEFT JOIN pg_catalog.pg_namespace fnsp ON fnsp.oid = frel.relnamespace
|
105848
|
+
LEFT JOIN pg_catalog.pg_attribute fatt ON fatt.attnum = ANY (con.confkey)
|
105849
|
+
AND fatt.attrelid = con.confrelid
|
105850
|
+
WHERE
|
105851
|
+
nsp.nspname = '${tableSchema}'
|
105852
|
+
AND rel.relname = '${tableName}'
|
105853
|
+
AND con.contype IN ('f');`
|
106176
105854
|
);
|
106177
105855
|
foreignKeysCount += tableForeignKeys.length;
|
106178
105856
|
if (progressCallback) {
|
@@ -106214,29 +105892,16 @@ ${withStyle.errorWarning(
|
|
106214
105892
|
for (const unqs of uniqueConstrainsRows) {
|
106215
105893
|
const columnName = unqs.column_name;
|
106216
105894
|
const constraintName = unqs.constraint_name;
|
106217
|
-
if (typeof
|
106218
|
-
|
105895
|
+
if (typeof uniqueConstrains[constraintName] !== "undefined") {
|
105896
|
+
uniqueConstrains[constraintName].columns.push(columnName);
|
106219
105897
|
} else {
|
106220
|
-
|
105898
|
+
uniqueConstrains[constraintName] = {
|
106221
105899
|
columns: [columnName],
|
106222
105900
|
nullsNotDistinct: false,
|
106223
105901
|
name: constraintName
|
106224
105902
|
};
|
106225
105903
|
}
|
106226
105904
|
}
|
106227
|
-
checksCount += tableChecks.length;
|
106228
|
-
if (progressCallback) {
|
106229
|
-
progressCallback("checks", checksCount, "fetching");
|
106230
|
-
}
|
106231
|
-
for (const checks of tableChecks) {
|
106232
|
-
let checkValue = checks.constraint_definition;
|
106233
|
-
const constraintName = checks.constraint_name;
|
106234
|
-
checkValue = checkValue.replace(/^CHECK\s*\(\(/, "").replace(/\)\)\s*$/, "");
|
106235
|
-
checkConstraints[constraintName] = {
|
106236
|
-
name: constraintName,
|
106237
|
-
value: checkValue
|
106238
|
-
};
|
106239
|
-
}
|
106240
105905
|
for (const columnResponse of tableResponse) {
|
106241
105906
|
const columnName = columnResponse.attname;
|
106242
105907
|
const columnAdditionalDT = columnResponse.additional_dt;
|
@@ -106480,8 +106145,7 @@ ${withStyle.errorWarning(
|
|
106480
106145
|
indexes: indexToReturn,
|
106481
106146
|
foreignKeys: foreignKeysToReturn,
|
106482
106147
|
compositePrimaryKeys: primaryKeys,
|
106483
|
-
uniqueConstraints
|
106484
|
-
checkConstraints
|
106148
|
+
uniqueConstraints: uniqueConstrains
|
106485
106149
|
};
|
106486
106150
|
} catch (e5) {
|
106487
106151
|
rej(e5);
|
@@ -106499,7 +106163,6 @@ ${withStyle.errorWarning(
|
|
106499
106163
|
progressCallback("columns", columnsCount, "done");
|
106500
106164
|
progressCallback("indexes", indexesCount, "done");
|
106501
106165
|
progressCallback("fks", foreignKeysCount, "done");
|
106502
|
-
progressCallback("checks", checksCount, "done");
|
106503
106166
|
}
|
106504
106167
|
const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
|
106505
106168
|
return {
|
@@ -106704,13 +106367,10 @@ var init_sqliteSerializer = __esm({
|
|
106704
106367
|
const foreignKeysObject = {};
|
106705
106368
|
const primaryKeysObject = {};
|
106706
106369
|
const uniqueConstraintObject = {};
|
106707
|
-
const checkConstraintObject = {};
|
106708
|
-
const checksInTable = {};
|
106709
106370
|
const {
|
106710
106371
|
name: tableName,
|
106711
106372
|
columns,
|
106712
106373
|
indexes,
|
106713
|
-
checks,
|
106714
106374
|
foreignKeys: tableForeignKeys,
|
106715
106375
|
primaryKeys,
|
106716
106376
|
uniqueConstraints
|
@@ -106867,39 +106527,13 @@ The unique constraint ${source_default.underline.blue(
|
|
106867
106527
|
columnsObject[it.columns[0].name].primaryKey = true;
|
106868
106528
|
}
|
106869
106529
|
});
|
106870
|
-
checks.forEach((check) => {
|
106871
|
-
const checkName = check.name;
|
106872
|
-
if (typeof checksInTable[tableName] !== "undefined") {
|
106873
|
-
if (checksInTable[tableName].includes(check.name)) {
|
106874
|
-
console.log(
|
106875
|
-
`
|
106876
|
-
${withStyle.errorWarning(
|
106877
|
-
`We've found duplicated check constraint name in ${source_default.underline.blue(
|
106878
|
-
tableName
|
106879
|
-
)}. Please rename your check constraint in the ${source_default.underline.blue(
|
106880
|
-
tableName
|
106881
|
-
)} table`
|
106882
|
-
)}`
|
106883
|
-
);
|
106884
|
-
process.exit(1);
|
106885
|
-
}
|
106886
|
-
checksInTable[tableName].push(checkName);
|
106887
|
-
} else {
|
106888
|
-
checksInTable[tableName] = [check.name];
|
106889
|
-
}
|
106890
|
-
checkConstraintObject[checkName] = {
|
106891
|
-
name: checkName,
|
106892
|
-
value: dialect5.sqlToQuery(check.value).sql
|
106893
|
-
};
|
106894
|
-
});
|
106895
106530
|
result[tableName] = {
|
106896
106531
|
name: tableName,
|
106897
106532
|
columns: columnsObject,
|
106898
106533
|
indexes: indexesObject,
|
106899
106534
|
foreignKeys: foreignKeysObject,
|
106900
106535
|
compositePrimaryKeys: primaryKeysObject,
|
106901
|
-
uniqueConstraints: uniqueConstraintObject
|
106902
|
-
checkConstraints: checkConstraintObject
|
106536
|
+
uniqueConstraints: uniqueConstraintObject
|
106903
106537
|
};
|
106904
106538
|
}
|
106905
106539
|
return {
|
@@ -106946,7 +106580,6 @@ ${withStyle.errorWarning(
|
|
106946
106580
|
let tablesCount = /* @__PURE__ */ new Set();
|
106947
106581
|
let indexesCount = 0;
|
106948
106582
|
let foreignKeysCount = 0;
|
106949
|
-
let checksCount = 0;
|
106950
106583
|
const tableToPk = {};
|
106951
106584
|
let tableToGeneratedColumnsInfo = {};
|
106952
106585
|
for (const column4 of columns) {
|
@@ -107004,8 +106637,7 @@ ${withStyle.errorWarning(
|
|
107004
106637
|
compositePrimaryKeys: {},
|
107005
106638
|
indexes: {},
|
107006
106639
|
foreignKeys: {},
|
107007
|
-
uniqueConstraints: {}
|
107008
|
-
checkConstraints: {}
|
106640
|
+
uniqueConstraints: {}
|
107009
106641
|
};
|
107010
106642
|
} else {
|
107011
106643
|
result[tableName].columns[columnName] = newColumn;
|
@@ -107119,56 +106751,6 @@ WHERE
|
|
107119
106751
|
progressCallback("indexes", indexesCount, "done");
|
107120
106752
|
progressCallback("enums", 0, "done");
|
107121
106753
|
}
|
107122
|
-
const namedCheckPattern = /CONSTRAINT\s*["']?(\w+)["']?\s*CHECK\s*\((.*?)\)/gi;
|
107123
|
-
const unnamedCheckPattern = /CHECK\s*\((.*?)\)/gi;
|
107124
|
-
let checkCounter = 0;
|
107125
|
-
const checkConstraints = {};
|
107126
|
-
const checks = await db2.query(`SELECT name as "tableName", sql as "sql"
|
107127
|
-
FROM sqlite_master
|
107128
|
-
WHERE type = 'table' AND name != 'sqlite_sequence';`);
|
107129
|
-
for (const check of checks) {
|
107130
|
-
if (!tablesFilter(check.tableName)) continue;
|
107131
|
-
const { tableName, sql: sql3 } = check;
|
107132
|
-
let namedChecks = [...sql3.matchAll(namedCheckPattern)];
|
107133
|
-
if (namedChecks.length > 0) {
|
107134
|
-
namedChecks.forEach(([_3, checkName, checkValue]) => {
|
107135
|
-
checkConstraints[checkName] = {
|
107136
|
-
name: checkName,
|
107137
|
-
value: checkValue.trim()
|
107138
|
-
};
|
107139
|
-
});
|
107140
|
-
} else {
|
107141
|
-
let unnamedChecks = [...sql3.matchAll(unnamedCheckPattern)];
|
107142
|
-
unnamedChecks.forEach(([_3, checkValue]) => {
|
107143
|
-
let checkName = `${tableName}_check_${++checkCounter}`;
|
107144
|
-
checkConstraints[checkName] = {
|
107145
|
-
name: checkName,
|
107146
|
-
value: checkValue.trim()
|
107147
|
-
};
|
107148
|
-
});
|
107149
|
-
}
|
107150
|
-
checksCount += Object.values(checkConstraints).length;
|
107151
|
-
if (progressCallback) {
|
107152
|
-
progressCallback("checks", checksCount, "fetching");
|
107153
|
-
}
|
107154
|
-
const table4 = result[tableName];
|
107155
|
-
if (!table4) {
|
107156
|
-
result[tableName] = {
|
107157
|
-
name: tableName,
|
107158
|
-
columns: {},
|
107159
|
-
compositePrimaryKeys: {},
|
107160
|
-
indexes: {},
|
107161
|
-
foreignKeys: {},
|
107162
|
-
uniqueConstraints: {},
|
107163
|
-
checkConstraints
|
107164
|
-
};
|
107165
|
-
} else {
|
107166
|
-
result[tableName].checkConstraints = checkConstraints;
|
107167
|
-
}
|
107168
|
-
}
|
107169
|
-
if (progressCallback) {
|
107170
|
-
progressCallback("checks", checksCount, "done");
|
107171
|
-
}
|
107172
106754
|
return {
|
107173
106755
|
version: "6",
|
107174
106756
|
dialect: "sqlite",
|
@@ -108610,7 +108192,6 @@ var init_mysqlSerializer = __esm({
|
|
108610
108192
|
indexes,
|
108611
108193
|
foreignKeys,
|
108612
108194
|
schema: schema4,
|
108613
|
-
checks,
|
108614
108195
|
primaryKeys,
|
108615
108196
|
uniqueConstraints
|
108616
108197
|
} = getTableConfig3(table4);
|
@@ -108619,8 +108200,6 @@ var init_mysqlSerializer = __esm({
|
|
108619
108200
|
const foreignKeysObject = {};
|
108620
108201
|
const primaryKeysObject = {};
|
108621
108202
|
const uniqueConstraintObject = {};
|
108622
|
-
const checkConstraintObject = {};
|
108623
|
-
let checksInTable = {};
|
108624
108203
|
columns.forEach((column4) => {
|
108625
108204
|
const notNull = column4.notNull;
|
108626
108205
|
const sqlTypeLowered = column4.getSQLType().toLowerCase();
|
@@ -108833,32 +108412,6 @@ We have encountered a collision between the index name on columns ${source_defau
|
|
108833
108412
|
lock: value.config.lock
|
108834
108413
|
};
|
108835
108414
|
});
|
108836
|
-
checks.forEach((check) => {
|
108837
|
-
check;
|
108838
|
-
const checkName = check.name;
|
108839
|
-
if (typeof checksInTable[tableName] !== "undefined") {
|
108840
|
-
if (checksInTable[tableName].includes(check.name)) {
|
108841
|
-
console.log(
|
108842
|
-
`
|
108843
|
-
${withStyle.errorWarning(
|
108844
|
-
`We've found duplicated check constraint name in ${source_default.underline.blue(
|
108845
|
-
tableName
|
108846
|
-
)}. Please rename your check constraint in the ${source_default.underline.blue(
|
108847
|
-
tableName
|
108848
|
-
)} table`
|
108849
|
-
)}`
|
108850
|
-
);
|
108851
|
-
process.exit(1);
|
108852
|
-
}
|
108853
|
-
checksInTable[tableName].push(checkName);
|
108854
|
-
} else {
|
108855
|
-
checksInTable[tableName] = [check.name];
|
108856
|
-
}
|
108857
|
-
checkConstraintObject[checkName] = {
|
108858
|
-
name: checkName,
|
108859
|
-
value: dialect6.sqlToQuery(check.value).sql
|
108860
|
-
};
|
108861
|
-
});
|
108862
108415
|
if (!schema4) {
|
108863
108416
|
result[tableName] = {
|
108864
108417
|
name: tableName,
|
@@ -108866,8 +108419,7 @@ ${withStyle.errorWarning(
|
|
108866
108419
|
indexes: indexesObject,
|
108867
108420
|
foreignKeys: foreignKeysObject,
|
108868
108421
|
compositePrimaryKeys: primaryKeysObject,
|
108869
|
-
uniqueConstraints: uniqueConstraintObject
|
108870
|
-
checkConstraint: checkConstraintObject
|
108422
|
+
uniqueConstraints: uniqueConstraintObject
|
108871
108423
|
};
|
108872
108424
|
}
|
108873
108425
|
}
|
@@ -108894,7 +108446,6 @@ ${withStyle.errorWarning(
|
|
108894
108446
|
let tablesCount = /* @__PURE__ */ new Set();
|
108895
108447
|
let indexesCount = 0;
|
108896
108448
|
let foreignKeysCount = 0;
|
108897
|
-
let checksCount = 0;
|
108898
108449
|
const idxs = await db2.query(
|
108899
108450
|
`select * from INFORMATION_SCHEMA.STATISTICS
|
108900
108451
|
WHERE INFORMATION_SCHEMA.STATISTICS.TABLE_SCHEMA = '${inputSchema}' and INFORMATION_SCHEMA.STATISTICS.INDEX_NAME != 'PRIMARY';`
|
@@ -108989,8 +108540,7 @@ ${withStyle.errorWarning(
|
|
108989
108540
|
compositePrimaryKeys: {},
|
108990
108541
|
indexes: {},
|
108991
108542
|
foreignKeys: {},
|
108992
|
-
uniqueConstraints: {}
|
108993
|
-
checkConstraint: {}
|
108543
|
+
uniqueConstraints: {}
|
108994
108544
|
};
|
108995
108545
|
} else {
|
108996
108546
|
result[tableName].columns[columnName] = newColumn;
|
@@ -109139,38 +108689,6 @@ ${withStyle.errorWarning(
|
|
109139
108689
|
progressCallback("indexes", indexesCount, "done");
|
109140
108690
|
progressCallback("enums", 0, "done");
|
109141
108691
|
}
|
109142
|
-
const checkConstraints = await db2.query(
|
109143
|
-
`SELECT
|
109144
|
-
tc.table_name,
|
109145
|
-
tc.constraint_name,
|
109146
|
-
cc.check_clause
|
109147
|
-
FROM
|
109148
|
-
information_schema.table_constraints tc
|
109149
|
-
JOIN
|
109150
|
-
information_schema.check_constraints cc
|
109151
|
-
ON tc.constraint_name = cc.constraint_name
|
109152
|
-
WHERE
|
109153
|
-
tc.constraint_schema = '${inputSchema}'
|
109154
|
-
AND
|
109155
|
-
tc.constraint_type = 'CHECK';`
|
109156
|
-
);
|
109157
|
-
checksCount += checkConstraints.length;
|
109158
|
-
if (progressCallback) {
|
109159
|
-
progressCallback("checks", checksCount, "fetching");
|
109160
|
-
}
|
109161
|
-
for (const checkConstraintRow of checkConstraints) {
|
109162
|
-
const constraintName = checkConstraintRow["CONSTRAINT_NAME"];
|
109163
|
-
const constraintValue = checkConstraintRow["CHECK_CLAUSE"];
|
109164
|
-
const tableName = checkConstraintRow["TABLE_NAME"];
|
109165
|
-
const tableInResult = result[tableName];
|
109166
|
-
tableInResult.checkConstraint[constraintName] = {
|
109167
|
-
name: constraintName,
|
109168
|
-
value: constraintValue
|
109169
|
-
};
|
109170
|
-
}
|
109171
|
-
if (progressCallback) {
|
109172
|
-
progressCallback("checks", checksCount, "done");
|
109173
|
-
}
|
109174
108692
|
return {
|
109175
108693
|
version: "5",
|
109176
108694
|
dialect: "mysql",
|