npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

stepfunctions-localhost

v0.2.0

Published

A wrapper for AWS's [Step Functions Local](https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html).

Downloads

13,087

Readme

🛠 stepfunctions-localhost

A wrapper for AWS's Step Functions Local.

Heavily inspired by dynamodb-localhost.

Requirements

  • Java Runtime Engine (JRE) version 6.x or newer

Install

npm install stepfunctions-localhost

Usage

const StepFunctionsLocal = require('stepfunctions-localhost');

const stepfunctionsLocal = new StepFunctionsLocal();

(async () => {
  await stepfunctionsLocal.install();

  stepfunctionsLocal.start({}).on('data', data => console.log(data.toString()));

  setTimeout(() => {
    stepfunctionsLocal.stop();

    stepfunctionsLocal.remove();
  }, 5000);
})();

This will download the files required to run step functions, start the step function server, wait 5 seconds, then stop the server and clean up after itself.

API

new StepFunctionsLocal(options)

Creates a new instance. options defaults to {quiet = false, path = './.step-functions-local'}.

.install()

Downloads files required to run step functions. Path defaults to ./.step-functions-local.

Returns Promise.

.start(options)

Starts the local server. Options match those of the actual step function server:

-account,--aws-account <Account>                               the AWS account used to create state machines, activities and executions,
                                                               this is also the account of your Lambda and other resources.
                                                               By Default, it is set to [123456789012], this is NOT a real account id.
-batchEndpoint,--batch-endpoint <Batch Endpoint>               the local endpoint of Batch.
                                                               e.g. http://localhost:4574
-dynamoDBEndpoint,--dynamodb-endpoint <DynamoDB Endpoint>      the local endpoint of DynamoDB.
                                                               e.g. http://localhost:4574
-ecsEndpoint,--ecs-endpoint <ECS Endpoint>                     the local endpoint of ECS.
                                                               e.g. http://localhost:4574
-glueEndpoint,--glue-endpoint <Glue Endpoint>                  the local endpoint of Glue.
                                                               e.g. http://localhost:4574
-h,--help                                                      Show this help information.
-lambdaEndpoint,--lambda-endpoint <Lambda Endpoint>            the local endpoint of Lambda.
                                                               e.g. http://localhost:4574
-region,--aws-region <Region>                                  the region where the state machines, activities and executions will be created,
                                                               this is also the region of other AWS resources referred in the state machine.
                                                               By Default, it is set to [us-east-1].
-sageMakerEndpoint,--sagemaker-endpoint <SageMaker Endpoint>   the local endpoint of SageMaker.
                                                               e.g. http://localhost:4574
-snsEndpoint,--sns-endpoint <SNS Endpoint>                     the local endpoint of SNS.
                                                               e.g. http://localhost:4574
-sqsEndpoint,--sqs-endpoint <SQS Endpoint>                     the local endpoint of SQS.
                                                               e.g. http://localhost:4574
-v,--version                                                   Show the version and build of Step Functions Local.
-waitTimeScale,--wait-time-scale <Wait Time Scale>             the scale of the wait time in the Wait state
                                                               e.g. 0.5 means cut the original wait time to half
                                                               e.g. 0 means no wait time
                                                               e.g. 2 means double the original wait time

For example, to set the account ID, the options object would be {account: 'fake-account-id'}.

Returns the stdout stream of the spawned server process.

.stop()

Stops the currently running instance.

.remove()

Removes local files that have been downloaded.