Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@beesley/push-function-zips
Advanced tools
Zips up and uploads build artifacts for serverless functions
Zips up and uploads build artifacts for serverless functions
Typically this module would be used from the command line. The command line args are described here.
Argument | Description | Type | Required? |
---|---|---|---|
--help | Show help | [boolean] | |
--version | Show version number | [boolean] | |
--inputPath | The path to the lambda code and node_modules | [string] | [required] |
--include | An array of globs defining what to bundle | [array] | [required] |
--exclude | An array of globs defining what not to bundle | [array] | |
--rootDir | An optional path within the zip to save the files to | [string] | |
--regions | A list of regions to upload the assets in | [array] | [required] |
--buckets | A list of buckets to upload to (same order as the regions please) | [array] | [required] |
--functionKey | The path/filename of the zip file in the bucket (you don't need to add the .zip extension, but remember to include a version string of some sort) | [string] | [required] |
--layerKey | Tells the module to split out the node modules into a zip that you can create a lambda layer from | [string] | |
--versionSuffix | An optional string to append to layer and function keys to use as a version indicator | [string] | |
--platform | Which cloud provider we are uploading to (AWS or GCP) | [string] |
npx @beesley/push-function-zips --inputPath './' --include 'dist/**' --regions 'eu-central-1' --buckets 'my-lambda-artefacts' --functionKey 'hello-function' --layerKey 'hello-function-dependencies' --platform 'AWS' --versionSuffix '1.0.0'
It is possible to use this module programmatically if you so desire.
import { packageAndUpload } from '@beesley/push-function-zips';
await packageAndUpload({
inputPath: './',
include: ['dist/**'],
createLayer: true,
region: 'eu-central-1',
bucket: 'my-lambda-artefacts',
functionKey: 'hello-function',
layerKey: 'hello-function-dependencies',
});
Options to define an upload task
Type: {inputPath: string, include: Array<string>?, exclude: Array<string>?, createLayer: boolean?, rootDir: string?, region: string, bucket: string, functionKey: string, layerKey: string?, project: string?, platform: Platform}
inputPath
string include
Array<string>? exclude
Array<string>? createLayer
boolean? rootDir
string? region
string bucket
string functionKey
string layerKey
string? project
string? platform
Platform A pointer to where the files to upload are located
Type: string
An array of globs to include in the zip
An array of globs to exclude from the zip
Whether or not to create a layer zip
Type: boolean
A position within the zip to mount the files
Type: string
The AWS region to upload the assets to
Type: string
The name of the S3 bucket to upload to
Type: string
The key name to upload the function zip as
Type: string
The key name to upload the layer as
Type: string
The name of a google project to upload to
Type: string
The target we're uploading to
Type: Platform
src/package-and-upload.ts:15-33
Packages up an asset based on globs and uploads zips to storage
arg
Options Configuration defining what to upload to whereReturns any {Promise}
FAQs
Zips up and uploads build artifacts for serverless functions
The npm package @beesley/push-function-zips receives a total of 14 weekly downloads. As such, @beesley/push-function-zips popularity was classified as not popular.
We found that @beesley/push-function-zips demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.