🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

snyk-gradle-plugin

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-gradle-plugin - npm Package Compare versions

Comparing version

to
2.11.0

14

dist/index.js

@@ -11,2 +11,5 @@ "use strict";

const chalk_1 = require("chalk");
const debugModule = require("debug");
// To enable debugging output, run the CLI as `DEBUG=snyk-gradle-plugin snyk ...`
const debugLogging = debugModule('snyk-gradle-plugin');
const packageFormatVersion = 'mvn:0.0.1';

@@ -136,2 +139,11 @@ function isMultiSubProject(options) {

}
const reEcho = /^SNYKECHO (.*)$/;
function printIfEcho(line) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const maybeMatch = reEcho.exec(line);
if (maybeMatch) {
debugLogging(maybeMatch[1]);
}
});
}
function getAllDeps(root, targetFile, options) {

@@ -186,3 +198,3 @@ return tslib_1.__awaiter(this, void 0, void 0, function* () {

try {
const stdoutText = yield subProcess.execute(command, args, { cwd: root });
const stdoutText = yield subProcess.execute(command, args, { cwd: root }, printIfEcho);
if (tmpInitGradle !== null) {

@@ -189,0 +201,0 @@ tmpInitGradle.removeCallback();

2

dist/sub-process.d.ts
export declare function execute(command: string, args: string[], options: {
cwd?: string;
}): Promise<string>;
}, perLineCallback?: (s: string) => Promise<void>): Promise<string>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const childProcess = require("child_process");
function execute(command, args, options) {
const debugModule = require("debug");
const debugLogging = debugModule('snyk-gradle-plugin');
// Executes a subprocess. Resolves successfully with stdout contents if the exit code is 0.
function execute(command, args, options, perLineCallback) {
const spawnOptions = { shell: true };

@@ -14,3 +17,7 @@ if (options && options.cwd) {

proc.stdout.on('data', (data) => {
stdout = stdout + data;
const strData = data.toString();
stdout = stdout + strData;
if (perLineCallback) {
strData.split('\n').forEach(perLineCallback);
}
});

@@ -32,3 +39,6 @@ proc.stderr.on('data', (data) => {

}
resolve(stdout || stderr);
if (stderr) {
debugLogging('subprocess exit code = 0, but stderr was not empty: ' + stderr);
}
resolve(stdout);
});

@@ -35,0 +45,0 @@ });

@@ -38,8 +38,10 @@ {

"dependencies": {
"@types/debug": "^4.1.4",
"chalk": "^2.4.2",
"clone-deep": "^0.3.0",
"debug": "^4.1.1",
"tmp": "0.0.33",
"tslib": "^1.9.3"
},
"version": "2.10.4"
"version": "2.11.0"
}

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