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

@getcircuit/ffd

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getcircuit/ffd

Stop deploying everything. Detect what functions to deploy with `ffd`.

  • 0.8.0-0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

(f)irebase-(f)unctions-(d)eployer

Stop deploying everything. Detect what functions to deploy with ffd.

Under active development. Not ready for usage.

Have you ever needed a tool to automate deployments without pushing all the functions, all the time? ffd allows you to deploy only functions that changed since your last deploy.

ffd works by scanning the file where your function is declared. If the file content changes, even if the change is within the dependency tree (via import or require) the script spots the difference and generates a new hash for the file.

File hashes are stored in a file called functions-lock.json created by ffd:

{
  "warning": "DO NOT EDIT. THIS FILE IS AUTO-GENERATED.",
  "functions": {
    "moduleA": "3bc37d786d96117935bb",
    "moduleB": "3d029baae420526b36ca"
  }
}

To generate a functions-lock.json file, ffd needs a config file. The config file includes information about your functions and their path location.

Sample config file:

{
  "myFunctionName1": "./myFunctionName1.js",
  "myFunctionName2": "./myFunctionName2.js"
}

Note: In an ideal world, each function you want to deploy would be stored in their own file. If you are not there yet, and ffd spots a file with more than one function, any changes within that file would trigger an update on every function. That is due to how ffd works, and the best you can do to avoid this scenario is splitting functions into their own files.

{
  // `myFunctionName1` has same path as `myFunctionName3`. Changes within `./myFunctionName1.js` scope
  // updates both `myFunctionName1` and `myFunctionName3`. Split functions into files to prevent this.
  "myFunctionName1": "./myFunctionName__shared.js",
  "myFunctionName2": "./myFunctionName2.js",
  "myFunctionName3": "./myFunctionName__shared.js"
}

Install

# works via npm too. volta too.
yarn add firebase-functions-deployer

Usage

Package comes with an alias ffd. Acronym means (f)irebase-(f)unctions-(d)eployer. As a CLI tool, you should run it via npx. The CLI expects a --config parameter to work.

npx ffd --config <path_to_config_file> <options>

Options

Options:
  -V, --version                                   output the version number
  -c, --config <path_to_config_file>              set config file path
  -d, --debug <none|errors-only|errors-warnings>  output debug info (default: "none")
  -h, --help                                      display help for command

License

MIT

FAQs

Package last updated on 22 Jan 2021

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