Skip to content

Commit 48ffd6c

Browse files
committed
fix : added types file , added types to buildConfig
1 parent 1f22d36 commit 48ffd6c

File tree

3 files changed

+158
-0
lines changed

3 files changed

+158
-0
lines changed

src/buildConfig.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
export const samConfig: Record<
2+
string,
3+
Record<string, Array<string>> | Array<Record<string, string>>
4+
> = {
5+
choices: {
6+
tool: ["GitHub", "GitLab", "BitBucket"],
7+
language: ["js", "python"],
8+
framework: ["sam", "cdk"],
9+
deploymentregion: [
10+
"us-east-2",
11+
"us-east-1",
12+
"us-west-1",
13+
"us-west-2",
14+
"af-south-1",
15+
"ap-east-1",
16+
"ap-southeast-3",
17+
"ap-south-1",
18+
"ap-northeast-3",
19+
"ap-northeast-2",
20+
"ap-southeast-1",
21+
"ap-southeast-2",
22+
"ap-northeast-1",
23+
"ca-central-1",
24+
"eu-central-1",
25+
"eu-west-1",
26+
"eu-west-2",
27+
"eu-south-1",
28+
"eu-west-3",
29+
"eu-north-1",
30+
"me-south-1",
31+
"sa-east-1",
32+
"us-gov-east-1",
33+
"us-gov-west-1",
34+
],
35+
dev: ["build", "deploy"],
36+
repoType: ["public", "private"],
37+
deployment: ["push", "pull", "commit"],
38+
},
39+
samBuild: [
40+
{ key: "repoType", value: "choice", message: "Repo Type:" },
41+
{ key: "tool", value: "choice", message: "Tools:" },
42+
],
43+
}

src/exec.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sam build
2+
sam deploy --no-confirm-changeset --capabilities CAPABILITY_NAMED_IAM CAPABILITY_IAM CAPABILITY_AUTO_EXPAND --stack-name $2 --region $3 --profile $5 $4

src/rover.types.ts

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
type TcrudMethods = "put" | "get" | "post" | "delete" | "options"
2+
//type TroverLang = "node" | "python";
3+
interface curdObject {
4+
path: string
5+
methods: Array<TcrudMethods>
6+
resourcetype: string
7+
}
8+
export interface IstackDetailsObject {
9+
type: string
10+
params: curdObject | object
11+
componentlist: Array<string>
12+
}
13+
export interface IstackDetails {
14+
[key: string]: IstackDetailsObject
15+
}
16+
export interface IroverInput {
17+
app_name: string
18+
language: string
19+
stack_details: IstackDetails
20+
}
21+
22+
export interface IroverAppData extends Omit<IroverInput, "stack_details"> {
23+
dependency: string
24+
extension: string
25+
StackType: Array<string>
26+
}
27+
28+
export interface IroverConfigTag {
29+
createdBy: string
30+
applicationName: string
31+
}
32+
export interface IroverConfigTagArrayValue {
33+
Key: string
34+
Value: string
35+
}
36+
export interface IroveraddComponentInputNestedType
37+
extends Omit<IroverInput, "stack_details"> {
38+
nested: boolean
39+
file_name: string
40+
nestedComponents: nestedComponentsObject
41+
}
42+
export interface IroveraddComponentInputType
43+
extends Omit<IroverInput, "stack_details"> {
44+
nested: boolean
45+
file_name: string
46+
components: Array<string>
47+
}
48+
49+
export type IroveraddComponentInput =
50+
| IroveraddComponentInputType
51+
| IroveraddComponentInputNestedType
52+
53+
interface IroverComponentInputObject {
54+
components: Array<string>
55+
path: string
56+
}
57+
58+
type nestedComponentsObject = Record<string, IroverComponentInputObject>
59+
60+
export interface IroveraddModule extends IroverInput {
61+
file_name: string
62+
}
63+
64+
export interface IroverCLIcurdObject {
65+
path: string
66+
methods: Array<TcrudMethods>
67+
resourcetype: string
68+
}
69+
70+
export interface IroverCLIparamModule {
71+
res: IroverCLIcurdObject
72+
name: string
73+
}
74+
75+
export type TroverCLIStackParams = Record<
76+
string,
77+
Record<string, IroverCLIcurdObject>
78+
>
79+
export type TroverCLIcurd = Record<string, IroverCLIcurdObject>
80+
81+
interface IroverComponentInputObject {
82+
components: Array<string>
83+
path: string
84+
}
85+
export type TnestedComponentsObject = Record<string, IroverComponentInputObject>
86+
87+
export interface IroverDeploymentConfig {
88+
bucket: string
89+
stack_name: string
90+
region: string
91+
profile: string
92+
}
93+
export interface Iroverdescription {
94+
key: string
95+
value: string
96+
}
97+
export interface IroverDeploymentObject {
98+
app_name?: string
99+
name?: string
100+
repoType: string
101+
tool: string
102+
language: string
103+
no_of_env: number
104+
envs: Array<string>
105+
branches: Array<string>
106+
framework: string
107+
steps: Record<string, Record<string, string>>
108+
stackname: Record<string, string>
109+
deploymentbucket: Record<string, string>
110+
deploymentregion: Record<string, string>
111+
deploymentparameters: Record<string, string>
112+
deploymentevents: Array<string>
113+
}

0 commit comments

Comments
 (0)