drizzle-kit 0.24.1-3d751e8 → 0.24.1-4045fbc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +476 -450
- package/api.mjs +476 -450
- package/bin.cjs +26 -113
- package/index.d.mts +4 -10
- package/index.d.ts +4 -10
- package/package.json +2 -2
- package/utils.js +0 -8
- package/utils.mjs +0 -7
package/bin.cjs
CHANGED
@@ -6584,7 +6584,7 @@ var init_sqliteSchema = __esm({
|
|
6584
6584
|
function isPgArrayType(sqlType) {
|
6585
6585
|
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
6586
6586
|
}
|
6587
|
-
var import_fs, import_path, import_url, copy, objectValues, assertV1OutFolder, dryJournal, prepareOutFolder, validatorForDialect, validateWithReport, prepareMigrationFolder, prepareMigrationMeta, schemaRenameKey, tableRenameKey, columnRenameKey, normaliseSQLiteUrl
|
6587
|
+
var import_fs, import_path, import_url, copy, objectValues, assertV1OutFolder, dryJournal, prepareOutFolder, validatorForDialect, validateWithReport, prepareMigrationFolder, prepareMigrationMeta, schemaRenameKey, tableRenameKey, columnRenameKey, normaliseSQLiteUrl;
|
6588
6588
|
var init_utils = __esm({
|
6589
6589
|
"src/utils.ts"() {
|
6590
6590
|
"use strict";
|
@@ -6781,12 +6781,6 @@ var init_utils = __esm({
|
|
6781
6781
|
}
|
6782
6782
|
assertUnreachable(type);
|
6783
6783
|
};
|
6784
|
-
normalisePGliteUrl = (it) => {
|
6785
|
-
if (it.startsWith("file:")) {
|
6786
|
-
return it.substring(5);
|
6787
|
-
}
|
6788
|
-
return it;
|
6789
|
-
};
|
6790
6784
|
}
|
6791
6785
|
});
|
6792
6786
|
|
@@ -11241,7 +11235,7 @@ var init_outputs = __esm({
|
|
11241
11235
|
});
|
11242
11236
|
|
11243
11237
|
// src/cli/validations/common.ts
|
11244
|
-
var assertCollisions, sqliteDriversLiterals,
|
11238
|
+
var assertCollisions, sqliteDriversLiterals, prefixes, prefix, sqliteDriver, postgresDriver, driver, configMigrations, configCommonSchema, casing, introspectParams, configIntrospectCliSchema, configGenerateSchema, configPushSchema, drivers, wrapParam;
|
11245
11239
|
var init_common = __esm({
|
11246
11240
|
"src/cli/validations/common.ts"() {
|
11247
11241
|
"use strict";
|
@@ -11271,10 +11265,6 @@ var init_common = __esm({
|
|
11271
11265
|
literalType("d1-http"),
|
11272
11266
|
literalType("expo")
|
11273
11267
|
];
|
11274
|
-
postgresqlDriversLiterals = [
|
11275
|
-
literalType("aws-data-api"),
|
11276
|
-
literalType("pglite")
|
11277
|
-
];
|
11278
11268
|
prefixes = [
|
11279
11269
|
"index",
|
11280
11270
|
"timestamp",
|
@@ -11287,7 +11277,7 @@ var init_common = __esm({
|
|
11287
11277
|
const _2 = "";
|
11288
11278
|
}
|
11289
11279
|
sqliteDriver = unionType(sqliteDriversLiterals);
|
11290
|
-
postgresDriver =
|
11280
|
+
postgresDriver = literalType("aws-data-api");
|
11291
11281
|
driver = unionType([sqliteDriver, postgresDriver]);
|
11292
11282
|
configMigrations = objectType({
|
11293
11283
|
table: stringType().optional(),
|
@@ -11343,7 +11333,7 @@ var init_common = __esm({
|
|
11343
11333
|
strict: booleanType().default(false),
|
11344
11334
|
out: stringType().optional()
|
11345
11335
|
});
|
11346
|
-
drivers = ["turso", "d1-http", "expo", "aws-data-api"
|
11336
|
+
drivers = ["turso", "d1-http", "expo", "aws-data-api"];
|
11347
11337
|
wrapParam = (name, param, optional = false, type) => {
|
11348
11338
|
const check2 = `[${source_default.green("\u2713")}]`;
|
11349
11339
|
const cross = `[${source_default.red("x")}]`;
|
@@ -11515,10 +11505,6 @@ var init_postgres = __esm({
|
|
11515
11505
|
database: stringType().min(1),
|
11516
11506
|
secretArn: stringType().min(1),
|
11517
11507
|
resourceArn: stringType().min(1)
|
11518
|
-
}),
|
11519
|
-
objectType({
|
11520
|
-
driver: literalType("pglite"),
|
11521
|
-
url: stringType().min(1)
|
11522
11508
|
})
|
11523
11509
|
]);
|
11524
11510
|
printConfigConnectionIssues2 = (options) => {
|
@@ -67562,9 +67548,9 @@ var require_dist_cjs47 = __commonJS({
|
|
67562
67548
|
}
|
67563
67549
|
});
|
67564
67550
|
|
67565
|
-
// ../node_modules/.pnpm/@aws-sdk+token-providers@3.577.0_@aws-sdk+client-sso-oidc@3.583.
|
67551
|
+
// ../node_modules/.pnpm/@aws-sdk+token-providers@3.577.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0_/node_modules/@aws-sdk/token-providers/dist-cjs/index.js
|
67566
67552
|
var require_dist_cjs48 = __commonJS({
|
67567
|
-
"../node_modules/.pnpm/@aws-sdk+token-providers@3.577.0_@aws-sdk+client-sso-oidc@3.583.
|
67553
|
+
"../node_modules/.pnpm/@aws-sdk+token-providers@3.577.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0_/node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2, module2) {
|
67568
67554
|
"use strict";
|
67569
67555
|
var __create3 = Object.create;
|
67570
67556
|
var __defProp3 = Object.defineProperty;
|
@@ -67742,9 +67728,9 @@ var require_dist_cjs48 = __commonJS({
|
|
67742
67728
|
}
|
67743
67729
|
});
|
67744
67730
|
|
67745
|
-
// ../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.583.0_@aws-sdk+client-sso-oidc@3.583.
|
67731
|
+
// ../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0_/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js
|
67746
67732
|
var require_dist_cjs49 = __commonJS({
|
67747
|
-
"../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.583.0_@aws-sdk+client-sso-oidc@3.583.
|
67733
|
+
"../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0_/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2, module2) {
|
67748
67734
|
"use strict";
|
67749
67735
|
var __defProp3 = Object.defineProperty;
|
67750
67736
|
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
@@ -70019,9 +70005,9 @@ var require_dist_cjs52 = __commonJS({
|
|
70019
70005
|
}
|
70020
70006
|
});
|
70021
70007
|
|
70022
|
-
// ../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-
|
70008
|
+
// ../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts_n4voux45fymjghrdt4o3r57x4m/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js
|
70023
70009
|
var require_dist_cjs53 = __commonJS({
|
70024
|
-
"../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-
|
70010
|
+
"../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts_n4voux45fymjghrdt4o3r57x4m/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2, module2) {
|
70025
70011
|
"use strict";
|
70026
70012
|
var __create3 = Object.create;
|
70027
70013
|
var __defProp3 = Object.defineProperty;
|
@@ -70189,9 +70175,9 @@ var require_dist_cjs53 = __commonJS({
|
|
70189
70175
|
}
|
70190
70176
|
});
|
70191
70177
|
|
70192
|
-
// ../node_modules/.pnpm/@aws-sdk+credential-provider-node@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-
|
70178
|
+
// ../node_modules/.pnpm/@aws-sdk+credential-provider-node@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-st_qaylqvuvqkdeetlwmxiq34v6lq/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js
|
70193
70179
|
var require_dist_cjs54 = __commonJS({
|
70194
|
-
"../node_modules/.pnpm/@aws-sdk+credential-provider-node@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-
|
70180
|
+
"../node_modules/.pnpm/@aws-sdk+credential-provider-node@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-st_qaylqvuvqkdeetlwmxiq34v6lq/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2, module2) {
|
70195
70181
|
"use strict";
|
70196
70182
|
var __create3 = Object.create;
|
70197
70183
|
var __defProp3 = Object.defineProperty;
|
@@ -71765,7 +71751,7 @@ __export(connections_exports, {
|
|
71765
71751
|
connectToSQLite: () => connectToSQLite,
|
71766
71752
|
preparePostgresDB: () => preparePostgresDB
|
71767
71753
|
});
|
71768
|
-
var preparePostgresDB, parseMysqlCredentials, connectToMySQL, prepareSqliteParams,
|
71754
|
+
var preparePostgresDB, parseMysqlCredentials, connectToMySQL, prepareSqliteParams, connectToSQLite;
|
71769
71755
|
var init_connections = __esm({
|
71770
71756
|
"src/cli/connections.ts"() {
|
71771
71757
|
"use strict";
|
@@ -71777,8 +71763,7 @@ var init_connections = __esm({
|
|
71777
71763
|
init_outputs();
|
71778
71764
|
preparePostgresDB = async (credentials2) => {
|
71779
71765
|
if ("driver" in credentials2) {
|
71780
|
-
|
71781
|
-
if (driver2 === "aws-data-api") {
|
71766
|
+
if (credentials2.driver === "aws-data-api") {
|
71782
71767
|
assertPackages("@aws-sdk/client-rds-data");
|
71783
71768
|
const { RDSDataClient, ExecuteStatementCommand, TypeHint } = await Promise.resolve().then(() => __toESM(require_dist_cjs55()));
|
71784
71769
|
const { AwsDataApiSession, drizzle } = await import("drizzle-orm/aws-data-api/pg");
|
@@ -71835,35 +71820,7 @@ var init_connections = __esm({
|
|
71835
71820
|
migrate: migrateFn
|
71836
71821
|
};
|
71837
71822
|
}
|
71838
|
-
|
71839
|
-
assertPackages("@electric-sql/pglite");
|
71840
|
-
const { PGlite } = await import("@electric-sql/pglite");
|
71841
|
-
const { drizzle } = await import("drizzle-orm/pglite");
|
71842
|
-
const { migrate: migrate2 } = await import("drizzle-orm/pglite/migrator");
|
71843
|
-
const pglite = new PGlite(normalisePGliteUrl(credentials2.url));
|
71844
|
-
await pglite.waitReady;
|
71845
|
-
const drzl = drizzle(pglite);
|
71846
|
-
const migrateFn = async (config) => {
|
71847
|
-
return migrate2(drzl, config);
|
71848
|
-
};
|
71849
|
-
const query = async (sql, params = []) => {
|
71850
|
-
const result = await pglite.query(sql, params);
|
71851
|
-
return result.rows;
|
71852
|
-
};
|
71853
|
-
const proxy = async (params) => {
|
71854
|
-
const preparedParams = preparePGliteParams(params.params);
|
71855
|
-
if (params.method === "values" || params.method === "get" || params.method === "all") {
|
71856
|
-
const result2 = await pglite.query(params.sql, preparedParams, {
|
71857
|
-
rowMode: params.mode
|
71858
|
-
});
|
71859
|
-
return result2.rows;
|
71860
|
-
}
|
71861
|
-
const result = await pglite.query(params.sql, preparedParams);
|
71862
|
-
return result.rows;
|
71863
|
-
};
|
71864
|
-
return { query, proxy, migrate: migrateFn };
|
71865
|
-
}
|
71866
|
-
assertUnreachable(driver2);
|
71823
|
+
assertUnreachable(credentials2.driver);
|
71867
71824
|
}
|
71868
71825
|
if (await checkPackage("pg")) {
|
71869
71826
|
console.log(withStyle.info(`Using 'pg' driver for database querying`));
|
@@ -72081,15 +72038,6 @@ var init_connections = __esm({
|
|
72081
72038
|
return param;
|
72082
72039
|
});
|
72083
72040
|
};
|
72084
|
-
preparePGliteParams = (params) => {
|
72085
|
-
return params.map((param) => {
|
72086
|
-
if (param && typeof param === "object" && "type" in param && "value" in param && param.type === "binary") {
|
72087
|
-
const value = typeof param.value === "object" ? JSON.stringify(param.value) : param.value;
|
72088
|
-
return value;
|
72089
|
-
}
|
72090
|
-
return param;
|
72091
|
-
});
|
72092
|
-
};
|
72093
72041
|
connectToSQLite = async (credentials2) => {
|
72094
72042
|
if ("driver" in credentials2) {
|
72095
72043
|
const { driver: driver2 } = credentials2;
|
@@ -80452,13 +80400,10 @@ var init_studio2 = __esm({
|
|
80452
80400
|
const customDefaults = getCustomDefaults(pgSchema2);
|
80453
80401
|
let dbUrl;
|
80454
80402
|
if ("driver" in credentials2) {
|
80455
|
-
|
80456
|
-
if (driver2 === "aws-data-api") {
|
80403
|
+
if (credentials2.driver === "aws-data-api") {
|
80457
80404
|
dbUrl = `aws-data-api://${credentials2.database}/${credentials2.secretArn}/${credentials2.resourceArn}`;
|
80458
|
-
} else if (driver2 === "pglite") {
|
80459
|
-
dbUrl = credentials2.url;
|
80460
80405
|
} else {
|
80461
|
-
assertUnreachable(
|
80406
|
+
assertUnreachable(credentials2.driver);
|
80462
80407
|
}
|
80463
80408
|
} else if ("url" in credentials2) {
|
80464
80409
|
dbUrl = credentials2.url;
|
@@ -83545,23 +83490,15 @@ var migrate = command({
|
|
83545
83490
|
try {
|
83546
83491
|
if (dialect7 === "postgresql") {
|
83547
83492
|
if ("driver" in credentials2) {
|
83548
|
-
|
83549
|
-
if (driver2 === "aws-data-api") {
|
83493
|
+
if (credentials2.driver === "aws-data-api") {
|
83550
83494
|
if (!await ormVersionGt("0.30.10")) {
|
83551
83495
|
console.log(
|
83552
83496
|
"To use 'aws-data-api' driver - please update drizzle-orm to the latest version"
|
83553
83497
|
);
|
83554
83498
|
process.exit(1);
|
83555
83499
|
}
|
83556
|
-
} else if (driver2 === "pglite") {
|
83557
|
-
if (!await ormVersionGt("0.30.6")) {
|
83558
|
-
console.log(
|
83559
|
-
"To use 'pglite' driver - please update drizzle-orm to the latest version"
|
83560
|
-
);
|
83561
|
-
process.exit(1);
|
83562
|
-
}
|
83563
83500
|
} else {
|
83564
|
-
assertUnreachable(
|
83501
|
+
assertUnreachable(credentials2.driver);
|
83565
83502
|
}
|
83566
83503
|
}
|
83567
83504
|
const { preparePostgresDB: preparePostgresDB2 } = await Promise.resolve().then(() => (init_connections(), connections_exports));
|
@@ -83690,23 +83627,15 @@ var push = command({
|
|
83690
83627
|
);
|
83691
83628
|
} else if (dialect7 === "postgresql") {
|
83692
83629
|
if ("driver" in credentials2) {
|
83693
|
-
|
83694
|
-
if (driver2 === "aws-data-api") {
|
83630
|
+
if (credentials2.driver === "aws-data-api") {
|
83695
83631
|
if (!await ormVersionGt("0.30.10")) {
|
83696
83632
|
console.log(
|
83697
83633
|
"To use 'aws-data-api' driver - please update drizzle-orm to the latest version"
|
83698
83634
|
);
|
83699
83635
|
process.exit(1);
|
83700
83636
|
}
|
83701
|
-
} else if (driver2 === "pglite") {
|
83702
|
-
if (!await ormVersionGt("0.30.6")) {
|
83703
|
-
console.log(
|
83704
|
-
"To use 'pglite' driver - please update drizzle-orm to the latest version"
|
83705
|
-
);
|
83706
|
-
process.exit(1);
|
83707
|
-
}
|
83708
83637
|
} else {
|
83709
|
-
assertUnreachable(
|
83638
|
+
assertUnreachable(credentials2.driver);
|
83710
83639
|
}
|
83711
83640
|
}
|
83712
83641
|
const { pgPush: pgPush2 } = await Promise.resolve().then(() => (init_push(), push_exports));
|
@@ -83843,23 +83772,15 @@ var pull = command({
|
|
83843
83772
|
try {
|
83844
83773
|
if (dialect7 === "postgresql") {
|
83845
83774
|
if ("driver" in credentials2) {
|
83846
|
-
|
83847
|
-
if (driver2 === "aws-data-api") {
|
83775
|
+
if (credentials2.driver === "aws-data-api") {
|
83848
83776
|
if (!await ormVersionGt("0.30.10")) {
|
83849
83777
|
console.log(
|
83850
83778
|
"To use 'aws-data-api' driver - please update drizzle-orm to the latest version"
|
83851
83779
|
);
|
83852
83780
|
process.exit(1);
|
83853
83781
|
}
|
83854
|
-
} else if (driver2 === "pglite") {
|
83855
|
-
if (!await ormVersionGt("0.30.6")) {
|
83856
|
-
console.log(
|
83857
|
-
"To use 'pglite' driver - please update drizzle-orm to the latest version"
|
83858
|
-
);
|
83859
|
-
process.exit(1);
|
83860
|
-
}
|
83861
83782
|
} else {
|
83862
|
-
assertUnreachable(
|
83783
|
+
assertUnreachable(credentials2.driver);
|
83863
83784
|
}
|
83864
83785
|
}
|
83865
83786
|
const { introspectPostgres: introspectPostgres2 } = await Promise.resolve().then(() => (init_introspect(), introspect_exports));
|
@@ -83949,23 +83870,15 @@ var studio = command({
|
|
83949
83870
|
try {
|
83950
83871
|
if (dialect7 === "postgresql") {
|
83951
83872
|
if ("driver" in credentials2) {
|
83952
|
-
|
83953
|
-
if (driver2 === "aws-data-api") {
|
83873
|
+
if (credentials2.driver === "aws-data-api") {
|
83954
83874
|
if (!await ormVersionGt("0.30.10")) {
|
83955
83875
|
console.log(
|
83956
83876
|
"To use 'aws-data-api' driver - please update drizzle-orm to the latest version"
|
83957
83877
|
);
|
83958
83878
|
process.exit(1);
|
83959
83879
|
}
|
83960
|
-
} else if (driver2 === "pglite") {
|
83961
|
-
if (!await ormVersionGt("0.30.6")) {
|
83962
|
-
console.log(
|
83963
|
-
"To use 'pglite' driver - please update drizzle-orm to the latest version"
|
83964
|
-
);
|
83965
|
-
process.exit(1);
|
83966
|
-
}
|
83967
83880
|
} else {
|
83968
|
-
assertUnreachable(
|
83881
|
+
assertUnreachable(credentials2.driver);
|
83969
83882
|
}
|
83970
83883
|
}
|
83971
83884
|
const { schema: schema5, relations: relations4, files } = schemaPath ? await preparePgSchema2(schemaPath) : { schema: {}, relations: {}, files: [] };
|
@@ -84028,7 +83941,7 @@ init_utils2();
|
|
84028
83941
|
var version2 = async () => {
|
84029
83942
|
const { npmVersion } = await ormCoreVersions();
|
84030
83943
|
const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
|
84031
|
-
const envVersion = "0.24.1-
|
83944
|
+
const envVersion = "0.24.1-4045fbc";
|
84032
83945
|
const kitVersion = envVersion ? `v${envVersion}` : "--";
|
84033
83946
|
const versions = `drizzle-kit: ${kitVersion}
|
84034
83947
|
${ormVersion}`;
|
package/index.d.mts
CHANGED
@@ -2,7 +2,7 @@ import { ConnectionOptions } from 'tls';
|
|
2
2
|
|
3
3
|
declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "none"];
|
4
4
|
type Prefix = (typeof prefixes)[number];
|
5
|
-
declare const drivers: readonly ["turso", "d1-http", "expo", "aws-data-api"
|
5
|
+
declare const drivers: readonly ["turso", "d1-http", "expo", "aws-data-api"];
|
6
6
|
type Driver = (typeof drivers)[number];
|
7
7
|
|
8
8
|
declare const dialects: readonly ["postgresql", "mysql", "sqlite"];
|
@@ -43,7 +43,7 @@ type Verify<T, U extends T> = U;
|
|
43
43
|
*
|
44
44
|
* ---
|
45
45
|
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
46
|
-
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso
|
46
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`
|
47
47
|
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
|
48
48
|
*
|
49
49
|
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
@@ -135,7 +135,7 @@ type Config = {
|
|
135
135
|
authToken?: string;
|
136
136
|
};
|
137
137
|
} | {
|
138
|
-
dialect:
|
138
|
+
dialect: 'sqlite';
|
139
139
|
dbCredentials: {
|
140
140
|
url: string;
|
141
141
|
};
|
@@ -159,12 +159,6 @@ type Config = {
|
|
159
159
|
secretArn: string;
|
160
160
|
resourceArn: string;
|
161
161
|
};
|
162
|
-
} | {
|
163
|
-
dialect: Verify<Dialect, 'postgresql'>;
|
164
|
-
driver: Verify<Driver, 'pglite'>;
|
165
|
-
dbCredentials: {
|
166
|
-
url: string;
|
167
|
-
};
|
168
162
|
} | {
|
169
163
|
dialect: Verify<Dialect, 'mysql'>;
|
170
164
|
dbCredentials: {
|
@@ -213,7 +207,7 @@ type Config = {
|
|
213
207
|
*
|
214
208
|
* ---
|
215
209
|
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
216
|
-
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso
|
210
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`
|
217
211
|
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
|
218
212
|
*
|
219
213
|
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
package/index.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { ConnectionOptions } from 'tls';
|
|
2
2
|
|
3
3
|
declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "none"];
|
4
4
|
type Prefix = (typeof prefixes)[number];
|
5
|
-
declare const drivers: readonly ["turso", "d1-http", "expo", "aws-data-api"
|
5
|
+
declare const drivers: readonly ["turso", "d1-http", "expo", "aws-data-api"];
|
6
6
|
type Driver = (typeof drivers)[number];
|
7
7
|
|
8
8
|
declare const dialects: readonly ["postgresql", "mysql", "sqlite"];
|
@@ -43,7 +43,7 @@ type Verify<T, U extends T> = U;
|
|
43
43
|
*
|
44
44
|
* ---
|
45
45
|
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
46
|
-
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso
|
46
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`
|
47
47
|
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
|
48
48
|
*
|
49
49
|
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
@@ -135,7 +135,7 @@ type Config = {
|
|
135
135
|
authToken?: string;
|
136
136
|
};
|
137
137
|
} | {
|
138
|
-
dialect:
|
138
|
+
dialect: 'sqlite';
|
139
139
|
dbCredentials: {
|
140
140
|
url: string;
|
141
141
|
};
|
@@ -159,12 +159,6 @@ type Config = {
|
|
159
159
|
secretArn: string;
|
160
160
|
resourceArn: string;
|
161
161
|
};
|
162
|
-
} | {
|
163
|
-
dialect: Verify<Dialect, 'postgresql'>;
|
164
|
-
driver: Verify<Driver, 'pglite'>;
|
165
|
-
dbCredentials: {
|
166
|
-
url: string;
|
167
|
-
};
|
168
162
|
} | {
|
169
163
|
dialect: Verify<Dialect, 'mysql'>;
|
170
164
|
dbCredentials: {
|
@@ -213,7 +207,7 @@ type Config = {
|
|
213
207
|
*
|
214
208
|
* ---
|
215
209
|
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
216
|
-
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso
|
210
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`
|
217
211
|
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
|
218
212
|
*
|
219
213
|
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.24.1-
|
3
|
+
"version": "0.24.1-4045fbc",
|
4
4
|
"homepage": "https://orm.drizzle.team",
|
5
5
|
"keywords": [
|
6
6
|
"drizzle",
|
@@ -51,7 +51,7 @@
|
|
51
51
|
"@arethetypeswrong/cli": "^0.15.3",
|
52
52
|
"@aws-sdk/client-rds-data": "^3.556.0",
|
53
53
|
"@cloudflare/workers-types": "^4.20230518.0",
|
54
|
-
"@electric-sql/pglite": "^0.1.
|
54
|
+
"@electric-sql/pglite": "^0.1.5",
|
55
55
|
"@hono/node-server": "^1.9.0",
|
56
56
|
"@hono/zod-validator": "^0.2.1",
|
57
57
|
"@libsql/client": "^0.4.2",
|
package/utils.js
CHANGED
@@ -570,7 +570,6 @@ __export(utils_exports, {
|
|
570
570
|
dryJournal: () => dryJournal,
|
571
571
|
isPgArrayType: () => isPgArrayType,
|
572
572
|
kloudMeta: () => kloudMeta,
|
573
|
-
normalisePGliteUrl: () => normalisePGliteUrl,
|
574
573
|
normaliseSQLiteUrl: () => normaliseSQLiteUrl,
|
575
574
|
objectValues: () => objectValues,
|
576
575
|
prepareMigrationFolder: () => prepareMigrationFolder,
|
@@ -5741,12 +5740,6 @@ var normaliseSQLiteUrl = (it, type) => {
|
|
5741
5740
|
}
|
5742
5741
|
assertUnreachable(type);
|
5743
5742
|
};
|
5744
|
-
var normalisePGliteUrl = (it) => {
|
5745
|
-
if (it.startsWith("file:")) {
|
5746
|
-
return it.substring(5);
|
5747
|
-
}
|
5748
|
-
return it;
|
5749
|
-
};
|
5750
5743
|
function isPgArrayType(sqlType) {
|
5751
5744
|
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
5752
5745
|
}
|
@@ -5758,7 +5751,6 @@ function isPgArrayType(sqlType) {
|
|
5758
5751
|
dryJournal,
|
5759
5752
|
isPgArrayType,
|
5760
5753
|
kloudMeta,
|
5761
|
-
normalisePGliteUrl,
|
5762
5754
|
normaliseSQLiteUrl,
|
5763
5755
|
objectValues,
|
5764
5756
|
prepareMigrationFolder,
|
package/utils.mjs
CHANGED
@@ -5721,12 +5721,6 @@ var normaliseSQLiteUrl = (it, type) => {
|
|
5721
5721
|
}
|
5722
5722
|
assertUnreachable(type);
|
5723
5723
|
};
|
5724
|
-
var normalisePGliteUrl = (it) => {
|
5725
|
-
if (it.startsWith("file:")) {
|
5726
|
-
return it.substring(5);
|
5727
|
-
}
|
5728
|
-
return it;
|
5729
|
-
};
|
5730
5724
|
function isPgArrayType(sqlType) {
|
5731
5725
|
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
5732
5726
|
}
|
@@ -5737,7 +5731,6 @@ export {
|
|
5737
5731
|
dryJournal,
|
5738
5732
|
isPgArrayType,
|
5739
5733
|
kloudMeta,
|
5740
|
-
normalisePGliteUrl,
|
5741
5734
|
normaliseSQLiteUrl,
|
5742
5735
|
objectValues,
|
5743
5736
|
prepareMigrationFolder,
|