{"_id":"@dediapp/retry-promise","_rev":"4-341d40053eada3cc1a59a41aa237bed7","name":"@dediapp/retry-promise","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"@dediapp/retry-promise","version":"0.0.1","keywords":["matrix","twake"],"author":{},"license":"AGPL-3.0-or-later","_id":"@dediapp/retry-promise@0.0.1","maintainers":[{"name":"dedidev","email":"dedimcomtr@gmail.com"}],"homepage":"https://ci.dediapp.com/publicgroup/oss/twake/tom-server","bugs":{"url":"https://ci.dediapp.com/publicgroup/oss/twake/tom-server/-/issues"},"dist":{"shasum":"0cc37a9d0ab7a8ec34b70d37aafd7895ae7b6b5c","tarball":"https://registry.npmjs.org/@dediapp/retry-promise/-/retry-promise-0.0.1.tgz","fileCount":2,"integrity":"sha512-CDWAGEShQy5q9Lh7/KkNTTzycM3C/WX7J9RZfWgKFXUhl+cmJiYfoqUBbTlqpoIj0RsMY0O5IjEHvEN3KqK3Jg==","signatures":[{"sig":"MEYCIQDjWYoiQZPfFcVxihHMc5q/SFoMMr/svLIE8Cb4+Pq62QIhANbU4bKtvyx4VVJyZ6l+pwgO5uYO4fGK5Y1PknAaA4Hr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2773},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{"import":"./dist/index.js"},"gitHead":"3e4caf7f582d650d2fc13cf4169fdd22ad6893d9","scripts":{"test":"jest","build":"rollup -c"},"_npmUser":{"name":"dedidev","email":"dedimcomtr@gmail.com"},"repository":{"url":"https://ci.dediapp.com/publicgroup/oss/twake/tom-server.git","type":"git"},"_npmVersion":"11.6.1","description":"Promise with retry strategy module","directories":{},"_nodeVersion":"22.20.0","dependencies":{"retry":"^0.13.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/retry":"^0.12.2"},"_npmOperationalInternal":{"tmp":"tmp/retry-promise_0.0.1_1760527820356_0.5165363380144445","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@dediapp/retry-promise","version":"0.0.2","keywords":["matrix","dedi"],"author":{},"license":"AGPL-3.0-or-later","_id":"@dediapp/retry-promise@0.0.2","maintainers":[{"name":"dedidev","email":"dedimcomtr@gmail.com"}],"homepage":"https://github.com/DediappDev/dedi-server","bugs":{"url":"https://github.com/DediappDev/dedi-server/-/issues"},"dist":{"shasum":"7cba34c9cbf3b6af5a38004dd356347fac95648e","tarball":"https://registry.npmjs.org/@dediapp/retry-promise/-/retry-promise-0.0.2.tgz","fileCount":5,"integrity":"sha512-f22y2McstDzDBtNd5dzlytKvySuTFDBUpwCqzQH/Huk8uMNd2sMS1BnFczOFCtKY95iqgVsm+kneHBSVmtd0tA==","signatures":[{"sig":"MEUCIQCCYQWw3oO/Phej56Bo7cwD4Z/VPkHOGMNJ7UrGDnEcFgIgcLnhHUzf0gJlmf0ROthuwjC9cVAOS9mT5RoS4g5ssKA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5107},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{"import":"./dist/index.js"},"gitHead":"9368800f83dc344a760f33f3b5e5f534ff55be5e","scripts":{"test":"jest","build":"rollup -c"},"_npmUser":{"name":"dedidev","email":"dedimcomtr@gmail.com"},"repository":{"url":"git+https://github.com/DediappDev/dedi-server.git","type":"git"},"_npmVersion":"11.6.1","description":"Promise with retry strategy module","directories":{},"_nodeVersion":"22.20.0","dependencies":{"retry":"^0.13.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/retry":"^0.12.2"},"_npmOperationalInternal":{"tmp":"tmp/retry-promise_0.0.2_1760538212199_0.5845825361590717","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@dediapp/retry-promise","version":"0.0.3","keywords":["matrix","dedi"],"author":{},"license":"AGPL-3.0-or-later","_id":"@dediapp/retry-promise@0.0.3","maintainers":[{"name":"dedidev","email":"dedimcomtr@gmail.com"}],"homepage":"https://github.com/DediappDev/dedi-server","bugs":{"url":"https://github.com/DediappDev/dedi-server/-/issues"},"dist":{"shasum":"0d0a1f6a631998ef59cdf23e6e9fbaf417f9cb4d","tarball":"https://registry.npmjs.org/@dediapp/retry-promise/-/retry-promise-0.0.3.tgz","fileCount":5,"integrity":"sha512-HrARHPwrwTimp4ON1nwPcJNd7wdBbOJHFSyfabEOpe6PmQdRM8v95JQRFAMtSpSgVkO1SqDGaEgUyZTwjH595g==","signatures":[{"sig":"MEQCIF2rqMVqpsvcITwaiRNEPI2eVTWgpQV93pH1PsDEEOyZAiA2sIlWbeTw5/vxYVDw1VQNmKEvl1INrSCte4Qx37ESYQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5107},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{"import":"./dist/index.js"},"gitHead":"e31e72286ee5d2fe0df4f468f17cd918474adaa7","scripts":{"test":"jest","build":"rollup -c"},"_npmUser":{"name":"dedidev","email":"dedimcomtr@gmail.com"},"repository":{"url":"git+https://github.com/DediappDev/dedi-server.git","type":"git"},"_npmVersion":"11.6.1","description":"Promise with retry strategy module","directories":{},"_nodeVersion":"22.20.0","dependencies":{"retry":"^0.13.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/retry":"^0.12.2"},"_npmOperationalInternal":{"tmp":"tmp/retry-promise_0.0.3_1760539774380_0.134927748517913","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@dediapp/retry-promise","version":"1.0.0","description":"Promise with retry strategy module","keywords":["matrix","dedi"],"homepage":"https://github.com/DediappDev/dedi-server","bugs":{"url":"https://github.com/DediappDev/dedi-server/-/issues"},"repository":{"type":"git","url":"git+https://github.com/DediappDev/dedi-server.git"},"license":"AGPL-3.0-or-later","author":{},"type":"module","exports":{"import":"./dist/index.js"},"main":"dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"rollup -c","test":"jest"},"dependencies":{"retry":"^0.13.1"},"devDependencies":{"@types/retry":"^0.12.2"},"gitHead":"21eda165dc45e43d32319626d63ed893eb968f6d","_id":"@dediapp/retry-promise@1.0.0","_nodeVersion":"22.20.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-Dt6oVvrN5AX9R+C2xRhc7TJczs42t6o5jfoOraCuY90R6nPDcFe48ydp3/rSkHx9tYZZth6vrRoqgx639LfLeQ==","shasum":"cb98f8057be2c493df4bd026a6a46f027200fcbc","tarball":"https://registry.npmjs.org/@dediapp/retry-promise/-/retry-promise-1.0.0.tgz","fileCount":5,"unpackedSize":5110,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGWOWQFfHqqYKyzAf1hqWSQTAAEOqpFozvT9qsIF6YCEAiAmMbhRfJulCMY+l6cijqq6FXSQLmP+zQMgyq/oMSqpnw=="}]},"_npmUser":{"name":"dedidev","email":"dedimcomtr@gmail.com"},"directories":{},"maintainers":[{"name":"dedidev","email":"dedimcomtr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/retry-promise_1.0.0_1760567802400_0.9983905730779872"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-15T11:30:20.242Z","modified":"2025-10-15T22:36:42.841Z","0.0.1":"2025-10-15T11:30:20.543Z","0.0.2":"2025-10-15T14:23:32.387Z","0.0.3":"2025-10-15T14:49:34.587Z","1.0.0":"2025-10-15T22:36:42.648Z"},"bugs":{"url":"https://github.com/DediappDev/dedi-server/-/issues"},"author":{},"license":"AGPL-3.0-or-later","homepage":"https://github.com/DediappDev/dedi-server","keywords":["matrix","dedi"],"repository":{"type":"git","url":"git+https://github.com/DediappDev/dedi-server.git"},"description":"Promise with retry strategy module","maintainers":[{"name":"dedidev","email":"dedimcomtr@gmail.com"}],"readme":"# @dediapp/retry-promise\n\nSimple module extending javascript Promise with retry strategy\n\n## Synopsis\n\n```js\nimport RetryPromise from '@dediapp/retry-promise'\n\nconst promise = new RetryPromise((resolve, reject) => {\n  fetch(URL)\n    .then(val => resolve())\n    .catch(reject)\n})\n\nconst promiseWithOption = new RetryPromise((resolve, reject) => {\n  fetch(URL)\n    .then(val => resolve())\n    .catch(reject)\n  },{\n    retries: 6\n    minTimeout: 10 // The number of milliseconds before starting the first retry\n    maxTimeout: 100 // The maximum number of milliseconds between two retries\n  }\n)\n\nconst allPromises = RetryPromise.all([\n      new RetryPromise((resolve, reject) => {\n        fetch(URL_1)\n          .then(val => resolve())\n          .catch(reject)\n      }), \n      new RetryPromise((resolve, reject) => {\n        fetch(URL_2)\n          .then(val => resolve())\n          .catch(reject)\n      })\n    ])\n\nconst allSettledtPromises = RetryPromise.allSettled([\n      new RetryPromise((resolve, reject) => {\n        fetch(URL_1)\n          .then(val => resolve())\n          .catch(reject)\n      }), \n      new RetryPromise((resolve, reject) => {\n        fetch(URL_2)\n          .then(val => resolve())\n          .catch(reject)\n      })\n    ])\n```\n\n## How it works\n\n`RetryPromise` allows to build promises that can be re-triggered 3 times or a custom number of times. We can also redefine `minTimeout` option and `maxTimeout` option values, by default it is 100 ms and 1000 ms. Finally, `all` and `allSettled` are very similar to the native Promise methods, but they do not accept Promises instances as parameters.\n\n## Copyright and license\n\nCopyright (c) 2023-present DediApp <https://dedim.com.tr>\n\nLicense: [GNU AFFERO GENERAL PUBLIC LICENSE](https://ci.dedim.com.tr/publicgroup/oss/dedi/dedi-server/-/blob/master/LICENSE)\n","readmeFilename":"README.md"}