@upstash/qstash 2.11.0 → 2.11.1
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/README.md +20 -0
- package/{chunk-7DSF3QVE.mjs → chunk-ATX5KA4T.mjs} +1 -1
- package/{chunk-JQP6NQUW.mjs → chunk-KGYBZXTJ.mjs} +1 -1
- package/{chunk-LB3C5PJP.mjs → chunk-T3Z5YUS4.mjs} +8 -3
- package/{client-CUioGZfg.d.ts → client-BHOXiX0H.d.mts} +33 -2
- package/{client-CUioGZfg.d.mts → client-BHOXiX0H.d.ts} +33 -2
- package/cloudflare.d.mts +1 -1
- package/cloudflare.d.ts +1 -1
- package/cloudflare.js +8 -3
- package/cloudflare.mjs +1 -1
- package/h3.d.mts +1 -1
- package/h3.d.ts +1 -1
- package/h3.js +8 -3
- package/h3.mjs +3 -3
- package/hono.d.mts +1 -1
- package/hono.d.ts +1 -1
- package/hono.js +8 -3
- package/hono.mjs +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +8 -3
- package/index.mjs +2 -2
- package/nextjs.d.mts +1 -1
- package/nextjs.d.ts +1 -1
- package/nextjs.js +8 -3
- package/nextjs.mjs +1 -1
- package/nuxt.mjs +3 -3
- package/package.json +1 -1
- package/solidjs.d.mts +1 -1
- package/solidjs.d.ts +1 -1
- package/solidjs.js +8 -3
- package/solidjs.mjs +2 -2
- package/svelte.d.mts +1 -1
- package/svelte.d.ts +1 -1
- package/svelte.js +8 -3
- package/svelte.mjs +2 -2
- package/workflow.d.mts +1 -1
- package/workflow.d.ts +1 -1
- package/workflow.js +8 -3
- package/workflow.mjs +1 -1
package/README.md
CHANGED
|
@@ -127,6 +127,26 @@ const result = await client.publishJSON({
|
|
|
127
127
|
});
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
+
## Local Development
|
|
131
|
+
|
|
132
|
+
Set `QSTASH_DEV=true` in your environment variables, and the SDK will download and connect to a local QStash dev server automatically. No tokens or signing keys required: the SDK injects deterministic dev credentials.
|
|
133
|
+
|
|
134
|
+
```bash .env
|
|
135
|
+
QSTASH_DEV=true
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Alternatively, pass `devMode: true` to explicitly enable dev mode:
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
import { Client } from "@upstash/qstash";
|
|
142
|
+
|
|
143
|
+
const client = new Client({ devMode: true });
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The same flag works on the receiving side: pass `devMode: true` to `Receiver` or `verifySignature*` to verify signatures with the dev server's keys. Dev mode is automatically a no-op when `NODE_ENV=production` and in browser/edge runtimes.
|
|
147
|
+
|
|
148
|
+
See [Local Development](https://docs.upstash.com/qstash/howto/local-development) for the full walkthrough, including the `registerQStashDev()` helper for Next.js edge routes.
|
|
149
|
+
|
|
130
150
|
## Docs
|
|
131
151
|
|
|
132
152
|
See [the documentation](https://docs.upstash.com/qstash) for details.
|
|
@@ -256,6 +256,9 @@ var formatWorkflowError = (error) => {
|
|
|
256
256
|
|
|
257
257
|
// src/client/utils.ts
|
|
258
258
|
var DEFAULT_BULK_COUNT = 100;
|
|
259
|
+
function serializeLabel(label) {
|
|
260
|
+
return Array.isArray(label) ? label.join(",") : label;
|
|
261
|
+
}
|
|
259
262
|
var isIgnoredHeader = (header) => {
|
|
260
263
|
const lowerCaseHeader = header.toLowerCase();
|
|
261
264
|
return lowerCaseHeader.startsWith("content-type") || lowerCaseHeader.startsWith("upstash-");
|
|
@@ -340,7 +343,7 @@ function processHeaders(request) {
|
|
|
340
343
|
headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
|
|
341
344
|
}
|
|
342
345
|
if (request.label !== void 0) {
|
|
343
|
-
headers.set("Upstash-Label", request.label);
|
|
346
|
+
headers.set("Upstash-Label", serializeLabel(request.label));
|
|
344
347
|
}
|
|
345
348
|
if (request.redact !== void 0) {
|
|
346
349
|
const redactParts = [];
|
|
@@ -590,7 +593,9 @@ var checkDevServerReachable = async (baseUrl, runtime) => {
|
|
|
590
593
|
var pingEdge = async (baseUrl) => {
|
|
591
594
|
try {
|
|
592
595
|
const controller = new AbortController();
|
|
593
|
-
const timeout = setTimeout(() =>
|
|
596
|
+
const timeout = setTimeout(() => {
|
|
597
|
+
controller.abort();
|
|
598
|
+
}, HEALTH_CHECK_TIMEOUT_MS);
|
|
594
599
|
const response = await fetch(`${baseUrl}/v2/keys`, {
|
|
595
600
|
headers: { Authorization: `Bearer ${DEV_CREDENTIALS.token}` },
|
|
596
601
|
signal: controller.signal
|
|
@@ -2094,7 +2099,7 @@ var UrlGroups = class {
|
|
|
2094
2099
|
};
|
|
2095
2100
|
|
|
2096
2101
|
// version.ts
|
|
2097
|
-
var VERSION = "2.11.
|
|
2102
|
+
var VERSION = "2.11.1";
|
|
2098
2103
|
|
|
2099
2104
|
// src/client/client.ts
|
|
2100
2105
|
var Client = class {
|
|
@@ -101,7 +101,19 @@ type Log = {
|
|
|
101
101
|
endpointName?: string;
|
|
102
102
|
header?: Record<string, string>;
|
|
103
103
|
body?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Label of the message.
|
|
106
|
+
*
|
|
107
|
+
* @deprecated Use `labels` instead. When a message has multiple labels, this
|
|
108
|
+
* field only contains the first one.
|
|
109
|
+
*/
|
|
104
110
|
label?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Labels attached to the message.
|
|
113
|
+
*
|
|
114
|
+
* A message can have multiple labels when published with `label: string[]`.
|
|
115
|
+
*/
|
|
116
|
+
labels?: string[];
|
|
105
117
|
};
|
|
106
118
|
/**
|
|
107
119
|
* Deprecated. Use the `Log` type instead.
|
|
@@ -528,7 +540,14 @@ type UniversalFilterFields = {
|
|
|
528
540
|
fromDate?: Date | number;
|
|
529
541
|
toDate?: Date | number;
|
|
530
542
|
callerIp?: string;
|
|
531
|
-
|
|
543
|
+
/**
|
|
544
|
+
* Filter by label.
|
|
545
|
+
*
|
|
546
|
+
* Pass an array to match runs that have any of the given labels (OR semantics).
|
|
547
|
+
* For example, with runs labelled `[label_1, label_2]` and `[label_2, label_3]`,
|
|
548
|
+
* filtering by `[label_1, label_2]` returns both.
|
|
549
|
+
*/
|
|
550
|
+
label?: string | string[];
|
|
532
551
|
flowControlKey?: string;
|
|
533
552
|
};
|
|
534
553
|
/** QStash-specific identity filters (DLQ + message endpoints). */
|
|
@@ -763,8 +782,17 @@ type Message = {
|
|
|
763
782
|
period?: number;
|
|
764
783
|
/**
|
|
765
784
|
* The label assigned to the message for filtering purposes.
|
|
785
|
+
*
|
|
786
|
+
* @deprecated Use `labels` instead. When a message has multiple labels, this
|
|
787
|
+
* field only contains the first one.
|
|
766
788
|
*/
|
|
767
789
|
label?: string;
|
|
790
|
+
/**
|
|
791
|
+
* The labels assigned to the message for filtering purposes.
|
|
792
|
+
*
|
|
793
|
+
* A message can have multiple labels when published with `label: string[]`.
|
|
794
|
+
*/
|
|
795
|
+
labels?: string[];
|
|
768
796
|
};
|
|
769
797
|
type MessagePayload = Omit<Message, "urlGroup"> & {
|
|
770
798
|
topicName: string;
|
|
@@ -2285,9 +2313,12 @@ type PublishRequest<TBody = BodyInit> = {
|
|
|
2285
2313
|
/**
|
|
2286
2314
|
* Assign a label to the request to filter logs later.
|
|
2287
2315
|
*
|
|
2316
|
+
* Pass an array to attach multiple labels to a single message; they are
|
|
2317
|
+
* sent as a comma-separated value in the `Upstash-Label` header.
|
|
2318
|
+
*
|
|
2288
2319
|
* @default undefined
|
|
2289
2320
|
*/
|
|
2290
|
-
label?: string;
|
|
2321
|
+
label?: string | string[];
|
|
2291
2322
|
/**
|
|
2292
2323
|
* Configure which fields should be redacted in logs.
|
|
2293
2324
|
*
|
|
@@ -101,7 +101,19 @@ type Log = {
|
|
|
101
101
|
endpointName?: string;
|
|
102
102
|
header?: Record<string, string>;
|
|
103
103
|
body?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Label of the message.
|
|
106
|
+
*
|
|
107
|
+
* @deprecated Use `labels` instead. When a message has multiple labels, this
|
|
108
|
+
* field only contains the first one.
|
|
109
|
+
*/
|
|
104
110
|
label?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Labels attached to the message.
|
|
113
|
+
*
|
|
114
|
+
* A message can have multiple labels when published with `label: string[]`.
|
|
115
|
+
*/
|
|
116
|
+
labels?: string[];
|
|
105
117
|
};
|
|
106
118
|
/**
|
|
107
119
|
* Deprecated. Use the `Log` type instead.
|
|
@@ -528,7 +540,14 @@ type UniversalFilterFields = {
|
|
|
528
540
|
fromDate?: Date | number;
|
|
529
541
|
toDate?: Date | number;
|
|
530
542
|
callerIp?: string;
|
|
531
|
-
|
|
543
|
+
/**
|
|
544
|
+
* Filter by label.
|
|
545
|
+
*
|
|
546
|
+
* Pass an array to match runs that have any of the given labels (OR semantics).
|
|
547
|
+
* For example, with runs labelled `[label_1, label_2]` and `[label_2, label_3]`,
|
|
548
|
+
* filtering by `[label_1, label_2]` returns both.
|
|
549
|
+
*/
|
|
550
|
+
label?: string | string[];
|
|
532
551
|
flowControlKey?: string;
|
|
533
552
|
};
|
|
534
553
|
/** QStash-specific identity filters (DLQ + message endpoints). */
|
|
@@ -763,8 +782,17 @@ type Message = {
|
|
|
763
782
|
period?: number;
|
|
764
783
|
/**
|
|
765
784
|
* The label assigned to the message for filtering purposes.
|
|
785
|
+
*
|
|
786
|
+
* @deprecated Use `labels` instead. When a message has multiple labels, this
|
|
787
|
+
* field only contains the first one.
|
|
766
788
|
*/
|
|
767
789
|
label?: string;
|
|
790
|
+
/**
|
|
791
|
+
* The labels assigned to the message for filtering purposes.
|
|
792
|
+
*
|
|
793
|
+
* A message can have multiple labels when published with `label: string[]`.
|
|
794
|
+
*/
|
|
795
|
+
labels?: string[];
|
|
768
796
|
};
|
|
769
797
|
type MessagePayload = Omit<Message, "urlGroup"> & {
|
|
770
798
|
topicName: string;
|
|
@@ -2285,9 +2313,12 @@ type PublishRequest<TBody = BodyInit> = {
|
|
|
2285
2313
|
/**
|
|
2286
2314
|
* Assign a label to the request to filter logs later.
|
|
2287
2315
|
*
|
|
2316
|
+
* Pass an array to attach multiple labels to a single message; they are
|
|
2317
|
+
* sent as a comma-separated value in the `Upstash-Label` header.
|
|
2318
|
+
*
|
|
2288
2319
|
* @default undefined
|
|
2289
2320
|
*/
|
|
2290
|
-
label?: string;
|
|
2321
|
+
label?: string | string[];
|
|
2291
2322
|
/**
|
|
2292
2323
|
* Configure which fields should be redacted in logs.
|
|
2293
2324
|
*
|
package/cloudflare.d.mts
CHANGED
package/cloudflare.d.ts
CHANGED
package/cloudflare.js
CHANGED
|
@@ -276,6 +276,9 @@ var formatWorkflowError = (error) => {
|
|
|
276
276
|
|
|
277
277
|
// src/client/utils.ts
|
|
278
278
|
var DEFAULT_BULK_COUNT = 100;
|
|
279
|
+
function serializeLabel(label) {
|
|
280
|
+
return Array.isArray(label) ? label.join(",") : label;
|
|
281
|
+
}
|
|
279
282
|
var isIgnoredHeader = (header) => {
|
|
280
283
|
const lowerCaseHeader = header.toLowerCase();
|
|
281
284
|
return lowerCaseHeader.startsWith("content-type") || lowerCaseHeader.startsWith("upstash-");
|
|
@@ -360,7 +363,7 @@ function processHeaders(request) {
|
|
|
360
363
|
headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
|
|
361
364
|
}
|
|
362
365
|
if (request.label !== void 0) {
|
|
363
|
-
headers.set("Upstash-Label", request.label);
|
|
366
|
+
headers.set("Upstash-Label", serializeLabel(request.label));
|
|
364
367
|
}
|
|
365
368
|
if (request.redact !== void 0) {
|
|
366
369
|
const redactParts = [];
|
|
@@ -610,7 +613,9 @@ var checkDevServerReachable = async (baseUrl, runtime) => {
|
|
|
610
613
|
var pingEdge = async (baseUrl) => {
|
|
611
614
|
try {
|
|
612
615
|
const controller = new AbortController();
|
|
613
|
-
const timeout = setTimeout(() =>
|
|
616
|
+
const timeout = setTimeout(() => {
|
|
617
|
+
controller.abort();
|
|
618
|
+
}, HEALTH_CHECK_TIMEOUT_MS);
|
|
614
619
|
const response = await fetch(`${baseUrl}/v2/keys`, {
|
|
615
620
|
headers: { Authorization: `Bearer ${DEV_CREDENTIALS.token}` },
|
|
616
621
|
signal: controller.signal
|
|
@@ -2114,7 +2119,7 @@ var UrlGroups = class {
|
|
|
2114
2119
|
};
|
|
2115
2120
|
|
|
2116
2121
|
// version.ts
|
|
2117
|
-
var VERSION = "2.11.
|
|
2122
|
+
var VERSION = "2.11.1";
|
|
2118
2123
|
|
|
2119
2124
|
// src/client/client.ts
|
|
2120
2125
|
var Client = class {
|
package/cloudflare.mjs
CHANGED
package/h3.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as h3 from 'h3';
|
|
2
2
|
import { H3Event } from 'h3';
|
|
3
|
-
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-
|
|
3
|
+
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-BHOXiX0H.mjs';
|
|
4
4
|
import 'neverthrow';
|
|
5
5
|
|
|
6
6
|
type VerifySignatureConfig = {
|
package/h3.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as h3 from 'h3';
|
|
2
2
|
import { H3Event } from 'h3';
|
|
3
|
-
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-
|
|
3
|
+
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-BHOXiX0H.js';
|
|
4
4
|
import 'neverthrow';
|
|
5
5
|
|
|
6
6
|
type VerifySignatureConfig = {
|
package/h3.js
CHANGED
|
@@ -600,6 +600,9 @@ var formatWorkflowError = (error) => {
|
|
|
600
600
|
|
|
601
601
|
// src/client/utils.ts
|
|
602
602
|
var DEFAULT_BULK_COUNT = 100;
|
|
603
|
+
function serializeLabel(label) {
|
|
604
|
+
return Array.isArray(label) ? label.join(",") : label;
|
|
605
|
+
}
|
|
603
606
|
var isIgnoredHeader = (header) => {
|
|
604
607
|
const lowerCaseHeader = header.toLowerCase();
|
|
605
608
|
return lowerCaseHeader.startsWith("content-type") || lowerCaseHeader.startsWith("upstash-");
|
|
@@ -684,7 +687,7 @@ function processHeaders(request) {
|
|
|
684
687
|
headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
|
|
685
688
|
}
|
|
686
689
|
if (request.label !== void 0) {
|
|
687
|
-
headers.set("Upstash-Label", request.label);
|
|
690
|
+
headers.set("Upstash-Label", serializeLabel(request.label));
|
|
688
691
|
}
|
|
689
692
|
if (request.redact !== void 0) {
|
|
690
693
|
const redactParts = [];
|
|
@@ -934,7 +937,9 @@ var checkDevServerReachable = async (baseUrl, runtime) => {
|
|
|
934
937
|
var pingEdge = async (baseUrl) => {
|
|
935
938
|
try {
|
|
936
939
|
const controller = new AbortController();
|
|
937
|
-
const timeout = setTimeout(() =>
|
|
940
|
+
const timeout = setTimeout(() => {
|
|
941
|
+
controller.abort();
|
|
942
|
+
}, HEALTH_CHECK_TIMEOUT_MS);
|
|
938
943
|
const response = await fetch(`${baseUrl}/v2/keys`, {
|
|
939
944
|
headers: { Authorization: `Bearer ${DEV_CREDENTIALS.token}` },
|
|
940
945
|
signal: controller.signal
|
|
@@ -3824,7 +3829,7 @@ var Workflow = class {
|
|
|
3824
3829
|
};
|
|
3825
3830
|
|
|
3826
3831
|
// version.ts
|
|
3827
|
-
var VERSION = "2.11.
|
|
3832
|
+
var VERSION = "2.11.1";
|
|
3828
3833
|
|
|
3829
3834
|
// src/client/client.ts
|
|
3830
3835
|
var Client = class {
|
package/h3.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
serve,
|
|
3
3
|
verifySignatureH3
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-KGYBZXTJ.mjs";
|
|
5
|
+
import "./chunk-ATX5KA4T.mjs";
|
|
6
|
+
import "./chunk-T3Z5YUS4.mjs";
|
|
7
7
|
export {
|
|
8
8
|
serve,
|
|
9
9
|
verifySignatureH3
|
package/hono.d.mts
CHANGED
package/hono.d.ts
CHANGED
package/hono.js
CHANGED
|
@@ -276,6 +276,9 @@ var formatWorkflowError = (error) => {
|
|
|
276
276
|
|
|
277
277
|
// src/client/utils.ts
|
|
278
278
|
var DEFAULT_BULK_COUNT = 100;
|
|
279
|
+
function serializeLabel(label) {
|
|
280
|
+
return Array.isArray(label) ? label.join(",") : label;
|
|
281
|
+
}
|
|
279
282
|
var isIgnoredHeader = (header) => {
|
|
280
283
|
const lowerCaseHeader = header.toLowerCase();
|
|
281
284
|
return lowerCaseHeader.startsWith("content-type") || lowerCaseHeader.startsWith("upstash-");
|
|
@@ -360,7 +363,7 @@ function processHeaders(request) {
|
|
|
360
363
|
headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
|
|
361
364
|
}
|
|
362
365
|
if (request.label !== void 0) {
|
|
363
|
-
headers.set("Upstash-Label", request.label);
|
|
366
|
+
headers.set("Upstash-Label", serializeLabel(request.label));
|
|
364
367
|
}
|
|
365
368
|
if (request.redact !== void 0) {
|
|
366
369
|
const redactParts = [];
|
|
@@ -610,7 +613,9 @@ var checkDevServerReachable = async (baseUrl, runtime) => {
|
|
|
610
613
|
var pingEdge = async (baseUrl) => {
|
|
611
614
|
try {
|
|
612
615
|
const controller = new AbortController();
|
|
613
|
-
const timeout = setTimeout(() =>
|
|
616
|
+
const timeout = setTimeout(() => {
|
|
617
|
+
controller.abort();
|
|
618
|
+
}, HEALTH_CHECK_TIMEOUT_MS);
|
|
614
619
|
const response = await fetch(`${baseUrl}/v2/keys`, {
|
|
615
620
|
headers: { Authorization: `Bearer ${DEV_CREDENTIALS.token}` },
|
|
616
621
|
signal: controller.signal
|
|
@@ -2114,7 +2119,7 @@ var UrlGroups = class {
|
|
|
2114
2119
|
};
|
|
2115
2120
|
|
|
2116
2121
|
// version.ts
|
|
2117
|
-
var VERSION = "2.11.
|
|
2122
|
+
var VERSION = "2.11.1";
|
|
2118
2123
|
|
|
2119
2124
|
// src/client/client.ts
|
|
2120
2125
|
var Client = class {
|
package/hono.mjs
CHANGED
package/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload, L as LLMOwner, B as BaseProvider, E as EmailOwner, P as ProviderInfo } from './client-
|
|
2
|
-
export { A as AddEndpointsRequest, Y as BodyInit, a0 as Chat, a2 as ChatCompletion, a3 as ChatCompletionChunk, a1 as ChatCompletionMessage, a9 as ChatRequest, j as Client, v as CreateScheduleRequest, x as Endpoint, K as Event, O as EventPayload, h as EventsRequest, $ as FlowControl, r as FlowControlApi, o as FlowControlInfo, W as GetEventsPayload, i as GetEventsResponse, T as GetLogsPayload, G as GetLogsResponse, p as GlobalParallelismInfo, I as HTTPMethods, Z as HeadersInit, J as Log, N as LogPayload, g as LogsRequest, M as Message, s as MessagePayload, t as Messages, a7 as OpenAIChatModel, q as PinFlowControlOptions, a8 as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, n as PublishResponse, k as PublishToApiResponse, m as PublishToUrlGroupsResponse, l as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, y as RemoveEndpointsRequest, _ as RequestOptions, u as Schedule, w as Schedules, b as SignatureError, H as State, a5 as StreamDisabled, a4 as StreamEnabled, a6 as StreamParameter, U as UnpinFlowControlOptions, z as UrlGroup, D as UrlGroups, V as VerifyRequest, X as WithCursor, ac as anthropic, ad as custom, ab as openai, aa as upstash } from './client-
|
|
1
|
+
import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload, L as LLMOwner, B as BaseProvider, E as EmailOwner, P as ProviderInfo } from './client-BHOXiX0H.mjs';
|
|
2
|
+
export { A as AddEndpointsRequest, Y as BodyInit, a0 as Chat, a2 as ChatCompletion, a3 as ChatCompletionChunk, a1 as ChatCompletionMessage, a9 as ChatRequest, j as Client, v as CreateScheduleRequest, x as Endpoint, K as Event, O as EventPayload, h as EventsRequest, $ as FlowControl, r as FlowControlApi, o as FlowControlInfo, W as GetEventsPayload, i as GetEventsResponse, T as GetLogsPayload, G as GetLogsResponse, p as GlobalParallelismInfo, I as HTTPMethods, Z as HeadersInit, J as Log, N as LogPayload, g as LogsRequest, M as Message, s as MessagePayload, t as Messages, a7 as OpenAIChatModel, q as PinFlowControlOptions, a8 as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, n as PublishResponse, k as PublishToApiResponse, m as PublishToUrlGroupsResponse, l as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, y as RemoveEndpointsRequest, _ as RequestOptions, u as Schedule, w as Schedules, b as SignatureError, H as State, a5 as StreamDisabled, a4 as StreamEnabled, a6 as StreamParameter, U as UnpinFlowControlOptions, z as UrlGroup, D as UrlGroups, V as VerifyRequest, X as WithCursor, ac as anthropic, ad as custom, ab as openai, aa as upstash } from './client-BHOXiX0H.mjs';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
|
|
5
5
|
/**
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload, L as LLMOwner, B as BaseProvider, E as EmailOwner, P as ProviderInfo } from './client-
|
|
2
|
-
export { A as AddEndpointsRequest, Y as BodyInit, a0 as Chat, a2 as ChatCompletion, a3 as ChatCompletionChunk, a1 as ChatCompletionMessage, a9 as ChatRequest, j as Client, v as CreateScheduleRequest, x as Endpoint, K as Event, O as EventPayload, h as EventsRequest, $ as FlowControl, r as FlowControlApi, o as FlowControlInfo, W as GetEventsPayload, i as GetEventsResponse, T as GetLogsPayload, G as GetLogsResponse, p as GlobalParallelismInfo, I as HTTPMethods, Z as HeadersInit, J as Log, N as LogPayload, g as LogsRequest, M as Message, s as MessagePayload, t as Messages, a7 as OpenAIChatModel, q as PinFlowControlOptions, a8 as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, n as PublishResponse, k as PublishToApiResponse, m as PublishToUrlGroupsResponse, l as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, y as RemoveEndpointsRequest, _ as RequestOptions, u as Schedule, w as Schedules, b as SignatureError, H as State, a5 as StreamDisabled, a4 as StreamEnabled, a6 as StreamParameter, U as UnpinFlowControlOptions, z as UrlGroup, D as UrlGroups, V as VerifyRequest, X as WithCursor, ac as anthropic, ad as custom, ab as openai, aa as upstash } from './client-
|
|
1
|
+
import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload, L as LLMOwner, B as BaseProvider, E as EmailOwner, P as ProviderInfo } from './client-BHOXiX0H.js';
|
|
2
|
+
export { A as AddEndpointsRequest, Y as BodyInit, a0 as Chat, a2 as ChatCompletion, a3 as ChatCompletionChunk, a1 as ChatCompletionMessage, a9 as ChatRequest, j as Client, v as CreateScheduleRequest, x as Endpoint, K as Event, O as EventPayload, h as EventsRequest, $ as FlowControl, r as FlowControlApi, o as FlowControlInfo, W as GetEventsPayload, i as GetEventsResponse, T as GetLogsPayload, G as GetLogsResponse, p as GlobalParallelismInfo, I as HTTPMethods, Z as HeadersInit, J as Log, N as LogPayload, g as LogsRequest, M as Message, s as MessagePayload, t as Messages, a7 as OpenAIChatModel, q as PinFlowControlOptions, a8 as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, n as PublishResponse, k as PublishToApiResponse, m as PublishToUrlGroupsResponse, l as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, y as RemoveEndpointsRequest, _ as RequestOptions, u as Schedule, w as Schedules, b as SignatureError, H as State, a5 as StreamDisabled, a4 as StreamEnabled, a6 as StreamParameter, U as UnpinFlowControlOptions, z as UrlGroup, D as UrlGroups, V as VerifyRequest, X as WithCursor, ac as anthropic, ad as custom, ab as openai, aa as upstash } from './client-BHOXiX0H.js';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
|
|
5
5
|
/**
|
package/index.js
CHANGED
|
@@ -314,6 +314,9 @@ var formatWorkflowError = (error) => {
|
|
|
314
314
|
|
|
315
315
|
// src/client/utils.ts
|
|
316
316
|
var DEFAULT_BULK_COUNT = 100;
|
|
317
|
+
function serializeLabel(label) {
|
|
318
|
+
return Array.isArray(label) ? label.join(",") : label;
|
|
319
|
+
}
|
|
317
320
|
var isIgnoredHeader = (header) => {
|
|
318
321
|
const lowerCaseHeader = header.toLowerCase();
|
|
319
322
|
return lowerCaseHeader.startsWith("content-type") || lowerCaseHeader.startsWith("upstash-");
|
|
@@ -398,7 +401,7 @@ function processHeaders(request) {
|
|
|
398
401
|
headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
|
|
399
402
|
}
|
|
400
403
|
if (request.label !== void 0) {
|
|
401
|
-
headers.set("Upstash-Label", request.label);
|
|
404
|
+
headers.set("Upstash-Label", serializeLabel(request.label));
|
|
402
405
|
}
|
|
403
406
|
if (request.redact !== void 0) {
|
|
404
407
|
const redactParts = [];
|
|
@@ -643,7 +646,9 @@ var checkDevServerReachable = async (baseUrl, runtime) => {
|
|
|
643
646
|
var pingEdge = async (baseUrl) => {
|
|
644
647
|
try {
|
|
645
648
|
const controller = new AbortController();
|
|
646
|
-
const timeout = setTimeout(() =>
|
|
649
|
+
const timeout = setTimeout(() => {
|
|
650
|
+
controller.abort();
|
|
651
|
+
}, HEALTH_CHECK_TIMEOUT_MS);
|
|
647
652
|
const response = await fetch(`${baseUrl}/v2/keys`, {
|
|
648
653
|
headers: { Authorization: `Bearer ${DEV_CREDENTIALS.token}` },
|
|
649
654
|
signal: controller.signal
|
|
@@ -2178,7 +2183,7 @@ var Workflow = class {
|
|
|
2178
2183
|
};
|
|
2179
2184
|
|
|
2180
2185
|
// version.ts
|
|
2181
|
-
var VERSION = "2.11.
|
|
2186
|
+
var VERSION = "2.11.1";
|
|
2182
2187
|
|
|
2183
2188
|
// src/client/client.ts
|
|
2184
2189
|
var Client = class {
|
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resend
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ATX5KA4T.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Chat,
|
|
6
6
|
Client,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
openai,
|
|
25
25
|
setupAnalytics,
|
|
26
26
|
upstash
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-T3Z5YUS4.mjs";
|
|
28
28
|
export {
|
|
29
29
|
Chat,
|
|
30
30
|
Client,
|
package/nextjs.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NextApiHandler } from 'next';
|
|
2
2
|
import { NextRequest, NextFetchEvent } from 'next/server';
|
|
3
|
-
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-
|
|
3
|
+
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-BHOXiX0H.mjs';
|
|
4
4
|
import 'neverthrow';
|
|
5
5
|
|
|
6
6
|
type VerifySignatureConfig = {
|
package/nextjs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NextApiHandler } from 'next';
|
|
2
2
|
import { NextRequest, NextFetchEvent } from 'next/server';
|
|
3
|
-
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-
|
|
3
|
+
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-BHOXiX0H.js';
|
|
4
4
|
import 'neverthrow';
|
|
5
5
|
|
|
6
6
|
type VerifySignatureConfig = {
|
package/nextjs.js
CHANGED
|
@@ -281,6 +281,9 @@ var formatWorkflowError = (error) => {
|
|
|
281
281
|
|
|
282
282
|
// src/client/utils.ts
|
|
283
283
|
var DEFAULT_BULK_COUNT = 100;
|
|
284
|
+
function serializeLabel(label) {
|
|
285
|
+
return Array.isArray(label) ? label.join(",") : label;
|
|
286
|
+
}
|
|
284
287
|
var isIgnoredHeader = (header) => {
|
|
285
288
|
const lowerCaseHeader = header.toLowerCase();
|
|
286
289
|
return lowerCaseHeader.startsWith("content-type") || lowerCaseHeader.startsWith("upstash-");
|
|
@@ -365,7 +368,7 @@ function processHeaders(request) {
|
|
|
365
368
|
headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
|
|
366
369
|
}
|
|
367
370
|
if (request.label !== void 0) {
|
|
368
|
-
headers.set("Upstash-Label", request.label);
|
|
371
|
+
headers.set("Upstash-Label", serializeLabel(request.label));
|
|
369
372
|
}
|
|
370
373
|
if (request.redact !== void 0) {
|
|
371
374
|
const redactParts = [];
|
|
@@ -615,7 +618,9 @@ var checkDevServerReachable = async (baseUrl, runtime) => {
|
|
|
615
618
|
var pingEdge = async (baseUrl) => {
|
|
616
619
|
try {
|
|
617
620
|
const controller = new AbortController();
|
|
618
|
-
const timeout = setTimeout(() =>
|
|
621
|
+
const timeout = setTimeout(() => {
|
|
622
|
+
controller.abort();
|
|
623
|
+
}, HEALTH_CHECK_TIMEOUT_MS);
|
|
619
624
|
const response = await fetch(`${baseUrl}/v2/keys`, {
|
|
620
625
|
headers: { Authorization: `Bearer ${DEV_CREDENTIALS.token}` },
|
|
621
626
|
signal: controller.signal
|
|
@@ -2119,7 +2124,7 @@ var UrlGroups = class {
|
|
|
2119
2124
|
};
|
|
2120
2125
|
|
|
2121
2126
|
// version.ts
|
|
2122
|
-
var VERSION = "2.11.
|
|
2127
|
+
var VERSION = "2.11.1";
|
|
2123
2128
|
|
|
2124
2129
|
// src/client/client.ts
|
|
2125
2130
|
var Client = class {
|
package/nextjs.mjs
CHANGED
package/nuxt.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
verifySignatureH3
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-KGYBZXTJ.mjs";
|
|
4
|
+
import "./chunk-ATX5KA4T.mjs";
|
|
5
|
+
import "./chunk-T3Z5YUS4.mjs";
|
|
6
6
|
|
|
7
7
|
// platforms/nuxt.ts
|
|
8
8
|
var verifySignatureNuxt = verifySignatureH3;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.11.
|
|
1
|
+
{"version":"2.11.1","name":"@upstash/qstash","description":"Official Typescript client for QStash","author":"Andreas Thomas <dev@chronark.com>","license":"MIT","homepage":"https://github.com/upstash/qstash-js#readme","repository":{"type":"git","url":"git+https://github.com/upstash/qstash-js.git"},"bugs":{"url":"https://github.com/upstash/qstash-js/issues"},"main":"./index.js","module":"./index.mjs","types":"./index.d.ts","files":["./*"],"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./dist/nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./h3":{"import":"./h3.mjs","require":"./h3.js"},"./nuxt":{"import":"./nuxt.mjs","require":"./nuxt.js"},"./svelte":{"import":"./svelte.mjs","require":"./svelte.js"},"./solidjs":{"import":"./solidjs.mjs","require":"./solidjs.js"},"./workflow":{"import":"./workflow.mjs","require":"./workflow.js"},"./hono":{"import":"./hono.mjs","require":"./hono.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"}},"keywords":["qstash","queue","events","serverless","upstash"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test src","fmt":"prettier --write .","lint":"tsc && eslint \"{src,platforms}/**/*.{js,ts,tsx}\" --quiet --fix","check-exports":"bun run build && cd dist && attw -P"},"devDependencies":{"@commitlint/cli":"^19.2.2","@commitlint/config-conventional":"^19.2.2","@eslint/eslintrc":"^3.1.0","@eslint/js":"^9.10.0","@solidjs/start":"^1.0.6","@sveltejs/kit":"^2.5.18","@types/bun":"^1.1.1","@types/crypto-js":"^4.2.0","@typescript-eslint/eslint-plugin":"^8.4.0","@typescript-eslint/parser":"^8.4.0","bun-types":"^1.1.7","eslint":"^9.10.0","eslint-plugin-unicorn":"^51.0.1","h3":"^1.12.0","hono":"^4.5.8","husky":"^9.0.10","next":"^14.0.2","prettier":"^3.2.5","tsup":"latest","typescript":"^5.4.5","undici-types":"^6.16.0","vitest":"latest"},"dependencies":{"crypto-js":">=4.2.0","jose":"^5.2.3","neverthrow":"^7.0.1"}}
|
package/solidjs.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIHandler, APIEvent } from '@solidjs/start/server';
|
|
2
|
-
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-
|
|
2
|
+
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-BHOXiX0H.mjs';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
|
|
5
5
|
type VerifySignatureConfig = {
|
package/solidjs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIHandler, APIEvent } from '@solidjs/start/server';
|
|
2
|
-
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-
|
|
2
|
+
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-BHOXiX0H.js';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
|
|
5
5
|
type VerifySignatureConfig = {
|
package/solidjs.js
CHANGED
|
@@ -277,6 +277,9 @@ var formatWorkflowError = (error) => {
|
|
|
277
277
|
|
|
278
278
|
// src/client/utils.ts
|
|
279
279
|
var DEFAULT_BULK_COUNT = 100;
|
|
280
|
+
function serializeLabel(label) {
|
|
281
|
+
return Array.isArray(label) ? label.join(",") : label;
|
|
282
|
+
}
|
|
280
283
|
var isIgnoredHeader = (header) => {
|
|
281
284
|
const lowerCaseHeader = header.toLowerCase();
|
|
282
285
|
return lowerCaseHeader.startsWith("content-type") || lowerCaseHeader.startsWith("upstash-");
|
|
@@ -361,7 +364,7 @@ function processHeaders(request) {
|
|
|
361
364
|
headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
|
|
362
365
|
}
|
|
363
366
|
if (request.label !== void 0) {
|
|
364
|
-
headers.set("Upstash-Label", request.label);
|
|
367
|
+
headers.set("Upstash-Label", serializeLabel(request.label));
|
|
365
368
|
}
|
|
366
369
|
if (request.redact !== void 0) {
|
|
367
370
|
const redactParts = [];
|
|
@@ -611,7 +614,9 @@ var checkDevServerReachable = async (baseUrl, runtime) => {
|
|
|
611
614
|
var pingEdge = async (baseUrl) => {
|
|
612
615
|
try {
|
|
613
616
|
const controller = new AbortController();
|
|
614
|
-
const timeout = setTimeout(() =>
|
|
617
|
+
const timeout = setTimeout(() => {
|
|
618
|
+
controller.abort();
|
|
619
|
+
}, HEALTH_CHECK_TIMEOUT_MS);
|
|
615
620
|
const response = await fetch(`${baseUrl}/v2/keys`, {
|
|
616
621
|
headers: { Authorization: `Bearer ${DEV_CREDENTIALS.token}` },
|
|
617
622
|
signal: controller.signal
|
|
@@ -3501,7 +3506,7 @@ var Workflow = class {
|
|
|
3501
3506
|
};
|
|
3502
3507
|
|
|
3503
3508
|
// version.ts
|
|
3504
|
-
var VERSION = "2.11.
|
|
3509
|
+
var VERSION = "2.11.1";
|
|
3505
3510
|
|
|
3506
3511
|
// src/client/client.ts
|
|
3507
3512
|
var Client = class {
|
package/solidjs.mjs
CHANGED
package/svelte.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestHandler } from '@sveltejs/kit';
|
|
2
|
-
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-
|
|
2
|
+
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-BHOXiX0H.mjs';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
|
|
5
5
|
type VerifySignatureConfig = {
|
package/svelte.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestHandler } from '@sveltejs/kit';
|
|
2
|
-
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-
|
|
2
|
+
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-BHOXiX0H.js';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
|
|
5
5
|
type VerifySignatureConfig = {
|
package/svelte.js
CHANGED
|
@@ -277,6 +277,9 @@ var formatWorkflowError = (error) => {
|
|
|
277
277
|
|
|
278
278
|
// src/client/utils.ts
|
|
279
279
|
var DEFAULT_BULK_COUNT = 100;
|
|
280
|
+
function serializeLabel(label) {
|
|
281
|
+
return Array.isArray(label) ? label.join(",") : label;
|
|
282
|
+
}
|
|
280
283
|
var isIgnoredHeader = (header) => {
|
|
281
284
|
const lowerCaseHeader = header.toLowerCase();
|
|
282
285
|
return lowerCaseHeader.startsWith("content-type") || lowerCaseHeader.startsWith("upstash-");
|
|
@@ -361,7 +364,7 @@ function processHeaders(request) {
|
|
|
361
364
|
headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
|
|
362
365
|
}
|
|
363
366
|
if (request.label !== void 0) {
|
|
364
|
-
headers.set("Upstash-Label", request.label);
|
|
367
|
+
headers.set("Upstash-Label", serializeLabel(request.label));
|
|
365
368
|
}
|
|
366
369
|
if (request.redact !== void 0) {
|
|
367
370
|
const redactParts = [];
|
|
@@ -611,7 +614,9 @@ var checkDevServerReachable = async (baseUrl, runtime) => {
|
|
|
611
614
|
var pingEdge = async (baseUrl) => {
|
|
612
615
|
try {
|
|
613
616
|
const controller = new AbortController();
|
|
614
|
-
const timeout = setTimeout(() =>
|
|
617
|
+
const timeout = setTimeout(() => {
|
|
618
|
+
controller.abort();
|
|
619
|
+
}, HEALTH_CHECK_TIMEOUT_MS);
|
|
615
620
|
const response = await fetch(`${baseUrl}/v2/keys`, {
|
|
616
621
|
headers: { Authorization: `Bearer ${DEV_CREDENTIALS.token}` },
|
|
617
622
|
signal: controller.signal
|
|
@@ -3501,7 +3506,7 @@ var Workflow = class {
|
|
|
3501
3506
|
};
|
|
3502
3507
|
|
|
3503
3508
|
// version.ts
|
|
3504
|
-
var VERSION = "2.11.
|
|
3509
|
+
var VERSION = "2.11.1";
|
|
3505
3510
|
|
|
3506
3511
|
// src/client/client.ts
|
|
3507
3512
|
var Client = class {
|
package/svelte.mjs
CHANGED
package/workflow.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ar as AsyncStepFunction, ak as DisabledWorkflowContext, F as FailureFunctionPayload, au as FinishCondition, aw as LogLevel, at as ParallelCallState, ap as RawStep, av as RequiredExceptFields, ae as RouteFunction, S as Step, as as StepFunction, ao as StepType, an as StepTypes, aq as SyncStepFunction, ag as Workflow, al as WorkflowClient, aj as WorkflowContext, ay as WorkflowLogger, ax as WorkflowLoggerOptions, am as WorkflowReceiver, af as WorkflowServeOptions, ah as processOptions, ai as serve } from './client-
|
|
1
|
+
export { ar as AsyncStepFunction, ak as DisabledWorkflowContext, F as FailureFunctionPayload, au as FinishCondition, aw as LogLevel, at as ParallelCallState, ap as RawStep, av as RequiredExceptFields, ae as RouteFunction, S as Step, as as StepFunction, ao as StepType, an as StepTypes, aq as SyncStepFunction, ag as Workflow, al as WorkflowClient, aj as WorkflowContext, ay as WorkflowLogger, ax as WorkflowLoggerOptions, am as WorkflowReceiver, af as WorkflowServeOptions, ah as processOptions, ai as serve } from './client-BHOXiX0H.mjs';
|
|
2
2
|
import 'neverthrow';
|
package/workflow.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ar as AsyncStepFunction, ak as DisabledWorkflowContext, F as FailureFunctionPayload, au as FinishCondition, aw as LogLevel, at as ParallelCallState, ap as RawStep, av as RequiredExceptFields, ae as RouteFunction, S as Step, as as StepFunction, ao as StepType, an as StepTypes, aq as SyncStepFunction, ag as Workflow, al as WorkflowClient, aj as WorkflowContext, ay as WorkflowLogger, ax as WorkflowLoggerOptions, am as WorkflowReceiver, af as WorkflowServeOptions, ah as processOptions, ai as serve } from './client-
|
|
1
|
+
export { ar as AsyncStepFunction, ak as DisabledWorkflowContext, F as FailureFunctionPayload, au as FinishCondition, aw as LogLevel, at as ParallelCallState, ap as RawStep, av as RequiredExceptFields, ae as RouteFunction, S as Step, as as StepFunction, ao as StepType, an as StepTypes, aq as SyncStepFunction, ag as Workflow, al as WorkflowClient, aj as WorkflowContext, ay as WorkflowLogger, ax as WorkflowLoggerOptions, am as WorkflowReceiver, af as WorkflowServeOptions, ah as processOptions, ai as serve } from './client-BHOXiX0H.js';
|
|
2
2
|
import 'neverthrow';
|
package/workflow.js
CHANGED
|
@@ -282,6 +282,9 @@ var formatWorkflowError = (error) => {
|
|
|
282
282
|
|
|
283
283
|
// src/client/utils.ts
|
|
284
284
|
var DEFAULT_BULK_COUNT = 100;
|
|
285
|
+
function serializeLabel(label) {
|
|
286
|
+
return Array.isArray(label) ? label.join(",") : label;
|
|
287
|
+
}
|
|
285
288
|
var isIgnoredHeader = (header) => {
|
|
286
289
|
const lowerCaseHeader = header.toLowerCase();
|
|
287
290
|
return lowerCaseHeader.startsWith("content-type") || lowerCaseHeader.startsWith("upstash-");
|
|
@@ -366,7 +369,7 @@ function processHeaders(request) {
|
|
|
366
369
|
headers.set("Upstash-Flow-Control-Value", controlValue.join(", "));
|
|
367
370
|
}
|
|
368
371
|
if (request.label !== void 0) {
|
|
369
|
-
headers.set("Upstash-Label", request.label);
|
|
372
|
+
headers.set("Upstash-Label", serializeLabel(request.label));
|
|
370
373
|
}
|
|
371
374
|
if (request.redact !== void 0) {
|
|
372
375
|
const redactParts = [];
|
|
@@ -616,7 +619,9 @@ var checkDevServerReachable = async (baseUrl, runtime) => {
|
|
|
616
619
|
var pingEdge = async (baseUrl) => {
|
|
617
620
|
try {
|
|
618
621
|
const controller = new AbortController();
|
|
619
|
-
const timeout = setTimeout(() =>
|
|
622
|
+
const timeout = setTimeout(() => {
|
|
623
|
+
controller.abort();
|
|
624
|
+
}, HEALTH_CHECK_TIMEOUT_MS);
|
|
620
625
|
const response = await fetch(`${baseUrl}/v2/keys`, {
|
|
621
626
|
headers: { Authorization: `Bearer ${DEV_CREDENTIALS.token}` },
|
|
622
627
|
signal: controller.signal
|
|
@@ -2120,7 +2125,7 @@ var UrlGroups = class {
|
|
|
2120
2125
|
};
|
|
2121
2126
|
|
|
2122
2127
|
// version.ts
|
|
2123
|
-
var VERSION = "2.11.
|
|
2128
|
+
var VERSION = "2.11.1";
|
|
2124
2129
|
|
|
2125
2130
|
// src/client/client.ts
|
|
2126
2131
|
var Client = class {
|