IConfiguardOptions
Defined in: src/types/IConfiguardOptions.ts:7
Options for initializing Configuard.
Properties
Section titled “Properties”debugLogs?
Section titled “debugLogs?”
optionaldebugLogs?:boolean
Defined in: src/types/IConfiguardOptions.ts:15
Whether to enable debug logs. If set to true,
Configuard will log detailed information about
the configuration loading and validation process,
which can be helpful for troubleshooting.
Default
Section titled “Default”false
optionallock?:boolean
Defined in: src/types/IConfiguardOptions.ts:23
Whether to deep-freeze the built configuration object so it cannot be
mutated at runtime. Recursively freezes nested objects and arrays. Set to
false to get a mutable result.
Default
Section titled “Default”truedecrypt?
Section titled “decrypt?”
optionaldecrypt?: (value,item) =>string
Defined in: src/types/IConfiguardOptions.ts:39
Hook to decrypt the stored value of items marked encrypt: true, applied
(before templating and type-parsing) while building the configuration
object. Configuard is crypto-agnostic: you supply how to decrypt (your
KMS, a symmetric key via Node’s crypto, etc.).
Decryption is opt-in: without this hook, encrypt: true values are
used as-is. If the hook throws, a ConfiguardError is thrown. The function
must be synchronous.
Parameters
Section titled “Parameters”string
The stored (encrypted) string value.
Readonly<IConfigItem>
A read-only view of the config item (e.g. to vary the key).
Returns
Section titled “Returns”string
The decrypted plaintext string.