@inkandswitch/patchwork-bootloader 0.6.1 → 0.6.3
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/CHANGELOG.md +23 -0
- package/dist/automerge-worker.js +7 -5
- package/package.json +16 -16
- package/src/automerge-worker.ts +9 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @inkandswitch/patchwork-bootloader
|
|
2
2
|
|
|
3
|
+
## 0.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ebca53b: Move the automerge-repo subduction fork to 2.6.0-subduction.48, `@automerge/automerge-repo-keyhive` to 0.5.0-alpha.7, and `@keyhive/keyhive` to 0.1.0-alpha.8. These three are bumped together because the keyhive package pins its automerge-repo version exactly.
|
|
8
|
+
|
|
9
|
+
keyhive 0.5 renames the two hive flavours. The network-adapter hive is now `LegacyAutomergeRepoKeyhive`, built by `initializeLegacyAutomergeRepoKeyhive`; the subduction hive keeps the name `AutomergeRepoKeyhive` and is built by `initializeAutomergeRepoKeyhive`. Both extend `AutomergeRepoKeyhiveBase`, which is what Patchwork's `hive` fields are typed as, so a tool that only reads membership works against either.
|
|
10
|
+
|
|
11
|
+
`createKeyhiveNetworkAdapter` takes an options object instead of positional arguments, and `onlyShareWithHardcodedServerPeerId` is now `onlyShareWithSyncServer`.
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [ebca53b]
|
|
14
|
+
- Updated dependencies [882eacd]
|
|
15
|
+
- @inkandswitch/patchwork-elements@6.0.2
|
|
16
|
+
- @inkandswitch/patchwork-filesystem@0.2.8
|
|
17
|
+
- @inkandswitch/patchwork-plugins@1.2.3
|
|
18
|
+
- @inkandswitch/patchwork-providers@0.5.2
|
|
19
|
+
|
|
20
|
+
## 0.6.2
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- f37bb8e: Bump `@automerge/automerge-subduction` to 0.16.1.
|
|
25
|
+
|
|
3
26
|
## 0.6.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/automerge-worker.js
CHANGED
|
@@ -17,7 +17,7 @@ import { resolvePath } from "@inkandswitch/patchwork-filesystem";
|
|
|
17
17
|
import { IndexedDBWorkerStorageAdapter } from "@automerge/automerge-repo-storage-indexeddb/IndexedDBWorkerStorageAdapter";
|
|
18
18
|
import { MessageChannelNetworkAdapter } from "@automerge/automerge-repo-network-messagechannel";
|
|
19
19
|
import { WebSocketWorkerClientAdapter } from "@automerge/automerge-repo-network-websocket";
|
|
20
|
-
import {
|
|
20
|
+
import { initializeAutomergeRepoKeyhive, initKeyhiveWasm, } from "@automerge/automerge-repo-keyhive";
|
|
21
21
|
import { DEFAULT_CLASSIC_SYNC_SERVER } from "./sync-config.js";
|
|
22
22
|
import { keyhiveStorageName, storagePrefix } from "./storage.js";
|
|
23
23
|
import { HANDOFF_CHANNEL, SYNCSTATE_CHANNEL, } from "./types.js";
|
|
@@ -206,7 +206,7 @@ async function buildPlainRepo() {
|
|
|
206
206
|
}
|
|
207
207
|
async function buildKeyhiveRepo(keyhiveSyncServer) {
|
|
208
208
|
initKeyhiveWasm();
|
|
209
|
-
const { hive, repo } = await
|
|
209
|
+
const { hive, repo } = await initializeAutomergeRepoKeyhive({
|
|
210
210
|
createRepo: (config) => new Repo(config),
|
|
211
211
|
storage: new IndexedDBWorkerStorageAdapter(keyhiveStorageName),
|
|
212
212
|
peerIdSuffix: `${storagePrefix}-worker` + Math.random().toString(36).slice(2),
|
|
@@ -536,9 +536,11 @@ async function connectPort(port, connection) {
|
|
|
536
536
|
connection.channels.add({ adapter: mcAdapter, mcAdapter, port });
|
|
537
537
|
return;
|
|
538
538
|
}
|
|
539
|
-
const
|
|
540
|
-
|
|
541
|
-
|
|
539
|
+
const adapter = hive.createKeyhiveNetworkAdapter(mcAdapter, {
|
|
540
|
+
onlyShareWithSyncServer: false,
|
|
541
|
+
periodicallyRequestSync: false,
|
|
542
|
+
syncRequestInterval: 2000,
|
|
543
|
+
});
|
|
542
544
|
adapter.on("message", (msg) => {
|
|
543
545
|
if (msg.type !== "sync" && msg.type !== "request")
|
|
544
546
|
return;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "git+https://github.com/inkandswitch/patchwork-system.git",
|
|
6
6
|
"directory": "core/bootloader"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.6.
|
|
8
|
+
"version": "0.6.3",
|
|
9
9
|
"author": "chee",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"license": "MIT",
|
|
@@ -54,34 +54,34 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@automerge/automerge": "3.3.2",
|
|
57
|
-
"@automerge/automerge-repo": "2.6.0-subduction.
|
|
58
|
-
"@automerge/automerge-repo-keyhive": "0.
|
|
59
|
-
"@automerge/automerge-repo-network-messagechannel": "2.6.0-subduction.
|
|
60
|
-
"@automerge/automerge-repo-network-websocket": "2.6.0-subduction.
|
|
61
|
-
"@automerge/automerge-repo-storage-indexeddb": "2.6.0-subduction.
|
|
62
|
-
"@automerge/automerge-subduction": "0.16.
|
|
63
|
-
"@automerge/vanillajs": "2.6.0-subduction.
|
|
57
|
+
"@automerge/automerge-repo": "2.6.0-subduction.48",
|
|
58
|
+
"@automerge/automerge-repo-keyhive": "0.5.0-alpha.7",
|
|
59
|
+
"@automerge/automerge-repo-network-messagechannel": "2.6.0-subduction.48",
|
|
60
|
+
"@automerge/automerge-repo-network-websocket": "2.6.0-subduction.48",
|
|
61
|
+
"@automerge/automerge-repo-storage-indexeddb": "2.6.0-subduction.48",
|
|
62
|
+
"@automerge/automerge-subduction": "0.16.1",
|
|
63
|
+
"@automerge/vanillajs": "2.6.0-subduction.48",
|
|
64
64
|
"@codemirror/commands": "^6.10.4",
|
|
65
65
|
"@codemirror/language": "^6.12.4",
|
|
66
66
|
"@codemirror/state": "^6.7.1",
|
|
67
67
|
"@codemirror/view": "^6.43.6",
|
|
68
|
-
"@keyhive/keyhive": "0.1.0-alpha.
|
|
68
|
+
"@keyhive/keyhive": "0.1.0-alpha.8",
|
|
69
69
|
"@types/debug": "^4.1.13",
|
|
70
70
|
"debug": "^4.4.3",
|
|
71
71
|
"resolve.exports": "^2.0.3",
|
|
72
72
|
"service-worker-types": "npm:@types/serviceworker@^0.0.153",
|
|
73
73
|
"solid-js": "^1.9.13",
|
|
74
74
|
"tinyargs": "^0.1.4",
|
|
75
|
-
"@inkandswitch/patchwork-elements": "^6.0.
|
|
76
|
-
"@inkandswitch/patchwork-filesystem": "^0.2.
|
|
77
|
-
"@inkandswitch/patchwork-plugins": "^1.2.
|
|
78
|
-
"@inkandswitch/patchwork-providers": "^0.5.
|
|
75
|
+
"@inkandswitch/patchwork-elements": "^6.0.2",
|
|
76
|
+
"@inkandswitch/patchwork-filesystem": "^0.2.8",
|
|
77
|
+
"@inkandswitch/patchwork-plugins": "^1.2.3",
|
|
78
|
+
"@inkandswitch/patchwork-providers": "^0.5.2"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@automerge/automerge": "3.3.2",
|
|
82
|
-
"@automerge/automerge-repo": "2.6.0-subduction.
|
|
83
|
-
"@automerge/automerge-repo-keyhive": "0.
|
|
84
|
-
"@automerge/vanillajs": "2.6.0-subduction.
|
|
82
|
+
"@automerge/automerge-repo": "2.6.0-subduction.48",
|
|
83
|
+
"@automerge/automerge-repo-keyhive": "0.5.0-alpha.7",
|
|
84
|
+
"@automerge/vanillajs": "2.6.0-subduction.48"
|
|
85
85
|
},
|
|
86
86
|
"peerDependenciesMeta": {
|
|
87
87
|
"@automerge/automerge": {
|
package/src/automerge-worker.ts
CHANGED
|
@@ -31,9 +31,9 @@ import { IndexedDBWorkerStorageAdapter } from "@automerge/automerge-repo-storage
|
|
|
31
31
|
import { MessageChannelNetworkAdapter } from "@automerge/automerge-repo-network-messagechannel";
|
|
32
32
|
import { WebSocketWorkerClientAdapter } from "@automerge/automerge-repo-network-websocket";
|
|
33
33
|
import {
|
|
34
|
-
|
|
34
|
+
initializeAutomergeRepoKeyhive,
|
|
35
35
|
initKeyhiveWasm,
|
|
36
|
-
type
|
|
36
|
+
type AutomergeRepoKeyhive,
|
|
37
37
|
type SyncServerSelection,
|
|
38
38
|
} from "@automerge/automerge-repo-keyhive";
|
|
39
39
|
|
|
@@ -206,7 +206,7 @@ function getSubductionEndpoints(): WorkerWebSocketEndpoint[] {
|
|
|
206
206
|
]);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
type RepoHive = { repo: Repo; hive?:
|
|
209
|
+
type RepoHive = { repo: Repo; hive?: AutomergeRepoKeyhive };
|
|
210
210
|
type BuiltRepo = RepoHive & { identity?: Identity };
|
|
211
211
|
|
|
212
212
|
let repoHivePromise: Promise<RepoHive> | null = null;
|
|
@@ -282,7 +282,7 @@ async function buildKeyhiveRepo(
|
|
|
282
282
|
keyhiveSyncServer: SyncServerSelection
|
|
283
283
|
): Promise<BuiltRepo> {
|
|
284
284
|
initKeyhiveWasm();
|
|
285
|
-
const { hive, repo } = await
|
|
285
|
+
const { hive, repo } = await initializeAutomergeRepoKeyhive({
|
|
286
286
|
createRepo: (config) => new Repo(config),
|
|
287
287
|
storage: new IndexedDBWorkerStorageAdapter(keyhiveStorageName),
|
|
288
288
|
peerIdSuffix:
|
|
@@ -685,14 +685,11 @@ async function connectPort(port: MessagePort, connection: Connection) {
|
|
|
685
685
|
return;
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
periodicallyRequestKeyhiveSync,
|
|
694
|
-
2000
|
|
695
|
-
);
|
|
688
|
+
const adapter = hive.createKeyhiveNetworkAdapter(mcAdapter, {
|
|
689
|
+
onlyShareWithSyncServer: false,
|
|
690
|
+
periodicallyRequestSync: false,
|
|
691
|
+
syncRequestInterval: 2000,
|
|
692
|
+
});
|
|
696
693
|
|
|
697
694
|
adapter.on("message", (msg: any) => {
|
|
698
695
|
if (msg.type !== "sync" && msg.type !== "request") return;
|