sfn-diagram 1.10.0 → 2.0.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/README.md +6 -4
- package/dist/bin.js +755 -709
- package/dist/ci.js +960 -818
- package/dist/element-auto.js +283 -165
- package/dist/element.js +283 -165
- package/dist/html.d.ts +1243 -0
- package/dist/{element.cjs → html.js} +4335 -6035
- package/dist/index.d.ts +196 -432
- package/dist/index.js +1514 -2783
- package/dist/png.d.ts +42 -275
- package/dist/png.js +132 -175
- package/package.json +25 -102
- package/dist/aws.cjs +0 -75
- package/dist/aws.d.cts +0 -32
- package/dist/cfn.cjs +0 -364
- package/dist/cfn.d.cts +0 -231
- package/dist/ci.cjs +0 -9709
- package/dist/ci.d.cts +0 -561
- package/dist/element-auto.cjs +0 -11721
- package/dist/element-auto.d.cts +0 -1
- package/dist/element.d.cts +0 -473
- package/dist/index.cjs +0 -11210
- package/dist/index.d.cts +0 -2753
- package/dist/png.cjs +0 -7569
- package/dist/png.d.cts +0 -909
- package/dist/terraform.cjs +0 -990
- package/dist/terraform.d.cts +0 -238
package/README.md
CHANGED
|
@@ -23,6 +23,8 @@ Generate diagrams from AWS Step Functions ASL (Amazon States Language) definitio
|
|
|
23
23
|
npm install sfn-diagram
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
Requires Node >= 22.12.0 on Node; the package is ES modules only, and `require()` works there. Upgrading from 1.x? See [Migrating to 2.0](https://sfn.yusufaf.dev/upgrading-to-v2/).
|
|
27
|
+
|
|
26
28
|
The core package pulls in **no browser engine or native rasterizer** — SVG and Mermaid generation stay lightweight. PNG export uses `@resvg/resvg-js`, a native, browser-free renderer, provided by an optional peer dependency. Install it only if you use `sfn-diagram/png`:
|
|
27
29
|
|
|
28
30
|
```bash
|
|
@@ -119,7 +121,7 @@ from a bad definition. See
|
|
|
119
121
|
- **Modern ASL**: Variables (`Assign`) shown per state, and Distributed Map rendered distinctly from an inline Map — including its `MaxConcurrency`, `ItemReader` source, and `ResultWriter` sink
|
|
120
122
|
- **Visual Diffing**: Compare two definitions and highlight added / modified / removed states — drives the PR-preview GitHub Action
|
|
121
123
|
- **Linting**: `lintAsl()` returns every structural and semantic finding at once (unreachable states, dangling transitions, `End` with `Next`, JSONPath/JSONata field mixing, …); `sfn-diagram --check` fails CI on errors
|
|
122
|
-
- **Execution Overlays**: Paint a real execution's history onto the diagram — succeeded/failed/caught/not-reached states, the taken path, and per-state duration & retry counts. From a saved history file or live from an execution ARN, and `--follow` keeps re-rendering until the run finishes; with `--format html` it can be painted onto a `--diff` in the same viewer
|
|
124
|
+
- **Execution Overlays**: Paint a real execution's history onto the diagram — succeeded/failed/caught/aborted/not-reached states, the taken path, and per-state duration & retry counts. From a saved history file or live from an execution ARN, and `--follow` keeps re-rendering until the run finishes; with `--format html` it can be painted onto a `--diff` in the same viewer
|
|
123
125
|
- **Customizable Themes**: AWS light/dark themes, an `auto` theme that follows the system colour scheme, plus custom theme support
|
|
124
126
|
- **Flexible Layouts**: Top-bottom, left-right, right-left, bottom-top
|
|
125
127
|
- **Type-Safe**: Full TypeScript support with comprehensive type definitions
|
|
@@ -157,8 +159,8 @@ Full documentation lives at **[sfn.yusufaf.dev](https://sfn.yusufaf.dev)**.
|
|
|
157
159
|
- [Examples](https://sfn.yusufaf.dev/guides/examples/) — complete worked examples
|
|
158
160
|
- [Use with your framework](https://sfn.yusufaf.dev/guides/frameworks/) — Next.js, Remix, SvelteKit, Astro
|
|
159
161
|
- [API reference](https://sfn.yusufaf.dev/reference/) — generated from source, always current
|
|
160
|
-
- [Compatibility policy](https://sfn.yusufaf.dev/compatibility/) — what
|
|
161
|
-
- [
|
|
162
|
+
- [Compatibility policy](https://sfn.yusufaf.dev/compatibility/) — what each version number promises
|
|
163
|
+
- [Migrating to 2.0](https://sfn.yusufaf.dev/upgrading-to-v2/) — upgrading from 1.x, with before-and-after code for every breaking change
|
|
162
164
|
|
|
163
165
|
Working with an AI coding agent? The docs are published as [llms.txt](https://sfn.yusufaf.dev/llms.txt), and every page is available as raw Markdown by appending `.md` to its URL.
|
|
164
166
|
|
|
@@ -175,7 +177,7 @@ Working with an AI coding agent? The docs are published as [llms.txt](https://sf
|
|
|
175
177
|
|
|
176
178
|
## Runtime support
|
|
177
179
|
|
|
178
|
-
Core (`sfn-diagram`) is platform-agnostic — it runs in Node, the browser, and edge runtimes. Only `sfn-diagram/png` and the CLI are Node-only. See [runtime support](https://sfn.yusufaf.dev/guides/runtimes/).
|
|
180
|
+
Core (`sfn-diagram`) is platform-agnostic — it runs in Node, the browser, and edge runtimes. Only `sfn-diagram/png` and the CLI are Node-only. On Node it needs Node >= 22.12.0. See [runtime support](https://sfn.yusufaf.dev/guides/runtimes/).
|
|
179
181
|
|
|
180
182
|
## Contributing
|
|
181
183
|
|