Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@men-mvc/foundation

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@men-mvc/foundation - npm Package Compare versions

Comparing version 0.87.0 to 0.88.0

2

lib/utilities/validation.d.ts

@@ -0,3 +1,5 @@

import { ExternalHelpers } from 'joi';
import joi, { ObjectSchema, ValidationError as JoiValidationError, ValidationOptions } from 'joi';
import { ValidationError, RequestValidator } from '../types';
export declare const getValidatedFieldName: (options: ExternalHelpers) => string;
export declare const resolveValidationError: (valError: JoiValidationError | undefined) => ValidationError;

@@ -4,0 +6,0 @@ export declare const validateRequest: <T>(schema: ObjectSchema, data: T, options?: ValidationOptions) => void;

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidateRequestAsync = exports.ValidateRequest = exports.validateFileExtension = exports.validateImage = exports.validateFile = exports.failValidationForField = exports.validateRequestAsync = exports.validateRequest = exports.resolveValidationError = void 0;
exports.ValidateRequestAsync = exports.ValidateRequest = exports.validateFileExtension = exports.validateImage = exports.validateFile = exports.failValidationForField = exports.validateRequestAsync = exports.validateRequest = exports.resolveValidationError = exports.getValidatedFieldName = void 0;
const path_1 = __importDefault(require("path"));

@@ -14,2 +14,14 @@ const joi_1 = __importDefault(require("joi"));

const error_1 = require("./error");
const getValidatedFieldName = (options) => {
if (Array.isArray(options.state.path)) {
return options.state.path.join('.');
}
else if (typeof options.state.path === 'string') {
return options.state.path;
}
else {
return ``;
}
};
exports.getValidatedFieldName = getValidatedFieldName;
const resolveValidationError = (valError) => {

@@ -16,0 +28,0 @@ if (!valError) {

6

package.json
{
"name": "@men-mvc/foundation",
"version": "0.87.0",
"version": "0.88.0",
"description": "Package that includes shared variables, types and utility functions for MEN MVC framework.",

@@ -30,3 +30,3 @@ "private": false,

"dependencies": {
"@men-mvc/config": "^0.87.0",
"@men-mvc/config": "^0.88.0",
"express": "^4.18.2",

@@ -53,3 +53,3 @@ "joi": "^17.9.1",

"license": "MIT",
"gitHead": "01674a5ff2259af688a26fb5bce16ad5e7c5ae09"
"gitHead": "c56244162e6340358d2407db2957316bbd00a618"
}
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