@pluv/client 0.4.0 → 0.5.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.
@@ -1,17 +1,17 @@
1
1
 
2
- > @pluv/client@0.4.0 build /home/runner/work/pluv/pluv/packages/client
2
+ > @pluv/client@0.5.1 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
6
6
  CLI Using tsconfig: tsconfig.json
7
- CLI tsup v6.5.0
7
+ CLI tsup v6.6.3
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- CJS dist/index.js 34.07 KB
12
- CJS ⚡️ Build success in 122ms
13
- ESM dist/index.mjs 32.92 KB
14
- ESM ⚡️ Build success in 123ms
11
+ ESM dist/index.mjs 33.07 KB
12
+ ESM ⚡️ Build success in 115ms
13
+ CJS dist/index.js 34.23 KB
14
+ CJS ⚡️ Build success in 119ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 3728ms
17
- DTS dist/index.d.ts 11.52 KB
16
+ DTS ⚡️ Build success in 2976ms
17
+ DTS dist/index.d.ts 11.47 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @pluv/client
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 161e00e: fixed links to other pluv packages in readmes
8
+ - f6c0e65: bumped dependencies
9
+ - Updated dependencies [161e00e]
10
+ - Updated dependencies [f6c0e65]
11
+ - @pluv/crdt-yjs@0.3.1
12
+ - @pluv/types@0.1.3
13
+
14
+ ## 0.5.0
15
+
16
+ ### Minor Changes
17
+
18
+ - 327a6ef: renamed y.unstable\_\_object to y.object
19
+
20
+ ### Patch Changes
21
+
22
+ - 78a6119: Fixed MockedRoom not sending storage updates
23
+ - 8bf62cb: bumped dependencies
24
+ - 7e52685: Bumped dependencies
25
+ - b1cb325: Updated dependencies
26
+ - 8e97fb2: Updated dependencies
27
+ - Updated dependencies [8bf62cb]
28
+ - Updated dependencies [7e52685]
29
+ - Updated dependencies [b1cb325]
30
+ - Updated dependencies [327a6ef]
31
+ - Updated dependencies [8e97fb2]
32
+ - @pluv/crdt-yjs@0.3.0
33
+ - @pluv/types@0.1.3
34
+
3
35
  ## 0.4.0
4
36
 
5
37
  ### Minor Changes
package/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
  > This package is currently in preview and may have breaking changes between versions. Please wait for a `v1.0.0` stable release before using this in production.
3
3
 
4
4
  <h1 align="center">
5
- <br>
6
- <img src="https://github.com/pluv-io/pluv/blob/master/assets/pluv-icon-192x192.png?raw=true" alt="Pluv.IO" width="180" style="border-radius:16px">
7
- <br>
5
+ <br />
6
+ <img src="https://github.com/pluv-io/pluv/blob/master/assets/pluv-icon-192x192.png?raw=true" alt="Pluv.IO" width="180" style="border-radius:16px" />
7
+ <br />
8
8
  Pluv.IO (preview)
9
- <br>
9
+ <br />
10
10
  </h1>
11
11
 
12
12
  <h3 align="center">Multi-platform, E2E type-safe realtime packages</h3>
@@ -19,7 +19,7 @@
19
19
  <a href="https://github.com/pluv-io/pluv/blob/master/LICENSE">
20
20
  <img alt="GitHub" src="https://img.shields.io/github/license/pluv-io/pluv" alt="License MIT" />
21
21
  </a>
22
- <img src="https://badgen.net/badge/-/TypeScript?icon=typescript&label&labelColor=blue&color=555555" alt="TypeScript">
22
+ <img src="https://badgen.net/badge/-/TypeScript?icon=typescript&label&labelColor=blue&color=555555" alt="TypeScript" />
23
23
  <a href="https://commitizen.github.io/cz-cli/">
24
24
  <img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg" alt="Commitizen friendly" />
25
25
  </a>
@@ -32,7 +32,7 @@
32
32
 
