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

indicative-compiler

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

indicative-compiler - npm Package Compare versions

Comparing version 7.0.5 to 7.1.0

1

build/src/contracts.d.ts

@@ -36,1 +36,2 @@ import { ParsedRule, Message } from 'indicative-parser';

}
export declare type ErrorCollectorFn = (formatter: ErrorFormatterContract, message: string | Error, field: string, rule: ParsedRule['name'], args: ParsedRule['args']) => void;

5

build/src/Validator/Collector.d.ts
import { ParsedRule, Message } from 'indicative-parser';
import { CollectorContract, ErrorFormatterContract } from '../contracts';
import { CollectorContract, ErrorFormatterContract, ErrorCollectorFn } from '../contracts';
export declare class Collector implements CollectorContract {
formatter: ErrorFormatterContract;
private _generateTree;
private _customErrorCollector?;
tree: any;
hasErrors: boolean;
constructor(formatter: ErrorFormatterContract, _generateTree: boolean);
constructor(formatter: ErrorFormatterContract, _generateTree: boolean, _customErrorCollector?: ErrorCollectorFn | undefined);
setValue(pointer: string, value: any): void;

@@ -10,0 +11,0 @@ getData(): any;

@@ -9,5 +9,6 @@ "use strict";

class Collector {
constructor(formatter, _generateTree) {
constructor(formatter, _generateTree, _customErrorCollector) {
this.formatter = formatter;
this._generateTree = _generateTree;
this._customErrorCollector = _customErrorCollector;
this.tree = {};

@@ -40,5 +41,10 @@ this.hasErrors = false;

message = typeof (message) === 'function' ? message(pointer, rule.name, rule.args) : message;
this.formatter.addError(message, pointer, rule.name, rule.args);
if (typeof (this._customErrorCollector) === 'function') {
this._customErrorCollector(this.formatter, message, pointer, rule.name, rule.args);
}
else {
this.formatter.addError(message, pointer, rule.name, rule.args);
}
}
}
exports.Collector = Collector;
import { ArrayWrapper } from './ArrayWrapper';
import { ValidationsRunner } from './ValidationsRunner';
import { ErrorFormatterContract } from '../contracts';
import { ErrorFormatterContract, ErrorCollectorFn } from '../contracts';
export declare class Executor {

@@ -9,3 +9,3 @@ private _fns;

new (): ErrorFormatterContract;
}, config: unknown, bail: boolean, removeAdditional: boolean): Promise<any>;
}, config: unknown, bail: boolean, removeAdditional: boolean, customErrorCollector?: ErrorCollectorFn): Promise<any>;
}

@@ -8,5 +8,5 @@ "use strict";

}
async exec(data, Formatter, config, bail, removeAdditional) {
async exec(data, Formatter, config, bail, removeAdditional, customErrorCollector) {
const root = { tip: data, original: data, pointer: '' };
const collector = new Collector_1.Collector(new Formatter(), removeAdditional);
const collector = new Collector_1.Collector(new Formatter(), removeAdditional, customErrorCollector);
for (let fn of this._fns) {

@@ -13,0 +13,0 @@ let passed = false;

{
"name": "indicative-compiler",
"version": "7.0.5",
"version": "7.1.0",
"description": "Indicative compiler to compile parsed schema into highly optimized functions",

@@ -15,6 +15,6 @@ "main": "build/index.js",

"test": "node japaFile.js",
"lint": "tslint --project tsconfig.json",
"lint": "eslint .",
"clean": "del build",
"compile": "npm run lint && npm run clean && tsc",
"build": "npm run compile && typedoc --theme markdown --mdHideSources --excludePrivate && git add docs",
"build": "npm run compile && typedoc --theme markdown --hideSources --excludePrivate && git add docs",
"commit": "git-cz",

@@ -40,22 +40,22 @@ "release": "np",

"devDependencies": {
"@adonisjs/mrm-preset": "^2.1.0",
"@types/node": "^12.7.3",
"@adonisjs/mrm-preset": "^2.2.2",
"@types/node": "^12.12.14",
"clone-deep": "^4.0.1",
"commitizen": "^4.0.3",
"cz-conventional-changelog": "^3.0.2",
"del-cli": "^2.0.0",
"del-cli": "^3.0.0",
"doctoc": "^1.4.0",
"husky": "^3.0.5",
"eslint": "^6.7.2",
"eslint-plugin-adonis": "^1.0.1",
"husky": "^3.1.0",
"indicative-utils": "^7.0.1",
"japa": "^3.0.0",
"mrm": "^1.2.2",
"np": "^5.0.3",
"japa": "^3.0.1",
"mrm": "^2.0.0",
"np": "^5.2.1",
"require-all": "^3.0.0",
"ts-node": "^8.3.0",
"tslint": "^5.19.0",
"tslint-eslint-rules": "^5.4.0",
"typedoc": "^0.15.0",
"ts-node": "^8.5.4",
"typedoc": "^0.15.3",
"typedoc-plugin-external-module-name": "^2.1.0",
"typedoc-plugin-markdown": "^2.1.7",
"typescript": "^3.6.2"
"typedoc-plugin-markdown": "^2.2.11",
"typescript": "^3.7.2"
},

@@ -86,3 +86,3 @@ "nyc": {

"dependencies": {
"indicative-parser": "^7.0.2",
"indicative-parser": "^7.0.3",
"isobject": "^4.0.0",

@@ -89,0 +89,0 @@ "lodash.get": "^4.4.2",

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