@atomist/skill-entry-point

0.1.44 • Public • Published

Installation

npm install @atomist/skill-entry-point

start(handler)

Start a CloudRun skill handler function

Examples:

const api = require("@atomist/skill-entry-point")

api.start(async payload => {
  payload.logger.info(`skill id: ${payload.skill.id}`)
  return {status: {code: 0, reason: "hey"}}
});

Params:

  • Function handler async callback which will receive the skill payload

Return:

  • Object js Object should have a status key to report back on the skill processing.

prStr(obj)

create an application/edn string.

Examples:

var obj = {"a/b": BigInt("123456")}
prStr(obj)

Params:

  • Object obj the js Object to serialize to application/edn.

Return:

  • String application/edn string with BigInts serialized with tags

readString(s)

read a js Object from an application/edn string.

Examples:

var s = prStr({"a/b": BigInt("123456")})
var obj = readString(s)

Params:

  • String s the application/edn string.

Return:

  • Object js Object

Building

  • working dir must be clean
  • the HEAD commit must not have a tag
  • the last reachable tag from the HEAD commit must be a valid semver
  • that semver should be the current latest release

Create a new release using the command below.

bb release

Readme

Keywords

none

Package Sidebar

Install

npm i @atomist/skill-entry-point

Weekly Downloads

49

Version

0.1.44

License

none

Unpacked Size

220 kB

Total Files

3

Last publish

Collaborators

  • neilprosser
  • atomist-bot
  • cdupuis
  • slimslenderslacks