Skip to content

Minima.js API


Minima.js API / @minimajs/disk / plugins

plugins

Classes

ClassDescription
ChecksumMismatchErrorBase class for all disk-related errors

Interfaces

InterfaceDescription
AtomicWriteOptions-
ChecksumOptions-
CompressionOptions-
DownloadProgress-
EncryptionOptions-
PartitionByDate-
PartitionByHash-
UploadProgress-

Type Aliases

Type AliasDescription
NameGenerator-
NameStrategy-
PartitionGeneratorCustom prefix generator — receives the same args as the put hook
PartitionOptions-

Functions

FunctionDescription
atomicWriteAtomic 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.
checksumChecksum plugin — writes a sidecar hash file alongside each stored file and verifies integrity on stream read.
compressionCompression plugin — compresses files on put, decompresses on get.
downloadProgressDownload 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.
encryptionEncryption plugin — transparently encrypts files on write and decrypts on read.
partitionPartition plugin — automatically organizes files into subdirectories on write.
storeAsstoreAs plugin — customize how filenames are generated when a File object is passed to put.
uploadProgressUpload 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.