sliftutils 1.7.51 → 1.7.53
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/index.d.ts +38 -103
- package/package.json +1 -1
- package/storage/ArchivesDisk.d.ts +3 -13
- package/storage/ArchivesDisk.ts +3 -3
- package/storage/IArchives.d.ts +18 -12
- package/storage/IArchives.ts +16 -2
- package/storage/backblaze.d.ts +3 -14
- package/storage/backblaze.ts +3 -3
- package/storage/dist/ArchivesDisk.ts.cache +2 -2
- package/storage/dist/IArchives.ts.cache +2 -2
- package/storage/dist/backblaze.ts.cache +2 -2
- package/storage/remoteStorage/ArchivesRemote.d.ts +3 -13
- package/storage/remoteStorage/ArchivesRemote.ts +3 -3
- package/storage/remoteStorage/ArchivesUrl.d.ts +3 -13
- package/storage/remoteStorage/ArchivesUrl.ts +3 -3
- package/storage/remoteStorage/blobStore.d.ts +5 -25
- package/storage/remoteStorage/blobStore.ts +5 -5
- package/storage/remoteStorage/createArchives.d.ts +3 -13
- package/storage/remoteStorage/createArchives.ts +41 -7
- package/storage/remoteStorage/dist/ArchivesRemote.ts.cache +2 -2
- package/storage/remoteStorage/dist/ArchivesUrl.ts.cache +2 -2
- package/storage/remoteStorage/dist/blobStore.ts.cache +2 -2
- package/storage/remoteStorage/dist/createArchives.ts.cache +41 -3
- package/storage/remoteStorage/dist/deployTakeover.ts.cache +18 -9
- package/storage/remoteStorage/dist/sourceWrapper.ts.cache +3 -3
- package/storage/remoteStorage/dist/storageServerState.ts.cache +2 -2
- package/storage/remoteStorage/sourceWrapper.ts +1 -1
- package/storage/remoteStorage/storageServerState.ts +3 -3
|
@@ -150,7 +150,7 @@ export class SourceWrapper {
|
|
|
150
150
|
// Even a failing call (e.g. access denied) proves the connection is back
|
|
151
151
|
if (this.isConnected()) break;
|
|
152
152
|
if (this.isConnectionProblemWorthReporting()) {
|
|
153
|
-
console.
|
|
153
|
+
console.error(`Cannot connect to storage ${this.getDebugName()}, retrying in ${Math.round(retryDelay / 1000)}s. ${(e as Error).stack ?? e}`);
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
retryDelay = Math.min(RETRY_MAX_DELAY, retryDelay * RETRY_GROWTH);
|
|
@@ -9,7 +9,7 @@ import { ArchivesDisk } from "../ArchivesDisk";
|
|
|
9
9
|
import { BlobStore, IBucketStore, DEFAULT_FAST_WRITE_DELAY, WINDOW_END_FLUSH_MARGIN } from "./blobStore";
|
|
10
10
|
import {
|
|
11
11
|
RemoteConfig, HostedConfig, BackblazeConfig, IArchives, ArchivesSource, ArchiveFileInfo, ArchivesConfig,
|
|
12
|
-
ArchivesSyncStatus, ChangesAfterConfig, SetConfig,
|
|
12
|
+
ArchivesSyncStatus, ChangesAfterConfig, GetConfig, SetConfig,
|
|
13
13
|
STORAGE_WRONG_VALID_WINDOW, STORAGE_WRONG_ROUTE, FULL_ROUTE,
|
|
14
14
|
} from "../IArchives";
|
|
15
15
|
import { ROUTING_FILE, parseRoutingData, serializeRemoteConfig, parseHostedUrl, replaceHostedUrlPort, buildFileUrl, getConfigVersion, getRoute, routeContains, routeIntersection, normalizeSource } from "./remoteConfig";
|
|
@@ -1052,11 +1052,11 @@ class ArchivesLocalBucket implements IArchives {
|
|
|
1052
1052
|
public getDebugName() {
|
|
1053
1053
|
return `localBucket account ${this.account} bucket ${this.bucketName}`;
|
|
1054
1054
|
}
|
|
1055
|
-
public async get(fileName: string, config?:
|
|
1055
|
+
public async get(fileName: string, config?: GetConfig): Promise<Buffer | undefined> {
|
|
1056
1056
|
let result = await this.get2(fileName, config);
|
|
1057
1057
|
return result && result.data || undefined;
|
|
1058
1058
|
}
|
|
1059
|
-
public async get2(fileName: string, config?:
|
|
1059
|
+
public async get2(fileName: string, config?: GetConfig): Promise<{ data: Buffer; writeTime: number; size: number } | undefined> {
|
|
1060
1060
|
let bucket = await this.getBucket();
|
|
1061
1061
|
if (!bucket) return undefined;
|
|
1062
1062
|
return await bucket.store.get2(fileName, config);
|