New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@sei-atl/step-function-executor

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sei-atl/step-function-executor

Use this utility to execute serverless Step Functions locally!

latest
npmnpm
Version
0.5.3
Version published
Maintainers
1
Created
Source

step-function-executor

Use this utility to execute serverless Step Functions locally!

Installation

This module is installed via npm:

npm install --save-dev step-function-executor

Example Usage:

let { Serverless } = require('step-function-executor');

let serverless = new Serverless({ verbose: true });
serverless.load('../serverless.yml', {
  stage: 'test'
}).then(() => {
  let event = {
    context: {
      myParam: 'myValue'
    }
  };
  let context = {};
  serverless
    .getStepFunction()
    .execute(event, context)
  .then(event => {
    console.log('Ending event state:', JSON.stringify(event, null, 2));
  });
});

Documentation

Create a new instance of a Serverless object:

new Serverless(options);
NameTypeRequiredDefaultDescription
optionsobjectfalseoptional parameters
options.verbosebooleanfalsefalseset to true to log extra information during execution

Load the serverless.yml configuration file:

[Promise] load(configPath, opt, replace)

Return value: a Promise of a serverless instance loaded from the serverless.yml config file

Parameters:

NameTypeRequiredDefaultDescription
configPathstringtrueRelative path to the serverless.yml file to load
optobjectfalseServerless variable options ${opt:var}
replaceobjectfalseOptionally replace other items within the serverless.yml before loading

Gets a step function by name, or first available, as defined by the serverless.yml config file.

[StepFunction] getStepFunction(name)

Return value: The step function Throws:

  • ItemNotFoundException: thrown if no step function was found
  • IllegalStateException: thrown if getStepFunction() is called before load()

Parameters:

NameTypeRequireDefaultDescription
namestringfalseIf provided, retrieves the step function with the provided name. If not provided, retrieves the first step function that is defined.

Changelog

  • [Date] description

Licensing

step-function-executor is licensed under the MIT License.

All files located in the node_modules and external directories are externally maintained libraries used by this software which have their own licenses; we recommend you read them, as their terms may differ from the terms in the MIT License.

FAQs

Package last updated on 28 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts