Skip to content

PersistenceOptions

Nodepod API


Nodepod API / src / PersistenceOptions

Defined in: src/persistence/workspace/types.ts:64

optional autoInstall?: boolean

Defined in: src/persistence/workspace/types.ts:83

Reinstall dependencies from package.json after restoring. Default true.


optional debounceMs?: number

Defined in: src/persistence/workspace/types.ts:93

Quiet time before changes are saved. Default 250ms.


optional exclude?: (path) => boolean

Defined in: src/persistence/workspace/types.ts:75

Extra filter; return true to skip a path. /tmp and /.nodepod are always skipped.

string

boolean


optional excludeDirNames?: string[]

Defined in: src/persistence/workspace/types.ts:73

Directory names never persisted, at any depth. Default ["node_modules", ".cache", ".npm"].


id: string

Defined in: src/persistence/workspace/types.ts:66

Workspace key. Distinct ids are independent workspaces on the same origin.


optional lock?: "error" | "steal"

Defined in: src/persistence/workspace/types.ts:89

What to do when another tab already holds this workspace. "error" (default) makes boot throw EWORKSPACELOCKED; "steal" takes it over and the other tab stops saving.


optional requestPersistentStorage?: boolean

Defined in: src/persistence/workspace/types.ts:91

Ask the browser not to evict this origin’s storage. Default false.


optional seed?: "if-empty" | "always"

Defined in: src/persistence/workspace/types.ts:81

When files from the boot options are written. "if-empty" (default) only seeds a workspace that has never been saved; "always" writes them over the restored state on every boot.


optional store?: WorkspaceStore

Defined in: src/persistence/workspace/types.ts:71

Where to save. Defaults to IndexedDB in browsers and a directory under the host cache dir on Node.