@orpc/publisher 2.0.0-beta.23 → 2.0.0-beta.24
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
|
@@ -44,6 +44,7 @@ You can read the documentation [here](https://orpc.dev).
|
|
|
44
44
|
|
|
45
45
|
- [@orpc/publisher](https://www.npmjs.com/package/@orpc/publisher): Pub/Sub with memory, Redis, and Upstash adapters.
|
|
46
46
|
- [@orpc/ratelimit](https://www.npmjs.com/package/@orpc/ratelimit): Rate limiting with memory, Redis, and Upstash adapters.
|
|
47
|
+
- [@orpc/hibernation](https://www.npmjs.com/package/@orpc/hibernation): Leverage Hibernation APIs like [Cloudflare's Hibernation WebSocket](https://developers.cloudflare.com/durable-objects/best-practices/websockets/#durable-objects-hibernation-websocket-api).
|
|
47
48
|
- [@orpc/json-schema](https://www.npmjs.com/package/@orpc/json-schema): Smart coercion for OpenAPI requests.
|
|
48
49
|
|
|
49
50
|
**Framework & ecosystem integrations**
|
|
@@ -114,6 +115,7 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
|
|
|
114
115
|
</tr>
|
|
115
116
|
<tr>
|
|
116
117
|
<td align="center"><a href="https://github.com/itigoore01?ref=orpc" target="_blank" rel="noopener" title="shota"><img src="https://avatars.githubusercontent.com/u/11831107?u=c976a6dc7e055eb026304c46c99100ed22b0c8e0&v=4" width="139" alt="shota"/><br />shota</a></td>
|
|
118
|
+
<td align="center"><a href="https://github.com/ellis-driscoll?ref=orpc" target="_blank" rel="noopener" title="Ellis Driscoll"><img src="https://avatars.githubusercontent.com/u/70685966?u=c5f95bc33b5991d9744abe00052542e4a2ed3cb9&v=4" width="139" alt="Ellis Driscoll"/><br />Ellis Driscoll</a></td>
|
|
117
119
|
</tr>
|
|
118
120
|
</table>
|
|
119
121
|
|
|
@@ -139,8 +141,9 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
|
|
|
139
141
|
<td align="center"><a href="https://github.com/mr-kelly?ref=orpc" target="_blank" rel="noopener" title="Kelly Peilin Chan"><img src="https://avatars.githubusercontent.com/u/520852?u=6b0f7105f694e7b5cacf410a3f04c7044b469dc8&v=4" width="119" alt="Kelly Peilin Chan"/><br />Kelly Peilin Chan</a></td>
|
|
140
142
|
</tr>
|
|
141
143
|
<tr>
|
|
144
|
+
<td align="center"><a href="https://github.com/guyariely?ref=orpc" target="_blank" rel="noopener" title="Guy Ariely"><img src="https://avatars.githubusercontent.com/u/42813496?u=edb6b7f563bf28e160a290832e7da57c0506f8ca&v=4" width="119" alt="Guy Ariely"/><br />Guy Ariely</a></td>
|
|
142
145
|
<td align="center"><a href="https://github.com/piscis?ref=orpc" target="_blank" rel="noopener" title="Alex"><img src="https://avatars.githubusercontent.com/u/326163?u=b245f368bd940cf51d08c0b6bf55f8257f359437&v=4" width="119" alt="Alex"/><br />Alex</a></td>
|
|
143
|
-
<td align="center"><a href="https://github.com/finom?ref=orpc" target="_blank" rel="noopener" title="Andrey Gubanov"><img src="https://avatars.githubusercontent.com/u/1082083?u=
|
|
146
|
+
<td align="center"><a href="https://github.com/finom?ref=orpc" target="_blank" rel="noopener" title="Andrey Gubanov"><img src="https://avatars.githubusercontent.com/u/1082083?u=c5f2daf7ebece498e85c83367bb37b4e10e2649d&v=4" width="119" alt="Andrey Gubanov"/><br />Andrey Gubanov</a></td>
|
|
144
147
|
</tr>
|
|
145
148
|
</table>
|
|
146
149
|
|
|
@@ -31,6 +31,12 @@ interface MemoryPublisherOptions extends PublisherOptions {
|
|
|
31
31
|
seconds?: number;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Publisher adapter backed by in-memory storage, with optional resume support.
|
|
36
|
+
* Events are delivered to subscribers within the same process only.
|
|
37
|
+
*
|
|
38
|
+
* @see {@link https://orpc.dev/docs/helpers/publisher#adapters | Publisher Helpers - Adapters}
|
|
39
|
+
*/
|
|
34
40
|
declare class MemoryPublisher<T extends Record<string, object>> extends Publisher<T> {
|
|
35
41
|
private readonly listenersMap;
|
|
36
42
|
private readonly idGenerator;
|
|
@@ -31,6 +31,12 @@ interface MemoryPublisherOptions extends PublisherOptions {
|
|
|
31
31
|
seconds?: number;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Publisher adapter backed by in-memory storage, with optional resume support.
|
|
36
|
+
* Events are delivered to subscribers within the same process only.
|
|
37
|
+
*
|
|
38
|
+
* @see {@link https://orpc.dev/docs/helpers/publisher#adapters | Publisher Helpers - Adapters}
|
|
39
|
+
*/
|
|
34
40
|
declare class MemoryPublisher<T extends Record<string, object>> extends Publisher<T> {
|
|
35
41
|
private readonly listenersMap;
|
|
36
42
|
private readonly idGenerator;
|
|
@@ -53,6 +53,12 @@ interface RedisPublisherOptions extends PublisherOptions {
|
|
|
53
53
|
seconds?: number;
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Publisher adapter for Redis. Distributes events across processes via
|
|
58
|
+
* Redis Pub/Sub, with optional resume support backed by Redis Streams.
|
|
59
|
+
*
|
|
60
|
+
* @see {@link https://orpc.dev/docs/helpers/publisher#adapters | Publisher Helpers - Adapters}
|
|
61
|
+
*/
|
|
56
62
|
declare class RedisPublisher<T extends Record<string, object>> extends Publisher<T> {
|
|
57
63
|
private readonly redis;
|
|
58
64
|
private readonly subscriber;
|
package/dist/adapters/redis.d.ts
CHANGED
|
@@ -53,6 +53,12 @@ interface RedisPublisherOptions extends PublisherOptions {
|
|
|
53
53
|
seconds?: number;
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Publisher adapter for Redis. Distributes events across processes via
|
|
58
|
+
* Redis Pub/Sub, with optional resume support backed by Redis Streams.
|
|
59
|
+
*
|
|
60
|
+
* @see {@link https://orpc.dev/docs/helpers/publisher#adapters | Publisher Helpers - Adapters}
|
|
61
|
+
*/
|
|
56
62
|
declare class RedisPublisher<T extends Record<string, object>> extends Publisher<T> {
|
|
57
63
|
private readonly redis;
|
|
58
64
|
private readonly subscriber;
|
|
@@ -45,6 +45,12 @@ interface UpstashPublisherOptions extends PublisherOptions {
|
|
|
45
45
|
seconds?: number;
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Publisher adapter for Upstash Redis. Distributes events across processes via
|
|
50
|
+
* Upstash Pub/Sub, with optional resume support backed by Redis Streams.
|
|
51
|
+
*
|
|
52
|
+
* @see {@link https://orpc.dev/docs/helpers/publisher#adapters | Publisher Helpers - Adapters}
|
|
53
|
+
*/
|
|
48
54
|
declare class UpstashPublisher<T extends Record<string, object>> extends Publisher<T> {
|
|
49
55
|
private readonly redis;
|
|
50
56
|
private readonly prefix;
|
|
@@ -45,6 +45,12 @@ interface UpstashPublisherOptions extends PublisherOptions {
|
|
|
45
45
|
seconds?: number;
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Publisher adapter for Upstash Redis. Distributes events across processes via
|
|
50
|
+
* Upstash Pub/Sub, with optional resume support backed by Redis Streams.
|
|
51
|
+
*
|
|
52
|
+
* @see {@link https://orpc.dev/docs/helpers/publisher#adapters | Publisher Helpers - Adapters}
|
|
53
|
+
*/
|
|
48
54
|
declare class UpstashPublisher<T extends Record<string, object>> extends Publisher<T> {
|
|
49
55
|
private readonly redis;
|
|
50
56
|
private readonly prefix;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/publisher",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.24",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@standardserver/core": "^0.
|
|
56
|
-
"@orpc/client": "2.0.0-beta.
|
|
57
|
-
"@orpc/shared": "2.0.0-beta.
|
|
55
|
+
"@standardserver/core": "^0.7.1",
|
|
56
|
+
"@orpc/client": "2.0.0-beta.24",
|
|
57
|
+
"@orpc/shared": "2.0.0-beta.24"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@upstash/redis": "^1.38.0",
|