{"_id":"@aubaid/smart-retry","_rev":"8-791ba2ef10d807e5bf9111aa2ccebc83","name":"@aubaid/smart-retry","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@aubaid/smart-retry","version":"1.0.0","keywords":["retry","exponential-backoff","http-retry","axios-retry","fetch-retry","request-retry","api-retry","resilience","fault-tolerance","circuit-breaker","error-handling","network-retry","transient-errors","rate-limiting"],"author":{"name":"Aubaid Farrukh"},"license":"MIT","_id":"@aubaid/smart-retry@1.0.0","maintainers":[{"name":"aubaid","email":"aubaidfarroukh@gmail.com"}],"homepage":"https://github.com/AubaidFarrukh/smart-retry#readme","bugs":{"url":"https://github.com/AubaidFarrukh/smart-retry/issues"},"dist":{"shasum":"120f6d1e1cdd0e57c8b88ae9f6737b20a13fd8bf","tarball":"https://registry.npmjs.org/@aubaid/smart-retry/-/smart-retry-1.0.0.tgz","fileCount":27,"integrity":"sha512-mwAg87SN7fl4mhaEKbYBNFvKHobKyRaKDR7niYTu2hQoyUI2qGs+wPFV6D7C87m00eBU34RpcJR3kYEXMx5HRw==","signatures":[{"sig":"MEUCIQD5ks63aFi1IUbHc10METyRTrUcKckv3eSiwik9OqxHnAIgWM5hx1oYanK0fUfnDMJf/LDHsza9YRY8m9Qs5bc+sxE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41338},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"1688c9c4a037e66d906b103c4ef3d5810de5a1db","scripts":{"dev":"tsc --watch","lint":"eslint \"src/**/*.ts\" \"tests/**/*.ts\"","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"husky","lint:fix":"eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"_npmUser":{"name":"aubaid","email":"aubaidfarroukh@gmail.com"},"repository":{"url":"git+https://github.com/AubaidFarrukh/smart-retry.git","type":"git"},"_npmVersion":"10.8.2","description":"Intelligent retry mechanism with exponential backoff, automatic failure logging, and replay support for HTTP requests","directories":{},"lint-staged":{".ts":["eslint --fix","prettier --write"],"*.{json,md}":["prettier --write"]},"_nodeVersion":"20.17.0","dependencies":{"axios":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^9.1.7","eslint":"^9.39.0","ts-jest":"^29.2.0","prettier":"^3.6.2","typescript":"^5.3.0","@types/jest":"^29.5.0","@types/node":"^20.10.0","lint-staged":"^16.2.6","@commitlint/cli":"^20.1.0","@typescript-eslint/parser":"^8.46.2","@commitlint/config-conventional":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.46.2"},"_npmOperationalInternal":{"tmp":"tmp/smart-retry_1.0.0_1762152567446_0.4087319767518507","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aubaid/smart-retry","version":"1.0.1","keywords":["retry","exponential-backoff","http-retry","axios-retry","fetch-retry","request-retry","api-retry","resilience","fault-tolerance","circuit-breaker","error-handling","network-retry","transient-errors","rate-limiting"],"author":{"name":"Aubaid Farrukh"},"license":"MIT","_id":"@aubaid/smart-retry@1.0.1","maintainers":[{"name":"aubaid","email":"aubaidfarroukh@gmail.com"}],"homepage":"https://github.com/AubaidFarrukh/smart-retry#readme","bugs":{"url":"https://github.com/AubaidFarrukh/smart-retry/issues"},"dist":{"shasum":"cfbcb5d43bafbfca0b3b909b06c2a6d61ff124ab","tarball":"https://registry.npmjs.org/@aubaid/smart-retry/-/smart-retry-1.0.1.tgz","fileCount":27,"integrity":"sha512-tI9PRs618hc4PrO/aQ6hC1E12sX/IIQU5a9NMD27mkstQWsg9pDHfX8sS3dT0rUblBhs7id8FqxPcvcL0tvYiw==","signatures":[{"sig":"MEQCIF4KElY4f8H3qN+yvGugfo6B3yIpjvJ+0tPcQjNWkPceAiAjqHxJ+aINYxBshTUUsb9p5fxcngPFTRciSFhYhCJfDQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43537},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"26c0ef528ef48fc29d0f39dcc076a992741de878","scripts":{"dev":"tsc --watch","lint":"eslint \"src/**/*.ts\" \"tests/**/*.ts\"","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"husky","lint:fix":"eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"_npmUser":{"name":"aubaid","email":"aubaidfarroukh@gmail.com"},"repository":{"url":"git+https://github.com/AubaidFarrukh/smart-retry.git","type":"git"},"_npmVersion":"10.9.4","description":"Intelligent retry mechanism with exponential backoff, automatic failure logging, and replay support for HTTP requests","directories":{},"lint-staged":{".ts":["eslint --fix","prettier --write"],"*.{json,md}":["prettier --write"]},"_nodeVersion":"22.21.1","dependencies":{"axios":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^9.1.7","eslint":"^9.39.0","ts-jest":"^29.2.0","prettier":"^3.6.2","typescript":"^5.3.0","@types/jest":"^29.5.0","@types/node":"^20.10.0","lint-staged":"^16.2.6","@commitlint/cli":"^20.1.0","@typescript-eslint/parser":"^8.46.2","@commitlint/config-conventional":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.46.2"},"_npmOperationalInternal":{"tmp":"tmp/smart-retry_1.0.1_1787591134844_0.32974014663760887","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aubaid/smart-retry","version":"1.0.2","keywords":["retry","exponential-backoff","linear-backoff","backoff-strategy","http-retry","axios-retry","fetch-retry","request-retry","api-retry","resilience","fault-tolerance","error-handling","network-retry","transient-errors","typescript","promise","async-await","failure-logging"],"author":{"name":"Aubaid Farrukh"},"license":"MIT","_id":"@aubaid/smart-retry@1.0.2","maintainers":[{"name":"aubaid","email":"aubaidfarroukh@gmail.com"}],"homepage":"https://github.com/AubaidFarrukh/smart-retry#readme","bugs":{"url":"https://github.com/AubaidFarrukh/smart-retry/issues"},"dist":{"shasum":"f602590063e55e71f861c8148c991de201327dc2","tarball":"https://registry.npmjs.org/@aubaid/smart-retry/-/smart-retry-1.0.2.tgz","fileCount":27,"integrity":"sha512-eEGSz+ts8vAGezrV1NeRU4RsGPk9P2j1LOmm9xkN55uvkywMXTTeM+ZlOpiQkt/ZHs1HHcFdy66kR74+Vq0kGg==","signatures":[{"sig":"MEQCIClZ2GEiRnXBIxAn4JPg8+rakG4vLlM2KFjcZLnls88QAiARmZMYjT3JwN1wMdgCqHBgYl/2wFUftn7dk/2PEMSAFQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47529},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"075ae8cf4b617653bd217e47d577f22c65fd11da","scripts":{"dev":"tsc --watch","lint":"eslint \"src/**/*.ts\" \"tests/**/*.ts\"","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"husky","lint:fix":"eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix","preversion":"npm test","test:watch":"jest --watch","postversion":"git push && git push --tags","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"_npmUser":{"name":"aubaid","email":"aubaidfarroukh@gmail.com"},"repository":{"url":"git+https://github.com/AubaidFarrukh/smart-retry.git","type":"git"},"_npmVersion":"11.19.0","description":"TypeScript retry library for HTTP requests with exponential/linear backoff, Axios and Fetch integrations, and automatic failure logging for later replay","directories":{},"lint-staged":{".ts":["eslint --fix","prettier --write"],"*.{json,md}":["prettier --write"]},"_nodeVersion":"20.17.0","dependencies":{"axios":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^9.1.7","eslint":"^9.39.0","ts-jest":"^29.2.0","prettier":"^3.6.2","typescript":"^5.3.0","@types/jest":"^29.5.0","@types/node":"^20.10.0","lint-staged":"^16.2.6","@commitlint/cli":"^20.1.0","@typescript-eslint/parser":"^8.46.2","@commitlint/config-conventional":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.46.2"},"_npmOperationalInternal":{"tmp":"tmp/smart-retry_1.0.2_1787686051622_0.4163416473098873","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aubaid/smart-retry","version":"1.0.3","keywords":["retry","exponential-backoff","linear-backoff","backoff-strategy","http-retry","axios-retry","fetch-retry","request-retry","api-retry","resilience","fault-tolerance","error-handling","network-retry","transient-errors","typescript","promise","async-await","failure-logging"],"author":{"name":"Aubaid Farrukh"},"license":"MIT","_id":"@aubaid/smart-retry@1.0.3","maintainers":[{"name":"aubaid","email":"aubaidfarroukh@gmail.com"}],"homepage":"https://github.com/AubaidFarrukh/smart-retry#readme","bugs":{"url":"https://github.com/AubaidFarrukh/smart-retry/issues"},"dist":{"shasum":"8ae8a7cd4c7b284c458210cd5b38a282e171e570","tarball":"https://registry.npmjs.org/@aubaid/smart-retry/-/smart-retry-1.0.3.tgz","fileCount":27,"integrity":"sha512-ONks6qqook0TfkBXL1IQTgNpwpEGNhv8nea8zVqFCnBCi9KBzLicqe6ItG4nMQshEq9a380GzwN0jCOIau1phg==","signatures":[{"sig":"MEQCIGGI+mhrYmgTrp5Z98mr3DReHwjaXVGX5+yPwiZa7t6MAiAOfHOOrPFUempUxs6c8kOcSuCIMfetSFbfj8NYm0CVBQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aubaid%2fsmart-retry@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47614},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"140be486c9c21e1b72602dfb121c4ccd4af384de","scripts":{"dev":"tsc --watch","tag":"git tag v$npm_package_version && git push origin v$npm_package_version","lint":"eslint \"src/**/*.ts\" \"tests/**/*.ts\"","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"husky","lint:fix":"eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix","preversion":"npm test","test:watch":"jest --watch","postversion":"git push && git push --tags","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8ebe96f0-5160-4b14-911e-a8f881bc5daa"}},"repository":{"url":"git+https://github.com/AubaidFarrukh/smart-retry.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript retry library for HTTP requests with exponential/linear backoff, Axios and Fetch integrations, and automatic failure logging for later replay","directories":{},"lint-staged":{".ts":["eslint --fix","prettier --write"],"*.{json,md}":["prettier --write"]},"_nodeVersion":"22.23.2","dependencies":{"axios":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^9.1.7","eslint":"^9.39.0","ts-jest":"^29.2.0","prettier":"^3.6.2","typescript":"^5.3.0","@types/jest":"^29.5.0","@types/node":"^20.10.0","lint-staged":"^16.2.6","@commitlint/cli":"^20.1.0","@typescript-eslint/parser":"^8.46.2","@commitlint/config-conventional":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.46.2"},"_npmOperationalInternal":{"tmp":"tmp/smart-retry_1.0.3_1787688241925_0.3360353631113069","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@aubaid/smart-retry","version":"1.0.4","keywords":["retry","exponential-backoff","linear-backoff","backoff-strategy","http-retry","axios-retry","fetch-retry","request-retry","api-retry","resilience","fault-tolerance","error-handling","network-retry","transient-errors","typescript","promise","async-await","failure-logging"],"author":{"name":"Aubaid Farrukh"},"license":"MIT","_id":"@aubaid/smart-retry@1.0.4","maintainers":[{"name":"aubaid","email":"aubaidfarroukh@gmail.com"}],"homepage":"https://github.com/AubaidFarrukh/smart-retry#readme","bugs":{"url":"https://github.com/AubaidFarrukh/smart-retry/issues"},"dist":{"shasum":"fa4404177b9961c68f767d5279a22a6c8c76dd18","tarball":"https://registry.npmjs.org/@aubaid/smart-retry/-/smart-retry-1.0.4.tgz","fileCount":27,"integrity":"sha512-QcLb65DKFGeK09NEUDWOM022hq9P3v3kgAyMGIdW1xOJimLd4hQt/WsOmQ3x72oMGQNpB+VBDfdPLNpkLoOuWg==","signatures":[{"sig":"MEQCIQCLQLVj9NCYnxSR/6OfvkeUj8pzTe0e997eIGVBDT+dwQIff8/aDC31aVNdyQnmjYyfl8h6ViRUeO4bZQiIajkMrQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aubaid%2fsmart-retry@1.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51851},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"e9fd391ad7db89ae5a9fea6390e2c041b8aa2ed2","scripts":{"dev":"tsc --watch","tag":"git tag v$npm_package_version && git push origin v$npm_package_version","lint":"eslint \"src/**/*.ts\" \"tests/**/*.ts\"","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"husky","lint:fix":"eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix","preversion":"npm test","test:watch":"jest --watch","postversion":"git push && git push --tags","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8ebe96f0-5160-4b14-911e-a8f881bc5daa"}},"repository":{"url":"git+https://github.com/AubaidFarrukh/smart-retry.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript retry library for HTTP requests with exponential/linear backoff, Axios and Fetch integrations, and automatic failure logging for later replay","directories":{},"lint-staged":{".ts":["eslint --fix","prettier --write"],"*.{json,md}":["prettier --write"]},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","axios":"^1.6.0","husky":"^9.1.7","eslint":"^9.39.0","ts-jest":"^29.2.0","prettier":"^3.6.2","typescript":"^5.3.0","@types/jest":"^29.5.0","@types/node":"^20.10.0","lint-staged":"^16.2.6","@commitlint/cli":"^20.1.0","@typescript-eslint/parser":"^8.46.2","@commitlint/config-conventional":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.46.2"},"peerDependencies":{"axios":"^1.6.0"},"peerDependenciesMeta":{"axios":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/smart-retry_1.0.4_1788162897930_0.782988871153375","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@aubaid/smart-retry","version":"1.1.0","keywords":["retry","exponential-backoff","linear-backoff","backoff-strategy","http-retry","axios-retry","fetch-retry","request-retry","api-retry","resilience","fault-tolerance","error-handling","network-retry","transient-errors","typescript","promise","async-await","failure-logging"],"author":{"name":"Aubaid Farrukh"},"license":"MIT","_id":"@aubaid/smart-retry@1.1.0","maintainers":[{"name":"aubaid","email":"aubaidfarroukh@gmail.com"}],"homepage":"https://github.com/AubaidFarrukh/smart-retry#readme","bugs":{"url":"https://github.com/AubaidFarrukh/smart-retry/issues"},"dist":{"shasum":"09e44d5b84498dff6c7db790bb17bef4864e499b","tarball":"https://registry.npmjs.org/@aubaid/smart-retry/-/smart-retry-1.1.0.tgz","fileCount":27,"integrity":"sha512-SBqeS/T5nT2abJlKEsQwdYcwNvDIqOI6CDQqwxaW8jTIUzi9jqgI7UvuZ/VFAimRzhQssQOHeUfPadBErHPmDw==","signatures":[{"sig":"MEUCIAhC/hRkZSlpFgCYoK3LqV0t8cnDxdSN+mz7flQbJdStAiEAxEzO45Q44f2JY3lxhaqPNC+QT7lFzWYL4zjhJVj8UQE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aubaid%2fsmart-retry@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":54087},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"bee6a81264072f4a7ab3427014fb884a1e7b975c","scripts":{"dev":"tsc --watch","tag":"git tag v$npm_package_version && git push origin v$npm_package_version","lint":"eslint \"src/**/*.ts\" \"tests/**/*.ts\"","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"husky","lint:fix":"eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix","preversion":"npm test","test:watch":"jest --watch","postversion":"git push && git push --tags","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8ebe96f0-5160-4b14-911e-a8f881bc5daa"}},"repository":{"url":"git+https://github.com/AubaidFarrukh/smart-retry.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript retry library for HTTP requests with exponential/linear backoff, Axios and Fetch integrations, and automatic failure logging for later replay","directories":{},"lint-staged":{".ts":["eslint --fix","prettier --write"],"*.{json,md}":["prettier --write"]},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","axios":"^1.6.0","husky":"^9.1.7","eslint":"^9.39.0","ts-jest":"^29.2.0","prettier":"^3.6.2","typescript":"^5.3.0","@types/jest":"^29.5.0","@types/node":"^20.10.0","lint-staged":"^16.2.6","@commitlint/cli":"^20.1.0","@typescript-eslint/parser":"^8.46.2","@commitlint/config-conventional":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.46.2"},"peerDependencies":{"axios":"^1.6.0"},"peerDependenciesMeta":{"axios":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/smart-retry_1.1.0_1788379364892_0.7963526902643239","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@aubaid/smart-retry","version":"1.2.0","keywords":["retry","exponential-backoff","linear-backoff","backoff-strategy","http-retry","axios-retry","fetch-retry","request-retry","api-retry","resilience","fault-tolerance","error-handling","network-retry","transient-errors","typescript","promise","async-await","failure-logging"],"author":{"name":"Aubaid Farrukh"},"license":"MIT","_id":"@aubaid/smart-retry@1.2.0","maintainers":[{"name":"aubaid","email":"aubaidfarroukh@gmail.com"}],"homepage":"https://github.com/AubaidFarrukh/smart-retry#readme","bugs":{"url":"https://github.com/AubaidFarrukh/smart-retry/issues"},"dist":{"shasum":"48a192f8f5858442ca8cbf088a9c126fcfa8190e","tarball":"https://registry.npmjs.org/@aubaid/smart-retry/-/smart-retry-1.2.0.tgz","fileCount":31,"integrity":"sha512-ato9QkAWFCN8NP1yRZzEOTrwJCirTXvrYS3hIL+ozdw/n0pWWJR+mR0AKqKzdBFVNSPLhnR79tXWYW1VTfVsng==","signatures":[{"sig":"MEYCIQCjockMWH2hu8kwwmgqV8/HcQxNSk7F2hpIVTOAkNcziwIhAKWIEJSJcsmo6Ss12hBA4WFjUTWt4OmW6ewkayURQCO3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIBcErbOitOKQqi6KvZlGCJxg9uUyC27IOEIgfjh1BG50AiEAtXd9goFXWLnamhpTaMdc9/fmE5cyVkR1dM4fvu4E22g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aubaid%2fsmart-retry@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":64881},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"4930fc4e5f7c37307d6e055087e462a5c4bc2493","scripts":{"dev":"tsc --watch","tag":"git tag v$npm_package_version && git push origin v$npm_package_version","lint":"eslint \"src/**/*.ts\" \"tests/**/*.ts\"","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"husky","lint:fix":"eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix","preversion":"npm test","test:watch":"jest --watch","postversion":"git push && git push --tags","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8ebe96f0-5160-4b14-911e-a8f881bc5daa"}},"repository":{"url":"git+https://github.com/AubaidFarrukh/smart-retry.git","type":"git"},"_npmVersion":"12.1.0","description":"TypeScript retry library for HTTP requests with exponential/linear backoff, Axios and Fetch integrations, and automatic failure logging for later replay","directories":{},"lint-staged":{".ts":["eslint --fix","prettier --write"],"*.{json,md}":["prettier --write"]},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","axios":"^1.6.0","husky":"^9.1.7","eslint":"^9.39.0","ts-jest":"^29.2.0","prettier":"^3.6.2","typescript":"^5.3.0","@types/jest":"^29.5.0","@types/node":"^20.10.0","lint-staged":"^16.2.6","@commitlint/cli":"^20.1.0","@typescript-eslint/parser":"^8.46.2","@commitlint/config-conventional":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.46.2"},"peerDependencies":{"axios":"^1.6.0"},"peerDependenciesMeta":{"axios":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/smart-retry_1.2.0_1790239801384_0.5764835894012952","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"_id":"@aubaid/smart-retry@1.3.0","bin":{"smart-retry":"dist/cli.js"},"bugs":{"url":"https://github.com/AubaidFarrukh/smart-retry/issues"},"dist":{"shasum":"001e9e70622be585f867ebd81065522c34cc0d11","tarball":"https://registry.npmjs.org/@aubaid/smart-retry/-/smart-retry-1.3.0.tgz","fileCount":35,"integrity":"sha512-FUUTiUoSV+kF56PDN6TMz4Zfa/Uq7GWfDOrj5SlShIZFtHmdrv4qKR0wJpz1fE5uCEfoj9LxcMwafugXQbZpBQ==","signatures":[{"sig":"MEYCIQCBEU7pZSuatMFuxNtRv+jpWUVpmNvA8/ILab1yLXf5xAIhAImwc7Jvp+PkkxkXyw7W8aXbw9iSFYJLrY7BRtm9Ih/x","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB+YfyHmxk0fWGhKOpCpoDKPW03I05UlLEMfof1IooAuAiEAuvjpKDt37V3OOON56ZbRVNSrzeXJQWmU9y4gP+2Telc="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aubaid%2fsmart-retry@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":91021},"main":"dist/index.js","name":"@aubaid/smart-retry","type":"commonjs","types":"dist/index.d.ts","author":{"name":"Aubaid Farrukh"},"engines":{"node":">=14.0.0"},"gitHead":"5dc410c6c5907ee5b19525784f0a8371af6fb576","license":"MIT","scripts":{"dev":"tsc --watch","tag":"git tag v$npm_package_version && git push origin v$npm_package_version","lint":"eslint \"src/**/*.ts\" \"tests/**/*.ts\"","test":"jest","build":"tsc","clean":"rm -rf dist","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepare":"husky","lint:fix":"eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix","preversion":"npm test","test:watch":"jest --watch","postversion":"git push && git push --tags","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"version":"1.3.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"8ebe96f0-5160-4b14-911e-a8f881bc5daa"}},"homepage":"https://github.com/AubaidFarrukh/smart-retry#readme","keywords":["retry","exponential-backoff","linear-backoff","backoff-strategy","http-retry","axios-retry","fetch-retry","request-retry","api-retry","resilience","fault-tolerance","error-handling","network-retry","transient-errors","typescript","promise","async-await","failure-logging"],"repository":{"url":"git+https://github.com/AubaidFarrukh/smart-retry.git","type":"git"},"_npmVersion":"12.2.0","description":"TypeScript retry library for HTTP requests with exponential/linear backoff, Axios and Fetch integrations, and automatic failure logging for later replay","directories":{},"lint-staged":{".ts":["eslint --fix","prettier --write"],"*.{json,md}":["prettier --write"]},"maintainers":[{"name":"aubaid","email":"aubaidfarroukh@gmail.com"}],"_nodeVersion":"22.23.3","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","axios":"^1.6.0","husky":"^9.1.7","eslint":"^9.39.0","ts-jest":"^29.2.0","prettier":"^3.6.2","typescript":"^5.3.0","@types/jest":"^29.5.0","@types/node":"^20.10.0","lint-staged":"^16.2.6","@commitlint/cli":"^20.1.0","@typescript-eslint/parser":"^8.46.2","@commitlint/config-conventional":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.46.2"},"peerDependencies":{"axios":"^1.6.0"},"peerDependenciesMeta":{"axios":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/smart-retry_1.3.0_1790836514104_0.5761272284678185"}}},"time":{"created":"2025-11-03T06:49:27.328Z","modified":"2026-10-01T06:35:14.534Z","1.0.0":"2025-11-03T06:49:27.646Z","1.0.1":"2026-08-24T17:05:34.983Z","1.0.2":"2026-08-25T19:27:31.754Z","1.0.3":"2026-08-25T20:04:02.084Z","1.0.4":"2026-08-31T07:54:58.065Z","1.1.0":"2026-09-02T20:02:45.048Z","1.2.0":"2026-09-24T08:50:01.463Z","1.3.0":"2026-10-01T06:35:14.188Z"},"bugs":{"url":"https://github.com/AubaidFarrukh/smart-retry/issues"},"author":{"name":"Aubaid Farrukh"},"license":"MIT","homepage":"https://github.com/AubaidFarrukh/smart-retry#readme","keywords":["retry","exponential-backoff","linear-backoff","backoff-strategy","http-retry","axios-retry","fetch-retry","request-retry","api-retry","resilience","fault-tolerance","error-handling","network-retry","transient-errors","typescript","promise","async-await","failure-logging"],"repository":{"url":"git+https://github.com/AubaidFarrukh/smart-retry.git","type":"git"},"description":"TypeScript retry library for HTTP requests with exponential/linear backoff, Axios and Fetch integrations, and automatic failure logging for later replay","maintainers":[{"name":"aubaid","email":"aubaidfarroukh@gmail.com"}],"readme":"<!-- @format -->\n\n# smart-retry\n\n**smart-retry** is a TypeScript retry library for HTTP requests in Node.js. It wraps any async function, Axios call, or Fetch call with exponential/linear backoff, retries only transient failures (timeouts, network errors, 5xx, 429), and automatically logs exhausted failures to disk so you can inspect or replay them later.\n\n[![CI](https://github.com/AubaidFarrukh/smart-retry/actions/workflows/ci.yml/badge.svg)](https://github.com/AubaidFarrukh/smart-retry/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/%40aubaid%2Fsmart-retry.svg)](https://www.npmjs.com/package/@aubaid/smart-retry)\n[![npm downloads](https://img.shields.io/npm/dm/%40aubaid%2Fsmart-retry.svg)](https://www.npmjs.com/package/@aubaid/smart-retry)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Contents\n\n- [Why smart-retry](#why-smart-retry)\n- [Features](#features)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [API Reference](#api-reference)\n- [Advanced Usage](#advanced-usage)\n- [CLI](#cli)\n- [How It Works](#how-it-works)\n- [Backoff Strategies](#backoff-strategies)\n- [FAQ](#faq)\n- [Contributing](#contributing)\n- [License](#license)\n- [Links](#links)\n\n## Why smart-retry\n\nMost retry libraries stop at \"try again with backoff.\" smart-retry adds two things most others don't:\n\n- **Drop-in Axios and Fetch clients** (`createAxiosRetry`, `createFetchRetry`) instead of only a generic wrapper function, so you don't have to hand-roll the integration.\n- **Automatic failure logging** — requests that exhaust all retries are persisted to disk with their URL, method, headers, body, and error, so you can inspect or replay them after the fact instead of losing the failure the moment it's thrown.\n\nUse it when you're calling flaky third-party APIs, internal services behind a load balancer that occasionally 5xxs, or any HTTP call where a transient blip shouldn't fail the whole operation.\n\n## Features\n\n- **Smart retry logic** with exponential, linear, or fixed backoff\n- **Automatic failure logging** to disk for later replay\n- **Selective retries** — only retry transient errors (5xx, timeouts, network issues)\n- **Easy integration** with Axios and Fetch\n- **TypeScript support** with full type definitions\n- **Hooks and callbacks** for monitoring retry attempts\n- **Circuit breaker** to fail fast against a service that's fully down instead of retrying into it\n- **Replay failed requests** programmatically or via the `smart-retry replay` CLI\n\n## Installation\n\n```bash\nnpm install @aubaid/smart-retry\n```\n\n## Quick Start\n\n### Simple Function Retry\n\n```typescript\nimport { smartRetry } from '@aubaid/smart-retry';\n\nconst result = await smartRetry(() => fetchDataFromAPI(), {\n  maxRetries: 5,\n  delay: 2000,\n  backoff: 'exponential',\n});\n\nif (result.success) {\n  console.log('Data:', result.data);\n} else {\n  console.error('Failed after retries:', result.error);\n}\n```\n\n### Axios Integration\n\n`axios` is an optional peer dependency — install it if you want to use `createAxiosRetry`:\n\n```bash\nnpm install axios\n```\n\n```typescript\nimport { createAxiosRetry } from '@aubaid/smart-retry';\n\nconst axiosRetry = createAxiosRetry({\n  maxRetries: 5,\n  delay: 2000,\n  backoff: 'exponential',\n});\n\nconst response = await axiosRetry.get('https://api.example.com/users');\nconsole.log(response.data);\n```\n\n### Fetch Integration\n\n```typescript\nimport { createFetchRetry } from '@aubaid/smart-retry';\n\nconst fetchRetry = createFetchRetry({\n  maxRetries: 3,\n  delay: 1000,\n});\n\nconst response = await fetchRetry.get('https://api.example.com/data');\nconst data = await response.json();\n```\n\n## API Reference\n\n### `smartRetry(fn, config?)`\n\nRetry any async function.\n\n**Parameters:**\n\n- `fn: () => Promise<T>` - Function to retry\n- `config?: RetryConfig` - Optional configuration\n\n**Returns:** `Promise<RetryResult<T>>`\n\n### `createAxiosRetry(config?, storePath?)`\n\nCreate an Axios client with retry support.\n\n**Methods:**\n\n- `get(url, config?)`\n- `post(url, data?, config?)`\n- `put(url, data?, config?)`\n- `delete(url, config?)`\n- `patch(url, data?, config?)`\n\n### `createFetchRetry(config?, storePath?)`\n\nCreate a Fetch client with retry support.\n\n**Methods:**\n\n- `fetch(input, init?)`\n- `get(url, init?)`\n- `post(url, body?, init?)`\n- `put(url, body?, init?)`\n- `delete(url, init?)`\n- `patch(url, body?, init?)`\n\n### Configuration Options\n\n```typescript\ninterface RetryConfig {\n  maxRetries?: number; // Default: 3\n  delay?: number; // Default: 2000ms\n  backoff?: 'exponential' | 'linear' | 'none'; // Default: 'exponential'\n  shouldRetry?: (error: any) => boolean;\n  onRetry?: (attempt: number, error: any) => void;\n  idempotent?: boolean; // Default: false — see \"Which errors get retried by default?\" below\n  jitter?: boolean; // Default: false — adds randomization (50-100% of delay) to avoid thundering-herd retries\n  circuitBreaker?: CircuitBreakerConfig; // Off by default — see \"Circuit Breaker\" below\n}\n\ninterface CircuitBreakerConfig {\n  failureThreshold?: number; // Default: 5\n  cooldownMs?: number; // Default: 30000ms\n  onOpen?: () => void; // Called the moment the circuit trips open\n  onClose?: () => void; // Called the moment the circuit recovers to closed\n}\n```\n\n## Advanced Usage\n\n### Custom Retry Logic\n\n```typescript\nimport { createAxiosRetry } from '@aubaid/smart-retry';\n\nconst axiosRetry = createAxiosRetry({\n  maxRetries: 5,\n  delay: 3000,\n  backoff: 'exponential',\n  shouldRetry: (error) => {\n    const status = error.response?.status;\n    return status === 429 || status >= 500;\n  },\n  onRetry: (attempt, error) => {\n    console.log(`Retry ${attempt}: ${error.message}`);\n  },\n});\n```\n\n### Access Failed Requests\n\n```typescript\nconst axiosRetry = createAxiosRetry();\n\ntry {\n  await axiosRetry.get('https://flaky-api.com/data');\n} catch (error) {\n  const manager = axiosRetry.getRetryManager();\n  const failed = await manager.getFailedRequests();\n\n  console.log(`${failed.length} requests logged`);\n  console.log('Log file:', manager.getLogFilePath());\n}\n```\n\n### Manage Failure Log\n\n```typescript\nconst manager = retry.getRetryManager();\n\nconst all = await manager.getFailedRequests();\n\nconst count = await manager.getFailedRequestCount();\n\nawait manager.clearFailedRequests();\n\nconst removed = await manager.removeFailedRequest('request-id');\n```\n\n### Replay Failed Requests\n\nFailures are logged with everything needed to retry them later — so you don't have to just know something failed, you can actually re-fire it:\n\n```typescript\nconst client = createAxiosRetry();\n\n// Replay one logged failure by id, using the stored url/headers/body\nconst response = await client.replay('failed-request-id');\n\n// Replay every logged failure at once\nconst results = await client.replayAll();\n// [{ id, url, method, success: true }, { id, url, method, success: false, error }, ...]\n```\n\nNon-idempotent requests (POST, PATCH) are refused by default — the original request may have already been processed by the server before it was logged as failed, so blindly replaying it risks duplicating a side effect (a double charge, a duplicate order). Pass `force: true` once you've confirmed it's safe:\n\n```typescript\nawait client.replay('failed-request-id', { force: true });\n\n// replayAll supports the same options, plus filtering and a dry run:\nawait client.replayAll({\n  method: 'GET',\n  statusCode: 503,\n  dryRun: true, // report what would be replayed without making any requests\n});\n```\n\nA successfully replayed request is removed from the failure log by default (`removeOnSuccess: true`); a failed replay stays logged so it isn't lost.\n\n### Circuit Breaker\n\nRetrying with backoff is meant for transient blips — but if a service is fully down, retrying just keeps hammering it. Enabling a circuit breaker tracks consecutive failures and, once a threshold is hit, fails fast (no attempts made at all) for a cooldown period instead of retrying, then lets a single trial request through to check if the service has recovered:\n\n```typescript\nconst client = createAxiosRetry({\n  maxRetries: 3,\n  circuitBreaker: {\n    failureThreshold: 5, // open the circuit after 5 consecutive failures\n    cooldownMs: 30000, // stay open for 30s before trying again\n    onOpen: () => alertOnCall('downstream service looks down'),\n    onClose: () => alertOnCall('downstream service recovered'),\n  },\n});\n\ntry {\n  await client.get('https://flaky-api.com/data');\n} catch (error) {\n  if (error.circuitOpen) {\n    // failed instantly, no request was actually attempted\n  }\n}\n\nclient.getRetryManager().getCircuitState(); // 'closed' | 'open' | 'half-open'\n```\n\nThe circuit is scoped to the `RetryManager` instance (i.e. per client), not per URL — if a single client calls several different endpoints, failures across all of them count toward the same breaker. Create separate clients per endpoint if you need independent breakers.\n\n## CLI\n\nInstalling smart-retry also installs a `smart-retry` CLI for inspecting and replaying a failure log from the command line — handy for replaying failures after a deploy or an incident, without writing a script:\n\n```bash\n# List logged failures\nnpx smart-retry replay list\nnpx smart-retry replay list --method POST --status 503\nnpx smart-retry replay list --json\n\n# Replay one, by id\nnpx smart-retry replay <id>\nnpx smart-retry replay <id> --dry-run   # preview without making the request\nnpx smart-retry replay <id> --force     # required for a logged POST/PATCH\n\n# Replay everything (optionally filtered)\nnpx smart-retry replay --all\nnpx smart-retry replay --all --method GET --status 503\n```\n\nBy default it reads `smart-retry-log.json` in the current directory; pass `--log <path>` to point at a different file. The replay itself goes through the same retry/backoff machinery as the rest of the library — `--max-retries`, `--delay`, `--backoff`, and `--idempotent` configure that policy for the replay, same meaning as the matching `RetryConfig` options. Run `smart-retry replay --help` for the full list.\n\nThe CLI replays over `fetch`, so it requires Node 18 or later regardless of which client (`AxiosRetry` or `FetchRetry`) originally logged the failure — the retry/backoff/circuit-breaker library code itself still supports Node 14+.\n\n## How It Works\n\n1. **Executes your function** with automatic retry on failure\n2. **Detects transient errors** (5xx, timeouts, network issues)\n3. **Waits with backoff** before retrying (exponential by default)\n4. **Logs failures** to `smart-retry-log.json` after all retries exhausted\n5. **Returns result** with metadata (attempts, duration, success status)\n\n## Backoff Strategies\n\nThe delays below are the base values before jitter is applied. With `jitter: true`, each delay is randomized to 50–100% of the corresponding backoff delay.\n\n**Exponential (default):**\n\n```\nAttempt 1: 2s\nAttempt 2: 4s\nAttempt 3: 8s\nAttempt 4: 16s\n```\n\n**Linear:**\n\n```\nAttempt 1: 2s\nAttempt 2: 4s\nAttempt 3: 6s\nAttempt 4: 8s\n```\n\n**None:**\n\n```\nAll attempts: 2s fixed delay\n```\n\n## FAQ\n\n**Does smart-retry work with both Axios and Fetch?**\nYes — `createAxiosRetry` wraps Axios, `createFetchRetry` wraps the native `fetch` API. Both share the same retry, backoff, and failure-logging behavior.\n\n**Does it work in the browser or on edge runtimes (Vercel Edge, Cloudflare Workers)?**\nThe retry and backoff logic works anywhere. The failure-logging feature writes to disk via Node's `fs` module, which isn't available in browsers or most edge runtimes; in those environments it degrades to a no-op instead of throwing, so `createFetchRetry` still works for the request itself — you just won't get an on-disk failure log.\n\n**Which errors get retried by default?**\nNetwork errors (`ECONNREFUSED`, `ETIMEDOUT`, `ENOTFOUND`, `ECONNRESET`), HTTP 408, 429, and 5xx responses. 4xx client errors (except 408/429) and errors without a recognizable network/HTTP signal are not retried by default — override this with the `shouldRetry` config option.\n\n**Why isn't my POST/PATCH request retrying?**\nBy design. If a POST or PATCH fails after the server may have already processed it (a lost response, a mid-request network drop), blindly retrying can cause a duplicate side effect — a double charge, a duplicate order, and so on. GET, PUT, DELETE, HEAD, and OPTIONS are safe to retry and do so by default; POST and PATCH don't, unless you pass `idempotent: true` in `RetryConfig` (e.g. because your endpoint is safe to call more than once, such as via an idempotency key) or supply your own `shouldRetry`.\n\n**Where does the failure log get written?**\nTo `smart-retry-log.json` in the current working directory by default, or to a custom path passed as the second argument to `createAxiosRetry`/`createFetchRetry`/`createRetryManager`.\n\n**Is there a CLI to replay failed requests?**\nYes — see the [CLI](#cli) section above (`npx smart-retry replay`), or use `replay()`/`replayAll()` programmatically (see [Replay Failed Requests](#replay-failed-requests)).\n\n## Contributing\n\nContributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for the dev setup, commit conventions, and PR process. Please also review the [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## License\n\nMIT © Aubaid Farrukh\n\n## Links\n\n- [npm package](https://www.npmjs.com/package/@aubaid/smart-retry)\n- [GitHub repository](https://github.com/AubaidFarrukh/smart-retry)\n- [Report issues](https://github.com/AubaidFarrukh/smart-retry/issues)\n","readmeFilename":"README.md"}