warehouse.ai-api-client
Advanced tools
Comparing version 2.1.0 to 2.2.0
27
index.js
@@ -1,7 +0,8 @@ | ||
const debug = require('diagnostics')('warehouse'); | ||
const debug = require('diagnostics')('warehouse.ai-api-client'); | ||
const qs = require('querystringify'); | ||
const destroy = require('demolish'); | ||
const request = require('request'); | ||
const retry = require('retryme'); | ||
const Builds = require('./builds'); | ||
const retry = require('retryme'); | ||
const Verify = require('./verify'); | ||
@@ -13,3 +14,3 @@ /** | ||
* | ||
* - apiUrl: URL of the API | ||
* - uri: URL of the API | ||
* - timeout: Timeout in ms | ||
@@ -44,2 +45,6 @@ * | ||
// Options for verify | ||
this.conc = options.concurrency || options.conc || 10; | ||
this.dry = options.dry || false; | ||
// | ||
@@ -49,2 +54,3 @@ // Special subscriber API to manage subscription lists. | ||
this.builds = new Builds(this); | ||
this.verifier = new Verify(this); | ||
} | ||
@@ -73,2 +79,14 @@ | ||
/** | ||
* Verify a given pkg, env combination | ||
* @param {Object} opts - Options for verify { pkg, env, dry, conc, numFiles } | ||
* @param {Function} fn - Continuation to call when complete | ||
* @returns {Warehouse} instance of Warehouse | ||
* @api public | ||
*/ | ||
Warehouse.prototype.verify = function v(opts, fn) { | ||
this.verifier.execute(opts, fn); | ||
return this; | ||
}; | ||
/** | ||
* Proxy method to send requests to the Warehouse. | ||
@@ -143,3 +161,3 @@ * | ||
*/ | ||
Warehouse.prototype.destroy = destroy('send, builds'); | ||
Warehouse.prototype.destroy = destroy('send, builds', 'publish', 'verify'); | ||
@@ -151,2 +169,3 @@ // | ||
Warehouse.Verify = Verify; | ||
// | ||
@@ -153,0 +172,0 @@ // Expose the API. |
{ | ||
"name": "warehouse.ai-api-client", | ||
"description": "Node.JS API to communicate with warehouse.ai", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha test.js", | ||
"test": "mocha test/*.test.js", | ||
"lint": "eslint-godaddy --fix *.js lib/*.js", | ||
@@ -26,2 +26,3 @@ "pretest": "npm run lint" | ||
"dependencies": { | ||
"async": "^2.6.0", | ||
"demolish": "~1.0.2", | ||
@@ -36,2 +37,3 @@ "diagnostics": "~1.0.1", | ||
"babel-eslint": "^6.1.2", | ||
"clone": "^2.1.1", | ||
"eslint": "^3.5.0", | ||
@@ -43,4 +45,5 @@ "eslint-config-godaddy": "~1.0.0", | ||
"jscs-jsx-rules": "0.0.1", | ||
"mocha": "2.5.x" | ||
"mocha": "^5.0.0", | ||
"sinon": "^4.3.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24865
11
644
6
11
+ Addedasync@^2.6.0
+ Addedasync@2.6.4(transitive)
+ Addedlodash@4.17.21(transitive)