Socket
Socket
Sign inDemoInstall

snyk-gradle-plugin

Package Overview
Dependencies
Maintainers
1
Versions
141
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 2.12.5 to 3.0.0

4

dist/errors/missing-sub-project-error.d.ts
export declare class MissingSubProjectError extends Error {
name: string;
subProject: string;
allProjects: string;
constructor(subProject: any, allProjects: any);
allProjects: string[];
constructor(subProject: string, allProjects: string[]);
}

@@ -1,46 +0,11 @@

export interface BaseInspectOptions {
dev?: boolean;
import { SingleSubprojectInspectOptions, MultiSubprojectInspectOptions, SinglePackageResult, MultiProjectResult, InspectOptions } from '@snyk/cli-interface/dist/legacy/plugin';
import { DepTree } from '@snyk/cli-interface/dist/legacy/common';
export interface GradleInspectOptions {
'configuration-matching'?: string;
'configuration-attributes'?: string;
args?: string[];
}
export interface SingleRootInspectOptions extends BaseInspectOptions {
'gradle-sub-project'?: string;
}
export interface MultiRootsInspectOptions extends BaseInspectOptions {
multiDepRoots: true;
}
export interface SingleDepRootResult {
plugin: PluginMetadata;
package: DepTree;
}
export interface MultiDepRootsResult {
plugin: PluginMetadata;
depRoots: DepRoot[];
}
export interface PluginMetadata {
name: string;
runtime: string;
targetFile?: string;
meta?: {
allSubProjectNames?: string[];
};
}
export interface DepDict {
[name: string]: DepTree;
}
export interface DepRoot {
depTree: DepTree;
targetFile?: string;
meta?: any;
}
export interface DepTree {
name: string;
version: string;
dependencies?: DepDict;
packageFormatVersion?: string;
}
export declare function inspect(root: any, targetFile: any, options?: SingleRootInspectOptions): Promise<SingleDepRootResult>;
export declare function inspect(root: any, targetFile: any, options: MultiRootsInspectOptions): Promise<MultiDepRootsResult>;
interface JsonDepsScriptResult {
declare type Options = InspectOptions & GradleInspectOptions;
export declare function inspect(root: string, targetFile: string, options?: SingleSubprojectInspectOptions & GradleInspectOptions): Promise<SinglePackageResult>;
export declare function inspect(root: string, targetFile: string, options: MultiSubprojectInspectOptions & GradleInspectOptions): Promise<MultiProjectResult>;
export interface JsonDepsScriptResult {
defaultProject: string;

@@ -54,7 +19,9 @@ projects: ProjectsDict;

interface GradleProjectInfo {
depDict: DepDict;
depDict: {
[name: string]: DepTree;
};
targetFile: string;
}
declare function extractJsonFromScriptOutput(stdoutText: string): JsonDepsScriptResult;
declare function buildArgs(root: string, targetFile: string | null, initGradlePath: string, options: SingleRootInspectOptions | MultiRootsInspectOptions): string[];
declare function buildArgs(root: string, targetFile: string | null, initGradlePath: string, options: Options): string[];
export declare const exportsForTests: {

@@ -61,0 +28,0 @@ buildArgs: typeof buildArgs;

@@ -12,3 +12,4 @@ "use strict";

const debugModule = require("debug");
// To enable debugging output, run the CLI as `DEBUG=snyk-gradle-plugin snyk ...`
const plugin_1 = require("@snyk/cli-interface/dist/legacy/plugin");
// To enable debugging output, use `snyk -d`
let logger = null;

@@ -34,5 +35,2 @@ function debugLog(s) {

];
function isMultiSubProject(options) {
return options.multiDepRoots;
}
function inspect(root, targetFile, options) {

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

}
let subProject = options['gradle-sub-project'];
let subProject = options.subProject;
if (subProject) {

@@ -52,4 +50,5 @@ subProject = subProject.trim();

targetFile: targetFileFilteredForCompatibility(targetFile),
meta: {},
};
if (isMultiSubProject(options)) {
if (plugin_1.isMultiSubProject(options)) {
if (subProject) {

@@ -60,3 +59,3 @@ throw new Error('gradle-sub-project flag is incompatible with multiDepRoots');

plugin,
depRoots: yield getAllDepsAllProjects(root, targetFile, options),
scannedProjects: yield getAllDepsAllProjects(root, targetFile, options),
};

@@ -341,4 +340,4 @@ }

args.push('-Dorg.gradle.parallel=');
if (!isMultiSubProject(options)) {
args.push('-PonlySubProject=' + (options['gradle-sub-project'] || '.'));
if (!plugin_1.isMultiSubProject(options)) {
args.push('-PonlySubProject=' + (options.subProject || '.'));
}

@@ -345,0 +344,0 @@ args.push('-I ' + initGradlePath);

@@ -21,3 +21,3 @@ {

"prepare": "npm run build",
"test": "npm run lint && npm run test-functional && npm run test-system",
"test": "npm run lint && tsc -p tsconfig-test.json && npm run test-functional && npm run test-system",
"test-functional": "tap -R spec ./test/functional/*.test.[tj]s",

@@ -30,2 +30,3 @@ "test-system": "tap -R spec --timeout=180 ./test/system/*.test.[tj]s",

"devDependencies": {
"@snyk/cli-interface": "^1.2.0",
"@types/chalk": "^2.2.0",

@@ -51,3 +52,3 @@ "@types/jest": "^24.0.13",

},
"version": "2.12.5"
"version": "3.0.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

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