mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 00:23:03 +00:00
refactor: update all
This commit is contained in:
committed by
Rainer Killinger
parent
9bc05d2c99
commit
8cf40900bb
617
package-lock.json
generated
617
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@openstapps/logger": "0.7.0",
|
||||
"ajv": "6.12.6",
|
||||
"ajv": "8.6.3",
|
||||
"better-ajv-errors": "0.7.0",
|
||||
"chai": "4.3.4",
|
||||
"commander": "8.2.0",
|
||||
@@ -75,7 +75,7 @@
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/glob": "7.1.4",
|
||||
"@types/json-schema": "7.0.9",
|
||||
"@types/lodash": "4.14.174",
|
||||
"@types/lodash": "4.14.175",
|
||||
"@types/mocha": "9.0.0",
|
||||
"@types/mustache": "4.1.2",
|
||||
"@types/node": "14.17.19",
|
||||
@@ -85,8 +85,8 @@
|
||||
"conventional-changelog-cli": "2.1.1",
|
||||
"eslint-config-prettier": "8.3.0",
|
||||
"eslint-plugin-jsdoc": "36.1.0",
|
||||
"eslint-plugin-prettier": "3.4.1",
|
||||
"eslint-plugin-unicorn": "35.0.0",
|
||||
"eslint-plugin-prettier": "4.0.0",
|
||||
"eslint-plugin-unicorn": "36.0.0",
|
||||
"mocha": "9.1.2",
|
||||
"nock": "13.1.3",
|
||||
"prepend-file-cli": "1.0.6",
|
||||
|
||||
@@ -39,7 +39,7 @@ export class Converter {
|
||||
/**
|
||||
* Schema validator instance
|
||||
*/
|
||||
private readonly schemaValidator: Ajv.Ajv;
|
||||
private readonly schemaValidator: Ajv;
|
||||
|
||||
/**
|
||||
* Create a new converter
|
||||
|
||||
@@ -31,7 +31,7 @@ export class Validator {
|
||||
/**
|
||||
* JSON Schema Validator
|
||||
*/
|
||||
private readonly ajv = Ajv({verbose: true, jsonPointers: true, extendRefs: true});
|
||||
private readonly ajv = new Ajv({verbose: true});
|
||||
|
||||
/**
|
||||
* Map of schema names to schemas
|
||||
@@ -127,7 +127,7 @@ function fromAjvResult(
|
||||
result: boolean | PromiseLike<unknown>,
|
||||
schema: JSONSchema7,
|
||||
instance: unknown,
|
||||
ajvInstance: Ajv.Ajv,
|
||||
ajvInstance: Ajv,
|
||||
): ValidationResult {
|
||||
// @ts-expect-error function can return void, which at runtime will be undefined. TS doesn't allow to assign void to undefined
|
||||
const betterErrorObject: betterAjvErrors.IOutputError[] | undefined = betterAjvErrors(
|
||||
@@ -142,7 +142,7 @@ function fromAjvResult(
|
||||
errors:
|
||||
ajvInstance.errors?.map((ajvError, index) => {
|
||||
const error: ValidationError = {
|
||||
dataPath: ajvError.dataPath,
|
||||
dataPath: ajvError.instancePath,
|
||||
instance: instance,
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
||||
message: betterErrorObject?.[index].error!,
|
||||
|
||||
Reference in New Issue
Block a user