export { DiskStorage, DiskStorageWithChecksum } from "./storage/local/index.js"; export { L as LocalMetaStorage } from "./packem_shared/local-meta-storage.d-CYWYyCUo.js"; export { MemoryMetaStorage, MemoryStorage, type MemoryStorageOptions } from "./storage/memory/index.js"; import { k as Metrics } from "./packem_shared/storage.d-C9EdfTf1.js"; export { B as AbstractBaseStorage, type i as BaseStorageOptions, type l as BatchOperationResponse, type m as BatchOperationResult, type D as DiskStorageOptions, type n as DiskStorageWithChecksumOptions, o as ERRORS, p as ErrorMap, type q as ExpirationOptions, F as File, type d as FileInit, type e as FilePart, type f as FileQuery, type H as Header, type r as Headers, type s as HttpError, type t as HttpErrorBody, type I as IncomingMessageWithBody, type L as LocalMetaStorageOptions, M as MetaStorage, type u as MetaStorageOptions, v as Metadata, type w as OnComplete, type x as OnCreate, type y as OnDelete, type z as OnError, type A as OnUpdate, type P as PurgeList, type G as RangeChecksum, type J as RangeHasher, type K as ResponseBody, type h as ResponseBodyType, type N as ResponseTuple, type R as RetryConfig, a as UploadError, type b as UploadEventType, type U as UploadFile, type j as UploadResponse, type V as Validation, type Q as ValidationError, type S as ValidatorConfig, c as createRetryWrapper, T as defaultCloudStorageFileNameValidation, W as defaultFilesystemFileNameValidation, X as extractHttpStatus, Y as isRetryableError, Z as isUploadError, _ as mapStatusToErrorCode, $ as retry, a0 as throwErrorCode, a1 as wrapStorageError } from "./packem_shared/storage.d-C9EdfTf1.js"; export { type AnyWebReadableByteStreamWithFileType, type AnyWebReadableStream, type Detector, type FileTypeOptions, type FileTypeParser, type FileTypeResult, type StreamOptions, type TokenizerPositionError, fileTypeFromBlob, fileTypeFromBuffer, fileTypeFromTokenizer, supportedExtensions, supportedMimeTypes } from 'file-type'; import { F as Files, S as SyncOptions, a as SyncResult, T as TransferOptions, b as TransferResult } from "./packem_shared/files.d-DuIceNg2.js"; export { type B as BulkDeleteResult, type c as BulkDownloadOptions, type d as BulkDownloadResult, type e as BulkError, type f as BulkExistsResult, type g as BulkHeadResult, type h as BulkMoveItem, type i as BulkMoveResult, type j as BulkOptions, type k as BulkUploadItem, type l as BulkUploadOptions, type m as BulkUploadResult, type D as DownloadOptions, type n as DownloadRange, type o as DownloadResult, type p as DownloadStreamResult, type q as FileBody, type r as FileObject, type s as FilesHooks, type t as FilesOptions, type H as HookActionType, type u as HookEvent, type L as ListAllOptions, type v as ListDirectoryResult, type w as ListOptions, type M as MultipartOptions, type x as SignedReadUrlOptions, type y as SignedUploadUrlOptions, type z as StorageCapabilities, type A as SyncProgress, type C as TransferProgress, U as UploadControl, type E as UploadControlState, type G as UploadControlToken, type I as UploadOptions, type J as UploadProgress, type K as UploadProgressCallback } from "./packem_shared/files.d-DuIceNg2.js"; import { Meter } from '@opentelemetry/api'; import 'node:stream'; import 'node:timers'; import 'node:crypto'; import 'node:http'; import 'lru-cache'; /** * Streams every object from `source` to `destination` for cross-provider migration. * Built entirely on the public {@link Files} surface — no adapter implements anything new. * * Each object is downloaded and re-uploaded with bounded concurrency. By default missing * destination keys are uploaded and existing keys are skipped — pass `overwrite: true` to force * re-upload. Body, content type, and user metadata travel; `etag`/`lastModified` are * destination-assigned. * * Like the other bulk methods, `transfer` doesn't throw on partial failure: results come back as * `{ transferred, skipped, errors? }`. * @example * ```ts * const from = new Files({ adapter: new S3Storage({ bucket: "old", ... }) }); * const to = new Files({ adapter: new GCSStorage({ bucket: "new", ... }) }); * * const { transferred, skipped, errors } = await transfer(from, to, { * prefix: "uploads/", * onProgress: ({ done, key, status }) => console.log(done, key, status), * }); * ``` */ declare const transfer: (source: Files, destination: Files, options?: TransferOptions) => Promise; /** * Incremental, optionally-pruning mirror from `source` to `destination`. Built entirely on the * public {@link Files} surface — no adapter implements anything new. * * Each source object is compared against its destination counterpart (by size, then etag, then * modification time) and only copied when missing or differing; matching objects are skipped. With * `prune: true`, destination keys absent from the source are deleted afterwards (full mirror). * Pass `dryRun: true` to compute the plan without writing. * * Like the other bulk methods, `sync` doesn't throw on partial failure: results come back as * `{ uploaded, updated, unchanged, deleted, errors? }`. * @example * ```ts * const from = new Files({ adapter: new S3Storage({ bucket: "primary", ... }) }); * const to = new Files({ adapter: new GCSStorage({ bucket: "mirror", ... }) }); * * // Preview first… * const plan = await sync(from, to, { prefix: "assets/", prune: true, dryRun: true }); * // …then apply. * const result = await sync(from, to, { prefix: "assets/", prune: true }); * ``` */ declare const sync: (source: Files, destination: Files, options?: SyncOptions) => Promise; /** * Wait for storage to be ready before handling requests. * This ensures storage initialization (e.g., AWS S3, GCS) completes before processing uploads. * @param storage Storage instance with isReady property * @param timeoutMs Maximum time to wait in milliseconds (default: 5000) * @throws Error if storage doesn't become ready within timeout */ declare const waitForStorage: (storage: { isReady: boolean; }, timeoutMs?: number) => Promise; /** * No-op metrics that does nothing. * Used as a default when metrics are not provided. */ declare class NoOpMetrics implements Metrics { increment(_name: string, _value?: number, _attributes?: Record): void; timing(_name: string, _duration: number, _attributes?: Record): void; gauge(_name: string, _value: number, _attributes?: Record): void; } /** * OpenTelemetry-based metrics implementation. */ declare class OpenTelemetryMetrics implements Metrics { private readonly meter; private readonly counters; private readonly histograms; private readonly gauges; /** * Creates a new OpenTelemetryMetrics instance. * @param meter OpenTelemetry Meter instance. If not provided, uses the default meter. * @throws {Error} If \@opentelemetry/api is not installed */ constructor(meter?: Meter); /** * Increment a counter metric. */ increment(name: string, value?: number, attributes?: Record): void; /** * Record a duration/timing metric in milliseconds. */ timing(name: string, duration: number, attributes?: Record): void; /** * Set a gauge metric value. */ gauge(name: string, value: number, attributes?: Record): void; } export { Files, type Metrics, NoOpMetrics, OpenTelemetryMetrics, type SyncOptions, type SyncResult, type TransferOptions, type TransferResult, sync, transfer, waitForStorage };