@upstash/qstash 0.3.4 → 0.3.6
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/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/_util/asserts.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/fnv32.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/fnv64.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/index.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/util.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_wasm/lib/deno_std_wasm_crypto.generated.mjs +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_wasm/mod.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/crypto.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/keystack.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/mod.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/timing_safe_equal.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/to_hash_string.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/encoding/base64.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/encoding/base64url.js +0 -0
- package/esm/deps/deno.land/{std@0.173.0 → std@0.177.0}/encoding/hex.js +0 -0
- package/esm/pkg/client/client.js +1 -0
- package/esm/pkg/client/http.js +3 -3
- package/package.json +1 -1
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/_util/asserts.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/fnv32.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/fnv64.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/index.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/util.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_wasm/lib/deno_std_wasm_crypto.generated.mjs +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_wasm/mod.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/crypto.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/keystack.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/mod.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/timing_safe_equal.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/to_hash_string.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/encoding/base64.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/encoding/base64url.js +0 -0
- package/script/deps/deno.land/{std@0.173.0 → std@0.177.0}/encoding/hex.js +0 -0
- package/script/pkg/client/client.js +1 -0
- package/script/pkg/client/http.js +3 -3
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/_util/asserts.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/fnv32.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/fnv64.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/index.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_fnv/util.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_wasm/lib/deno_std_wasm_crypto.generated.d.mts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/_wasm/mod.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/crypto.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/keystack.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/mod.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/timing_safe_equal.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/crypto/to_hash_string.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/encoding/base64.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/encoding/base64url.d.ts +0 -0
- package/types/deps/deno.land/{std@0.173.0 → std@0.177.0}/encoding/hex.d.ts +0 -0
- package/types/pkg/client/client.d.ts +5 -1
- package/types/pkg/client/http.d.ts +1 -1
- package/types/pkg/receiver.d.ts +1 -1
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/esm/pkg/client/client.js
CHANGED
package/esm/pkg/client/http.js
CHANGED
|
@@ -35,8 +35,8 @@ export class HttpClient {
|
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
37
|
this.retry = {
|
|
38
|
-
attempts: config
|
|
39
|
-
backoff: config
|
|
38
|
+
attempts: config.retry?.retries ? config.retry.retries + 1 : 5,
|
|
39
|
+
backoff: config.retry?.backoff ??
|
|
40
40
|
((retryCount) => Math.exp(retryCount) * 50),
|
|
41
41
|
};
|
|
42
42
|
}
|
|
@@ -60,7 +60,7 @@ export class HttpClient {
|
|
|
60
60
|
}
|
|
61
61
|
let res = null;
|
|
62
62
|
let error = null;
|
|
63
|
-
for (let i = 0; i
|
|
63
|
+
for (let i = 0; i < this.retry.attempts; i++) {
|
|
64
64
|
try {
|
|
65
65
|
res = await fetch(url.toString(), requestOptions);
|
|
66
66
|
break;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -38,8 +38,8 @@ class HttpClient {
|
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
40
|
this.retry = {
|
|
41
|
-
attempts: config
|
|
42
|
-
backoff: config
|
|
41
|
+
attempts: config.retry?.retries ? config.retry.retries + 1 : 5,
|
|
42
|
+
backoff: config.retry?.backoff ??
|
|
43
43
|
((retryCount) => Math.exp(retryCount) * 50),
|
|
44
44
|
};
|
|
45
45
|
}
|
|
@@ -63,7 +63,7 @@ class HttpClient {
|
|
|
63
63
|
}
|
|
64
64
|
let res = null;
|
|
65
65
|
let error = null;
|
|
66
|
-
for (let i = 0; i
|
|
66
|
+
for (let i = 0; i < this.retry.attempts; i++) {
|
|
67
67
|
try {
|
|
68
68
|
res = await fetch(url.toString(), requestOptions);
|
|
69
69
|
break;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Requester } from "./http.js";
|
|
1
|
+
import { Requester, RetryConfig } from "./http.js";
|
|
2
2
|
import { Topics } from "./topics.js";
|
|
3
3
|
import { Messages } from "./messages.js";
|
|
4
4
|
import { Schedules } from "./schedules.js";
|
|
@@ -18,6 +18,10 @@ export declare type ClientConfig = {
|
|
|
18
18
|
* The authorization token from the upstash console.
|
|
19
19
|
*/
|
|
20
20
|
token: string;
|
|
21
|
+
/**
|
|
22
|
+
* Configure how the client should retry requests.
|
|
23
|
+
*/
|
|
24
|
+
retry?: RetryConfig | false;
|
|
21
25
|
};
|
|
22
26
|
declare type Destination = {
|
|
23
27
|
/**
|
package/types/pkg/receiver.d.ts
CHANGED