@pluv/client 0.37.3 → 0.37.4

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pluv/client@0.37.3 build /home/runner/work/pluv/pluv/packages/client
2
+ > @pluv/client@0.37.4 build /home/runner/work/pluv/pluv/packages/client
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- CJS dist/index.js 48.94 KB
12
- CJS ⚡️ Build success in 107ms
13
- ESM dist/index.mjs 47.62 KB
14
- ESM ⚡️ Build success in 108ms
11
+ ESM dist/index.mjs 47.60 KB
12
+ ESM ⚡️ Build success in 127ms
13
+ CJS dist/index.js 48.92 KB
14
+ CJS ⚡️ Build success in 128ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 3530ms
16
+ DTS ⚡️ Build success in 3711ms
17
17
  DTS dist/index.d.mts 23.13 KB
18
18
  DTS dist/index.d.ts 23.13 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @pluv/client
2
2
 
3
+ ## 0.37.4
4
+
5
+ ### Patch Changes
6
+
7
+ - a9c3d17: Fix `publicKey` not being properly set on `PluvClient` when `publicKey` is a function.
8
+ - @pluv/crdt@0.37.4
9
+ - @pluv/types@0.37.4
10
+
3
11
  ## 0.37.3
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1245,7 +1245,7 @@ var PluvClient = class {
1245
1245
  this._metadata = metadata;
1246
1246
  this._presence = presence;
1247
1247
  this._wsEndpoint = wsEndpoint;
1248
- if (typeof publicKey === "string") this._publicKey = publicKey;
1248
+ if (!!publicKey) this._publicKey = publicKey;
1249
1249
  }
1250
1250
  get _defs() {
1251
1251
  return {
package/dist/index.mjs CHANGED
@@ -1214,7 +1214,7 @@ var PluvClient = class {
1214
1214
  this._metadata = metadata;
1215
1215
  this._presence = presence;
1216
1216
  this._wsEndpoint = wsEndpoint;
1217
- if (typeof publicKey === "string") this._publicKey = publicKey;
1217
+ if (!!publicKey) this._publicKey = publicKey;
1218
1218
  }
1219
1219
  get _defs() {
1220
1220
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/client",
3
- "version": "0.37.3",
3
+ "version": "0.37.4",
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.37.3",
22
- "@pluv/types": "^0.37.3"
21
+ "@pluv/crdt": "^0.37.4",
22
+ "@pluv/types": "^0.37.4"
23
23
  },
24
24
  "devDependencies": {
25
25
  "eslint": "^8.57.1",
26
26
  "tsup": "^8.4.0",
27
27
  "typescript": "^5.8.2",
28
- "@pluv/tsconfig": "^0.37.3",
29
- "eslint-config-pluv": "^0.37.3"
28
+ "@pluv/tsconfig": "^0.37.4",
29
+ "eslint-config-pluv": "^0.37.4"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsup src/index.ts --format esm,cjs --dts",
package/src/PluvClient.ts CHANGED
@@ -48,7 +48,7 @@ export class PluvClient<
48
48
  private readonly _initialStorage?: AbstractCrdtDocFactory<TStorage>;
49
49
  private readonly _metadata?: InputZodLike<TMetadata>;
50
50
  private readonly _presence?: InputZodLike<TPresence>;
51
- private readonly _publicKey: string | null = null;
51
+ private readonly _publicKey: PublicKey<TMetadata> | null = null;
52
52
  private readonly _rooms = new Map<string, PluvRoom<TIO, TMetadata, TPresence, TStorage, any>>();
53
53
  private readonly _wsEndpoint: WsEndpoint<TMetadata> | undefined;
54
54
 
@@ -72,7 +72,7 @@ export class PluvClient<
72
72
  this._presence = presence;
73
73
  this._wsEndpoint = wsEndpoint;
74
74
 
75
- if (typeof publicKey === "string") this._publicKey = publicKey;
75
+ if (!!publicKey) this._publicKey = publicKey;
76
76
  }
77
77
 
78
78
  public createRoom = <TEvents extends PluvRouterEventConfig<TIO, TPresence, TStorage> = {}>(