Skip to content

Commit 83ddf5e

Browse files
committed
feature: removed 'sam init' for addComponents
1 parent 31c2929 commit 83ddf5e

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

src/configs/buildConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const samConfig: Record<
44
> = {
55
choices: {
66
tool: ["GitHub", "GitLab", "BitBucket"],
7-
language: ["js", "python"],
7+
language: ["js"],
88
framework: ["sam", "cdk"],
99
deploymentregion: [
1010
"us-east-2",

src/configs/cliConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const app: Record<
4141
choices: {
4242
methods: ["put", "get", "post", "delete"],
4343
resourcetype: ["lambda", "stepfunction", "dynamodb"],
44-
language: ["Node", "Python"],
44+
language: ["Node"],
4545
type: Object.values(moduleDescription),
4646
pipeline: ["generate pipeline", "cli", "repository and pipeline"],
4747
},

src/utilities/cliUtil.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,13 @@ export async function inputString(
7171
(value !== "" && value !== undefined) ||
7272
"Environment values cannot be empty"
7373
)
74+
} else {
75+
return (
76+
optional ||
77+
stringpattern.test(value) ||
78+
`${message} ${name} ${value} should have only alphanumeric values `
79+
)
7480
}
75-
// return (
76-
// optional ||
77-
// stringpattern.test(value) ||
78-
// `${typeof message} ${typeof value} ${typeof optional} ${typeof stringpattern.test(
79-
// value
80-
// )} should have only alphanumeric values `
81-
// )
82-
return (
83-
optional ||
84-
(!stringpattern.test(value)
85-
? `should have only alphanumeric values`
86-
: true)
87-
)
8881
},
8982
},
9083
])

0 commit comments

Comments
 (0)