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.
@@ -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.warn(`Cannot connect to storage ${this.getDebugName()}, retrying in ${Math.round(retryDelay / 1000)}s. ${(e as Error).stack ?? e}`);
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?: { range?: { start: number; end: number } }): Promise<Buffer | undefined> {
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?: { range?: { start: number; end: number } }): Promise<{ data: Buffer; writeTime: number; size: number } | undefined> {
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);