@nestm/storage 0.1.0-alpha.7 → 0.1.0-alpha.8
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/CHANGELOG.md +110 -0
- package/README.md +217 -18
- package/SECURITY.md +34 -5
- package/dist/ai-sdk/ai-sdk-workspace-tools.d.ts +14 -3
- package/dist/ai-sdk/ai-sdk-workspace-tools.d.ts.map +1 -1
- package/dist/ai-sdk/ai-sdk-workspace-tools.js +54 -23
- package/dist/ai-sdk/ai-sdk-workspace-tools.js.map +1 -1
- package/dist/ai-sdk/index.d.ts +1 -1
- package/dist/ai-sdk/index.d.ts.map +1 -1
- package/dist/ai-sdk/index.js.map +1 -1
- package/dist/files-sdk/files-sdk.driver.d.ts +54 -10
- package/dist/files-sdk/files-sdk.driver.d.ts.map +1 -1
- package/dist/files-sdk/files-sdk.driver.js +784 -63
- package/dist/files-sdk/files-sdk.driver.js.map +1 -1
- package/dist/files-sdk/fs/index.d.ts +4 -4
- package/dist/files-sdk/fs/index.d.ts.map +1 -1
- package/dist/files-sdk/fs/index.js +242 -9
- package/dist/files-sdk/fs/index.js.map +1 -1
- package/dist/files-sdk/index.d.ts +1 -1
- package/dist/files-sdk/index.d.ts.map +1 -1
- package/dist/files-sdk/index.js.map +1 -1
- package/dist/files-sdk/provider/index.d.ts +9 -5
- package/dist/files-sdk/provider/index.d.ts.map +1 -1
- package/dist/files-sdk/provider/index.js +53 -15
- package/dist/files-sdk/provider/index.js.map +1 -1
- package/dist/files-sdk/s3/construction-metadata.d.ts +7 -0
- package/dist/files-sdk/s3/construction-metadata.d.ts.map +1 -0
- package/dist/files-sdk/s3/construction-metadata.js +13 -0
- package/dist/files-sdk/s3/construction-metadata.js.map +1 -0
- package/dist/files-sdk/s3/index.d.ts +39 -19
- package/dist/files-sdk/s3/index.d.ts.map +1 -1
- package/dist/files-sdk/s3/index.js +936 -113
- package/dist/files-sdk/s3/index.js.map +1 -1
- package/dist/gateway/storage-gateway.controller.d.ts.map +1 -1
- package/dist/gateway/storage-gateway.controller.js +25 -5
- package/dist/gateway/storage-gateway.controller.js.map +1 -1
- package/dist/storage-etag.d.ts +13 -0
- package/dist/storage-etag.d.ts.map +1 -0
- package/dist/storage-etag.js +31 -0
- package/dist/storage-etag.js.map +1 -0
- package/dist/storage.client.d.ts +3 -1
- package/dist/storage.client.d.ts.map +1 -1
- package/dist/storage.client.js +87 -22
- package/dist/storage.client.js.map +1 -1
- package/dist/storage.driver.d.ts +21 -1
- package/dist/storage.driver.d.ts.map +1 -1
- package/dist/storage.driver.js.map +1 -1
- package/dist/storage.types.d.ts +90 -19
- package/dist/storage.types.d.ts.map +1 -1
- package/dist/storage.types.js.map +1 -1
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/provider-conformance.d.ts +65 -0
- package/dist/testing/provider-conformance.d.ts.map +1 -0
- package/dist/testing/provider-conformance.js +853 -0
- package/dist/testing/provider-conformance.js.map +1 -0
- package/dist/workspace/index.d.ts +1 -0
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +1 -0
- package/dist/workspace/index.js.map +1 -1
- package/dist/workspace/storage-workspace.cursor.d.ts +68 -3
- package/dist/workspace/storage-workspace.cursor.d.ts.map +1 -1
- package/dist/workspace/storage-workspace.cursor.js +402 -39
- package/dist/workspace/storage-workspace.cursor.js.map +1 -1
- package/dist/workspace/storage-workspace.d.ts.map +1 -1
- package/dist/workspace/storage-workspace.js +54 -46
- package/dist/workspace/storage-workspace.js.map +1 -1
- package/dist/workspace/storage-workspace.types.d.ts +10 -2
- package/dist/workspace/storage-workspace.types.d.ts.map +1 -1
- package/dist/workspace/storage-workspace.types.js +1 -0
- package/dist/workspace/storage-workspace.types.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.client.js","sourceRoot":"","sources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leMany } from './internal/settle-many.js';\nimport {\n StorageError,\n StorageErrorCode,\n normalizeStorageError,\n} from './storage.error.js';\nimport type { StorageDriver } from './storage.driver.js';\nimport type {\n StorageBody,\n StorageBufferedDownloadOptions,\n StorageBulkOptions,\n StorageCapabilities,\n StorageConditionalDeleteOptions,\n StorageConditionalUploadOptions,\n StorageDeleteManyResult,\n StorageDownloadManyResult,\n StorageDownloadOptions,\n StorageExistsManyResult,\n StorageHeadManyResult,\n StorageListOptions,\n StorageListResult,\n StorageObject,\n StorageObjectMetadata,\n StorageOperationContext,\n StorageOperationOptions,\n StoragePlugin,\n StoragePromotionOptions,\n StorageSearchOptions,\n StorageSignedDownloadOptions,\n StorageSignedUpload,\n StorageSignedUploadOptions,\n StorageUploadManyItem,\n StorageUploadManyOptions,\n StorageUploadManyResult,\n StorageUploadOptions,\n StorageUploadResult,\n} from './storage.types.js';\n\nexport const DEFAULT_BUFFER_LIMIT = 10 * 1024 * 1024;\n\ntype BulkOperationOptions = StorageBulkOptions & StorageOperationOptions;\ntype DownloadManyOptions = StorageBulkOptions & StorageDownloadOptions;\n\nfunction assertKey(key: string, label = 'key'): void {\n if (typeof key !== 'string' || key.length === 0) {\n throw new StorageError(`${label} must be a non-empty string.`, {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n });\n }\n}\n\nfunction invalidArgument(message: string): never {\n throw new StorageError(message, {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n });\n}\n\nfunction assertPositiveSafeInteger(\n value: number | undefined,\n label: string,\n): void {\n if (value !== undefined && (!Number.isSafeInteger(value) || value <= 0)) {\n invalidArgument(`${label} must be a positive safe integer.`);\n }\n}\n\nfunction assertDownloadOptions(options?: StorageDownloadOptions): void {\n const range = options?.range;\n if (range === undefined) {\n return;\n }\n if (!Number.isSafeInteger(range.start) || range.start < 0) {\n invalidArgument('range.start must be a non-negative safe integer.');\n }\n if (\n range.end !== undefined &&\n (!Number.isSafeInteger(range.end) || range.end < range.start)\n ) {\n invalidArgument(\n 'range.end must be a safe integer greater than or equal to range.start.',\n );\n }\n}\n\nfunction assertListOptions(options?: StorageListOptions): void {\n if (options?.delimiter !== undefined && options.delimiter.length === 0) {\n invalidArgument('delimiter must be a non-empty string.');\n }\n assertPositiveSafeInteger(options?.limit, 'limit');\n}\n\nfunction assertSearchOptions(options?: StorageSearchOptions): void {\n assertPositiveSafeInteger(options?.limit, 'limit');\n assertPositiveSafeInteger(options?.maxResults, 'maxResults');\n}\n\nfunction assertSignedUploadOptions(options: StorageSignedUploadOptions): void {\n assertPositiveSafeInteger(options.expiresIn, 'expiresIn');\n assertPositiveSafeInteger(options.maxSize, 'maxSize');\n if (\n options.minSize !== undefined &&\n (!Number.isSafeInteger(options.minSize) || options.minSize < 0)\n ) {\n invalidArgument('minSize must be a non-negative safe integer.');\n }\n if (\n options.minSize !== undefined &&\n options.maxSize !== undefined &&\n options.minSize > options.maxSize\n ) {\n invalidArgument('minSize cannot be greater than maxSize.');\n }\n}\n\nfunction operationOptions(\n options?: BulkOperationOptions,\n): StorageOperationOptions | undefined {\n if (options === undefined) {\n return undefined;\n }\n return {\n ...(options.retries !== undefined && { retries: options.retries }),\n ...(options.signal !== undefined && { signal: options.signal }),\n ...(options.timeout !== undefined && { timeout: options.timeout }),\n };\n}\n\nfunction downloadOptions(\n options?: DownloadManyOptions,\n): StorageDownloadOptions | undefined {\n if (options === undefined) {\n return undefined;\n }\n return {\n ...operationOptions(options),\n ...(options.range !== undefined && { range: options.range }),\n };\n}\n\nasync function collectBody(\n object: StorageObject,\n maxBytes: number,\n): Promise<Uint8Array> {\n if (maxBytes !== Infinity && (!Number.isFinite(maxBytes) || maxBytes < 0)) {\n await object.body.cancel().catch(() => undefined);\n throw new StorageError(\n 'maxBytes must be a non-negative finite number or Infinity.',\n {\n code: StorageErrorCode.INVALID_ARGUMENT,\n key: object.key,\n permanent: true,\n },\n );\n }\n\n if (maxBytes !== Infinity && object.size > maxBytes) {\n await object.body.cancel().catch(() => undefined);\n throw new StorageError(\n `Object \"${object.key}\" is ${object.size} bytes, exceeding the ${maxBytes}-byte buffer limit.`,\n {\n code: StorageErrorCode.LIMIT_EXCEEDED,\n key: object.key,\n permanent: true,\n },\n );\n }\n\n const chunks: Uint8Array[] = [];\n let total = 0;\n const reader = object.body.getReader();\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n total += value.byteLength;\n if (maxBytes !== Infinity && total > maxBytes) {\n await reader.cancel().catch(() => undefined);\n throw new StorageError(\n `Object \"${object.key}\" exceeded the ${maxBytes}-byte buffer limit while downloading.`,\n {\n code: StorageErrorCode.LIMIT_EXCEEDED,\n key: object.key,\n permanent: true,\n },\n );\n }\n chunks.push(value);\n }\n } finally {\n reader.releaseLock();\n }\n\n const bytes = new Uint8Array(total);\n let offset = 0;\n for (const chunk of chunks) {\n bytes.set(chunk, offset);\n offset += chunk.byteLength;\n }\n return bytes;\n}\n\nexport interface StorageFileHandle {\n readonly key: string;\n upload(\n body: StorageBody,\n options?: StorageUploadOptions,\n ): Promise<StorageUploadResult>;\n uploadConditional(\n body: StorageBody,\n options: StorageConditionalUploadOptions,\n ): Promise<StorageUploadResult>;\n download(options?: StorageDownloadOptions): Promise<StorageObject>;\n bytes(options?: StorageBufferedDownloadOptions): Promise<Uint8Array>;\n text(options?: StorageBufferedDownloadOptions): Promise<string>;\n head(options?: StorageOperationOptions): Promise<StorageObjectMetadata>;\n exists(options?: StorageOperationOptions): Promise<boolean>;\n delete(options?: StorageOperationOptions): Promise<void>;\n deleteConditional(options: StorageConditionalDeleteOptions): Promise<void>;\n signDownload(options?: StorageSignedDownloadOptions): Promise<string>;\n signUpload(options: StorageSignedUploadOptions): Promise<StorageSignedUpload>;\n copyTo(\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void>;\n moveTo(\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void>;\n /** Conditionally copies this staged object and deliberately retains it. */\n promoteTo(\n destinationKey: string,\n options: StoragePromotionOptions,\n ): Promise<void>;\n}\n\nexport class StorageClient {\n readonly #driver: StorageDriver;\n readonly #plugins: readonly StoragePlugin[];\n #closed = false;\n\n constructor(\n readonly name: string,\n driver: StorageDriver,\n plugins: readonly StoragePlugin[] = [],\n ) {\n assertKey(name, 'store name');\n this.#driver = driver;\n this.#plugins = [...plugins];\n }\n\n get driverName(): string {\n return this.#driver.name;\n }\n\n get capabilities(): Readonly<StorageCapabilities> {\n return this.#driver.capabilities;\n }\n\n file(key: string): StorageFileHandle {\n assertKey(key);\n return {\n copyTo: (destinationKey, options) =>\n this.copy(key, destinationKey, options),\n delete: (options) => this.delete(key, options),\n deleteConditional: (options) => this.deleteConditional(key, options),\n download: (options) => this.downloadStream(key, options),\n exists: (options) => this.exists(key, options),\n head: (options) => this.head(key, options),\n key,\n moveTo: (destinationKey, options) =>\n this.move(key, destinationKey, options),\n promoteTo: (destinationKey, options) =>\n this.promote(key, destinationKey, options),\n signDownload: (options) => this.signDownload(key, options),\n signUpload: (options) => this.signUpload(key, options),\n bytes: (options) => this.downloadBytes(key, options),\n text: (options) => this.downloadText(key, options),\n upload: (body, options) => this.upload(key, body, options),\n uploadConditional: (body, options) =>\n this.uploadConditional(key, body, options),\n };\n }\n\n upload(\n key: string,\n body: StorageBody,\n options?: StorageUploadOptions,\n ): Promise<StorageUploadResult> {\n assertKey(key);\n return this.#execute({ key, operation: 'upload', store: this.name }, () =>\n this.#driver.upload(key, body, options),\n );\n }\n\n uploadConditional(\n key: string,\n body: StorageBody,\n options: StorageConditionalUploadOptions,\n ): Promise<StorageUploadResult> {\n assertKey(key);\n const condition = options.condition;\n if (\n condition === undefined ||\n (condition.type !== 'create' && condition.type !== 'replace')\n ) {\n invalidArgument('condition.type must be \"create\" or \"replace\".');\n }\n if (\n condition.type === 'replace' &&\n (typeof condition.etag !== 'string' || condition.etag.length === 0)\n ) {\n invalidArgument('condition.etag must be a non-empty string.');\n }\n\n const capability = this.#driver.capabilities.conditionalMutation;\n const uploadConditional = this.#driver.uploadConditional;\n const supported =\n condition.type === 'create'\n ? capability?.create === true\n : capability?.replace === true;\n if (!supported || uploadConditional === undefined) {\n throw new StorageError(\n `Store \"${this.name}\" does not support the requested conditional upload.`,\n {\n code: StorageErrorCode.NOT_SUPPORTED,\n key,\n operation: 'upload',\n permanent: true,\n store: this.name,\n },\n );\n }\n\n return this.#execute({ key, operation: 'upload', store: this.name }, () =>\n uploadConditional.call(this.#driver, key, body, options),\n );\n }\n\n downloadStream(\n key: string,\n options?: StorageDownloadOptions,\n ): Promise<StorageObject> {\n assertKey(key);\n assertDownloadOptions(options);\n return this.#execute({ key, operation: 'download', store: this.name }, () =>\n this.#driver.download(key, options),\n );\n }\n\n async downloadBytes(\n key: string,\n options?: StorageBufferedDownloadOptions,\n ): Promise<Uint8Array> {\n const { maxBytes = DEFAULT_BUFFER_LIMIT, ...download } = options ?? {};\n const object = await this.downloadStream(key, download);\n return collectBody(object, maxBytes);\n }\n\n async downloadText(\n key: string,\n options?: StorageBufferedDownloadOptions,\n ): Promise<string> {\n return new TextDecoder().decode(await this.downloadBytes(key, options));\n }\n\n async downloadJson<Result = unknown>(\n key: string,\n options?: StorageBufferedDownloadOptions,\n ): Promise<Result> {\n const text = await this.downloadText(key, options);\n try {\n return JSON.parse(text) as Result;\n } catch (error) {\n throw new StorageError(`Object \"${key}\" does not contain valid JSON.`, {\n cause: error,\n code: StorageErrorCode.INVALID_ARGUMENT,\n key,\n operation: 'download',\n permanent: true,\n store: this.name,\n });\n }\n }\n\n head(\n key: string,\n options?: StorageOperationOptions,\n ): Promise<StorageObjectMetadata> {\n assertKey(key);\n return this.#execute({ key, operation: 'head', store: this.name }, () =>\n this.#driver.head(key, options),\n );\n }\n\n exists(key: string, options?: StorageOperationOptions): Promise<boolean> {\n assertKey(key);\n return this.#execute({ key, operation: 'exists', store: this.name }, () =>\n this.#driver.exists(key, options),\n );\n }\n\n delete(key: string, options?: StorageOperationOptions): Promise<void> {\n assertKey(key);\n return this.#execute({ key, operation: 'delete', store: this.name }, () =>\n this.#driver.delete(key, options),\n );\n }\n\n deleteConditional(\n key: string,\n options: StorageConditionalDeleteOptions,\n ): Promise<void> {\n assertKey(key);\n if (\n options.condition === undefined ||\n typeof options.condition.etag !== 'string' ||\n options.condition.etag.length === 0\n ) {\n invalidArgument('condition.etag must be a non-empty string.');\n }\n\n const capability = this.#driver.capabilities.conditionalMutation;\n const deleteConditional = this.#driver.deleteConditional;\n if (capability?.delete !== true || deleteConditional === undefined) {\n throw new StorageError(\n `Store \"${this.name}\" does not support conditional delete.`,\n {\n code: StorageErrorCode.NOT_SUPPORTED,\n key,\n operation: 'delete',\n permanent: true,\n store: this.name,\n },\n );\n }\n\n return this.#execute({ key, operation: 'delete', store: this.name }, () =>\n deleteConditional.call(this.#driver, key, options),\n );\n }\n\n copy(\n sourceKey: string,\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void> {\n assertKey(sourceKey, 'source key');\n assertKey(destinationKey, 'destination key');\n return this.#execute(\n {\n from: sourceKey,\n operation: 'copy',\n store: this.name,\n to: destinationKey,\n },\n () => this.#driver.copy(sourceKey, destinationKey, options),\n );\n }\n\n move(\n sourceKey: string,\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void> {\n assertKey(sourceKey, 'source key');\n assertKey(destinationKey, 'destination key');\n return this.#execute(\n {\n from: sourceKey,\n operation: 'move',\n store: this.name,\n to: destinationKey,\n },\n () => this.#driver.move(sourceKey, destinationKey, options),\n );\n }\n\n /**\n * Conditionally copies a staged object to a final key. This operation does\n * not delete the source; delete it after the application commit succeeds.\n */\n promote(\n sourceKey: string,\n destinationKey: string,\n options: StoragePromotionOptions,\n ): Promise<void> {\n assertKey(sourceKey, 'source key');\n assertKey(destinationKey, 'destination key');\n const sourceEtag = options.sourceEtag;\n const sourceVersion = options.sourceVersion;\n if (sourceEtag !== undefined && sourceEtag.length === 0) {\n invalidArgument('sourceEtag must be a non-empty string.');\n }\n if (sourceVersion !== undefined && sourceVersion.length === 0) {\n invalidArgument('sourceVersion must be a non-empty string.');\n }\n if (sourceEtag === undefined && sourceVersion === undefined) {\n invalidArgument('promote requires sourceEtag, sourceVersion, or both.');\n }\n\n const capability = this.#driver.capabilities.conditionalCopy;\n const promote = this.#driver.promote;\n if (\n capability?.supported !== true ||\n promote === undefined ||\n (sourceEtag !== undefined && !capability.etag) ||\n (sourceVersion !== undefined && !capability.version)\n ) {\n throw new StorageError(\n `Store \"${this.name}\" does not support the requested conditional promotion.`,\n {\n code: StorageErrorCode.NOT_SUPPORTED,\n key: sourceKey,\n operation: 'promote',\n permanent: true,\n store: this.name,\n },\n );\n }\n\n return this.#execute(\n {\n from: sourceKey,\n operation: 'promote',\n store: this.name,\n to: destinationKey,\n },\n () => promote.call(this.#driver, sourceKey, destinationKey, options),\n );\n }\n\n list(options?: StorageListOptions): Promise<StorageListResult> {\n assertListOptions(options);\n return this.#execute({ operation: 'list', store: this.name }, () =>\n this.#driver.list(options),\n );\n }\n\n async *listAll(\n options?: StorageListOptions,\n ): AsyncGenerator<StorageObjectMetadata, void> {\n const { delimiter: _delimiter, ...walkOptions } = options ?? {};\n void _delimiter;\n let cursor = walkOptions.cursor;\n const seen = new Set<string>();\n\n do {\n const page = await this.list({\n ...walkOptions,\n ...(cursor !== undefined && { cursor }),\n });\n yield* page.items;\n cursor = page.cursor;\n if (cursor !== undefined) {\n if (seen.has(cursor)) {\n throw new StorageError(\n `Store \"${this.name}\" returned a repeated pagination cursor.`,\n {\n code: StorageErrorCode.PROVIDER,\n operation: 'list',\n permanent: true,\n store: this.name,\n },\n );\n }\n seen.add(cursor);\n }\n } while (cursor !== undefined);\n }\n\n search(\n pattern: string | RegExp,\n options?: StorageSearchOptions,\n ): AsyncIterable<StorageObjectMetadata> {\n assertSearchOptions(options);\n return this.#search(pattern, options);\n }\n\n async *#search(\n pattern: string | RegExp,\n options?: StorageSearchOptions,\n ): AsyncGenerator<StorageObjectMetadata, void> {\n const context: StorageOperationContext = {\n operation: 'search',\n store: this.name,\n };\n try {\n for (const plugin of this.#plugins) {\n await plugin.beforeOperation?.(context);\n }\n for await (const object of this.#driver.search(pattern, options)) {\n yield object;\n }\n for (const plugin of this.#plugins) {\n await plugin.afterOperation?.(context, undefined);\n }\n } catch (error) {\n const normalized = normalizeStorageError(error, {\n operation: 'search',\n store: this.name,\n });\n for (const plugin of this.#plugins) {\n try {\n await plugin.onError?.(context, normalized);\n } catch {\n // Preserve the original storage error.\n }\n }\n throw normalized;\n }\n }\n\n signDownload(\n key: string,\n options?: StorageSignedDownloadOptions,\n ): Promise<string> {\n assertKey(key);\n return this.#execute(\n { key, operation: 'signDownload', store: this.name },\n () => this.#driver.signDownload(key, options),\n );\n }\n\n signUpload(\n key: string,\n options: StorageSignedUploadOptions,\n ): Promise<StorageSignedUpload> {\n assertKey(key);\n assertSignedUploadOptions(options);\n return this.#execute(\n { key, operation: 'signUpload', store: this.name },\n () => this.#driver.signUpload(key, options),\n );\n }\n\n async uploadMany(\n items: readonly StorageUploadManyItem[],\n options?: StorageUploadManyOptions,\n ): Promise<StorageUploadManyResult> {\n const settled = await settleMany(\n items,\n (item) => item.key,\n (item) =>\n this.upload(item.key, item.body, {\n ...operationOptions(options),\n ...(item.cacheControl !== undefined && {\n cacheControl: item.cacheControl,\n }),\n ...(item.contentType !== undefined && {\n contentType: item.contentType,\n }),\n ...(item.metadata !== undefined && { metadata: item.metadata }),\n ...(item.multipart !== undefined && {\n multipart: item.multipart,\n }),\n ...(options?.onProgress !== undefined && {\n onProgress: (progress) =>\n options.onProgress?.({ ...progress, key: item.key }),\n }),\n }),\n options,\n );\n\n return {\n uploaded: settled.results,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async downloadMany(\n keys: readonly string[],\n options?: DownloadManyOptions,\n ): Promise<StorageDownloadManyResult> {\n const settled = await settleMany(\n keys,\n (key) => key,\n (key) => this.downloadStream(key, downloadOptions(options)),\n options,\n );\n return {\n downloaded: settled.results,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async headMany(\n keys: readonly string[],\n options?: BulkOperationOptions,\n ): Promise<StorageHeadManyResult> {\n const settled = await settleMany(\n keys,\n (key) => key,\n (key) => this.head(key, operationOptions(options)),\n options,\n );\n return {\n objects: settled.results,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async existsMany(\n keys: readonly string[],\n options?: BulkOperationOptions,\n ): Promise<StorageExistsManyResult> {\n const settled = await settleMany(\n keys,\n (key) => key,\n async (key) => ({ exists: await this.exists(key, options), key }),\n options,\n );\n const existing: string[] = [];\n const missing: string[] = [];\n for (const result of settled.results) {\n (result.exists ? existing : missing).push(result.key);\n }\n return {\n existing,\n missing,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async deleteMany(\n keys: readonly string[],\n options?: BulkOperationOptions,\n ): Promise<StorageDeleteManyResult> {\n const settled = await settleMany(\n keys,\n (key) => key,\n async (key) => {\n await this.delete(key, operationOptions(options));\n return key;\n },\n options,\n );\n return {\n deleted: settled.results,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async onApplicationShutdown(): Promise<void> {\n if (this.#closed) {\n return;\n }\n this.#closed = true;\n await this.#driver.close?.();\n }\n\n async #execute<Result>(\n context: StorageOperationContext,\n operation: () => Promise<Result>,\n ): Promise<Result> {\n try {\n for (const plugin of this.#plugins) {\n await plugin.beforeOperation?.(context);\n }\n const result = await operation();\n for (const plugin of this.#plugins) {\n await plugin.afterOperation?.(context, result);\n }\n return result;\n } catch (error) {\n const normalized = normalizeStorageError(error, {\n ...(context.key !== undefined && { key: context.key }),\n operation: context.operation,\n store: this.name,\n });\n for (const plugin of this.#plugins) {\n try {\n await plugin.onError?.(context, normalized);\n } catch {\n // Preserve the original storage error.\n }\n }\n throw normalized;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.client.js","sourceRoot":"","sources":["../src/storage.client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,U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,CAAC,GAAG,EAAE,CAAC;gBACtD,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,KAAK,EAAE,IAAI,CAAC,IAAI;aACjB,CAAC,CAAC;YACH,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACnC,IAAI,CAAC;oBACH,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBAC9C,CAAC;gBAAC,MAAM,CAAC;oBACP,uCAAuC;gBACzC,CAAC;YACH,CAAC;YACD,MAAM,UAAU,CAAC;QACnB,CAAC;IACH,CAAC;CACF","sourcesContent":["import { settleMany } from './internal/settle-many.js';\nimport { isCanonicalStorageEtag } from './storage-etag.js';\nimport {\n StorageError,\n StorageErrorCode,\n normalizeStorageError,\n} from './storage.error.js';\nimport type { StorageDriver } from './storage.driver.js';\nimport type {\n StorageBody,\n StorageBufferedDownloadOptions,\n StorageBulkOptions,\n StorageCapabilities,\n StorageConditionalDeleteOptions,\n StorageConditionalReadOptions,\n StorageConditionalUploadOptions,\n StorageDeleteManyResult,\n StorageDownloadManyResult,\n StorageDownloadOptions,\n StorageExistsManyResult,\n StorageHeadManyResult,\n StorageListOptions,\n StorageListResult,\n StorageObject,\n StorageObjectMetadata,\n StorageOperationContext,\n StorageOperationOptions,\n StoragePlugin,\n StoragePromotionOptions,\n StorageSearchOptions,\n StorageSignedDownloadOptions,\n StorageSignedUpload,\n StorageSignedUploadOptions,\n StorageUploadManyItem,\n StorageUploadManyOptions,\n StorageUploadManyResult,\n StorageUploadOptions,\n StorageUploadResult,\n} from './storage.types.js';\n\nexport const DEFAULT_BUFFER_LIMIT = 10 * 1024 * 1024;\n\ntype BulkOperationOptions = StorageBulkOptions & StorageOperationOptions;\ntype DownloadManyOptions = StorageBulkOptions & StorageDownloadOptions;\n\nfunction assertKey(key: string, label = 'key'): void {\n if (typeof key !== 'string' || key.length === 0) {\n throw new StorageError(`${label} must be a non-empty string.`, {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n });\n }\n}\n\nfunction invalidArgument(message: string): never {\n throw new StorageError(message, {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n });\n}\n\nfunction assertPositiveSafeInteger(\n value: number | undefined,\n label: string,\n): void {\n if (value !== undefined && (!Number.isSafeInteger(value) || value <= 0)) {\n invalidArgument(`${label} must be a positive safe integer.`);\n }\n}\n\nfunction assertDownloadOptions(options?: StorageDownloadOptions): void {\n const range = options?.range;\n if (range === undefined) {\n return;\n }\n if (!Number.isSafeInteger(range.start) || range.start < 0) {\n invalidArgument('range.start must be a non-negative safe integer.');\n }\n if (\n range.end !== undefined &&\n (!Number.isSafeInteger(range.end) || range.end < range.start)\n ) {\n invalidArgument(\n 'range.end must be a safe integer greater than or equal to range.start.',\n );\n }\n}\n\nfunction assertListOptions(options?: StorageListOptions): void {\n if (options?.delimiter !== undefined && options.delimiter.length === 0) {\n invalidArgument('delimiter must be a non-empty string.');\n }\n assertPositiveSafeInteger(options?.limit, 'limit');\n}\n\nfunction assertSearchOptions(options?: StorageSearchOptions): void {\n assertPositiveSafeInteger(options?.limit, 'limit');\n assertPositiveSafeInteger(options?.maxResults, 'maxResults');\n}\n\nfunction assertSignedUploadOptions(options: StorageSignedUploadOptions): void {\n assertPositiveSafeInteger(options.expiresIn, 'expiresIn');\n assertPositiveSafeInteger(options.maxSize, 'maxSize');\n if (\n options.minSize !== undefined &&\n (!Number.isSafeInteger(options.minSize) || options.minSize < 0)\n ) {\n invalidArgument('minSize must be a non-negative safe integer.');\n }\n if (\n options.minSize !== undefined &&\n options.maxSize !== undefined &&\n options.minSize > options.maxSize\n ) {\n invalidArgument('minSize cannot be greater than maxSize.');\n }\n}\n\nfunction operationOptions(\n options?: BulkOperationOptions,\n): StorageOperationOptions | undefined {\n if (options === undefined) {\n return undefined;\n }\n return {\n ...(options.retries !== undefined && { retries: options.retries }),\n ...(options.signal !== undefined && { signal: options.signal }),\n ...(options.timeout !== undefined && { timeout: options.timeout }),\n };\n}\n\nfunction downloadOptions(\n options?: DownloadManyOptions,\n): StorageDownloadOptions | undefined {\n if (options === undefined) {\n return undefined;\n }\n return {\n ...operationOptions(options),\n ...(options.range !== undefined && { range: options.range }),\n };\n}\n\nasync function collectBody(\n object: StorageObject,\n maxBytes: number,\n): Promise<Uint8Array> {\n if (maxBytes !== Infinity && (!Number.isFinite(maxBytes) || maxBytes < 0)) {\n await object.body.cancel().catch(() => undefined);\n throw new StorageError(\n 'maxBytes must be a non-negative finite number or Infinity.',\n {\n code: StorageErrorCode.INVALID_ARGUMENT,\n key: object.key,\n permanent: true,\n },\n );\n }\n\n if (maxBytes !== Infinity && object.size > maxBytes) {\n await object.body.cancel().catch(() => undefined);\n throw new StorageError(\n `Object \"${object.key}\" is ${object.size} bytes, exceeding the ${maxBytes}-byte buffer limit.`,\n {\n code: StorageErrorCode.LIMIT_EXCEEDED,\n key: object.key,\n permanent: true,\n },\n );\n }\n\n const chunks: Uint8Array[] = [];\n let total = 0;\n const reader = object.body.getReader();\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n total += value.byteLength;\n if (maxBytes !== Infinity && total > maxBytes) {\n await reader.cancel().catch(() => undefined);\n throw new StorageError(\n `Object \"${object.key}\" exceeded the ${maxBytes}-byte buffer limit while downloading.`,\n {\n code: StorageErrorCode.LIMIT_EXCEEDED,\n key: object.key,\n permanent: true,\n },\n );\n }\n chunks.push(value);\n }\n } finally {\n reader.releaseLock();\n }\n\n const bytes = new Uint8Array(total);\n let offset = 0;\n for (const chunk of chunks) {\n bytes.set(chunk, offset);\n offset += chunk.byteLength;\n }\n return bytes;\n}\n\nexport interface StorageFileHandle {\n readonly key: string;\n upload(\n body: StorageBody,\n options?: StorageUploadOptions,\n ): Promise<StorageUploadResult>;\n uploadConditional(\n body: StorageBody,\n options: StorageConditionalUploadOptions,\n ): Promise<StorageUploadResult>;\n download(options?: StorageDownloadOptions): Promise<StorageObject>;\n downloadConditional(\n options: StorageConditionalReadOptions,\n ): Promise<StorageObject>;\n bytes(options?: StorageBufferedDownloadOptions): Promise<Uint8Array>;\n text(options?: StorageBufferedDownloadOptions): Promise<string>;\n head(options?: StorageOperationOptions): Promise<StorageObjectMetadata>;\n exists(options?: StorageOperationOptions): Promise<boolean>;\n delete(options?: StorageOperationOptions): Promise<void>;\n deleteConditional(options: StorageConditionalDeleteOptions): Promise<void>;\n signDownload(options?: StorageSignedDownloadOptions): Promise<string>;\n signUpload(options: StorageSignedUploadOptions): Promise<StorageSignedUpload>;\n copyTo(\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void>;\n moveTo(\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void>;\n /** Conditionally copies this staged object and deliberately retains it. */\n promoteTo(\n destinationKey: string,\n options: StoragePromotionOptions,\n ): Promise<void>;\n}\n\nexport class StorageClient {\n readonly #driver: StorageDriver;\n readonly #plugins: readonly StoragePlugin[];\n #closed = false;\n\n constructor(\n readonly name: string,\n driver: StorageDriver,\n plugins: readonly StoragePlugin[] = [],\n ) {\n assertKey(name, 'store name');\n this.#driver = driver;\n this.#plugins = [...plugins];\n }\n\n get driverName(): string {\n return this.#driver.name;\n }\n\n get capabilities(): Readonly<StorageCapabilities> {\n return this.#driver.capabilities;\n }\n\n file(key: string): StorageFileHandle {\n assertKey(key);\n return {\n copyTo: (destinationKey, options) =>\n this.copy(key, destinationKey, options),\n delete: (options) => this.delete(key, options),\n deleteConditional: (options) => this.deleteConditional(key, options),\n download: (options) => this.downloadStream(key, options),\n downloadConditional: (options) => this.downloadConditional(key, options),\n exists: (options) => this.exists(key, options),\n head: (options) => this.head(key, options),\n key,\n moveTo: (destinationKey, options) =>\n this.move(key, destinationKey, options),\n promoteTo: (destinationKey, options) =>\n this.promote(key, destinationKey, options),\n signDownload: (options) => this.signDownload(key, options),\n signUpload: (options) => this.signUpload(key, options),\n bytes: (options) => this.downloadBytes(key, options),\n text: (options) => this.downloadText(key, options),\n upload: (body, options) => this.upload(key, body, options),\n uploadConditional: (body, options) =>\n this.uploadConditional(key, body, options),\n };\n }\n\n upload(\n key: string,\n body: StorageBody,\n options?: StorageUploadOptions,\n ): Promise<StorageUploadResult> {\n assertKey(key);\n return this.#execute({ key, operation: 'upload', store: this.name }, () =>\n this.#driver.upload(key, body, options),\n );\n }\n\n uploadConditional(\n key: string,\n body: StorageBody,\n options: StorageConditionalUploadOptions,\n ): Promise<StorageUploadResult> {\n assertKey(key);\n const condition = options.condition;\n if (\n condition === undefined ||\n (condition.type !== 'create' && condition.type !== 'replace')\n ) {\n invalidArgument('condition.type must be \"create\" or \"replace\".');\n }\n if (\n condition.type === 'replace' &&\n !isCanonicalStorageEtag(condition.etag)\n ) {\n invalidArgument('condition.etag must be a canonical storage ETag.');\n }\n\n const capability =\n condition.type === 'create'\n ? this.#driver.capabilities.conditionalCreate\n : this.#driver.capabilities.conditionalReplace;\n const uploadConditional = this.#driver.uploadConditional;\n const multipartRequested =\n options.multipart !== undefined && options.multipart !== false;\n const multipartCapability =\n this.#driver.capabilities.conditionalMultipartCompletion;\n const multipartSupported =\n !multipartRequested ||\n (condition.type === 'create'\n ? multipartCapability?.create === true\n : multipartCapability?.replace === true);\n if (\n capability === undefined ||\n !multipartSupported ||\n uploadConditional === undefined\n ) {\n throw new StorageError(\n `Store \"${this.name}\" does not support the requested conditional upload.`,\n {\n code: StorageErrorCode.NOT_SUPPORTED,\n key,\n operation: 'upload',\n permanent: true,\n store: this.name,\n },\n );\n }\n\n return this.#execute({ key, operation: 'upload', store: this.name }, () =>\n uploadConditional.call(this.#driver, key, body, options),\n );\n }\n\n downloadStream(\n key: string,\n options?: StorageDownloadOptions,\n ): Promise<StorageObject> {\n assertKey(key);\n assertDownloadOptions(options);\n return this.#execute({ key, operation: 'download', store: this.name }, () =>\n this.#driver.download(key, options),\n );\n }\n\n downloadConditional(\n key: string,\n options: StorageConditionalReadOptions,\n ): Promise<StorageObject> {\n assertKey(key);\n assertDownloadOptions(options);\n if (\n options === undefined ||\n options.condition === undefined ||\n typeof options.condition !== 'object' ||\n options.condition === null\n ) {\n invalidArgument('conditional read requires a condition object.');\n }\n const { etag, version } = options.condition;\n if (etag !== undefined && !isCanonicalStorageEtag(etag)) {\n invalidArgument('condition.etag must be a canonical storage ETag.');\n }\n if (\n version !== undefined &&\n (typeof version !== 'string' || version.length === 0)\n ) {\n invalidArgument('condition.version must be a non-empty string.');\n }\n if (etag === undefined && version === undefined) {\n invalidArgument('conditional read requires an etag, version, or both.');\n }\n\n const capability = this.#driver.capabilities.conditionalRead;\n const downloadConditional = this.#driver.downloadConditional;\n if (\n downloadConditional === undefined ||\n capability === undefined ||\n (etag !== undefined && !capability.etag) ||\n (version !== undefined && !capability.version)\n ) {\n throw new StorageError(\n `Store \"${this.name}\" does not support the requested conditional read.`,\n {\n code: StorageErrorCode.NOT_SUPPORTED,\n key,\n operation: 'download',\n permanent: true,\n store: this.name,\n },\n );\n }\n\n return this.#execute({ key, operation: 'download', store: this.name }, () =>\n downloadConditional.call(this.#driver, key, options),\n );\n }\n\n async downloadBytes(\n key: string,\n options?: StorageBufferedDownloadOptions,\n ): Promise<Uint8Array> {\n const { maxBytes = DEFAULT_BUFFER_LIMIT, ...download } = options ?? {};\n const object = await this.downloadStream(key, download);\n return collectBody(object, maxBytes);\n }\n\n async downloadText(\n key: string,\n options?: StorageBufferedDownloadOptions,\n ): Promise<string> {\n return new TextDecoder().decode(await this.downloadBytes(key, options));\n }\n\n async downloadJson<Result = unknown>(\n key: string,\n options?: StorageBufferedDownloadOptions,\n ): Promise<Result> {\n const text = await this.downloadText(key, options);\n try {\n return JSON.parse(text) as Result;\n } catch (error) {\n throw new StorageError(`Object \"${key}\" does not contain valid JSON.`, {\n cause: error,\n code: StorageErrorCode.INVALID_ARGUMENT,\n key,\n operation: 'download',\n permanent: true,\n store: this.name,\n });\n }\n }\n\n head(\n key: string,\n options?: StorageOperationOptions,\n ): Promise<StorageObjectMetadata> {\n assertKey(key);\n return this.#execute({ key, operation: 'head', store: this.name }, () =>\n this.#driver.head(key, options),\n );\n }\n\n exists(key: string, options?: StorageOperationOptions): Promise<boolean> {\n assertKey(key);\n return this.#execute({ key, operation: 'exists', store: this.name }, () =>\n this.#driver.exists(key, options),\n );\n }\n\n delete(key: string, options?: StorageOperationOptions): Promise<void> {\n assertKey(key);\n return this.#execute({ key, operation: 'delete', store: this.name }, () =>\n this.#driver.delete(key, options),\n );\n }\n\n deleteConditional(\n key: string,\n options: StorageConditionalDeleteOptions,\n ): Promise<void> {\n assertKey(key);\n if (\n options.condition === undefined ||\n !isCanonicalStorageEtag(options.condition.etag)\n ) {\n invalidArgument('condition.etag must be a canonical storage ETag.');\n }\n\n const capability = this.#driver.capabilities.conditionalDelete;\n const deleteConditional = this.#driver.deleteConditional;\n if (capability?.etag !== true || deleteConditional === undefined) {\n throw new StorageError(\n `Store \"${this.name}\" does not support conditional delete.`,\n {\n code: StorageErrorCode.NOT_SUPPORTED,\n key,\n operation: 'delete',\n permanent: true,\n store: this.name,\n },\n );\n }\n\n return this.#execute({ key, operation: 'delete', store: this.name }, () =>\n deleteConditional.call(this.#driver, key, options),\n );\n }\n\n copy(\n sourceKey: string,\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void> {\n assertKey(sourceKey, 'source key');\n assertKey(destinationKey, 'destination key');\n return this.#execute(\n {\n from: sourceKey,\n operation: 'copy',\n store: this.name,\n to: destinationKey,\n },\n () => this.#driver.copy(sourceKey, destinationKey, options),\n );\n }\n\n move(\n sourceKey: string,\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void> {\n assertKey(sourceKey, 'source key');\n assertKey(destinationKey, 'destination key');\n return this.#execute(\n {\n from: sourceKey,\n operation: 'move',\n store: this.name,\n to: destinationKey,\n },\n () => this.#driver.move(sourceKey, destinationKey, options),\n );\n }\n\n /**\n * Conditionally copies a staged object to a final key. This operation does\n * not delete the source; delete it after the application commit succeeds.\n */\n promote(\n sourceKey: string,\n destinationKey: string,\n options: StoragePromotionOptions,\n ): Promise<void> {\n assertKey(sourceKey, 'source key');\n assertKey(destinationKey, 'destination key');\n const sourceEtag = options.sourceEtag;\n const sourceVersion = options.sourceVersion;\n if (sourceEtag !== undefined && !isCanonicalStorageEtag(sourceEtag)) {\n invalidArgument('sourceEtag must be a canonical storage ETag.');\n }\n if (\n sourceVersion !== undefined &&\n (typeof sourceVersion !== 'string' || sourceVersion.length === 0)\n ) {\n invalidArgument('sourceVersion must be a non-empty string.');\n }\n const destination = options.destination;\n if (\n destination !== undefined &&\n (typeof destination !== 'object' ||\n destination === null ||\n (destination.type !== 'create' && destination.type !== 'replace'))\n ) {\n invalidArgument('destination.type must be \"create\" or \"replace\".');\n }\n if (\n sourceEtag === undefined &&\n sourceVersion === undefined &&\n destination === undefined\n ) {\n invalidArgument('promote requires a source or destination precondition.');\n }\n if (\n destination?.type === 'replace' &&\n !isCanonicalStorageEtag(destination.etag)\n ) {\n invalidArgument('destination.etag must be a canonical storage ETag.');\n }\n\n const sourceCapability = this.#driver.capabilities.conditionalCopySource;\n const destinationCapability =\n this.#driver.capabilities.conditionalCopyDestination;\n const promote = this.#driver.promote;\n if (\n promote === undefined ||\n (sourceEtag !== undefined && sourceCapability?.etag !== true) ||\n (sourceVersion !== undefined && sourceCapability?.version !== true) ||\n (destination?.type === 'create' &&\n destinationCapability?.create !== true) ||\n (destination?.type === 'replace' &&\n destinationCapability?.replace !== true) ||\n (destination !== undefined &&\n (sourceEtag !== undefined || sourceVersion !== undefined) &&\n destinationCapability?.atomicWithSource !== true)\n ) {\n throw new StorageError(\n `Store \"${this.name}\" does not support the requested conditional promotion.`,\n {\n code: StorageErrorCode.NOT_SUPPORTED,\n key: sourceKey,\n operation: 'promote',\n permanent: true,\n store: this.name,\n },\n );\n }\n\n return this.#execute(\n {\n from: sourceKey,\n operation: 'promote',\n store: this.name,\n to: destinationKey,\n },\n () => promote.call(this.#driver, sourceKey, destinationKey, options),\n );\n }\n\n list(options?: StorageListOptions): Promise<StorageListResult> {\n assertListOptions(options);\n return this.#execute({ operation: 'list', store: this.name }, () =>\n this.#driver.list(options),\n );\n }\n\n async *listAll(\n options?: StorageListOptions,\n ): AsyncGenerator<StorageObjectMetadata, void> {\n const { delimiter: _delimiter, ...walkOptions } = options ?? {};\n void _delimiter;\n let cursor = walkOptions.cursor;\n const seen = new Set<string>();\n\n do {\n const page = await this.list({\n ...walkOptions,\n ...(cursor !== undefined && { cursor }),\n });\n yield* page.items;\n cursor = page.cursor;\n if (cursor !== undefined) {\n if (seen.has(cursor)) {\n throw new StorageError(\n `Store \"${this.name}\" returned a repeated pagination cursor.`,\n {\n code: StorageErrorCode.PROVIDER,\n operation: 'list',\n permanent: true,\n store: this.name,\n },\n );\n }\n seen.add(cursor);\n }\n } while (cursor !== undefined);\n }\n\n search(\n pattern: string | RegExp,\n options?: StorageSearchOptions,\n ): AsyncIterable<StorageObjectMetadata> {\n assertSearchOptions(options);\n return this.#search(pattern, options);\n }\n\n async *#search(\n pattern: string | RegExp,\n options?: StorageSearchOptions,\n ): AsyncGenerator<StorageObjectMetadata, void> {\n const context: StorageOperationContext = {\n operation: 'search',\n store: this.name,\n };\n try {\n for (const plugin of this.#plugins) {\n await plugin.beforeOperation?.(context);\n }\n for await (const object of this.#driver.search(pattern, options)) {\n yield object;\n }\n for (const plugin of this.#plugins) {\n await plugin.afterOperation?.(context, undefined);\n }\n } catch (error) {\n const normalized = normalizeStorageError(error, {\n operation: 'search',\n store: this.name,\n });\n for (const plugin of this.#plugins) {\n try {\n await plugin.onError?.(context, normalized);\n } catch {\n // Preserve the original storage error.\n }\n }\n throw normalized;\n }\n }\n\n signDownload(\n key: string,\n options?: StorageSignedDownloadOptions,\n ): Promise<string> {\n assertKey(key);\n return this.#execute(\n { key, operation: 'signDownload', store: this.name },\n () => this.#driver.signDownload(key, options),\n );\n }\n\n signUpload(\n key: string,\n options: StorageSignedUploadOptions,\n ): Promise<StorageSignedUpload> {\n assertKey(key);\n assertSignedUploadOptions(options);\n return this.#execute(\n { key, operation: 'signUpload', store: this.name },\n () => this.#driver.signUpload(key, options),\n );\n }\n\n async uploadMany(\n items: readonly StorageUploadManyItem[],\n options?: StorageUploadManyOptions,\n ): Promise<StorageUploadManyResult> {\n const settled = await settleMany(\n items,\n (item) => item.key,\n (item) =>\n this.upload(item.key, item.body, {\n ...operationOptions(options),\n ...(item.cacheControl !== undefined && {\n cacheControl: item.cacheControl,\n }),\n ...(item.contentType !== undefined && {\n contentType: item.contentType,\n }),\n ...(item.metadata !== undefined && { metadata: item.metadata }),\n ...(item.multipart !== undefined && {\n multipart: item.multipart,\n }),\n ...(options?.onProgress !== undefined && {\n onProgress: (progress) =>\n options.onProgress?.({ ...progress, key: item.key }),\n }),\n }),\n options,\n );\n\n return {\n uploaded: settled.results,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async downloadMany(\n keys: readonly string[],\n options?: DownloadManyOptions,\n ): Promise<StorageDownloadManyResult> {\n const settled = await settleMany(\n keys,\n (key) => key,\n (key) => this.downloadStream(key, downloadOptions(options)),\n options,\n );\n return {\n downloaded: settled.results,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async headMany(\n keys: readonly string[],\n options?: BulkOperationOptions,\n ): Promise<StorageHeadManyResult> {\n const settled = await settleMany(\n keys,\n (key) => key,\n (key) => this.head(key, operationOptions(options)),\n options,\n );\n return {\n objects: settled.results,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async existsMany(\n keys: readonly string[],\n options?: BulkOperationOptions,\n ): Promise<StorageExistsManyResult> {\n const settled = await settleMany(\n keys,\n (key) => key,\n async (key) => ({ exists: await this.exists(key, options), key }),\n options,\n );\n const existing: string[] = [];\n const missing: string[] = [];\n for (const result of settled.results) {\n (result.exists ? existing : missing).push(result.key);\n }\n return {\n existing,\n missing,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async deleteMany(\n keys: readonly string[],\n options?: BulkOperationOptions,\n ): Promise<StorageDeleteManyResult> {\n const settled = await settleMany(\n keys,\n (key) => key,\n async (key) => {\n await this.delete(key, operationOptions(options));\n return key;\n },\n options,\n );\n return {\n deleted: settled.results,\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async onApplicationShutdown(): Promise<void> {\n if (this.#closed) {\n return;\n }\n this.#closed = true;\n await this.#driver.close?.();\n }\n\n async #execute<Result>(\n context: StorageOperationContext,\n operation: () => Promise<Result>,\n ): Promise<Result> {\n try {\n for (const plugin of this.#plugins) {\n await plugin.beforeOperation?.(context);\n }\n const result = await operation();\n for (const plugin of this.#plugins) {\n await plugin.afterOperation?.(context, result);\n }\n return result;\n } catch (error) {\n const normalized = normalizeStorageError(error, {\n ...(context.key !== undefined && { key: context.key }),\n operation: context.operation,\n store: this.name,\n });\n for (const plugin of this.#plugins) {\n try {\n await plugin.onError?.(context, normalized);\n } catch {\n // Preserve the original storage error.\n }\n }\n throw normalized;\n }\n }\n}\n"]}
|
package/dist/storage.driver.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { StorageBody, StorageCapabilities, StorageConditionalDeleteOptions, StorageConditionalUploadOptions, StorageDownloadOptions, StorageListOptions, StorageListResult, StorageObject, StorageObjectMetadata, StorageOperationOptions, StoragePromotionOptions, StorageSearchOptions, StorageSignedDownloadOptions, StorageSignedUpload, StorageSignedUploadOptions, StorageUploadOptions, StorageUploadResult } from './storage.types.js';
|
|
1
|
+
import type { StorageBody, StorageCapabilities, StorageConditionalDeleteOptions, StorageConditionalReadOptions, StorageConditionalUploadOptions, StorageDownloadOptions, StorageListOptions, StorageListResult, StorageObject, StorageObjectMetadata, StorageOperationOptions, StoragePromotionOptions, StorageSearchOptions, StorageSignedDownloadOptions, StorageSignedUpload, StorageSignedUploadOptions, StorageUploadOptions, StorageUploadResult } from './storage.types.js';
|
|
2
2
|
export interface StorageDriver {
|
|
3
3
|
readonly name: string;
|
|
4
4
|
readonly capabilities: StorageCapabilities;
|
|
5
5
|
upload(key: string, body: StorageBody, options?: StorageUploadOptions): Promise<StorageUploadResult>;
|
|
6
6
|
uploadConditional?(key: string, body: StorageBody, options: StorageConditionalUploadOptions): Promise<StorageUploadResult>;
|
|
7
7
|
download(key: string, options?: StorageDownloadOptions): Promise<StorageObject>;
|
|
8
|
+
downloadConditional?(key: string, options: StorageConditionalReadOptions): Promise<StorageObject>;
|
|
8
9
|
head(key: string, options?: StorageOperationOptions): Promise<StorageObjectMetadata>;
|
|
9
10
|
exists(key: string, options?: StorageOperationOptions): Promise<boolean>;
|
|
10
11
|
delete(key: string, options?: StorageOperationOptions): Promise<void>;
|
|
@@ -16,6 +17,25 @@ export interface StorageDriver {
|
|
|
16
17
|
* in place so applications can delete it only after their metadata commit.
|
|
17
18
|
*/
|
|
18
19
|
promote?(sourceKey: string, destinationKey: string, options: StoragePromotionOptions): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Lists one page and, when more entries remain, returns an opaque cursor for
|
|
22
|
+
* the next logical position. Cursors are bound to the request's `prefix` and
|
|
23
|
+
* `delimiter`; callers may choose a different supported `limit` when they
|
|
24
|
+
* resume.
|
|
25
|
+
*
|
|
26
|
+
* A cursor is non-consuming. Reusing it, including after following any
|
|
27
|
+
* descendant cursor, must resume from the same logical position while the
|
|
28
|
+
* provider namespace is unchanged. It must also work with an independently
|
|
29
|
+
* constructed compatible driver and client that address the same store with
|
|
30
|
+
* the same backend configuration while the provider token remains valid and
|
|
31
|
+
* available. Drivers must not make cursor state local to one process, client,
|
|
32
|
+
* or session.
|
|
33
|
+
*
|
|
34
|
+
* This contract does not provide snapshot isolation: concurrent namespace
|
|
35
|
+
* mutations may change subsequent pages. It does not guarantee provider
|
|
36
|
+
* token lifetime or backend availability, and provider invalidation remains
|
|
37
|
+
* an ordinary list-operation failure.
|
|
38
|
+
*/
|
|
19
39
|
list(options?: StorageListOptions): Promise<StorageListResult>;
|
|
20
40
|
search(pattern: string | RegExp, options?: StorageSearchOptions): AsyncIterable<StorageObjectMetadata>;
|
|
21
41
|
signDownload(key: string, options?: StorageSignedDownloadOptions): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.driver.d.ts","sourceRoot":"","sources":["../src/storage.driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,mBAAmB,EACnB,+BAA+B,EAC/B,+BAA+B,EAC/B,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,mBAAmB,EACnB,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAE3C,MAAM,CACJ,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,WAAW,EACjB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChC,iBAAiB,CAAC,CAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChC,QAAQ,CACN,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1B,IAAI,CACF,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAClC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzE,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GA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E,MAAM,EACtB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,CACN,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC/D,MAAM,CACJ,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACxC,YAAY,CACV,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,UAAU,CACR,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChC,KAAK,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.driver.js","sourceRoot":"","sources":["../src/storage.driver.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n StorageBody,\n StorageCapabilities,\n StorageConditionalDeleteOptions,\n StorageConditionalUploadOptions,\n StorageDownloadOptions,\n StorageListOptions,\n StorageListResult,\n StorageObject,\n StorageObjectMetadata,\n StorageOperationOptions,\n StoragePromotionOptions,\n StorageSearchOptions,\n StorageSignedDownloadOptions,\n StorageSignedUpload,\n StorageSignedUploadOptions,\n StorageUploadOptions,\n StorageUploadResult,\n} from './storage.types.js';\n\nexport interface StorageDriver {\n readonly name: string;\n readonly capabilities: StorageCapabilities;\n\n upload(\n key: string,\n body: StorageBody,\n options?: StorageUploadOptions,\n ): Promise<StorageUploadResult>;\n uploadConditional?(\n key: string,\n body: StorageBody,\n options: StorageConditionalUploadOptions,\n ): Promise<StorageUploadResult>;\n download(\n key: string,\n options?: StorageDownloadOptions,\n ): Promise<StorageObject>;\n head(\n key: string,\n options?: StorageOperationOptions,\n ): Promise<StorageObjectMetadata>;\n exists(key: string, options?: StorageOperationOptions): Promise<boolean>;\n delete(key: string, options?: StorageOperationOptions): Promise<void>;\n deleteConditional?(\n key: string,\n options: StorageConditionalDeleteOptions,\n ): Promise<void>;\n copy(\n sourceKey: string,\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void>;\n move(\n sourceKey: string,\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void>;\n /**\n * Conditionally copies a staged object to its final key. The source remains\n * in place so applications can delete it only after their metadata commit.\n */\n promote?(\n sourceKey: string,\n destinationKey: string,\n options: StoragePromotionOptions,\n ): Promise<void>;\n list(options?: StorageListOptions): Promise<StorageListResult>;\n search(\n pattern: string | RegExp,\n options?: StorageSearchOptions,\n ): AsyncIterable<StorageObjectMetadata>;\n signDownload(\n key: string,\n options?: StorageSignedDownloadOptions,\n ): Promise<string>;\n signUpload(\n key: string,\n options: StorageSignedUploadOptions,\n ): Promise<StorageSignedUpload>;\n close?(): void | Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.driver.js","sourceRoot":"","sources":["../src/storage.driver.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n StorageBody,\n StorageCapabilities,\n StorageConditionalDeleteOptions,\n StorageConditionalReadOptions,\n StorageConditionalUploadOptions,\n StorageDownloadOptions,\n StorageListOptions,\n StorageListResult,\n StorageObject,\n StorageObjectMetadata,\n StorageOperationOptions,\n StoragePromotionOptions,\n StorageSearchOptions,\n StorageSignedDownloadOptions,\n StorageSignedUpload,\n StorageSignedUploadOptions,\n StorageUploadOptions,\n StorageUploadResult,\n} from './storage.types.js';\n\nexport interface StorageDriver {\n readonly name: string;\n readonly capabilities: StorageCapabilities;\n\n upload(\n key: string,\n body: StorageBody,\n options?: StorageUploadOptions,\n ): Promise<StorageUploadResult>;\n uploadConditional?(\n key: string,\n body: StorageBody,\n options: StorageConditionalUploadOptions,\n ): Promise<StorageUploadResult>;\n download(\n key: string,\n options?: StorageDownloadOptions,\n ): Promise<StorageObject>;\n downloadConditional?(\n key: string,\n options: StorageConditionalReadOptions,\n ): Promise<StorageObject>;\n head(\n key: string,\n options?: StorageOperationOptions,\n ): Promise<StorageObjectMetadata>;\n exists(key: string, options?: StorageOperationOptions): Promise<boolean>;\n delete(key: string, options?: StorageOperationOptions): Promise<void>;\n deleteConditional?(\n key: string,\n options: StorageConditionalDeleteOptions,\n ): Promise<void>;\n copy(\n sourceKey: string,\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void>;\n move(\n sourceKey: string,\n destinationKey: string,\n options?: StorageOperationOptions,\n ): Promise<void>;\n /**\n * Conditionally copies a staged object to its final key. The source remains\n * in place so applications can delete it only after their metadata commit.\n */\n promote?(\n sourceKey: string,\n destinationKey: string,\n options: StoragePromotionOptions,\n ): Promise<void>;\n /**\n * Lists one page and, when more entries remain, returns an opaque cursor for\n * the next logical position. Cursors are bound to the request's `prefix` and\n * `delimiter`; callers may choose a different supported `limit` when they\n * resume.\n *\n * A cursor is non-consuming. Reusing it, including after following any\n * descendant cursor, must resume from the same logical position while the\n * provider namespace is unchanged. It must also work with an independently\n * constructed compatible driver and client that address the same store with\n * the same backend configuration while the provider token remains valid and\n * available. Drivers must not make cursor state local to one process, client,\n * or session.\n *\n * This contract does not provide snapshot isolation: concurrent namespace\n * mutations may change subsequent pages. It does not guarantee provider\n * token lifetime or backend availability, and provider invalidation remains\n * an ordinary list-operation failure.\n */\n list(options?: StorageListOptions): Promise<StorageListResult>;\n search(\n pattern: string | RegExp,\n options?: StorageSearchOptions,\n ): AsyncIterable<StorageObjectMetadata>;\n signDownload(\n key: string,\n options?: StorageSignedDownloadOptions,\n ): Promise<string>;\n signUpload(\n key: string,\n options: StorageSignedUploadOptions,\n ): Promise<StorageSignedUpload>;\n close?(): void | Promise<void>;\n}\n"]}
|
package/dist/storage.types.d.ts
CHANGED
|
@@ -24,6 +24,17 @@ export interface StoragePromotionOptions extends StorageOperationOptions {
|
|
|
24
24
|
sourceEtag?: string;
|
|
25
25
|
/** Copy this immutable provider version of the source object. */
|
|
26
26
|
sourceVersion?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Protect the destination in the same provider copy request. When a source
|
|
29
|
+
* condition is also present, the provider profile must explicitly declare
|
|
30
|
+
* that both predicates are evaluated atomically.
|
|
31
|
+
*/
|
|
32
|
+
destination?: {
|
|
33
|
+
type: 'create';
|
|
34
|
+
} | {
|
|
35
|
+
type: 'replace';
|
|
36
|
+
etag: string;
|
|
37
|
+
};
|
|
27
38
|
}
|
|
28
39
|
export interface StorageMultipartOptions {
|
|
29
40
|
partSize?: number;
|
|
@@ -63,6 +74,7 @@ export interface StorageUploadResult {
|
|
|
63
74
|
key: string;
|
|
64
75
|
size: number;
|
|
65
76
|
contentType: string;
|
|
77
|
+
/** Canonical bare provider ETag; pass it back unchanged as a condition. */
|
|
66
78
|
etag?: string;
|
|
67
79
|
lastModified?: Date;
|
|
68
80
|
}
|
|
@@ -71,6 +83,7 @@ export interface StorageObjectMetadata {
|
|
|
71
83
|
name: string;
|
|
72
84
|
size: number;
|
|
73
85
|
contentType: string;
|
|
86
|
+
/** Canonical bare provider ETag; pass it back unchanged as a condition. */
|
|
74
87
|
etag?: string;
|
|
75
88
|
lastModified?: Date;
|
|
76
89
|
metadata?: Record<string, string>;
|
|
@@ -85,6 +98,21 @@ export interface StorageByteRange {
|
|
|
85
98
|
export interface StorageDownloadOptions extends StorageOperationOptions {
|
|
86
99
|
range?: StorageByteRange;
|
|
87
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Reads one exact observed object identity. At least one provider identity is
|
|
103
|
+
* required; a driver must never emulate this with a separate head request.
|
|
104
|
+
*/
|
|
105
|
+
export type StorageConditionalReadOptions = StorageDownloadOptions & ({
|
|
106
|
+
condition: {
|
|
107
|
+
etag: string;
|
|
108
|
+
version?: string;
|
|
109
|
+
};
|
|
110
|
+
} | {
|
|
111
|
+
condition: {
|
|
112
|
+
etag?: string;
|
|
113
|
+
version: string;
|
|
114
|
+
};
|
|
115
|
+
});
|
|
88
116
|
export interface StorageBufferedDownloadOptions extends StorageDownloadOptions {
|
|
89
117
|
/**
|
|
90
118
|
* Maximum number of bytes buffered in memory. Defaults to 10 MiB.
|
|
@@ -94,6 +122,15 @@ export interface StorageBufferedDownloadOptions extends StorageDownloadOptions {
|
|
|
94
122
|
}
|
|
95
123
|
export interface StorageListOptions extends StorageOperationOptions {
|
|
96
124
|
prefix?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Opaque, non-consuming continuation token returned by `list`.
|
|
127
|
+
*
|
|
128
|
+
* The token is bound to the original `prefix` and `delimiter`, but callers
|
|
129
|
+
* may change `limit` when resuming. While the provider token remains valid
|
|
130
|
+
* and available, replaying it against unchanged provider state must return
|
|
131
|
+
* the same logical position; token bytes returned for the following position
|
|
132
|
+
* need not be stable.
|
|
133
|
+
*/
|
|
97
134
|
cursor?: string;
|
|
98
135
|
limit?: number;
|
|
99
136
|
delimiter?: string;
|
|
@@ -101,6 +138,10 @@ export interface StorageListOptions extends StorageOperationOptions {
|
|
|
101
138
|
export interface StorageListResult {
|
|
102
139
|
items: StorageObjectMetadata[];
|
|
103
140
|
prefixes?: string[];
|
|
141
|
+
/**
|
|
142
|
+
* Opaque, replayable continuation token for the next logical position.
|
|
143
|
+
* See `StorageDriver.list` for the complete portability contract.
|
|
144
|
+
*/
|
|
104
145
|
cursor?: string;
|
|
105
146
|
}
|
|
106
147
|
export type StorageSearchMatch = 'glob' | 'regex' | 'substring' | 'exact';
|
|
@@ -134,23 +175,43 @@ export interface StorageSignedUrlCapability {
|
|
|
134
175
|
supported: boolean;
|
|
135
176
|
maxExpiresIn?: number;
|
|
136
177
|
}
|
|
137
|
-
export interface
|
|
138
|
-
|
|
178
|
+
export interface StorageConditionalWriteCapability {
|
|
179
|
+
/** A successful write returns the provider ETag identifying its result. */
|
|
180
|
+
resultEtag: boolean;
|
|
181
|
+
}
|
|
182
|
+
export interface StorageConditionalDeleteCapability {
|
|
183
|
+
/** Delete can compare the current object against an opaque provider ETag. */
|
|
184
|
+
etag: boolean;
|
|
185
|
+
}
|
|
186
|
+
export interface StorageConditionalReadCapability {
|
|
187
|
+
/** Read can require the current object to match an opaque provider ETag. */
|
|
188
|
+
etag: boolean;
|
|
189
|
+
/** Read can select an immutable provider version. */
|
|
190
|
+
version: boolean;
|
|
191
|
+
}
|
|
192
|
+
export interface StorageConditionalCopySourceCapability {
|
|
193
|
+
/** Copy can require the source to match an opaque provider ETag. */
|
|
139
194
|
etag: boolean;
|
|
195
|
+
/** Copy can select an immutable source version. */
|
|
140
196
|
version: boolean;
|
|
141
197
|
}
|
|
142
|
-
export interface
|
|
143
|
-
/**
|
|
198
|
+
export interface StorageConditionalCopyDestinationCapability {
|
|
199
|
+
/** Copy can require that the destination does not exist. */
|
|
144
200
|
create: boolean;
|
|
145
|
-
/**
|
|
201
|
+
/** Copy can require that the destination matches an opaque provider ETag. */
|
|
146
202
|
replace: boolean;
|
|
147
|
-
/**
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
203
|
+
/** Source and destination predicates share one provider linearization point. */
|
|
204
|
+
atomicWithSource: boolean;
|
|
205
|
+
}
|
|
206
|
+
export interface StorageConditionalMultipartCompletionCapability {
|
|
207
|
+
/** Multipart completion can require that the destination does not exist. */
|
|
208
|
+
create: boolean;
|
|
209
|
+
/** Multipart completion can require that the destination ETag matches. */
|
|
210
|
+
replace: boolean;
|
|
211
|
+
}
|
|
212
|
+
export interface StoragePhysicalKeyCapability {
|
|
213
|
+
/** Maximum UTF-8 bytes in the complete provider key, including prefixes. */
|
|
214
|
+
maxBytes: number;
|
|
154
215
|
}
|
|
155
216
|
export interface StorageSignedUploadPolicyCapability {
|
|
156
217
|
/** The signed request fixes the exact declared content type. */
|
|
@@ -172,16 +233,26 @@ export interface StorageCapabilities {
|
|
|
172
233
|
resumableUpload: boolean;
|
|
173
234
|
serverSideCopy: boolean;
|
|
174
235
|
/**
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* compatibility with drivers built against earlier package versions.
|
|
236
|
+
* Native create-if-absent support. Absent means unsupported; callers must
|
|
237
|
+
* not emulate it with an exists request followed by an unconditional write.
|
|
178
238
|
*/
|
|
179
|
-
|
|
239
|
+
conditionalCreate?: StorageConditionalWriteCapability;
|
|
180
240
|
/**
|
|
181
|
-
* Native
|
|
182
|
-
* emulate these operations with a separate `exists()` or `head()` request.
|
|
241
|
+
* Native replace-if-current-ETag-matches support. Absent means unsupported.
|
|
183
242
|
*/
|
|
184
|
-
|
|
243
|
+
conditionalReplace?: StorageConditionalWriteCapability;
|
|
244
|
+
/** Native delete-if-current-ETag-matches support. */
|
|
245
|
+
conditionalDelete?: StorageConditionalDeleteCapability;
|
|
246
|
+
/** Native conditional read of an exact observed identity. */
|
|
247
|
+
conditionalRead?: StorageConditionalReadCapability;
|
|
248
|
+
/** Source predicates supported by conditional server-side copy. */
|
|
249
|
+
conditionalCopySource?: StorageConditionalCopySourceCapability;
|
|
250
|
+
/** Destination predicates supported by conditional server-side copy. */
|
|
251
|
+
conditionalCopyDestination?: StorageConditionalCopyDestinationCapability;
|
|
252
|
+
/** Conditions enforced by multipart completion rather than part upload. */
|
|
253
|
+
conditionalMultipartCompletion?: StorageConditionalMultipartCompletionCapability;
|
|
254
|
+
/** Provider budget for the complete physical key. */
|
|
255
|
+
physicalKey?: StoragePhysicalKeyCapability;
|
|
185
256
|
signedDownload: StorageSignedUrlCapability;
|
|
186
257
|
/** Expiry guarantees enforced by the provider adapter. */
|
|
187
258
|
signedDownloadPolicy?: StorageSignedDownloadPolicyCapability;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.types.d.ts","sourceRoot":"","sources":["../src/storage.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,MAAM,WAAW,GACnB,IAAI,GACJ,IAAI,GACJ,cAAc,CAAC,UAAU,CAAC,GAC1B,QAAQ,GACR,WAAW,GACX,eAAe,GACf,UAAU,GACV,MAAM,CAAC;AAEX,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,MAAM,CAAC;CACpD,CAAC;AAEN,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,uBAAuB;IACtE,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"storage.types.d.ts","sourceRoot":"","sources":["../src/storage.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,K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AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.types.js","sourceRoot":"","sources":["../src/storage.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Readable } from 'node:stream';\n\nimport type { StorageError } from './storage.error.js';\nimport type { StorageUploadControl } from './storage-upload-control.js';\n\nexport type StorageBody =\n | Blob\n | File\n | ReadableStream<Uint8Array>\n | Readable\n | ArrayBuffer\n | ArrayBufferView\n | Uint8Array\n | string;\n\nexport interface StorageRetryContext {\n attempt: number;\n error: StorageError;\n}\n\nexport type StorageRetryOptions =\n | number\n | {\n max: number;\n backoff?: (context: StorageRetryContext) => number;\n };\n\nexport interface StorageOperationOptions {\n signal?: AbortSignal;\n timeout?: number;\n retries?: StorageRetryOptions;\n}\n\n/**\n * Preconditions for promoting a staged object to its final key. At least one\n * source identity must be supplied; unsupported identities fail closed.\n */\nexport interface StoragePromotionOptions extends StorageOperationOptions {\n /** Copy only the source object whose provider ETag exactly matches. */\n sourceEtag?: string;\n /** Copy this immutable provider version of the source object. */\n sourceVersion?: string;\n}\n\nexport interface StorageMultipartOptions {\n partSize?: number;\n concurrency?: number;\n}\n\nexport interface StorageUploadProgress {\n loaded: number;\n total?: number;\n}\n\nexport interface StorageUploadOptions extends StorageOperationOptions {\n contentType?: string;\n cacheControl?: string;\n metadata?: Record<string, string>;\n onProgress?: (progress: StorageUploadProgress) => void;\n multipart?: boolean | StorageMultipartOptions;\n control?: StorageUploadControl;\n}\n\nexport type StorageConditionalUploadOptions = StorageUploadOptions &\n (\n | {\n /** Atomically create the object only when its key does not exist. */\n condition: { type: 'create' };\n }\n | {\n /** Atomically replace the object only when its current ETag matches. */\n condition: { type: 'replace'; etag: string };\n }\n );\n\nexport interface StorageConditionalDeleteOptions extends StorageOperationOptions {\n /** Atomically delete the object only when its current ETag matches. */\n condition: { etag: string };\n}\n\nexport interface StorageUploadResult {\n key: string;\n size: number;\n contentType: string;\n etag?: string;\n lastModified?: Date;\n}\n\nexport interface StorageObjectMetadata {\n key: string;\n name: string;\n size: number;\n contentType: string;\n etag?: string;\n lastModified?: Date;\n metadata?: Record<string, string>;\n}\n\nexport interface StorageObject extends StorageObjectMetadata {\n body: ReadableStream<Uint8Array>;\n}\n\nexport interface StorageByteRange {\n start: number;\n end?: number;\n}\n\nexport interface StorageDownloadOptions extends StorageOperationOptions {\n range?: StorageByteRange;\n}\n\nexport interface StorageBufferedDownloadOptions extends StorageDownloadOptions {\n /**\n * Maximum number of bytes buffered in memory. Defaults to 10 MiB.\n * Pass `Infinity` only when the caller has independently bounded the object.\n */\n maxBytes?: number;\n}\n\nexport interface StorageListOptions extends StorageOperationOptions {\n prefix?: string;\n cursor?: string;\n limit?: number;\n delimiter?: string;\n}\n\nexport interface StorageListResult {\n items: StorageObjectMetadata[];\n prefixes?: string[];\n cursor?: string;\n}\n\nexport type StorageSearchMatch = 'glob' | 'regex' | 'substring' | 'exact';\n\nexport interface StorageSearchOptions extends StorageOperationOptions {\n prefix?: string;\n limit?: number;\n maxResults?: number;\n match?: StorageSearchMatch;\n caseInsensitive?: boolean;\n}\n\nexport interface StorageSignedDownloadOptions extends StorageOperationOptions {\n expiresIn?: number;\n responseContentDisposition?: string;\n}\n\nexport interface StorageSignedUploadOptions extends StorageOperationOptions {\n expiresIn: number;\n contentType?: string;\n maxSize?: number;\n minSize?: number;\n}\n\nexport type StorageSignedUpload =\n | {\n method: 'PUT';\n url: string;\n headers?: Record<string, string>;\n }\n | {\n method: 'POST';\n url: string;\n fields: Record<string, string>;\n };\n\nexport interface StorageSignedUrlCapability {\n supported: boolean;\n maxExpiresIn?: number;\n}\n\nexport interface StorageConditionalCopyCapability {\n supported: boolean;\n etag: boolean;\n version: boolean;\n}\n\nexport interface StorageConditionalMutationCapability {\n /** Native create-if-absent support. */\n create: boolean;\n /** Native replace-if-current-ETag-matches support. */\n replace: boolean;\n /** Native delete-if-current-ETag-matches support. */\n delete: boolean;\n /**\n * Successful conditional uploads return an ETag usable for CAS. A provider\n * that commits without returning one must fail rather than report success.\n */\n etag: boolean;\n}\n\nexport interface StorageSignedUploadPolicyCapability {\n /** The signed request fixes the exact declared content type. */\n contentType: boolean;\n /** The signed request enforces the requested min/max byte range. */\n sizeRange: boolean;\n}\n\nexport interface StorageSignedDownloadPolicyCapability {\n /** Every generated URL honors the requested expiry. */\n expiresIn: boolean;\n}\n\nexport interface StorageCapabilities {\n rangeRead: boolean;\n /** True when the provider reports native byte-level upload progress. */\n nativeUploadProgress: boolean;\n delimiter: boolean;\n metadata: boolean;\n cacheControl: boolean;\n resumableUpload: boolean;\n serverSideCopy: boolean;\n /**\n * Conditional server-side copy used to promote an already verified staged\n * object without a validation/copy race. Absent means unsupported for\n * compatibility with drivers built against earlier package versions.\n */\n conditionalCopy?: StorageConditionalCopyCapability;\n /**\n * Native conditional mutations. Absent means unsupported; callers must not\n * emulate these operations with a separate `exists()` or `head()` request.\n */\n conditionalMutation?: StorageConditionalMutationCapability;\n signedDownload: StorageSignedUrlCapability;\n /** Expiry guarantees enforced by the provider adapter. */\n signedDownloadPolicy?: StorageSignedDownloadPolicyCapability;\n /**\n * Some providers decide support from credentials or requested constraints,\n * so direct-upload support can only be known when the call is attempted.\n */\n signedUpload: boolean | 'runtime';\n /**\n * Constraints cryptographically/provider-policy enforced by direct upload.\n * Absent means callers must not assume request options are enforced.\n */\n signedUploadPolicy?: StorageSignedUploadPolicyCapability;\n}\n\nexport interface StorageBulkOptions {\n concurrency?: number;\n stopOnError?: boolean;\n}\n\nexport interface StorageBulkError {\n key: string;\n error: StorageError;\n}\n\nexport interface StorageUploadManyItem {\n key: string;\n body: StorageBody;\n contentType?: string;\n cacheControl?: string;\n metadata?: Record<string, string>;\n multipart?: boolean | StorageMultipartOptions;\n}\n\nexport interface StorageUploadManyOptions\n extends StorageBulkOptions, StorageOperationOptions {\n onProgress?: (progress: StorageUploadProgress & { key: string }) => void;\n}\n\nexport interface StorageUploadManyResult {\n uploaded: StorageUploadResult[];\n errors?: StorageBulkError[];\n}\n\nexport interface StorageDownloadManyResult {\n downloaded: StorageObject[];\n errors?: StorageBulkError[];\n}\n\nexport interface StorageHeadManyResult {\n objects: StorageObjectMetadata[];\n errors?: StorageBulkError[];\n}\n\nexport interface StorageExistsManyResult {\n existing: string[];\n missing: string[];\n errors?: StorageBulkError[];\n}\n\nexport interface StorageDeleteManyResult {\n deleted: string[];\n errors?: StorageBulkError[];\n}\n\nexport type StorageOperationName =\n | 'upload'\n | 'download'\n | 'head'\n | 'exists'\n | 'delete'\n | 'copy'\n | 'move'\n | 'promote'\n | 'list'\n | 'search'\n | 'signDownload'\n | 'signUpload';\n\nexport interface StorageOperationContext {\n store: string;\n operation: StorageOperationName;\n key?: string;\n from?: string;\n to?: string;\n}\n\nexport interface StoragePlugin {\n name?: string;\n /**\n * Runs before the driver and may reject an operation, for example to enforce\n * policy. Hooks run in registration order.\n */\n beforeOperation?: (context: StorageOperationContext) => void | Promise<void>;\n /**\n * Observes a successful operation. Throwing turns the call into a failure,\n * which is useful for mandatory audit sinks.\n *\n * For streaming downloads, success means the provider returned a stream.\n * Later consumption failures are normalized for the stream consumer but do\n * not re-enter plugin hooks.\n */\n afterOperation?: (\n context: StorageOperationContext,\n result: unknown,\n ) => void | Promise<void>;\n /**\n * Best-effort error observation. Hook failures never replace the original\n * storage error.\n */\n onError?: (\n context: StorageOperationContext,\n error: StorageError,\n ) => void | Promise<void>;\n}\n\nexport interface StorageTransferProgress {\n done: number;\n total: number;\n key: string;\n status: 'transferred' | 'skipped';\n}\n\nexport interface StorageTransferOptions extends StorageBulkOptions {\n from: string;\n to: string;\n prefix?: string;\n transformKey?: (key: string) => string;\n overwrite?: boolean;\n limit?: number;\n signal?: AbortSignal;\n onProgress?: (progress: StorageTransferProgress) => void;\n}\n\nexport interface StorageTransferResult {\n transferred: string[];\n skipped?: string[];\n errors?: StorageBulkError[];\n}\n\nexport type StorageSyncCompare =\n | 'etag'\n | 'size'\n | ((\n source: StorageObjectMetadata,\n destination: StorageObjectMetadata,\n ) => boolean);\n\nexport interface StorageSyncProgress {\n done: number;\n total: number;\n key: string;\n status: 'uploaded' | 'skipped' | 'deleted';\n}\n\nexport interface StorageSyncOptions extends StorageBulkOptions {\n from: string;\n to: string;\n prefix?: string;\n destinationPrefix?: string;\n transformKey?: (key: string) => string;\n prune?: boolean;\n compare?: StorageSyncCompare;\n dryRun?: boolean;\n limit?: number;\n signal?: AbortSignal;\n onProgress?: (progress: StorageSyncProgress) => void;\n}\n\nexport interface StorageSyncResult {\n uploaded: string[];\n skipped: string[];\n deleted?: string[];\n errors?: StorageBulkError[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.types.js","sourceRoot":"","sources":["../src/storage.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Readable } from 'node:stream';\n\nimport type { StorageError } from './storage.error.js';\nimport type { StorageUploadControl } from './storage-upload-control.js';\n\nexport type StorageBody =\n | Blob\n | File\n | ReadableStream<Uint8Array>\n | Readable\n | ArrayBuffer\n | ArrayBufferView\n | Uint8Array\n | string;\n\nexport interface StorageRetryContext {\n attempt: number;\n error: StorageError;\n}\n\nexport type StorageRetryOptions =\n | number\n | {\n max: number;\n backoff?: (context: StorageRetryContext) => number;\n };\n\nexport interface StorageOperationOptions {\n signal?: AbortSignal;\n timeout?: number;\n retries?: StorageRetryOptions;\n}\n\n/**\n * Preconditions for promoting a staged object to its final key. At least one\n * source identity must be supplied; unsupported identities fail closed.\n */\nexport interface StoragePromotionOptions extends StorageOperationOptions {\n /** Copy only the source object whose provider ETag exactly matches. */\n sourceEtag?: string;\n /** Copy this immutable provider version of the source object. */\n sourceVersion?: string;\n /**\n * Protect the destination in the same provider copy request. When a source\n * condition is also present, the provider profile must explicitly declare\n * that both predicates are evaluated atomically.\n */\n destination?: { type: 'create' } | { type: 'replace'; etag: string };\n}\n\nexport interface StorageMultipartOptions {\n partSize?: number;\n concurrency?: number;\n}\n\nexport interface StorageUploadProgress {\n loaded: number;\n total?: number;\n}\n\nexport interface StorageUploadOptions extends StorageOperationOptions {\n contentType?: string;\n cacheControl?: string;\n metadata?: Record<string, string>;\n onProgress?: (progress: StorageUploadProgress) => void;\n multipart?: boolean | StorageMultipartOptions;\n control?: StorageUploadControl;\n}\n\nexport type StorageConditionalUploadOptions = StorageUploadOptions &\n (\n | {\n /** Atomically create the object only when its key does not exist. */\n condition: { type: 'create' };\n }\n | {\n /** Atomically replace the object only when its current ETag matches. */\n condition: { type: 'replace'; etag: string };\n }\n );\n\nexport interface StorageConditionalDeleteOptions extends StorageOperationOptions {\n /** Atomically delete the object only when its current ETag matches. */\n condition: { etag: string };\n}\n\nexport interface StorageUploadResult {\n key: string;\n size: number;\n contentType: string;\n /** Canonical bare provider ETag; pass it back unchanged as a condition. */\n etag?: string;\n lastModified?: Date;\n}\n\nexport interface StorageObjectMetadata {\n key: string;\n name: string;\n size: number;\n contentType: string;\n /** Canonical bare provider ETag; pass it back unchanged as a condition. */\n etag?: string;\n lastModified?: Date;\n metadata?: Record<string, string>;\n}\n\nexport interface StorageObject extends StorageObjectMetadata {\n body: ReadableStream<Uint8Array>;\n}\n\nexport interface StorageByteRange {\n start: number;\n end?: number;\n}\n\nexport interface StorageDownloadOptions extends StorageOperationOptions {\n range?: StorageByteRange;\n}\n\n/**\n * Reads one exact observed object identity. At least one provider identity is\n * required; a driver must never emulate this with a separate head request.\n */\nexport type StorageConditionalReadOptions = StorageDownloadOptions &\n (\n | {\n condition: { etag: string; version?: string };\n }\n | {\n condition: { etag?: string; version: string };\n }\n );\n\nexport interface StorageBufferedDownloadOptions extends StorageDownloadOptions {\n /**\n * Maximum number of bytes buffered in memory. Defaults to 10 MiB.\n * Pass `Infinity` only when the caller has independently bounded the object.\n */\n maxBytes?: number;\n}\n\nexport interface StorageListOptions extends StorageOperationOptions {\n prefix?: string;\n /**\n * Opaque, non-consuming continuation token returned by `list`.\n *\n * The token is bound to the original `prefix` and `delimiter`, but callers\n * may change `limit` when resuming. While the provider token remains valid\n * and available, replaying it against unchanged provider state must return\n * the same logical position; token bytes returned for the following position\n * need not be stable.\n */\n cursor?: string;\n limit?: number;\n delimiter?: string;\n}\n\nexport interface StorageListResult {\n items: StorageObjectMetadata[];\n prefixes?: string[];\n /**\n * Opaque, replayable continuation token for the next logical position.\n * See `StorageDriver.list` for the complete portability contract.\n */\n cursor?: string;\n}\n\nexport type StorageSearchMatch = 'glob' | 'regex' | 'substring' | 'exact';\n\nexport interface StorageSearchOptions extends StorageOperationOptions {\n prefix?: string;\n limit?: number;\n maxResults?: number;\n match?: StorageSearchMatch;\n caseInsensitive?: boolean;\n}\n\nexport interface StorageSignedDownloadOptions extends StorageOperationOptions {\n expiresIn?: number;\n responseContentDisposition?: string;\n}\n\nexport interface StorageSignedUploadOptions extends StorageOperationOptions {\n expiresIn: number;\n contentType?: string;\n maxSize?: number;\n minSize?: number;\n}\n\nexport type StorageSignedUpload =\n | {\n method: 'PUT';\n url: string;\n headers?: Record<string, string>;\n }\n | {\n method: 'POST';\n url: string;\n fields: Record<string, string>;\n };\n\nexport interface StorageSignedUrlCapability {\n supported: boolean;\n maxExpiresIn?: number;\n}\n\nexport interface StorageConditionalWriteCapability {\n /** A successful write returns the provider ETag identifying its result. */\n resultEtag: boolean;\n}\n\nexport interface StorageConditionalDeleteCapability {\n /** Delete can compare the current object against an opaque provider ETag. */\n etag: boolean;\n}\n\nexport interface StorageConditionalReadCapability {\n /** Read can require the current object to match an opaque provider ETag. */\n etag: boolean;\n /** Read can select an immutable provider version. */\n version: boolean;\n}\n\nexport interface StorageConditionalCopySourceCapability {\n /** Copy can require the source to match an opaque provider ETag. */\n etag: boolean;\n /** Copy can select an immutable source version. */\n version: boolean;\n}\n\nexport interface StorageConditionalCopyDestinationCapability {\n /** Copy can require that the destination does not exist. */\n create: boolean;\n /** Copy can require that the destination matches an opaque provider ETag. */\n replace: boolean;\n /** Source and destination predicates share one provider linearization point. */\n atomicWithSource: boolean;\n}\n\nexport interface StorageConditionalMultipartCompletionCapability {\n /** Multipart completion can require that the destination does not exist. */\n create: boolean;\n /** Multipart completion can require that the destination ETag matches. */\n replace: boolean;\n}\n\nexport interface StoragePhysicalKeyCapability {\n /** Maximum UTF-8 bytes in the complete provider key, including prefixes. */\n maxBytes: number;\n}\n\nexport interface StorageSignedUploadPolicyCapability {\n /** The signed request fixes the exact declared content type. */\n contentType: boolean;\n /** The signed request enforces the requested min/max byte range. */\n sizeRange: boolean;\n}\n\nexport interface StorageSignedDownloadPolicyCapability {\n /** Every generated URL honors the requested expiry. */\n expiresIn: boolean;\n}\n\nexport interface StorageCapabilities {\n rangeRead: boolean;\n /** True when the provider reports native byte-level upload progress. */\n nativeUploadProgress: boolean;\n delimiter: boolean;\n metadata: boolean;\n cacheControl: boolean;\n resumableUpload: boolean;\n serverSideCopy: boolean;\n /**\n * Native create-if-absent support. Absent means unsupported; callers must\n * not emulate it with an exists request followed by an unconditional write.\n */\n conditionalCreate?: StorageConditionalWriteCapability;\n /**\n * Native replace-if-current-ETag-matches support. Absent means unsupported.\n */\n conditionalReplace?: StorageConditionalWriteCapability;\n /** Native delete-if-current-ETag-matches support. */\n conditionalDelete?: StorageConditionalDeleteCapability;\n /** Native conditional read of an exact observed identity. */\n conditionalRead?: StorageConditionalReadCapability;\n /** Source predicates supported by conditional server-side copy. */\n conditionalCopySource?: StorageConditionalCopySourceCapability;\n /** Destination predicates supported by conditional server-side copy. */\n conditionalCopyDestination?: StorageConditionalCopyDestinationCapability;\n /** Conditions enforced by multipart completion rather than part upload. */\n conditionalMultipartCompletion?: StorageConditionalMultipartCompletionCapability;\n /** Provider budget for the complete physical key. */\n physicalKey?: StoragePhysicalKeyCapability;\n signedDownload: StorageSignedUrlCapability;\n /** Expiry guarantees enforced by the provider adapter. */\n signedDownloadPolicy?: StorageSignedDownloadPolicyCapability;\n /**\n * Some providers decide support from credentials or requested constraints,\n * so direct-upload support can only be known when the call is attempted.\n */\n signedUpload: boolean | 'runtime';\n /**\n * Constraints cryptographically/provider-policy enforced by direct upload.\n * Absent means callers must not assume request options are enforced.\n */\n signedUploadPolicy?: StorageSignedUploadPolicyCapability;\n}\n\nexport interface StorageBulkOptions {\n concurrency?: number;\n stopOnError?: boolean;\n}\n\nexport interface StorageBulkError {\n key: string;\n error: StorageError;\n}\n\nexport interface StorageUploadManyItem {\n key: string;\n body: StorageBody;\n contentType?: string;\n cacheControl?: string;\n metadata?: Record<string, string>;\n multipart?: boolean | StorageMultipartOptions;\n}\n\nexport interface StorageUploadManyOptions\n extends StorageBulkOptions, StorageOperationOptions {\n onProgress?: (progress: StorageUploadProgress & { key: string }) => void;\n}\n\nexport interface StorageUploadManyResult {\n uploaded: StorageUploadResult[];\n errors?: StorageBulkError[];\n}\n\nexport interface StorageDownloadManyResult {\n downloaded: StorageObject[];\n errors?: StorageBulkError[];\n}\n\nexport interface StorageHeadManyResult {\n objects: StorageObjectMetadata[];\n errors?: StorageBulkError[];\n}\n\nexport interface StorageExistsManyResult {\n existing: string[];\n missing: string[];\n errors?: StorageBulkError[];\n}\n\nexport interface StorageDeleteManyResult {\n deleted: string[];\n errors?: StorageBulkError[];\n}\n\nexport type StorageOperationName =\n | 'upload'\n | 'download'\n | 'head'\n | 'exists'\n | 'delete'\n | 'copy'\n | 'move'\n | 'promote'\n | 'list'\n | 'search'\n | 'signDownload'\n | 'signUpload';\n\nexport interface StorageOperationContext {\n store: string;\n operation: StorageOperationName;\n key?: string;\n from?: string;\n to?: string;\n}\n\nexport interface StoragePlugin {\n name?: string;\n /**\n * Runs before the driver and may reject an operation, for example to enforce\n * policy. Hooks run in registration order.\n */\n beforeOperation?: (context: StorageOperationContext) => void | Promise<void>;\n /**\n * Observes a successful operation. Throwing turns the call into a failure,\n * which is useful for mandatory audit sinks.\n *\n * For streaming downloads, success means the provider returned a stream.\n * Later consumption failures are normalized for the stream consumer but do\n * not re-enter plugin hooks.\n */\n afterOperation?: (\n context: StorageOperationContext,\n result: unknown,\n ) => void | Promise<void>;\n /**\n * Best-effort error observation. Hook failures never replace the original\n * storage error.\n */\n onError?: (\n context: StorageOperationContext,\n error: StorageError,\n ) => void | Promise<void>;\n}\n\nexport interface StorageTransferProgress {\n done: number;\n total: number;\n key: string;\n status: 'transferred' | 'skipped';\n}\n\nexport interface StorageTransferOptions extends StorageBulkOptions {\n from: string;\n to: string;\n prefix?: string;\n transformKey?: (key: string) => string;\n overwrite?: boolean;\n limit?: number;\n signal?: AbortSignal;\n onProgress?: (progress: StorageTransferProgress) => void;\n}\n\nexport interface StorageTransferResult {\n transferred: string[];\n skipped?: string[];\n errors?: StorageBulkError[];\n}\n\nexport type StorageSyncCompare =\n | 'etag'\n | 'size'\n | ((\n source: StorageObjectMetadata,\n destination: StorageObjectMetadata,\n ) => boolean);\n\nexport interface StorageSyncProgress {\n done: number;\n total: number;\n key: string;\n status: 'uploaded' | 'skipped' | 'deleted';\n}\n\nexport interface StorageSyncOptions extends StorageBulkOptions {\n from: string;\n to: string;\n prefix?: string;\n destinationPrefix?: string;\n transformKey?: (key: string) => string;\n prune?: boolean;\n compare?: StorageSyncCompare;\n dryRun?: boolean;\n limit?: number;\n signal?: AbortSignal;\n onProgress?: (progress: StorageSyncProgress) => void;\n}\n\nexport interface StorageSyncResult {\n uploaded: string[];\n skipped: string[];\n deleted?: string[];\n errors?: StorageBulkError[];\n}\n"]}
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export interface MemoryStorageDriverOptions extends Omit<FilesSdkDriverOptions<M
|
|
|
5
5
|
adapter?: MemoryAdapterOptions;
|
|
6
6
|
}
|
|
7
7
|
export declare function createMemoryStorageDriver(options?: MemoryStorageDriverOptions): StorageDriver;
|
|
8
|
+
export { createStorageProviderConformanceCases, type StorageProviderConformanceCapabilities, type StorageProviderConformanceCase, type StorageProviderConformanceCaseResult, type StorageProviderConformanceFixture, type StorageProviderConformanceOptions, } from './provider-conformance.js';
|
|
8
9
|
export type { MemoryAdapterOptions, MemorySeed } from 'files-sdk/memory';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CACtD,qBAAqB,CAAC,aAAa,CAAC,EACpC,SAAS,CACV;IACC,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,0BAA+B,GACvC,aAAa,CAMf;AAED,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CACtD,qBAAqB,CAAC,aAAa,CAAC,EACpC,SAAS,CACV;IACC,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,0BAA+B,GACvC,aAAa,CAMf;AAED,OAAO,EACL,qCAAqC,EACrC,KAAK,sCAAsC,EAC3C,KAAK,8BAA8B,EACnC,KAAK,oCAAoC,EACzC,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,GACvC,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/testing/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,GAErB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,MAAM,GAGP,MAAM,kBAAkB,CAAC;AAS1B,MAAM,UAAU,yBAAyB,CACvC,OAAO,GAA+B,EAAE;IAExC,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IAC7C,OAAO,oBAAoB,CAAC;QAC1B,GAAG,YAAY;QACf,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC;KACzB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { StorageDriver } from '../storage.driver.js';\nimport {\n createFilesSdkDriver,\n type FilesSdkDriverOptions,\n} from '../files-sdk/files-sdk.driver.js';\nimport {\n memory,\n type MemoryAdapter,\n type MemoryAdapterOptions,\n} from 'files-sdk/memory';\n\nexport interface MemoryStorageDriverOptions extends Omit<\n FilesSdkDriverOptions<MemoryAdapter>,\n 'adapter'\n> {\n adapter?: MemoryAdapterOptions;\n}\n\nexport function createMemoryStorageDriver(\n options: MemoryStorageDriverOptions = {},\n): StorageDriver {\n const { adapter, ...filesOptions } = options;\n return createFilesSdkDriver({\n ...filesOptions,\n adapter: memory(adapter),\n });\n}\n\nexport type { MemoryAdapterOptions, MemorySeed } from 'files-sdk/memory';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,GAErB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,MAAM,GAGP,MAAM,kBAAkB,CAAC;AAS1B,MAAM,UAAU,yBAAyB,CACvC,OAAO,GAA+B,EAAE;IAExC,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IAC7C,OAAO,oBAAoB,CAAC;QAC1B,GAAG,YAAY;QACf,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC;KACzB,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EACL,qCAAqC,GAMtC,MAAM,2BAA2B,CAAC","sourcesContent":["import type { StorageDriver } from '../storage.driver.js';\nimport {\n createFilesSdkDriver,\n type FilesSdkDriverOptions,\n} from '../files-sdk/files-sdk.driver.js';\nimport {\n memory,\n type MemoryAdapter,\n type MemoryAdapterOptions,\n} from 'files-sdk/memory';\n\nexport interface MemoryStorageDriverOptions extends Omit<\n FilesSdkDriverOptions<MemoryAdapter>,\n 'adapter'\n> {\n adapter?: MemoryAdapterOptions;\n}\n\nexport function createMemoryStorageDriver(\n options: MemoryStorageDriverOptions = {},\n): StorageDriver {\n const { adapter, ...filesOptions } = options;\n return createFilesSdkDriver({\n ...filesOptions,\n adapter: memory(adapter),\n });\n}\n\nexport {\n createStorageProviderConformanceCases,\n type StorageProviderConformanceCapabilities,\n type StorageProviderConformanceCase,\n type StorageProviderConformanceCaseResult,\n type StorageProviderConformanceFixture,\n type StorageProviderConformanceOptions,\n} from './provider-conformance.js';\n\nexport type { MemoryAdapterOptions, MemorySeed } from 'files-sdk/memory';\n"]}
|