drizzle-kit 0.24.0-6205f01 → 0.24.0-bb966f7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. package/api.js +1219 -656
  2. package/api.mjs +1219 -656
  3. package/bin.cjs +1616 -641
  4. package/package.json +2 -2
  5. package/utils.js +9 -0
  6. 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-6205f01",
3
+ "version": "0.24.0-bb966f7",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",
@@ -38,7 +38,7 @@
38
38
  "build": "rm -rf ./dist && tsx build.ts && cp package.json dist/ && attw --pack dist",
39
39
  "build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
40
40
  "pack": "cp package.json README.md dist/ && (cd dist && npm pack --pack-destination ..) && rm -f package.tgz && mv *.tgz package.tgz",
41
- "tsc": "tsc -p tsconfig.build.json",
41
+ "tsc": "tsc -p tsconfig.cli-types.json",
42
42
  "publish": "npm publish package.tgz"
43
43
  },
44
44
  "dependencies": {
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,