@kerebron/extension-server-hono 0.3.1 → 0.3.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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ## Playground Demo
10
10
 
11
- [playground](https://editor-test.gitgis.com) - be nice.
11
+ [playground](https://demo.kerebron.com) - be nice.
12
12
 
13
13
  ## Overview
14
14
 
@@ -31,9 +31,13 @@ number of output npm modules.
31
31
  To start example server:
32
32
 
33
33
  ```
34
- deno task -f example-server-hono start
34
+ deno task -f server-deno-hono start
35
35
  ```
36
36
 
37
+ ## Examples
38
+
39
+ TODO
40
+
37
41
  ## Build
38
42
 
39
43
  ### Build static examples
@@ -26,13 +26,13 @@ export const getYDoc = (docname, gc = true) => {
26
26
  if (docs.has(docname)) {
27
27
  return docs.get(docname);
28
28
  }
29
- const doc = new Y.Doc({ gc: gcEnabled });
30
- doc.gc = gc;
29
+ const ydoc = new Y.Doc({ gc: gcEnabled });
30
+ ydoc.gc = gc;
31
31
  // if (persistence !== null) {
32
32
  // persistence.bindState(docname, doc)
33
33
  // }
34
- docs.set(docname, doc);
35
- return doc;
34
+ docs.set(docname, ydoc);
35
+ return ydoc;
36
36
  };
37
37
  export class SocketContext {
38
38
  constructor(room, socket) {
@@ -166,7 +166,7 @@ export class HonoYjsMemAdapter {
166
166
  // this.#forceReady();
167
167
  },
168
168
  onError: (error, wsContext) => {
169
- console.error('onError', error);
169
+ console.warn(new Error('HonoYjsMemAdapter.onError', { cause: error }));
170
170
  },
171
171
  onMessage: (message, wsContext) => {
172
172
  if (!wsContext.raw) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kerebron/extension-server-hono",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "license": "MIT",
5
5
  "module": "./esm/mod.js",
6
6
  "exports": {