pnpm
Version:
Fast, disk space efficient package manager
184 lines (183 loc) • 7.23 kB
JSON
{
"_args": [
[
{
"raw": "async-retry@^1.1.3",
"scope": null,
"escapedName": "async-retry",
"name": "async-retry",
"rawSpec": "^1.1.3",
"spec": ">=1.1.3 <2.0.0",
"type": "range"
},
"/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/@zeit/fetch-retry"
]
],
"_from": "async-retry@^1.1.3",
"_hasShrinkwrap": false,
"_id": "async-retry@1.2.3",
"_location": "/async-retry",
"_nodeVersion": "10.10.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/async-retry_1.2.3_1536324887592_0.6099952778126327"
},
"_npmUser": {
"name": "leo",
"email": "leo@zeit.co"
},
"_npmVersion": "6.4.1",
"_phantomChildren": {},
"_requested": {
"raw": "async-retry@^1.1.3",
"scope": null,
"escapedName": "async-retry",
"name": "async-retry",
"rawSpec": "^1.1.3",
"spec": ">=1.1.3 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/@zeit/fetch-retry"
],
"_resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz",
"_shasum": "a6521f338358d322b1a0012b79030c6f411d1ce0",
"_shrinkwrap": null,
"_spec": "async-retry@^1.1.3",
"_where": "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/@zeit/fetch-retry",
"ava": {
"failFast": true
},
"bugs": {
"url": "https://github.com/zeit/async-retry/issues"
},
"dependencies": {
"retry": "0.12.0"
},
"description": "Retrying made simple, easy and async",
"devDependencies": {
"ava": "0.25.0",
"eslint": "5.5.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-prettier": "3.0.1",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-jsx-a11y": "6.1.1",
"eslint-plugin-react": "7.11.1",
"lint-staged": "7.2.2",
"node-fetch": "2.2.0",
"pre-commit": "1.2.2",
"prettier": "1.14.2",
"then-sleep": "1.0.1"
},
"directories": {},
"dist": {
"integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==",
"shasum": "a6521f338358d322b1a0012b79030c6f411d1ce0",
"tarball": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz",
"fileCount": 4,
"unpackedSize": 5250,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbknUYCRA9TVsSAnZWagAAw0QP/RV0c4bUuoxs3mNEM8OS\nWdfYgigttaJZO2+AwswoGx/rUAMY/LrqDfRhJgIoaO9Y4DumRhTqnNpeUq3o\nD+2er5+DNxcyEj6IoL5B0byIhjAxrQAaTOAjKsT2JI3d/v9eP88KWCV6vtsq\niffxjDBdMRhnncVHEDE77nVEErKb6NyA/sv9+9kXn0R6MUuSb6ZC9ArFVuzb\n0Ws4jBm9HTtoQMBD4oBuMfnB+kK3Oey59BtesVTPoYQu9OH8551IpeeEgr8R\nUpyqW9n+FB0l8XzDB0lWdUr1jk/fU2h/ZK0x0bBv43TN97EylguEhKrINZeb\nbUvi2UBJTWTKVublFjoj+4cy1uUSLaTgqsyZarB8vLdeFmGFaL0pAwAl32vo\nTgzI9mn4/MYgdLNupLOutW72a3cdxLZWYB557SP7LkS+wWewdHgCW0DPKaU6\npbXNAEu43o8o5FdIPRyIvixTAuBuJu22ycPEZjFSg+gEBOI7ZZ3tyRB8yeSe\nw6QpL28oZjYW2JkLkYuHj2DEBJkJt5hQHXY0JoXox2m5NrWk3N7oYm9UYNjA\n/uCG497/08UnHJiRuTC5J3iBpyfzSb16ZJ7RUYKCW93BSV6iiDCTvSgbX3zB\n8/8qCopwSRkeIlBuhay5hGSMh6bwHvctsDGeYugIixsQrRO7nuV4dFuAM7U7\nbeba\r\n=gfdo\r\n-----END PGP SIGNATURE-----\r\n"
},
"eslintConfig": {
"extends": [
"airbnb",
"prettier"
],
"rules": {
"no-var": 0,
"prefer-arrow-callback": 0
}
},
"files": [
"lib"
],
"gitHead": "17eb4d23a01dec5d69f905d4da35f02566b05a13",
"homepage": "https://github.com/zeit/async-retry#readme",
"license": "MIT",
"lint-staged": {
"*.js": [
"eslint",
"prettier --write --single-quote",
"git add"
]
},
"main": "./lib/index.js",
"maintainers": [
{
"name": "arunoda",
"email": "arunoda.susiripala@gmail.com"
},
{
"name": "codetheory",
"email": "thecodetheory@gmail.com"
},
{
"name": "hharnisc",
"email": "hharnisc@gmail.com"
},
{
"name": "iamevilrabbit",
"email": "hello@evilrabb.it"
},
{
"name": "igorklopov",
"email": "igor@klopov.com"
},
{
"name": "jamo",
"email": "jamo@isotalo.fi"
},
{
"name": "javivelasco",
"email": "javier.velasco86@gmail.com"
},
{
"name": "joecohens",
"email": "joecohenr@gmail.com"
},
{
"name": "leo",
"email": "leo@zeit.co"
},
{
"name": "matheuss",
"email": "me@matheus.top"
},
{
"name": "nkzawa",
"email": "naoyuki.kanezawa@gmail.com"
},
{
"name": "olliv",
"email": "olli@zeit.co"
},
{
"name": "rauchg",
"email": "rauchg@gmail.com"
},
{
"name": "timneutkens",
"email": "tim@timneutkens.nl"
},
{
"name": "tootallnate",
"email": "nathan@tootallnate.net"
}
],
"name": "async-retry",
"optionalDependencies": {},
"pre-commit": "lint:staged",
"readme": "# async-retry\n\n[](https://github.com/airbnb/javascript)\n[](https://spectrum.chat/zeit)\n\nRetrying made simple, easy, and async.\n\n## Usage\n\n```js\n// Packages\nconst retry = require('async-retry')\nconst fetch = require('node-fetch')\n\nawait retry(async bail => {\n // if anything throws, we retry\n const res = await fetch('https://google.com')\n\n if (403 === res.status) {\n // don't retry upon 403\n bail(new Error('Unauthorized'))\n return\n }\n\n const data = await res.text()\n return data.substr(0, 500)\n}, {\n retries: 5\n})\n```\n\n### API\n\n```js\nretry(retrier : Function, opts : Object) => Promise\n```\n\n- The supplied function can be `async` or not. In other words, it can be a function that returns a `Promise` or a value.\n- The supplied function receives two parameters\n 1. A `Function` you can invoke to abort the retrying (bail)\n 2. A `Number` identifying the attempt. The absolute first attempt (before any retries) is `1`.\n- The `opts` are passed to `node-retry`. Read [its docs](https://github.com/tim-kos/node-retry)\n * `retries`: The maximum amount of times to retry the operation. Default is `10`.\n * `factor`: The exponential factor to use. Default is `2`.\n * `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`.\n * `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`.\n * `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `false`.\n * `onRetry`: an optional `Function` that is invoked after a new retry is performed. It's passed the `Error` that triggered it as a parameter.\n\n## Authors\n\n- Guillermo Rauch ([@rauchg](https://twitter.com/rauchg)) - [ZEIT](https://zeit.co)\n- Leo Lamprecht ([@notquiteleo](https://twitter.com/notquiteleo)) - [ZEIT](https://zeit.co)\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/zeit/async-retry.git"
},
"scripts": {
"lint:staged": "lint-staged",
"test": "yarn run test-lint && yarn run test-unit",
"test-lint": "eslint .",
"test-unit": "ava"
},
"version": "1.2.3"
}