From 33339d5700ebca39ef322102a56f97a787cfc0b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Mon, 22 Apr 2024 23:38:05 +0200 Subject: [PATCH] =?UTF-8?q?[mod]=20main:Aktion=20"expose-conf"=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/main.ts | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/source/main.ts b/source/main.ts index 3653000..ce97f53 100644 --- a/source/main.ts +++ b/source/main.ts @@ -25,6 +25,10 @@ async function main( "name": "api-doc", "description": "API-Dokumentation gemäß OpenAPI Specification auf Standard-Ausgabe schreiben" }, + { + "name": "expose-conf", + "description": "Vollständige Konfiguration ausgeben" + }, { "name": "password-image", "description": "Passwort-Abbild errechnen und auf Standard-Ausgabe schreiben" @@ -126,9 +130,6 @@ async function main( ] ); - // prepare database - await _espe.database.advance_all(); - switch (args["action"]) { default: { process.stderr.write("invalid action: " + args["action"] + "\n"); @@ -145,6 +146,18 @@ async function main( } break; } + case "expose-conf": { + process.stdout.write( + JSON.stringify( + _espe.conf.get(), + undefined, + "\t" + ) + + + "\n" + ); + break; + } case "api-doc": { const rest_subject : lib_plankton.rest.type_rest = _espe.api.make(); process.stdout.write( @@ -157,6 +170,9 @@ async function main( break; } case "serve": { + // prepare database + await _espe.database.check(); + await lib_plankton.session.setup( { /*