()
| 135 | } from "@aws-doc-sdk-examples/lib/utils/util-node.js"; |
| 136 | |
| 137 | const loadArgs = () => { |
| 138 | const options = { |
| 139 | help: { |
| 140 | type: "boolean", |
| 141 | }, |
| 142 | confirmAll: { |
| 143 | type: "boolean", |
| 144 | description: "Skip user input.", |
| 145 | }, |
| 146 | noArt: { |
| 147 | type: "boolean", |
| 148 | description: "Do not display ASCII art or text decorations.", |
| 149 | }, |
| 150 | }; |
| 151 | const results = parseArgs({ options }); |
| 152 | const { errors } = validateArgs({ options }, results); |
| 153 | if (results.values.help) { |
| 154 | printManPage(options, { |
| 155 | name: "EC2 Basics", |
| 156 | description: "Learn the basic SDK commands for Amazon EC2.", |
| 157 | synopsis: "node basics.js [OPTIONS]", |
| 158 | }); |
| 159 | } |
| 160 | return { errors, results }; |
| 161 | }; |
| 162 | |
| 163 | if (isMain(import.meta.url)) { |
| 164 | const { errors, results } = loadArgs(); |
no test coverage detected