sfn-diagram 0.3.0 → 0.4.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 (3) hide show
  1. package/README.md +26 -0
  2. package/dist/cli.js +1750 -0
  3. package/package.json +16 -5
package/README.md CHANGED
@@ -22,6 +22,32 @@ Generate beautiful, interactive diagrams from AWS Step Functions ASL (Amazon Sta
22
22
  npm install sfn-diagram
23
23
  ```
24
24
 
25
+ ## Command-line Usage
26
+
27
+ The package ships a CLI for use without writing any JavaScript:
28
+
29
+ ```bash
30
+ npx sfn-diagram state.asl.json --format svg -o diagram.svg
31
+ npx sfn-diagram state.asl.json --format mermaid > diagram.mmd
32
+ cat state.asl.json | npx sfn-diagram - --format svg
33
+ ```
34
+
35
+ Flags: `--format <svg|mermaid|png>`, `-o/--output <path>`, `--theme <light|dark>`, `--layout <TB|LR|RL|BT>`, `-h/--help`, `-v/--version`.
36
+
37
+ ## Docker
38
+
39
+ A prebuilt image is published to GitHub Container Registry with Chromium baked in, so PNG export works out of the box:
40
+
41
+ ```bash
42
+ docker run --rm -v "$PWD":/work ghcr.io/yusufaf/sfn-diagram:latest \
43
+ /work/state.asl.json --format svg -o /work/diagram.svg
44
+
45
+ docker run --rm -v "$PWD":/work ghcr.io/yusufaf/sfn-diagram:latest \
46
+ /work/state.asl.json --format png -o /work/diagram.png
47
+ ```
48
+
49
+ Tags: `latest`, `<major>`, `<major>.<minor>`, `<major>.<minor>.<patch>`.
50
+
25
51
  ## Quick Start
26
52
 
27
53
  ### Function-based API