You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

@statoscope/cli

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@statoscope/cli - npm Package Compare versions

Comparing version

to
5.9.0

@@ -32,6 +32,6 @@ "use strict";

console.log(`Generating Statoscope report to ${argv.output} ...`);
await utils_1.transform(argv.input, argv.output);
await (0, utils_1.transform)(argv.input, argv.output);
console.log(`Statoscope report saved to ${argv.output}`);
if (argv.open) {
open_1.default(argv.output);
(0, open_1.default)(argv.output);
}

@@ -38,0 +38,0 @@ });

@@ -68,3 +68,3 @@ "use strict";

for (const file of argv.input) {
const data = await json_ext_1.parseChunked(fs_1.default.createReadStream(file));
const data = await (0, json_ext_1.parseChunked)(fs_1.default.createReadStream(file));
files.push({

@@ -75,3 +75,3 @@ name: path_1.default.basename(file),

}
const prepared = webpack_model_1.prepareWithJora(files, { helpers: helpers_1.jora() });
const prepared = (0, webpack_model_1.prepareWithJora)(files, { helpers: (0, helpers_1.jora)() });
const validator = handleValidator(argv.validator);

@@ -78,0 +78,0 @@ const storage = {};

@@ -38,3 +38,3 @@ "use strict";

console.log(`Generating Statoscope report...`);
const reportPath = await utils_1.transform(argv.input);
const reportPath = await (0, utils_1.transform)(argv.input);
console.log(`Statoscope report generated`);

@@ -50,3 +50,3 @@ http_1.default

if (argv.open) {
open_1.default(link);
(0, open_1.default)(link);
}

@@ -53,0 +53,0 @@ });

@@ -10,2 +10,3 @@ "use strict";

const make_reporter_instance_1 = require("@statoscope/config/dist/make-reporter-instance");
const dist_1 = require("@statoscope/config/dist");
const legacyWebpackValidator_1 = __importDefault(require("./legacyWebpackValidator"));

@@ -30,3 +31,2 @@ function default_1(yargs) {

type: 'string',
default: path_1.default.join(process.cwd(), 'statoscope.config.js'),
})

@@ -53,3 +53,3 @@ .option('input', {

if (argv.validator) {
await legacyWebpackValidator_1.default({
await (0, legacyWebpackValidator_1.default)({
validator: argv.validator,

@@ -61,12 +61,3 @@ input: argv.input,

}
const configPath = path_1.default.resolve(argv.config);
let config;
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
config = require(configPath);
}
catch (e) {
console.log('[WARN]: No Statoscope-config found');
config = {};
}
const { path: configPath, config } = (0, dist_1.requireConfig)(argv.config);
const rootPath = path_1.default.dirname(configPath);

@@ -82,3 +73,3 @@ const validateConfig = (_a = config.validate) !== null && _a !== void 0 ? _a : { rules: {} };

for (const item of config.validate.reporters) {
reporters.push(make_reporter_instance_1.makeReporterInstance(item, rootPath));
reporters.push((0, make_reporter_instance_1.makeReporterInstance)(item, rootPath));
}

@@ -85,0 +76,0 @@ }

@@ -18,3 +18,3 @@ "use strict";

];
commands.reduce((all, current) => current(all), yargs_1.default(helpers_1.hideBin(process.argv))).argv;
commands.reduce((all, current) => current(all), (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))).argv;
//# sourceMappingURL=index.js.map

@@ -14,2 +14,3 @@ "use strict";

async function transform(from, to) {
var _a;
const id = path_1.default.basename(from[0], '.json');

@@ -19,7 +20,12 @@ const reportPath = to || path_1.default.join(os_1.default.tmpdir(), `statoscope-report-${id}-${Date.now()}.html`);

for (const item of from) {
const parsed = await json_ext_1.parseChunked(fs_1.default.createReadStream(item));
normalizeCompilation_1.default(parsed);
normalizedFrom.push({ type: 'data', filename: item, data: parsed });
const parsed = await (0, json_ext_1.parseChunked)(fs_1.default.createReadStream(item));
(0, normalizeCompilation_1.default)(parsed);
normalizedFrom.push({
type: 'data',
filename: item,
data: parsed,
replacer: (0, utils_1.makeReplacer)((_a = parsed.__statoscope) === null || _a === void 0 ? void 0 : _a.context, '.', ['context', 'source']),
});
}
return utils_1.transform({
return (0, utils_1.transform)({
writer: {

@@ -26,0 +32,0 @@ scripts: [{ type: 'path', path: require.resolve('@statoscope/webpack-ui') }],

{
"name": "@statoscope/cli",
"version": "5.8.0",
"version": "5.9.0",
"description": "Statoscope CLI tools",

@@ -20,2 +20,5 @@ "scripts": {

},
"engines": {
"node": "^12.0.0"
},
"license": "MIT",

@@ -25,16 +28,16 @@ "homepage": "https://github.com/statoscope/statoscope/",

"@discoveryjs/json-ext": "^0.5.5",
"@statoscope/config": "5.7.2",
"@statoscope/helpers": "5.7.1",
"@statoscope/report-writer": "5.8.0",
"@statoscope/stats-validator": "5.8.0",
"@statoscope/stats-validator-reporter-console": "5.7.1",
"@statoscope/stats-validator-reporter-stats-report": "5.8.0",
"@statoscope/types": "5.7.1",
"@statoscope/webpack-model": "5.8.0",
"@statoscope/webpack-ui": "5.8.0",
"@types/yargs": "^17.0.0",
"open": "^8.0.4",
"yargs": "^17.0.1"
"@statoscope/config": "5.9.0",
"@statoscope/helpers": "5.9.0",
"@statoscope/report-writer": "5.9.0",
"@statoscope/stats-validator": "5.9.0",
"@statoscope/stats-validator-reporter-console": "5.9.0",
"@statoscope/stats-validator-reporter-stats-report": "5.9.0",
"@statoscope/types": "5.9.0",
"@statoscope/webpack-model": "5.9.0",
"@statoscope/webpack-ui": "5.9.0",
"@types/yargs": "^17.0.2",
"open": "^8.2.1",
"yargs": "^17.1.1"
},
"gitHead": "d7b10e373e8352a955271fd8923778b68f23dfca"
"gitHead": "f8e8a9cd721828a4bc53a2f808441d81e5fdbf84"
}

@@ -47,5 +47,5 @@ # Statoscope CLI

reporters: [
// console-reporter to output results into cinsole (enabled by default)
// console-reporter to output results into console (enabled by default)
'@statoscope/console',
// reporter that henerates UI-report with validation-results
// reporter that generates UI-report with validation-results
['@statoscope/stats-report', {open: true}],

@@ -52,0 +52,0 @@ ],