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

@microsoft/bf-cli-command

Package Overview
Dependencies
Maintainers
2
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/bf-cli-command - npm Package Compare versions

Comparing version 4.5.4 to 4.6.0

lib/clierror.d.ts

8

lib/command.d.ts

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

38

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

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