Socket
Socket
Sign inDemoInstall

@spinajs/validation

Package Overview
Dependencies
Maintainers
1
Versions
267
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/validation - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

3

lib/src/validator.d.ts
import { SyncModule, IContainer } from "@spinajs/di";
import Ajv from "ajv";
import { Configuration } from "@spinajs/configuration";
import { ValidationError } from "./exceptions";

@@ -9,5 +8,5 @@ export declare class DataValidator extends SyncModule {

protected Validator: Ajv;
protected Configuration: Configuration;
protected Container: IContainer;
resolve(container: IContainer): void;
addSchema(schemaObject: any, identifier: string): void;
/**

@@ -14,0 +13,0 @@ *

@@ -85,9 +85,13 @@ "use strict";

.forEach(s => {
var _a, _b;
const schemaName = (_a = s.schema.$id) !== null && _a !== void 0 ? _a : path.basename(s.file);
this.Validator.addSchema(s.schema, (_b = s.schema.$id) !== null && _b !== void 0 ? _b : path.basename(s.file));
log_1.Log.info(`Schema ${schemaName} added !`, "validator");
var _a;
this.addSchema(s.schema, (_a = s.schema.$id) !== null && _a !== void 0 ? _a : path.basename(s.file));
});
super.resolve(container);
}
addSchema(schemaObject, identifier) {
if (!this.hasSchema(identifier)) {
this.Validator.addSchema(schemaObject, identifier);
log_1.Log.trace(`Schema ${identifier} added !`, "validator");
}
}
/**

@@ -94,0 +98,0 @@ *

{
"name": "@spinajs/validation",
"version": "1.1.2",
"version": "1.1.3",
"description": "validation library for spinajs framework",

@@ -39,6 +39,6 @@ "main": "lib/index.js",

"dependencies": {
"@spinajs/configuration": "^1.1.2",
"@spinajs/configuration": "^1.1.4",
"@spinajs/di": "^1.1.7",
"@spinajs/exceptions": "^1.0.5",
"@spinajs/log": "^1.1.0",
"@spinajs/log": "^1.1.1",
"ajv": "^8.8.2",

@@ -45,0 +45,0 @@ "ajv-formats": "^2.1.1",

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