sizuku 0.6.0 → 0.6.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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -17
  2. package/package.json +7 -7
package/dist/index.mjs CHANGED
@@ -5,7 +5,6 @@ import { format } from "oxfmt";
5
5
  import { Node, Project } from "ts-morph";
6
6
  import { Resvg } from "@resvg/resvg-js";
7
7
  import { run } from "@softwaretechnik/dbml-renderer";
8
-
9
8
  //#region src/fsp/index.ts
10
9
  function readFileSync(path) {
11
10
  try {
@@ -82,7 +81,6 @@ async function writeFileBinary(path, data) {
82
81
  };
83
82
  }
84
83
  }
85
-
86
84
  //#endregion
87
85
  //#region src/format/index.ts
88
86
  /**
@@ -99,7 +97,6 @@ async function fmt(input) {
99
97
  if (errors.length > 0) throw new Error(errors.map((e) => e.message).join("\n"));
100
98
  return code;
101
99
  }
102
-
103
100
  //#endregion
104
101
  //#region src/utils/index.ts
105
102
  /**
@@ -345,7 +342,6 @@ function inferEffect(name) {
345
342
  const capitalized = makeCapitalized(name);
346
343
  return `export type ${capitalized}Encoded = typeof ${capitalized}Schema.Encoded`;
347
344
  }
348
-
349
345
  //#endregion
350
346
  //#region src/helper/extract-schemas.ts
351
347
  /**
@@ -677,7 +673,6 @@ function extractRelationSchemas(lines, library) {
677
673
  }
678
674
  return sourceFile.getVariableStatements().filter((stmt) => stmt.hasExportKeyword()).flatMap((stmt) => stmt.getDeclarations()).map((decl) => extract(decl)).filter((schema) => schema !== null);
679
675
  }
680
-
681
676
  //#endregion
682
677
  //#region src/generator/arktype/index.ts
683
678
  /**
@@ -748,7 +743,6 @@ async function sizukuArktype(code, output, comment, type, relation) {
748
743
  value: void 0
749
744
  };
750
745
  }
751
-
752
746
  //#endregion
753
747
  //#region src/generator/mermaid-er/validator/index.ts
754
748
  /**
@@ -1069,7 +1063,6 @@ function extractRelationsFromSchema(code) {
1069
1063
  return true;
1070
1064
  });
1071
1065
  }
1072
-
1073
1066
  //#endregion
1074
1067
  //#region src/generator/dbml/generator/dbml-content.ts
1075
1068
  /**
@@ -1209,7 +1202,6 @@ function dbmlContent(relations, tables) {
1209
1202
  refs: relations.map(toDBMLRef)
1210
1203
  });
1211
1204
  }
1212
-
1213
1205
  //#endregion
1214
1206
  //#region src/generator/dbml/index.ts
1215
1207
  /**
@@ -1272,7 +1264,6 @@ async function sizukuPng(code, output) {
1272
1264
  value: void 0
1273
1265
  };
1274
1266
  }
1275
-
1276
1267
  //#endregion
1277
1268
  //#region src/generator/effect/index.ts
1278
1269
  function effect(schema, comment) {
@@ -1325,7 +1316,6 @@ async function sizukuEffect(code, output, comment, type, relation) {
1325
1316
  value: void 0
1326
1317
  };
1327
1318
  }
1328
-
1329
1319
  //#endregion
1330
1320
  //#region src/generator/mermaid-er/generator/er-content.ts
1331
1321
  const ER_HEADER = ["```mermaid", "erDiagram"];
@@ -1380,7 +1370,6 @@ function erContent(relations, tables) {
1380
1370
  ...ER_FOOTER
1381
1371
  ].join("\n");
1382
1372
  }
1383
-
1384
1373
  //#endregion
1385
1374
  //#region src/generator/mermaid-er/index.ts
1386
1375
  /**
@@ -1406,7 +1395,6 @@ async function sizukuMermaidER(code, output) {
1406
1395
  value: void 0
1407
1396
  };
1408
1397
  }
1409
-
1410
1398
  //#endregion
1411
1399
  //#region src/generator/valibot/index.ts
1412
1400
  function valibot(schema, comment) {
@@ -1459,7 +1447,6 @@ async function sizukuValibot(code, output, comment, type, relation) {
1459
1447
  value: void 0
1460
1448
  };
1461
1449
  }
1462
-
1463
1450
  //#endregion
1464
1451
  //#region src/generator/zod/index.ts
1465
1452
  function zod(schema, comment) {
@@ -1514,7 +1501,6 @@ async function sizukuZod(code, output, comment, type, zod, relation) {
1514
1501
  value: void 0
1515
1502
  };
1516
1503
  }
1517
-
1518
1504
  //#endregion
1519
1505
  //#region src/cli/index.ts
1520
1506
  const HELP_TEXT = `💧 sizuku - Drizzle ORM schema tools
@@ -1680,13 +1666,11 @@ async function sizuku() {
1680
1666
  if (outputType === "typescript") return sizukuDirectSchema(input, output, parseFlags(argv));
1681
1667
  return sizukuDirectDiagram(input, output, outputType);
1682
1668
  }
1683
-
1684
1669
  //#endregion
1685
1670
  //#region src/index.ts
1686
1671
  sizuku().then((result) => {
1687
1672
  if (result?.ok) console.log(result.value);
1688
1673
  else console.error(result?.error);
1689
1674
  });
1690
-
1691
1675
  //#endregion
1692
- export { };
1676
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sizuku",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Sizuku is a tool that generates validation schemas for Zod and Valibot, as well as ER diagrams and DBML, from Drizzle schemas annotated with comments.",
5
5
  "keywords": [
6
6
  "dbml",
@@ -40,14 +40,14 @@
40
40
  "dependencies": {
41
41
  "@resvg/resvg-js": "^2.6.2",
42
42
  "@softwaretechnik/dbml-renderer": "^1.0.31",
43
- "oxfmt": "^0.40.0",
43
+ "oxfmt": "^0.42.0",
44
44
  "ts-morph": "^27.0.2"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "^24.10.1",
48
- "drizzle-orm": "^0.44.7",
49
- "tsdown": "^0.20.1",
50
- "typescript": "^5.9.3",
51
- "valibot": "1.2.0"
47
+ "@types/node": "^25.5.0",
48
+ "drizzle-orm": "^0.45.1",
49
+ "tsdown": "^0.21.4",
50
+ "typescript": "^6.0.2",
51
+ "valibot": "1.3.1"
52
52
  }
53
53
  }