amplify-prompts
Advanced tools
Comparing version 1.6.0 to 1.6.1-beta.5
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.6.1-beta.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-prompts@1.6.1-beta.3...amplify-prompts@1.6.1-beta.5) (2022-01-09) | ||
**Note:** Version bump only for package amplify-prompts | ||
# [1.6.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-prompts@1.5.1...amplify-prompts@1.6.0) (2021-11-23) | ||
@@ -8,0 +16,0 @@ |
@@ -60,3 +60,4 @@ "use strict"; | ||
this.input = async (message, ...options) => { | ||
const opts = (options === null || options === void 0 ? void 0 : options[0]) || {}; | ||
var _a; | ||
const opts = (_a = options === null || options === void 0 ? void 0 : options[0]) !== null && _a !== void 0 ? _a : {}; | ||
if (flags_1.isYes) { | ||
@@ -63,0 +64,0 @@ if (opts.initial) { |
{ | ||
"name": "amplify-prompts", | ||
"version": "1.6.0", | ||
"version": "1.6.1-beta.5", | ||
"description": "Utility functions for Amplify CLI terminal I/O", | ||
@@ -51,3 +51,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "3c694594b4a6490db051b4f104cf19b9a37e1ef4" | ||
"gitHead": "c8802487e0f5f3fe33fbca141acd4bb2aa04e602" | ||
} |
@@ -66,3 +66,3 @@ import { prompt } from 'enquirer'; | ||
input = async <RS extends ReturnSize = 'one', T = string>(message: string, ...options: MaybeOptionalInputOptions<RS, T>) => { | ||
const opts = options?.[0] || {}; | ||
const opts = options?.[0] ?? ({} as InputOptions<RS, T>); | ||
if (isYes) { | ||
@@ -92,3 +92,3 @@ if (opts.initial) { | ||
if (Array.isArray(result)) { | ||
return (await Promise.all(result.map(async part => (opts.transform as Function)(part) as T))) as PromptReturn<RS, T>; | ||
return (await Promise.all(result.map(async part => (opts.transform as Function)(part) as T))) as unknown as PromptReturn<RS, T>; | ||
} | ||
@@ -95,0 +95,0 @@ return opts.transform(result as string) as unknown as PromptReturn<RS, T>; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168281
1425
1