@tandemcreativedev/strabo 0.1.0 → 0.1.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/README.md +4 -0
- package/dist/cli.js +0 -0
- package/dist/generate.js +2 -3
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -93,6 +93,10 @@ const { files, warnings } = generate(dumpText, resolveConfig({ schemas: ["public
|
|
|
93
93
|
|
|
94
94
|
`parseDump`, `buildDiagram`, `writeSql`, `writeDbml`, `writePuml` and `writeSvg` are exported too, for custom output.
|
|
95
95
|
|
|
96
|
+
## Releasing
|
|
97
|
+
|
|
98
|
+
Releases are cut by [release-please](https://github.com/googleapis/release-please) from conventional commit messages. Each push to `main` updates a release pull request that bumps the version in `package.json` and adds the changes to `CHANGELOG.md`. Merging that pull request tags the release and publishes it to npm through trusted publishing, with no token stored in the repo. While the version is 0.x, breaking changes bump the minor version.
|
|
99
|
+
|
|
96
100
|
## Development
|
|
97
101
|
|
|
98
102
|
```sh
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/generate.js
CHANGED
|
@@ -6,10 +6,9 @@ import { writePuml } from "./writers/puml.js";
|
|
|
6
6
|
import { writeSql } from "./writers/sql.js";
|
|
7
7
|
import { writeSvg } from "./writers/svg.js";
|
|
8
8
|
function uncovered(schema, config) {
|
|
9
|
-
|
|
10
|
-
if (listed.length === 0)
|
|
9
|
+
if (!config.diagrams.some((diagram) => diagram.tables))
|
|
11
10
|
return [];
|
|
12
|
-
const covered = new Set(
|
|
11
|
+
const covered = new Set(config.diagrams.flatMap((diagram) => selectTables(schema, diagram, config.schemas[0], () => { }).map((table) => table.name)));
|
|
13
12
|
return [...schema.tables.keys()].filter((name) => !covered.has(name));
|
|
14
13
|
}
|
|
15
14
|
/** Turns a schema-only pg_dump into the SQL reference and diagram files the config asks for. Writes nothing. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tandemcreativedev/strabo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Turn a Postgres schema into a readable record for people and AI: a tidy SQL reference plus DBML, PlantUML and SVG diagrams, generated from pg_dump.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postgres",
|
|
@@ -34,6 +34,13 @@
|
|
|
34
34
|
"engines": {
|
|
35
35
|
"node": ">=20"
|
|
36
36
|
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && node scripts/fix-declarations.mjs",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"test": "node --test 'test/**/*.test.ts'",
|
|
41
|
+
"fixture": "bash test/fixtures/regenerate.sh",
|
|
42
|
+
"prepublishOnly": "pnpm typecheck && pnpm test && pnpm build"
|
|
43
|
+
},
|
|
37
44
|
"peerDependencies": {
|
|
38
45
|
"@softwaretechnik/dbml-renderer": "^1.0.31"
|
|
39
46
|
},
|
|
@@ -48,10 +55,5 @@
|
|
|
48
55
|
"@types/node": "^22",
|
|
49
56
|
"typescript": "^5.9"
|
|
50
57
|
},
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
"typecheck": "tsc --noEmit",
|
|
54
|
-
"test": "node --test 'test/**/*.test.ts'",
|
|
55
|
-
"fixture": "bash test/fixtures/regenerate.sh"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
+
"packageManager": "pnpm@10.18.0"
|
|
59
|
+
}
|