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 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 relies on a headless browser, provided by the optional peer dependency `node-html-to-image`. Install it only if you use `sfn-diagram/png`:
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 node-html-to-image
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
@@ -1,4 +1,3 @@
1
- require("./ci.cjs");
2
1
  let _aws_sdk_client_sfn = require("@aws-sdk/client-sfn");
3
2
  //#region src/aws.ts
4
3
  /**
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