New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@monokle/validation

Package Overview
Dependencies
Maintainers
5
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@monokle/validation - npm Package Compare versions

Comparing version

to
0.23.7

3

lib/common/AbstractPlugin.d.ts

@@ -8,2 +8,3 @@ import { RuleMap } from '../config/parse.js';

configured: boolean;
protected _toolComponentIndex: number;
protected _enabled: boolean;

@@ -21,2 +22,4 @@ protected _rules: RuleMetadata[];

get toolComponent(): ToolPlugin;
get toolComponentIndex(): number;
set toolComponentIndex(value: number);
get name(): string;

@@ -23,0 +26,0 @@ get enabled(): boolean;

@@ -13,2 +13,3 @@ import keyBy from 'lodash/keyBy.js';

configured = false;
_toolComponentIndex = -1;
_enabled = true;

@@ -53,2 +54,8 @@ _rules = [];

}
get toolComponentIndex() {
return this._toolComponentIndex;
}
set toolComponentIndex(value) {
this._toolComponentIndex = value;
}
get name() {

@@ -116,2 +123,3 @@ return this._metadata.name;

name: this.name,
index: this.toolComponentIndex,
},

@@ -118,0 +126,0 @@ },

@@ -285,2 +285,3 @@ /**

name: string;
index?: number;
};

@@ -287,0 +288,0 @@ /**

@@ -158,2 +158,7 @@ import { Scalar } from 'yaml';

/**
* The SARIF tool component index.
*/
get toolComponentIndex(): number;
set toolComponentIndex(value: number);
/**
* The rules of this plugin.

@@ -160,0 +165,0 @@ */

@@ -208,2 +208,3 @@ import clone from 'lodash/clone.js';

};
validators.forEach((v, index) => v.toolComponentIndex = index);
await nextTick();

@@ -210,0 +211,0 @@ throwIfAborted(loadAbortSignal, externalAbortSignal);

4

lib/utils/getRule.js

@@ -18,4 +18,6 @@ import invariant from './invariant.js';

export function getRuleForResultV2(run, result) {
const toolPluginIndex = result.rule.toolComponent.index;
const toolPluginName = result.rule.toolComponent.name;
const plugin = run?.tool.extensions?.find(plugin => plugin.name === toolPluginName);
const extensions = run?.tool.extensions ?? [];
const plugin = toolPluginIndex && extensions[toolPluginIndex] ? extensions.find(plugin => plugin.name === toolPluginName) : undefined;
const ruleIndex = result.rule.index;

@@ -22,0 +24,0 @@ const rule = plugin?.rules[ruleIndex];

@@ -17,2 +17,3 @@ import { ResourceParser } from '../../common/resourceParser.js';

private _debug;
protected _toolComponentIndex: number;
constructor(parser: ResourceParser);

@@ -24,2 +25,4 @@ onReload(callback: (hash: String) => void): void;

get toolComponent(): ToolPlugin;
get toolComponentIndex(): number;
set toolComponentIndex(value: number);
get rules(): RuleMetadataWithConfig[];

@@ -26,0 +29,0 @@ get enabled(): boolean;

@@ -22,2 +22,3 @@ import { DEV_MODE_TOKEN } from './constants.js';

_debug = false;
_toolComponentIndex = -1;
constructor(parser) {

@@ -109,2 +110,8 @@ this.parser = parser;

}
get toolComponentIndex() {
return this._toolComponentIndex;
}
set toolComponentIndex(value) {
this._toolComponentIndex = value;
}
get rules() {

@@ -111,0 +118,0 @@ if (!this._currentValidator) {

{
"name": "@monokle/validation",
"version": "0.23.5",
"version": "0.23.7",
"description": "Kubernetes resource validation",

@@ -5,0 +5,0 @@ "author": "Kubeshop",