33
33
  ## `@pluv/client`
34
34
 
35
- > Framework agnostic frontend client for [@pluv/io](https://img.shields.io/npm/v/@pluv/io)
35
+ > Framework agnostic frontend client for [@pluv/io](https://www.npmjs.com/package/@pluv/io)
36
36
 
37
37
  ## Installation
38
38
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { InferYjsSharedTypeJson, array, map, text, unstable__object } from '@pluv/crdt-yjs';
1
+ import { InferYjsSharedTypeJson, array, map, object, text } from '@pluv/crdt-yjs';
2
2
  export { InferYjsSharedTypeJson } from '@pluv/crdt-yjs';
3
3
  import * as _pluv_types from '@pluv/types';
4
4
  import { IOLike, InferIOOutput, Id, IOEventMessage, JsonObject, InferIOAuthorizeUser, InferIOAuthorize, InferIOInput, InputZodLike, InferIOAuthorizeRequired } from '@pluv/types';
@@ -230,14 +230,14 @@ declare class MockedRoom<TIO extends IOLike, TPresence extends JsonObject = {},
230
230
 
231
231
  declare const y_array: typeof array;
232
232
  declare const y_map: typeof map;
233
+ declare const y_object: typeof object;
233
234
  declare const y_text: typeof text;
234
- declare const y_unstable__object: typeof unstable__object;
235
235
  declare namespace y {
236
236
  export {
237
237
  y_array as array,
238
238
  y_map as map,
239
+ y_object as object,
239
240
  y_text as text,
240
- y_unstable__object as unstable__object,
241
241
  };
242
242
  }
243
243
 
package/dist/index.js CHANGED
@@ -779,6 +779,13 @@ var PluvRoom = class extends AbstractRoom {
779
779
  return oldState;
780
780
  });
781
781
  }
782
+ /**
783
+ * TODO
784
+ * @description Determine if ws was closed with a code for closing without retries.
785
+ * Otherwise, attempt to retry again with incremental backoff
786
+ * @author leedavidcs
787
+ * @date August 19, 2022
788
+ */
782
789
  _onClose(event) {
783
790
  this._logDebug("WebSocket closed");
784
791
  !!event.reason && this._logDebug(event.reason);
@@ -790,6 +797,12 @@ var PluvRoom = class extends AbstractRoom {
790
797
  return oldState;
791
798
  });
792
799
  }
800
+ /**
801
+ * TODO
802
+ * @description Handle websocket errors in a meaningful way, should they occur
803
+ * @author leedavidcs
804
+ * @date August 19, 2022
805
+ */
793
806
  _onError() {
794
807
  }
795
808
  _onMessage(event) {
@@ -1100,12 +1113,6 @@ var MockedRoom = class extends AbstractRoom {
1100
1113
  const origin = _origin != null ? _origin : null;
1101
1114
  if (!this._crdtManager)
1102
1115
  return;
1103
- if (!this._state.webSocket)
1104
- return;
1105
- if (!this._state.connection.id)
1106
- return;
1107
- if (this._state.webSocket.readyState !== WebSocket.OPEN)
1108
- return;
1109
1116
  if (origin === "$STORAGE_UPDATED")
1110
1117
  return;
1111
1118
  const sharedTypes = this._crdtManager.doc.getSharedTypes();
@@ -1129,8 +1136,8 @@ var y_exports = {};
1129
1136
  __export(y_exports, {
1130
1137
  array: () => import_crdt_yjs3.array,
1131
1138
  map: () => import_crdt_yjs3.map,
1132
- text: () => import_crdt_yjs3.text,
1133
- unstable__object: () => import_crdt_yjs3.unstable__object
1139
+ object: () => import_crdt_yjs3.object,
1140
+ text: () => import_crdt_yjs3.text
1134
1141
  });
1135
1142
  var import_crdt_yjs3 = require("@pluv/crdt-yjs");
1136
1143
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.mjs CHANGED
@@ -754,6 +754,13 @@ var PluvRoom = class extends AbstractRoom {
754
754
  return oldState;
755
755
  });
756
756
  }
