Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@serverless/client

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/client

The Serverless Platform Client makes it easy to access all Serverless Platform Services, wherever they are hosted.

latest
npmnpm
Version
0.1.5
Version published
Maintainers
4
Created
Source

Serverless Platform Client

The Serverless Platform Client makes it easy to access all Serverless Platform Services, wherever they are hosted.

Registry

const { Registry } = require('@serverless/client')

const config = {
  accessKey: 'xxx', // required only if you need to make authenticated calls.
  endpoint: 'xxx' // required only if you're using a self hosted version of the platform.
  stage: 'dev' // optional and overwritten by the SERVERLESS_PLATFORM_STAGE. Default is prod
}
const registry = new Registry(config)

prePublish()

const { Registry } = require('@serverless/client')

const config = {
  accessKey: 'xxx', // required only if you need to make authenticated calls.
  endpoint: 'xxx' // required only if you're using a self hosted version of the platform.
  stage: 'dev' // optional and overwritten by the SERVERLESS_PLATFORM_STAGE. Default is prod
}
const registry = new Registry(config)

const component = {
  name: 'myComponent', // required
  version: '1.0.0', // if not provided, default is dev
  org: 'serverlessinc' // required
}

const res = await registry.prePublish(prePublishInputs)

// res.url - s3 url to upload the component package to
// res.method - method to use when uploading the component package

prePublish()

const { Registry } = require('@serverless/client')

const config = {
  accessKey: 'xxx', // required only if you need to make authenticated calls.
  endpoint: 'xxx' // required only if you're using a self hosted version of the platform.
  stage: 'dev' // optional and overwritten by the SERVERLESS_PLATFORM_STAGE. Default is prod
}
const registry = new Registry()

const component = {
  name: 'myComponent', // required
  version: '1.0.0', // if not provided, default is dev
  org: 'serverlessinc' // required
}

const res = await registry.prePublish(prePublishInputs)

// res.url - s3 url to upload the component package to
// res.method - method to use when uploading the component package

FAQs

Package last updated on 13 Jan 2020

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