@upstash/qstash 2.7.19 → 2.7.21
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/{chunk-RNFKMAEP.mjs → chunk-3D34OUXY.mjs} +1 -1
- package/{chunk-L2DZYBAR.mjs → chunk-FGKPOZOO.mjs} +1 -1
- package/{chunk-S5ODGXCI.mjs → chunk-QHCEWG63.mjs} +16 -5
- package/{client-CdYtp0E1.d.ts → client-DuOcoFUv.d.mts} +9 -2
- package/{client-CdYtp0E1.d.mts → client-DuOcoFUv.d.ts} +9 -2
- package/cloudflare.d.mts +1 -1
- package/cloudflare.d.ts +1 -1
- package/cloudflare.js +16 -5
- package/cloudflare.mjs +1 -1
- package/h3.d.mts +1 -1
- package/h3.d.ts +1 -1
- package/h3.js +16 -5
- package/h3.mjs +3 -3
- package/hono.d.mts +1 -1
- package/hono.d.ts +1 -1
- package/hono.js +16 -5
- package/hono.mjs +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +16 -5
- package/index.mjs +2 -2
- package/nextjs.d.mts +1 -1
- package/nextjs.d.ts +1 -1
- package/nextjs.js +16 -5
- 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 +16 -5
- package/solidjs.mjs +2 -2
- package/svelte.d.mts +1 -1
- package/svelte.d.ts +1 -1
- package/svelte.js +16 -5
- package/svelte.mjs +2 -2
- package/workflow.d.mts +1 -1
- package/workflow.d.ts +1 -1
- package/workflow.js +16 -5
- package/workflow.mjs +1 -1
|
@@ -587,6 +587,9 @@ var LLMProvider = class extends BaseProvider {
|
|
|
587
587
|
if (this.owner === "openai" && this.organization) {
|
|
588
588
|
headers["OpenAI-Organization"] = this.organization;
|
|
589
589
|
}
|
|
590
|
+
if (this.owner === "anthropic") {
|
|
591
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
592
|
+
}
|
|
590
593
|
return headers;
|
|
591
594
|
}
|
|
592
595
|
/**
|
|
@@ -1110,14 +1113,22 @@ var Client = class {
|
|
|
1110
1113
|
http;
|
|
1111
1114
|
token;
|
|
1112
1115
|
constructor(config) {
|
|
1116
|
+
const environment = typeof process === "undefined" ? {} : process.env;
|
|
1117
|
+
const baseUrl = config?.baseUrl ? config.baseUrl.replace(/\/$/, "") : environment.QSTASH_URL ?? "https://qstash.upstash.io";
|
|
1118
|
+
const token = config?.token ?? environment.QSTASH_TOKEN;
|
|
1113
1119
|
this.http = new HttpClient({
|
|
1114
|
-
retry: config
|
|
1115
|
-
baseUrl
|
|
1116
|
-
authorization: `Bearer ${
|
|
1120
|
+
retry: config?.retry,
|
|
1121
|
+
baseUrl,
|
|
1122
|
+
authorization: `Bearer ${token}`,
|
|
1117
1123
|
//@ts-expect-error caused by undici and bunjs type overlap
|
|
1118
|
-
headers: prefixHeaders(new Headers(config
|
|
1124
|
+
headers: prefixHeaders(new Headers(config?.headers ?? {}))
|
|
1119
1125
|
});
|
|
1120
|
-
|
|
1126
|
+
if (!token) {
|
|
1127
|
+
console.warn(
|
|
1128
|
+
"[Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable."
|
|
1129
|
+
);
|
|
1130
|
+
}
|
|
1131
|
+
this.token = token;
|
|
1121
1132
|
}
|
|
1122
1133
|
/**
|
|
1123
1134
|
* Access the urlGroup API.
|
|
@@ -1564,13 +1564,20 @@ type ClientConfig = {
|
|
|
1564
1564
|
*
|
|
1565
1565
|
* This is only used for testing.
|
|
1566
1566
|
*
|
|
1567
|
+
* If not provided, value of the QSTASH_URL environment
|
|
1568
|
+
* variable will be used if it exists. If the QSTASH_URL
|
|
1569
|
+
* environment variable isn't set either, default is used.
|
|
1570
|
+
*
|
|
1567
1571
|
* @default "https://qstash.upstash.io"
|
|
1568
1572
|
*/
|
|
1569
1573
|
baseUrl?: string;
|
|
1570
1574
|
/**
|
|
1571
1575
|
* The authorization token from the upstash console.
|
|
1576
|
+
*
|
|
1577
|
+
* If not provided, value of the QSTASH_TOKEN environment
|
|
1578
|
+
* variable will be used if it exists.
|
|
1572
1579
|
*/
|
|
1573
|
-
token
|
|
1580
|
+
token?: string;
|
|
1574
1581
|
/**
|
|
1575
1582
|
* Configure how the client should retry requests.
|
|
1576
1583
|
*/
|
|
@@ -1792,7 +1799,7 @@ type QueueRequest = {
|
|
|
1792
1799
|
declare class Client {
|
|
1793
1800
|
http: Requester;
|
|
1794
1801
|
private token;
|
|
1795
|
-
constructor(config
|
|
1802
|
+
constructor(config?: ClientConfig);
|
|
1796
1803
|
/**
|
|
1797
1804
|
* Access the urlGroup API.
|
|
1798
1805
|
*
|
|
@@ -1564,13 +1564,20 @@ type ClientConfig = {
|
|
|
1564
1564
|
*
|
|
1565
1565
|
* This is only used for testing.
|
|
1566
1566
|
*
|
|
1567
|
+
* If not provided, value of the QSTASH_URL environment
|
|
1568
|
+
* variable will be used if it exists. If the QSTASH_URL
|
|
1569
|
+
* environment variable isn't set either, default is used.
|
|
1570
|
+
*
|
|
1567
1571
|
* @default "https://qstash.upstash.io"
|
|
1568
1572
|
*/
|
|
1569
1573
|
baseUrl?: string;
|
|
1570
1574
|
/**
|
|
1571
1575
|
* The authorization token from the upstash console.
|
|
1576
|
+
*
|
|
1577
|
+
* If not provided, value of the QSTASH_TOKEN environment
|
|
1578
|
+
* variable will be used if it exists.
|
|
1572
1579
|
*/
|
|
1573
|
-
token
|
|
1580
|
+
token?: string;
|
|
1574
1581
|
/**
|
|
1575
1582
|
* Configure how the client should retry requests.
|
|
1576
1583
|
*/
|
|
@@ -1792,7 +1799,7 @@ type QueueRequest = {
|
|
|
1792
1799
|
declare class Client {
|
|
1793
1800
|
http: Requester;
|
|
1794
1801
|
private token;
|
|
1795
|
-
constructor(config
|
|
1802
|
+
constructor(config?: ClientConfig);
|
|
1796
1803
|
/**
|
|
1797
1804
|
* Access the urlGroup API.
|
|
1798
1805
|
*
|
package/cloudflare.d.mts
CHANGED
package/cloudflare.d.ts
CHANGED
package/cloudflare.js
CHANGED
|
@@ -623,6 +623,9 @@ var LLMProvider = class extends BaseProvider {
|
|
|
623
623
|
if (this.owner === "openai" && this.organization) {
|
|
624
624
|
headers["OpenAI-Organization"] = this.organization;
|
|
625
625
|
}
|
|
626
|
+
if (this.owner === "anthropic") {
|
|
627
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
628
|
+
}
|
|
626
629
|
return headers;
|
|
627
630
|
}
|
|
628
631
|
/**
|
|
@@ -1130,14 +1133,22 @@ var Client = class {
|
|
|
1130
1133
|
http;
|
|
1131
1134
|
token;
|
|
1132
1135
|
constructor(config) {
|
|
1136
|
+
const environment = typeof process === "undefined" ? {} : process.env;
|
|
1137
|
+
const baseUrl = config?.baseUrl ? config.baseUrl.replace(/\/$/, "") : environment.QSTASH_URL ?? "https://qstash.upstash.io";
|
|
1138
|
+
const token = config?.token ?? environment.QSTASH_TOKEN;
|
|
1133
1139
|
this.http = new HttpClient({
|
|
1134
|
-
retry: config
|
|
1135
|
-
baseUrl
|
|
1136
|
-
authorization: `Bearer ${
|
|
1140
|
+
retry: config?.retry,
|
|
1141
|
+
baseUrl,
|
|
1142
|
+
authorization: `Bearer ${token}`,
|
|
1137
1143
|
//@ts-expect-error caused by undici and bunjs type overlap
|
|
1138
|
-
headers: prefixHeaders(new Headers(config
|
|
1144
|
+
headers: prefixHeaders(new Headers(config?.headers ?? {}))
|
|
1139
1145
|
});
|
|
1140
|
-
|
|
1146
|
+
if (!token) {
|
|
1147
|
+
console.warn(
|
|
1148
|
+
"[Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable."
|
|
1149
|
+
);
|
|
1150
|
+
}
|
|
1151
|
+
this.token = token;
|
|
1141
1152
|
}
|
|
1142
1153
|
/**
|
|
1143
1154
|
* Access the urlGroup API.
|
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 { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-
|
|
3
|
+
import { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-DuOcoFUv.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 { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-
|
|
3
|
+
import { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-DuOcoFUv.js';
|
|
4
4
|
import 'neverthrow';
|
|
5
5
|
|
|
6
6
|
type VerifySignatureConfig = {
|
package/h3.js
CHANGED
|
@@ -947,6 +947,9 @@ var LLMProvider = class extends BaseProvider {
|
|
|
947
947
|
if (this.owner === "openai" && this.organization) {
|
|
948
948
|
headers["OpenAI-Organization"] = this.organization;
|
|
949
949
|
}
|
|
950
|
+
if (this.owner === "anthropic") {
|
|
951
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
952
|
+
}
|
|
950
953
|
return headers;
|
|
951
954
|
}
|
|
952
955
|
/**
|
|
@@ -2840,14 +2843,22 @@ var Client = class {
|
|
|
2840
2843
|
http;
|
|
2841
2844
|
token;
|
|
2842
2845
|
constructor(config) {
|
|
2846
|
+
const environment = typeof process === "undefined" ? {} : process.env;
|
|
2847
|
+
const baseUrl = config?.baseUrl ? config.baseUrl.replace(/\/$/, "") : environment.QSTASH_URL ?? "https://qstash.upstash.io";
|
|
2848
|
+
const token = config?.token ?? environment.QSTASH_TOKEN;
|
|
2843
2849
|
this.http = new HttpClient({
|
|
2844
|
-
retry: config
|
|
2845
|
-
baseUrl
|
|
2846
|
-
authorization: `Bearer ${
|
|
2850
|
+
retry: config?.retry,
|
|
2851
|
+
baseUrl,
|
|
2852
|
+
authorization: `Bearer ${token}`,
|
|
2847
2853
|
//@ts-expect-error caused by undici and bunjs type overlap
|
|
2848
|
-
headers: prefixHeaders(new Headers(config
|
|
2854
|
+
headers: prefixHeaders(new Headers(config?.headers ?? {}))
|
|
2849
2855
|
});
|
|
2850
|
-
|
|
2856
|
+
if (!token) {
|
|
2857
|
+
console.warn(
|
|
2858
|
+
"[Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable."
|
|
2859
|
+
);
|
|
2860
|
+
}
|
|
2861
|
+
this.token = token;
|
|
2851
2862
|
}
|
|
2852
2863
|
/**
|
|
2853
2864
|
* Access the urlGroup API.
|
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-FGKPOZOO.mjs";
|
|
5
|
+
import "./chunk-3D34OUXY.mjs";
|
|
6
|
+
import "./chunk-QHCEWG63.mjs";
|
|
7
7
|
export {
|
|
8
8
|
serve,
|
|
9
9
|
verifySignatureH3
|
package/hono.d.mts
CHANGED
package/hono.d.ts
CHANGED
package/hono.js
CHANGED
|
@@ -623,6 +623,9 @@ var LLMProvider = class extends BaseProvider {
|
|
|
623
623
|
if (this.owner === "openai" && this.organization) {
|
|
624
624
|
headers["OpenAI-Organization"] = this.organization;
|
|
625
625
|
}
|
|
626
|
+
if (this.owner === "anthropic") {
|
|
627
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
628
|
+
}
|
|
626
629
|
return headers;
|
|
627
630
|
}
|
|
628
631
|
/**
|
|
@@ -1130,14 +1133,22 @@ var Client = class {
|
|
|
1130
1133
|
http;
|
|
1131
1134
|
token;
|
|
1132
1135
|
constructor(config) {
|
|
1136
|
+
const environment = typeof process === "undefined" ? {} : process.env;
|
|
1137
|
+
const baseUrl = config?.baseUrl ? config.baseUrl.replace(/\/$/, "") : environment.QSTASH_URL ?? "https://qstash.upstash.io";
|
|
1138
|
+
const token = config?.token ?? environment.QSTASH_TOKEN;
|
|
1133
1139
|
this.http = new HttpClient({
|
|
1134
|
-
retry: config
|
|
1135
|
-
baseUrl
|
|
1136
|
-
authorization: `Bearer ${
|
|
1140
|
+
retry: config?.retry,
|
|
1141
|
+
baseUrl,
|
|
1142
|
+
authorization: `Bearer ${token}`,
|
|
1137
1143
|
//@ts-expect-error caused by undici and bunjs type overlap
|
|
1138
|
-
headers: prefixHeaders(new Headers(config
|
|
1144
|
+
headers: prefixHeaders(new Headers(config?.headers ?? {}))
|
|
1139
1145
|
});
|
|
1140
|
-
|
|
1146
|
+
if (!token) {
|
|
1147
|
+
console.warn(
|
|
1148
|
+
"[Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable."
|
|
1149
|
+
);
|
|
1150
|
+
}
|
|
1151
|
+
this.token = token;
|
|
1141
1152
|
}
|
|
1142
1153
|
/**
|
|
1143
1154
|
* Access the urlGroup API.
|
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, I as Chat, K as ChatCompletion, N as ChatCompletionChunk, J as ChatCompletionMessage, _ as ChatRequest, h as Client, p as CreateScheduleRequest, r as Endpoint, v as Event, w as EventPayload, g as EventsRequest, x as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, z as HeadersInit, M as Message, m as MessagePayload, n as Messages, Y as OpenAIChatModel, Z as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, l as PublishResponse, i as PublishToApiResponse, k as PublishToUrlGroupsResponse, j as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, s as RemoveEndpointsRequest, D as RequestOptions, o as Schedule, q as Schedules, b as SignatureError, u as State, T as StreamDisabled, O as StreamEnabled, X as StreamParameter, U as UrlGroup, t as UrlGroups, V as VerifyRequest, W as WithCursor, a1 as anthropic, a2 as custom, a0 as openai, $ 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-DuOcoFUv.mjs';
|
|
2
|
+
export { A as AddEndpointsRequest, y as BodyInit, I as Chat, K as ChatCompletion, N as ChatCompletionChunk, J as ChatCompletionMessage, _ as ChatRequest, h as Client, p as CreateScheduleRequest, r as Endpoint, v as Event, w as EventPayload, g as EventsRequest, x as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, z as HeadersInit, M as Message, m as MessagePayload, n as Messages, Y as OpenAIChatModel, Z as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, l as PublishResponse, i as PublishToApiResponse, k as PublishToUrlGroupsResponse, j as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, s as RemoveEndpointsRequest, D as RequestOptions, o as Schedule, q as Schedules, b as SignatureError, u as State, T as StreamDisabled, O as StreamEnabled, X as StreamParameter, U as UrlGroup, t as UrlGroups, V as VerifyRequest, W as WithCursor, a1 as anthropic, a2 as custom, a0 as openai, $ as upstash } from './client-DuOcoFUv.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, I as Chat, K as ChatCompletion, N as ChatCompletionChunk, J as ChatCompletionMessage, _ as ChatRequest, h as Client, p as CreateScheduleRequest, r as Endpoint, v as Event, w as EventPayload, g as EventsRequest, x as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, z as HeadersInit, M as Message, m as MessagePayload, n as Messages, Y as OpenAIChatModel, Z as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, l as PublishResponse, i as PublishToApiResponse, k as PublishToUrlGroupsResponse, j as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, s as RemoveEndpointsRequest, D as RequestOptions, o as Schedule, q as Schedules, b as SignatureError, u as State, T as StreamDisabled, O as StreamEnabled, X as StreamParameter, U as UrlGroup, t as UrlGroups, V as VerifyRequest, W as WithCursor, a1 as anthropic, a2 as custom, a0 as openai, $ 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-DuOcoFUv.js';
|
|
2
|
+
export { A as AddEndpointsRequest, y as BodyInit, I as Chat, K as ChatCompletion, N as ChatCompletionChunk, J as ChatCompletionMessage, _ as ChatRequest, h as Client, p as CreateScheduleRequest, r as Endpoint, v as Event, w as EventPayload, g as EventsRequest, x as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, z as HeadersInit, M as Message, m as MessagePayload, n as Messages, Y as OpenAIChatModel, Z as PromptChatRequest, d as PublishBatchRequest, f as PublishJsonRequest, e as PublishRequest, l as PublishResponse, i as PublishToApiResponse, k as PublishToUrlGroupsResponse, j as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, s as RemoveEndpointsRequest, D as RequestOptions, o as Schedule, q as Schedules, b as SignatureError, u as State, T as StreamDisabled, O as StreamEnabled, X as StreamParameter, U as UrlGroup, t as UrlGroups, V as VerifyRequest, W as WithCursor, a1 as anthropic, a2 as custom, a0 as openai, $ as upstash } from './client-DuOcoFUv.js';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
|
|
5
5
|
/**
|
package/index.js
CHANGED
|
@@ -643,6 +643,9 @@ var LLMProvider = class extends BaseProvider {
|
|
|
643
643
|
if (this.owner === "openai" && this.organization) {
|
|
644
644
|
headers["OpenAI-Organization"] = this.organization;
|
|
645
645
|
}
|
|
646
|
+
if (this.owner === "anthropic") {
|
|
647
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
648
|
+
}
|
|
646
649
|
return headers;
|
|
647
650
|
}
|
|
648
651
|
/**
|
|
@@ -1192,14 +1195,22 @@ var Client = class {
|
|
|
1192
1195
|
http;
|
|
1193
1196
|
token;
|
|
1194
1197
|
constructor(config) {
|
|
1198
|
+
const environment = typeof process === "undefined" ? {} : process.env;
|
|
1199
|
+
const baseUrl = config?.baseUrl ? config.baseUrl.replace(/\/$/, "") : environment.QSTASH_URL ?? "https://qstash.upstash.io";
|
|
1200
|
+
const token = config?.token ?? environment.QSTASH_TOKEN;
|
|
1195
1201
|
this.http = new HttpClient({
|
|
1196
|
-
retry: config
|
|
1197
|
-
baseUrl
|
|
1198
|
-
authorization: `Bearer ${
|
|
1202
|
+
retry: config?.retry,
|
|
1203
|
+
baseUrl,
|
|
1204
|
+
authorization: `Bearer ${token}`,
|
|
1199
1205
|
//@ts-expect-error caused by undici and bunjs type overlap
|
|
1200
|
-
headers: prefixHeaders(new Headers(config
|
|
1206
|
+
headers: prefixHeaders(new Headers(config?.headers ?? {}))
|
|
1201
1207
|
});
|
|
1202
|
-
|
|
1208
|
+
if (!token) {
|
|
1209
|
+
console.warn(
|
|
1210
|
+
"[Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable."
|
|
1211
|
+
);
|
|
1212
|
+
}
|
|
1213
|
+
this.token = token;
|
|
1203
1214
|
}
|
|
1204
1215
|
/**
|
|
1205
1216
|
* Access the urlGroup API.
|
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resend
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3D34OUXY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Chat,
|
|
6
6
|
Client,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
openai,
|
|
23
23
|
setupAnalytics,
|
|
24
24
|
upstash
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-QHCEWG63.mjs";
|
|
26
26
|
export {
|
|
27
27
|
Chat,
|
|
28
28
|
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 { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-
|
|
3
|
+
import { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-DuOcoFUv.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 { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-
|
|
3
|
+
import { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-DuOcoFUv.js';
|
|
4
4
|
import 'neverthrow';
|
|
5
5
|
|
|
6
6
|
type VerifySignatureConfig = {
|
package/nextjs.js
CHANGED
|
@@ -627,6 +627,9 @@ var LLMProvider = class extends BaseProvider {
|
|
|
627
627
|
if (this.owner === "openai" && this.organization) {
|
|
628
628
|
headers["OpenAI-Organization"] = this.organization;
|
|
629
629
|
}
|
|
630
|
+
if (this.owner === "anthropic") {
|
|
631
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
632
|
+
}
|
|
630
633
|
return headers;
|
|
631
634
|
}
|
|
632
635
|
/**
|
|
@@ -1134,14 +1137,22 @@ var Client = class {
|
|
|
1134
1137
|
http;
|
|
1135
1138
|
token;
|
|
1136
1139
|
constructor(config) {
|
|
1140
|
+
const environment = typeof process === "undefined" ? {} : process.env;
|
|
1141
|
+
const baseUrl = config?.baseUrl ? config.baseUrl.replace(/\/$/, "") : environment.QSTASH_URL ?? "https://qstash.upstash.io";
|
|
1142
|
+
const token = config?.token ?? environment.QSTASH_TOKEN;
|
|
1137
1143
|
this.http = new HttpClient({
|
|
1138
|
-
retry: config
|
|
1139
|
-
baseUrl
|
|
1140
|
-
authorization: `Bearer ${
|
|
1144
|
+
retry: config?.retry,
|
|
1145
|
+
baseUrl,
|
|
1146
|
+
authorization: `Bearer ${token}`,
|
|
1141
1147
|
//@ts-expect-error caused by undici and bunjs type overlap
|
|
1142
|
-
headers: prefixHeaders(new Headers(config
|
|
1148
|
+
headers: prefixHeaders(new Headers(config?.headers ?? {}))
|
|
1143
1149
|
});
|
|
1144
|
-
|
|
1150
|
+
if (!token) {
|
|
1151
|
+
console.warn(
|
|
1152
|
+
"[Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable."
|
|
1153
|
+
);
|
|
1154
|
+
}
|
|
1155
|
+
this.token = token;
|
|
1145
1156
|
}
|
|
1146
1157
|
/**
|
|
1147
1158
|
* Access the urlGroup API.
|
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-FGKPOZOO.mjs";
|
|
4
|
+
import "./chunk-3D34OUXY.mjs";
|
|
5
|
+
import "./chunk-QHCEWG63.mjs";
|
|
6
6
|
|
|
7
7
|
// platforms/nuxt.ts
|
|
8
8
|
var verifySignatureNuxt = verifySignatureH3;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"v2.7.
|
|
1
|
+
{"version":"v2.7.21","name":"@upstash/qstash","description":"Official Typescript client for QStash","author":"Andreas Thomas <dev@chronark.com>","license":"MIT","homepage":"https://github.com/upstash/sdk-qstash-ts#readme","repository":{"type":"git","url":"git+https://github.com/upstash/sdk-qstash-ts.git"},"bugs":{"url":"https://github.com/upstash/sdk-qstash-ts/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","ai":"^3.1.28","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 { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-
|
|
2
|
+
import { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-DuOcoFUv.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 { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-
|
|
2
|
+
import { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-DuOcoFUv.js';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
|
|
5
5
|
type VerifySignatureConfig = {
|
package/solidjs.js
CHANGED
|
@@ -624,6 +624,9 @@ var LLMProvider = class extends BaseProvider {
|
|
|
624
624
|
if (this.owner === "openai" && this.organization) {
|
|
625
625
|
headers["OpenAI-Organization"] = this.organization;
|
|
626
626
|
}
|
|
627
|
+
if (this.owner === "anthropic") {
|
|
628
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
629
|
+
}
|
|
627
630
|
return headers;
|
|
628
631
|
}
|
|
629
632
|
/**
|
|
@@ -2517,14 +2520,22 @@ var Client = class {
|
|
|
2517
2520
|
http;
|
|
2518
2521
|
token;
|
|
2519
2522
|
constructor(config) {
|
|
2523
|
+
const environment = typeof process === "undefined" ? {} : process.env;
|
|
2524
|
+
const baseUrl = config?.baseUrl ? config.baseUrl.replace(/\/$/, "") : environment.QSTASH_URL ?? "https://qstash.upstash.io";
|
|
2525
|
+
const token = config?.token ?? environment.QSTASH_TOKEN;
|
|
2520
2526
|
this.http = new HttpClient({
|
|
2521
|
-
retry: config
|
|
2522
|
-
baseUrl
|
|
2523
|
-
authorization: `Bearer ${
|
|
2527
|
+
retry: config?.retry,
|
|
2528
|
+
baseUrl,
|
|
2529
|
+
authorization: `Bearer ${token}`,
|
|
2524
2530
|
//@ts-expect-error caused by undici and bunjs type overlap
|
|
2525
|
-
headers: prefixHeaders(new Headers(config
|
|
2531
|
+
headers: prefixHeaders(new Headers(config?.headers ?? {}))
|
|
2526
2532
|
});
|
|
2527
|
-
|
|
2533
|
+
if (!token) {
|
|
2534
|
+
console.warn(
|
|
2535
|
+
"[Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable."
|
|
2536
|
+
);
|
|
2537
|
+
}
|
|
2538
|
+
this.token = token;
|
|
2528
2539
|
}
|
|
2529
2540
|
/**
|
|
2530
2541
|
* Access the urlGroup API.
|
package/solidjs.mjs
CHANGED
package/svelte.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestHandler } from '@sveltejs/kit';
|
|
2
|
-
import { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-
|
|
2
|
+
import { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-DuOcoFUv.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 { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-
|
|
2
|
+
import { a3 as RouteFunction, a4 as WorkflowServeOptions } from './client-DuOcoFUv.js';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
|
|
5
5
|
type VerifySignatureConfig = {
|
package/svelte.js
CHANGED
|
@@ -624,6 +624,9 @@ var LLMProvider = class extends BaseProvider {
|
|
|
624
624
|
if (this.owner === "openai" && this.organization) {
|
|
625
625
|
headers["OpenAI-Organization"] = this.organization;
|
|
626
626
|
}
|
|
627
|
+
if (this.owner === "anthropic") {
|
|
628
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
629
|
+
}
|
|
627
630
|
return headers;
|
|
628
631
|
}
|
|
629
632
|
/**
|
|
@@ -2517,14 +2520,22 @@ var Client = class {
|
|
|
2517
2520
|
http;
|
|
2518
2521
|
token;
|
|
2519
2522
|
constructor(config) {
|
|
2523
|
+
const environment = typeof process === "undefined" ? {} : process.env;
|
|
2524
|
+
const baseUrl = config?.baseUrl ? config.baseUrl.replace(/\/$/, "") : environment.QSTASH_URL ?? "https://qstash.upstash.io";
|
|
2525
|
+
const token = config?.token ?? environment.QSTASH_TOKEN;
|
|
2520
2526
|
this.http = new HttpClient({
|
|
2521
|
-
retry: config
|
|
2522
|
-
baseUrl
|
|
2523
|
-
authorization: `Bearer ${
|
|
2527
|
+
retry: config?.retry,
|
|
2528
|
+
baseUrl,
|
|
2529
|
+
authorization: `Bearer ${token}`,
|
|
2524
2530
|
//@ts-expect-error caused by undici and bunjs type overlap
|
|
2525
|
-
headers: prefixHeaders(new Headers(config
|
|
2531
|
+
headers: prefixHeaders(new Headers(config?.headers ?? {}))
|
|
2526
2532
|
});
|
|
2527
|
-
|
|
2533
|
+
if (!token) {
|
|
2534
|
+
console.warn(
|
|
2535
|
+
"[Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable."
|
|
2536
|
+
);
|
|
2537
|
+
}
|
|
2538
|
+
this.token = token;
|
|
2528
2539
|
}
|
|
2529
2540
|
/**
|
|
2530
2541
|
* Access the urlGroup API.
|
package/svelte.mjs
CHANGED
package/workflow.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ag as AsyncStepFunction, a9 as DisabledWorkflowContext, F as FailureFunctionPayload, aj as FinishCondition, al as LogLevel, ai as ParallelCallState, ae as RawStep, ak as RequiredExceptFields, a3 as RouteFunction, S as Step, ah as StepFunction, ad as StepType, ac as StepTypes, af as SyncStepFunction, a5 as Workflow, aa as WorkflowClient, a8 as WorkflowContext, an as WorkflowLogger, am as WorkflowLoggerOptions, ab as WorkflowReceiver, a4 as WorkflowServeOptions, a6 as processOptions, a7 as serve } from './client-
|
|
1
|
+
export { ag as AsyncStepFunction, a9 as DisabledWorkflowContext, F as FailureFunctionPayload, aj as FinishCondition, al as LogLevel, ai as ParallelCallState, ae as RawStep, ak as RequiredExceptFields, a3 as RouteFunction, S as Step, ah as StepFunction, ad as StepType, ac as StepTypes, af as SyncStepFunction, a5 as Workflow, aa as WorkflowClient, a8 as WorkflowContext, an as WorkflowLogger, am as WorkflowLoggerOptions, ab as WorkflowReceiver, a4 as WorkflowServeOptions, a6 as processOptions, a7 as serve } from './client-DuOcoFUv.mjs';
|
|
2
2
|
import 'neverthrow';
|
package/workflow.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ag as AsyncStepFunction, a9 as DisabledWorkflowContext, F as FailureFunctionPayload, aj as FinishCondition, al as LogLevel, ai as ParallelCallState, ae as RawStep, ak as RequiredExceptFields, a3 as RouteFunction, S as Step, ah as StepFunction, ad as StepType, ac as StepTypes, af as SyncStepFunction, a5 as Workflow, aa as WorkflowClient, a8 as WorkflowContext, an as WorkflowLogger, am as WorkflowLoggerOptions, ab as WorkflowReceiver, a4 as WorkflowServeOptions, a6 as processOptions, a7 as serve } from './client-
|
|
1
|
+
export { ag as AsyncStepFunction, a9 as DisabledWorkflowContext, F as FailureFunctionPayload, aj as FinishCondition, al as LogLevel, ai as ParallelCallState, ae as RawStep, ak as RequiredExceptFields, a3 as RouteFunction, S as Step, ah as StepFunction, ad as StepType, ac as StepTypes, af as SyncStepFunction, a5 as Workflow, aa as WorkflowClient, a8 as WorkflowContext, an as WorkflowLogger, am as WorkflowLoggerOptions, ab as WorkflowReceiver, a4 as WorkflowServeOptions, a6 as processOptions, a7 as serve } from './client-DuOcoFUv.js';
|
|
2
2
|
import 'neverthrow';
|
package/workflow.js
CHANGED
|
@@ -629,6 +629,9 @@ var LLMProvider = class extends BaseProvider {
|
|
|
629
629
|
if (this.owner === "openai" && this.organization) {
|
|
630
630
|
headers["OpenAI-Organization"] = this.organization;
|
|
631
631
|
}
|
|
632
|
+
if (this.owner === "anthropic") {
|
|
633
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
634
|
+
}
|
|
632
635
|
return headers;
|
|
633
636
|
}
|
|
634
637
|
/**
|
|
@@ -1136,14 +1139,22 @@ var Client = class {
|
|
|
1136
1139
|
http;
|
|
1137
1140
|
token;
|
|
1138
1141
|
constructor(config) {
|
|
1142
|
+
const environment = typeof process === "undefined" ? {} : process.env;
|
|
1143
|
+
const baseUrl = config?.baseUrl ? config.baseUrl.replace(/\/$/, "") : environment.QSTASH_URL ?? "https://qstash.upstash.io";
|
|
1144
|
+
const token = config?.token ?? environment.QSTASH_TOKEN;
|
|
1139
1145
|
this.http = new HttpClient({
|
|
1140
|
-
retry: config
|
|
1141
|
-
baseUrl
|
|
1142
|
-
authorization: `Bearer ${
|
|
1146
|
+
retry: config?.retry,
|
|
1147
|
+
baseUrl,
|
|
1148
|
+
authorization: `Bearer ${token}`,
|
|
1143
1149
|
//@ts-expect-error caused by undici and bunjs type overlap
|
|
1144
|
-
headers: prefixHeaders(new Headers(config
|
|
1150
|
+
headers: prefixHeaders(new Headers(config?.headers ?? {}))
|
|
1145
1151
|
});
|
|
1146
|
-
|
|
1152
|
+
if (!token) {
|
|
1153
|
+
console.warn(
|
|
1154
|
+
"[Upstash QStash] client token is not set. Either pass a token or set QSTASH_TOKEN env variable."
|
|
1155
|
+
);
|
|
1156
|
+
}
|
|
1157
|
+
this.token = token;
|
|
1147
1158
|
}
|
|
1148
1159
|
/**
|
|
1149
1160
|
* Access the urlGroup API.
|