|
| 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