{"name":"@octokit/plugin-retry","description":"Automatic retry plugin for octokit","version":"4.1.1","license":"MIT","source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","module":"dist-web/index.js","pika":true,"sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/octokit/plugin-retry.js.git"},"dependencies":{"@octokit/types":"^9.0.0","bottleneck":"^2.15.3"},"peerDependencies":{"@octokit/core":">=3"},"devDependencies":{"@octokit/core":"^4.0.0","@octokit/request-error":"^3.0.0","@pika/pack":"^0.3.7","@pika/plugin-build-node":"^0.9.0","@pika/plugin-build-web":"^0.9.0","@pika/plugin-ts-standard-pkg":"^0.9.0","@types/fetch-mock":"^7.3.1","@types/jest":"^29.0.0","@types/node":"^18.0.0","fetch-mock":"^9.0.0","jest":"^29.0.0","prettier":"2.8.3","semantic-release-plugin-update-version-in-files":"^1.0.0","ts-jest":"^29.0.0","typescript":"^4.0.2"},"engines":{"node":">= 14"},"publishConfig":{"access":"public"},"gitHead":"125c968d6a210aa021ee4e09224492d9958f5bdb","bugs":{"url":"https://github.com/octokit/plugin-retry.js/issues"},"homepage":"https://github.com/octokit/plugin-retry.js#readme","_id":"@octokit/plugin-retry@4.1.1","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-iR7rg5KRSl6L6RELTQQ3CYeNgeBJyuAmP95odzcQ/zyefnRT/Peo8rWeky4z7V/+/oPWqOL4I5Z+V8KtjpHCJw==","shasum":"2a96e97219f6506d636b4de696cf368da44a8e20","tarball":"http://registry-npm.ywwl.com/@octokit/plugin-retry/download/@octokit/plugin-retry-4.1.1.tgz","fileCount":15,"unpackedSize":26377,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9S0oEeHC9QpO9IB2C5GkwSLk3EyPce0hFByekMrpJvwIgNlTcHekrQxjCJpgpUoj9Y5S6yEIAtRvUTGqAv8Y7HT8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0v/SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoR7g/+OfxXnV0LY5fXNhD6gAvRGE3uj4YSL8T9UH7nOvESv4CGbPfo\r\n5Ojmlw3I155ar8MVOMdb40G4ALPSLFylvzeYgkY8cvEHYw1JPVr2hTVPd/WB\r\nbehzfKfX1vQteUbVVyvMNSD9eU29bLVmFjsIwp/xdzRnmZ8Y6cDAokuDl5P6\r\nI+OAiQEfKQ5pWdTFzm0Lo1ydeLAekbsdZGjWzPrl9v2qkbPLjTo6v3yEc7pu\r\nrg/IBFqVED/4Qb1j1jpq8jlkhyKOgl6zZA9gx7srLK0rXWffecpPNfoqXl7X\r\nUR8++fZD3BpFrp2iy/nsyGn3/HMp+Wx4v9I26eR6iittxCdPXXqzA7BYj5Bt\r\nm2Pa580H3PT3I+vDsPS+5VMG5X6s2QCx5/DIO+xaDC9jzQObl58as77DaTDe\r\nmU61twSUcdqX+J6/GTQEl08p0o4ZL07MgWVTH0VmkHk4ArRi2mCsE3XYrMhf\r\n4jhc+8otXX6ln23DKTZqJBy9nBXGEV0747pC84h62MlKfZyfdvqZGzBRnLkA\r\niTRJSh1yBI+e2Q5y1kqhch2isxO4SGvbaUBUmaM37KT9vvOBcanYeh2nDAlG\r\nCNQAeZ/rfguFmep3dnTD9ma9KvBsqROZYcBLY4ZW++sOcGEJiMQF1Sq/b4lb\r\nPTQ+778w3nRfh0Ol0kN0rlUdfPKTV4IP0cI=\r\n=kkxQ\r\n-----END PGP SIGNATURE-----\r\n","size":6062,"noattachment":false,"key":"/@octokit/plugin-retry/-/@octokit/plugin-retry-4.1.1.tgz"},"_npmUser":{"name":"octokitbot","email":"security+octokitbot@github.com"},"directories":{},"maintainers":[{"name":"kfcampbell","email":"kfcampbell@github.com"},{"name":"nickfloyd","email":"nicholas.floyd.info@gmail.com"},{"name":"gr2m","email":"gregor@martynus.net"},{"name":"octokitbot","email":"security+octokitbot@github.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-retry_4.1.1_1674772434027_0.7115753094979469"},"_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":1674772434170,"_cnpm_publish_time":1674772434170,"dist-tags":{"latest":"8.1.1","release-6.x":"6.1.0"}}