system log + frontend update

This commit is contained in:
2024-03-25 18:37:08 +01:00
parent 716d623db4
commit 5da644acce
11 changed files with 4172 additions and 2943 deletions

View File

@@ -674,6 +674,8 @@ function onFrontend(array $argv): void {
$moduleName = strtolower($argv[3]);
if (!preg_match("/[a-z0-9_-]/", $moduleName)) {
_exit("Module name should only be [a-zA-Z0-9_-]");
} else if (in_array($moduleName, ["_tmpl", "dist", "shared"])) {
_exit("Invalid module name");
}
$templatePath = implode(DIRECTORY_SEPARATOR, [$reactRoot, "_tmpl"]);
@@ -741,6 +743,8 @@ function onFrontend(array $argv): void {
$moduleName = strtolower($argv[3]);
if (!preg_match("/[a-z0-9_-]/", $moduleName)) {
_exit("Module name should only be [a-zA-Z0-9_-]");
} else if (in_array($moduleName, ["_tmpl", "dist", "shared"])) {
_exit("This module cannot be removed");
}
$modulePath = implode(DIRECTORY_SEPARATOR, [$reactRoot, $moduleName]);