@aws/ml-container-creator 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/bin/cli.js +88 -86
  2. package/config/bootstrap-stack.json +211 -0
  3. package/config/parameter-schema.json +88 -0
  4. package/infra/ci-harness/bin/ci-harness.ts +26 -0
  5. package/infra/ci-harness/buildspec.yml +352 -0
  6. package/infra/ci-harness/cdk.json +27 -0
  7. package/infra/ci-harness/lambda/scanner/index.ts +199 -0
  8. package/infra/ci-harness/lib/ci-harness-stack.ts +609 -0
  9. package/infra/ci-harness/package-lock.json +3979 -0
  10. package/infra/ci-harness/package.json +32 -0
  11. package/infra/ci-harness/tsconfig.json +38 -0
  12. package/package.json +13 -3
  13. package/src/app.js +318 -318
  14. package/src/copy-tpl.js +19 -19
  15. package/src/lib/asset-manager.js +74 -74
  16. package/src/lib/aws-profile-parser.js +45 -45
  17. package/src/lib/bootstrap-command-handler.js +560 -547
  18. package/src/lib/bootstrap-config.js +45 -45
  19. package/src/lib/ci-register-helpers.js +19 -19
  20. package/src/lib/ci-report-helpers.js +37 -37
  21. package/src/lib/ci-stage-helpers.js +49 -49
  22. package/src/lib/comment-generator.js +4 -4
  23. package/src/lib/config-manager.js +105 -105
  24. package/src/lib/deployment-config-resolver.js +10 -10
  25. package/src/lib/deployment-registry.js +153 -153
  26. package/src/lib/engine-prefix-resolver.js +8 -8
  27. package/src/lib/key-value-parser.js +6 -6
  28. package/src/lib/manifest-cli.js +108 -108
  29. package/src/lib/prompt-runner.js +224 -224
  30. package/src/lib/prompts.js +121 -121
  31. package/src/lib/registry-command-handler.js +174 -174
  32. package/src/lib/registry-loader.js +52 -52
  33. package/src/lib/sensitive-redactor.js +9 -9
  34. package/src/lib/template-engine.js +1 -1
  35. package/src/lib/template-manager.js +62 -62
  36. package/src/prompt-adapter.js +18 -18
@@ -1,12 +1,12 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { select, input, confirm, checkbox, number, Separator } from '@inquirer/prompts'
4
+ import { select, input, confirm, checkbox, number, Separator } from '@inquirer/prompts';
5
5
 
6
6
  /**
7
7
  * Maps Yeoman prompt type names to @inquirer/prompts runner functions.
8
8
  */
9
- const runners = { list: select, select, input, confirm, checkbox, number }
9
+ const runners = { list: select, select, input, confirm, checkbox, number };
10
10
 
11
11
  /**
12
12
  * Runs a sequence of Yeoman-style prompt definitions using @inquirer/prompts.
@@ -25,39 +25,39 @@ const runners = { list: select, select, input, confirm, checkbox, number }
25
25
  * @returns {Promise<object>} Accumulated answers keyed by prompt name
26
26
  */
27
27
  export async function runPrompts(prompts, previousAnswers = {}, options = {}) {
28
- const promptRunners = options.runners || runners
29
- const answers = { ...previousAnswers }
28
+ const promptRunners = options.runners || runners;
29
+ const answers = { ...previousAnswers };
30
30
 
31
31
  for (const prompt of prompts) {
32
- if (prompt.when && !prompt.when(answers)) continue
32
+ if (prompt.when && !prompt.when(answers)) continue;
33
33
 
34
- const type = prompt.type === 'list' ? 'select' : prompt.type
35
- const runner = promptRunners[type]
34
+ const type = prompt.type === 'list' ? 'select' : prompt.type;
35
+ const runner = promptRunners[type];
36
36
 
37
37
  if (!runner) {
38
- throw new Error(`Unsupported prompt type: "${prompt.type}"`)
38
+ throw new Error(`Unsupported prompt type: "${prompt.type}"`);
39
39
  }
40
40
 
41
41
  const message = typeof prompt.message === 'function'
42
- ? prompt.message(answers) : prompt.message
42
+ ? prompt.message(answers) : prompt.message;
43
43
  const choices = typeof prompt.choices === 'function'
44
- ? prompt.choices(answers) : prompt.choices
44
+ ? prompt.choices(answers) : prompt.choices;
45
45
  const defaultVal = typeof prompt.default === 'function'
46
- ? prompt.default(answers) : prompt.default
46
+ ? prompt.default(answers) : prompt.default;
47
47
 
48
48
  const mappedChoices = choices?.map(c =>
49
49
  c && c.type === 'separator'
50
50
  ? new Separator(c.separator || c.line)
51
51
  : c
52
- )
52
+ );
53
53
 
54
- const config = { message }
55
- if (mappedChoices !== undefined) config.choices = mappedChoices
56
- if (defaultVal !== undefined) config.default = defaultVal
57
- if (prompt.validate) config.validate = prompt.validate
54
+ const config = { message };
55
+ if (mappedChoices !== undefined) config.choices = mappedChoices;
56
+ if (defaultVal !== undefined) config.default = defaultVal;
57
+ if (prompt.validate) config.validate = prompt.validate;
58
58
 
59
- answers[prompt.name] = await runner(config)
59
+ answers[prompt.name] = await runner(config);
60
60
  }
61
61
 
62
- return answers
62
+ return answers;
63
63
  }