diff --git a/README.md b/README.md index 0d994c6..4324c69 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ OWD Sync is the companion Obsidian plugin for vault you explicitly opened to an owner-controlled OWD deployment for sync, search, encrypted snapshots, and recovery. -> **Invited family test:** OWD Sync `0.1.3` is available through BRAT while its +> **Invited family test:** OWD Sync `0.1.4` is available through BRAT while its > Obsidian Community Plugins review is pending. The invited tester first > deploys the private OWD Platform fork from its > [trusted-tester start page](https://github.com/msinclair25/owd-platform/blob/main/docs/TRUSTED-TESTER-START.md). @@ -18,7 +18,7 @@ search, encrypted snapshots, and recovery. [BRAT](https://github.com/TfTHacker/obsidian42-brat) from Obsidian's Community Plugins. 4. Use the dashboard action to add `msinclair25/owd-sync`, then confirm - Obsidian shows version `0.1.3`. Stop if it differs. + Obsidian shows version `0.1.4`. Stop if it differs. 5. Enable **OWD Sync** under **Settings → Community plugins**. BRAT installs and updates the published GitHub Release. No terminal or hidden @@ -45,7 +45,7 @@ request, run **OWD Sync: Pair this vault with OWD**, and paste it. ## Diagnostic package Download `owd-sync-.zip` and `checksums.txt` from the matching -[OWD Sync 0.1.3 GitHub Release](https://github.com/msinclair25/owd-sync/releases/tag/0.1.3). +[OWD Sync 0.1.4 GitHub Release](https://github.com/msinclair25/owd-sync/releases/tag/0.1.4). Verify the checksum, then install the complete `owd-sync` directory as one version-matched unit. Do not mix `main.js`, `manifest.json`, or `styles.css` from different releases. If BRAT is blocked, stop the acceptance run. The ZIP diff --git a/SOURCE.md b/SOURCE.md index 95f9b75..a8ec54b 100644 --- a/SOURCE.md +++ b/SOURCE.md @@ -4,11 +4,11 @@ OWD Sync is developed in the private OWD Platform monorepo and promoted to this sanitized public plugin repository while the complete platform remains in private beta. -The current `0.1.3` public source and assets correspond to: +The current `0.1.4` public source and assets correspond to: -- OWD Platform plugin tag: `owd-sync-v0.1.3` -- source commit: `b7595f24504988775976754c0b860e863a8e65c3` -- public release tag: `0.1.3` +- OWD Platform plugin tag: `owd-sync-v0.1.4` +- source commit: `5406b5880613c716f5b398353da546160d483d59` +- public release tag: `0.1.4` - plugin ID: `owd-sync` The public release uses a tag exactly equal to `manifest.json`'s semantic diff --git a/manifest.json b/manifest.json index fc9782a..6046907 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "owd-sync", "name": "OWD Sync", - "version": "0.1.3", + "version": "0.1.4", "minAppVersion": "1.5.0", "description": "Private, self-hosted Obsidian sync through your OWD Cloudflare deployment.", "author": "OWD Platform contributors", diff --git a/package.json b/package.json index cfb85d7..c410dd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "owd-sync", - "version": "0.1.3", + "version": "0.1.4", "private": true, "description": "The OWD Sync companion plugin for Obsidian.", "license": "Apache-2.0 AND 0BSD", diff --git a/scripts/guard-production-bundles.mjs b/scripts/guard-production-bundles.mjs index 661aabd..2d954af 100644 --- a/scripts/guard-production-bundles.mjs +++ b/scripts/guard-production-bundles.mjs @@ -240,16 +240,25 @@ function checkOwdProtocolRegistration() { const exactRegistration = source.includes( 'registerObsidianProtocolHandler("owd-pair"', ); + const registrationIndex = source.indexOf( + 'registerObsidianProtocolHandler("owd-pair"', + ); + const upstreamLoadIndex = source.indexOf("super.onload()"); - if (registrations.length !== 1 || !exactRegistration) { + if ( + registrations.length !== 1 || + !exactRegistration || + upstreamLoadIndex === -1 || + registrationIndex > upstreamLoadIndex + ) { console.error( - "FAIL [OWD protocol]: production must register exactly one owd-pair handler.", + "FAIL [OWD protocol]: production must register exactly one owd-pair handler before upstream startup.", ); return 1; } console.log( - "PASS [OWD protocol]: exactly one explicit owd-pair handler is registered.", + "PASS [OWD protocol]: exactly one explicit owd-pair handler is registered before upstream startup.", ); return 0; } diff --git a/src/main.ts b/src/main.ts index bae5fb0..10a8e1b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,9 +10,9 @@ import { import { confirmOwdPairing, promptForOwdPairingLink } from "./pairing-modal"; export default class OwdSyncPlugin extends VaultCrdtSyncPlugin { - override async onload(): Promise { - await super.onload(); + private upstreamLoad: Promise = Promise.resolve(); + override async onload(): Promise { this.addCommand({ id: "pair-this-vault", name: "Pair this vault with OWD", @@ -22,6 +22,9 @@ export default class OwdSyncPlugin extends VaultCrdtSyncPlugin { this.registerObsidianProtocolHandler("owd-pair", (params) => { void this.handleOwdPairing(() => parseObsidianPairingProtocol(params)); }); + + this.upstreamLoad = super.onload(); + await this.upstreamLoad; } override startOwdPairing(): void { @@ -35,6 +38,7 @@ export default class OwdSyncPlugin extends VaultCrdtSyncPlugin { readPairing: () => ReturnType, ): Promise { try { + await this.upstreamLoad; const outcome = await pairOwdVault( readPairing(), this.app.vault.getName(), diff --git a/versions.json b/versions.json index 7980820..a499de0 100644 --- a/versions.json +++ b/versions.json @@ -2,5 +2,6 @@ "0.1.0": "1.5.0", "0.1.1": "1.5.0", "0.1.2": "1.5.0", - "0.1.3": "1.5.0" + "0.1.3": "1.5.0", + "0.1.4": "1.5.0" }