@directus/storage
Advanced tools
Comparing version 10.0.13 to 10.1.0
@@ -18,2 +18,6 @@ import { Readable } from 'node:stream'; | ||
}; | ||
type ChunkedUploadContext = { | ||
size?: number | undefined; | ||
metadata: Record<string, string | null> | undefined; | ||
}; | ||
declare class Driver { | ||
@@ -30,2 +34,10 @@ constructor(config: Record<string, unknown>); | ||
} | ||
interface TusDriver extends Driver { | ||
get tusExtensions(): string[]; | ||
createChunkedUpload(filepath: string, context: ChunkedUploadContext): Promise<ChunkedUploadContext>; | ||
finishChunkedUpload(filepath: string, context: ChunkedUploadContext): Promise<void>; | ||
deleteChunkedUpload(filepath: string, context: ChunkedUploadContext): Promise<void>; | ||
writeChunk(filepath: string, content: Readable, offset: number, context: ChunkedUploadContext): Promise<number>; | ||
} | ||
declare function supportsTus(driver: Driver): driver is TusDriver; | ||
type DriverConfig = { | ||
@@ -36,2 +48,2 @@ driver: string; | ||
export { Driver, type DriverConfig, type Range, type Stat, StorageManager }; | ||
export { type ChunkedUploadContext, Driver, type DriverConfig, type Range, type Stat, StorageManager, type TusDriver, supportsTus }; |
@@ -24,4 +24,8 @@ // src/index.ts | ||
}; | ||
function supportsTus(driver) { | ||
return "tusExtensions" in driver; | ||
} | ||
export { | ||
StorageManager | ||
StorageManager, | ||
supportsTus | ||
}; |
{ | ||
"name": "@directus/storage", | ||
"version": "10.0.13", | ||
"version": "10.1.0", | ||
"description": "Object storage abstraction layer for Directus", | ||
@@ -26,3 +26,3 @@ "homepage": "https://directus.io", | ||
"@vitest/coverage-v8": "1.5.3", | ||
"tsup": "8.0.2", | ||
"tsup": "8.1.0", | ||
"typescript": "5.4.5", | ||
@@ -29,0 +29,0 @@ "vitest": "1.5.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8834
74