diff options
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client')
6 files changed, 153 insertions, 128 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/index.js b/deps/npm/node_modules/npm-registry-client/index.js index 8a9fb50351..07eab3f36c 100644 --- a/deps/npm/node_modules/npm-registry-client/index.js +++ b/deps/npm/node_modules/npm-registry-client/index.js @@ -60,6 +60,7 @@ function RegClient (config) { client.get = require('./lib/get') client.initialize = require('./lib/initialize') client.logout = require('./lib/logout') + client.org = require('./lib/org') client.ping = require('./lib/ping') client.publish = require('./lib/publish') client.request = require('./lib/request') diff --git a/deps/npm/node_modules/npm-registry-client/lib/org.js b/deps/npm/node_modules/npm-registry-client/lib/org.js new file mode 100644 index 0000000000..7c73caf7da --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/lib/org.js @@ -0,0 +1,62 @@ +'use strict' + +module.exports = org + +var assert = require('assert') +var url = require('url') + +var subcommands = {} + +function org (subcommand, uri, params, cb) { + orgAssertions(subcommand, uri, params, cb) + return subcommands[subcommand].call(this, uri, params, cb) +} + +subcommands.set = subcommands.add = function (uri, params, cb) { + return this.request(apiUri(uri, 'org', params.org, 'user'), { + method: 'PUT', + auth: params.auth, + body: JSON.stringify({ + user: params.user, + role: params.role + }) + }, cb) +} + +subcommands.rm = function (uri, params, cb) { + return this.request(apiUri(uri, 'org', params.org, 'user'), { + method: 'DELETE', + auth: params.auth, + body: JSON.stringify({ + user: params.user + }) + }, cb) +} + +subcommands.ls = function (uri, params, cb) { + return this.request(apiUri(uri, 'org', params.org, 'user'), { + method: 'GET', + auth: params.auth + }, cb) +} + +function apiUri (registryUri) { + var path = Array.prototype.slice.call(arguments, 1) + .map(encodeURIComponent) + .join('/') + return url.resolve(registryUri, '-/' + path) +} + +function orgAssertions (subcommand, uri, params, cb) { + assert(subcommand, 'subcommand is required') + assert(subcommands.hasOwnProperty(subcommand), + 'org subcommand must be one of ' + Object.keys(subcommands)) + assert(typeof uri === 'string', 'registry URI is required') + assert(typeof params === 'object', 'params are required') + assert(typeof params.auth === 'object', 'auth is required') + assert(!cb || typeof cb === 'function', 'callback must be a function') + assert(typeof params.org === 'string', 'org name is required') + if (subcommand === 'rm' || subcommand === 'add' || subcommand === 'set') { + assert(typeof params.user === 'string', 'user is required') + } +} diff --git a/deps/npm/node_modules/npm-registry-client/lib/publish.js b/deps/npm/node_modules/npm-registry-client/lib/publish.js index 9bf1c3066d..ecf593a4ac 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/publish.js +++ b/deps/npm/node_modules/npm-registry-client/lib/publish.js @@ -2,11 +2,11 @@ module.exports = publish var url = require('url') var semver = require('semver') -var crypto = require('crypto') var Stream = require('stream').Stream var assert = require('assert') var fixer = require('normalize-package-data').fixer var concat = require('concat-stream') +var ssri = require('ssri') function escaped (name) { return name.replace('/', '%2f') @@ -84,10 +84,16 @@ function putFirst (registry, data, tarbuffer, access, auth, cb) { var tbName = data.name + '-' + data.version + '.tgz' var tbURI = data.name + '/-/' + tbName + var integrity = ssri.fromData(tarbuffer, { + algorithms: ['sha1', 'sha512'] + }) data._id = data.name + '@' + data.version data.dist = data.dist || {} - data.dist.shasum = crypto.createHash('sha1').update(tarbuffer).digest('hex') + // Don't bother having sha1 in the actual integrity field + data.dist.integrity = integrity['sha512'][0].toString() + // Legacy shasum support + data.dist.shasum = integrity['sha1'][0].hexDigest() data.dist.tarball = url.resolve(registry, tbURI) .replace(/^https:\/\//, 'http://') diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json index b8b59f5c30..e051bc6e2a 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json @@ -1,18 +1,43 @@ { - "name": "typedarray", - "version": "0.0.6", + "_from": "typedarray@^0.0.6", + "_id": "typedarray@0.0.6", + "_integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "_location": "/npm-registry-client/concat-stream/typedarray", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "typedarray@^0.0.6", + "name": "typedarray", + "escapedName": "typedarray", + "rawSpec": "^0.0.6", + "saveSpec": null, + "fetchSpec": "^0.0.6" + }, + "_requiredBy": [ + "/npm-registry-client/concat-stream" + ], + "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", + "_shrinkwrap": null, + "_spec": "typedarray@^0.0.6", + "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/concat-stream", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bin": null, + "bugs": { + "url": "https://github.com/substack/typedarray/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, "description": "TypedArray polyfill for old browsers", - "main": "index.js", "devDependencies": { "tape": "~2.3.2" }, - "scripts": { - "test": "tape test/*.js test/server/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/typedarray.git" - }, "homepage": "https://github.com/substack/typedarray", "keywords": [ "ArrayBuffer", @@ -30,12 +55,18 @@ "array", "polyfill" ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, "license": "MIT", + "main": "index.js", + "name": "typedarray", + "optionalDependencies": {}, + "peerDependencies": {}, + "repository": { + "type": "git", + "url": "git://github.com/substack/typedarray.git" + }, + "scripts": { + "test": "tape test/*.js test/server/*.js" + }, "testling": { "files": "test/*.js", "browsers": [ @@ -52,28 +83,5 @@ "android-browser/4.2..latest" ] }, - "bugs": { - "url": "https://github.com/substack/typedarray/issues" - }, - "_id": "typedarray@0.0.6", - "dist": { - "shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "tarball": "http://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" - }, - "_from": "typedarray@>=0.0.5 <0.1.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "readme": "ERROR: No README data found!" + "version": "0.0.6" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json index 4963aecf2c..a215056dab 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json @@ -1,41 +1,18 @@ { - "_args": [ - [ - { - "raw": "concat-stream@^1.5.2", - "scope": null, - "escapedName": "concat-stream", - "name": "concat-stream", - "rawSpec": "^1.5.2", - "spec": ">=1.5.2 <2.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client" - ] - ], - "_from": "concat-stream@>=1.5.2 <2.0.0", + "_from": "concat-stream@^1.5.2", "_id": "concat-stream@1.6.0", - "_inCache": true, + "_integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", "_location": "/npm-registry-client/concat-stream", - "_nodeVersion": "4.6.2", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/concat-stream-1.6.0.tgz_1482162257023_0.2988202746491879" - }, - "_npmUser": { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - "_npmVersion": "2.15.11", "_phantomChildren": {}, "_requested": { + "type": "range", + "registry": true, "raw": "concat-stream@^1.5.2", - "scope": null, - "escapedName": "concat-stream", "name": "concat-stream", + "escapedName": "concat-stream", "rawSpec": "^1.5.2", - "spec": ">=1.5.2 <2.0.0", - "type": "range" + "saveSpec": null, + "fetchSpec": "^1.5.2" }, "_requiredBy": [ "/npm-registry-client" @@ -49,46 +26,33 @@ "name": "Max Ogden", "email": "max@maxogden.com" }, + "bin": null, "bugs": { "url": "http://github.com/maxogden/concat-stream/issues" }, + "bundleDependencies": false, "dependencies": { "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" }, + "deprecated": false, "description": "writable stream that concatenates strings or binary data and calls a callback with the result", "devDependencies": { "tape": "^4.6.3" }, - "directories": {}, - "dist": { - "shasum": "0aac662fd52be78964d5532f694784e70110acf7", - "tarball": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz" - }, "engines": [ "node >= 0.8" ], "files": [ "index.js" ], - "gitHead": "e482281642c1e011fc158f5749ef40a71c77a426", - "homepage": "https://github.com/maxogden/concat-stream", + "homepage": "https://github.com/maxogden/concat-stream#readme", "license": "MIT", "main": "index.js", - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - { - "name": "maxogden", - "email": "max@maxogden.com" - } - ], "name": "concat-stream", "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "peerDependencies": {}, "repository": { "type": "git", "url": "git+ssh://git@github.com/maxogden/concat-stream.git" diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index d579ab8b1a..3624d925fc 100644 --- a/deps/npm/node_modules/npm-registry-client/package.json +++ b/deps/npm/node_modules/npm-registry-client/package.json @@ -1,64 +1,54 @@ { - "_args": [ - [ - { - "raw": "npm-registry-client@8.1.0", - "scope": null, - "escapedName": "npm-registry-client", - "name": "npm-registry-client", - "rawSpec": "8.1.0", - "spec": "8.1.0", - "type": "version" - }, - "/Users/rebecca/code/npm" - ] - ], - "_from": "npm-registry-client@8.1.0", - "_hasShrinkwrap": false, - "_id": "npm-registry-client@8.1.0", + "_from": "npm-registry-client@~8.3.0", + "_id": "npm-registry-client@8.3.0", + "_integrity": "sha512-rBFLIisl55sq77Bf189ptxaFGEkTNcZpvR7UFZI7bmG/wYD2hY/2Ix1Ss26aOLSbyctwHuUPZ3tJRSYnkmMQkg==", "_location": "/npm-registry-client", "_phantomChildren": { "inherits": "2.0.3", - "readable-stream": "2.2.6" + "readable-stream": "2.2.9" }, "_requested": { - "raw": "npm-registry-client@8.1.0", - "scope": null, - "escapedName": "npm-registry-client", + "type": "range", + "registry": true, + "raw": "npm-registry-client@~8.3.0", "name": "npm-registry-client", - "rawSpec": "8.1.0", - "spec": "8.1.0", - "type": "version" + "escapedName": "npm-registry-client", + "rawSpec": "~8.3.0", + "saveSpec": null, + "fetchSpec": "~8.3.0" }, "_requiredBy": [ - "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.1.0.tgz", - "_shasum": "ed7e5f58dfb98cb905f7b8adbf4858ce746db8d3", + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.3.0.tgz", + "_shasum": "a86d5b1f97945de8df73c471d33602d5cd15130f", "_shrinkwrap": null, - "_spec": "npm-registry-client@8.1.0", - "_where": "/Users/rebecca/code/npm", + "_spec": "npm-registry-client@~8.3.0", + "_where": "/Users/zkat/Documents/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, + "bin": null, "bugs": { "url": "https://github.com/npm/npm-registry-client/issues" }, + "bundleDependencies": false, "dependencies": { "concat-stream": "^1.5.2", "graceful-fs": "^4.1.6", "normalize-package-data": "~1.0.1 || ^2.0.0", - "npm-package-arg": "^3.0.0 || ^4.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0", "npmlog": "2 || ^3.1.0 || ^4.0.0", "once": "^1.3.3", "request": "^2.74.0", "retry": "^0.10.0", "semver": "2 >=2.2.1 || 3.x || 4 || 5", - "slide": "^1.1.3" + "slide": "^1.1.3", + "ssri": "^4.1.2" }, + "deprecated": false, "description": "Client for the npm registry", "devDependencies": { "negotiator": "^0.6.1", @@ -69,11 +59,6 @@ "standard": "^9.0.0", "tap": "^10.3.0" }, - "directories": {}, - "dist": { - "shasum": "ed7e5f58dfb98cb905f7b8adbf4858ce746db8d3", - "tarball": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.1.0.tgz" - }, "files": [ "lib", "index.js" @@ -85,13 +70,12 @@ "optionalDependencies": { "npmlog": "2 || ^3.1.0 || ^4.0.0" }, - "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\nvar uri = \"https://registry.npmjs.org/npm\"\nvar params = {timeout: 1000}\n\nclient.get(uri, params, function (error, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Registry URLs\n\nThe registry calls take either a full URL pointing to a resource in the\nregistry, or a base URL for the registry as a whole (including the registry\npath – but be sure to terminate the path with `/`). `http` and `https` URLs are\nthe only ones supported.\n\n## Using the client\n\nEvery call to the client follows the same pattern:\n\n* `uri` {String} The *fully-qualified* URI of the registry API method being\n invoked.\n* `params` {Object} Per-request parameters.\n* `callback` {Function} Callback to be invoked when the call is complete.\n\n### Credentials\n\nMany requests to the registry can be authenticated, and require credentials\nfor authorization. These credentials always look the same:\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n**or**\n\n* `token` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n## Requests\n\nAs of `npm-registry-client@8`, all requests are made with an `Accept` header\nof `application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*`.\n\nThis enables filtered document responses to requests for package metadata.\nYou know that you got a filtered response if the mime type is set to\n`application/vnd.npm.install-v1+json` and not `application/json`.\n\nThis filtering substantially reduces the over all data size. For example\nfor `https://registry.npmjs.org/npm`, the compressed metadata goes from\n410kB to 21kB.\n\n## API\n\n### client.access(uri, params, cb)\n\n* `uri` {String} Registry URL for the package's access API endpoint.\n Looks like `/-/package/<package name>/access`.\n* `params` {Object} Object containing per-request properties.\n * `access` {String} New access level for the package. Can be either\n `public` or `restricted`. Registry will raise an error if trying\n to change the access level of an unscoped package.\n * `auth` {Credentials}\n\nSet the access level for scoped packages. For now, there are only two\naccess levels: \"public\" and \"restricted\".\n\n### client.adduser(uri, params, cb)\n\n* `uri` {String} Base registry URL.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nAdd a user account to the registry, or verify the credentials.\n\n### client.deprecate(uri, params, cb)\n\n* `uri` {String} Full registry URI for the deprecated package.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Semver version range.\n * `message` {String} The message to use as a deprecation warning.\n * `auth` {Credentials}\n* `cb` {Function}\n\nDeprecate a version of a package in the registry.\n\n### client.distTags.fetch(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `auth` {Credentials}\n* `cb` {Function}\n\nFetch all of the `dist-tags` for the named package.\n\n### client.distTags.add(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTag` {String} Name of the new `dist-tag`.\n * `version` {String} Exact version to be mapped to the `dist-tag`.\n * `auth` {Credentials}\n* `cb` {Function}\n\nAdd (or replace) a single dist-tag onto the named package.\n\n### client.distTags.set(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTags` {Object} Object containing a map from tag names to package\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSet all of the `dist-tags` for the named package at once, creating any\n`dist-tags` that do not already exist. Any `dist-tags` not included in the\n`distTags` map will be removed.\n\n### client.distTags.update(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTags` {Object} Object containing a map from tag names to package\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nUpdate the values of multiple `dist-tags`, creating any `dist-tags` that do\nnot already exist. Any pre-existing `dist-tags` not included in the `distTags`\nmap will be left alone.\n\n### client.distTags.rm(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTag` {String} Name of the new `dist-tag`.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a single `dist-tag` from the named package.\n\n### client.get(uri, params, cb)\n\n* `uri` {String} The complete registry URI to fetch\n* `params` {Object} Object containing per-request properties.\n * `timeout` {Number} Duration before the request times out. Optional\n (default: never).\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `staleOk` {Boolean} If there's cached data available, then return that to\n the callback quickly, and update the cache the background. Optional\n (default: false).\n * `auth` {Credentials} Optional.\n * `fullMetadata` {Boolean} If true, don't attempt to fetch filtered\n (\"corgi\") registry metadata. (default: false)\n* `cb` {Function}\n\nFetches data from the registry via a GET request, saving it in the cache folder\nwith the ETag or the \"Last Modified\" timestamp.\n\n### client.publish(uri, params, cb)\n\n* `uri` {String} The registry URI for the package to publish.\n* `params` {Object} Object containing per-request properties.\n * `metadata` {Object} Package metadata.\n * `access` {String} Access for the package. Can be `public` or `restricted` (no default).\n * `body` {Stream} Stream of the package body / tarball.\n * `auth` {Credentials}\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder.\n\n### client.sendAnonymousCLIMetrics(uri, params, cb)\n\n- `uri` {String} Base URL for the registry.\n- `params` {Object} Object containing per-request properties.\n - `metricId` {String} A uuid unique to this dataset.\n - `metrics` {Object} The metrics to share with the registry, with the following properties:\n - `from` {Date} When the first data in this report was collected.\n - `to` {Date} When the last data in this report was collected. Usually right now.\n - `successfulInstalls` {Number} The number of successful installs in this period.\n - `failedInstalls` {Number} The number of installs that ended in error in this period.\n- `cb` {Function}\n\nPUT a metrics object to the `/-/npm/anon-metrics/v1/` endpoint on the registry.\n\n### client.star(uri, params, cb)\n\n* `uri` {String} The complete registry URI for the package to star.\n* `params` {Object} Object containing per-request properties.\n * `starred` {Boolean} True to star the package, false to unstar it. Optional\n (default: false).\n * `auth` {Credentials}\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or unstar a\npackage, though other writes do require that the user be the package owner.\n\n### client.stars(uri, params, cb)\n\n* `uri` {String} The base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `username` {String} Name of user to fetch starred packages for. Optional\n (default: user in `auth`).\n * `auth` {Credentials} Optional (required if `username` is omitted).\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n### client.tag(uri, params, cb)\n\n* `uri` {String} The complete registry URI to tag\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Version to tag.\n * `tag` {String} Tag name to apply.\n * `auth` {Credentials}\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\nspecified version.\n\n### client.unpublish(uri, params, cb)\n\n* `uri` {String} The complete registry URI of the package to unpublish.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} version to unpublish. Optional – omit to unpublish all\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When the\nlast version us unpublished, the entire document is removed from the database.\n\n### client.whoami(uri, params, cb)\n\n* `uri` {String} The base registry for the URI.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSimple call to see who the registry thinks you are. Especially useful with\ntoken-based auth.\n\n\n## PLUMBING\n\nThe below are primarily intended for use by the rest of the API, or by the npm\ncaching logic directly.\n\n### client.request(uri, params, cb)\n\n* `uri` {String} URI pointing to the resource to request.\n* `params` {Object} Object containing per-request properties.\n * `method` {String} HTTP method. Optional (default: \"GET\").\n * `body` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON. Optional – body\n only used for write operations.\n * `etag` {String} The cached ETag. Optional.\n * `lastModified` {String} The cached Last-Modified timestamp. Optional.\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `streaming` {Boolean} Stream the request body as it comes, handling error\n responses in a non-streaming way.\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a generic request to the registry. All the other methods are wrappers\naround `client.request`.\n\n### client.fetch(uri, params, cb)\n\n* `uri` {String} The complete registry URI to upload to\n* `params` {Object} Object containing per-request properties.\n * `headers` {Stream} HTTP headers to be included with the request. Optional.\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetch a package from a URL, with auth set appropriately if included. Used to\ncache remote tarballs as well as request package tarballs from the registry.\n\n# Configuration\n\nThe client uses its own configuration, which is just passed in as a simple\nnested object. The following are the supported values (with their defaults, if\nany):\n\n* `proxy.http` {URL} The URL to proxy HTTP requests through.\n* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be\n the same as `proxy.http` if unset.\n* `proxy.localAddress` {IP} The local address to use on multi-homed systems.\n* `ssl.ca` {String} Certificate signing authority certificates to trust.\n* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access\n to servers that require client certificates.\n* `ssl.key` {String} Private key (PEM encoded) for client certificate.\n* `ssl.strict` {Boolean} Whether or not to be strict with SSL certificates.\n Default = `true`\n* `retry.count` {Number} Number of times to retry on GET failures. Default = 2.\n* `retry.factor` {Number} `factor` setting for `node-retry`. Default = 10.\n* `retry.minTimeout` {Number} `minTimeout` setting for `node-retry`.\n Default = 10000 (10 seconds)\n* `retry.maxTimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default = 60000 (60 seconds)\n* `userAgent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `defaultTag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `couchToken` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login).\n* `sessionToken` {String} A random identifier for this set of client requests.\n Default = 8 random hexadecimal bytes.\n* `maxSockets` {Number} The maximum number of connections that will be open per\n origin (unique combination of protocol:host:port). Passed to the\n [httpAgent](https://nodejs.org/api/http.html#http_agent_maxsockets).\n Default = 50\n* `isFromCI` {Boolean} Identify to severs if this request is coming from CI (for statistics purposes).\n Default = detected from environment– primarily this is done by looking for\n the CI environment variable to be set to `true`. Also accepted are the\n existence of the `JENKINS_URL`, `bamboo.buildKey` and `TDDIUM` environment\n variables.\n* `scope` {String} The scope of the project this command is being run for. This is the\n top level npm module in which a command was run.\n Default = none\n", - "readmeFilename": "README.md", + "peerDependencies": {}, "repository": { "url": "git+https://github.com/npm/npm-registry-client.git" }, "scripts": { "test": "standard && tap test/*.js" }, - "version": "8.1.0" + "version": "8.3.0" } |