Installations
npm install serverless-step-functions-offline-async
Score
63
Supply Chain
97.6
Quality
75.3
Maintenance
100
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Developer
pdcarroll
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
14.15.4
NPM Version
6.14.10
Statistics
113 Commits
17 Branches
1 Contributors
Updated on 20 May 2021
Bundle Size
452.20 kB
Minified
121.82 kB
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
1,514
Last day
0%
1
Compared to previous day
Last week
-57.9%
8
Compared to previous week
Last month
23.9%
57
Compared to previous month
Last year
72.5%
276
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
7
serverless-step-functions-offline-async
This is a fork of serverless-step-functions-offline with added support for async Lambda handlers.
:warning: Version 2.0 with breaking changes see usage :warning:
Documentation
Install
Using NPM:
1npm install serverless-step-functions-offline-async --save-dev
or Yarn:
1yarn add serverless-step-functions-offline-async --dev
Setup
Add the plugin to your serverless.yml
:
1# serverless.yml 2 3plugins: 4 - serverless-step-functions-offline
To verify that the plugin works, run this in your command line:
1sls step-functions-offline
It should rise an error like that:
Serverless plugin "serverless-step-functions-offline" initialization errored: Please add ENV_VARIABLES to section "custom"
Requirements
This plugin works only with serverless-step-functions.
You must have this plugin installed and correctly specified statemachine definition using Amazon States Language.
Example of statemachine definition you can see here.
Usage
After all steps are done, need to add to section custom in serverless.yml the key stepFunctionsOffline with properties stateName: name of lambda function.
For example:
1service: ServerlessStepPlugin 2frameworkVersion: ">=1.13.0 <2.0.0" 3plugins: 4 - serverless-step-functions-offline 5 6# ... 7 8custom: 9 stepFunctionsOffline: 10 FirstLambda: firstLambda #(v2.0) 11 # ... 12 # ... 13 SecondLambda: secondLambda #(v2.0) 14 15functions: 16 firstLambda: 17 handler: firstLambda/index.handler 18 name: TheFirstLambda 19 secondLambda: 20 handler: secondLambda/index.handler 21 name: TheSecondLambda 22stepFunctions: 23 stateMachines: 24 foo: 25 definition: 26 Comment: "An example of the Amazon States Language using wait states" 27 StartAt: FirstLambda 28 States: 29 FirstLambda: 30 Type: Task 31 Resource: arn:aws:lambda:eu-west-1:123456789:function:TheFirstLambda 32 Next: SecondLambda 33 SecondLambda: 34 Type: Task 35 Resource: arn:aws:lambda:eu-west-1:123456789:function:TheSecondLambda 36 End: true
Where:
StepOne
is the name of step in state machinefirstLambda
is the name of function in section functions
Async Support
Lambda handler functions can use async
:
firstLambda/index.js
:
1module.exports = async function handler (event, context, callback) { 2 ... 3}
Run Plugin
1sls step-functions-offline --stateMachine={{name}} --event={{path to event file}}
name
: name of state machine in section state functions. In example above it'sfoo
.event
: input values for execution in JSON format (optional)
If you want to know where you are (in offline mode or not) you can use env variable STEP_IS_OFFLINE
.
By default process.env.STEP_IS_OFFLINE = true
.
What does plugin support?
States | Support |
---|---|
Task | At this moment plugin does not support fields Retry, Catch, TimeoutSeconds, HeartbeatSeconds |
Choice | All comparison operators except: And, Not, Or |
Wait | All following fields: Seconds, SecondsPath, Timestamp, TimestampPath |
Parallel | Only Branches |
Pass | Result, ResultPath |
Fail | Cause, Error |
Succeed |
Usage with serverless-webpack
The plugin integrates very well with serverless-webpack.
Add the plugins serverless-webpack
to your serverless.yml
file and make sure that serverless-webpack
precedes serverless-step-functions-offline
as the order is important:
1 plugins: 2 ... 3 - serverless-webpack 4 ... 5 - serverless-step-functions-offline 6 ...
TODOs
- Support context object
- Improve performance
- Fixing bugs
- Support Pass, Fail, Succeed
- Integration with serverless-webpack
- Add unit tests - to make plugin stable (next step)
- Support fields Retry, Catch
- Support other languages except node.js
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
77 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-rrc9-gqf8-8rwg
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-h452-7996-h45h
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-qgfr-5hqp-vrw9
- Warn: Project is vulnerable to: GHSA-hr2v-3952-633q
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm
- Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6
- Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9
- Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f
- Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p
- Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv
- Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8
- Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65
- Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-8g7p-74h8-hg48
- Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4
- Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj
- Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2
- Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5
- Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp
- Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq
- Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr
- Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765
- Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-hxcm-v35h-mg2x
- Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-pv4c-p2j5-38j4
- Warn: Project is vulnerable to: GHSA-46c4-8wrp-j99v
- Warn: Project is vulnerable to: GHSA-9m6j-fcg5-2442
- Warn: Project is vulnerable to: GHSA-hh27-ffr2-f2jc
- Warn: Project is vulnerable to: GHSA-rqff-837h-mm52
- Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2
- Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j
- Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.7
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to serverless-step-functions-offline-async
serverless-step-functions
The module is AWS Step Functions plugin for Serverless Framework
serverless-offline
Emulate AWS λ and API Gateway locally when developing your Serverless project
serverless-webpack
Serverless plugin to bundle your javascript with Webpack
serverless-step-functions-local
Run AWS step functions offline with Serverless