@tmorin/plantuml-libs 18.0.1-alpha.0 → 18.2.0
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/CHANGELOG.md +51 -0
- package/CLAUDE.md +66 -0
- package/README.md +2 -0
- package/bin/gdiag.js +5 -2
- package/distribution/eip/message_router.png +0 -0
- package/distribution/eip/pipes_and_filters.png +0 -0
- package/distribution/eip/simple.png +0 -0
- package/doc/howto.upgrade-eip-package.md +32 -23
- package/package.json +37 -29
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [18.2.0](https://github.com/tmorin/plantuml-libs/compare/v18.1.4...v18.2.0) (2026-08-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **eip:** refresh the package ([b880bcb](https://github.com/tmorin/plantuml-libs/commit/b880bcb4898d485e54e2166e5772eb93c9278569))
|
|
11
|
+
* **eip:** refresh the package ([f613242](https://github.com/tmorin/plantuml-libs/commit/f6132426064db47a86ff70b748fe111df82007ca))
|
|
12
|
+
* **eip:** refresh the package ([2c75adf](https://github.com/tmorin/plantuml-libs/commit/2c75adfcb6045acb029f5db4b2025ea1c0a45774))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **generator:** resolve TypeScript errors surfaced by TS 6.0.3 ([a0085a2](https://github.com/tmorin/plantuml-libs/commit/a0085a23fcc164e49626f59482eb5575b0b0e331))
|
|
18
|
+
* **test:** stabilize resolver tests ([5fc952b](https://github.com/tmorin/plantuml-libs/commit/5fc952b6e35a851d49d213612dbd80aaa11707b0))
|
|
19
|
+
|
|
20
|
+
### [18.1.4](https://github.com/tmorin/plantuml-libs/compare/v18.1.3...v18.1.4) (2026-04-11)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **ci:** grant release permissions ([a931a14](https://github.com/tmorin/plantuml-libs/commit/a931a14c8c657ce4e7b544d6f01d21563149bf56))
|
|
26
|
+
* **ci:** scope workflow permissions ([97d4efd](https://github.com/tmorin/plantuml-libs/commit/97d4efdce37b92c4678fd0a1b08943cf11e4334d))
|
|
27
|
+
|
|
28
|
+
### [18.1.3](https://github.com/tmorin/plantuml-libs/compare/v18.1.2...v18.1.3) (2026-04-11)
|
|
29
|
+
|
|
30
|
+
### [18.1.2](https://github.com/tmorin/plantuml-libs/compare/v18.1.1...v18.1.2) (2026-04-11)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* **ci:** set workflow permissions for npm trusted publishing ([b59fe2a](https://github.com/tmorin/plantuml-libs/commit/b59fe2aeddf948d633be64b7ab6eaa3040406f2b))
|
|
36
|
+
|
|
37
|
+
### [18.1.1](https://github.com/tmorin/plantuml-libs/compare/v18.1.0...v18.1.1) (2026-04-10)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* **ci:** grant read access for npm trusted publishing ([0e5cd87](https://github.com/tmorin/plantuml-libs/commit/0e5cd876653ac84530926d205da07d55b7a3bfe5))
|
|
43
|
+
|
|
44
|
+
## [18.1.0](https://github.com/tmorin/plantuml-libs/compare/v18.0.0...v18.1.0) (2026-04-10)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Features
|
|
48
|
+
|
|
49
|
+
* switch to OIDC trusted publishers for npm publishing ([eae83dc](https://github.com/tmorin/plantuml-libs/commit/eae83dc0e66c09e70c34ef31151ea105e0c2d3a6))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* add missing generate:workdir step in NpmPublication workflow ([72e2ff1](https://github.com/tmorin/plantuml-libs/commit/72e2ff13b5fe3501c92c4e8ad79e931e69416d5a))
|
|
55
|
+
|
|
5
56
|
## [18.0.0](https://github.com/tmorin/plantuml-libs/compare/v17.0.0...v18.0.0) (2026-04-10)
|
|
6
57
|
|
|
7
58
|
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
Guidance for Claude Code when working in this repository.
|
|
4
|
+
|
|
5
|
+
## Project
|
|
6
|
+
|
|
7
|
+
`@tmorin/plantuml-libs` — generates PlantUML sprite/icon libraries (AWS, Azure, C4, EIP, Font Awesome, GCP, Material, Simple Icons, etc.) and their documentation website. Node.js CLI entry point: `bin/gdiag.js`.
|
|
8
|
+
|
|
9
|
+
## Stack
|
|
10
|
+
|
|
11
|
+
- TypeScript, run via `ts-node`, `moduleResolution: Node`. Source uses ESM `import` syntax but the package has no `"type": "module"` and `bin/gdiag.js` uses `require()` — this is CommonJS, not ESM, despite the import syntax.
|
|
12
|
+
- Node.js >=24 <25 (see `engines` in package.json)
|
|
13
|
+
- Mocha + `assert.strict` for tests
|
|
14
|
+
- ESLint flat config (`eslint.config.mjs`) + Prettier (no semicolons, double quotes)
|
|
15
|
+
|
|
16
|
+
Check `package.json` for exact dependency versions rather than assuming.
|
|
17
|
+
|
|
18
|
+
## Architecture: Library vs Generator
|
|
19
|
+
|
|
20
|
+
- `source/library/` — one factory per technology package (`source/library/packages/{name}/index.ts`), each producing raw PlantUML sprite/icon resources. Packages are independent but follow shared patterns.
|
|
21
|
+
- `source/generator/workdir/` — orchestrates all library packages into a single `.workdir/library.yaml` manifest plus supporting assets. Run: `npm run generate:workdir`
|
|
22
|
+
- `source/generator/website/` — ETL pipeline (Extract → Transform → Load) that turns `.workdir/library.yaml` into the documentation site and `distribution/` output. Each stage implements the generic `Stage<I, O>` interface (`source/generator/website/stage.ts`).
|
|
23
|
+
- Full build: `scripts/generate-library.sh` chains workdir → website → distribution/. Requires Podman/Docker and the `plantuml-generator` image.
|
|
24
|
+
- Single-package build: `scripts/generate-package.sh <package>` (invoked via `npm run generate:package -- -p <package>`) regenerates the workdir then builds just that one package through Podman.
|
|
25
|
+
|
|
26
|
+
## Code Conventions
|
|
27
|
+
|
|
28
|
+
- Classes: private constructor + static factory, e.g. `static create(...): X`
|
|
29
|
+
- Import aliases for common modules: `import P from "path"`, `import Fe from "fs-extra"`, `import U from "util"`
|
|
30
|
+
- Import order: stdlib → external packages → local modules, no blank lines between groups
|
|
31
|
+
- `readonly` for immutable class properties; interfaces declared inline near their implementation
|
|
32
|
+
- async/await throughout, no callbacks or `.then()` chains
|
|
33
|
+
|
|
34
|
+
## Testing
|
|
35
|
+
|
|
36
|
+
- Files: `test/*.spec.js` / `test/*.spec.mjs`, run with `npm test`
|
|
37
|
+
- Run one file: `npm test -- test/gdiag.spec.js`
|
|
38
|
+
- Run by pattern: `npm test -- --grep "gdiag"`
|
|
39
|
+
- Test functions must be `async function` (not arrows) to access `this.timeout(...)`
|
|
40
|
+
- AWS/Azure spec files make real network requests — expect them to be slow
|
|
41
|
+
- Clean temp state in `beforeEach()`; use `.tmp/` for scratch output
|
|
42
|
+
|
|
43
|
+
## Commands
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run generate:workdir # library packages -> .workdir/library.yaml
|
|
47
|
+
npm run generate:website # runs the website ETL stages
|
|
48
|
+
npm run generate:package -- -p aws # regenerate + build a single package (needs Podman)
|
|
49
|
+
scripts/generate-library.sh # full build: workdir -> website -> distribution/ (needs Podman/Docker)
|
|
50
|
+
npm test # mocha
|
|
51
|
+
npm run lint # eslint . (bin/**, test/**, .workdir/**, distribution/** ignored)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Versioning & Commits
|
|
55
|
+
|
|
56
|
+
- Semantic Versioning via `standard-version` (`npm run release`)
|
|
57
|
+
- Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/): `type(scope): description` — common types `feat`, `fix`, `refactor`, `chore`, `docs`, `test`
|
|
58
|
+
- Pre-releases: `npm run alpha` (`--prerelease alpha`)
|
|
59
|
+
|
|
60
|
+
## Package Upgrades
|
|
61
|
+
|
|
62
|
+
Upgrading an icon/shape package (AWS, Azure, EIP, Font Awesome, GCP, Material, Simple Icons) or npm dependencies has a dedicated skill under `.claude/skills/` for each package (e.g. `aws-package-upgrading`, `npm-dependency-management`) — use those rather than improvising the process.
|
|
63
|
+
|
|
64
|
+
## When in Doubt
|
|
65
|
+
|
|
66
|
+
Match existing patterns in the surrounding file over generic best practices — this codebase has consistent, if unconventional, house style (no semicolons, aliased imports, factory-pattern classes).
|
package/README.md
CHANGED
|
@@ -11,6 +11,8 @@ Each package focus on a particular technology/approach: Amazon Web Services (AWS
|
|
|
11
11
|
Additionally, a CLI utility, working with NodeJS, is also provided within the NPN package.
|
|
12
12
|
Its purpose is to speed up the rendering of PlantUML source files, i.e. the generation of PNG.
|
|
13
13
|
|
|
14
|
+
This repository targets Node.js 24 LTS for development and CI.
|
|
15
|
+
|
|
14
16
|
[PlantUML]: https://plantuml.com
|
|
15
17
|
|
|
16
18
|
## Contributing
|
package/bin/gdiag.js
CHANGED
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
const P = require("path")
|
|
4
4
|
const F = require("fs")
|
|
5
5
|
const CP = require("child_process")
|
|
6
|
-
const
|
|
6
|
+
const fetchModule = require("node-fetch")
|
|
7
|
+
const fetch = fetchModule.default ?? fetchModule
|
|
7
8
|
const moment = require("moment")
|
|
8
9
|
const glob = require("glob")
|
|
9
10
|
|
|
10
11
|
function getArgs() {
|
|
11
|
-
|
|
12
|
+
const { hideBin } = require("yargs/helpers")
|
|
13
|
+
const yargs = require("yargs/yargs")
|
|
14
|
+
return yargs(hideBin(process.argv))
|
|
12
15
|
.scriptName("gdiag")
|
|
13
16
|
.env("GDIAG_")
|
|
14
17
|
.option("work-directory", {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -74,8 +74,10 @@ npm run generate:workdir -- -p eip
|
|
|
74
74
|
|
|
75
75
|
Check the output:
|
|
76
76
|
- `.workdir/library.yaml` should list the `eip` package with correct modules and examples
|
|
77
|
-
-
|
|
78
|
-
-
|
|
77
|
+
- Verify the total number of items: expected ~61 items across 7 modules
|
|
78
|
+
- `MessageConstruction`, `MessageRouting`, `MessageTransformation`
|
|
79
|
+
- `MessagingChannels`, `MessagingEndpoints`, `MessagingSystems`, `SystemManagement`
|
|
80
|
+
- Changes in item count indicate new/updated shapes from the upstream repository
|
|
79
81
|
|
|
80
82
|
### 5. Commit and push the branch
|
|
81
83
|
|
|
@@ -99,26 +101,16 @@ git push -u origin feat/upgrade-eip-icons
|
|
|
99
101
|
|
|
100
102
|
### 6. Trigger the Package Builder pipeline
|
|
101
103
|
|
|
102
|
-
**Primary (
|
|
103
|
-
```
|
|
104
|
-
create_dispatch_event(owner="tmorin", repo="plantuml-libs", event_type="package-builder",
|
|
105
|
-
client_payload={"pkgName": "eip", "pkgVersion": "latest", "branch": "feat/upgrade-eip-icons"})
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Alternatively, use the MCP workflow trigger method (check your MCP server's available tools):
|
|
109
|
-
```
|
|
110
|
-
trigger_workflow(owner="tmorin", repo="plantuml-libs", workflow_id="package-builder.yaml",
|
|
111
|
-
inputs={"pkgName": "eip", "pkgVersion": "latest"}, ref="feat/upgrade-eip-icons")
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
**Fallback (CLI)**:
|
|
104
|
+
**Primary (CLI)** (replace `<branch-name>` with your actual branch, e.g. `feat/upgrade-eip-icons`):
|
|
115
105
|
```bash
|
|
116
106
|
gh workflow run package-builder.yaml \
|
|
117
107
|
-f pkgName=eip \
|
|
118
|
-
-
|
|
119
|
-
--ref feat/upgrade-eip-icons
|
|
108
|
+
--ref <branch-name>
|
|
120
109
|
```
|
|
121
110
|
|
|
111
|
+
**Manual fallback** (if the CLI returns a 403 or permission error):
|
|
112
|
+
Go to the [Package Builder workflow](https://github.com/tmorin/plantuml-libs/actions/workflows/package-builder.yaml) in the GitHub Actions tab, click **Run workflow**, select your branch, and set `pkgName` to `eip`.
|
|
113
|
+
|
|
122
114
|
The pipeline will:
|
|
123
115
|
1. Generate the work directory
|
|
124
116
|
2. Render all PlantUML diagrams and examples
|
|
@@ -130,9 +122,6 @@ Processing typically takes several minutes. Monitor the run at the GitHub Action
|
|
|
130
122
|
|
|
131
123
|
Once the pipeline completes, pull the generated files:
|
|
132
124
|
|
|
133
|
-
**Primary (MCP)**: Use `github-mcp-server-get_commit` to verify changes and pull
|
|
134
|
-
|
|
135
|
-
**Fallback (CLI)**:
|
|
136
125
|
```bash
|
|
137
126
|
git pull origin feat/upgrade-eip-icons
|
|
138
127
|
```
|
|
@@ -146,9 +135,9 @@ ls -la distribution/eip/
|
|
|
146
135
|
```
|
|
147
136
|
|
|
148
137
|
Verify:
|
|
149
|
-
- `distribution/eip/
|
|
150
|
-
-
|
|
151
|
-
- `distribution/eip/README.md` - auto-generated with updated shape counts
|
|
138
|
+
- `distribution/eip/MessageConstruction/`, `distribution/eip/MessageRouting/`, etc. - all shapes render correctly as PlantUML files
|
|
139
|
+
- Each item has `.puml`, `.Local.puml`, `.Remote.puml`, `.png`, `.Local.png`, `.md`, and Group variants
|
|
140
|
+
- `distribution/eip/README.md` - auto-generated with updated shape counts and module list
|
|
152
141
|
|
|
153
142
|
### 9. Create a pull request
|
|
154
143
|
|
|
@@ -220,4 +209,24 @@ Then re-run the pipeline.
|
|
|
220
209
|
|
|
221
210
|
---
|
|
222
211
|
|
|
212
|
+
## Lessons Learned
|
|
213
|
+
|
|
214
|
+
### Workflow Trigger Permissions
|
|
215
|
+
|
|
216
|
+
The Package Builder pipeline uses `workflow_dispatch` which requires the `workflows` scope on the GitHub token. The Copilot agent's token may not have this permission, causing `gh workflow run` to return a 403 error. In that case, the repository maintainer must trigger the pipeline manually via the GitHub Actions UI.
|
|
217
|
+
|
|
218
|
+
### Workdir Validation is the Key Local Check
|
|
219
|
+
|
|
220
|
+
Running `npm run generate:workdir -- -p eip` is the best local validation. It downloads the upstream shapes, applies the discovery logic, and writes `library.yaml`. Verifying the item counts (expected ~61 items across 7 modules) before pushing gives confidence that the source code is correct.
|
|
221
|
+
|
|
222
|
+
### Additional Icons Override Upstream Shapes
|
|
223
|
+
|
|
224
|
+
The `source/library/packages/eip/icons/` directory contains hand-crafted SVG files that complement the upstream shapes. The `unifyItems()` call merges additional icons (priority) with upstream shapes, so local icons take precedence when both have the same URN.
|
|
225
|
+
|
|
226
|
+
### No `.workdir/.cache` Directory
|
|
227
|
+
|
|
228
|
+
Unlike some packages, the EIP workdir does not create a `.cache` directory. Generated artifacts are stored in `.workdir/.tmp/eip/` during the run and only `library.yaml` and `source/` are persisted for the pipeline.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
223
232
|
This guide keeps maintenance changes small, reviewable, and focused. Always validate locally before pushing to remote.
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tmorin/plantuml-libs",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"description": "A set of resources for [PlantUML](https://plantuml.com) to define diagrams for AWS, Azure, EIP ...",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=24 <25"
|
|
8
|
+
},
|
|
6
9
|
"homepage": "https://github.com/tmorin/plantuml-libs#readme",
|
|
7
10
|
"bugs": {
|
|
8
11
|
"url": "https://github.com/tmorin/plantuml-libs/issues"
|
|
@@ -50,39 +53,44 @@
|
|
|
50
53
|
"test": "mocha"
|
|
51
54
|
},
|
|
52
55
|
"devDependencies": {
|
|
53
|
-
"@eslint/eslintrc": "^3.
|
|
54
|
-
"@
|
|
55
|
-
"@types/
|
|
56
|
-
"@types/
|
|
57
|
-
"@types/
|
|
56
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
57
|
+
"@eslint/js": "^10.0.1",
|
|
58
|
+
"@types/extract-zip": "^2.0.3",
|
|
59
|
+
"@types/fs-extra": "^11.0.4",
|
|
60
|
+
"@types/html-minifier-terser": "^7.0.2",
|
|
61
|
+
"@types/lodash": "^4.17.24",
|
|
58
62
|
"@types/mocha": "^10.0.10",
|
|
59
|
-
"@types/node": "^
|
|
63
|
+
"@types/node": "^25.9.1",
|
|
60
64
|
"@types/node-fetch": "^2.6.13",
|
|
61
65
|
"@types/yaml": "^1.9.7",
|
|
62
|
-
"@types/yargs": "^17.0.
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
64
|
-
"@typescript-eslint/parser": "^8.
|
|
65
|
-
"cheerio": "^1.
|
|
66
|
-
"csv-parse": "^
|
|
67
|
-
"eslint": "^
|
|
66
|
+
"@types/yargs": "^17.0.35",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^8.60.0",
|
|
68
|
+
"@typescript-eslint/parser": "^8.60.0",
|
|
69
|
+
"cheerio": "^1.2.0",
|
|
70
|
+
"csv-parse": "^6.2.1",
|
|
71
|
+
"eslint": "^10.4.1",
|
|
68
72
|
"extract-zip": "^2.0.1",
|
|
69
|
-
"fs-extra": "^11.
|
|
70
|
-
"html-minifier-terser": "^7.
|
|
71
|
-
"lodash": "^4.
|
|
72
|
-
"marked": "^
|
|
73
|
-
"marked-gfm-heading-id": "^4.1.
|
|
74
|
-
"marked-mangle": "^1.
|
|
75
|
-
"mocha": "^11.7.
|
|
76
|
-
"node-fetch": "^
|
|
77
|
-
"prettier": "^3.
|
|
78
|
-
"standard-version": "^9.
|
|
79
|
-
"ts-node": "^10.
|
|
80
|
-
"typescript": "^
|
|
81
|
-
"yaml": "^2.
|
|
73
|
+
"fs-extra": "^11.3.5",
|
|
74
|
+
"html-minifier-terser": "^7.2.0",
|
|
75
|
+
"lodash": "^4.18.1",
|
|
76
|
+
"marked": "^18.0.4",
|
|
77
|
+
"marked-gfm-heading-id": "^4.1.4",
|
|
78
|
+
"marked-mangle": "^1.1.13",
|
|
79
|
+
"mocha": "^11.7.6",
|
|
80
|
+
"node-fetch": "^3.3.2",
|
|
81
|
+
"prettier": "^3.8.3",
|
|
82
|
+
"standard-version": "^9.5.0",
|
|
83
|
+
"ts-node": "^10.9.2",
|
|
84
|
+
"typescript": "^6.0.3",
|
|
85
|
+
"yaml": "^2.9.0"
|
|
82
86
|
},
|
|
83
87
|
"dependencies": {
|
|
84
|
-
"glob": "^
|
|
85
|
-
"moment": "^2.
|
|
86
|
-
"yargs": "^
|
|
88
|
+
"glob": "^13.0.6",
|
|
89
|
+
"moment": "^2.30.1",
|
|
90
|
+
"yargs": "^18.0.0"
|
|
91
|
+
},
|
|
92
|
+
"overrides": {
|
|
93
|
+
"diff": "^8.0.3",
|
|
94
|
+
"serialize-javascript": "^7.0.5"
|
|
87
95
|
}
|
|
88
96
|
}
|