@cloudpss/message-stream 0.5.33 → 0.5.34
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/dist/index.d.ts +6 -2
- package/package.json +2 -2
- package/tsconfig.json +1 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import type { Tagged, Simplify } from 'type-fest';
|
|
2
2
|
/** UUID */
|
|
3
3
|
type UUID = `${string}-${string}-${string}-${string}-${string}`;
|
|
4
|
+
/** 空 UUID */
|
|
5
|
+
type NIL_UUID = typeof NIL_UUID;
|
|
6
|
+
/** 空 UUID */
|
|
7
|
+
declare const NIL_UUID: "00000000-0000-0000-0000-000000000000";
|
|
4
8
|
/**
|
|
5
9
|
* 标识流的读权限
|
|
6
10
|
*/
|
|
7
11
|
export type StreamId = Tagged<UUID, 'StreamId'>;
|
|
8
12
|
/** 表示一个空白的流 ID,读取此 ID 对应的流会得到不包含消息的且已冻结的空白流 */
|
|
9
|
-
export declare const EMPTY_STREAM_ID: Tagged<
|
|
13
|
+
export declare const EMPTY_STREAM_ID: Tagged<NIL_UUID, "StreamId">;
|
|
10
14
|
/**
|
|
11
15
|
* 标识流的写权限
|
|
12
16
|
*/
|
|
13
17
|
export type StreamToken = Tagged<UUID, 'StreamToken'>;
|
|
14
18
|
/** 表示一个空白的流 Token,写入此 Token 的消息会被直接丢弃,不会产生错误 */
|
|
15
|
-
export declare const EMPTY_STREAM_TOKEN: Tagged<
|
|
19
|
+
export declare const EMPTY_STREAM_TOKEN: Tagged<NIL_UUID, "StreamToken">;
|
|
16
20
|
export declare const StreamType: readonly ["object", "binary"];
|
|
17
21
|
/**
|
|
18
22
|
* 流中消息的类型
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudpss/message-stream",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.34",
|
|
4
4
|
"author": "CloudPSS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"type-fest": "^4.
|
|
15
|
+
"type-fest": "^4.20.1"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "pnpm clean && tsc --watch",
|