@spoosh/plugin-retry 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -58,7 +58,7 @@ interface RetryWriteOptions {
|
|
|
58
58
|
*/
|
|
59
59
|
shouldRetry?: ShouldRetryCallback;
|
|
60
60
|
}
|
|
61
|
-
type
|
|
61
|
+
type RetryPagesOptions = RetryReadOptions;
|
|
62
62
|
type RetryQueueOptions = RetryReadOptions;
|
|
63
63
|
type RetryReadResult = object;
|
|
64
64
|
type RetryWriteResult = object;
|
|
@@ -93,11 +93,11 @@ type RetryQueueResult = object;
|
|
|
93
93
|
declare function retryPlugin(config?: RetryPluginConfig): SpooshPlugin<{
|
|
94
94
|
readOptions: RetryReadOptions;
|
|
95
95
|
writeOptions: RetryWriteOptions;
|
|
96
|
-
|
|
96
|
+
pagesOptions: RetryPagesOptions;
|
|
97
97
|
queueOptions: RetryQueueOptions;
|
|
98
98
|
readResult: RetryReadResult;
|
|
99
99
|
writeResult: RetryWriteResult;
|
|
100
100
|
queueResult: RetryQueueResult;
|
|
101
101
|
}>;
|
|
102
102
|
|
|
103
|
-
export { DEFAULT_RETRY_STATUS_CODES, type
|
|
103
|
+
export { DEFAULT_RETRY_STATUS_CODES, type RetryPagesOptions, type RetryPluginConfig, type RetryQueueOptions, type RetryQueueResult, type RetryReadOptions, type RetryReadResult, type RetryWriteOptions, type RetryWriteResult, type ShouldRetryCallback, type ShouldRetryContext, retryPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ interface RetryWriteOptions {
|
|
|
58
58
|
*/
|
|
59
59
|
shouldRetry?: ShouldRetryCallback;
|
|
60
60
|
}
|
|
61
|
-
type
|
|
61
|
+
type RetryPagesOptions = RetryReadOptions;
|
|
62
62
|
type RetryQueueOptions = RetryReadOptions;
|
|
63
63
|
type RetryReadResult = object;
|
|
64
64
|
type RetryWriteResult = object;
|
|
@@ -93,11 +93,11 @@ type RetryQueueResult = object;
|
|
|
93
93
|
declare function retryPlugin(config?: RetryPluginConfig): SpooshPlugin<{
|
|
94
94
|
readOptions: RetryReadOptions;
|
|
95
95
|
writeOptions: RetryWriteOptions;
|
|
96
|
-
|
|
96
|
+
pagesOptions: RetryPagesOptions;
|
|
97
97
|
queueOptions: RetryQueueOptions;
|
|
98
98
|
readResult: RetryReadResult;
|
|
99
99
|
writeResult: RetryWriteResult;
|
|
100
100
|
queueResult: RetryQueueResult;
|
|
101
101
|
}>;
|
|
102
102
|
|
|
103
|
-
export { DEFAULT_RETRY_STATUS_CODES, type
|
|
103
|
+
export { DEFAULT_RETRY_STATUS_CODES, type RetryPagesOptions, type RetryPluginConfig, type RetryQueueOptions, type RetryQueueResult, type RetryReadOptions, type RetryReadResult, type RetryWriteOptions, type RetryWriteResult, type ShouldRetryCallback, type ShouldRetryContext, retryPlugin };
|
package/dist/index.js
CHANGED
|
@@ -51,7 +51,7 @@ function retryPlugin(config = {}) {
|
|
|
51
51
|
} = config;
|
|
52
52
|
return {
|
|
53
53
|
name: PLUGIN_NAME,
|
|
54
|
-
operations: ["read", "write", "
|
|
54
|
+
operations: ["read", "write", "pages", "queue"],
|
|
55
55
|
priority: 200,
|
|
56
56
|
middleware: async (context, next) => {
|
|
57
57
|
const t = context.tracer?.(PLUGIN_NAME);
|
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ function retryPlugin(config = {}) {
|
|
|
24
24
|
} = config;
|
|
25
25
|
return {
|
|
26
26
|
name: PLUGIN_NAME,
|
|
27
|
-
operations: ["read", "write", "
|
|
27
|
+
operations: ["read", "write", "pages", "queue"],
|
|
28
28
|
priority: 200,
|
|
29
29
|
middleware: async (context, next) => {
|
|
30
30
|
const t = context.tracer?.(PLUGIN_NAME);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/plugin-retry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Automatic retry plugin for Spoosh with configurable attempts and delay",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@spoosh/core": ">=0.
|
|
36
|
+
"@spoosh/core": ">=0.15.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@spoosh/core": "0.
|
|
40
|
-
"@spoosh/test-utils": "0.
|
|
39
|
+
"@spoosh/core": "0.15.0",
|
|
40
|
+
"@spoosh/test-utils": "0.3.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"dev": "tsup --watch",
|