diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-11-08 03:41:23 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-11-08 03:58:09 +0300 |
commit | e34a7b6b7371b1893a062f627ae8e168546d7264 (patch) | |
tree | b93b6c80c5b5f84269c595668b1803d2d2fcad0b /node_modules/npm-registry-client | |
parent | 294b13a436217e8704c23eabe60f55d3628fe2ea (diff) |
npm-registry-client@4.0.2
proxy via request and environment variables more transparently
Diffstat (limited to 'node_modules/npm-registry-client')
5 files changed, 42 insertions, 16 deletions
diff --git a/node_modules/npm-registry-client/lib/initialize.js b/node_modules/npm-registry-client/lib/initialize.js index 9c3571155..727625e74 100644 --- a/node_modules/npm-registry-client/lib/initialize.js +++ b/node_modules/npm-registry-client/lib/initialize.js @@ -14,8 +14,6 @@ function initialize (uri, method, accept, headers) { url : uri, method : method, headers : headers, - proxy : uri.protocol === "https:" ? this.config.proxy.https - : this.config.proxy.http, localAddress : this.config.proxy.localAddress, strictSSL : this.config.ssl.strict, cert : this.config.ssl.certificate, @@ -23,6 +21,17 @@ function initialize (uri, method, accept, headers) { ca : this.config.ssl.ca } + // request will not pay attention to the NOPROXY environment variable if a + // config value named proxy is passed in, even if it's set to null. + var proxy + if (uri.protocol === "https") { + proxy = this.config.proxy.https + } + else { + proxy = this.config.proxy.http + } + if (typeof proxy === "string") opts.proxy = proxy + headers.version = this.version || pkg.version headers.accept = accept diff --git a/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json b/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json index 295adce71..02b60efbe 100644 --- a/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json +++ b/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/package.json @@ -65,6 +65,5 @@ "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz" } diff --git a/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json b/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json index b8b59f5c3..96f2768e4 100644 --- a/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json +++ b/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/package.json @@ -74,6 +74,5 @@ ], "directories": {}, "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" } diff --git a/node_modules/npm-registry-client/node_modules/concat-stream/package.json b/node_modules/npm-registry-client/node_modules/concat-stream/package.json index d0800ac33..f29ec86e1 100644 --- a/node_modules/npm-registry-client/node_modules/concat-stream/package.json +++ b/node_modules/npm-registry-client/node_modules/concat-stream/package.json @@ -71,6 +71,5 @@ "tarball": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.4.6.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.6.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.6.tgz" } diff --git a/node_modules/npm-registry-client/package.json b/node_modules/npm-registry-client/package.json index d41e7351c..3262caac7 100644 --- a/node_modules/npm-registry-client/package.json +++ b/node_modules/npm-registry-client/package.json @@ -6,7 +6,7 @@ }, "name": "npm-registry-client", "description": "Client for the npm registry", - "version": "4.0.1", + "version": "4.0.2", "repository": { "url": "git://github.com/isaacs/npm-registry-client" }, @@ -21,7 +21,7 @@ "mkdirp": "^0.5.0", "normalize-package-data": "~1.0.1", "once": "^1.3.0", - "request": "2 >=2.45.0", + "request": "^2.47.0", "retry": "^0.6.1", "rimraf": "2", "semver": "2 >=2.2.1 || 3.x || 4", @@ -35,14 +35,34 @@ "npmlog": "" }, "license": "ISC", - "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 = \"npm://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 by 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## API\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.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* `cb` {Function}\n\nFetches data from the registry via a GET request, saving it in the cache folder\nwith the ETag.\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 * `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.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 * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\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} Cerficate 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", - "readmeFilename": "README.md", - "gitHead": "79ab3f6f9f04ca30e51d9ac6c54e0779dcf6b1ce", + "gitHead": "ff26fec3ba74877d980078dce8237f9248075488", "bugs": { "url": "https://github.com/isaacs/npm-registry-client/issues" }, "homepage": "https://github.com/isaacs/npm-registry-client", - "_id": "npm-registry-client@4.0.1", - "_shasum": "0716677c70354a7218f7e8c5a948677d444c0cc0", - "_from": "npm-registry-client@>=4.0.1 <4.1.0" + "_id": "npm-registry-client@4.0.2", + "_shasum": "1c1e196c6f206e0ecb158d0f31fc9b98bea74106", + "_from": "npm-registry-client@4.0.2", + "_npmVersion": "2.1.8", + "_nodeVersion": "0.10.33", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "dist": { + "shasum": "1c1e196c6f206e0ecb158d0f31fc9b98bea74106", + "tarball": "http://registry.npmjs.org/npm-registry-client/-/npm-registry-client-4.0.2.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-4.0.2.tgz" } |