@fkn/lib 0.9.43 → 0.9.44

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.
@@ -1,46 +0,0 @@
1
- //#region src/messages.d.ts
2
- declare const E2E_LOCKED_MESSAGE = "fkn:e2e-locked";
3
- declare const E2E_STALE_EPOCH_MESSAGE = "fkn:e2e-stale-epoch: this file is encrypted under a previous key you reset";
4
- declare const E2E_INTEGRITY_MESSAGE = "fkn:e2e-integrity: stored data failed its integrity check";
5
- /** the row is sealed in a format this version no longer opens (an envelope older than v3); distinct from integrity, since the bytes are intact */
6
- declare const E2E_RETIRED_FORMAT_MESSAGE = "fkn:e2e-retired-format: stored data is in a format this version no longer opens";
7
- /**
8
- * "There is no object at this path", as a thing a caller can TEST rather than parse.
9
- *
10
- * osra's error boxer ships name, message, stack and cause ONLY, so this code survives same-realm
11
- * hops but NOT the SharedWorker boundary; the message fallback in src/lib/storage.ts's rethrow is
12
- * what carries absence across that hop and re-mints the coded error for apps. The message does not
13
- * survive being reworded, which is the problem this exists to end: absence arrives in two
14
- * completely different sentences depending on which half of the read failed, and every consumer
15
- * was left regex-matching both. Ripple got one of them and missed the other, and a library quietly
16
- * went un-backed-up for a day because a missing backup read as a transient error.
17
- */
18
- declare const STORAGE_NOT_FOUND = "FKN_STORAGE_NOT_FOUND";
19
- /**
20
- * "The api never answered", as a thing a caller can TEST, for the same reason as above and one
21
- * more: a caller that relaxes anything when the server cannot be reached must never relax it on
22
- * an ANSWERED error, because an answered 500 lands exactly when a key rotation or a setting flip
23
- * may be propagating. The MESSAGE prefix is the wire contract: osra's error boxer ships name,
24
- * message, stack and cause only, so a custom code does NOT survive the SharedWorker hop (the
25
- * E2E_LOCKED_MESSAGE prefix match exists for exactly this reason). The code is still set for
26
- * same-realm callers, which is the cheaper test when it is available.
27
- */
28
- declare const STORAGE_UNREACHABLE = "FKN_API_UNREACHABLE";
29
- /**
30
- * The account pin's refusals, as message prefixes the broker throws, for the same reason as the e2e
31
- * messages above: osra keeps an Error's message and strips its code across the SharedWorker hop.
32
- *
33
- * `ACCOUNT_CHANGED_MESSAGE`: the api refused a call because the signed-in account is not the one its
34
- * pin was taken under. `ACCOUNT_PIN_INVALID_MESSAGE`: the api could not read the pin at all.
35
- * `ACCOUNT_PIN_UNSUPPORTED_MESSAGE`: some hop (the broker document or its shared worker) is older than
36
- * the pin, so the call was refused rather than sent unpinned. None of the three is a sign-out.
37
- */
38
- declare const ACCOUNT_CHANGED_MESSAGE = "fkn:account-changed";
39
- declare const ACCOUNT_PIN_INVALID_MESSAGE = "fkn:account-pin-invalid";
40
- declare const ACCOUNT_PIN_UNSUPPORTED_MESSAGE = "fkn:account-pin-unsupported";
41
- /** The code of `StorageAccountChangedError`: a call made under one account was refused under another. */
42
- declare const STORAGE_ACCOUNT_CHANGED = "FKN_ACCOUNT_CHANGED";
43
- /** The code of `StorageAccountPinUnsupportedError`: the broker cannot pin calls, so none was sent. */
44
- declare const STORAGE_ACCOUNT_PIN_UNSUPPORTED = "FKN_ACCOUNT_PIN_UNSUPPORTED";
45
- //#endregion
46
- export { E2E_LOCKED_MESSAGE as a, STORAGE_ACCOUNT_CHANGED as c, STORAGE_UNREACHABLE as d, E2E_INTEGRITY_MESSAGE as i, STORAGE_ACCOUNT_PIN_UNSUPPORTED as l, ACCOUNT_PIN_INVALID_MESSAGE as n, E2E_RETIRED_FORMAT_MESSAGE as o, ACCOUNT_PIN_UNSUPPORTED_MESSAGE as r, E2E_STALE_EPOCH_MESSAGE as s, ACCOUNT_CHANGED_MESSAGE as t, STORAGE_NOT_FOUND as u };