@vrtmrz/livesync-commonlib 0.1.0-rc.2 → 0.1.0-rc.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/dist/common/configForDoc.js +6 -3
- package/dist/common/messages/combinedMessages.prod.d.ts +9 -0
- package/dist/common/messages/combinedMessages.prod.js +9 -0
- package/dist/common/messages/def.d.ts +3 -0
- package/dist/common/messagesJson/en.json +3 -0
- package/dist/common/models/setting.const.defaults.js +1 -0
- package/dist/common/models/setting.type.d.ts +4 -2
- package/dist/common/settingConstants.js +2 -2
- package/dist/interfaces/Confirm.d.ts +2 -1
- package/dist/replication/LiveSyncAbstractReplicator.d.ts +1 -2
- package/dist/replication/couchdb/LiveSyncReplicator.d.ts +0 -1
- package/dist/replication/couchdb/LiveSyncReplicator.js +0 -3
- package/dist/replication/journal/LiveSyncJournalReplicator.d.ts +0 -1
- package/dist/replication/journal/LiveSyncJournalReplicator.js +0 -3
- package/dist/replication/trystero/LiveSyncTrysteroReplicator.d.ts +1 -2
- package/dist/replication/trystero/LiveSyncTrysteroReplicator.js +1 -4
- package/dist/serviceFeatures/checkRemoteSize.d.ts +5 -3
- package/dist/serviceFeatures/checkRemoteSize.js +51 -11
- package/dist/serviceModules/Rebuilder.d.ts +0 -4
- package/dist/serviceModules/Rebuilder.js +2 -10
- package/dist/services/base/IService.d.ts +1 -5
- package/dist/services/base/ReplicationService.d.ts +1 -1
- package/dist/services/base/ReplicationService.js +5 -15
- package/dist/services/base/SettingService.d.ts +0 -8
- package/dist/services/base/SettingService.js +0 -5
- package/dist/services/implements/headless/HeadlessAPIService.d.ts +2 -2
- package/dist/services/implements/headless/HeadlessAPIService.js +1 -1
- package/dist/worker/bgWorker.js +1 -1
- package/docs/development.md +8 -0
- package/docs/proven-in-use.md +9 -7
- package/docs/releasing.md +3 -1
- package/package.json +1 -1
package/docs/development.md
CHANGED
|
@@ -121,6 +121,14 @@ Resolve these questions before describing the corresponding behaviour as stable:
|
|
|
121
121
|
|
|
122
122
|
The package build records each compatibility path explicitly. Do not add a wildcard export. A new compatibility path requires a real downstream import, a packed-consumer or downstream test, and a migration plan towards a focused public entry or the owning package.
|
|
123
123
|
|
|
124
|
+
After the reviewed Self-hosted LiveSync revision changes, inspect its current compatibility imports with:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npm run update:downstream-import-inventory -- --downstream /path/to/obsidian-livesync
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
The command recognises both the former `@lib/*` source aliases and current `@vrtmrz/livesync-commonlib/compat/*` package imports. It ignores focused package entries. Review the resulting paths and recorded downstream commit before accepting them. Regenerate the export map only for a new package version: do not change the contents represented by an immutable published version.
|
|
131
|
+
|
|
124
132
|
TODO: classify and document compatibility paths whose purpose is still unclear before stabilising the first public release. Remove obsolete paths rather than documenting accidental layout as API.
|
|
125
133
|
|
|
126
134
|
Release preparation and staged-publication checks are documented in [the maintainer runbook](releasing.md).
|
package/docs/proven-in-use.md
CHANGED
|
@@ -8,31 +8,33 @@ The source links below identify the exact reviewed Self-hosted LiveSync revision
|
|
|
8
8
|
|
|
9
9
|
## Obsidian plug-in
|
|
10
10
|
|
|
11
|
-
The plug-in extends the neutral `ServiceContext` with Obsidian-owned capabilities in [`ObsidianServiceContext.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/
|
|
11
|
+
The plug-in extends the neutral `ServiceContext` with Obsidian-owned capabilities in [`ObsidianServiceContext.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/fa336574e6055bbd61557da859fa0c1c44ca7ec9/src/modules/services/ObsidianServiceContext.ts). One context instance carries the host translator and event hub through the Service Hub rather than placing those dependencies in Commonlib globals.
|
|
12
12
|
|
|
13
|
-
The consumer's [service-context contract](https://github.com/vrtmrz/obsidian-livesync/blob/
|
|
13
|
+
The consumer's [service-context contract](https://github.com/vrtmrz/obsidian-livesync/blob/fa336574e6055bbd61557da859fa0c1c44ca7ec9/test/contracts/serviceContext.ts) checks shared result semantics and exact context identity across the composed services. The [real-Obsidian suite](https://github.com/vrtmrz/obsidian-livesync/blob/fa336574e6055bbd61557da859fa0c1c44ca7ec9/test/e2e-obsidian/README.md) then covers plug-in loading, representative Svelte dialogue mounts, Vault reflection, CouchDB and Object Storage synchronisation, two-Vault behaviour, and other Obsidian-owned boundaries.
|
|
14
14
|
|
|
15
15
|
Most replication and storage services used by the plug-in still enter through explicit `compat/*` paths. Those imports prove that the published compatibility boundary supports the current migration; they are not examples of a finished high-level client API.
|
|
16
16
|
|
|
17
17
|
The plug-in's manual onboarding and Remote Databases pane use the focused `/remote-configurations` entry to create opaque profile IDs, retain user-visible names, and select main and P2P remotes. Commonlib owns the in-memory profile result contract; Self-hosted LiveSync adds dialogue, Setup URI classification, Fetch or Rebuild scheduling, persistence, restart ordering, and real-Obsidian presentation checks.
|
|
18
18
|
|
|
19
|
+
Commonlib's confirmation contract can also convey a host-neutral vertical action-layout request for long, safety-sensitive choices. Self-hosted LiveSync maps that request to Fancy Kit at its Obsidian boundary. Focused tests check the mapping, and the consumer's real-Obsidian suite checks the resulting controls and mobile touch targets; Commonlib does not own the rendering or CSS.
|
|
20
|
+
|
|
19
21
|
## CLI
|
|
20
22
|
|
|
21
|
-
The CLI extends the same neutral context with its database path and injected `StandardIo` in [`NodeServiceContext.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/
|
|
23
|
+
The CLI extends the same neutral context with its database path and injected `StandardIo` in [`NodeServiceContext.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/fa336574e6055bbd61557da859fa0c1c44ca7ec9/src/apps/cli/services/NodeServiceContext.ts). Its entry point creates the Node standard-I/O adapter once and passes it to command composition, while unit tests provide stream-independent fakes for parsing, prompts, standard output, and standard error.
|
|
22
24
|
|
|
23
|
-
The CLI filesystem composition receives a configured base directory and constructs the rooted Node storage adapter in [`NodeFileSystemAdapter.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/
|
|
25
|
+
The CLI filesystem composition receives a configured base directory and constructs the rooted Node storage adapter in [`NodeFileSystemAdapter.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/fa336574e6055bbd61557da859fa0c1c44ca7ec9/src/apps/cli/adapters/NodeFileSystemAdapter.ts). Commonlib's shared storage result table checks the focused root contract; the consumer adds its file cache, Vault-shaped operations, case handling, and command policy.
|
|
24
26
|
|
|
25
|
-
The maintained CLI checks include unit tests, Deno-driven CLI E2E, Compose-based compatibility runs, and the [CLI-to-real-Obsidian synchronisation scenario](https://github.com/vrtmrz/obsidian-livesync/blob/
|
|
27
|
+
The maintained CLI checks include unit tests, Deno-driven CLI E2E, Compose-based compatibility runs, and the [CLI-to-real-Obsidian synchronisation scenario](https://github.com/vrtmrz/obsidian-livesync/blob/fa336574e6055bbd61557da859fa0c1c44ca7ec9/test/e2e-obsidian/scripts/cli-to-obsidian-sync.ts). The latter is the strongest current evidence that the CLI and plug-in compose compatible Commonlib behaviour across two hosts.
|
|
26
28
|
|
|
27
29
|
## Webapp
|
|
28
30
|
|
|
29
|
-
The Webapp receives an already authorised `FileSystemDirectoryHandle` from its host and constructs `FileSystemAccessStorageAdapter` inside [`FSAPIFileSystemAdapter.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/
|
|
31
|
+
The Webapp receives an already authorised `FileSystemDirectoryHandle` from its host and constructs `FileSystemAccessStorageAdapter` inside [`FSAPIFileSystemAdapter.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/fa336574e6055bbd61557da859fa0c1c44ca7ec9/src/apps/webapp/adapters/FSAPIFileSystemAdapter.ts). The adapter does not call `showDirectoryPicker()`, choose a directory, or persist the handle. This is the maintained application example for the browser entry's root-ownership rule.
|
|
30
32
|
|
|
31
33
|
The browser and Node storage implementations run through the same Commonlib result contract, and the Webapp adapter has focused unit coverage. The Webapp is also type-checked and built by downstream verification. Its browser E2E has not been kept at the same level as the Obsidian and CLI suites, so the documentation does not treat Webapp integration as equivalent real-runtime evidence.
|
|
32
34
|
|
|
33
35
|
## WebPeer and browser service composition
|
|
34
36
|
|
|
35
|
-
The browser service composition in [`createLiveSyncBrowserServiceHub.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/
|
|
37
|
+
The browser service composition in [`createLiveSyncBrowserServiceHub.ts`](https://github.com/vrtmrz/obsidian-livesync/blob/fa336574e6055bbd61557da859fa0c1c44ca7ec9/src/apps/browser/createLiveSyncBrowserServiceHub.ts) supplies browser-owned API and UI services around a caller-supplied context. WebPeer and the browser applications exercise this compatibility surface through type checks and builds.
|
|
36
38
|
|
|
37
39
|
The Obsidian plug-in, CLI, and Webapp compose P2P ownership through `useP2PReplicatorFeature`. Commands and Obsidian views retain its live result object and resolve the current replicator when an action occurs. WebPeer still enters through the deprecated combined compatibility function, which now delegates the same ownership and lifecycle to the focused feature instead of maintaining a second implementation. Downstream Deno and Compose P2P E2E cover peer discovery and synchronisation; the Webapp and WebPeer UI surfaces themselves remain build- and type-check evidence rather than equivalent real-runtime gates.
|
|
38
40
|
|
package/docs/releasing.md
CHANGED
|
@@ -30,7 +30,9 @@ npm publish --dry-run .package --tag next --access public
|
|
|
30
30
|
|
|
31
31
|
Review `package.json`, `package-lock.json`, the generated manifest, the tarball contents, the test results, and the downstream evidence. Commit only the source manifest and lockfile for the version change; `.package`, `.package-consumer`, and `artifacts` are generated and ignored. Push and open a release pull request only after the usual user checkpoint.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Historical initial npm bootstrap
|
|
34
|
+
|
|
35
|
+
The package and its Trusted Publisher are already configured. This section records the one-time bootstrap which created the package; do not use it for routine releases. Current releases use the staged-publishing workflow below.
|
|
34
36
|
|
|
35
37
|
The npm package must exist before Trusted Publishing can be configured. Bootstrap the first reviewed release candidate once from the exact reviewed commit in the draft release pull request, using an interactive npm session with 2FA:
|
|
36
38
|
|