selfstore 1.8.17 → 1.8.19

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,12 +1,12 @@
1
- import { B as BackupTarget } from './store-CCe8b5Eg.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-CCe8b5Eg.js';
1
+ import { B as BackupTarget } from './store-Cs6QIzzG.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-Cs6QIzzG.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-Dt1hYNG4.js';
6
- import { c as connect$2, f as fromSession$2, a as connect$3, b as fromSession$3, p as peer } from './s3-CCE6lc_U.js';
7
- export { S as S3Config, d as S3ConnectOptions, W as WebdavConfig, e as WebdavConnectOptions, g as WebdavPeerOptions } from './s3-CCE6lc_U.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-BUPsPaIu.js';
9
- export { i as DriveAccount, a as DriveAuth, j as DriveBackupInfo, D as DriveOptions } from './drive-BUPsPaIu.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-Dh6eGiK9.js';
6
+ import { c as connect$2, f as fromSession$2, a as connect$3, b as fromSession$3, p as peer } from './s3-0qqIyphl.js';
7
+ export { S as S3Config, d as S3ConnectOptions, W as WebdavConfig, e as WebdavConnectOptions, g as WebdavPeerOptions } from './s3-0qqIyphl.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-CY_Vsj7V.js';
9
+ export { i as DriveAccount, a as DriveAuth, j as DriveBackupInfo, D as DriveOptions } from './drive-CY_Vsj7V.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-3BPGPSPX.js';
2
- import './chunk-SKWHKM25.js';
1
+ export { RESERVED_STORE_MODES, createLocalStore, deriveStatus, gisDriveAuth, indexedDbCache, isLockableCache, isReservedStoreMode, memoryCache } from './chunk-TQH7ZYID.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-CaMd6T1T.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-CaMd6T1T.js';
3
- import { D as DriveOptions } from './drive-BUPsPaIu.js';
1
+ import { B as BackupsHost } from './manager-DhoIbJyg.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-DhoIbJyg.js';
3
+ import { D as DriveOptions } from './drive-CY_Vsj7V.js';
4
4
  import './cache-ilsK3Tki.js';
5
- import './store-CCe8b5Eg.js';
5
+ import './store-Cs6QIzzG.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
@@ -45,6 +45,15 @@ function deriveStatus(input) {
45
45
  };
46
46
  }
47
47
  if (input.targetKind === "device") {
48
+ if (input.copy?.at) {
49
+ return {
50
+ state: "cache-only",
51
+ severity: input.copy.stale ? "warn" : "ok",
52
+ actionable: true,
53
+ action: "choose-destination",
54
+ labelKey: input.copy.stale ? "status.copyStale" : "status.copy"
55
+ };
56
+ }
48
57
  return {
49
58
  state: "cache-only",
50
59
  severity: "warn",
@@ -967,7 +976,8 @@ function createLocalStore(opts) {
967
976
  saving,
968
977
  needsAttention,
969
978
  locked: locked(),
970
- pendingDownload
979
+ pendingDownload,
980
+ copy: { at: lastCopyAt, stale: copyIsStale }
971
981
  }),
972
982
  lastError,
973
983
  journal,
@@ -2130,5 +2140,5 @@ function gisDriveAuth(opts) {
2130
2140
  }
2131
2141
 
2132
2142
  export { RESERVED_STORE_MODES, createLocalStore, deriveStatus, gisDriveAuth, indexedDbCache, isLockableCache, isReservedStoreMode, memoryCache };
2133
- //# sourceMappingURL=chunk-3BPGPSPX.js.map
2134
- //# sourceMappingURL=chunk-3BPGPSPX.js.map
2143
+ //# sourceMappingURL=chunk-TQH7ZYID.js.map
2144
+ //# sourceMappingURL=chunk-TQH7ZYID.js.map