jazz-run 0.8.5 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
1
 
2
- > jazz-run@0.8.4 build /Users/anselm/jazz/jazz/packages/jazz-run
2
+ > jazz-run@0.8.5 build /Users/anselm/jazz/jazz/packages/jazz-run
3
3
  > npm run lint && rm -rf ./dist && tsc --sourceMap --outDir dist
4
4
 
5
5
 
6
- > jazz-run@0.8.4 lint
6
+ > jazz-run@0.8.5 lint
7
7
  > eslint . --ext ts,tsx
8
8
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # jazz-run
2
2
 
3
+ ## 0.8.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e82cf3d]
8
+ - cojson-transport-ws@0.8.7
9
+
10
+ ## 0.8.6
11
+
12
+ ### Patch Changes
13
+
14
+ - 5542fdb: Added batching to the WebSocket messsages
15
+ - Updated dependencies [5542fdb]
16
+ - cojson-transport-ws@0.8.6
17
+
3
18
  ## 0.8.5
4
19
 
5
20
  ### Patch Changes
package/dist/startSync.js CHANGED
@@ -57,11 +57,12 @@ export const startSync = Command.make("sync", { port, inMemory, db }, ({ port, i
57
57
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
58
  websocket: ws, // TODO: fix types
59
59
  expectPings: false,
60
+ batchingByDefault: false
60
61
  }));
61
62
  ws.on("error", (e) => console.error(`Error on connection ${clientId}:`, e));
62
63
  });
63
64
  server.on("upgrade", function upgrade(req, socket, head) {
64
- if (req.url === "/") {
65
+ if (req.url !== "/health") {
65
66
  wss.handleUpgrade(req, socket, head, function done(ws) {
66
67
  wss.emit("connection", ws, req);
67
68
  });
@@ -1 +1 @@
1
- {"version":3,"file":"startSync.js","sourceRoot":"","sources":["../src/startSync.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAA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I,EAAE,CAAC,WAAW,EAAE,CAAC;YAEhE,SAAS,CAAC,WAAW,CAAC,OAAO,CACzB,mBAAmB,CAAC;gBAChB,EAAE,EAAE,QAAQ;gBACZ,IAAI,EAAE,QAAQ;gBACd,8DAA8D;gBAC9D,SAAS,EAAE,EAAS,EAAE,kBAAkB;gBACxC,WAAW,EAAE,KAAK;gBAClB,iBAAiB,EAAE,KAAK;aAC3B,CAAC,CACL,CAAC;YAEF,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CACjB,OAAO,CAAC,KAAK,CAAC,uBAAuB,QAAQ,GAAG,EAAE,CAAC,CAAC,CACvD,CAAC;QACN,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI;YACnD,IAAI,GAAG,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;gBACxB,GAAG,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,IAAI,CAAC,EAAE;oBACjD,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAE9B,qBAAqB;QACrB,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC,CACJ,CAAC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "bin": "./dist/index.js",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
- "version": "0.8.5",
6
+ "version": "0.8.7",
7
7
  "dependencies": {
8
8
  "@effect/cli": "^0.41.2",
9
9
  "@effect/platform-node": "^0.57.2",
@@ -13,7 +13,7 @@
13
13
  "@effect/typeclass": "^0.25.5",
14
14
  "cojson": "0.8.5",
15
15
  "cojson-storage-sqlite": "0.8.5",
16
- "cojson-transport-ws": "0.8.5",
16
+ "cojson-transport-ws": "0.8.7",
17
17
  "effect": "^3.6.5",
18
18
  "jazz-tools": "0.8.5",
19
19
  "ws": "^8.14.2"
package/src/startSync.ts CHANGED
@@ -99,6 +99,7 @@ export const startSync = Command.make(
99
99
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
100
100
  websocket: ws as any, // TODO: fix types
101
101
  expectPings: false,
102
+ batchingByDefault: false
102
103
  }),
103
104
  );
104
105
 
@@ -108,7 +109,7 @@ export const startSync = Command.make(
108
109
  });
109
110
 
110
111
  server.on("upgrade", function upgrade(req, socket, head) {
111
- if (req.url === "/") {
112
+ if (req.url !== "/health") {
112
113
  wss.handleUpgrade(req, socket, head, function done(ws) {
113
114
  wss.emit("connection", ws, req);
114
115
  });