@orpc/client 2.0.0-beta.42 → 2.0.0-beta.43
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/plugins/index.d.mts
CHANGED
|
@@ -365,6 +365,9 @@ interface RetryAfterLinkPluginOptions<T extends ClientContext> {
|
|
|
365
365
|
* The Retry After Link Plugin automatically retries requests based on server `retry-after` header.
|
|
366
366
|
* This is particularly useful for handling rate limiting and temporary server unavailability.
|
|
367
367
|
*
|
|
368
|
+
* @remarks
|
|
369
|
+
* **Note**: Requests with a stream or async iterator body are never retried, since the body cannot be resent.
|
|
370
|
+
*
|
|
368
371
|
* @see {@link https://orpc.dev/docs/plugins/retry-after | Retry After Plugin}
|
|
369
372
|
*/
|
|
370
373
|
declare class RetryAfterLinkPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -365,6 +365,9 @@ interface RetryAfterLinkPluginOptions<T extends ClientContext> {
|
|
|
365
365
|
* The Retry After Link Plugin automatically retries requests based on server `retry-after` header.
|
|
366
366
|
* This is particularly useful for handling rate limiting and temporary server unavailability.
|
|
367
367
|
*
|
|
368
|
+
* @remarks
|
|
369
|
+
* **Note**: Requests with a stream or async iterator body are never retried, since the body cannot be resent.
|
|
370
|
+
*
|
|
368
371
|
* @see {@link https://orpc.dev/docs/plugins/retry-after | Retry After Plugin}
|
|
369
372
|
*/
|
|
370
373
|
declare class RetryAfterLinkPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -874,6 +874,10 @@ class RetryAfterLinkPlugin {
|
|
|
874
874
|
}
|
|
875
875
|
init(options) {
|
|
876
876
|
const interceptor = async (interceptorOptions) => {
|
|
877
|
+
const { body } = interceptorOptions.request;
|
|
878
|
+
if (body instanceof ReadableStream || isAsyncIteratorObject(body)) {
|
|
879
|
+
return interceptorOptions.next();
|
|
880
|
+
}
|
|
877
881
|
const startTime = Date.now();
|
|
878
882
|
let attemptCount = 0;
|
|
879
883
|
while (true) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.43",
|
|
5
5
|
"description": "Consume oRPC and OpenAPI APIs with end-to-end type safety over HTTP, WebSocket, or message ports",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": [
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"dist"
|
|
64
64
|
],
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@orpc/shared": "2.0.0-beta.
|
|
67
|
-
"@standard-server/core": "~0.10.
|
|
68
|
-
"@standard-server/fetch": "~0.10.
|
|
69
|
-
"@standard-server/peer": "~0.10.
|
|
66
|
+
"@orpc/shared": "2.0.0-beta.43",
|
|
67
|
+
"@standard-server/core": "~0.10.2",
|
|
68
|
+
"@standard-server/fetch": "~0.10.2",
|
|
69
|
+
"@standard-server/peer": "~0.10.2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/ws": "^8.18.1",
|