@cloudpss/message-stream 0.5.16 → 0.5.18

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 CHANGED
@@ -16,7 +16,7 @@ export declare const EMPTY_STREAM_TOKEN: Opaque<"00000000-0000-0000-0000-0000000
16
16
  export declare const StreamType: readonly ["object", "binary"];
17
17
  /**
18
18
  * 流中消息的类型
19
- * - 'object',在 StreamMessage 中使用 ubjson 存储
19
+ * - 'object',在 StreamMessage 中使用 ubjson 存储,每条消息可能包含多个 object
20
20
  * - 'binary',在 StreamMessage 中原样存储
21
21
  */
22
22
  export type StreamType = (typeof StreamType)[number];
@@ -69,7 +69,7 @@ export interface RawMessage {
69
69
  /** 消息数据 */
70
70
  interface MessageData extends Record<StreamType, unknown> {
71
71
  /** 消息数据 */
72
- object: unknown;
72
+ object: unknown[];
73
73
  /** 消息数据 */
74
74
  binary: Uint8Array;
75
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudpss/message-stream",
3
- "version": "0.5.16",
3
+ "version": "0.5.18",
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.9.0"
15
+ "type-fest": "^4.11.1"
16
16
  },
17
17
  "scripts": {
18
18
  "start": "pnpm clean && tsc --watch",
package/src/index.ts CHANGED
@@ -23,7 +23,7 @@ export const EMPTY_STREAM_TOKEN = NIL_UUID as Opaque<NIL_UUID, 'StreamToken'>;
23
23
  export const StreamType = Object.freeze(['object', 'binary'] as const);
24
24
  /**
25
25
  * 流中消息的类型
26
- * - 'object',在 StreamMessage 中使用 ubjson 存储
26
+ * - 'object',在 StreamMessage 中使用 ubjson 存储,每条消息可能包含多个 object
27
27
  * - 'binary',在 StreamMessage 中原样存储
28
28
  */
29
29
  export type StreamType = (typeof StreamType)[number];
@@ -83,7 +83,7 @@ export interface RawMessage {
83
83
  /** 消息数据 */
84
84
  interface MessageData extends Record<StreamType, unknown> {
85
85
  /** 消息数据 */
86
- object: unknown;
86
+ object: unknown[];
87
87
  /** 消息数据 */
88
88
  binary: Uint8Array;
89
89
  }