sfn-diagram 1.6.0 → 1.6.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/dist/cli.js +15 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
import { parseArgs as parseArgs$1 } from "node:util";
|
|
6
6
|
import { parse } from "yaml";
|
|
7
7
|
import dagre from "@dagrejs/dagre";
|
|
@@ -5854,7 +5854,19 @@ function writeOutput(content, outputPath) {
|
|
|
5854
5854
|
if (!content.endsWith("\n")) process.stdout.write("\n");
|
|
5855
5855
|
}
|
|
5856
5856
|
}
|
|
5857
|
-
|
|
5857
|
+
function toRealPath(path) {
|
|
5858
|
+
try {
|
|
5859
|
+
return realpathSync(path);
|
|
5860
|
+
} catch {
|
|
5861
|
+
return path;
|
|
5862
|
+
}
|
|
5863
|
+
}
|
|
5864
|
+
function isInvokedDirectly() {
|
|
5865
|
+
const invoked = process.argv[1];
|
|
5866
|
+
if (invoked === void 0) return false;
|
|
5867
|
+
return pathToFileURL(toRealPath(fileURLToPath(import.meta.url))).href === pathToFileURL(toRealPath(invoked)).href;
|
|
5868
|
+
}
|
|
5869
|
+
if (isInvokedDirectly()) run(process.argv.slice(2)).then((code) => {
|
|
5858
5870
|
process.exitCode = code;
|
|
5859
5871
|
});
|
|
5860
5872
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfn-diagram",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Generate SVG, Mermaid, HTML, and PNG diagrams from AWS Step Functions ASL definitions, CloudFormation/CDK templates, or live AWS state machines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@9.15.9",
|