@pluv/client 4.0.1 → 4.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/client",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "@pluv/io frontend client",
5
5
  "author": {
6
6
  "email": "david@pluv.io",
@@ -20,16 +20,16 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "wonka": "^6.3.5",
24
- "@pluv/crdt": "^4.0.1",
25
- "@pluv/types": "^4.0.1"
23
+ "wonka": "^6.3.6",
24
+ "@pluv/crdt": "^4.1.0",
25
+ "@pluv/types": "^4.1.0"
26
26
  },
27
27
  "devDependencies": {
28
- "eslint": "^9.39.2",
29
- "tsdown": "0.20.0-beta.4",
28
+ "eslint": "^10.5.0",
29
+ "tsdown": "0.22.2",
30
30
  "typescript": "^5.9.3",
31
- "@pluv/tsconfig": "^4.0.1",
32
- "eslint-config-pluv": "^4.0.1"
31
+ "@pluv/tsconfig": "^4.1.0",
32
+ "eslint-config-pluv": "^4.1.0"
33
33
  },
34
34
  "exports": {
35
35
  ".": "./dist/index.mjs",
package/src/MockedRoom.ts CHANGED
@@ -71,8 +71,7 @@ export class MockedRoom<
71
71
  TPresence extends Record<string, any>,
72
72
  TCrdt extends AbstractCrdtDocFactory<any, any>,
73
73
  TEvents extends PluvRouterEventConfig<TIO, TPresence, InferStorage<TCrdt>>,
74
- > implements RoomLike<TIO, InferDoc<TCrdt>, TPresence, InferStorage<TCrdt>>
75
- {
74
+ > implements RoomLike<TIO, InferDoc<TCrdt>, TPresence, InferStorage<TCrdt>> {
76
75
  public readonly id: string;
77
76
 
78
77
  private readonly _crdtManager: CrdtManager<TCrdt>;
@@ -20,8 +20,7 @@ export class PluvProcedure<
20
20
  TPresence extends Record<string, any>,
21
21
  TCrdt extends AbstractCrdtDocFactory<any, any>,
22
22
  TFilled extends "input" | "broadcast" | "",
23
- > implements ProcedureLike<TInput, TOutput>
24
- {
23
+ > implements ProcedureLike<TInput, TOutput> {
25
24
  private _broadcast: EventResolver<
26
25
  TIO,
27
26
  TInput,
package/src/PluvRoom.ts CHANGED
@@ -208,8 +208,7 @@ export class PluvRoom<
208
208
  TPresence extends Record<string, any> = {},
209
209
  TCrdt extends AbstractCrdtDocFactory<any, any> = NoopCrdtDocFactory,
210
210
  TEvents extends PluvRouterEventConfig<TIO, TPresence, InferStorage<TCrdt>> = {},
211
- > implements RoomLike<TIO, InferDoc<TCrdt>, TPresence, InferStorage<TCrdt>>
212
- {
211
+ > implements RoomLike<TIO, InferDoc<TCrdt>, TPresence, InferStorage<TCrdt>> {
213
212
  readonly _endpoints: RoomEndpoints<TIO, TMetadata>;
214
213
 
215
214
  public readonly id: string;
@@ -826,7 +825,9 @@ export class PluvRoom<
826
825
  try {
827
826
  return await res.text().then((text) => text.trim());
828
827
  } catch (err) {
829
- throw new Error(err instanceof Error ? err.message : "Room is unauthorized");
828
+ throw new Error(err instanceof Error ? err.message : "Room is unauthorized", {
829
+ cause: err,
830
+ });
830
831
  }
831
832
  }
832
833
 
package/src/PluvRouter.ts CHANGED
@@ -26,8 +26,7 @@ export class PluvRouter<
26
26
  TPresence extends Record<string, any>,
27
27
  TCrdt extends AbstractCrdtDocFactory<any, any>,
28
28
  TEvents extends PluvRouterEventConfig<TIO, TPresence, TCrdt> = {},
29
- > implements IORouterLike<TEvents>
30
- {
29
+ > implements IORouterLike<TEvents> {
31
30
  readonly _defs: { events: TEvents } = { events: {} as TEvents };
32
31
 
33
32
  constructor(events: TEvents) {