@upflowi/store-memory
v0.2.1
Published
In-memory UploadStore for upflowi — process-lifetime resume state, useful for tests, Node scripts, and any environment where persistence across reloads isn't needed.
Maintainers
Readme
@upflowi/store-memory
An in-memory UploadStore for upflowi — resume state lives for the lifetime of the process. Good for tests and short-lived Node scripts; not for anything that needs to survive a page reload or process restart.
pnpm add @upflowi/core @upflowi/store-memoryimport { createUploader } from "@upflowi/core";
import { createMemoryStore } from "@upflowi/store-memory";
const uploader = createUploader({
provider,
transport,
store: createMemoryStore(),
});When to use this vs. @upflowi/store-indexeddb
@upflowi/store-memory— resume state lives only as long as this store instance; a page reload, a process restart, or creating a new store all lose it. Use it for tests, short-lived Node scripts, or anywhere losing in-flight resume state on restart is acceptable.@upflowi/store-indexeddb— browser-only, resume state survives a page reload or a crashed tab.
@upflowi/core ships no store implementation on purpose (it stays dependency-free) — you can also implement UploadStore yourself; it's three methods (get/set/delete).
Peer dependency
Requires @upflowi/core as a peer dependency — install both.
Documentation
See the monorepo README for the full resumable-uploads example and AGENTS.md for the architecture.
