drizzle-kit 0.24.0-6386ea9 → 0.24.0-f71baf7
Sign up to get free protection for your applications and to get access to all the features.
- package/api.js +1219 -656
- package/api.mjs +1219 -656
- package/bin.cjs +1790 -1200
- package/package.json +3 -3
- package/utils.js +9 -0
- package/utils.mjs +8 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.24.0-
|
3
|
+
"version": "0.24.0-f71baf7",
|
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.8.2",
|
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": "2.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,6 +568,7 @@ __export(utils_exports, {
|
|
568
568
|
columnRenameKey: () => columnRenameKey,
|
569
569
|
copy: () => copy,
|
570
570
|
dryJournal: () => dryJournal,
|
571
|
+
findAddedAndRemoved: () => findAddedAndRemoved,
|
571
572
|
isPgArrayType: () => isPgArrayType,
|
572
573
|
kloudMeta: () => kloudMeta,
|
573
574
|
normaliseSQLiteUrl: () => normaliseSQLiteUrl,
|
@@ -5742,12 +5743,20 @@ var normaliseSQLiteUrl = (it, type) => {
|
|
5742
5743
|
function isPgArrayType(sqlType) {
|
5743
5744
|
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
5744
5745
|
}
|
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
|
+
}
|
5745
5753
|
// Annotate the CommonJS export names for ESM import in node:
|
5746
5754
|
0 && (module.exports = {
|
5747
5755
|
assertV1OutFolder,
|
5748
5756
|
columnRenameKey,
|
5749
5757
|
copy,
|
5750
5758
|
dryJournal,
|
5759
|
+
findAddedAndRemoved,
|
5751
5760
|
isPgArrayType,
|
5752
5761
|
kloudMeta,
|
5753
5762
|
normaliseSQLiteUrl,
|
package/utils.mjs
CHANGED
@@ -5723,11 +5723,19 @@ var normaliseSQLiteUrl = (it, type) => {
|
|
5723
5723
|
function isPgArrayType(sqlType) {
|
5724
5724
|
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
5725
5725
|
}
|
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
|
+
}
|
5726
5733
|
export {
|
5727
5734
|
assertV1OutFolder,
|
5728
5735
|
columnRenameKey,
|
5729
5736
|
copy,
|
5730
5737
|
dryJournal,
|
5738
|
+
findAddedAndRemoved,
|
5731
5739
|
isPgArrayType,
|
5732
5740
|
kloudMeta,
|
5733
5741
|
normaliseSQLiteUrl,
|