Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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
Expand All @@ -45,7 +45,7 @@ request, run **OWD Sync: Pair this vault with OWD**, and paste it.
## Diagnostic package

Download `owd-sync-<version>.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
Expand Down
8 changes: 4 additions & 4 deletions SOURCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
15 changes: 12 additions & 3 deletions scripts/guard-production-bundles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 6 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
import { confirmOwdPairing, promptForOwdPairingLink } from "./pairing-modal";

export default class OwdSyncPlugin extends VaultCrdtSyncPlugin {
override async onload(): Promise<void> {
await super.onload();
private upstreamLoad: Promise<void> = Promise.resolve();

override async onload(): Promise<void> {
this.addCommand({
id: "pair-this-vault",
name: "Pair this vault with OWD",
Expand All @@ -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 {
Expand All @@ -35,6 +38,7 @@ export default class OwdSyncPlugin extends VaultCrdtSyncPlugin {
readPairing: () => ReturnType<typeof parseOwdPairingLink>,
): Promise<void> {
try {
await this.upstreamLoad;
const outcome = await pairOwdVault(
readPairing(),
this.app.vault.getName(),
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}