@upstash/qstash 2.8.0-canary → 2.8.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.
Files changed (51) hide show
  1. package/README.md +19 -0
  2. package/{dist/chunk-XLCNEVA2.mjs → chunk-PWDZVKVD.mjs} +1 -1
  3. package/chunk-UJ7YXITX.mjs +35 -0
  4. package/{dist/chunk-KWSSCN6R.mjs → chunk-X3J2ACLT.mjs} +420 -556
  5. package/{dist/client-DkrYCqaq.d.ts → client-BQXugsxm.d.mts} +280 -54
  6. package/{dist/client-DkrYCqaq.d.mts → client-BQXugsxm.d.ts} +280 -54
  7. package/{dist/cloudflare.d.mts → cloudflare.d.mts} +6 -2
  8. package/{dist/cloudflare.d.ts → cloudflare.d.ts} +6 -2
  9. package/{dist/cloudflare.js → cloudflare.js} +408 -511
  10. package/{dist/cloudflare.mjs → cloudflare.mjs} +1 -1
  11. package/{dist/h3.d.mts → h3.d.mts} +6 -1
  12. package/{dist/h3.d.ts → h3.d.ts} +6 -1
  13. package/{dist/h3.js → h3.js} +424 -527
  14. package/h3.mjs +10 -0
  15. package/{dist/hono.d.mts → hono.d.mts} +6 -2
  16. package/{dist/hono.d.ts → hono.d.ts} +6 -2
  17. package/{dist/hono.js → hono.js} +408 -511
  18. package/{dist/hono.mjs → hono.mjs} +1 -1
  19. package/index.d.mts +92 -0
  20. package/index.d.ts +92 -0
  21. package/{dist/index.js → index.js} +437 -513
  22. package/{dist/index.mjs → index.mjs} +7 -2
  23. package/{dist/nextjs.d.mts → nextjs.d.mts} +16 -7
  24. package/{dist/nextjs.d.ts → nextjs.d.ts} +16 -7
  25. package/nextjs.js +3013 -0
  26. package/nextjs.mjs +177 -0
  27. package/{dist/nuxt.d.mts → nuxt.d.mts} +3 -1
  28. package/{dist/nuxt.d.ts → nuxt.d.ts} +3 -1
  29. package/{dist/nuxt.js → nuxt.js} +35 -393
  30. package/{dist/nuxt.mjs → nuxt.mjs} +3 -3
  31. package/package.json +1 -1
  32. package/{dist/solidjs.d.mts → solidjs.d.mts} +6 -2
  33. package/{dist/solidjs.d.ts → solidjs.d.ts} +6 -2
  34. package/{dist/solidjs.js → solidjs.js} +408 -511
  35. package/{dist/solidjs.mjs → solidjs.mjs} +2 -2
  36. package/{dist/svelte.d.mts → svelte.d.mts} +6 -2
  37. package/{dist/svelte.d.ts → svelte.d.ts} +6 -2
  38. package/{dist/svelte.js → svelte.js} +408 -511
  39. package/{dist/svelte.mjs → svelte.mjs} +2 -2
  40. package/workflow.d.mts +2 -0
  41. package/workflow.d.ts +2 -0
  42. package/{dist/workflow.js → workflow.js} +408 -511
  43. package/{dist/workflow.mjs → workflow.mjs} +1 -1
  44. package/dist/chunk-CIVGPRQN.mjs +0 -0
  45. package/dist/h3.mjs +0 -10
  46. package/dist/index.d.mts +0 -67
  47. package/dist/index.d.ts +0 -67
  48. package/dist/nextjs.js +0 -4742
  49. package/dist/nextjs.mjs +0 -1802
  50. package/dist/workflow.d.mts +0 -2
  51. package/dist/workflow.d.ts +0 -2
package/README.md CHANGED
@@ -131,6 +131,25 @@ const result = await client.publishJSON({
131
131
 
132
132
  See [the documentation](https://docs.upstash.com/qstash) for details.
133
133
 
134
+ ## Telemetry
135
+
136
+ This sdk sends anonymous telemetry headers to help us improve your experience.
137
+ We collect the following:
138
+
139
+ - SDK version
140
+ - Platform (Cloudflare, AWS or Vercel)
141
+ - Runtime version (node@18.x)
142
+
143
+ You can opt out by setting the `UPSTASH_DISABLE_TELEMETRY` environment variable
144
+ to any truthy value. Or setting `enableTelemetry: false` in the client options.
145
+
146
+ ```ts
147
+ const client = new Client({
148
+ token: "<QSTASH_TOKEN>",
149
+ enableTelemetry: false,
150
+ });
151
+ ```
152
+
134
153
  ## Contributing
135
154
 
136
155
  ### Setup
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Receiver,
3
3
  serve
4
- } from "./chunk-KWSSCN6R.mjs";
4
+ } from "./chunk-X3J2ACLT.mjs";
5
5
 
6
6
  // node_modules/defu/dist/defu.mjs
7
7
  function isPlainObject(value) {
@@ -0,0 +1,35 @@
1
+ import {
2
+ BaseProvider
3
+ } from "./chunk-X3J2ACLT.mjs";
4
+
5
+ // src/client/api/email.ts
6
+ var EmailProvider = class extends BaseProvider {
7
+ apiKind = "email";
8
+ batch;
9
+ method = "POST";
10
+ constructor(baseUrl, token, owner, batch) {
11
+ super(baseUrl, token, owner);
12
+ this.batch = batch;
13
+ }
14
+ getRoute() {
15
+ return this.batch ? ["emails", "batch"] : ["emails"];
16
+ }
17
+ getHeaders(_options) {
18
+ return {
19
+ authorization: `Bearer ${this.token}`
20
+ };
21
+ }
22
+ onFinish(providerInfo, _options) {
23
+ return providerInfo;
24
+ }
25
+ };
26
+ var resend = ({
27
+ token,
28
+ batch = false
29
+ }) => {
30
+ return new EmailProvider("https://api.resend.com", token, "resend", batch);
31
+ };
32
+
33
+ export {
34
+ resend
35
+ };