drizzle-kit 0.24.0-f71baf7 → 0.24.1-0ced1ab
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 +848 -1351
- package/api.mjs +848 -1351
- package/bin.cjs +10546 -4823
- package/index.d.mts +10 -4
- package/index.d.ts +10 -4
- package/package.json +3 -3
- package/utils.js +10 -10
- package/utils.mjs +9 -9
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-0ced1ab",
|
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"
|
@@ -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
@@ -568,9 +568,9 @@ __export(utils_exports, {
|
|
568
568
|
columnRenameKey: () => columnRenameKey,
|
569
569
|
copy: () => copy,
|
570
570
|
dryJournal: () => dryJournal,
|
571
|
-
findAddedAndRemoved: () => findAddedAndRemoved,
|
572
571
|
isPgArrayType: () => isPgArrayType,
|
573
572
|
kloudMeta: () => kloudMeta,
|
573
|
+
normalisePGliteUrl: () => normalisePGliteUrl,
|
574
574
|
normaliseSQLiteUrl: () => normaliseSQLiteUrl,
|
575
575
|
objectValues: () => objectValues,
|
576
576
|
prepareMigrationFolder: () => prepareMigrationFolder,
|
@@ -5265,7 +5265,8 @@ var kitInternals2 = objectType({
|
|
5265
5265
|
objectType({
|
5266
5266
|
isArray: booleanType().optional(),
|
5267
5267
|
dimensions: numberType().optional(),
|
5268
|
-
rawType: stringType().optional()
|
5268
|
+
rawType: stringType().optional(),
|
5269
|
+
isDefaultAnExpression: booleanType().optional()
|
5269
5270
|
}).optional()
|
5270
5271
|
)
|
5271
5272
|
}).optional()
|
@@ -5740,25 +5741,24 @@ 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
|
}
|
5746
|
-
function findAddedAndRemoved(columnNames1, columnNames2) {
|
5747
|
-
const set1 = new Set(columnNames1);
|
5748
|
-
const set2 = new Set(columnNames2);
|
5749
|
-
const addedColumns = columnNames2.filter((it) => !set1.has(it));
|
5750
|
-
const removedColumns = columnNames1.filter((it) => !set2.has(it));
|
5751
|
-
return { addedColumns, removedColumns };
|
5752
|
-
}
|
5753
5753
|
// Annotate the CommonJS export names for ESM import in node:
|
5754
5754
|
0 && (module.exports = {
|
5755
5755
|
assertV1OutFolder,
|
5756
5756
|
columnRenameKey,
|
5757
5757
|
copy,
|
5758
5758
|
dryJournal,
|
5759
|
-
findAddedAndRemoved,
|
5760
5759
|
isPgArrayType,
|
5761
5760
|
kloudMeta,
|
5761
|
+
normalisePGliteUrl,
|
5762
5762
|
normaliseSQLiteUrl,
|
5763
5763
|
objectValues,
|
5764
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,24 +5721,23 @@ 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
|
}
|
5726
|
-
function findAddedAndRemoved(columnNames1, columnNames2) {
|
5727
|
-
const set1 = new Set(columnNames1);
|
5728
|
-
const set2 = new Set(columnNames2);
|
5729
|
-
const addedColumns = columnNames2.filter((it) => !set1.has(it));
|
5730
|
-
const removedColumns = columnNames1.filter((it) => !set2.has(it));
|
5731
|
-
return { addedColumns, removedColumns };
|
5732
|
-
}
|
5733
5733
|
export {
|
5734
5734
|
assertV1OutFolder,
|
5735
5735
|
columnRenameKey,
|
5736
5736
|
copy,
|
5737
5737
|
dryJournal,
|
5738
|
-
findAddedAndRemoved,
|
5739
5738
|
isPgArrayType,
|
5740
5739
|
kloudMeta,
|
5740
|
+
normalisePGliteUrl,
|
5741
5741
|
normaliseSQLiteUrl,
|
5742
5742
|
objectValues,
|
5743
5743
|
prepareMigrationFolder,
|