@upstash/qstash 0.1.0 → 0.1.3

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 CHANGED
@@ -1,20 +1,20 @@
1
1
  # Upstash qStash SDK
2
2
 
3
- [![Tests](https://github.com/upstash/upstash-redis/actions/workflows/tests.yaml/badge.svg)](https://github.com/upstash/upstash-redis/actions/workflows/tests.yaml)
3
+ [![Tests](https://github.com/upstash/sdk-qstash-ts/actions/workflows/tests.yaml/badge.svg)](https://github.com/upstash/sdk-qstash-ts/actions/workflows/tests.yaml)
4
4
  ![npm (scoped)](https://img.shields.io/npm/v/@upstash/redis)
5
5
  ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@upstash/redis)
6
6
 
7
- **qStash** is a serverless queueing / messaging system, designed to be used with
8
- serverless functions to consume from the queue.
7
+ **qStash** is an HTTP based messaging and scheduling solution for serverless and
8
+ edge runtimes.
9
9
 
10
- It is the only connectionless (HTTP based) Redis client and designed for:
10
+ It is 100% built on stateless HTTP requests and designed for:
11
11
 
12
12
  - Serverless functions (AWS Lambda ...)
13
13
  - Cloudflare Workers (see
14
- [the example](https://github.com/upstash/upstash-redis/tree/main/examples/cloudflare-workers))
15
- - Fastly Compute@Edge (see
16
- [the example](https://github.com/upstash/upstash-redis/tree/main/examples/fastly))
17
- - Next.js, Jamstack ...
14
+ [the example](https://github.com/upstash/sdk-qstash-ts/tree/main/examples/cloudflare-workers))
15
+ - Fastly Compute@Edge
16
+ - Next.js, including [edge](https://nextjs.org/docs/api-reference/edge-runtime)
17
+ - Deno
18
18
  - Client side web/mobile applications
19
19
  - WebAssembly
20
20
  - and other environments where HTTP is preferred over TCP.
@@ -51,7 +51,7 @@ npm install @upstash/qstash
51
51
  #### Deno
52
52
 
53
53
  ```ts
54
- import { Redis } from "https://deno.land/x/upstash_qstash/mod.ts";
54
+ import { Client } from "https://deno.land/x/upstash_qstash/mod.ts";
55
55
  ```
56
56
 
57
57
  ### Get your authorization token
@@ -86,9 +86,8 @@ console.log(res);
86
86
 
87
87
  ### Receiving a message
88
88
 
89
- How to consume a message depends on your http server. QStash does not receive
90
- the http request directly, but should be called by you as the first step in your
91
- handler function.
89
+ How to receive a message depends on your http server. The `Receiver.verify`
90
+ method should be called by you as the first step in your handler function.
92
91
 
93
92
  ```ts
94
93
  import { Receiver } from "@upstash/qstash";
@@ -108,11 +107,6 @@ const isValid = await r.verify({
108
107
  * The raw request body.
109
108
  */
110
109
  body: "string";
111
-
112
- /**
113
- * URL of the endpoint where the request was sent to.
114
- */
115
- url: "string";
116
110
  })
117
111
  ```
118
112
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/entrypoints/nodejs.js",
4
4
  "types": "./types/entrypoints/nodejs.d.ts",
5
5
  "name": "@upstash/qstash",
6
- "version": "v0.1.0",
6
+ "version": "v0.1.3",
7
7
  "description": "Official Deno/Typescript client for qStash",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1,5 +1,5 @@
1
1
  import * as r from "../pkg/receiver.js";
2
2
  export * from "../pkg/client/client.js";
3
3
  export declare class Receiver extends r.Receiver {
4
- constructor(config: Omit<r.ReceiverConfig, "crypto">);
4
+ constructor(config: Omit<r.ReceiverConfig, "subtleCrypto">);
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import * as r from "../pkg/receiver.js";
2
2
  export * from "../pkg/client/client.js";
3
3
  export declare class Receiver extends r.Receiver {
4
- constructor(config: Omit<r.ReceiverConfig, "crypto">);
4
+ constructor(config: Omit<r.ReceiverConfig, "subtleCrypto">);
5
5
  }