JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q31368F
  • License ISC

Package Exports

  • @serverless/client

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@serverless/client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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