drizzle-kit 0.24.1-781dea0 → 0.24.1-e2677cd
Sign up to get free protection for your applications and to get access to all the features.
- package/api.js +10 -2
- package/api.mjs +10 -2
- package/bin.cjs +8906 -2747
- package/index.d.mts +10 -4
- package/index.d.ts +10 -4
- package/package.json +1 -1
- package/utils.js +8 -0
- package/utils.mjs +7 -0
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", "pglite"];
|
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`, `pglite`
|
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: 'sqlite'
|
138
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
139
139
|
dbCredentials: {
|
140
140
|
url: string;
|
141
141
|
};
|
@@ -159,6 +159,12 @@ 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
|
+
};
|
162
168
|
} | {
|
163
169
|
dialect: Verify<Dialect, 'mysql'>;
|
164
170
|
dbCredentials: {
|
@@ -207,7 +213,7 @@ type Config = {
|
|
207
213
|
*
|
208
214
|
* ---
|
209
215
|
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
210
|
-
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`
|
216
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
|
211
217
|
* 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
|
212
218
|
*
|
213
219
|
* 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", "pglite"];
|
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`, `pglite`
|
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: 'sqlite'
|
138
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
139
139
|
dbCredentials: {
|
140
140
|
url: string;
|
141
141
|
};
|
@@ -159,6 +159,12 @@ 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
|
+
};
|
162
168
|
} | {
|
163
169
|
dialect: Verify<Dialect, 'mysql'>;
|
164
170
|
dbCredentials: {
|
@@ -207,7 +213,7 @@ type Config = {
|
|
207
213
|
*
|
208
214
|
* ---
|
209
215
|
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
210
|
-
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`
|
216
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
|
211
217
|
* 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
|
212
218
|
*
|
213
219
|
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
package/package.json
CHANGED
package/utils.js
CHANGED
@@ -570,6 +570,7 @@ __export(utils_exports, {
|
|
570
570
|
dryJournal: () => dryJournal,
|
571
571
|
isPgArrayType: () => isPgArrayType,
|
572
572
|
kloudMeta: () => kloudMeta,
|
573
|
+
normalisePGliteUrl: () => normalisePGliteUrl,
|
573
574
|
normaliseSQLiteUrl: () => normaliseSQLiteUrl,
|
574
575
|
objectValues: () => objectValues,
|
575
576
|
prepareMigrationFolder: () => prepareMigrationFolder,
|
@@ -5740,6 +5741,12 @@ var normaliseSQLiteUrl = (it, type) => {
|
|
5740
5741
|
}
|
5741
5742
|
assertUnreachable(type);
|
5742
5743
|
};
|
5744
|
+
var normalisePGliteUrl = (it) => {
|
5745
|
+
if (it.startsWith("file:")) {
|
5746
|
+
return it.substring(5);
|
5747
|
+
}
|
5748
|
+
return it;
|
5749
|
+
};
|
5743
5750
|
function isPgArrayType(sqlType) {
|
5744
5751
|
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
5745
5752
|
}
|
@@ -5751,6 +5758,7 @@ function isPgArrayType(sqlType) {
|
|
5751
5758
|
dryJournal,
|
5752
5759
|
isPgArrayType,
|
5753
5760
|
kloudMeta,
|
5761
|
+
normalisePGliteUrl,
|
5754
5762
|
normaliseSQLiteUrl,
|
5755
5763
|
objectValues,
|
5756
5764
|
prepareMigrationFolder,
|
package/utils.mjs
CHANGED
@@ -5721,6 +5721,12 @@ 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
|
+
};
|
5724
5730
|
function isPgArrayType(sqlType) {
|
5725
5731
|
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
5726
5732
|
}
|
@@ -5731,6 +5737,7 @@ export {
|
|
5731
5737
|
dryJournal,
|
5732
5738
|
isPgArrayType,
|
5733
5739
|
kloudMeta,
|
5740
|
+
normalisePGliteUrl,
|
5734
5741
|
normaliseSQLiteUrl,
|
5735
5742
|
objectValues,
|
5736
5743
|
prepareMigrationFolder,
|