From 36b704588fe450b11aa32ae437719ebc71f6acea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Sun, 9 Jun 2024 17:48:48 +0200 Subject: [PATCH 1/3] [fix] makefile --- tools/makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/makefile b/tools/makefile index 14bdcfd..b07900c 100644 --- a/tools/makefile +++ b/tools/makefile @@ -81,7 +81,7 @@ ${dir_temp}/espe-main-raw.js: \ ${dir_source}/main.ts @ ${cmd_log} "compile | main …" @ ${cmd_mkdir} $(dir $@) - @ tsc --lib es2020 $^ --outFile $@ + @ ${cmd_tsc} --lib es2020 $^ --outFile $@ ${dir_build}/espe: \ ${dir_source}/head.js \ @@ -109,7 +109,7 @@ ${dir_temp}/espe-test-raw.js: \ ${dir_source}/test/main.mocha.ts @ ${cmd_log} "compile | test …" @ ${cmd_mkdir} $(dir $@) - @ tsc --lib es2020 $^ --outFile $@ + @ ${cmd_tsc} --lib es2020 $^ --outFile $@ ${dir_build}/espe-test.mocha.js: \ ${dir_source}/head.js \ From bea4d793e4d88fae6c05173542fc76444b482583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Mon, 10 Jun 2024 13:45:47 +0200 Subject: [PATCH 2/3] [add] action:email-test --- source/data/localization/deu.loc.json | 1 + source/data/localization/eng.loc.json | 1 + source/main.ts | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/source/data/localization/deu.loc.json b/source/data/localization/deu.loc.json index 3508bd2..848fcf0 100644 --- a/source/data/localization/deu.loc.json +++ b/source/data/localization/deu.loc.json @@ -16,6 +16,7 @@ "help.args.action.description": "auszuführende Aktion; Auswahl", "help.args.action.options.serve": "Server starten", "help.args.action.options.api_doc": "API-Dokumentation gemäß OpenAPI-Spezifikation auf Standard-Ausgabe schreiben", + "help.args.action.options.email_test": "eine Test-E-Mail senden", "help.args.action.options.expose_conf": "Vollständige Konfiguration ausgeben", "help.args.action.options.password_image": "Passwort-Abbild errechnen und auf Standard-Ausgabe schreiben", "help.args.action.options.export_authelia": "Export der Nutzer-Datenbank im Authelia-user-Datei-Format auf Standard-Ausgabe schreiben", diff --git a/source/data/localization/eng.loc.json b/source/data/localization/eng.loc.json index b646b39..6883180 100644 --- a/source/data/localization/eng.loc.json +++ b/source/data/localization/eng.loc.json @@ -16,6 +16,7 @@ "help.args.action.description": "action to executo; options", "help.args.action.options.serve": "start server", "help.args.action.options.api_doc": "write API documentation according to OpenAPI specification to stdout", + "help.args.action.options.email_test": "send a test e-mail", "help.args.action.options.expose_conf": "write complete configuration to stdout", "help.args.action.options.password_image": "compute password image and write to stdout", "help.args.action.options.export_authelia": "export user database in Authelia user file format and write to stdout", diff --git a/source/main.ts b/source/main.ts index 78a59e3..9c252a9 100644 --- a/source/main.ts +++ b/source/main.ts @@ -55,6 +55,10 @@ async function main( "name": "api-doc", "description": lib_plankton.translate.get("help.args.action.options.api_doc") }, + { + "name": "email-test", + "description": lib_plankton.translate.get("help.args.action.options.email_test") + }, { "name": "expose-conf", "description": lib_plankton.translate.get("help.args.action.options.expose_conf") @@ -205,6 +209,29 @@ async function main( ); break; } + case "email-test": { + await _espe.helpers.email_send( + ( + (args["arg1"] !== null) + ? [args["arg1"]] + : ( + ( + _espe.conf.get().admins + .map(admin => admin.email_address) + .filter(x => (x !== null)) + ) as Array + ) + ), + lib_plankton.string.coin( + "{{head}} | Test", + { + "head": _espe.conf.get().settings.organisation.name, + } + ), + "This is a test e-mail" + ); + break; + } case "serve": { // prepare database await _espe.database.check(); From 39a2bed5a49f0457eb6c698dd7967e14a8a383de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Mon, 10 Jun 2024 13:45:58 +0200 Subject: [PATCH 3/3] [mod] deploy:no delete,verbose --- tools/deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/deploy b/tools/deploy index 79df496..95c223d 100755 --- a/tools/deploy +++ b/tools/deploy @@ -44,7 +44,7 @@ def main(): "rsync", "--recursive", "--update", - "--delete", + "--verbose", "--exclude='conf.json'", ("%s/" % args.build_directory), (