@microsoft/bf-cli-command
Advanced tools
Comparing version 4.5.4 to 4.6.0
@@ -0,4 +1,8 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
import { Command as Base } from '@oclif/command'; | ||
export { CLIError } from '@oclif/errors'; | ||
export { flags } from '@oclif/command'; | ||
export { CLIError } from './clierror'; | ||
export declare abstract class Command extends Base { | ||
@@ -16,4 +20,6 @@ base: string; | ||
}): never; | ||
warn(input: string | Error): void; | ||
catch(err: any): Promise<void>; | ||
finally(_: Error | undefined): Promise<void>; | ||
readStdin(): Promise<string>; | ||
trackEvent(msg: string, properties?: { | ||
@@ -20,0 +26,0 @@ [key: string]: any; |
"use strict"; | ||
/*! | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
// tslint:disable:object-curly-spacing ordered-imports | ||
const command_1 = require("@oclif/command"); | ||
var command_2 = require("@oclif/command"); | ||
exports.flags = command_2.flags; | ||
const errors_1 = require("@oclif/errors"); | ||
const clierror_1 = require("./clierror"); | ||
var clierror_2 = require("./clierror"); | ||
exports.CLIError = clierror_2.CLIError; | ||
const readpipeddata_1 = tslib_1.__importDefault(require("./readpipeddata")); | ||
const telemetry_1 = tslib_1.__importDefault(require("./telemetry")); | ||
const chalk = require('chalk'); | ||
const pjson = require('../package.json'); | ||
const telemetry_1 = tslib_1.__importDefault(require("./telemetry")); | ||
var errors_2 = require("@oclif/errors"); | ||
exports.CLIError = errors_2.CLIError; | ||
var command_2 = require("@oclif/command"); | ||
exports.flags = command_2.flags; | ||
class Command extends command_1.Command { | ||
@@ -29,4 +36,8 @@ constructor() { | ||
} | ||
warn(input) { | ||
/* tslint:disable:no-console */ | ||
console.error(chalk.yellow(input)); | ||
} | ||
async catch(err) { | ||
if (err instanceof errors_1.CLIError) { | ||
if (err instanceof clierror_1.CLIError || err instanceof errors_1.CLIError) { | ||
if (!err.message.match(/EEXIT: 0/)) { | ||
@@ -47,5 +58,16 @@ this.error(err.message); | ||
async finally(_) { | ||
telemetry_1.default.flushTelemetry(); | ||
/* tslint:disable:strict-type-predicates */ | ||
if (this.telemetryEnabled !== null && this.telemetryEnabled) { | ||
telemetry_1.default.flushTelemetry(); | ||
} | ||
process.stdin.destroy(); | ||
} | ||
async readStdin() { | ||
try { | ||
return await readpipeddata_1.default.read(); | ||
} | ||
catch (error) { | ||
return ''; | ||
} | ||
} | ||
trackEvent(msg, properties) { | ||
@@ -58,3 +80,3 @@ /* tslint:disable:strict-type-predicates */ | ||
extractError(input) { | ||
return input instanceof Error ? input.message.concat(input.name) : input; | ||
return input instanceof Error ? input.name : input; | ||
} | ||
@@ -61,0 +83,0 @@ getTelemetryProperties() { |
@@ -0,3 +1,8 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
import { CLIError, Command, flags } from './command'; | ||
export { CLIError, Command, flags }; | ||
import utils from './utils'; | ||
export { CLIError, Command, flags, utils }; | ||
export default Command; |
"use strict"; | ||
/*! | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
const command_1 = require("./command"); | ||
@@ -7,2 +12,4 @@ exports.CLIError = command_1.CLIError; | ||
exports.flags = command_1.flags; | ||
const utils_1 = tslib_1.__importDefault(require("./utils")); | ||
exports.utils = utils_1.default; | ||
exports.default = command_1.Command; |
@@ -0,1 +1,5 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
declare class Telemetry { | ||
@@ -2,0 +6,0 @@ static trackEvent(name: string, properties?: { |
"use strict"; | ||
/*! | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -3,0 +7,0 @@ const tslib_1 = require("tslib"); |
{ | ||
"name": "@microsoft/bf-cli-command", | ||
"description": "base class for Microsoft Bot Framework CLI commands", | ||
"version": "4.5.4", | ||
"version": "4.6.0", | ||
"author": "Microsoft", | ||
"bugs": "https://github.com/microsoft/botframework-cli", | ||
"dependencies": { | ||
"@oclif/errors": "^1.2.2", | ||
"@oclif/command": "~1.5.13", | ||
"@oclif/config": "~1.12.12", | ||
"@oclif/errors": "~1.2.2", | ||
"applicationinsights": "^1.0.8", | ||
"cli-ux": "^4.9.3", | ||
"cli-ux": "~4.9.3", | ||
"chalk": "2.4.1", | ||
@@ -16,4 +18,2 @@ "debug": "^4.1.1", | ||
"devDependencies": { | ||
"@oclif/command": "^1.5.13", | ||
"@oclif/config": "^1.12.12", | ||
"@oclif/plugin-help": "^2.1.6", | ||
@@ -34,7 +34,5 @@ "@oclif/plugin-plugins": "^1.7.7", | ||
"mocha": "^6.1.4", | ||
"nock": "^10.0.6", | ||
"nyc": "^13.3.0", | ||
"proxyquire": "^2.1.0", | ||
"rimraf": "^2.6.3", | ||
"sinon": "^7.3.2", | ||
"testdouble": "^3.11.0", | ||
@@ -41,0 +39,0 @@ "ts-node": "^8.1.0", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
16079
22
14
372
8
2
+ Added@oclif/command@~1.5.13
+ Added@oclif/config@~1.12.12
+ Added@oclif/command@1.5.20(transitive)
+ Added@oclif/config@1.12.12(transitive)
+ Added@oclif/errors@1.2.2(transitive)
+ Added@oclif/parser@3.8.17(transitive)
+ Added@oclif/plugin-help@2.2.3(transitive)
+ Addedansi-regex@3.0.1(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedclean-stack@1.3.0(transitive)
+ Addedemoji-regex@7.0.3(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedis-fullwidth-code-point@2.0.0(transitive)
+ Addedlodash._reinterpolate@3.0.0(transitive)
+ Addedlodash.template@4.5.0(transitive)
+ Addedlodash.templatesettings@4.2.0(transitive)
+ Addedstring-width@2.1.13.1.0(transitive)
+ Addedstrip-ansi@4.0.0(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedwidest-line@2.0.1(transitive)
+ Addedwrap-ansi@4.0.0(transitive)
Updated@oclif/errors@~1.2.2
Updatedcli-ux@~4.9.3