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

@architect/hydrate

Package Overview
Dependencies
Maintainers
7
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@architect/hydrate

Architect dependency hydrator and shared file manager

  • 1.3.0-RC.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-74.78%
Maintainers
7
Weekly downloads
 
Created
Source

@architect/hydrate Travis Build Status Appveyor Build Status codecov

@architect/hydrate ensures that all functions managed by architect have their dependencies installed. Functions containing all its required dependencies are considered to be 'hydrated' - thus the name!

@architect/hydrate supports dependencies managed in the following languages using the following package managers:

  • node.js via npm using package.json and package-lock.json files
  • python (3.7+) via pip3 using a requirements.txt file
  • ruby via bundle using Gemfile and Gemfile.lock files

Installation

npm install @architect/hydrate

API

hydrate(options)

options object can include the following properties:

  • basepath: What path hydrate should consider as the root for searching for functions to hydrate. Useful if you want to hydrate a subset of functions. Defaults to src in the current working directory.
  • install: If truthy, will invoke hydrate.install().
  • update: If truthy, will invoke hydrate.update().

By default, invokes hydrate.shared().

hydrate.install(basepath='src', callback)

Installs dependencies for all Functions found in the specified basepath. Invokes hydrate.shared().

Note that for the default value of basepath='src', this means install will also hydrate shared folders like src/shared and src/views.

To ensure local development behavior is as close to staging and production as possible, hydrate.install() (and other hydrate functions) uses:

  • node.js: npm ci if package-lock.json is present and npm i if not
  • python: pip3 install
  • ruby: bundle install

hydrate.update(basepath='src', callback)

Updates dependencies in all Functions found in the specified basepath. Invokes hydrate.shared(). Note that this will only functionally differ from hydrate.install() if you use a lockfile like package-lock.json or Gemfile.lock.

Note that for the default value of basepath='src', this means update will also update dependencies in shared folders like src/shared and src/views.

update is functionally almost identical to install, except it will update dependencies to newer versions if they exist. This is done via:

  • node.js: npm update
  • python: pip3 install -U --upgrade-strategy eager
  • ruby: bundle update

hydrate.shared(callback)

Copies shared code (from src/shared and src/views) into all Functions.

FAQs

Package last updated on 19 Aug 2019

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