@saflib/secret-store
@saflib/secret-store
Classes
| Class | Description |
|---|---|
| EnvSecretNotFoundError | Returned when process.env[name] is missing or blank. |
| EnvSecretStore | Resolves secrets from process.env by variable name. |
| SecretNotDeclaredError | Returned when getSecretByName is called for a name not in the package secrets.json. |
| SecretStore | - |
Type Aliases
| Type Alias | Description |
|---|---|
| CreateSecretStoreOptions | - |
| SecretManifest | Package-local list of secrets this package may fetch. |
| SecretManifestEntry | One declared secret for a package's secrets.json. |
| SecretStoreError | Union of errors returned by SecretStore#getSecretByName. Vendor backends may return additional Error subclasses. |
Functions
| Function | Description |
|---|---|
| createSecretStore | Creates an env-backed SecretStore. For Infisical, use @saflib/vendors-infisical. |
| getSecretStore | Returns the store set by setSecretStore. |
| hasSecretStore | Whether a process-level store has been set. |
| isSecretDeclared | Returns true when name appears in the package secrets manifest. |
| resetSecretStoreForTests | Test-only: clear the process-level store so configure / set can run again. |
| setSecretStore | Sets the process-level secret store. Idempotent — subsequent calls are no-ops. Vendor packages (e.g. @saflib/vendors-infisical) call this from their configure helpers. |