aws-local-stepfunctions 0.5.0 → 0.6.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
@@ -2,11 +2,9 @@
2
2
 
3
3
  A TypeScript implementation of the [Amazon States Language specification](https://states-language.net/spec.html).
4
4
 
5
- This package lets you run AWS Step Functions locally, both in Node.js and in the browser!
5
+ This package lets you run AWS Step Functions completely locally, both in Node.js and in the browser!
6
6
 
7
- > NOTE: This is a work in progress. Some features defined in the specification might not be supported at all yet or might have limited support.
8
-
9
- ## Table of Contents
7
+ ## Table of contents
10
8
 
11
9
  - [Features](#features)
12
10
  - [Installation](#installation)
@@ -23,7 +21,7 @@ This package lets you run AWS Step Functions locally, both in Node.js and in the
23
21
 
24
22
  ## Features
25
23
 
26
- To see a list of features that have full support, partial support, or no support, refer to [this document](/docs/feature-support.md).
24
+ To see the list of features defined in the specification that have full support, partial support, or no support, refer to [this document](/docs/feature-support.md).
27
25
 
28
26
  ## Installation
29
27
 
@@ -78,11 +76,11 @@ The constructor takes the following parameters:
78
76
  - `validationOptions?`: An object that specifies how the definition should be validated.
79
77
  - `checkPaths`: If set to `false`, won't validate JSONPaths.
80
78
  - `checkArn`: If set to `false`, won't validate ARN syntax in `Task` states.
81
- - `awsConfig?`: An object that specifies the AWS region and credentials to use when invoking a Lambda function in a `Task` state. If not set, the AWS config will be resolved based on the [credentials provider chain](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html) of the AWS SDK for JavaScript V3. You don't need to use this option if you have a [shared config/credentials file](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html) (for example, if you have the [AWS CLI](https://aws.amazon.com/cli/) installed) or if you use a local override for all of your `Task` states.
79
+ - `awsConfig?`: An object that specifies the [AWS region and credentials](/docs/feature-support.md#providing-aws-credentials-and-region-to-execute-lambda-functions-specified-in-task-states) to use when invoking a Lambda function in a `Task` state. If not set, the AWS config will be resolved based on the [credentials provider chain](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html) of the AWS SDK for JavaScript V3. You don't need to use this option if you have a [shared config/credentials file](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html) (for example, if you have the [AWS CLI](https://aws.amazon.com/cli/) installed) or if you use a local override for all of your `Task` states.
82
80
  - `region`: The AWS region where the Lambda functions are created.
83
81
  - `credentials`: An object that specifies which type of credentials to use.
84
- - `cognitoIdentityPool`: An object that specifies the Cognito Identity Pool to use for requesting credentials.
85
- - `accessKeys`: An object that specifies the [Access Key ID and Secret Access Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html#sec-access-keys-and-secret-access-keys) to use as credentials.
82
+ - `cognitoIdentityPool`: An object that specifies the Cognito Identity Pool ID to use for requesting credentials.
83
+ - `accessKeys`: An object that specifies the Access Key ID and Secret Access Key to use as credentials.
86
84
 
87
85
  The constructor will attempt to validate the definition by default, unless the `validationOptions` property is specified. If the definition is not valid, an error will be thrown.
88
86
 
@@ -113,7 +111,7 @@ const stateMachine = new StateMachine(machineDefinition, {
113
111
 
114
112
  Runs the state machine with the given `input` parameter and returns an object with the following properties:
115
113
 
116
- - `abort`: A function that takes no parameters and doesn't return any value. If called, aborts the execution and throws an `ExecutionAbortedError`, unless the `noThrowOnAbort` option is set.
114
+ - `abort`: A function that takes no parameters and doesn't return any value. If called, [aborts the execution](/docs/feature-support.md#abort-a-running-execution) and throws an `ExecutionAbortedError`, unless the `noThrowOnAbort` option is set.
117
115
  - `result`: A `Promise` that resolves with the execution result once it finishes.
118
116
 
119
117
  Each execution is independent of all others, meaning that you can concurrently call this method as many times as needed, without worrying about race conditions.
@@ -123,8 +121,8 @@ Each execution is independent of all others, meaning that you can concurrently c
123
121
  - `input`: The initial input to pass to the state machine. This can be any valid JSON value.
124
122
  - `options?`:
125
123
  - `overrides?`: An object to override the behavior of certain states:
126
- - `taskResourceLocalHandlers?`: Overrides the resource of the specified `Task` states to run a local function.
127
- - `waitTimeOverrides?`: Overrides the wait duration of the specified `Wait` states. The specifed override duration should be in milliseconds.
124
+ - `taskResourceLocalHandlers?`: An [object that overrides](/docs/feature-support.md#task-state-resource-override) the resource of the specified `Task` states to run a local function.
125
+ - `waitTimeOverrides?`: An [object that overrides](/docs/feature-support.md#wait-state-duration-override) the wait duration of the specified `Wait` states. The specifed override duration should be in milliseconds.
128
126
  - `noThrowOnAbort?`: If this option is set to `true`, aborting the execution will simply return `null` as result instead of throwing.
129
127
 
130
128
  #### Basic example: