@xubylele/schema-forge 1.7.0 → 1.8.1

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/dist/cli.js CHANGED
@@ -1206,7 +1206,7 @@ var init_fs = __esm({
1206
1206
  }
1207
1207
  });
1208
1208
 
1209
- // node_modules/@xubylele/schema-forge-core/dist/core/state-manager.js
1209
+ // node_modules/@xubylele/schema-forge-core/dist/core/state-transform.js
1210
1210
  async function schemaToState(schema) {
1211
1211
  const tables = {};
1212
1212
  for (const [tableName, table] of Object.entries(schema.tables)) {
@@ -1232,6 +1232,13 @@ async function schemaToState(schema) {
1232
1232
  tables
1233
1233
  };
1234
1234
  }
1235
+ var init_state_transform = __esm({
1236
+ "node_modules/@xubylele/schema-forge-core/dist/core/state-transform.js"() {
1237
+ "use strict";
1238
+ }
1239
+ });
1240
+
1241
+ // node_modules/@xubylele/schema-forge-core/dist/core/state-manager.js
1235
1242
  async function loadState(statePath) {
1236
1243
  return await readJsonFile2(statePath, { version: 1, tables: {} });
1237
1244
  }
@@ -1246,6 +1253,8 @@ var init_state_manager = __esm({
1246
1253
  "use strict";
1247
1254
  import_path4 = __toESM(require("path"), 1);
1248
1255
  init_fs();
1256
+ init_state_transform();
1257
+ init_state_transform();
1249
1258
  }
1250
1259
  });
1251
1260
 
@@ -2724,15 +2733,25 @@ var import_commander8 = require("commander");
2724
2733
  // package.json
2725
2734
  var package_default = {
2726
2735
  name: "@xubylele/schema-forge",
2727
- version: "1.7.0",
2736
+ version: "1.8.1",
2728
2737
  description: "Universal migration generator from schema DSL",
2729
2738
  main: "dist/cli.js",
2730
2739
  type: "commonjs",
2731
2740
  bin: {
2732
2741
  "schema-forge": "dist/cli.js"
2733
2742
  },
2743
+ exports: {
2744
+ ".": {
2745
+ require: "dist/cli.js",
2746
+ types: "dist/cli.d.ts"
2747
+ },
2748
+ "./api": {
2749
+ require: "dist/api.js",
2750
+ types: "dist/api.d.ts"
2751
+ }
2752
+ },
2734
2753
  scripts: {
2735
- build: "tsup src/cli.ts --format cjs --dts",
2754
+ build: "tsup src/cli.ts src/api.ts --format cjs --dts",
2736
2755
  dev: "ts-node src/cli.ts",
2737
2756
  test: "vitest",
2738
2757
  "test:integration:drift": "vitest run test/drift-realdb.integration.test.ts",
@@ -2757,7 +2776,7 @@ var package_default = {
2757
2776
  url: "git+https://github.com/xubylele/schema-forge.git"
2758
2777
  },
2759
2778
  bugs: "https://github.com/xubylele/schema-forge/issues",
2760
- homepage: "https://github.com/xubylele/schema-forge#readme",
2779
+ homepage: "https://schemaforge.xuby.cl/",
2761
2780
  files: [
2762
2781
  "dist"
2763
2782
  ],
@@ -2774,7 +2793,7 @@ var package_default = {
2774
2793
  "@changesets/cli": "^2.30.0",
2775
2794
  "@types/node": "^25.2.3",
2776
2795
  "@types/pg": "^8.18.0",
2777
- "@xubylele/schema-forge-core": "^1.3.0",
2796
+ "@xubylele/schema-forge-core": "^1.3.1",
2778
2797
  testcontainers: "^11.8.1",
2779
2798
  "ts-node": "^10.9.2",
2780
2799
  tsup: "^8.5.1",
package/package.json CHANGED
@@ -1,14 +1,24 @@
1
1
  {
2
2
  "name": "@xubylele/schema-forge",
3
- "version": "1.7.0",
3
+ "version": "1.8.1",
4
4
  "description": "Universal migration generator from schema DSL",
5
5
  "main": "dist/cli.js",
6
6
  "type": "commonjs",
7
7
  "bin": {
8
8
  "schema-forge": "dist/cli.js"
9
9
  },
10
+ "exports": {
11
+ ".": {
12
+ "require": "dist/cli.js",
13
+ "types": "dist/cli.d.ts"
14
+ },
15
+ "./api": {
16
+ "require": "dist/api.js",
17
+ "types": "dist/api.d.ts"
18
+ }
19
+ },
10
20
  "scripts": {
11
- "build": "tsup src/cli.ts --format cjs --dts",
21
+ "build": "tsup src/cli.ts src/api.ts --format cjs --dts",
12
22
  "dev": "ts-node src/cli.ts",
13
23
  "test": "vitest",
14
24
  "test:integration:drift": "vitest run test/drift-realdb.integration.test.ts",
@@ -33,7 +43,7 @@
33
43
  "url": "git+https://github.com/xubylele/schema-forge.git"
34
44
  },
35
45
  "bugs": "https://github.com/xubylele/schema-forge/issues",
36
- "homepage": "https://github.com/xubylele/schema-forge#readme",
46
+ "homepage": "https://schemaforge.xuby.cl/",
37
47
  "files": [
38
48
  "dist"
39
49
  ],
@@ -50,7 +60,7 @@
50
60
  "@changesets/cli": "^2.30.0",
51
61
  "@types/node": "^25.2.3",
52
62
  "@types/pg": "^8.18.0",
53
- "@xubylele/schema-forge-core": "^1.3.0",
63
+ "@xubylele/schema-forge-core": "^1.3.1",
54
64
  "testcontainers": "^11.8.1",
55
65
  "ts-node": "^10.9.2",
56
66
  "tsup": "^8.5.1",