state-machine-cat 10.1.1 → 10.1.3

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 (36) hide show
  1. package/README.md +1 -1
  2. package/bin/smcat.mjs +5 -0
  3. package/dist/commonjs/bundle.js +64 -64
  4. package/package.json +33 -32
  5. package/src/cli/actions.mjs +9 -0
  6. package/src/cli/file-name-to-stream.mjs +5 -6
  7. package/src/cli/make-description.mjs +9 -0
  8. package/src/cli/normalize.mjs +79 -41
  9. package/src/cli/validations.mjs +27 -1
  10. package/src/index-node.mjs +15 -47
  11. package/src/index.mjs +9 -9
  12. package/src/options.mjs +19 -13
  13. package/src/parse/index.mjs +13 -0
  14. package/src/parse/parser-helpers.mjs +70 -6
  15. package/src/parse/scxml/index.mjs +40 -1
  16. package/src/parse/scxml/normalize-machine.mjs +1 -1
  17. package/src/render/dot/attributebuilder.mjs +7 -0
  18. package/src/render/dot/counter.mjs +13 -0
  19. package/src/render/dot/index.mjs +66 -28
  20. package/src/render/dot/render-dot-from-ast.js +37 -15
  21. package/src/render/dot/state-transformers.mjs +4 -2
  22. package/src/render/dot/utl.mjs +20 -0
  23. package/src/render/index-node.mjs +9 -3
  24. package/src/render/index.mjs +3 -3
  25. package/src/render/scjson/index.mjs +6 -0
  26. package/src/render/scjson/make-valid-xml-name.mjs +7 -1
  27. package/src/render/scxml/index.mjs +3 -1
  28. package/src/render/smcat/index.js +48 -14
  29. package/src/render/vector/dot-to-vector-native.mjs +1 -1
  30. package/src/render/vector/vector-native-dot-with-fallback.mjs +3 -2
  31. package/src/render/vector/vector-with-viz-js.mjs +3 -2
  32. package/src/state-machine-model.mjs +46 -4
  33. package/src/transform/desugar.mjs +67 -18
  34. package/src/transform/utl.mjs +8 -0
  35. package/src/version.mjs +2 -1
  36. package/types/state-machine-cat.d.ts +41 -14
package/README.md CHANGED
@@ -653,7 +653,7 @@ I made the parser with peggy - you can find it at
653
653
  - Despite this you might bump into the occasional issue - don't hesitate to
654
654
  report it, either on [GitLab](https://gitlab.com/sverweij/state-machine-cat/issues)
655
655
  or on [GitHub](https://github.com/sverweij/state-machine-cat/issues).
656
- - Runs on latest versions of firefox, safari and chrome and node versions >= 10.
656
+ - Runs on latest versions of firefox, safari and chrome and node versions >= 14.13.1.
657
657
  Although it might run on other environments, it's not tested there. I will
658
658
  reject issues on these other environments, unless they're accompanied with
659
659
  sufficient enticement to make it worth my while.
package/bin/smcat.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ // @ts-check
2
3
  import { readFileSync } from "node:fs";
3
4
  import { program } from "commander";
4
5
  import satisfies from "semver/functions/satisfies.js";
@@ -25,6 +26,10 @@ if (!satisfies(process.versions.node, $package.engines.node)) {
25
26
  }
26
27
  /* c8 ignore stop */
27
28
 
29
+ /**
30
+ * @param {any} pError
31
+ * @return {void}
32
+ */
28
33
  function presentError(pError) {
29
34
  process.stderr.write(actions.formatError(pError));
30
35