✨ types(config): Projekt-Secrets (#66)
ConfigPackage.secret(name): string | null und secretNames(): string[] ergänzt; project.schema.json erlaubt den secrets-Block (string-Map) mit Hinweis, dass die Werte nie in API-Antworten oder config.project() landen. Refs cms/tibi-server#66
This commit is contained in:
1 parent
081a87c492
commit
8f17bb7ad4
2 files changed
+24
No files matched your search
Vendored
+17
@@ -1103,6 +1103,23 @@ declare global {
|
||||
*
|
||||
*/
|
||||
project(): ProjectInfo
|
||||
/**
|
||||
* Read a project secret from `secrets:` in the project config.
|
||||
*
|
||||
* Secrets are never part of `project()`, a project API response or any
|
||||
* other JSON projection — hooks and actions only. Values are substituted
|
||||
* from `config.yml.env` like every other `${VAR}`.
|
||||
*
|
||||
* @param name secret name
|
||||
* @returns the value, or `null` when no such secret is configured
|
||||
*/
|
||||
secret(name: string): string | null
|
||||
|
||||
/**
|
||||
* Names of the configured project secrets (sorted). Values are never
|
||||
* included — this is for diagnostics and setup screens.
|
||||
*/
|
||||
secretNames(): string[]
|
||||
|
||||
/**
|
||||
* get server config object (sensitive fields like jwtSecret, adminTokens, apiKeys are excluded)
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9_-]+$"
|
||||
},
|
||||
"secrets": {
|
||||
"description": "Values for hooks/actions only (JWT keys, SMTP passwords, ...). Substituted from config.yml.env like every other value; never part of a project API response or context.config.project(). Read them with context.config.secret(name).",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
|
||||
Reference in new issue
Block a user