757
+ /**
758
+ * TODO
759
+ * @description Determine if ws was closed with a code for closing without retries.
760
+ * Otherwise, attempt to retry again with incremental backoff
761
+ * @author leedavidcs
762
+ * @date August 19, 2022
763
+ */
757
764
  _onClose(event) {
758
765
  this._logDebug("WebSocket closed");
759
766
  !!event.reason && this._logDebug(event.reason);
@@ -765,6 +772,12 @@ var PluvRoom = class extends AbstractRoom {
765
772
  return oldState;
766
773
  });
767
774
  }
775
+ /**
776
+ * TODO
777
+ * @description Handle websocket errors in a meaningful way, should they occur
778
+ * @author leedavidcs
779
+ * @date August 19, 2022
780
+ */
768
781
  _onError() {
769
782
  }
770
783
  _onMessage(event) {
@@ -1075,12 +1088,6 @@ var MockedRoom = class extends AbstractRoom {
1075
1088
  const origin = _origin != null ? _origin : null;
1076
1089
  if (!this._crdtManager)
1077
1090
  return;
1078
- if (!this._state.webSocket)
1079
- return;
1080
- if (!this._state.connection.id)
1081
- return;
1082
- if (this._state.webSocket.readyState !== WebSocket.OPEN)
1083
- return;
1084
1091
  if (origin === "$STORAGE_UPDATED")
1085
1092
  return;
1086
1093
  const sharedTypes = this._crdtManager.doc.getSharedTypes();
@@ -1104,10 +1111,10 @@ var y_exports = {};
1104
1111
  __export(y_exports, {
1105
1112
  array: () => array,
1106
1113
  map: () => map,
1107
- text: () => text,
1108
- unstable__object: () => unstable__object
1114
+ object: () => object,
1115
+ text: () => text
1109
1116
  });
1110
- import { array, map, text, unstable__object } from "@pluv/crdt-yjs";
1117
+ import { array, map, text, object } from "@pluv/crdt-yjs";
1111
1118
  export {
1112
1119
  AbstractRoom,
1113
1120
  ConnectionState,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/client",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "@pluv/io frontend client",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -17,19 +17,19 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "wonka": "^6.1.2",
21
- "@pluv/crdt-yjs": "^0.2.0",
22
- "@pluv/types": "^0.1.2"
20
+ "wonka": "^6.2.4",
21
+ "@pluv/crdt-yjs": "^0.3.1",
22
+ "@pluv/types": "^0.1.3"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "yjs": "^13.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "tsup": "^6.5.0",
29
- "typescript": "^4.9.4",
30
- "yjs": "^13.5.44",
31
- "@pluv/tsconfig": "^0.1.2",
32
- "eslint-config-pluv": "^0.1.3"
28
+ "tsup": "^6.6.3",
29
+ "typescript": "^4.9.5",
30
+ "yjs": "^13.5.50",
31
+ "@pluv/tsconfig": "^0.1.3",
32
+ "eslint-config-pluv": "^0.1.5"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "tsup src/index.ts --format esm,cjs --dts",
package/src/MockedRoom.ts CHANGED
@@ -187,10 +187,6 @@ export class MockedRoom<
187
187
  const origin = _origin ?? null;
188
188
 
189
189
  if (!this._crdtManager) return;
190
- if (!this._state.webSocket) return;
191
- if (!this._state.connection.id) return;
192
- if (this._state.webSocket.readyState !== WebSocket.OPEN) return;
193
-
194
190
  if (origin === "$STORAGE_UPDATED") return;
195
191
 
196
192
  const sharedTypes = this._crdtManager.doc.getSharedTypes();
package/src/y.ts CHANGED
@@ -1 +1 @@
1
- export { array, map, text, unstable__object } from "@pluv/crdt-yjs";
1
+ export { array, map, text, object } from "@pluv/crdt-yjs";