LockedConfig<S>
Returned by .run() on create, load, save, and reset operations. Keyring-protected fields are always null in the data property.
The config data with keyring fields replaced by
null. Access this property to read non-secret fields without touching the OS keyring.Fetches keyring values from the OS keyring and returns an
UnlockedConfig with all fields populated. Requires configurate:allow-unlock in your capability file.UnlockedConfig<S>
Returned by .unlock(keyringOpts) on create, load, save, and reset operations, or by calling locked.unlock(opts). Provides access to all fields including keyring-protected ones.
The config data with all keyring fields populated with their actual values. Accessing
data after calling lock() throws an error.Revokes access to the decrypted data through this instance. After calling
lock(), accessing .data throws. This is an API-level access guard — it does not zero-clear memory.PatchedConfig<S>
Returned by .run() on patch operations. Contains the partial data that was merged — not the full config.
The partial config data that was submitted to the patch. Keyring fields in the patch are
null. This is the patch payload, not a full reload of the stored config.BatchRunResult
Returned by .run() on Configurate.loadAll(), Configurate.saveAll(), and Configurate.patchAll(). Contains per-entry results keyed by the id strings you provided.
A map from entry ID to its individual result. Each value is either a success or a failure — a single entry failing does not abort the rest of the batch.
BatchRunEntryResult
The type of each value inside BatchRunResult.results. A discriminated union on the ok field.
true if the operation for this entry succeeded; false if it failed.Present when
ok is true. The loaded or saved config data for this entry.Present when
ok is false. A short machine-readable error kind (e.g. "schema_validation", "unlock_failed", "payload_build_failed").Present when
ok is false. A human-readable description of what went wrong.KeyringOptions
Passed to .lock(), .unlock(), delete(), exportAs(), and importFrom() to identify where secrets are stored in the OS keyring.
The keyring service name. Typically your app name. Used to namespace secrets within the OS keyring.
The keyring account name. Can be a user identifier or a constant like
"default". Combined with service to form the keyring entry key.ConfigChangeEvent
Passed to the callback registered with config.onChange() and config.watchExternal().
The config file name that was changed (e.g.
"app.json").The kind of change. One of
"create", "save", "patch", "delete", "reset", "import", or "external_change". "external_change" is emitted by watchExternal only.An opaque internal identifier that uniquely describes the storage target (file name, base directory, provider, and path options). Used internally to filter events to the correct
Configurate instance.MigrationStep
Used with the version and migrations constructor options to define schema versioning. Each step upgrades data from one schema version to the next.
The schema version this migration upgrades from. A step with
version: 1 transforms data stored at version 1 into version 2 data.A pure transform function. Receives data at
version and must return data at version + 1. Migrations run automatically on load(), and migrated data is auto-saved back to storage.Migrations run in order from the stored version up to the current
version. If the loaded data is migrated, it is automatically saved back to storage so the next load does not re-run the same steps.