selfstore 1.8.18 → 1.8.20
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/advanced.d.ts +7 -7
- package/dist/advanced.js +2 -2
- package/dist/backups.d.ts +4 -4
- package/dist/{chunk-RBIQRTZR.js → chunk-ULPGGZ6L.js} +23 -7
- package/dist/chunk-ULPGGZ6L.js.map +1 -0
- package/dist/{connect-BTVzRJY8.d.ts → connect-GY1R9c6Q.d.ts} +3 -3
- package/dist/{drive-CY_Vsj7V.d.ts → drive-BLRsK32w.d.ts} +1 -1
- package/dist/flows.d.ts +5 -5
- package/dist/households.d.ts +1 -1
- package/dist/index.d.ts +23 -9
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/{local-Dh6eGiK9.d.ts → local-DrziuI_t.d.ts} +2 -2
- package/dist/{manager-DhoIbJyg.d.ts → manager-BlSs6Q5S.d.ts} +1 -1
- package/dist/passkey.d.ts +86 -0
- package/dist/passkey.js +152 -0
- package/dist/passkey.js.map +1 -0
- package/dist/{s3-0qqIyphl.d.ts → s3-BLgf6hqR.d.ts} +1 -1
- package/dist/{store-Cs6QIzzG.d.ts → store-DhrWMYg_.d.ts} +10 -2
- package/dist/widgets.d.ts +37 -10
- package/dist/widgets.js +117 -24
- package/dist/widgets.js.map +1 -1
- package/package.json +5 -1
- package/dist/chunk-RBIQRTZR.js.map +0 -1
package/dist/advanced.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { B as BackupTarget } from './store-
|
|
2
|
-
export { A as AuthExpiredError, a as BuiltinTargetKind, E as EncodeOptions, H as Header, K as KdfParams, L as LocalStore, b as LocalStoreOptions, c as LocalStoreState, M as MirrorState, d as Mode, e as PasswordCheck, f as PasswordPolicy, g as PasswordRequirement, P as PeerSource, h as PeerState, R as RESERVED_COLLECTION_PREFIX, i as RESERVED_STORE_MODES, j as RecipientStanza, k as ReplicaState, l as SelfstoreError, m as SelfstoreErrorCode, n as Severity, o as Snapshot, p as SnapshotFile, q as StatusAction, r as StatusDescriptor, s as StatusInput, t as StorageState, S as StoreError, u as StoreGroupConfig, v as SyncJournalEntry, w as SyncSource, T as TargetKind, x as checkPasswordPolicy, y as createLocalStore, z as deriveStatus, C as errorLabelKey, D as isAuthExpired, F as isReservedStoreMode, G as isSelfstoreError } from './store-
|
|
1
|
+
import { B as BackupTarget } from './store-DhrWMYg_.js';
|
|
2
|
+
export { A as AuthExpiredError, a as BuiltinTargetKind, E as EncodeOptions, H as Header, K as KdfParams, L as LocalStore, b as LocalStoreOptions, c as LocalStoreState, M as MirrorState, d as Mode, e as PasswordCheck, f as PasswordPolicy, g as PasswordRequirement, P as PeerSource, h as PeerState, R as RESERVED_COLLECTION_PREFIX, i as RESERVED_STORE_MODES, j as RecipientStanza, k as ReplicaState, l as SelfstoreError, m as SelfstoreErrorCode, n as Severity, o as Snapshot, p as SnapshotFile, q as StatusAction, r as StatusDescriptor, s as StatusInput, t as StorageState, S as StoreError, u as StoreGroupConfig, v as SyncJournalEntry, w as SyncSource, T as TargetKind, x as checkPasswordPolicy, y as createLocalStore, z as deriveStatus, C as errorLabelKey, D as isAuthExpired, F as isReservedStoreMode, G as isSelfstoreError } from './store-DhrWMYg_.js';
|
|
3
3
|
import { K as KV } from './cache-ilsK3Tki.js';
|
|
4
4
|
export { C as CachedFile, L as LocalCache, e as LockableCache, i as indexedDbCache, f as isLockableCache, m as memoryCache } from './cache-ilsK3Tki.js';
|
|
5
|
-
export { G as GisDriveAuthOptions, a as GisTokenPersistence, d as datedName, e as exportSnapshot, g as gisDriveAuth, i as importSnapshot, b as inspect, c as isEncrypted, p as pickFromDisk, s as saveToDisk } from './local-
|
|
6
|
-
import { c as connect$2, f as fromSession$2, a as connect$3, b as fromSession$3, p as peer } from './s3-
|
|
7
|
-
export { S as S3Config, d as S3ConnectOptions, W as WebdavConfig, e as WebdavConnectOptions, g as WebdavPeerOptions } from './s3-
|
|
8
|
-
import { c as connect$1, f as fromSession$1, p as preview, b as adopt, d as findOrCreateOwnFile, l as listBackups, e as createBackup, g as deleteBackup, r as renameBackup, h as account } from './drive-
|
|
9
|
-
export { i as DriveAccount, a as DriveAuth, j as DriveBackupInfo, D as DriveOptions } from './drive-
|
|
5
|
+
export { G as GisDriveAuthOptions, a as GisTokenPersistence, d as datedName, e as exportSnapshot, g as gisDriveAuth, i as importSnapshot, b as inspect, c as isEncrypted, p as pickFromDisk, s as saveToDisk } from './local-DrziuI_t.js';
|
|
6
|
+
import { c as connect$2, f as fromSession$2, a as connect$3, b as fromSession$3, p as peer } from './s3-BLgf6hqR.js';
|
|
7
|
+
export { S as S3Config, d as S3ConnectOptions, W as WebdavConfig, e as WebdavConnectOptions, g as WebdavPeerOptions } from './s3-BLgf6hqR.js';
|
|
8
|
+
import { c as connect$1, f as fromSession$1, p as preview, b as adopt, d as findOrCreateOwnFile, l as listBackups, e as createBackup, g as deleteBackup, r as renameBackup, h as account } from './drive-BLRsK32w.js';
|
|
9
|
+
export { i as DriveAccount, a as DriveAuth, j as DriveBackupInfo, D as DriveOptions } from './drive-BLRsK32w.js';
|
|
10
10
|
import './sync.js';
|
|
11
11
|
|
|
12
12
|
/**
|
package/dist/advanced.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { RESERVED_STORE_MODES, createLocalStore, deriveStatus, gisDriveAuth, indexedDbCache, isLockableCache, isReservedStoreMode, memoryCache } from './chunk-
|
|
2
|
-
import './chunk-SKWHKM25.js';
|
|
1
|
+
export { RESERVED_STORE_MODES, createLocalStore, deriveStatus, gisDriveAuth, indexedDbCache, isLockableCache, isReservedStoreMode, memoryCache } from './chunk-ULPGGZ6L.js';
|
|
3
2
|
export { datedName, pickFromDisk, saveToDisk } from './chunk-DCEXWSM6.js';
|
|
4
3
|
import { openExisting, isOpenSupported, isSupported, fromSession as fromSession$1, connect as connect$1, fromSession3, connect3, peer, fromSession2, connect2 } from './chunk-TKWU52LK.js';
|
|
5
4
|
import { FILE_ID_KEY, account, renameBackup, deleteBackup, createBackup, listBackups, findOrCreateOwnFile, adopt, preview, fromSession, connect } from './chunk-J5MFXJU6.js';
|
|
@@ -7,6 +6,7 @@ export { RESERVED_COLLECTION_PREFIX, checkPasswordPolicy, exportSnapshot, import
|
|
|
7
6
|
import './chunk-QBCU7OOP.js';
|
|
8
7
|
import './chunk-O3Y6FORN.js';
|
|
9
8
|
export { AuthExpiredError, SelfstoreError, errorLabelKey, isAuthExpired, isSelfstoreError } from './chunk-3OBJOMQ2.js';
|
|
9
|
+
import './chunk-SKWHKM25.js';
|
|
10
10
|
|
|
11
11
|
// src/persistence/installation.ts
|
|
12
12
|
function isSafari(ua) {
|
package/dist/backups.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as BackupsHost } from './manager-
|
|
2
|
-
export { a as BackupFileInfo, b as BackupOwner, c as BackupRow, d as BackupsErrorCode, e as BackupsKeys, f as BackupsManager, g as BackupsNaming, h as BackupsSnapshot, K as KnownBackups, i as createBackupsManager } from './manager-
|
|
3
|
-
import { D as DriveOptions } from './drive-
|
|
1
|
+
import { B as BackupsHost } from './manager-BlSs6Q5S.js';
|
|
2
|
+
export { a as BackupFileInfo, b as BackupOwner, c as BackupRow, d as BackupsErrorCode, e as BackupsKeys, f as BackupsManager, g as BackupsNaming, h as BackupsSnapshot, K as KnownBackups, i as createBackupsManager } from './manager-BlSs6Q5S.js';
|
|
3
|
+
import { D as DriveOptions } from './drive-BLRsK32w.js';
|
|
4
4
|
import './cache-ilsK3Tki.js';
|
|
5
|
-
import './store-
|
|
5
|
+
import './store-DhrWMYg_.js';
|
|
6
6
|
import './sync.js';
|
|
7
7
|
import './machine-ALMkT3mk.js';
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createNode, createMeta, gcTombstones, stamp, merge, unsyncableCounts, idPathFor, detectConflicts, changes } from './chunk-SKWHKM25.js';
|
|
2
1
|
import { inspect, checkPasswordPolicy, writeBox, BACKUP_MIME, readBoxWithSync, asBytes } from './chunk-MGDXR3RB.js';
|
|
3
2
|
import { seal, isEnvelope, unseal, newDeviceKey } from './chunk-QBCU7OOP.js';
|
|
4
3
|
import { openManifest, GROUP_KEYING } from './chunk-O3Y6FORN.js';
|
|
5
4
|
import { SelfstoreError, mintSlot, MAX_KEY_SLOTS, mintExternalSlot, isAuthExpired, openSlot, errorLabelKey, isSelfstoreError } from './chunk-3OBJOMQ2.js';
|
|
5
|
+
import { createNode, createMeta, gcTombstones, stamp, merge, unsyncableCounts, idPathFor, detectConflicts, changes } from './chunk-SKWHKM25.js';
|
|
6
6
|
import { openDB } from 'idb';
|
|
7
7
|
|
|
8
8
|
// src/persistence/target.ts
|
|
@@ -286,13 +286,29 @@ function createLocalStore(opts) {
|
|
|
286
286
|
)
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
async function buildBlob(pre) {
|
|
290
|
-
if (requireEncryption && !encrypted && !group) {
|
|
289
|
+
async function buildBlob(pre, opts2) {
|
|
290
|
+
if (requireEncryption && (opts2?.plaintext || !encrypted && !group)) {
|
|
291
291
|
throw new SelfstoreError(
|
|
292
292
|
"ENCRYPTION_REQUIRED",
|
|
293
293
|
"requireEncryption is set: refusing to build a plaintext backup."
|
|
294
294
|
);
|
|
295
295
|
}
|
|
296
|
+
if (opts2?.plaintext) {
|
|
297
|
+
if (locked()) {
|
|
298
|
+
throw new SelfstoreError(
|
|
299
|
+
"PASSWORD_REQUIRED",
|
|
300
|
+
"Cannot export a readable copy while locked - unlock first."
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
const snapshot = pre ?? await gather();
|
|
304
|
+
const stamp2 = Math.max(version, schemaCeiling);
|
|
305
|
+
const bytes2 = await writeBox(
|
|
306
|
+
{ collections: snapshot.collections, files: snapshot.files },
|
|
307
|
+
{ app, appVersion, schemaVersion: stamp2, readme },
|
|
308
|
+
{ schemaVersion: stamp2, meta }
|
|
309
|
+
);
|
|
310
|
+
return new Blob([bytes2], { type: BACKUP_MIME });
|
|
311
|
+
}
|
|
296
312
|
const snap = pre ?? await gather();
|
|
297
313
|
let env;
|
|
298
314
|
if (encrypted && !group) {
|
|
@@ -1393,8 +1409,8 @@ function createLocalStore(opts) {
|
|
|
1393
1409
|
notify();
|
|
1394
1410
|
}
|
|
1395
1411
|
},
|
|
1396
|
-
exportBlob() {
|
|
1397
|
-
return buildBlob();
|
|
1412
|
+
exportBlob(opts2) {
|
|
1413
|
+
return buildBlob(void 0, opts2);
|
|
1398
1414
|
},
|
|
1399
1415
|
markDownloaded() {
|
|
1400
1416
|
pendingDownload = false;
|
|
@@ -2140,5 +2156,5 @@ function gisDriveAuth(opts) {
|
|
|
2140
2156
|
}
|
|
2141
2157
|
|
|
2142
2158
|
export { RESERVED_STORE_MODES, createLocalStore, deriveStatus, gisDriveAuth, indexedDbCache, isLockableCache, isReservedStoreMode, memoryCache };
|
|
2143
|
-
//# sourceMappingURL=chunk-
|
|
2144
|
-
//# sourceMappingURL=chunk-
|
|
2159
|
+
//# sourceMappingURL=chunk-ULPGGZ6L.js.map
|
|
2160
|
+
//# sourceMappingURL=chunk-ULPGGZ6L.js.map
|