@pluv/client 0.40.1 → 0.40.2
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +5 -5
- package/src/PluvClient.ts +2 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/client@0.40.
|
|
2
|
+
> @pluv/client@0.40.2 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,11 +8,11 @@
|
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[32mCJS[39m [1mdist/index.js [22m[32m50.
|
|
12
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m49.
|
|
14
|
-
[32mESM[39m ⚡️ Build success in
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m50.77 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 96ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m49.45 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 99ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 3346ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m24.50 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m24.50 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -263,7 +263,7 @@ declare class PluvClient<TIO extends IOLike<any, any>, TPresence extends JsonObj
|
|
|
263
263
|
};
|
|
264
264
|
get procedure(): PluvProcedure<TIO, {}, {}, TPresence, TStorage>;
|
|
265
265
|
constructor(options: PluvClientOptions<TIO, TPresence, TStorage, TMetadata>);
|
|
266
|
-
createRoom: <TEvents extends PluvRouterEventConfig<TIO, TPresence, TStorage> = {}>(room: string, options
|
|
266
|
+
createRoom: <TEvents extends PluvRouterEventConfig<TIO, TPresence, TStorage> = {}>(room: string, options?: CreateRoomOptions<TIO, TPresence, TStorage, TMetadata, TEvents>) => PluvRoom<TIO, TMetadata, TPresence, TStorage, TEvents>;
|
|
267
267
|
enter: (room: string | PluvRoom<TIO, TMetadata, any, any, any>, ...args: EnterRoomParams<TMetadata>) => Promise<PluvRoom<TIO, TMetadata, TPresence, TStorage, any>>;
|
|
268
268
|
getRoom: (room: string) => PluvRoom<TIO, TMetadata, TPresence, TStorage, any> | null;
|
|
269
269
|
getRooms: () => readonly PluvRoom<TIO, TMetadata, TPresence, TStorage, any>[];
|
package/dist/index.d.ts
CHANGED
|
@@ -263,7 +263,7 @@ declare class PluvClient<TIO extends IOLike<any, any>, TPresence extends JsonObj
|
|
|
263
263
|
};
|
|
264
264
|
get procedure(): PluvProcedure<TIO, {}, {}, TPresence, TStorage>;
|
|
265
265
|
constructor(options: PluvClientOptions<TIO, TPresence, TStorage, TMetadata>);
|
|
266
|
-
createRoom: <TEvents extends PluvRouterEventConfig<TIO, TPresence, TStorage> = {}>(room: string, options
|
|
266
|
+
createRoom: <TEvents extends PluvRouterEventConfig<TIO, TPresence, TStorage> = {}>(room: string, options?: CreateRoomOptions<TIO, TPresence, TStorage, TMetadata, TEvents>) => PluvRoom<TIO, TMetadata, TPresence, TStorage, TEvents>;
|
|
267
267
|
enter: (room: string | PluvRoom<TIO, TMetadata, any, any, any>, ...args: EnterRoomParams<TMetadata>) => Promise<PluvRoom<TIO, TMetadata, TPresence, TStorage, any>>;
|
|
268
268
|
getRoom: (room: string) => PluvRoom<TIO, TMetadata, TPresence, TStorage, any> | null;
|
|
269
269
|
getRooms: () => readonly PluvRoom<TIO, TMetadata, TPresence, TStorage, any>[];
|
package/dist/index.js
CHANGED
|
@@ -1226,7 +1226,7 @@ var PluvClient = class {
|
|
|
1226
1226
|
constructor(options) {
|
|
1227
1227
|
this._publicKey = null;
|
|
1228
1228
|
this._rooms = /* @__PURE__ */ new Map();
|
|
1229
|
-
this.createRoom = (room, options) => {
|
|
1229
|
+
this.createRoom = (room, options = {}) => {
|
|
1230
1230
|
var _a;
|
|
1231
1231
|
const oldRoom = this.getRoom(room);
|
|
1232
1232
|
if (oldRoom) return oldRoom;
|
|
@@ -1297,7 +1297,7 @@ var PluvClient = class {
|
|
|
1297
1297
|
_logDebug(...data) {
|
|
1298
1298
|
var _a;
|
|
1299
1299
|
if (((_a = process == null ? void 0 : process.env) == null ? void 0 : _a.NODE_ENV) === "production") return;
|
|
1300
|
-
this._debug
|
|
1300
|
+
if (this._debug) console.log(...data);
|
|
1301
1301
|
}
|
|
1302
1302
|
};
|
|
1303
1303
|
|
package/dist/index.mjs
CHANGED
|
@@ -1195,7 +1195,7 @@ var PluvClient = class {
|
|
|
1195
1195
|
constructor(options) {
|
|
1196
1196
|
this._publicKey = null;
|
|
1197
1197
|
this._rooms = /* @__PURE__ */ new Map();
|
|
1198
|
-
this.createRoom = (room, options) => {
|
|
1198
|
+
this.createRoom = (room, options = {}) => {
|
|
1199
1199
|
var _a;
|
|
1200
1200
|
const oldRoom = this.getRoom(room);
|
|
1201
1201
|
if (oldRoom) return oldRoom;
|
|
@@ -1266,7 +1266,7 @@ var PluvClient = class {
|
|
|
1266
1266
|
_logDebug(...data) {
|
|
1267
1267
|
var _a;
|
|
1268
1268
|
if (((_a = process == null ? void 0 : process.env) == null ? void 0 : _a.NODE_ENV) === "production") return;
|
|
1269
|
-
this._debug
|
|
1269
|
+
if (this._debug) console.log(...data);
|
|
1270
1270
|
}
|
|
1271
1271
|
};
|
|
1272
1272
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/client",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.2",
|
|
4
4
|
"description": "@pluv/io frontend client",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"wonka": "^6.3.5",
|
|
21
|
-
"@pluv/crdt": "^0.40.
|
|
22
|
-
"@pluv/types": "^0.40.
|
|
21
|
+
"@pluv/crdt": "^0.40.2",
|
|
22
|
+
"@pluv/types": "^0.40.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"eslint": "^9.24.0",
|
|
26
26
|
"tsup": "^8.4.0",
|
|
27
27
|
"typescript": "^5.8.3",
|
|
28
|
-
"@pluv/tsconfig": "^0.40.
|
|
29
|
-
"eslint-config-pluv": "^0.40.
|
|
28
|
+
"@pluv/tsconfig": "^0.40.2",
|
|
29
|
+
"eslint-config-pluv": "^0.40.2"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/PluvClient.ts
CHANGED
|
@@ -92,7 +92,7 @@ export class PluvClient<
|
|
|
92
92
|
|
|
93
93
|
public createRoom = <TEvents extends PluvRouterEventConfig<TIO, TPresence, TStorage> = {}>(
|
|
94
94
|
room: string,
|
|
95
|
-
options: CreateRoomOptions<TIO, TPresence, TStorage, TMetadata, TEvents
|
|
95
|
+
options: CreateRoomOptions<TIO, TPresence, TStorage, TMetadata, TEvents> = {},
|
|
96
96
|
): PluvRoom<TIO, TMetadata, TPresence, TStorage, TEvents> => {
|
|
97
97
|
const oldRoom = this.getRoom(room);
|
|
98
98
|
|
|
@@ -171,9 +171,8 @@ export class PluvClient<
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
private _logDebug(...data: any[]): void {
|
|
174
|
-
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
|
175
174
|
if (process?.env?.NODE_ENV === "production") return;
|
|
176
175
|
|
|
177
|
-
this._debug
|
|
176
|
+
if (this._debug) console.log(...data);
|
|
178
177
|
}
|
|
179
178
|
}
|