@pluv/types 0.37.7 → 0.38.1
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/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +8 -0
- package/dist/index.d.mts +15 -15
- package/dist/index.d.ts +15 -15
- package/package.json +3 -3
- package/src/pluv.ts +15 -15
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/types@0.
|
|
2
|
+
> @pluv/types@0.38.1 build /home/runner/work/pluv/pluv/packages/types
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[32mESM[39m [1mdist/index.mjs [22m[32m0 B[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 40ms
|
|
13
13
|
[32mCJS[39m [1mdist/index.js [22m[32m758.00 B[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 40ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m7.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m7.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 753ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m7.09 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m7.09 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -44,23 +44,23 @@ type BaseUser = {
|
|
|
44
44
|
id: string;
|
|
45
45
|
};
|
|
46
46
|
interface BaseClientEventRecord {
|
|
47
|
-
$
|
|
48
|
-
$
|
|
47
|
+
$getOthers: {};
|
|
48
|
+
$initializeSession: {
|
|
49
49
|
presence: JsonObject;
|
|
50
50
|
update: string | null;
|
|
51
51
|
};
|
|
52
|
-
$
|
|
53
|
-
$
|
|
52
|
+
$ping: {};
|
|
53
|
+
$updatePresence: {
|
|
54
54
|
presence: JsonObject;
|
|
55
55
|
};
|
|
56
|
-
$
|
|
56
|
+
$updateStorage: {
|
|
57
57
|
origin: string | null;
|
|
58
58
|
update: string;
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
type BaseClientMessage = InferEventMessage<BaseClientEventRecord>;
|
|
62
62
|
interface BaseIOAuthorizeEventRecord<TAuthorize extends IOAuthorize<any, any>> {
|
|
63
|
-
$
|
|
63
|
+
$othersReceived: {
|
|
64
64
|
others: {
|
|
65
65
|
[connectionId: string]: {
|
|
66
66
|
connectionId: string;
|
|
@@ -70,31 +70,31 @@ interface BaseIOAuthorizeEventRecord<TAuthorize extends IOAuthorize<any, any>> {
|
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
-
$
|
|
73
|
+
$userJoined: {
|
|
74
74
|
connectionId: string;
|
|
75
75
|
user: NonNullable<Id<InferIOAuthorizeUser<TAuthorize>>>;
|
|
76
76
|
presence: JsonObject;
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
type BaseIOEventRecord<TAuthorize extends IOAuthorize<any, any>> = BaseIOAuthorizeEventRecord<TAuthorize> & {
|
|
80
|
-
$
|
|
80
|
+
$error: {
|
|
81
81
|
message: string;
|
|
82
82
|
stack?: string | null;
|
|
83
83
|
};
|
|
84
|
-
$
|
|
84
|
+
$exit: {
|
|
85
85
|
sessionId: string;
|
|
86
86
|
};
|
|
87
|
-
$
|
|
88
|
-
$
|
|
87
|
+
$pong: {};
|
|
88
|
+
$presenceUpdated: {
|
|
89
89
|
presence: JsonObject;
|
|
90
90
|
};
|
|
91
|
-
$
|
|
91
|
+
$registered: {
|
|
92
92
|
sessionId: string;
|
|
93
93
|
};
|
|
94
|
-
$
|
|
94
|
+
$storageReceived: {
|
|
95
95
|
state: string;
|
|
96
96
|
};
|
|
97
|
-
$
|
|
97
|
+
$storageUpdated: {
|
|
98
98
|
state: string;
|
|
99
99
|
};
|
|
100
100
|
};
|
|
@@ -156,6 +156,6 @@ type InferEventMessage<TEvents = EventRecord<string, any>, TEvent extends keyof
|
|
|
156
156
|
}[TEvent] : never;
|
|
157
157
|
type IOEventMessage<TIO extends IOLike<any>, TEvent extends keyof InferIOOutput<TIO> = keyof InferIOOutput<TIO>> = Id<{
|
|
158
158
|
room: string;
|
|
159
|
-
} & InferEventMessage<InferIOOutput<TIO>, TEvent> & (InferEventMessage<InferIOOutput<TIO>, TEvent>["type"] extends "$
|
|
159
|
+
} & InferEventMessage<InferIOOutput<TIO>, TEvent> & (InferEventMessage<InferIOOutput<TIO>, TEvent>["type"] extends "$error" ? Partial<IOAuthorizeEventMessage<TIO>> : IOAuthorizeEventMessage<TIO>)>;
|
|
160
160
|
|
|
161
161
|
export type { BaseClientEventRecord, BaseClientMessage, BaseIOAuthorizeEventRecord, BaseIOEventRecord, BaseUser, Constructable, DeepPartial, DeepWriteable, EventMessage, EventRecord, GetEventMessage, IOAuthorize, IOAuthorizeEventMessage, IOEventMessage, IOLike, IORouterLike, Id, InferEventMessage, InferEventsInput, InferEventsOutput, InferIOAuthorize, InferIOAuthorizeUser, InferIOInput, InferIOOutput, InputZodLike, Json, JsonObject, JsonPrimitive, Maybe, MaybePromise, MaybeReadonlyArray, NonNilProps, OptionalProps, ProcedureLike, Spread, SpreadProperties, UndefinedProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -44,23 +44,23 @@ type BaseUser = {
|
|
|
44
44
|
id: string;
|
|
45
45
|
};
|
|
46
46
|
interface BaseClientEventRecord {
|
|
47
|
-
$
|
|
48
|
-
$
|
|
47
|
+
$getOthers: {};
|
|
48
|
+
$initializeSession: {
|
|
49
49
|
presence: JsonObject;
|
|
50
50
|
update: string | null;
|
|
51
51
|
};
|
|
52
|
-
$
|
|
53
|
-
$
|
|
52
|
+
$ping: {};
|
|
53
|
+
$updatePresence: {
|
|
54
54
|
presence: JsonObject;
|
|
55
55
|
};
|
|
56
|
-
$
|
|
56
|
+
$updateStorage: {
|
|
57
57
|
origin: string | null;
|
|
58
58
|
update: string;
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
type BaseClientMessage = InferEventMessage<BaseClientEventRecord>;
|
|
62
62
|
interface BaseIOAuthorizeEventRecord<TAuthorize extends IOAuthorize<any, any>> {
|
|
63
|
-
$
|
|
63
|
+
$othersReceived: {
|
|
64
64
|
others: {
|
|
65
65
|
[connectionId: string]: {
|
|
66
66
|
connectionId: string;
|
|
@@ -70,31 +70,31 @@ interface BaseIOAuthorizeEventRecord<TAuthorize extends IOAuthorize<any, any>> {
|
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
-
$
|
|
73
|
+
$userJoined: {
|
|
74
74
|
connectionId: string;
|
|
75
75
|
user: NonNullable<Id<InferIOAuthorizeUser<TAuthorize>>>;
|
|
76
76
|
presence: JsonObject;
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
type BaseIOEventRecord<TAuthorize extends IOAuthorize<any, any>> = BaseIOAuthorizeEventRecord<TAuthorize> & {
|
|
80
|
-
$
|
|
80
|
+
$error: {
|
|
81
81
|
message: string;
|
|
82
82
|
stack?: string | null;
|
|
83
83
|
};
|
|
84
|
-
$
|
|
84
|
+
$exit: {
|
|
85
85
|
sessionId: string;
|
|
86
86
|
};
|
|
87
|
-
$
|
|
88
|
-
$
|
|
87
|
+
$pong: {};
|
|
88
|
+
$presenceUpdated: {
|
|
89
89
|
presence: JsonObject;
|
|
90
90
|
};
|
|
91
|
-
$
|
|
91
|
+
$registered: {
|
|
92
92
|
sessionId: string;
|
|
93
93
|
};
|
|
94
|
-
$
|
|
94
|
+
$storageReceived: {
|
|
95
95
|
state: string;
|
|
96
96
|
};
|
|
97
|
-
$
|
|
97
|
+
$storageUpdated: {
|
|
98
98
|
state: string;
|
|
99
99
|
};
|
|
100
100
|
};
|
|
@@ -156,6 +156,6 @@ type InferEventMessage<TEvents = EventRecord<string, any>, TEvent extends keyof
|
|
|
156
156
|
}[TEvent] : never;
|
|
157
157
|
type IOEventMessage<TIO extends IOLike<any>, TEvent extends keyof InferIOOutput<TIO> = keyof InferIOOutput<TIO>> = Id<{
|
|
158
158
|
room: string;
|
|
159
|
-
} & InferEventMessage<InferIOOutput<TIO>, TEvent> & (InferEventMessage<InferIOOutput<TIO>, TEvent>["type"] extends "$
|
|
159
|
+
} & InferEventMessage<InferIOOutput<TIO>, TEvent> & (InferEventMessage<InferIOOutput<TIO>, TEvent>["type"] extends "$error" ? Partial<IOAuthorizeEventMessage<TIO>> : IOAuthorizeEventMessage<TIO>)>;
|
|
160
160
|
|
|
161
161
|
export type { BaseClientEventRecord, BaseClientMessage, BaseIOAuthorizeEventRecord, BaseIOEventRecord, BaseUser, Constructable, DeepPartial, DeepWriteable, EventMessage, EventRecord, GetEventMessage, IOAuthorize, IOAuthorizeEventMessage, IOEventMessage, IOLike, IORouterLike, Id, InferEventMessage, InferEventsInput, InferEventsOutput, InferIOAuthorize, InferIOAuthorizeUser, InferIOInput, InferIOOutput, InputZodLike, Json, JsonObject, JsonPrimitive, Maybe, MaybePromise, MaybeReadonlyArray, NonNilProps, OptionalProps, ProcedureLike, Spread, SpreadProperties, UndefinedProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"description": "@pluv/io shared types",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"eslint": "^8.57.1",
|
|
20
20
|
"tsup": "^8.4.0",
|
|
21
21
|
"typescript": "^5.8.2",
|
|
22
|
-
"@pluv/tsconfig": "^0.
|
|
23
|
-
"eslint-config-pluv": "^0.
|
|
22
|
+
"@pluv/tsconfig": "^0.38.1",
|
|
23
|
+
"eslint-config-pluv": "^0.38.1"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/pluv.ts
CHANGED
|
@@ -5,16 +5,16 @@ export type BaseUser = {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export interface BaseClientEventRecord {
|
|
8
|
-
$
|
|
9
|
-
$
|
|
8
|
+
$getOthers: {};
|
|
9
|
+
$initializeSession: {
|
|
10
10
|
presence: JsonObject;
|
|
11
11
|
update: string | null;
|
|
12
12
|
};
|
|
13
|
-
$
|
|
14
|
-
$
|
|
13
|
+
$ping: {};
|
|
14
|
+
$updatePresence: {
|
|
15
15
|
presence: JsonObject;
|
|
16
16
|
};
|
|
17
|
-
$
|
|
17
|
+
$updateStorage: {
|
|
18
18
|
origin: string | null;
|
|
19
19
|
update: string;
|
|
20
20
|
};
|
|
@@ -23,7 +23,7 @@ export interface BaseClientEventRecord {
|
|
|
23
23
|
export type BaseClientMessage = InferEventMessage<BaseClientEventRecord>;
|
|
24
24
|
|
|
25
25
|
export interface BaseIOAuthorizeEventRecord<TAuthorize extends IOAuthorize<any, any>> {
|
|
26
|
-
$
|
|
26
|
+
$othersReceived: {
|
|
27
27
|
others: {
|
|
28
28
|
[connectionId: string]: {
|
|
29
29
|
connectionId: string;
|
|
@@ -33,7 +33,7 @@ export interface BaseIOAuthorizeEventRecord<TAuthorize extends IOAuthorize<any,
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
$
|
|
36
|
+
$userJoined: {
|
|
37
37
|
connectionId: string;
|
|
38
38
|
user: NonNullable<Id<InferIOAuthorizeUser<TAuthorize>>>;
|
|
39
39
|
presence: JsonObject;
|
|
@@ -41,24 +41,24 @@ export interface BaseIOAuthorizeEventRecord<TAuthorize extends IOAuthorize<any,
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export type BaseIOEventRecord<TAuthorize extends IOAuthorize<any, any>> = BaseIOAuthorizeEventRecord<TAuthorize> & {
|
|
44
|
-
$
|
|
44
|
+
$error: {
|
|
45
45
|
message: string;
|
|
46
46
|
stack?: string | null;
|
|
47
47
|
};
|
|
48
|
-
$
|
|
48
|
+
$exit: {
|
|
49
49
|
sessionId: string;
|
|
50
50
|
};
|
|
51
|
-
$
|
|
52
|
-
$
|
|
51
|
+
$pong: {};
|
|
52
|
+
$presenceUpdated: {
|
|
53
53
|
presence: JsonObject;
|
|
54
54
|
};
|
|
55
|
-
$
|
|
55
|
+
$registered: {
|
|
56
56
|
sessionId: string;
|
|
57
57
|
};
|
|
58
|
-
$
|
|
58
|
+
$storageReceived: {
|
|
59
59
|
state: string;
|
|
60
60
|
};
|
|
61
|
-
$
|
|
61
|
+
$storageUpdated: {
|
|
62
62
|
state: string;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
@@ -157,7 +157,7 @@ export type IOEventMessage<
|
|
|
157
157
|
TEvent extends keyof InferIOOutput<TIO> = keyof InferIOOutput<TIO>,
|
|
158
158
|
> = Id<
|
|
159
159
|
{ room: string } & InferEventMessage<InferIOOutput<TIO>, TEvent> &
|
|
160
|
-
(InferEventMessage<InferIOOutput<TIO>, TEvent>["type"] extends "$
|
|
160
|
+
(InferEventMessage<InferIOOutput<TIO>, TEvent>["type"] extends "$error"
|
|
161
161
|
? Partial<IOAuthorizeEventMessage<TIO>>
|
|
162
162
|
: IOAuthorizeEventMessage<TIO>)
|
|
163
163
|
>;
|