From bc3949592150e1732f625512bbe23d2c2b862694 Mon Sep 17 00:00:00 2001 From: Fenris Wolf Date: Sat, 10 Oct 2026 18:04:41 +0200 Subject: [PATCH] [fix] schema --- misc/ivaldi.schema.json | 4 ++-- source/main.ts | 45 +++++++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/misc/ivaldi.schema.json b/misc/ivaldi.schema.json index b8f64ac..6f10018 100644 --- a/misc/ivaldi.schema.json +++ b/misc/ivaldi.schema.json @@ -15,7 +15,7 @@ "type": "string", "enum": ["node", "web"] }, - "dependencies": { + "libs": { "nullable": true, "type": "object", "properties": { @@ -80,7 +80,7 @@ "type": "string", "default": "{{project}}-{{app}" }, - "shebang": { + "head": { "nullable": true, "type": "string", "default": null diff --git a/source/main.ts b/source/main.ts index 0afe72a..1e39c56 100644 --- a/source/main.ts +++ b/source/main.ts @@ -57,7 +57,10 @@ namespace _ivaldi "misc" ), }, - "libs": (definition_raw["libs"] ?? {}), + "libs": ((libs_raw) => ({ + "plankton": (libs_raw["plankton"] ?? null), + "node": (libs_raw["node"] ?? null), + })) (definition_raw["libs"] ?? {}), "core": definition_raw["core"], "apps": ( definition_raw["apps"].map( @@ -622,6 +625,29 @@ namespace _ivaldi } } + + /** + */ + /* + async function action_deploy( + definition : _ivaldi.type_definition, + build_directory_pattern : string, + deploy_system : string, + deploy_directory : string + ) : Promise + { + const command : string = lib_plankton.string.coin( + "rsync --recursive --update{{excludes}} {{from}}/ {{to_system}}:{{to_directory}}", + { + "from": get_build_directory(definition, build_directory_pattern), + "to_system": deploy_system, + "to_directory": deploy_directory, + } + ); + await _ivaldi.execute(command); + } + */ + /** */ @@ -659,7 +685,7 @@ namespace _ivaldi "name": "assets", }), "targets": lib_plankton.args.class_argument.volatile({ - "indicators_long": ["targets"], + "indicators_long": ["target"], "indicators_short": ["t"], "type": lib_plankton.args.enum_type.string, "mode": lib_plankton.args.enum_mode.accumulate, @@ -668,7 +694,7 @@ namespace _ivaldi "name": "targets", }), "temp_directory_pattern": lib_plankton.args.class_argument.volatile({ - "indicators_long": ["temp-directory-pattern"], + "indicators_long": ["temp-directory"], "indicators_short": ["T"], "type": lib_plankton.args.enum_type.string, "mode": lib_plankton.args.enum_mode.replace, @@ -677,7 +703,7 @@ namespace _ivaldi "name": "temp-directory-pattern", }), "build_directory_pattern": lib_plankton.args.class_argument.volatile({ - "indicators_long": ["build-directory-pattern"], + "indicators_long": ["build-directory"], "indicators_short": ["B"], "type": lib_plankton.args.enum_type.string, "mode": lib_plankton.args.enum_mode.replace, @@ -686,7 +712,7 @@ namespace _ivaldi "name": "build-directory-pattern", }), "makefile_path_pattern": lib_plankton.args.class_argument.volatile({ - "indicators_long": ["makefile-path-pattern"], + "indicators_long": ["makefile-path"], "indicators_short": ["M"], "type": lib_plankton.args.enum_type.string, "mode": lib_plankton.args.enum_mode.replace, @@ -815,11 +841,18 @@ namespace _ivaldi ); break; } + /* case "deploy": { - return Promise.reject(new Error("not yet implemented")); + await action_deploy( + definition, + args.build_directory_pattern, + args.deploy_system, + args.deploy_directory + ); break; } + */ } } }