Socket
Book a DemoInstallSign in
Socket

carpenterd-api-client

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carpenterd-api-client

Node.js API client to interact with the carpenter build service.

2.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
-50%
Maintainers
5
Weekly downloads
 
Created
Source

carpenterd-api-client

The carpenterd-api-client is an API client for the carpenterd build service.

Install

Install carpenterd-api-client from the npm registry:

npm install --save carpenterd-api-client

API

In all examples we assume that you've already initialized the client as followed:

'use strict';

var Carpenter = require('carpenterd-api-client');

var carpenter = new Carpenter('url-to-the-service');

As you can see in the example above, the Carpenter constructor requires one argument:

  • The URL of the carpenter API where we should send the requests to.

build

Trigger a new build on carpenter service. The data provided should have the same structure and signature as npm publish posted JSON.

carpenter.build({ data: {
  "name": "tester",               // name of the package
  "dist-tags": {
    "latest": "1.0.0"
  },
  "versions": {
    "1.0.0": {
      "name": "tester",
      "version": "1.0.0"
      ...
    }
  },
  "_attachment": ""               // base64 encoded binary blob
}}, function () {

});

cancel

Cancel a build on carpenter service.

carpenter.cancel({
  "pkg": "tester",                  // name of the package
  "version": "1.0.0",               // valid semver
  "env": "prod"                     // optional environment parameter
}}, function () {

});

Tests

npm test

License

MIT

Keywords

carpenter

FAQs

Package last updated on 16 Jan 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.