{"name":"@octokit/plugin-retry","description":"Automatic retry plugin for octokit","version":"3.0.0","license":"MIT","pika":true,"sideEffects":false,"homepage":"https://github.com/octokit/plugin-retry.js#readme","bugs":{"url":"https://github.com/octokit/plugin-retry.js/issues"},"repository":{"type":"git","url":"git+https://github.com/octokit/plugin-retry.js.git"},"dependencies":{"@octokit/types":"^2.0.1","bottleneck":"^2.15.3"},"devDependencies":{"@octokit/core":"^2.0.0","@octokit/request-error":"^1.0.2","@pika/pack":"^0.5.0","@pika/plugin-build-node":"^0.8.1","@pika/plugin-build-web":"^0.8.1","@pika/plugin-ts-standard-pkg":"^0.8.1","@types/fetch-mock":"^7.3.1","@types/jest":"^24.0.18","@types/node":"^13.1.0","fetch-mock":"^8.0.0","jest":"^24.9.0","prettier":"^1.18.2","semantic-release":"^16.0.0","semantic-release-plugin-update-version-in-files":"^1.0.0","ts-jest":"^24.1.0","typescript":"^3.7.2"},"publishConfig":{"access":"public","tag":"latest"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","module":"dist-web/index.js","_id":"@octokit/plugin-retry@3.0.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.6","dist":{"integrity":"sha512-jZdmgfgfkNwBpuX54WoQ5Sa0Ht7rkU7HVbkYTBQw1sE+ZfurieRXyEesMhvAwBR06adlGSdaD1o/JqZ2UbMB8g==","shasum":"8f6e26174f9fd714f19265c8212fa15e578fd39c","tarball":"http://registry-npm.ywwl.com/@octokit/plugin-retry/download/@octokit/plugin-retry-3.0.0.tgz","fileCount":15,"unpackedSize":22054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeH50eCRA9TVsSAnZWagAAxDYP+gJ77x7V4OQtfb8mJvn3\nRyBPtS+lKUAlDcXYHKfih39YRj3JS8dvZ22JmkakbdDNosaEby/RfZXgb02D\nGvrJnrXagsRbeSeK+bLjaxW5uwC9MdUetB00nURd8tNHPJkEECOGRC5T7atP\n5tm2iW9XC94B+Ww2Drma1Ibjqh0wzgz7kobgC4mUWPainfMm3aVuXMsAvlTk\n+M2NibYDJoAahCWKKQ5BZwte9HjG521IC6pWQ4W/gjZHj3vQace/sHVR+Np3\noWVIO1mpKirNdZawkr4XlK2VeMauOp6Mr4hW+QuVU+uX6T3zYn6gR7r5F8GT\nIFiHFZFy7JJIHnJDuDvb7uA2DBTZbeeBrYm770F93rzEa1/AK2xWvjFA7Co2\nZgkTWmhdquyywHWcGMFjHUywvULZ1FLE+DFA0QrSHuvYFXeObPam1Bi8rv0d\nW8wzL+mhmTRSvGa5brcS2k0fCkYxO5KKmpzp3Q1+lX9llrK3OMcFrS0JDyW7\n9tpr25yhnPjAOZ5PETGCC+isxFZOtoLHmGpDHZ+UCoEhe/zTd7XpWvz4pNg7\nSVNHksQBpe0mrrzGC0H2NYZPNst24R5bRaTYGh5KORZy0A3ZbB5qrscGMVRM\nxqLyZ0q4n5JOg5bnBKCAILy0dcDkVkEk2JKXTA3EzlTUbMzboncvck5S6Ro4\n4hiZ\r\n=HbTA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/XFdUcCI0e15yaSuMEP84UYeLoa+pgeBhWQEnQsWqFAiEA88pz+xo2Ao8Gh1kPjQrVoDCLcdN/NWE7YiBE56igUQw="}],"size":5803,"noattachment":false,"key":"/@octokit/plugin-retry/-/@octokit/plugin-retry-3.0.0.tgz"},"maintainers":[{"name":"bkeepers","email":"brandon@opensoul.org"},{"name":"gr2m","email":"gregor@martynus.net"},{"name":"octokitbot","email":"octokitbot@martynus.net"}],"_npmUser":{"name":"gr2m","email":"gregor@martynus.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-retry_3.0.0_1579130142504_0.9674851202761559"},"_hasShrinkwrap":false,"readme":"# plugin-retry.js\n\n> Retries requests for server 4xx/5xx responses except `400`, `401`, `403`, `404`, `422`, and `451`.\n\n[![@latest](https://img.shields.io/npm/v/@octokit/plugin-retry.svg)](https://www.npmjs.com/package/@octokit/plugin-retry)\n[![Build Status](https://github.com/octokit/plugin-retry.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-retry.js/actions?workflow=Test)\n\n## Usage\n\n<table>\n<tbody valign=top align=left>\n<tr><th>\nBrowsers\n</th><td width=100%>\n\nLoad `@octokit/plugin-retry` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [esm.sh](https://esm.sh)\n\n```html\n<script type=\"module\">\n  import { Octokit } from \"https://esm.sh/@octokit/core\";\n  import { retry } from \"https://esm.sh/@octokit/plugin-retry\";\n</script>\n```\n\n</td></tr>\n<tr><th>\nNode\n</th><td>\n\nInstall with `npm install @octokit/core @octokit/plugin-retry`. Optionally replace `@octokit/core` with a core-compatible module\n\n```js\nimport { Octokit } from \"@octokit/core\";\nimport { retry } from \"@octokit/plugin-retry\";\n```\n\n</td></tr>\n</tbody>\n</table>\n\n> [!IMPORTANT]\n> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `\"moduleResolution\": \"node16\", \"module\": \"node16\"`.\n>\n> See the TypeScript docs on [package.json \"exports\"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).<br>\n> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus)\n\n```js\nconst MyOctokit = Octokit.plugin(retry);\nconst octokit = new MyOctokit({ auth: \"secret123\" });\n\n// retries request up to 3 times in case of a 500 response\noctokit.request(\"/\").catch((error) => {\n  if (error.request.request.retryCount) {\n    console.log(\n      `request failed after ${error.request.request.retryCount} retries`,\n    );\n  }\n\n  console.error(error);\n});\n```\n\nTo override the default `doNotRetry` list:\n\n```js\nconst octokit = new MyOctokit({\n  auth: \"secret123\",\n  retry: {\n    doNotRetry: [\n      /* List of HTTP 4xx/5xx status codes */\n    ],\n  },\n});\n```\n\nTo override the number of retries:\n\n```js\nconst octokit = new MyOctokit({\n  auth: \"secret123\",\n  request: { retries: 1 },\n});\n```\n\nYou can manually ask for retries for any request by passing `{ request: { retries: numRetries, retryAfter: delayInSeconds }}`. Note that the `doNotRetry` option from the constructor is ignored in this case, requests will be retried no matter their response code.\n\n```js\noctokit\n  .request(\"/\", { request: { retries: 1, retryAfter: 1 } })\n  .catch((error) => {\n    if (error.request.request.retryCount) {\n      console.log(\n        `request failed after ${error.request.request.retryCount} retries`,\n      );\n    }\n\n    console.error(error);\n  });\n```\n\nPass `{ retry: { enabled: false } }` to disable this plugin.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1579130142677,"_cnpm_publish_time":1579130142677,"dist-tags":{"latest":"8.1.1","release-6.x":"6.1.0"}}