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

@boll/cli

Package Overview
Dependencies
Maintainers
3
Versions
1236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@boll/cli - npm Package Compare versions

Comparing version 1.1.1217 to 1.2.0

dist/lib/default-formatter.d.ts

15

CHANGELOG.json

@@ -5,2 +5,17 @@ {

{
"date": "Tue, 15 Dec 2020 17:21:35 GMT",
"tag": "@boll/cli_v1.2.0",
"version": "1.2.0",
"comments": {
"minor": [
{
"comment": "CLI supports warnings and VSO output",
"author": "jdh@microsoft.com",
"commit": "8d628bb761b41874e8188e93b6163472231df3af",
"package": "@boll/cli"
}
]
}
},
{
"date": "Fri, 20 Nov 2020 22:01:01 GMT",

@@ -7,0 +22,0 @@ "tag": "@boll/cli_v1.1.1216",

10

CHANGELOG.md
# Change Log - @boll/cli
This log was last generated on Fri, 20 Nov 2020 22:01:01 GMT and should not be manually modified.
This log was last generated on Tue, 15 Dec 2020 17:21:35 GMT and should not be manually modified.
<!-- Start content -->
## 1.2.0
Tue, 15 Dec 2020 17:21:35 GMT
### Minor changes
- CLI supports warnings and VSO output (jdh@microsoft.com)
## 1.1.1216

@@ -8,0 +16,0 @@

10

dist/bin/run.js

@@ -41,13 +41,13 @@ "use strict";

var core_1 = require("@boll/core");
var cli = new cli_1.Cli(core_1.DefaultLogger);
function doStuff() {
return __awaiter(this, void 0, void 0, function () {
var result;
var cli, result;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, cli.run(process.argv.slice(2))];
case 0:
cli = new cli_1.Cli(core_1.DefaultLogger);
return [4 /*yield*/, cli.run(process.argv.slice(2))];
case 1:
result = _a.sent();
if (result !== cli_1.Status.Ok) {
console.error("@boll/cli detected lint errors");
if (result === cli_1.Status.Error) {
process.exit(1);

@@ -54,0 +54,0 @@ }

import { Logger } from "@boll/core";
export declare enum Status {
Ok = 0,
Error = 1
Error = 1,
Warn = 2
}

@@ -6,0 +7,0 @@ export declare class Cli {

@@ -65,4 +65,7 @@ "use strict";

var path_1 = require("path");
var default_formatter_1 = require("./lib/default-formatter");
var vso_formatter_1 = require("./lib/vso-formatter");
var fileExistsAsync = util_1.promisify(fs.exists);
var parser = new argparse_1.ArgumentParser({ description: "@boll/cli" });
parser.addArgument("--azure-devops", { help: "Enable Azure DevOps pipeline output formatter.", action: "storeTrue" });
var subParser = parser.addSubparsers({

@@ -78,2 +81,3 @@ description: "commands",

Status[Status["Error"] = 1] = "Error";
Status[Status["Warn"] = 2] = "Warn";
})(Status = exports.Status || (exports.Status = {}));

@@ -86,3 +90,3 @@ var Cli = /** @class */ (function () {

return __awaiter(this, void 0, void 0, function () {
var parsedCommand, suite, result;
var parsedCommand, formatter, suite, result;
var _this = this;

@@ -93,2 +97,3 @@ return __generator(this, function (_a) {

parsedCommand = parser.parseArgs(args);
formatter = parsedCommand.azure_devops ? new vso_formatter_1.VsoFormatter() : new default_formatter_1.DefaultFormatter();
if (!(parsedCommand.command === "run")) return [3 /*break*/, 3];

@@ -102,7 +107,15 @@ return [4 /*yield*/, this.buildSuite()];

result.errors.forEach(function (e) {
_this.logger.error(e.formattedMessage);
_this.logger.error(formatter.error(e.formattedMessage));
});
result.warnings.forEach(function (e) {
_this.logger.warn(formatter.warn(e.formattedMessage));
});
if (result.hasErrors) {
this.logger.error(formatter.finishWithErrors());
return [2 /*return*/, Status.Error];
}
if (result.hasWarnings) {
this.logger.warn(formatter.finishWithWarnings());
return [2 /*return*/, Status.Warn];
}
return [2 /*return*/, Status.Ok];

@@ -109,0 +122,0 @@ case 3:

@@ -10,3 +10,3 @@ {

"dependencies": {
"@boll/core": "1.5.2",
"@boll/core": "1.6.0",
"argparse": "^1.0.10",

@@ -52,3 +52,3 @@ "fast-glob": "^3.2.4",

},
"version": "1.1.1217"
"version": "1.2.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