Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amplify-prompts

Package Overview
Dependencies
Maintainers
1
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amplify-prompts - npm Package Compare versions

Comparing version 2.3.0 to 2.4.0-auth-unauth-override.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [2.4.0-auth-unauth-override.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-prompts@2.3.0...amplify-prompts@2.4.0-auth-unauth-override.0) (2022-09-09)
### Features
* 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.3.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-prompts@2.3.0-rc.224a2e0e4.0...amplify-prompts@2.3.0) (2022-09-06)

@@ -8,0 +19,0 @@

1

lib/flags.d.ts

@@ -5,2 +5,3 @@ export declare const isDebug: boolean;

export declare const isInteractiveShell: boolean;
export declare const isHeadless: boolean;
//# sourceMappingURL=flags.d.ts.map

3

lib/flags.js
"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

@@ -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.3.0",
"version": "2.4.0-auth-unauth-override.0",
"description": "Utility functions for Amplify CLI terminal I/O",

@@ -52,3 +52,3 @@ "main": "lib/index.js",

},
"gitHead": "49cd5412b6dec550fa4eb229fcf0c634f32c5d1d"
"gitHead": "d8c152d137261ac6eca8c80a62015b6be60567f4"
}

@@ -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');
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc