Skip to content

Commit d5582ea

Browse files
committed
fix : added types to cliConfig
1 parent 48ffd6c commit d5582ea

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

src/cliConfig.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { Iroverdescription } from "./rover.types"
2+
import * as rover from "@rover-tools/engine/dist/bin/index"
3+
const rovercomponents = rover.components
4+
const Stack = rover.modules
5+
6+
export const LanguageSupport = {
7+
node: {
8+
version: "nodejs14.x",
9+
dependency: "npm",
10+
extension: ".js",
11+
},
12+
python: {
13+
version: "python3.9",
14+
dependency: "pip3",
15+
extension: ".py",
16+
},
17+
}
18+
const keys: Array<string> = []
19+
const values: Array<string> = []
20+
export const moduleDescription: Array<Iroverdescription> = []
21+
Object.keys(Stack.Modules).forEach((element) => {
22+
moduleDescription.push(Stack.Modules[element]["description"])
23+
})
24+
25+
moduleDescription.filter(function (ele: Iroverdescription) {
26+
keys.push(ele["key"])
27+
values.push(ele["value"])
28+
})
29+
30+
export const app: Record<
31+
string,
32+
Record<string, Array<string> | Array<Iroverdescription>>
33+
> = {
34+
choices: {
35+
methods: ["put", "get", "post", "delete"],
36+
resourcetype: ["lambda", "stepfunction", "dynamodb"],
37+
language: ["Node", "Python"],
38+
type: Object.values(moduleDescription),
39+
pipeline: ["generate pipeline", "cli", "repository and pipeline"],
40+
},
41+
}
42+
export const customizable = {
43+
components: Object.keys(rovercomponents.Components),
44+
modules: {
45+
keys: keys,
46+
values: values,
47+
},
48+
}

0 commit comments

Comments
 (0)