UNPKG

pnpm

Version:

Fast, disk space efficient package manager

123 lines (122 loc) 6.15 kB
{ "_args": [ [ { "raw": "registry-auth-token@^3.0.1", "scope": null, "escapedName": "registry-auth-token", "name": "registry-auth-token", "rawSpec": "^3.0.1", "spec": ">=3.0.1 <4.0.0", "type": "range" }, "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/package-json" ] ], "_from": "registry-auth-token@^3.0.1", "_hasShrinkwrap": false, "_id": "registry-auth-token@3.4.0", "_location": "/registry-auth-token", "_nodeVersion": "0.12.18", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/registry-auth-token_3.4.0_1553096944955_0.9586422909105623" }, "_npmUser": { "name": "rexxars", "email": "espen@hovlandsdal.com" }, "_npmVersion": "2.15.11", "_phantomChildren": {}, "_requested": { "raw": "registry-auth-token@^3.0.1", "scope": null, "escapedName": "registry-auth-token", "name": "registry-auth-token", "rawSpec": "^3.0.1", "spec": ">=3.0.1 <4.0.0", "type": "range" }, "_requiredBy": [ "/package-json" ], "_resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", "_shasum": "d7446815433f5d5ed6431cd5dca21048f66b397e", "_shrinkwrap": null, "_spec": "registry-auth-token@^3.0.1", "_where": "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/package-json", "author": { "name": "Espen Hovlandsdal", "email": "espen@hovlandsdal.com" }, "bugs": { "url": "https://github.com/rexxars/registry-auth-token/issues" }, "dependencies": { "rc": "^1.1.6", "safe-buffer": "^5.0.1" }, "description": "Get the auth token set for an npm registry (if any)", "devDependencies": { "istanbul": "^0.4.2", "mocha": "^3.3.0", "require-uncached": "^1.0.2", "standard": "^10.0.2" }, "directories": {}, "dist": { "shasum": "d7446815433f5d5ed6431cd5dca21048f66b397e", "tarball": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", "fileCount": 11, "unpackedSize": 81135, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckmDxCRA9TVsSAnZWagAAg0oP/35tD0RLWEHCLPbuIQ1m\n4SpMFwnqad/iZ0iUn7RQDEF9E2LdRIhTV7wO+/KFAUs+orV+zDD3bsJ+JTRx\nhdqeT4ETsn1BfTr3L6h/PVNFf18b07XmfOdqlg5sRaUU5tjpSwOSNacPERZr\nru30/zGvWsbUikOA5qYMaQY7FPpemVKBFL+4twP9p6iajKMkWWAA0FIWn5KK\nUkAJBMwa3yGh8BLG/C5xORaz+Ue2GrDROvqxSB9sohXEq9w2mZrpFTcMLEU3\ndAlVKq6NOLfJussOWQ6QfEhJD6h89L4eFARMMNn1bwp/04zEzJjcIkC9ZaCQ\ne/dpNJSIh9K74UXKDg/NmKKMD1G2twS34p2bobghQDkHRCANLGkw/UHEJT/L\nHJzXBLlbwdQGLWyoNygxVcPEN+nEfdCwjm2ATYhKyfZuC5swQMCLkYiZh9tC\nThauA47kKUzclg7K9+3ty8GOASe5ILpZfUfuQ4KimHJLmc7ykWS5keE2zver\nuTBTrqdqHvGhEJmeCGapzbi/j52ogEe2q5jJzSFNERV/Lm1AKOBM31XP6I8M\nlQ2hllz2bgBCGqjDTP6GyLWoI8BMlLKaQVtrmUlz9CZHr3yOWhKY3VnOZezq\n4IWDvCZEswfvUdm2woDAnSPeBt6Arm3rDID8IYZ/lEKHEFTbvhTu1zbNbCdu\nEyqi\r\n=r3eh\r\n-----END PGP SIGNATURE-----\r\n" }, "gitHead": "6544ac2da8a7e5f48055e2cdf0ed9ed93ab9ec6a", "homepage": "https://github.com/rexxars/registry-auth-token#readme", "keywords": [ "npm", "conf", "config", "npmconf", "registry", "auth", "token", "authtoken" ], "license": "MIT", "main": "index.js", "maintainers": [ { "name": "leipert", "email": "git@leipert.io" }, { "name": "rexxars", "email": "rexxars@gmail.com" }, { "name": "zkochan", "email": "zoltan.kochan@gmail.com" } ], "name": "registry-auth-token", "optionalDependencies": {}, "readme": "# registry-auth-token\n\n[![npm version](http://img.shields.io/npm/v/registry-auth-token.svg?style=flat-square)](http://browsenpm.org/package/registry-auth-token)[![Build Status](http://img.shields.io/travis/rexxars/registry-auth-token/master.svg?style=flat-square)](https://travis-ci.org/rexxars/registry-auth-token)\n\nGet the auth token set for an npm registry from `.npmrc`. Also allows fetching the configured registry URL for a given npm scope.\n\n## Installing\n\n```\nnpm install --save registry-auth-token\n```\n\n## Usage\n\nReturns an object containing `token` and `type`, or `undefined` if no token can be found. `type` can be either `Bearer` or `Basic`.\n\n```js\nvar getAuthToken = require('registry-auth-token')\nvar getRegistryUrl = require('registry-auth-token/registry-url')\n\n// Get auth token and type for default `registry` set in `.npmrc`\nconsole.log(getAuthToken()) // {token: 'someToken', type: 'Bearer'}\n\n// Get auth token for a specific registry URL\nconsole.log(getAuthToken('//registry.foo.bar'))\n\n// Find the registry auth token for a given URL (with deep path):\n// If registry is at `//some.host/registry`\n// URL passed is `//some.host/registry/deep/path`\n// Will find token the closest matching path; `//some.host/registry`\nconsole.log(getAuthToken('//some.host/registry/deep/path', {recursive: true}))\n\n// Find the configured registry url for scope `@foobar`.\n// Falls back to the global registry if not defined.\nconsole.log(getRegistryUrl('@foobar'))\n\n// Use the npm config that is passed in\nconsole.log(getRegistryUrl('http://registry.foobar.eu/', {\n npmrc: {\n 'registry': 'http://registry.foobar.eu/',\n '//registry.foobar.eu/:_authToken': 'qar'\n }\n}))\n```\n\n## Return value\n\n```js\n// If auth info can be found:\n{token: 'someToken', type: 'Bearer'}\n\n// Or:\n{token: 'someOtherToken', type: 'Basic'}\n\n// Or, if nothing is found:\nundefined\n```\n\n## Security\n\nPlease be careful when using this. Leaking your auth token is dangerous.\n\n## License\n\nMIT-licensed. See LICENSE.\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+ssh://git@github.com/rexxars/registry-auth-token.git" }, "scripts": { "coverage": "istanbul cover _mocha", "posttest": "standard", "test": "mocha" }, "standard": { "ignore": [ "coverage/**" ] }, "version": "3.4.0" }