amplify-prompts
Advanced tools
Comparing version 2.2.1-alpha.55 to 2.3.0-modelIntrospectionCommand.0
@@ -6,2 +6,14 @@ # Change Log | ||
# [2.3.0-modelIntrospectionCommand.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-prompts@2.2.0...amplify-prompts@2.3.0-modelIntrospectionCommand.0) (2022-09-02) | ||
### Features | ||
* pretty print cloudformation event logs ([#10720](https://github.com/aws-amplify/amplify-cli/issues/10720)) ([aaf2210](https://github.com/aws-amplify/amplify-cli/commit/aaf22103548a329b3092f52736c28c9b5c5b8b8b)) | ||
* unified error handling framework ([#10933](https://github.com/aws-amplify/amplify-cli/issues/10933)) ([cc9a422](https://github.com/aws-amplify/amplify-cli/commit/cc9a422793f4ef620a4ed634b6f55e28e3a8a3a2)) | ||
# [2.2.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-prompts@2.1.0...amplify-prompts@2.2.0) (2022-06-03) | ||
@@ -8,0 +20,0 @@ |
@@ -5,2 +5,3 @@ export declare const isDebug: boolean; | ||
export declare const isInteractiveShell: boolean; | ||
export declare const isHeadless: boolean; | ||
//# sourceMappingURL=flags.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isInteractiveShell = exports.isYes = exports.isSilent = exports.isDebug = void 0; | ||
exports.isHeadless = exports.isInteractiveShell = exports.isYes = exports.isSilent = exports.isDebug = void 0; | ||
exports.isDebug = process.argv.includes('--debug'); | ||
@@ -8,2 +8,3 @@ exports.isSilent = process.argv.includes('--silent'); | ||
exports.isInteractiveShell = process.stdin.isTTY; | ||
exports.isHeadless = process.argv.includes('--headless'); | ||
//# sourceMappingURL=flags.js.map |
@@ -5,2 +5,5 @@ export * from './formatter'; | ||
export * from './validators'; | ||
export * from './progressbars/progressbar'; | ||
export * from './progressbars/multibar'; | ||
export * from './progressbars/spinner'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -17,2 +17,5 @@ "use strict"; | ||
__exportStar(require("./validators"), exports); | ||
__exportStar(require("./progressbars/progressbar"), exports); | ||
__exportStar(require("./progressbars/multibar"), exports); | ||
__exportStar(require("./progressbars/spinner"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -25,9 +25,9 @@ "use strict"; | ||
this.success = (line) => { | ||
this.writeSilenceableLine(`✅ ${chalk_1.default.green(line)}`); | ||
this.writeSilenceableLine(`${flags_1.isHeadless ? '' : '✅ '}${chalk_1.default.green(line)}`); | ||
}; | ||
this.warn = (line) => { | ||
this.writeLine(`⚠️ ${chalk_1.default.yellow(line)}`); | ||
this.writeLine(`${flags_1.isHeadless ? '' : '⚠️ '}${chalk_1.default.yellow(line)}`); | ||
}; | ||
this.error = (line) => { | ||
this.writeLine(`🛑 ${chalk_1.default.red(line)}`); | ||
this.writeLine(`${flags_1.isHeadless ? '' : '🛑 '}${chalk_1.default.red(line)}`); | ||
}; | ||
@@ -34,0 +34,0 @@ this.writeSilenceableLine = (line) => { |
{ | ||
"name": "amplify-prompts", | ||
"version": "2.2.1-alpha.55+666b7b04e", | ||
"version": "2.3.0-modelIntrospectionCommand.0", | ||
"description": "Utility functions for Amplify CLI terminal I/O", | ||
@@ -29,3 +29,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"amplify-cli-shared-interfaces": "1.1.1-alpha.112+666b7b04e", | ||
"amplify-cli-shared-interfaces": "1.1.0", | ||
"chalk": "^4.1.1", | ||
@@ -53,3 +53,3 @@ "enquirer": "^2.3.6" | ||
}, | ||
"gitHead": "666b7b04eb3440d1f3820cb4754b00ed807a8ab1" | ||
"gitHead": "f3fd1553f3940227cad5e131188cc02c1540f0a7" | ||
} |
@@ -9,10 +9,10 @@ import { Stopwatch } from '../stopwatch'; | ||
stopwatch.pause(); | ||
expect(stopwatch.getElapsedMilliseconds()).toBeGreaterThanOrEqual(300); | ||
expect(stopwatch.getElapsedMilliseconds()).toBeLessThan(305); | ||
expect(stopwatch.getElapsedMilliseconds()).toBeGreaterThanOrEqual(295); | ||
expect(stopwatch.getElapsedMilliseconds()).toBeLessThan(350); | ||
stopwatch.start(); | ||
await new Promise((resolve, __reject) => { setTimeout(resolve, 300); }); | ||
stopwatch.pause(); | ||
expect(stopwatch.getElapsedMilliseconds()).toBeGreaterThanOrEqual(600); | ||
expect(stopwatch.getElapsedMilliseconds()).toBeLessThanOrEqual(605); | ||
expect(stopwatch.getElapsedMilliseconds()).toBeGreaterThanOrEqual(595); | ||
expect(stopwatch.getElapsedMilliseconds()).toBeLessThanOrEqual(700); | ||
}); | ||
}); |
@@ -20,1 +20,6 @@ /** | ||
export const isInteractiveShell = process.stdin.isTTY; | ||
/** | ||
* If this flag is set, printer will trim non ASCI characters from the output. | ||
*/ | ||
export const isHeadless = process.argv.includes('--headless'); |
@@ -5,1 +5,4 @@ export * from './formatter'; | ||
export * from './validators'; | ||
export * from './progressbars/progressbar'; | ||
export * from './progressbars/multibar'; | ||
export * from './progressbars/spinner'; |
import chalk from 'chalk'; | ||
import os from 'os'; | ||
import { isDebug, isSilent } from './flags'; | ||
import { isDebug, isHeadless, isSilent } from './flags'; | ||
@@ -26,11 +26,11 @@ /** | ||
success = (line: string): void => { | ||
this.writeSilenceableLine(`✅ ${chalk.green(line)}`); | ||
this.writeSilenceableLine(`${isHeadless ? '' : '✅ '}${chalk.green(line)}`); | ||
}; | ||
warn = (line: string): void => { | ||
this.writeLine(`⚠️ ${chalk.yellow(line)}`); | ||
this.writeLine(`${isHeadless ? '' : '⚠️ '}${chalk.yellow(line)}`); | ||
}; | ||
error = (line: string): void => { | ||
this.writeLine(`🛑 ${chalk.red(line)}`); | ||
this.writeLine(`${isHeadless ? '' : '🛑 '}${chalk.red(line)}`); | ||
}; | ||
@@ -44,3 +44,3 @@ | ||
private writeLine = (line: string = ''): void => { | ||
private writeLine = (line = ''): void => { | ||
this.outputStream.write(`${line}${os.EOL}`); | ||
@@ -55,2 +55,5 @@ }; | ||
/** | ||
* defines the printer type | ||
*/ | ||
export type Printer = { | ||
@@ -57,0 +60,0 @@ debug: (line: string) => void; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
246482
74
3062
0
+ Addedamplify-cli-shared-interfaces@1.1.0(transitive)