@arcanejs/protocol 0.4.1 → 0.5.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.
package/dist/index.d.mts CHANGED
@@ -5,6 +5,13 @@ type BaseComponentProto<Namespace extends string> = {
5
5
  namespace: Namespace;
6
6
  };
7
7
  type AnyComponentProto = BaseComponentProto<string>;
8
+ type MetadataMessage = {
9
+ type: 'metadata';
10
+ /**
11
+ * The UUID for the current connection
12
+ */
13
+ connectionUuid: string;
14
+ };
8
15
  type SendTreeMsg = {
9
16
  type: 'tree-full';
10
17
  root: BaseComponentProto<string>;
@@ -13,7 +20,7 @@ type UpdateTreeMsg = {
13
20
  type: 'tree-diff';
14
21
  diff: Diff<BaseComponentProto<string>>;
15
22
  };
16
- type ServerMessage = SendTreeMsg | UpdateTreeMsg;
23
+ type ServerMessage = MetadataMessage | SendTreeMsg | UpdateTreeMsg;
17
24
  type BaseClientComponentMessage<Namespace extends string> = {
18
25
  type: 'component-message';
19
26
  namespace: Namespace;
@@ -22,4 +29,4 @@ type BaseClientComponentMessage<Namespace extends string> = {
22
29
  type AnyClientComponentMessage = BaseClientComponentMessage<string>;
23
30
  type ClientMessage = AnyClientComponentMessage;
24
31
 
25
- export type { AnyClientComponentMessage, AnyComponentProto, BaseClientComponentMessage, BaseComponentProto, ClientMessage, SendTreeMsg, ServerMessage, UpdateTreeMsg };
32
+ export type { AnyClientComponentMessage, AnyComponentProto, BaseClientComponentMessage, BaseComponentProto, ClientMessage, MetadataMessage, SendTreeMsg, ServerMessage, UpdateTreeMsg };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,13 @@ type BaseComponentProto<Namespace extends string> = {
5
5
  namespace: Namespace;
6
6
  };
7
7
  type AnyComponentProto = BaseComponentProto<string>;
8
+ type MetadataMessage = {
9
+ type: 'metadata';
10
+ /**
11
+ * The UUID for the current connection
12
+ */
13
+ connectionUuid: string;
14
+ };
8
15
  type SendTreeMsg = {
9
16
  type: 'tree-full';
10
17
  root: BaseComponentProto<string>;
@@ -13,7 +20,7 @@ type UpdateTreeMsg = {
13
20
  type: 'tree-diff';
14
21
  diff: Diff<BaseComponentProto<string>>;
15
22
  };
16
- type ServerMessage = SendTreeMsg | UpdateTreeMsg;
23
+ type ServerMessage = MetadataMessage | SendTreeMsg | UpdateTreeMsg;
17
24
  type BaseClientComponentMessage<Namespace extends string> = {
18
25
  type: 'component-message';
19
26
  namespace: Namespace;
@@ -22,4 +29,4 @@ type BaseClientComponentMessage<Namespace extends string> = {
22
29
  type AnyClientComponentMessage = BaseClientComponentMessage<string>;
23
30
  type ClientMessage = AnyClientComponentMessage;
24
31
 
25
- export type { AnyClientComponentMessage, AnyComponentProto, BaseClientComponentMessage, BaseComponentProto, ClientMessage, SendTreeMsg, ServerMessage, UpdateTreeMsg };
32
+ export type { AnyClientComponentMessage, AnyComponentProto, BaseClientComponentMessage, BaseComponentProto, ClientMessage, MetadataMessage, SendTreeMsg, ServerMessage, UpdateTreeMsg };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcanejs/protocol",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "description": "The JSON protocol types for the @arcanejs Toolkit",
6
6
  "license": "MIT",
@@ -43,8 +43,8 @@
43
43
  "eslint": "^8.57.0",
44
44
  "tsup": "^8.1.0",
45
45
  "typescript": "^5.3.3",
46
- "@arcanejs/typescript-config": "^0.0.0",
47
- "@arcanejs/eslint-config": "^0.0.0"
46
+ "@arcanejs/eslint-config": "^0.0.0",
47
+ "@arcanejs/typescript-config": "^0.0.0"
48
48
  },
49
49
  "files": [
50
50
  "dist"