package.json 5.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {
  2. "name": "bower-registry-client",
  3. "version": "0.2.4",
  4. "description": "Provides easy interaction with the Bower registry",
  5. "author": {
  6. "name": "Twitter"
  7. },
  8. "licenses": [
  9. {
  10. "type": "MIT",
  11. "url": "https://github.com/bower/registry-client/blob/master/LICENSE"
  12. }
  13. ],
  14. "repository": {
  15. "type": "git",
  16. "url": "git://github.com/bower/registry-client"
  17. },
  18. "main": "Client",
  19. "engines": {
  20. "node": ">=0.10.0"
  21. },
  22. "dependencies": {
  23. "async": "~0.2.8",
  24. "bower-config": "~0.5.0",
  25. "graceful-fs": "~2.0.0",
  26. "lru-cache": "~2.3.0",
  27. "request": "~2.51.0",
  28. "request-replay": "~0.2.0",
  29. "rimraf": "~2.2.0",
  30. "mkdirp": "~0.3.5"
  31. },
  32. "devDependencies": {
  33. "expect.js": "~0.2.0",
  34. "grunt": "~0.4.1",
  35. "grunt-cli": "^0.1.13",
  36. "grunt-contrib-jshint": "~0.6.0",
  37. "grunt-contrib-watch": "~0.5.0",
  38. "grunt-simple-mocha": "~0.4.0",
  39. "mocha": "~1.12.0",
  40. "nock": "~0.22.0"
  41. },
  42. "scripts": {
  43. "test": "grunt test"
  44. },
  45. "readme": "# bower-registry-client [![Build Status](https://travis-ci.org/bower/registry-client.png?branch=master)](https://travis-ci.org/bower/registry-client)\n\n> Provides easy interaction with the Bower registry\n\n\n## Install\n\n```\n$ npm install --save bower-registry-client\n```\n\n\n## Usage\n\n```js\nvar RegistryClient = require('bower-registry-client');\nvar registry = new RegistryClient(options, logger);\n```\n\nThe `logger` is optional and is expected to be an instance of the bower [logger](https://github.com/bower/logger). \nAvailable constructor options:\n\n- `cache`: the cache folder to use for some operations; using null will disable persistent cache (defaults to bower registry cache folder)\n- `registry.search`: an array of registry search endpoints (defaults to the Bower server)\n- `registry.register`: the endpoint to use when registering packages (defaults to the Bower server)\n- `registry.publish`: the endpoint to use when publishing packages (defaults to the Bower server)\n- `ca.search`: an array of CA certificates for each registry.search (defaults to null).\n- `ca.register`: the CA certificate for registry.register\n- `ca.publish`: the CA certificate for registry.publish\n- `proxy`: the proxy to use for http requests (defaults to null)\n- `httpsProxy`: the proxy to use for https requests (defaults to null)\n- `strictSsl`: whether or not to do SSL key validation when making requests via https (defaults to true).\n- `userAgent`: the user agent to use for the requests (defaults to null)\n- `timeout`: the timeout for the requests to finish (defaults to 60000)\n- `force`: If set to true, cache will be bypassed and remotes will always be hit (defaults to false).\n- `offline`: If set to true, only the cache will be used (defaults to false).\n\n\nNote that `force` and `offline` are mutually exclusive.\nThe cache will speedup operations such as `list`, `lookup` and `search`.\nDifferent operations may have different cache expiration times.\n\n\n#### .lookup(name, callback)\n\nLooks the registry for the package `name`,\n\n```js\nregistry.lookup('jquery', function (err, entry) {\n if (err) {\n console.error(err.message);\n return;\n }\n\n // For now resp.type is always 'alias'\n console.log('type', entry.type);\n console.log('url', entry.url);\n});\n```\n\n#### .register(name, url, callback)\n\nRegisters a package in the registry.\n\n```js\nregistry.register('my-package', 'git://github.com/my-org/my-package.git', function (err, pkg) {\n if (err) {\n console.error(err.message);\n return;\n }\n\n console.log('name', pkg.name);\n console.log('url: ', pkg.url);\n});\n```\n\n#### .search(str, callback)\n\nSearches the registry.\n\n```js\nregistry.search('jquery', function (err, results) {\n if (err) {\n console.error(err.message);\n return;\n }\n\n results.forEach(function (pkg) {\n console.log('name', pkg.name);\n console.log('url', pkg.url);\n });\n});\n```\n\n#### .clearCache(name, callback)\n\nClears the persistent and runtime cache associated with the `name` package. \nIf `name` is null, clears the cache for every package.\n\nNote that in most cases, you don't need to clear the cache since it has\nself expiration times.\n\n```js\n// Clear jquery cache\nregistry.clearCache('jquery', function (err) {\n if (err) {\n console.error(err.message);\n return;\n }\n\n console.log('Done');\n});\n\n// Clear all cache\nregistry.clearCache(function (err) {\n if (err) {\n console.error(err.message);\n return;\n }\n\n console.log('Done');\n});\n```\n\n\n#### .resetCache()\n\nClears the in-memory cache used to speed up the instance.\n\nNote that in most cases, you don't need to clear the runtime cache since it has\nself expiration times.\nMight be useful if you use this module in long-living programs.\n\n```js\nregistry.resetCache();\n```\n\n#### #clearRuntimeCache()\n\nClears the in-memory cache used to speed up the whole module.\nThis clears the static in-memory cache as well as in-memory cache used by instances.\n\nNote that in edge cases, some instance's in-memory cache might be skipped.\nIf that's a problem, you should create fresh instances instead.\n\n```js\nRegistryClient.clearRuntimeCache();\n```\n\n\n## License\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n",
  46. "readmeFilename": "README.md",
  47. "bugs": {
  48. "url": "https://github.com/bower/registry-client/issues"
  49. },
  50. "homepage": "https://github.com/bower/registry-client",
  51. "_id": "bower-registry-client@0.2.4",
  52. "_shasum": "269fc7e898b627fb939d1144a593254d7fbbeebc",
  53. "_from": "bower-registry-client@~0.2.0",
  54. "_resolved": "https://registry.npmjs.org/bower-registry-client/-/bower-registry-client-0.2.4.tgz"
  55. }