Each batch call supports a maximum of 128 entries. If you need to operate
on more configs than that, split them across multiple batch calls.
Configurate class. You assemble a list of entries — each carrying an id string, the Configurate instance, and (for write operations) the data — then chain keyring options and call .run().
Configurate.loadAll(entries)
Configurate.loadAll(entries) loads every config in the list and returns a BatchRunResult whose results map is keyed by the id you assigned each entry.
Unlock a specific entry by chaining .unlock(id, keyringOpts), or unlock every entry at once with .unlockAll(keyringOpts).
Batch loads apply the same post-load processing as individual
config.load()
calls — including defaults merging and automatic schema migration. You do
not need any extra steps to benefit from these features in a batch context.Configurate.saveAll(entries)
Configurate.saveAll(entries) saves all entries in a single IPC call. Each entry carries its full replacement data alongside the Configurate instance.
Lock a specific entry’s keyring fields with .lock(id, keyringOpts), or lock all entries at once with .lockAll(keyringOpts).
Configurate.patchAll(entries)
Configurate.patchAll(entries) applies a deep-merge patch to each config in a single IPC call. Like the individual config.patch(), only the keys you provide are updated; all other stored keys are left unchanged.
BatchRunResult
Every batch method returns aBatchRunResult after .run() resolves. Each entry in results is independently either a success or a failure, so a single bad config file does not abort the rest of the batch.
result.ok before accessing result.data. Accessing data on a failed result entry is a type error.