jazz-run 0.19.18 → 0.19.20
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/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# jazz-run
|
|
2
2
|
|
|
3
|
+
## 0.19.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [171e1c6]
|
|
8
|
+
- Updated dependencies [053a283]
|
|
9
|
+
- Updated dependencies [41b2cf4]
|
|
10
|
+
- Updated dependencies [923bc8e]
|
|
11
|
+
- Updated dependencies [83f84ca]
|
|
12
|
+
- jazz-tools@0.19.19
|
|
13
|
+
- cojson@0.19.19
|
|
14
|
+
- jazz-webhook@0.19.19
|
|
15
|
+
- cojson-storage-sqlite@0.19.19
|
|
16
|
+
- cojson-transport-ws@0.19.19
|
|
17
|
+
|
|
3
18
|
## 0.19.18
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { CryptoProvider } from "cojson";
|
|
1
2
|
import { type SyncServer } from "./types.js";
|
|
2
|
-
export declare const startSyncServer: ({ host, port, inMemory, db, }: {
|
|
3
|
+
export declare const startSyncServer: ({ host, port, inMemory, db, crypto, }: {
|
|
3
4
|
host: string | undefined;
|
|
4
5
|
port: string | undefined;
|
|
5
6
|
inMemory: boolean;
|
|
6
7
|
db: string;
|
|
8
|
+
crypto?: CryptoProvider;
|
|
7
9
|
}) => Promise<SyncServer>;
|
|
8
10
|
//# sourceMappingURL=startSyncServer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startSyncServer.d.ts","sourceRoot":"","sources":["../src/startSyncServer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"startSyncServer.d.ts","sourceRoot":"","sources":["../src/startSyncServer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAa,MAAM,QAAQ,CAAC;AAKnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,eAAe,0CAMzB;IACD,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,KAAG,OAAO,CAAC,UAAU,CAkGrB,CAAC"}
|
package/dist/startSyncServer.js
CHANGED
|
@@ -6,8 +6,8 @@ import { getBetterSqliteStorage } from "cojson-storage-sqlite";
|
|
|
6
6
|
import { createWebSocketPeer } from "cojson-transport-ws";
|
|
7
7
|
import { WasmCrypto } from "cojson/crypto/WasmCrypto";
|
|
8
8
|
import { WebSocketServer } from "ws";
|
|
9
|
-
export const startSyncServer = async ({ host, port, inMemory, db, }) => {
|
|
10
|
-
|
|
9
|
+
export const startSyncServer = async ({ host, port, inMemory, db, crypto, }) => {
|
|
10
|
+
crypto ?? (crypto = await WasmCrypto.create());
|
|
11
11
|
const server = createServer((req, res) => {
|
|
12
12
|
if (req.url === "/health") {
|
|
13
13
|
res.writeHead(200);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startSyncServer.js","sourceRoot":"","sources":["../src/startSyncServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"startSyncServer.js","sourceRoot":"","sources":["../src/startSyncServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;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GED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"bin": "./dist/index.js",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.19.
|
|
6
|
+
"version": "0.19.20",
|
|
7
7
|
"exports": {
|
|
8
8
|
"./startSyncServer": {
|
|
9
9
|
"types": "./dist/startSyncServer.d.ts",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"@effect/printer-ansi": "^0.34.5",
|
|
22
22
|
"@effect/schema": "^0.71.1",
|
|
23
23
|
"@effect/typeclass": "^0.25.5",
|
|
24
|
-
"cojson": "0.19.
|
|
25
|
-
"cojson-storage-sqlite": "0.19.
|
|
26
|
-
"cojson-transport-ws": "0.19.
|
|
24
|
+
"cojson": "0.19.20",
|
|
25
|
+
"cojson-storage-sqlite": "0.19.20",
|
|
26
|
+
"cojson-transport-ws": "0.19.20",
|
|
27
27
|
"effect": "^3.6.5",
|
|
28
|
-
"jazz-tools": "0.19.
|
|
29
|
-
"jazz-webhook": "0.19.
|
|
28
|
+
"jazz-tools": "0.19.20",
|
|
29
|
+
"jazz-webhook": "0.19.20",
|
|
30
30
|
"ws": "^8.14.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
package/src/startSyncServer.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createServer } from "node:http";
|
|
2
2
|
import { mkdir } from "node:fs/promises";
|
|
3
3
|
import { dirname } from "node:path";
|
|
4
|
-
import { LocalNode } from "cojson";
|
|
4
|
+
import { CryptoProvider, LocalNode } from "cojson";
|
|
5
5
|
import { getBetterSqliteStorage } from "cojson-storage-sqlite";
|
|
6
6
|
import { createWebSocketPeer } from "cojson-transport-ws";
|
|
7
7
|
import { WasmCrypto } from "cojson/crypto/WasmCrypto";
|
|
@@ -13,13 +13,15 @@ export const startSyncServer = async ({
|
|
|
13
13
|
port,
|
|
14
14
|
inMemory,
|
|
15
15
|
db,
|
|
16
|
+
crypto,
|
|
16
17
|
}: {
|
|
17
18
|
host: string | undefined;
|
|
18
19
|
port: string | undefined;
|
|
19
20
|
inMemory: boolean;
|
|
20
21
|
db: string;
|
|
22
|
+
crypto?: CryptoProvider;
|
|
21
23
|
}): Promise<SyncServer> => {
|
|
22
|
-
|
|
24
|
+
crypto ??= await WasmCrypto.create();
|
|
23
25
|
|
|
24
26
|
const server = createServer((req, res) => {
|
|
25
27
|
if (req.url === "/health") {
|