Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

godaddy/carpenterd-api-client

Repository files navigation

carpenterd-api-client

⚠️ DEPRECATED: This package is no longer maintained and has been deprecated. Please use an alternative solution or contact the maintainers for more information.

Version npm License npm Downloads Dependencies

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

Usage

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

'use strict';

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

const 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.

API

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

About

API client for carpenterd

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 7