[mod] main:Aktion "expose-conf" hinzugefügt
This commit is contained in:
parent
cfeee83fdb
commit
33339d5700
1 changed files with 19 additions and 3 deletions
|
@ -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(
|
||||
{
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue