@pluv/client 0.8.0 → 0.8.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 +7 -7
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -4
- package/dist/index.mjs +2 -4
- package/package.json +1 -1
- package/src/AbstractRoom.ts +1 -1
- package/src/MockedRoom.ts +2 -2
- package/src/PluvRoom.ts +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/client@0.8.
|
|
2
|
+
> @pluv/client@0.8.1 build /home/runner/work/pluv/pluv/packages/client
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m35.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m36.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m35.08 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 90ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m36.22 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 92ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m11.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 3816ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m11.73 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ declare abstract class AbstractRoom<TIO extends IOLike, TPresence extends JsonOb
|
|
|
53
53
|
abstract broadcast<TEvent extends keyof InferIOInput<TIO>>(event: TEvent, data: Id<InferIOInput<TIO>[TEvent]>): void;
|
|
54
54
|
abstract event<TEvent extends keyof InferIOOutput<TIO>>(event: TEvent, callback: EventNotifierSubscriptionCallback<TIO, TEvent>): () => void;
|
|
55
55
|
abstract getConnection(): WebSocketConnection;
|
|
56
|
-
abstract getMyPresence(): TPresence
|
|
56
|
+
abstract getMyPresence(): TPresence;
|
|
57
57
|
abstract getMyself(): Id<UserInfo<TIO, TPresence>> | null;
|
|
58
58
|
abstract getOther(connectionId: string): Id<UserInfo<TIO, TPresence>> | null;
|
|
59
59
|
abstract getOthers(): readonly Id<UserInfo<TIO, TPresence>>[];
|
|
@@ -127,7 +127,7 @@ declare class PluvRoom<TIO extends IOLike, TPresence extends JsonObject = {}, TS
|
|
|
127
127
|
disconnect(): void;
|
|
128
128
|
event: <TEvent extends keyof InferIOOutput<TIO>>(event: TEvent, callback: EventNotifierSubscriptionCallback<TIO, TEvent>) => (() => void);
|
|
129
129
|
getConnection(): WebSocketConnection;
|
|
130
|
-
getMyPresence: () => TPresence
|
|
130
|
+
getMyPresence: () => TPresence;
|
|
131
131
|
getMyself: () => Id<UserInfo<TIO, TPresence>> | null;
|
|
132
132
|
getOther: (connectionId: string) => Id<UserInfo<TIO, TPresence>> | null;
|
|
133
133
|
getOthers: () => readonly Id<UserInfo<TIO, TPresence>>[];
|
|
@@ -221,7 +221,7 @@ declare class MockedRoom<TIO extends IOLike, TPresence extends JsonObject = {},
|
|
|
221
221
|
broadcast<TEvent extends keyof InferIOInput<TIO>>(event: TEvent, data: Id<InferIOInput<TIO>[TEvent]>): void;
|
|
222
222
|
event: <TEvent extends keyof InferIOOutput<TIO>>(event: TEvent, callback: EventNotifierSubscriptionCallback<TIO, TEvent>) => (() => void);
|
|
223
223
|
getConnection(): WebSocketConnection;
|
|
224
|
-
getMyPresence: () => TPresence
|
|
224
|
+
getMyPresence: () => TPresence;
|
|
225
225
|
getMyself: () => Id<UserInfo<TIO, TPresence>> | null;
|
|
226
226
|
getOther: (connectionId: string) => Id<UserInfo<TIO, TPresence>> | null;
|
|
227
227
|
getOthers: () => readonly Id<UserInfo<TIO, TPresence>>[];
|
package/dist/index.js
CHANGED
|
@@ -331,8 +331,7 @@ var PluvRoom = class extends AbstractRoom {
|
|
|
331
331
|
return this._eventNotifier.subscribe(event, callback);
|
|
332
332
|
};
|
|
333
333
|
this.getMyPresence = () => {
|
|
334
|
-
|
|
335
|
-
return (_b = (_a = this._usersManager.myself) == null ? void 0 : _a.presence) != null ? _b : null;
|
|
334
|
+
return this._usersManager.myPresence;
|
|
336
335
|
};
|
|
337
336
|
this.getMyself = () => {
|
|
338
337
|
return this._usersManager.myself;
|
|
@@ -1106,8 +1105,7 @@ var MockedRoom = class extends AbstractRoom {
|
|
|
1106
1105
|
return this._eventNotifier.subscribe(event, callback);
|
|
1107
1106
|
};
|
|
1108
1107
|
this.getMyPresence = () => {
|
|
1109
|
-
|
|
1110
|
-
return (_b = (_a = this._usersManager.myself) == null ? void 0 : _a.presence) != null ? _b : null;
|
|
1108
|
+
return this._usersManager.myPresence;
|
|
1111
1109
|
};
|
|
1112
1110
|
this.getMyself = () => {
|
|
1113
1111
|
return this._usersManager.myself;
|
package/dist/index.mjs
CHANGED
|
@@ -306,8 +306,7 @@ var PluvRoom = class extends AbstractRoom {
|
|
|
306
306
|
return this._eventNotifier.subscribe(event, callback);
|
|
307
307
|
};
|
|
308
308
|
this.getMyPresence = () => {
|
|
309
|
-
|
|
310
|
-
return (_b = (_a = this._usersManager.myself) == null ? void 0 : _a.presence) != null ? _b : null;
|
|
309
|
+
return this._usersManager.myPresence;
|
|
311
310
|
};
|
|
312
311
|
this.getMyself = () => {
|
|
313
312
|
return this._usersManager.myself;
|
|
@@ -1081,8 +1080,7 @@ var MockedRoom = class extends AbstractRoom {
|
|
|
1081
1080
|
return this._eventNotifier.subscribe(event, callback);
|
|
1082
1081
|
};
|
|
1083
1082
|
this.getMyPresence = () => {
|
|
1084
|
-
|
|
1085
|
-
return (_b = (_a = this._usersManager.myself) == null ? void 0 : _a.presence) != null ? _b : null;
|
|
1083
|
+
return this._usersManager.myPresence;
|
|
1086
1084
|
};
|
|
1087
1085
|
this.getMyself = () => {
|
|
1088
1086
|
return this._usersManager.myself;
|
package/package.json
CHANGED
package/src/AbstractRoom.ts
CHANGED
|
@@ -38,7 +38,7 @@ export abstract class AbstractRoom<
|
|
|
38
38
|
|
|
39
39
|
public abstract getConnection(): WebSocketConnection;
|
|
40
40
|
|
|
41
|
-
public abstract getMyPresence(): TPresence
|
|
41
|
+
public abstract getMyPresence(): TPresence;
|
|
42
42
|
|
|
43
43
|
public abstract getMyself(): Id<UserInfo<TIO, TPresence>> | null;
|
|
44
44
|
|
package/src/MockedRoom.ts
CHANGED
|
@@ -131,8 +131,8 @@ export class MockedRoom<
|
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
public getMyPresence = (): TPresence
|
|
135
|
-
return this._usersManager.
|
|
134
|
+
public getMyPresence = (): TPresence => {
|
|
135
|
+
return this._usersManager.myPresence;
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
public getMyself = (): Id<UserInfo<TIO, TPresence>> | null => {
|
package/src/PluvRoom.ts
CHANGED
|
@@ -303,8 +303,8 @@ export class PluvRoom<
|
|
|
303
303
|
);
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
public getMyPresence = (): TPresence
|
|
307
|
-
return this._usersManager.
|
|
306
|
+
public getMyPresence = (): TPresence => {
|
|
307
|
+
return this._usersManager.myPresence;
|
|
308
308
|
};
|
|
309
309
|
|
|
310
310
|
public getMyself = (): Id<UserInfo<TIO, TPresence>> | null => {
|