drizzle-kit 0.24.0 → 0.24.1-3d751e8
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.d.mts +10 -0
- package/api.d.ts +10 -0
- package/api.js +169 -109
- package/api.mjs +169 -109
- package/bin.cjs +1114 -487
- package/index.d.mts +10 -4
- package/index.d.ts +10 -4
- package/package.json +4 -4
- package/utils.js +10 -1
- package/utils.mjs +9 -1
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
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.24.
|
3
|
+
"version": "0.24.1-3d751e8",
|
4
4
|
"homepage": "https://orm.drizzle.team",
|
5
5
|
"keywords": [
|
6
6
|
"drizzle",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
"publish": "npm publish package.tgz"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@drizzle-team/brocli": "^0.
|
45
|
+
"@drizzle-team/brocli": "^0.10.1",
|
46
46
|
"@esbuild-kit/esm-loader": "^2.5.5",
|
47
47
|
"esbuild": "^0.19.7",
|
48
48
|
"esbuild-register": "^3.5.0"
|
@@ -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.1",
|
55
55
|
"@hono/node-server": "^1.9.0",
|
56
56
|
"@hono/zod-validator": "^0.2.1",
|
57
57
|
"@libsql/client": "^0.4.2",
|
@@ -92,7 +92,7 @@
|
|
92
92
|
"hono": "^4.1.5",
|
93
93
|
"json-diff": "1.0.6",
|
94
94
|
"minimatch": "^7.4.3",
|
95
|
-
"mysql2": "
|
95
|
+
"mysql2": "3.3.3",
|
96
96
|
"node-fetch": "^3.3.2",
|
97
97
|
"pg": "^8.11.5",
|
98
98
|
"pluralize": "^8.0.0",
|
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,
|
@@ -5264,7 +5265,8 @@ var kitInternals2 = objectType({
|
|
5264
5265
|
objectType({
|
5265
5266
|
isArray: booleanType().optional(),
|
5266
5267
|
dimensions: numberType().optional(),
|
5267
|
-
rawType: stringType().optional()
|
5268
|
+
rawType: stringType().optional(),
|
5269
|
+
isDefaultAnExpression: booleanType().optional()
|
5268
5270
|
}).optional()
|
5269
5271
|
)
|
5270
5272
|
}).optional()
|
@@ -5739,6 +5741,12 @@ var normaliseSQLiteUrl = (it, type) => {
|
|
5739
5741
|
}
|
5740
5742
|
assertUnreachable(type);
|
5741
5743
|
};
|
5744
|
+
var normalisePGliteUrl = (it) => {
|
5745
|
+
if (it.startsWith("file:")) {
|
5746
|
+
return it.substring(5);
|
5747
|
+
}
|
5748
|
+
return it;
|
5749
|
+
};
|
5742
5750
|
function isPgArrayType(sqlType) {
|
5743
5751
|
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
5744
5752
|
}
|
@@ -5750,6 +5758,7 @@ function isPgArrayType(sqlType) {
|
|
5750
5758
|
dryJournal,
|
5751
5759
|
isPgArrayType,
|
5752
5760
|
kloudMeta,
|
5761
|
+
normalisePGliteUrl,
|
5753
5762
|
normaliseSQLiteUrl,
|
5754
5763
|
objectValues,
|
5755
5764
|
prepareMigrationFolder,
|
package/utils.mjs
CHANGED
@@ -5245,7 +5245,8 @@ var kitInternals2 = objectType({
|
|
5245
5245
|
objectType({
|
5246
5246
|
isArray: booleanType().optional(),
|
5247
5247
|
dimensions: numberType().optional(),
|
5248
|
-
rawType: stringType().optional()
|
5248
|
+
rawType: stringType().optional(),
|
5249
|
+
isDefaultAnExpression: booleanType().optional()
|
5249
5250
|
}).optional()
|
5250
5251
|
)
|
5251
5252
|
}).optional()
|
@@ -5720,6 +5721,12 @@ var normaliseSQLiteUrl = (it, type) => {
|
|
5720
5721
|
}
|
5721
5722
|
assertUnreachable(type);
|
5722
5723
|
};
|
5724
|
+
var normalisePGliteUrl = (it) => {
|
5725
|
+
if (it.startsWith("file:")) {
|
5726
|
+
return it.substring(5);
|
5727
|
+
}
|
5728
|
+
return it;
|
5729
|
+
};
|
5723
5730
|
function isPgArrayType(sqlType) {
|
5724
5731
|
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
5725
5732
|
}
|
@@ -5730,6 +5737,7 @@ export {
|
|
5730
5737
|
dryJournal,
|
5731
5738
|
isPgArrayType,
|
5732
5739
|
kloudMeta,
|
5740
|
+
normalisePGliteUrl,
|
5733
5741
|
normaliseSQLiteUrl,
|
5734
5742
|
objectValues,
|
5735
5743
|
prepareMigrationFolder,
|