Skip to content

Commit 1b4d855

Browse files
author
dennismeister93
authored
fix: mandatory component selection on create (#265)
* fix: mandatory component selection on create Signed-off-by: Dennis Meister <[email protected]> --------- Signed-off-by: Dennis Meister <[email protected]>
1 parent 1383f3d commit 1b4d855

File tree

6 files changed

+29
-13
lines changed

6 files changed

+29
-13
lines changed

src/commands/create/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,12 @@ export default class Create extends Command {
201201
corePromptResult.appName,
202202
corePromptResult.example,
203203
appManifestInterfaceAttributes,
204-
packageIndex.getMandatoryExtensionsByCoreId(corePromptResult.chosenCore.id).map((ext: ExtensionComponent) => ext.id),
204+
[
205+
...(corePromptResult.example
206+
? packageIndex.getMandatoryExtensionsByExampleForCore(corePromptResult.chosenCore.id, corePromptResult.appName)
207+
: []),
208+
...packageIndex.getMandatoryExtensionsByCoreId(corePromptResult.chosenCore.id).map((ext: ExtensionComponent) => ext.id),
209+
],
205210
);
206211
return createData;
207212
}

testbench/test-create/vehicle-app-template/package-index.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,17 @@
106106
]
107107
}
108108
]
109+
},
110+
{
111+
"id": "devcontainer-setup-java",
112+
"type": "extension",
113+
"name": "devContainer Setup uProtocol Java",
114+
"description": "VSCode devContainer setup for uProtocol Java applications",
115+
"mandatory": true,
116+
"compatibleCores": [
117+
"uprotocol-core-java"
118+
],
119+
"parameters": []
109120
}
110121
]
111122
},
@@ -136,7 +147,7 @@
136147
{
137148
"id": "src",
138149
"description": "URI or path to VSS json",
139-
"default": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json",
150+
"default": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v4.0/vss_rel_4.0.json",
140151
"required": true,
141152
"type": "string"
142153
},

testbench/test-exec/app/AppManifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"type": "vehicle-signal-interface",
77
"config": {
8-
"src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json",
8+
"src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v4.0/vss_rel_4.0.json",
99
"datapoints": {
1010
"required": [
1111
{

testbench/test-init/.velocitasLegacy.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
"packages": [
33
{
44
"repo": "devenv-runtimes",
5-
"version": "v2.2.6"
5+
"version": "v3.1.1"
66
},
77
{
88
"repo": "devenv-github-workflows",
9-
"version": "v4.1.4"
9+
"version": "v6.0.1"
1010
},
1111
{
1212
"repo": "devenv-github-templates",
13-
"version": "v1.0.3"
13+
"version": "v1.0.5"
1414
},
1515
{
1616
"repo": "devenv-devcontainer-setup",
17-
"version": "v1.4.7"
17+
"version": "v2.2.0"
1818
}
1919
],
2020
"variables": {

testbench/test-init/.velocitasNew.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"packages": {
33
"https://github.com/eclipse-velocitas/pkg-velocitas-main.git": "v0.0.2",
4-
"https://github.com/eclipse-velocitas/devenv-devcontainer-setup.git": "v2.0.0",
5-
"https://github.com/eclipse-velocitas/devenv-runtimes.git": "v3.0.0",
6-
"https://github.com/eclipse-velocitas/devenv-github-templates.git": "v1.0.3",
7-
"https://github.com/eclipse-velocitas/devenv-github-workflows.git": "v5.0.0"
4+
"https://github.com/eclipse-velocitas/devenv-devcontainer-setup.git": "v2.2.0",
5+
"https://github.com/eclipse-velocitas/devenv-runtimes.git": "v3.1.1",
6+
"https://github.com/eclipse-velocitas/devenv-github-templates.git": "v1.0.5",
7+
"https://github.com/eclipse-velocitas/devenv-github-workflows.git": "v6.0.1"
88
},
99
"components": [
1010
"vapp-core-python",
@@ -22,5 +22,5 @@
2222
"appManifestPath": "./app/AppManifest.json",
2323
"githubRepoId": "<myrepo>"
2424
},
25-
"cliVersion": "v0.6.3"
25+
"cliVersion": "v0.9.0"
2626
}

testbench/test-init/app/AppManifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"type": "vehicle-signal-interface",
77
"config": {
8-
"src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json",
8+
"src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v4.0/vss_rel_4.0.json",
99
"datapoints": {
1010
"required": [
1111
{

0 commit comments

Comments
 (0)