@pluv/io 0.10.3 → 0.11.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pluv/io@0.10.3 build /home/runner/work/pluv/pluv/packages/io
2
+ > @pluv/io@0.11.0 build /home/runner/work/pluv/pluv/packages/io
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
- ESM dist/index.mjs 29.29 KB
12
- ESM ⚡️ Build success in 73ms
13
- CJS dist/index.js 31.35 KB
14
- CJS ⚡️ Build success in 78ms
11
+ ESM dist/index.mjs 29.30 KB
12
+ ESM ⚡️ Build success in 124ms
13
+ CJS dist/index.js 31.38 KB
14
+ CJS ⚡️ Build success in 136ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 3387ms
16
+ DTS ⚡️ Build success in 4567ms
17
17
  DTS dist/index.d.mts 17.12 KB
18
18
  DTS dist/index.d.ts 17.12 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @pluv/io
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b538f5c: Exported class PluvIO from @pluv/io.
8
+
9
+ ### Patch Changes
10
+
11
+ - @pluv/crdt-yjs@0.11.0
12
+ - @pluv/types@0.11.0
13
+
3
14
  ## 0.10.3
4
15
 
5
16
  ### Patch Changes
package/dist/index.js CHANGED
@@ -83,6 +83,7 @@ __export(src_exports, {
83
83
  AbstractPlatform: () => AbstractPlatform,
84
84
  AbstractPubSub: () => AbstractPubSub,
85
85
  AbstractWebSocket: () => AbstractWebSocket,
86
+ PluvIO: () => PluvIO,
86
87
  createIO: () => createIO
87
88
  });
88
89
  module.exports = __toCommonJS(src_exports);
@@ -632,8 +633,8 @@ var IORoom = class {
632
633
  };
633
634
  }
634
635
  _parseMessage(message) {
635
- const parsed = this._platform.parseData(message.data);
636
636
  try {
637
+ const parsed = this._platform.parseData(message.data);
637
638
  if (typeof parsed !== "object")
638
639
  return null;
639
640
  if (typeof parsed.type !== "string")
@@ -1000,5 +1001,6 @@ var createIO = (params) => {
1000
1001
  AbstractPlatform,
1001
1002
  AbstractPubSub,
1002
1003
  AbstractWebSocket,
1004
+ PluvIO,
1003
1005
  createIO
1004
1006
  });
package/dist/index.mjs CHANGED
@@ -595,8 +595,8 @@ var IORoom = class {
595
595
  };
596
596
  }
597
597
  _parseMessage(message) {
598
- const parsed = this._platform.parseData(message.data);
599
598
  try {
599
+ const parsed = this._platform.parseData(message.data);
600
600
  if (typeof parsed !== "object")
601
601
  return null;
602
602
  if (typeof parsed.type !== "string")
@@ -962,5 +962,6 @@ export {
962
962
  AbstractPlatform,
963
963
  AbstractPubSub,
964
964
  AbstractWebSocket,
965
+ PluvIO,
965
966
  createIO
966
967
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/io",
3
- "version": "0.10.3",
3
+ "version": "0.11.0",
4
4
  "description": "@pluv/io server-side websocket manager",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -21,19 +21,19 @@
21
21
  "jose": "^4.14.4",
22
22
  "kleur": "^4.1.5",
23
23
  "wonka": "^6.3.4",
24
- "@pluv/crdt-yjs": "^0.10.3",
25
- "@pluv/types": "^0.10.3"
24
+ "@pluv/crdt-yjs": "^0.11.0",
25
+ "@pluv/types": "^0.11.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "yjs": "^13.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "eslint": "^8.47.0",
31
+ "eslint": "^8.48.0",
32
32
  "tsup": "^7.2.0",
33
- "typescript": "^5.1.6",
33
+ "typescript": "^5.2.2",
34
34
  "yjs": "^13.6.7",
35
- "@pluv/tsconfig": "^0.10.3",
36
- "eslint-config-pluv": "^0.10.3"
35
+ "@pluv/tsconfig": "^0.11.0",
36
+ "eslint-config-pluv": "^0.11.0"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "tsup src/index.ts --format esm,cjs --dts",
package/src/IORoom.ts CHANGED
@@ -605,9 +605,9 @@ export class IORoom<
605
605
  private _parseMessage(message: {
606
606
  data: string | ArrayBuffer;
607
607
  }): EventMessage<string, any> | null {
608
- const parsed = this._platform.parseData(message.data);
609
-
610
608
  try {
609
+ const parsed = this._platform.parseData(message.data);
610
+
611
611
  if (typeof parsed !== "object") return null;
612
612
  if (typeof parsed.type !== "string") return null;
613
613
  if (typeof parsed.data !== "object") return null;
package/src/index.ts CHANGED
@@ -27,12 +27,8 @@ export type {
27
27
  AbstractWebSocketHandleErrorParams,
28
28
  } from "./AbstractWebSocket";
29
29
  export type { IORoom } from "./IORoom";
30
- export type {
31
- GetRoomOptions,
32
- InferIORoom,
33
- PluvIO,
34
- PluvIOConfig,
35
- } from "./PluvIO";
30
+ export { PluvIO } from "./PluvIO";
31
+ export type { GetRoomOptions, InferIORoom, PluvIOConfig } from "./PluvIO";
36
32
  export type {
37
33
  AuthorizeModule,
38
34
  AuthorizeParams,