ump-plugin-session-storage
v0.0.1
Published
UMP SessionStorage Plugin - per-process key-value storage (clears on app exit)
Readme
ump-plugin-session-storage
UMP SessionStorage Plugin — per-process key-value storage; data clears when the JS engine / app process exits.
Install
npm install ump-plugin-session-storage --save
Usage
import { SessionStorage, sessionStoragePlugin, } from 'ump-plugin-session-storage';
pm.register(sessionStoragePlugin({ prefix: 'myapp' }));
await SessionStorage.setItem('flow.step', '2'); const step = await SessionStorage.getItem('flow.step'); // '2' await SessionStorage.removeItem('flow.step'); await SessionStorage.clear(); // clears only the prefix range
Backed by a pure JS Map — no native bridge, no persistence. The Map dies
with the JS engine on process exit, which is exactly the
sessionStorage contract.
The API mirrors the web-standard Storage interface — the same shape
as globalThis.localStorage exported from ump-native. Callers can
swap between persistent and session-scoped storage with a single
import change.
See src/index.ts for the full API.
Plugin authoring
This is a UMP plugin. See docs/superpowers/specs/plugin-authoring-guide.md for the plugin model.
