Package Exports
- warehouse.ai-api-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 (warehouse.ai-api-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
warehouse.ai-api-client
API client to communicate with warehouse.ai.
install
npm install warehouse.ai-api-client --saveUsage
const Warehouse = require('warehouse.ai-api-client');
const wrhs = new Warehouse('https://warehouse-instance');
// Get build for environment for a given package name
wrhs.builds.get({ env, pkg }, (err, build) => {});Configuration
There is ton of configuration you can do with your client. While you can just
pass a string like the above snippet to configure where your wrhs instance is hosted,
there are a bunch of additional options you can pass as an object:
const wrhs = new Warehouse({
uri: 'https://warehouse-instance', // where the wrhs instance is located
retry: {}, // retry configuration (see below)
auth: 'Bearer 123a4567-1a23-12345-a123-a1ab123a1234', // token you can use to authenticate your request
timeout: 3e4, // how long to wait until a request times out, in milliseconds
strictSSL: false, // whether or not to use https
concurrency: 10, // how many builds to verify at once (you can also use conc as shorthand)
dry: false, // whether or not to skip verification for each build
builds: {
cache: {
enabled: false
// any other cache options (see below)
}
}
});- The
retryoptions are just parameters passed intoretryme. - The
cacheoptions are just those passed toout-of-band-cache