Minima.js API / @minimajs/disk / plugins
plugins
Classes
| Class | Description |
|---|---|
| ChecksumMismatchError | Base class for all disk-related errors |
Interfaces
| Interface | Description |
|---|---|
| AtomicWriteOptions | - |
| ChecksumOptions | - |
| CompressionOptions | - |
| DownloadProgress | - |
| EncryptionOptions | - |
| PartitionByDate | - |
| PartitionByHash | - |
| UploadProgress | - |
Type Aliases
| Type Alias | Description |
|---|---|
| NameGenerator | - |
| NameStrategy | - |
| PartitionGenerator | Custom prefix generator — receives the same args as the put hook |
| PartitionOptions | - |
Functions
| Function | Description |
|---|---|
| atomicWrite | Atomic write plugin — writes to a temp file first, then renames to the final path. Prevents partial or corrupted files from ever being visible to readers. |
| checksum | Checksum plugin — writes a sidecar hash file alongside each stored file and verifies integrity on stream read. |
| compression | Compression plugin — compresses files on put, decompresses on get. |
| downloadProgress | Download progress plugin — tracks bytes read from the driver. Uses the streaming hook to wrap the stream with a TransformStream that calls onProgress as each chunk passes through. |
| encryption | Encryption plugin — transparently encrypts files on write and decrypts on read. |
| partition | Partition plugin — automatically organizes files into subdirectories on write. |
| storeAs | storeAs plugin — customize how filenames are generated when a File object is passed to put. |
| uploadProgress | Upload progress plugin — tracks bytes written to the driver. Uses the storing hook to wrap the stream with a TransformStream that calls onProgress as each chunk passes through. |