sfn-diagram 1.6.0 → 1.7.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 +2 -2
- package/dist/aws.cjs +0 -1
- package/dist/aws.d.cts +24 -26
- package/dist/aws.d.ts +24 -26
- package/dist/{cli.js → bin.js} +2288 -649
- package/dist/cfn.d.cts +44 -36
- package/dist/cfn.d.ts +44 -36
- package/dist/ci.cjs +1654 -349
- package/dist/ci.d.cts +134 -109
- package/dist/ci.d.ts +134 -109
- package/dist/ci.js +1651 -347
- package/dist/element-auto.cjs +1993 -369
- package/dist/element-auto.d.cts +1 -1
- package/dist/element-auto.d.ts +1 -1
- package/dist/element-auto.js +1991 -367
- package/dist/element.cjs +1993 -369
- package/dist/element.d.cts +92 -86
- package/dist/element.d.ts +92 -86
- package/dist/element.js +1991 -367
- package/dist/index.cjs +2161 -584
- package/dist/index.d.cts +867 -558
- package/dist/index.d.ts +867 -558
- package/dist/index.js +2155 -583
- package/dist/png.cjs +1825 -361
- package/dist/png.d.cts +226 -157
- package/dist/png.d.ts +226 -157
- package/dist/png.js +1823 -359
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -21,10 +21,10 @@ Generate diagrams from AWS Step Functions ASL (Amazon States Language) definitio
|
|
|
21
21
|
npm install sfn-diagram
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
The core package pulls in **no browser engine** — SVG and Mermaid generation stay lightweight. PNG export
|
|
24
|
+
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`:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
npm install sfn-diagram
|
|
27
|
+
npm install sfn-diagram @resvg/resvg-js
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
Not a Node project? The CLI also ships as standalone binaries for Linux, macOS, and Windows on every [release](https://github.com/yusufaf/sfn-diagram/releases), or via Homebrew (`brew install yusufaf/tap/sfn-diagram`), and as a [Docker image](https://sfn.yusufaf.dev/guides/cli/#docker). See [using sfn-diagram from other languages](https://sfn.yusufaf.dev/guides/other-languages/).
|
package/dist/aws.cjs
CHANGED
package/dist/aws.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HistoryEvent, SFNClient } from "@aws-sdk/client-sfn";
|
|
2
|
-
|
|
3
2
|
//#region src/aws.d.ts
|
|
4
|
-
interface FetchExecutionHistoryParams {
|
|
3
|
+
export interface FetchExecutionHistoryParams {
|
|
5
4
|
/** A caller-constructed SFN client (with the caller's credentials/region). */
|
|
6
5
|
client: SFNClient;
|
|
7
6
|
/** ARN of the execution whose history should be fetched. */
|
|
@@ -10,27 +9,26 @@ interface FetchExecutionHistoryParams {
|
|
|
10
9
|
maxResults?: number;
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
|
-
* Fetches the complete history of a Step Functions execution, paginating through
|
|
14
|
-
* every `GetExecutionHistory` page so callers don't have to hand-roll the
|
|
15
|
-
* `nextToken` loop.
|
|
16
|
-
*
|
|
17
|
-
* The returned `HistoryEvent[]` can be passed straight to `parseExecutionHistory`,
|
|
18
|
-
* `generateExecution`, or `generateMermaidExecution` from `sfn-diagram`.
|
|
19
|
-
*
|
|
20
|
-
* @param params - The SFN client, execution ARN, and optional page size.
|
|
21
|
-
* @returns All history events for the execution, in chronological order.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* import { SFNClient } from '@aws-sdk/client-sfn';
|
|
26
|
-
* import { fetchExecutionHistory } from 'sfn-diagram/aws';
|
|
27
|
-
* import { generateExecution } from 'sfn-diagram';
|
|
28
|
-
*
|
|
29
|
-
* const client = new SFNClient({ region: 'us-east-1' });
|
|
30
|
-
* const events = await fetchExecutionHistory({ client, executionArn });
|
|
31
|
-
* const { svg } = generateExecution({ aslDefinition: asl, history: events });
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
declare function fetchExecutionHistory(params: FetchExecutionHistoryParams): Promise<HistoryEvent[]>;
|
|
35
|
-
//#endregion
|
|
36
|
-
export { FetchExecutionHistoryParams, fetchExecutionHistory };
|
|
12
|
+
* Fetches the complete history of a Step Functions execution, paginating through
|
|
13
|
+
* every `GetExecutionHistory` page so callers don't have to hand-roll the
|
|
14
|
+
* `nextToken` loop.
|
|
15
|
+
*
|
|
16
|
+
* The returned `HistoryEvent[]` can be passed straight to `parseExecutionHistory`,
|
|
17
|
+
* `generateExecution`, or `generateMermaidExecution` from `sfn-diagram`.
|
|
18
|
+
*
|
|
19
|
+
* @param params - The SFN client, execution ARN, and optional page size.
|
|
20
|
+
* @returns All history events for the execution, in chronological order.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { SFNClient } from '@aws-sdk/client-sfn';
|
|
25
|
+
* import { fetchExecutionHistory } from 'sfn-diagram/aws';
|
|
26
|
+
* import { generateExecution } from 'sfn-diagram';
|
|
27
|
+
*
|
|
28
|
+
* const client = new SFNClient({ region: 'us-east-1' });
|
|
29
|
+
* const events = await fetchExecutionHistory({ client, executionArn });
|
|
30
|
+
* const { svg } = generateExecution({ aslDefinition: asl, history: events });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function fetchExecutionHistory(params: FetchExecutionHistoryParams): Promise<HistoryEvent[]>;
|
|
34
|
+
//#endregion
|
package/dist/aws.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HistoryEvent, SFNClient } from "@aws-sdk/client-sfn";
|
|
2
|
-
|
|
3
2
|
//#region src/aws.d.ts
|
|
4
|
-
interface FetchExecutionHistoryParams {
|
|
3
|
+
export interface FetchExecutionHistoryParams {
|
|
5
4
|
/** A caller-constructed SFN client (with the caller's credentials/region). */
|
|
6
5
|
client: SFNClient;
|
|
7
6
|
/** ARN of the execution whose history should be fetched. */
|
|
@@ -10,27 +9,26 @@ interface FetchExecutionHistoryParams {
|
|
|
10
9
|
maxResults?: number;
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
|
-
* Fetches the complete history of a Step Functions execution, paginating through
|
|
14
|
-
* every `GetExecutionHistory` page so callers don't have to hand-roll the
|
|
15
|
-
* `nextToken` loop.
|
|
16
|
-
*
|
|
17
|
-
* The returned `HistoryEvent[]` can be passed straight to `parseExecutionHistory`,
|
|
18
|
-
* `generateExecution`, or `generateMermaidExecution` from `sfn-diagram`.
|
|
19
|
-
*
|
|
20
|
-
* @param params - The SFN client, execution ARN, and optional page size.
|
|
21
|
-
* @returns All history events for the execution, in chronological order.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* import { SFNClient } from '@aws-sdk/client-sfn';
|
|
26
|
-
* import { fetchExecutionHistory } from 'sfn-diagram/aws';
|
|
27
|
-
* import { generateExecution } from 'sfn-diagram';
|
|
28
|
-
*
|
|
29
|
-
* const client = new SFNClient({ region: 'us-east-1' });
|
|
30
|
-
* const events = await fetchExecutionHistory({ client, executionArn });
|
|
31
|
-
* const { svg } = generateExecution({ aslDefinition: asl, history: events });
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
declare function fetchExecutionHistory(params: FetchExecutionHistoryParams): Promise<HistoryEvent[]>;
|
|
35
|
-
//#endregion
|
|
36
|
-
export { FetchExecutionHistoryParams, fetchExecutionHistory };
|
|
12
|
+
* Fetches the complete history of a Step Functions execution, paginating through
|
|
13
|
+
* every `GetExecutionHistory` page so callers don't have to hand-roll the
|
|
14
|
+
* `nextToken` loop.
|
|
15
|
+
*
|
|
16
|
+
* The returned `HistoryEvent[]` can be passed straight to `parseExecutionHistory`,
|
|
17
|
+
* `generateExecution`, or `generateMermaidExecution` from `sfn-diagram`.
|
|
18
|
+
*
|
|
19
|
+
* @param params - The SFN client, execution ARN, and optional page size.
|
|
20
|
+
* @returns All history events for the execution, in chronological order.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { SFNClient } from '@aws-sdk/client-sfn';
|
|
25
|
+
* import { fetchExecutionHistory } from 'sfn-diagram/aws';
|
|
26
|
+
* import { generateExecution } from 'sfn-diagram';
|
|
27
|
+
*
|
|
28
|
+
* const client = new SFNClient({ region: 'us-east-1' });
|
|
29
|
+
* const events = await fetchExecutionHistory({ client, executionArn });
|
|
30
|
+
* const { svg } = generateExecution({ aslDefinition: asl, history: events });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function fetchExecutionHistory(params: FetchExecutionHistoryParams): Promise<HistoryEvent[]>;
|
|
34
|
+
//#endregion
|