@nestm/storage 0.1.0-alpha.2 → 0.1.0-alpha.4
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 +44 -0
- package/README.md +196 -15
- package/SECURITY.md +23 -0
- package/dist/files-sdk/files-sdk.driver.d.ts +31 -2
- package/dist/files-sdk/files-sdk.driver.d.ts.map +1 -1
- package/dist/files-sdk/files-sdk.driver.js +141 -20
- package/dist/files-sdk/files-sdk.driver.js.map +1 -1
- package/dist/files-sdk/fs/index.d.ts +21 -0
- package/dist/files-sdk/fs/index.d.ts.map +1 -0
- package/dist/files-sdk/fs/index.js +20 -0
- package/dist/files-sdk/fs/index.js.map +1 -0
- 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 +54 -0
- package/dist/files-sdk/provider/index.d.ts.map +1 -0
- package/dist/files-sdk/provider/index.js +80 -0
- package/dist/files-sdk/provider/index.js.map +1 -0
- package/dist/files-sdk/s3/index.d.ts +25 -0
- package/dist/files-sdk/s3/index.d.ts.map +1 -0
- package/dist/files-sdk/s3/index.js +119 -0
- package/dist/files-sdk/s3/index.js.map +1 -0
- package/dist/gateway/index.d.ts +1 -1
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/storage-gateway-fastify-parser.d.ts.map +1 -1
- package/dist/gateway/storage-gateway-fastify-parser.js.map +1 -1
- package/dist/gateway/storage-gateway.controller.d.ts +12 -11
- package/dist/gateway/storage-gateway.controller.d.ts.map +1 -1
- package/dist/gateway/storage-gateway.controller.js +209 -65
- package/dist/gateway/storage-gateway.controller.js.map +1 -1
- package/dist/gateway/storage-gateway.guard.d.ts.map +1 -1
- package/dist/gateway/storage-gateway.guard.js.map +1 -1
- package/dist/gateway/storage-gateway.module.d.ts.map +1 -1
- package/dist/gateway/storage-gateway.module.js +60 -1
- package/dist/gateway/storage-gateway.module.js.map +1 -1
- package/dist/gateway/storage-gateway.tokens.d.ts +1 -0
- package/dist/gateway/storage-gateway.tokens.d.ts.map +1 -1
- package/dist/gateway/storage-gateway.tokens.js +1 -0
- package/dist/gateway/storage-gateway.tokens.js.map +1 -1
- package/dist/gateway/storage-gateway.types.d.ts +53 -10
- package/dist/gateway/storage-gateway.types.d.ts.map +1 -1
- package/dist/gateway/storage-gateway.types.js.map +1 -1
- package/dist/inject-storage.decorator.js.map +1 -1
- package/dist/storage-upload-control.d.ts.map +1 -1
- package/dist/storage.client.d.ts +8 -1
- package/dist/storage.client.d.ts.map +1 -1
- package/dist/storage.client.js +40 -0
- package/dist/storage.client.js.map +1 -1
- package/dist/storage.driver.d.ts +6 -1
- package/dist/storage.driver.d.ts.map +1 -1
- package/dist/storage.driver.js.map +1 -1
- package/dist/storage.error.d.ts +13 -10
- package/dist/storage.error.d.ts.map +1 -1
- package/dist/storage.error.js +33 -1
- package/dist/storage.error.js.map +1 -1
- package/dist/storage.module.d.ts.map +1 -1
- package/dist/storage.module.js.map +1 -1
- package/dist/storage.service.d.ts.map +1 -1
- package/dist/storage.service.js.map +1 -1
- package/dist/storage.tokens.js.map +1 -1
- package/dist/storage.types.d.ts +39 -1
- package/dist/storage.types.d.ts.map +1 -1
- package/dist/storage.types.js.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/package.json +38 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.service.js","sourceRoot":"","sources":["../src/storage.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAa3D,MAAM,QAAQ,GAAG,CAAC,GA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G,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;SACrC,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { settleMany } from './internal/settle-many.js';\nimport { StorageClient } from './storage.client.js';\nimport { StorageError, StorageErrorCode } from './storage.error.js';\nimport { normalizeStorageName } from './storage.tokens.js';\nimport type {\n StorageBulkError,\n StorageObjectMetadata,\n StorageSyncCompare,\n StorageSyncOptions,\n StorageSyncProgress,\n StorageSyncResult,\n StorageTransferOptions,\n StorageTransferProgress,\n StorageTransferResult,\n} from './storage.types.js';\n\nconst identity = (key: string): string => key;\n\nfunction assertDifferentStores(from: string, to: string): void {\n if (from === to) {\n throw new StorageError(\n 'Cross-store transfer and sync require different source and destination stores.',\n {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n store: from,\n },\n );\n }\n}\n\nfunction unchanged(\n source: StorageObjectMetadata,\n destination: StorageObjectMetadata,\n compare: StorageSyncCompare,\n): boolean {\n if (typeof compare === 'function') {\n return compare(source, destination);\n }\n if (compare === 'size') {\n return source.size === destination.size;\n }\n return (\n source.size === destination.size &&\n source.etag !== undefined &&\n destination.etag !== undefined &&\n source.etag === destination.etag\n );\n}\n\nasync function walk(\n client: StorageClient,\n options: {\n prefix?: string;\n limit?: number;\n signal?: AbortSignal;\n },\n): Promise<StorageObjectMetadata[]> {\n const objects: StorageObjectMetadata[] = [];\n for await (const object of client.listAll({\n ...(options.limit !== undefined && { limit: options.limit }),\n ...(options.prefix !== undefined && { prefix: options.prefix }),\n ...(options.signal !== undefined && { signal: options.signal }),\n })) {\n objects.push(object);\n }\n return objects;\n}\n\nexport class StorageService {\n readonly #clients: ReadonlyMap<string, StorageClient>;\n\n constructor(\n clients: ReadonlyMap<string, StorageClient>,\n private readonly defaultName: string | null,\n ) {\n this.#clients = new Map(clients);\n }\n\n get names(): readonly string[] {\n return [...this.#clients.keys()].sort();\n }\n\n use(name?: string): StorageClient {\n const resolved =\n name === undefined ? this.defaultName : normalizeStorageName(name);\n\n if (resolved === null) {\n throw new StorageError(\n 'No default storage store is configured; call storage.use(name).',\n {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n },\n );\n }\n\n const client = this.#clients.get(resolved);\n if (client === undefined) {\n const available = this.names;\n throw new StorageError(\n available.length === 0\n ? `Storage store \"${resolved}\" is not registered.`\n : `Storage store \"${resolved}\" is not registered. Available stores: ${available.join(', ')}.`,\n {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n store: resolved,\n },\n );\n }\n return client;\n }\n\n async transfer(\n options: StorageTransferOptions,\n ): Promise<StorageTransferResult> {\n const fromName = normalizeStorageName(options.from);\n const toName = normalizeStorageName(options.to);\n assertDifferentStores(fromName, toName);\n const source = this.use(fromName);\n const destination = this.use(toName);\n const transformKey = options.transformKey ?? identity;\n const overwrite = options.overwrite ?? true;\n const objects = await walk(source, options);\n const total = objects.length;\n let done = 0;\n const skipped = new Set<string>();\n\n const report = (\n key: string,\n status: StorageTransferProgress['status'],\n ): void => {\n done += 1;\n options.onProgress?.({ done, key, status, total });\n };\n\n const settled = await settleMany(\n objects,\n (object) => object.key,\n async (object) => {\n const destinationKey = transformKey(object.key);\n if (\n !overwrite &&\n (await destination.exists(destinationKey, {\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n }))\n ) {\n skipped.add(object.key);\n report(object.key, 'skipped');\n return object.key;\n }\n\n const downloaded = await source.downloadStream(object.key, {\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n });\n try {\n await destination.upload(destinationKey, downloaded.body, {\n contentType: downloaded.contentType,\n ...(downloaded.metadata !== undefined && {\n metadata: downloaded.metadata,\n }),\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n });\n } catch (error) {\n if (!downloaded.body.locked) {\n await downloaded.body.cancel().catch(() => undefined);\n }\n throw error;\n }\n report(object.key, 'transferred');\n return object.key;\n },\n options,\n );\n\n const transferred: string[] = [];\n const skippedKeys: string[] = [];\n for (const key of settled.results) {\n (skipped.has(key) ? skippedKeys : transferred).push(key);\n }\n\n return {\n transferred,\n ...(skippedKeys.length > 0 && { skipped: skippedKeys }),\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async sync(options: StorageSyncOptions): Promise<StorageSyncResult> {\n const fromName = normalizeStorageName(options.from);\n const toName = normalizeStorageName(options.to);\n assertDifferentStores(fromName, toName);\n const source = this.use(fromName);\n const destination = this.use(toName);\n const transformKey = options.transformKey ?? identity;\n const compare = options.compare ?? 'etag';\n const sourceObjects = await walk(source, options);\n const destinationObjects = await walk(destination, {\n ...(options.destinationPrefix !== undefined\n ? { prefix: options.destinationPrefix }\n : options.prefix !== undefined\n ? { prefix: options.prefix }\n : {}),\n ...(options.limit !== undefined && { limit: options.limit }),\n ...(options.signal !== undefined && { signal: options.signal }),\n });\n const destinationIndex = new Map(\n destinationObjects.map((object) => [object.key, object]),\n );\n const desiredDestinationKeys = new Set(\n sourceObjects.map((object) => transformKey(object.key)),\n );\n const deleteKeys =\n (options.prune ?? false)\n ? destinationObjects\n .map((object) => object.key)\n .filter((key) => !desiredDestinationKeys.has(key))\n : [];\n\n const plannedUploads: string[] = [];\n const plannedSkips: string[] = [];\n for (const object of sourceObjects) {\n const existing = destinationIndex.get(transformKey(object.key));\n (existing && unchanged(object, existing, compare)\n ? plannedSkips\n : plannedUploads\n ).push(object.key);\n }\n\n if (options.dryRun) {\n return {\n uploaded: plannedUploads,\n skipped: plannedSkips,\n ...(options.prune && { deleted: deleteKeys }),\n };\n }\n\n const total =\n sourceObjects.length + (options.prune ? deleteKeys.length : 0);\n let done = 0;\n const report = (\n key: string,\n status: StorageSyncProgress['status'],\n ): void => {\n done += 1;\n options.onProgress?.({ done, key, status, total });\n };\n const skipped = new Set<string>();\n\n const settled = await settleMany(\n sourceObjects,\n (object) => object.key,\n async (object) => {\n const destinationKey = transformKey(object.key);\n const existing = destinationIndex.get(destinationKey);\n if (existing && unchanged(object, existing, compare)) {\n skipped.add(object.key);\n report(object.key, 'skipped');\n return object.key;\n }\n const downloaded = await source.downloadStream(object.key, {\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n });\n try {\n await destination.upload(destinationKey, downloaded.body, {\n contentType: downloaded.contentType,\n ...(downloaded.metadata !== undefined && {\n metadata: downloaded.metadata,\n }),\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n });\n } catch (error) {\n if (!downloaded.body.locked) {\n await downloaded.body.cancel().catch(() => undefined);\n }\n throw error;\n }\n report(object.key, 'uploaded');\n return object.key;\n },\n options,\n );\n\n const uploaded: string[] = [];\n const skippedKeys: string[] = [];\n for (const key of settled.results) {\n (skipped.has(key) ? skippedKeys : uploaded).push(key);\n }\n\n let deleted: string[] | undefined;\n let deleteErrors: StorageBulkError[] = [];\n const canPrune =\n options.prune && !(options.stopOnError && settled.errors.length > 0);\n if (canPrune) {\n const deleteResult = await destination.deleteMany(deleteKeys, {\n ...(options.concurrency !== undefined && {\n concurrency: options.concurrency,\n }),\n ...(options.signal !== undefined && { signal: options.signal }),\n ...(options.stopOnError !== undefined && {\n stopOnError: options.stopOnError,\n }),\n });\n deleted = deleteResult.deleted;\n deleteErrors = deleteResult.errors ?? [];\n for (const key of deleted) {\n report(key, 'deleted');\n }\n }\n\n const errors = [...settled.errors, ...deleteErrors];\n return {\n uploaded,\n skipped: skippedKeys,\n ...(options.prune && { deleted: deleted ?? [] }),\n ...(errors.length > 0 && { errors }),\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.service.js","sourceRoot":"","sources":["../src/storage.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAa3D,MAAM,QAAQ,GAA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G,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;SACrC,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { settleMany } from './internal/settle-many.js';\nimport { StorageClient } from './storage.client.js';\nimport { StorageError, StorageErrorCode } from './storage.error.js';\nimport { normalizeStorageName } from './storage.tokens.js';\nimport type {\n StorageBulkError,\n StorageObjectMetadata,\n StorageSyncCompare,\n StorageSyncOptions,\n StorageSyncProgress,\n StorageSyncResult,\n StorageTransferOptions,\n StorageTransferProgress,\n StorageTransferResult,\n} from './storage.types.js';\n\nconst identity = (key: string): string => key;\n\nfunction assertDifferentStores(from: string, to: string): void {\n if (from === to) {\n throw new StorageError(\n 'Cross-store transfer and sync require different source and destination stores.',\n {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n store: from,\n },\n );\n }\n}\n\nfunction unchanged(\n source: StorageObjectMetadata,\n destination: StorageObjectMetadata,\n compare: StorageSyncCompare,\n): boolean {\n if (typeof compare === 'function') {\n return compare(source, destination);\n }\n if (compare === 'size') {\n return source.size === destination.size;\n }\n return (\n source.size === destination.size &&\n source.etag !== undefined &&\n destination.etag !== undefined &&\n source.etag === destination.etag\n );\n}\n\nasync function walk(\n client: StorageClient,\n options: {\n prefix?: string;\n limit?: number;\n signal?: AbortSignal;\n },\n): Promise<StorageObjectMetadata[]> {\n const objects: StorageObjectMetadata[] = [];\n for await (const object of client.listAll({\n ...(options.limit !== undefined && { limit: options.limit }),\n ...(options.prefix !== undefined && { prefix: options.prefix }),\n ...(options.signal !== undefined && { signal: options.signal }),\n })) {\n objects.push(object);\n }\n return objects;\n}\n\nexport class StorageService {\n readonly #clients: ReadonlyMap<string, StorageClient>;\n\n constructor(\n clients: ReadonlyMap<string, StorageClient>,\n private readonly defaultName: string | null,\n ) {\n this.#clients = new Map(clients);\n }\n\n get names(): readonly string[] {\n return [...this.#clients.keys()].sort();\n }\n\n use(name?: string): StorageClient {\n const resolved =\n name === undefined ? this.defaultName : normalizeStorageName(name);\n\n if (resolved === null) {\n throw new StorageError(\n 'No default storage store is configured; call storage.use(name).',\n {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n },\n );\n }\n\n const client = this.#clients.get(resolved);\n if (client === undefined) {\n const available = this.names;\n throw new StorageError(\n available.length === 0\n ? `Storage store \"${resolved}\" is not registered.`\n : `Storage store \"${resolved}\" is not registered. Available stores: ${available.join(', ')}.`,\n {\n code: StorageErrorCode.INVALID_ARGUMENT,\n permanent: true,\n store: resolved,\n },\n );\n }\n return client;\n }\n\n async transfer(\n options: StorageTransferOptions,\n ): Promise<StorageTransferResult> {\n const fromName = normalizeStorageName(options.from);\n const toName = normalizeStorageName(options.to);\n assertDifferentStores(fromName, toName);\n const source = this.use(fromName);\n const destination = this.use(toName);\n const transformKey = options.transformKey ?? identity;\n const overwrite = options.overwrite ?? true;\n const objects = await walk(source, options);\n const total = objects.length;\n let done = 0;\n const skipped = new Set<string>();\n\n const report = (\n key: string,\n status: StorageTransferProgress['status'],\n ): void => {\n done += 1;\n options.onProgress?.({ done, key, status, total });\n };\n\n const settled = await settleMany(\n objects,\n (object) => object.key,\n async (object) => {\n const destinationKey = transformKey(object.key);\n if (\n !overwrite &&\n (await destination.exists(destinationKey, {\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n }))\n ) {\n skipped.add(object.key);\n report(object.key, 'skipped');\n return object.key;\n }\n\n const downloaded = await source.downloadStream(object.key, {\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n });\n try {\n await destination.upload(destinationKey, downloaded.body, {\n contentType: downloaded.contentType,\n ...(downloaded.metadata !== undefined && {\n metadata: downloaded.metadata,\n }),\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n });\n } catch (error) {\n if (!downloaded.body.locked) {\n await downloaded.body.cancel().catch(() => undefined);\n }\n throw error;\n }\n report(object.key, 'transferred');\n return object.key;\n },\n options,\n );\n\n const transferred: string[] = [];\n const skippedKeys: string[] = [];\n for (const key of settled.results) {\n (skipped.has(key) ? skippedKeys : transferred).push(key);\n }\n\n return {\n transferred,\n ...(skippedKeys.length > 0 && { skipped: skippedKeys }),\n ...(settled.errors.length > 0 && { errors: settled.errors }),\n };\n }\n\n async sync(options: StorageSyncOptions): Promise<StorageSyncResult> {\n const fromName = normalizeStorageName(options.from);\n const toName = normalizeStorageName(options.to);\n assertDifferentStores(fromName, toName);\n const source = this.use(fromName);\n const destination = this.use(toName);\n const transformKey = options.transformKey ?? identity;\n const compare = options.compare ?? 'etag';\n const sourceObjects = await walk(source, options);\n const destinationObjects = await walk(destination, {\n ...(options.destinationPrefix !== undefined\n ? { prefix: options.destinationPrefix }\n : options.prefix !== undefined\n ? { prefix: options.prefix }\n : {}),\n ...(options.limit !== undefined && { limit: options.limit }),\n ...(options.signal !== undefined && { signal: options.signal }),\n });\n const destinationIndex = new Map(\n destinationObjects.map((object) => [object.key, object]),\n );\n const desiredDestinationKeys = new Set(\n sourceObjects.map((object) => transformKey(object.key)),\n );\n const deleteKeys =\n (options.prune ?? false)\n ? destinationObjects\n .map((object) => object.key)\n .filter((key) => !desiredDestinationKeys.has(key))\n : [];\n\n const plannedUploads: string[] = [];\n const plannedSkips: string[] = [];\n for (const object of sourceObjects) {\n const existing = destinationIndex.get(transformKey(object.key));\n (existing && unchanged(object, existing, compare)\n ? plannedSkips\n : plannedUploads\n ).push(object.key);\n }\n\n if (options.dryRun) {\n return {\n uploaded: plannedUploads,\n skipped: plannedSkips,\n ...(options.prune && { deleted: deleteKeys }),\n };\n }\n\n const total =\n sourceObjects.length + (options.prune ? deleteKeys.length : 0);\n let done = 0;\n const report = (\n key: string,\n status: StorageSyncProgress['status'],\n ): void => {\n done += 1;\n options.onProgress?.({ done, key, status, total });\n };\n const skipped = new Set<string>();\n\n const settled = await settleMany(\n sourceObjects,\n (object) => object.key,\n async (object) => {\n const destinationKey = transformKey(object.key);\n const existing = destinationIndex.get(destinationKey);\n if (existing && unchanged(object, existing, compare)) {\n skipped.add(object.key);\n report(object.key, 'skipped');\n return object.key;\n }\n const downloaded = await source.downloadStream(object.key, {\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n });\n try {\n await destination.upload(destinationKey, downloaded.body, {\n contentType: downloaded.contentType,\n ...(downloaded.metadata !== undefined && {\n metadata: downloaded.metadata,\n }),\n ...(options.signal !== undefined && {\n signal: options.signal,\n }),\n });\n } catch (error) {\n if (!downloaded.body.locked) {\n await downloaded.body.cancel().catch(() => undefined);\n }\n throw error;\n }\n report(object.key, 'uploaded');\n return object.key;\n },\n options,\n );\n\n const uploaded: string[] = [];\n const skippedKeys: string[] = [];\n for (const key of settled.results) {\n (skipped.has(key) ? skippedKeys : uploaded).push(key);\n }\n\n let deleted: string[] | undefined;\n let deleteErrors: StorageBulkError[] = [];\n const canPrune =\n options.prune && !(options.stopOnError && settled.errors.length > 0);\n if (canPrune) {\n const deleteResult = await destination.deleteMany(deleteKeys, {\n ...(options.concurrency !== undefined && {\n concurrency: options.concurrency,\n }),\n ...(options.signal !== undefined && { signal: options.signal }),\n ...(options.stopOnError !== undefined && {\n stopOnError: options.stopOnError,\n }),\n });\n deleted = deleteResult.deleted;\n deleteErrors = deleteResult.errors ?? [];\n for (const key of deleted) {\n report(key, 'deleted');\n }\n }\n\n const errors = [...settled.errors, ...deleteErrors];\n return {\n uploaded,\n skipped: skippedKeys,\n ...(options.prune && { deleted: deleted ?? [] }),\n ...(errors.length > 0 && { errors }),\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.tokens.js","sourceRoot":"","sources":["../src/storage.tokens.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAE9E,MAAM,UAAU,oBAAoB,CAClC,
|
|
1
|
+
{"version":3,"file":"storage.tokens.js","sourceRoot":"","sources":["../src/storage.tokens.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAE9E,MAAM,UAAU,oBAAoB,CAClC,IAAI,GAAW,oBAAoB;IAEnC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;QAC1E,MAAM,IAAI,SAAS,CACjB,uFAAuF,CACxF,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAI,GAAW,oBAAoB;IACjE,OAAO,MAAM,CAAC,GAAG,CAAC,wBAAwB,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,EAAE,CAAC","sourcesContent":["export const DEFAULT_STORAGE_NAME = 'default';\n\nexport const STORAGE_DEFAULT_NAME = Symbol.for('@nestm/storage/default-name');\n\nexport function normalizeStorageName(\n name: string = DEFAULT_STORAGE_NAME,\n): string {\n if (typeof name !== 'string' || name.length === 0 || name.trim() !== name) {\n throw new TypeError(\n 'Storage store names must be non-empty strings without leading or trailing whitespace.',\n );\n }\n return name;\n}\n\nexport function getStorageToken(name: string = DEFAULT_STORAGE_NAME): symbol {\n return Symbol.for(`@nestm/storage/store/${normalizeStorageName(name)}`);\n}\n\nexport const STORAGE = getStorageToken();\n"]}
|
package/dist/storage.types.d.ts
CHANGED
|
@@ -15,6 +15,16 @@ export interface StorageOperationOptions {
|
|
|
15
15
|
timeout?: number;
|
|
16
16
|
retries?: StorageRetryOptions;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Preconditions for promoting a staged object to its final key. At least one
|
|
20
|
+
* source identity must be supplied; unsupported identities fail closed.
|
|
21
|
+
*/
|
|
22
|
+
export interface StoragePromotionOptions extends StorageOperationOptions {
|
|
23
|
+
/** Copy only the source object whose provider ETag exactly matches. */
|
|
24
|
+
sourceEtag?: string;
|
|
25
|
+
/** Copy this immutable provider version of the source object. */
|
|
26
|
+
sourceVersion?: string;
|
|
27
|
+
}
|
|
18
28
|
export interface StorageMultipartOptions {
|
|
19
29
|
partSize?: number;
|
|
20
30
|
concurrency?: number;
|
|
@@ -106,6 +116,21 @@ export interface StorageSignedUrlCapability {
|
|
|
106
116
|
supported: boolean;
|
|
107
117
|
maxExpiresIn?: number;
|
|
108
118
|
}
|
|
119
|
+
export interface StorageConditionalCopyCapability {
|
|
120
|
+
supported: boolean;
|
|
121
|
+
etag: boolean;
|
|
122
|
+
version: boolean;
|
|
123
|
+
}
|
|
124
|
+
export interface StorageSignedUploadPolicyCapability {
|
|
125
|
+
/** The signed request fixes the exact declared content type. */
|
|
126
|
+
contentType: boolean;
|
|
127
|
+
/** The signed request enforces the requested min/max byte range. */
|
|
128
|
+
sizeRange: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface StorageSignedDownloadPolicyCapability {
|
|
131
|
+
/** Every generated URL honors the requested expiry. */
|
|
132
|
+
expiresIn: boolean;
|
|
133
|
+
}
|
|
109
134
|
export interface StorageCapabilities {
|
|
110
135
|
rangeRead: boolean;
|
|
111
136
|
/** True when the provider reports native byte-level upload progress. */
|
|
@@ -115,12 +140,25 @@ export interface StorageCapabilities {
|
|
|
115
140
|
cacheControl: boolean;
|
|
116
141
|
resumableUpload: boolean;
|
|
117
142
|
serverSideCopy: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Conditional server-side copy used to promote an already verified staged
|
|
145
|
+
* object without a validation/copy race. Absent means unsupported for
|
|
146
|
+
* compatibility with drivers built against earlier package versions.
|
|
147
|
+
*/
|
|
148
|
+
conditionalCopy?: StorageConditionalCopyCapability;
|
|
118
149
|
signedDownload: StorageSignedUrlCapability;
|
|
150
|
+
/** Expiry guarantees enforced by the provider adapter. */
|
|
151
|
+
signedDownloadPolicy?: StorageSignedDownloadPolicyCapability;
|
|
119
152
|
/**
|
|
120
153
|
* Some providers decide support from credentials or requested constraints,
|
|
121
154
|
* so direct-upload support can only be known when the call is attempted.
|
|
122
155
|
*/
|
|
123
156
|
signedUpload: boolean | 'runtime';
|
|
157
|
+
/**
|
|
158
|
+
* Constraints cryptographically/provider-policy enforced by direct upload.
|
|
159
|
+
* Absent means callers must not assume request options are enforced.
|
|
160
|
+
*/
|
|
161
|
+
signedUploadPolicy?: StorageSignedUploadPolicyCapability;
|
|
124
162
|
}
|
|
125
163
|
export interface StorageBulkOptions {
|
|
126
164
|
concurrency?: number;
|
|
@@ -164,7 +202,7 @@ export interface StorageDeleteManyResult {
|
|
|
164
202
|
deleted: string[];
|
|
165
203
|
errors?: StorageBulkError[];
|
|
166
204
|
}
|
|
167
|
-
export type StorageOperationName = 'upload' | 'download' | 'head' | 'exists' | 'delete' | 'copy' | 'move' | 'list' | 'search' | 'signDownload' | 'signUpload';
|
|
205
|
+
export type StorageOperationName = 'upload' | 'download' | 'head' | 'exists' | 'delete' | 'copy' | 'move' | 'promote' | 'list' | 'search' | 'signDownload' | 'signUpload';
|
|
168
206
|
export interface StorageOperationContext {
|
|
169
207
|
store: string;
|
|
170
208
|
operation: StorageOperationName;
|
|
@@ -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,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M,CAAC;IACZ,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACtD;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\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 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 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 signedDownload: StorageSignedUrlCapability;\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\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 | '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\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 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 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 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 +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,
|
|
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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestm/storage",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.4",
|
|
4
4
|
"description": "Framework-neutral storage clients with NestJS 12 integration, named stores, streaming I/O, and an optional guarded HTTP gateway.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Kauan Guesser",
|
|
@@ -27,6 +27,18 @@
|
|
|
27
27
|
"types": "./dist/files-sdk/index.d.ts",
|
|
28
28
|
"import": "./dist/files-sdk/index.js"
|
|
29
29
|
},
|
|
30
|
+
"./files-sdk/fs": {
|
|
31
|
+
"types": "./dist/files-sdk/fs/index.d.ts",
|
|
32
|
+
"import": "./dist/files-sdk/fs/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./files-sdk/provider": {
|
|
35
|
+
"types": "./dist/files-sdk/provider/index.d.ts",
|
|
36
|
+
"import": "./dist/files-sdk/provider/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./files-sdk/s3": {
|
|
39
|
+
"types": "./dist/files-sdk/s3/index.d.ts",
|
|
40
|
+
"import": "./dist/files-sdk/s3/index.js"
|
|
41
|
+
},
|
|
30
42
|
"./gateway": {
|
|
31
43
|
"types": "./dist/gateway/index.d.ts",
|
|
32
44
|
"import": "./dist/gateway/index.js"
|
|
@@ -66,15 +78,31 @@
|
|
|
66
78
|
"nestm"
|
|
67
79
|
],
|
|
68
80
|
"dependencies": {
|
|
69
|
-
"files-sdk": "2.2.
|
|
81
|
+
"files-sdk": "2.2.3"
|
|
70
82
|
},
|
|
71
83
|
"peerDependencies": {
|
|
84
|
+
"@aws-sdk/client-s3": "^3.700.0",
|
|
85
|
+
"@aws-sdk/lib-storage": "^3.700.0",
|
|
86
|
+
"@aws-sdk/s3-presigned-post": "^3.700.0",
|
|
87
|
+
"@aws-sdk/s3-request-presigner": "^3.700.0",
|
|
72
88
|
"@nestjs/common": "^12.0.0-alpha.5",
|
|
73
89
|
"@nestjs/core": "^12.0.0-alpha.5",
|
|
74
90
|
"reflect-metadata": "^0.2.2",
|
|
75
91
|
"rxjs": "^7.8.1"
|
|
76
92
|
},
|
|
77
93
|
"peerDependenciesMeta": {
|
|
94
|
+
"@aws-sdk/client-s3": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"@aws-sdk/lib-storage": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"@aws-sdk/s3-presigned-post": {
|
|
101
|
+
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"@aws-sdk/s3-request-presigner": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
78
106
|
"@nestjs/common": {
|
|
79
107
|
"optional": true
|
|
80
108
|
},
|
|
@@ -89,6 +117,10 @@
|
|
|
89
117
|
}
|
|
90
118
|
},
|
|
91
119
|
"devDependencies": {
|
|
120
|
+
"@aws-sdk/client-s3": "3.1103.0",
|
|
121
|
+
"@aws-sdk/lib-storage": "3.1103.0",
|
|
122
|
+
"@aws-sdk/s3-presigned-post": "3.1103.0",
|
|
123
|
+
"@aws-sdk/s3-request-presigner": "3.1103.0",
|
|
92
124
|
"@changesets/cli": "2.31.1",
|
|
93
125
|
"@nestjs/common": "12.0.0-alpha.5",
|
|
94
126
|
"@nestjs/core": "12.0.0-alpha.5",
|
|
@@ -98,14 +130,14 @@
|
|
|
98
130
|
"@types/node": "26.1.2",
|
|
99
131
|
"@types/supertest": "7.2.1",
|
|
100
132
|
"@vitest/coverage-v8": "4.1.10",
|
|
101
|
-
"fastify": "5.
|
|
102
|
-
"oxlint": "1.
|
|
133
|
+
"fastify": "5.11.2",
|
|
134
|
+
"oxlint": "1.77.0",
|
|
103
135
|
"prettier": "3.9.6",
|
|
104
|
-
"publint": "0.3.
|
|
136
|
+
"publint": "0.3.23",
|
|
105
137
|
"reflect-metadata": "0.2.2",
|
|
106
138
|
"rxjs": "7.8.2",
|
|
107
139
|
"supertest": "7.2.2",
|
|
108
|
-
"typescript": "
|
|
140
|
+
"typescript": "7.0.2",
|
|
109
141
|
"vitest": "4.1.10"
|
|
110
142
|
},
|
|
111
143
|
"scripts": {
|