Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fastly/create-compute

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastly/create-compute

A CLI for creating new JavaScript (TypeScript) applications on Fastly Compute

  • 0.1.0-beta.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by14.29%
Maintainers
0
Weekly downloads
 
Created
Source

@fastly/create-compute

An npm create script for interactively creating new JavaScript (TypeScript) applications for Fastly Compute.

npm create @fastly/compute

Follow the interactive prompts to select a directory, language, and starter kit, to create your Fastly Compute application in JavaScript or TypeScript.

example

NOTE: @fastly/create-compute is provided as a Fastly Labs product. Visit the Fastly Labs site for terms of use.

Usage

In its simplest form:

npm create @fastly/compute

You may also pass a number of command line options, in the form of npm create @fastly/compute -- [<options>]:

Options:
  --help                        - Displays a help screen.
  --directory=<pathspec>        - Specifies the directory to create the new
                                  application. If the directory exists, it must
                                  be empty. Defaults to the current directory.
  --author=<author-name>, ...   - Sets the author(s) in fastly.toml.
  --language=<lang>             - Used to select a category of starter kit.
                                  Can be 'javascript' or 'typescript'.
                                  Cannot be used with --from.
  --starter-kit=<id>            - Used to specify a starter kit. Must be used
                                  with --language, and cannot be used with
                                  --default-starter-kit or --from.
  --default-starter-kit         - Uses 'default' as the starter kit. Cannot be
                                  used with --starter-kit or --from.                               
  --from=<pathspec-or-url>      - Specifies a directory with a fastly.toml, a
                                  URL to a GitHub repo path with a fastly.toml,
                                  or a URL to a Fiddle, and will be used as the
                                  starting point of the new application. Cannot
                                  be used with --language or --starter-kit.
  --fastly-cli-path=<pathspec>  - Path to the fastly CLI command. If not
                                  specified, then it will be searched from the
                                  system path.
  --no-confirm                  - Do not show confirmation prompt before
                                  creating the application.

Selecting a Starter Kit

After choosing a language (or specifying one via --language), you are prompted to select a starter kit. The initial list will contain a small selection of common starter kits. If you wish to pick from the full list of Fastly-provided Starter Kits for the selected language, select Choose a starter kit from GitHub., and the tool will query GitHub for the widest selection.

Specifying a template

By using the --from argument, or by selecting Specify starter kit or directory from the interactive prompts, you may specify an existing Compute JavaScript application to base your new application from. You may provide one of the following:

  • A path to a local directory that contains a Compute program, e.g., /path/to/existing/app.
  • A direct URL to a GitHub repository of a Fastly Compute Starter Kit.
  • A URL to a Fastly Fiddle. This should take the form of https://fiddle.fastly.dev/fiddle/<fiddle-id>.

Prerequisites:

Issues

If you encounter any non-security-related bug or unexpected behavior, please file an issue using the bug report template.

Security issues

Please see our SECURITY.md for guidance on reporting security-related issues.

License

MIT.

FAQs

Package last updated on 04 Aug 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc