From 1b4d85574bbf597fc1c3d5277a7c90f15fa05fd2 Mon Sep 17 00:00:00 2001 From: dennismeister93 Date: Wed, 15 May 2024 13:48:20 +0200 Subject: [PATCH] fix: mandatory component selection on create (#265) * fix: mandatory component selection on create Signed-off-by: Dennis Meister --------- Signed-off-by: Dennis Meister --- src/commands/create/index.ts | 7 ++++++- .../vehicle-app-template/package-index.json | 13 ++++++++++++- testbench/test-exec/app/AppManifest.json | 2 +- testbench/test-init/.velocitasLegacy.json | 8 ++++---- testbench/test-init/.velocitasNew.json | 10 +++++----- testbench/test-init/app/AppManifest.json | 2 +- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/commands/create/index.ts b/src/commands/create/index.ts index bb95df91..a5903cfe 100644 --- a/src/commands/create/index.ts +++ b/src/commands/create/index.ts @@ -201,7 +201,12 @@ export default class Create extends Command { corePromptResult.appName, corePromptResult.example, appManifestInterfaceAttributes, - packageIndex.getMandatoryExtensionsByCoreId(corePromptResult.chosenCore.id).map((ext: ExtensionComponent) => ext.id), + [ + ...(corePromptResult.example + ? packageIndex.getMandatoryExtensionsByExampleForCore(corePromptResult.chosenCore.id, corePromptResult.appName) + : []), + ...packageIndex.getMandatoryExtensionsByCoreId(corePromptResult.chosenCore.id).map((ext: ExtensionComponent) => ext.id), + ], ); return createData; } diff --git a/testbench/test-create/vehicle-app-template/package-index.json b/testbench/test-create/vehicle-app-template/package-index.json index 8e0c4e89..5af64966 100644 --- a/testbench/test-create/vehicle-app-template/package-index.json +++ b/testbench/test-create/vehicle-app-template/package-index.json @@ -106,6 +106,17 @@ ] } ] + }, + { + "id": "devcontainer-setup-java", + "type": "extension", + "name": "devContainer Setup uProtocol Java", + "description": "VSCode devContainer setup for uProtocol Java applications", + "mandatory": true, + "compatibleCores": [ + "uprotocol-core-java" + ], + "parameters": [] } ] }, @@ -136,7 +147,7 @@ { "id": "src", "description": "URI or path to VSS json", - "default": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json", + "default": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v4.0/vss_rel_4.0.json", "required": true, "type": "string" }, diff --git a/testbench/test-exec/app/AppManifest.json b/testbench/test-exec/app/AppManifest.json index f3a31288..356a0f5d 100644 --- a/testbench/test-exec/app/AppManifest.json +++ b/testbench/test-exec/app/AppManifest.json @@ -5,7 +5,7 @@ { "type": "vehicle-signal-interface", "config": { - "src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json", + "src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v4.0/vss_rel_4.0.json", "datapoints": { "required": [ { diff --git a/testbench/test-init/.velocitasLegacy.json b/testbench/test-init/.velocitasLegacy.json index 59ff6891..6f1e2b4a 100644 --- a/testbench/test-init/.velocitasLegacy.json +++ b/testbench/test-init/.velocitasLegacy.json @@ -2,19 +2,19 @@ "packages": [ { "repo": "devenv-runtimes", - "version": "v2.2.6" + "version": "v3.1.1" }, { "repo": "devenv-github-workflows", - "version": "v4.1.4" + "version": "v6.0.1" }, { "repo": "devenv-github-templates", - "version": "v1.0.3" + "version": "v1.0.5" }, { "repo": "devenv-devcontainer-setup", - "version": "v1.4.7" + "version": "v2.2.0" } ], "variables": { diff --git a/testbench/test-init/.velocitasNew.json b/testbench/test-init/.velocitasNew.json index c9fb49ba..59cc931b 100644 --- a/testbench/test-init/.velocitasNew.json +++ b/testbench/test-init/.velocitasNew.json @@ -1,10 +1,10 @@ { "packages": { "https://github.com/eclipse-velocitas/pkg-velocitas-main.git": "v0.0.2", - "https://github.com/eclipse-velocitas/devenv-devcontainer-setup.git": "v2.0.0", - "https://github.com/eclipse-velocitas/devenv-runtimes.git": "v3.0.0", - "https://github.com/eclipse-velocitas/devenv-github-templates.git": "v1.0.3", - "https://github.com/eclipse-velocitas/devenv-github-workflows.git": "v5.0.0" + "https://github.com/eclipse-velocitas/devenv-devcontainer-setup.git": "v2.2.0", + "https://github.com/eclipse-velocitas/devenv-runtimes.git": "v3.1.1", + "https://github.com/eclipse-velocitas/devenv-github-templates.git": "v1.0.5", + "https://github.com/eclipse-velocitas/devenv-github-workflows.git": "v6.0.1" }, "components": [ "vapp-core-python", @@ -22,5 +22,5 @@ "appManifestPath": "./app/AppManifest.json", "githubRepoId": "" }, - "cliVersion": "v0.6.3" + "cliVersion": "v0.9.0" } diff --git a/testbench/test-init/app/AppManifest.json b/testbench/test-init/app/AppManifest.json index cb16e657..c152f47b 100644 --- a/testbench/test-init/app/AppManifest.json +++ b/testbench/test-init/app/AppManifest.json @@ -5,7 +5,7 @@ { "type": "vehicle-signal-interface", "config": { - "src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json", + "src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v4.0/vss_rel_4.0.json", "datapoints": { "required": [ {