selfstore 1.8.6 → 1.8.8

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,65 +0,0 @@
1
- import { n as Snapshot, E as EncodeOptions, H as Header } from './store-BiQ-BuVl.js';
2
- import { i as DriveAuth } from './drive-CTYvGg_7.js';
3
-
4
- /** Serialize a snapshot to a portable backup blob (compressed; encrypted if a password is given). */
5
- declare function exportSnapshot(snapshot: Snapshot, opts: EncodeOptions): Promise<Blob>;
6
- /** Read a backup blob (or raw bytes) back into a snapshot. */
7
- declare function importSnapshot(input: Blob | Uint8Array, opts?: {
8
- password?: string;
9
- }): Promise<Snapshot>;
10
- /** Peek at a backup's cleartext metadata (app, date, whether it's encrypted) without decrypting. */
11
- declare function inspect(input: Blob | Uint8Array): Promise<Header>;
12
- /** True if the backup needs a password to import. */
13
- declare function isEncrypted(input: Blob | Uint8Array): Promise<boolean>;
14
- /** Re-encrypt under a new password. `from` opens the file, `to` protects the
15
- * result; omit `to` for an unencrypted backup. */
16
- declare function changePassword(input: Blob | Uint8Array, opts: {
17
- from?: string;
18
- to?: string;
19
- readme?: string;
20
- }): Promise<Blob>;
21
-
22
- /**
23
- * A client-only DriveAuth: the Google Identity Services token flow, no backend.
24
- * The access token is cached in sessionStorage so a reload reuses it, and a
25
- * silent re-acquisition is attempted when it lapses; if that fails (the Google
26
- * session expired, or third-party cookies are blocked) the Drive target reports
27
- * needs-attention and the user reconnects in one click. For a connection that
28
- * never re-prompts, back the Drive target with a server that holds a refresh
29
- * token instead (a broker implementing the same DriveAuth interface).
30
- */
31
-
32
- /** Build a client-only DriveAuth for the given OAuth client id (no backend). */
33
- declare function gisDriveAuth(opts: {
34
- clientId: string;
35
- scope?: string;
36
- }): DriveAuth;
37
-
38
- /**
39
- * Save a backup blob to disk via the File System Access API, else a download.
40
- *
41
- * Resolves TRUE when bytes were handed to the browser, FALSE when the user
42
- * closed the save dialog. Callers must branch on it: a host that records "last
43
- * backup: today" after a cancelled dialog tells the user they are safe when no
44
- * file exists, and that lie only surfaces the day they need the file.
45
- *
46
- * Takes a ready blob, so the dialog opens only after the blob was built. When
47
- * that blob is an encrypted backup, prefer asking first: see pickSaveHandle.
48
- */
49
- declare function saveToDisk(blob: Blob, filename: string): Promise<boolean>;
50
- /**
51
- * The same name, stamped to the minute.
52
- *
53
- * Used only on the download path, and the reasoning is worth stating because it
54
- * looks backwards. Through a handle the app rewrites the SAME file, so the name
55
- * must stay stable. A download never replaces anything: the browser appends
56
- * " (1)", " (2)", and no web API can stop it. The pile forms either way - so it
57
- * may as well be readable. A dated series says at a glance which one is the
58
- * latest and lets the user step back to an earlier one; "backup (7).zip" says
59
- * neither when, nor in what order.
60
- */
61
- declare function datedName(filename: string, when?: Date): string;
62
- /** Prompt the user to pick a backup file from disk. Resolves null if cancelled. */
63
- declare function pickFromDisk(): Promise<File | null>;
64
-
65
- export { inspect as a, isEncrypted as b, changePassword as c, datedName as d, exportSnapshot as e, gisDriveAuth as g, importSnapshot as i, pickFromDisk as p, saveToDisk as s };