@liskhq/lisk-validator
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -1,8 +0,6 @@ | ||
export declare const MAX_EIGHT_BYTE_NUMBER = "18446744073709551615"; | ||
export declare const MAX_PUBLIC_KEY_LENGTH = 32; | ||
export declare const MAX_INT32 = 2147483647; | ||
export declare const MIN_INT32: number; | ||
export declare const MAX_SINT32 = 2147483647; | ||
export declare const MIN_SINT32: number; | ||
export declare const MAX_UINT32 = 4294967295; | ||
export declare const MAX_INT64: bigint; | ||
export declare const MIN_INT64: bigint; | ||
export declare const MAX_UINT64: bigint; | ||
export declare const MAX_SINT64: bigint; | ||
export declare const MIN_SINT64: bigint; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MAX_EIGHT_BYTE_NUMBER = '18446744073709551615'; | ||
exports.MAX_PUBLIC_KEY_LENGTH = 32; | ||
exports.MAX_INT32 = 2147483647; | ||
exports.MIN_INT32 = exports.MAX_INT32 * -1; | ||
exports.MAX_SINT32 = 2147483647; | ||
exports.MIN_SINT32 = exports.MAX_SINT32 * -1; | ||
exports.MAX_UINT32 = 4294967295; | ||
exports.MAX_INT64 = BigInt('9223372036854775807'); | ||
exports.MIN_INT64 = exports.MAX_INT64 * BigInt(-1) - BigInt(1); | ||
exports.MAX_UINT64 = BigInt('18446744073709551615'); | ||
exports.MAX_SINT64 = BigInt('9223372036854775807'); | ||
exports.MIN_SINT64 = exports.MAX_SINT64 * BigInt(-1) - BigInt(1); | ||
//# sourceMappingURL=constants.js.map |
@@ -1,19 +0,2 @@ | ||
export declare const address: (data: string) => boolean; | ||
export declare const additionPublicKey: (data: string) => boolean; | ||
export declare const amount: (num: unknown) => boolean; | ||
export declare const emptyString: (data: string) => boolean; | ||
export declare const emptyOrPublicKey: (data: string) => boolean; | ||
export declare const fee: (data: string) => boolean; | ||
export declare const nonce: (data: string) => boolean; | ||
export declare const hex: (data: unknown) => boolean; | ||
export declare const id: (data: string) => boolean; | ||
export declare const nonTransferAmount: (data: string) => boolean; | ||
export declare const noNullCharacter: (data: string) => boolean; | ||
export declare const noNullByte: (data: string) => boolean; | ||
export declare const publicKey: (data: string) => boolean; | ||
export declare const signature: (signature: string) => boolean; | ||
export declare const signedPublicKey: (data: string) => boolean; | ||
export declare const transferAmount: (data: string) => boolean; | ||
export declare const username: (username: string) => boolean; | ||
export declare const transferData: (data: string) => boolean; | ||
export declare const int64: (data: string) => boolean; | ||
@@ -23,1 +6,9 @@ export declare const uint64: (data: string) => boolean; | ||
export declare const int32: (data: string) => boolean; | ||
export declare const camelCase: (data: string) => boolean; | ||
export declare const version: (version: string) => boolean; | ||
export declare const networkVersion: (data: string) => boolean; | ||
export declare const path: (data: string) => boolean; | ||
export declare const encryptedPassphrase: (data: string) => boolean; | ||
export declare const ip: (data: string) => boolean; | ||
export declare const ipOrFQDN: (data: string) => boolean; | ||
export declare const oddInteger: (data: string | number) => boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const validation_1 = require("./validation"); | ||
exports.address = (data) => { | ||
try { | ||
validation_1.validateAddress(data); | ||
return true; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
}; | ||
exports.additionPublicKey = (data) => { | ||
const action = data[0]; | ||
if (action !== '+') { | ||
return false; | ||
} | ||
try { | ||
const publicKeyString = data.slice(1); | ||
validation_1.validatePublicKey(publicKeyString); | ||
return true; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
}; | ||
exports.amount = validation_1.isNumberString; | ||
exports.emptyString = (data) => data === ''; | ||
exports.emptyOrPublicKey = (data) => { | ||
if (data === null || data === '') { | ||
return true; | ||
} | ||
try { | ||
validation_1.validatePublicKey(data); | ||
return true; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
}; | ||
exports.fee = validation_1.isValidFee; | ||
exports.nonce = validation_1.isValidNonce; | ||
exports.hex = validation_1.isHexString; | ||
exports.id = (data) => validation_1.isNumberString(data) && !validation_1.isGreaterThanMaxTransactionId(BigInt(data)); | ||
exports.nonTransferAmount = validation_1.isValidNonTransferAmount; | ||
exports.noNullCharacter = (data) => !validation_1.isNullCharacterIncluded(data); | ||
exports.noNullByte = exports.noNullCharacter; | ||
exports.publicKey = (data) => { | ||
try { | ||
validation_1.validatePublicKey(data); | ||
return true; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
exports.int64 = (data) => validation_1.isNumberString(data) && validation_1.isSInt64(BigInt(data)); | ||
exports.uint64 = (data) => validation_1.isNumberString(data) && validation_1.isUInt64(BigInt(data)); | ||
exports.uint32 = (data) => validation_1.isNumberString(data) && validation_1.isUInt32(Number(data)); | ||
exports.int32 = (data) => validation_1.isNumberString(data) && validation_1.isSInt32(Number(data)); | ||
const camelCaseRegex = /^[a-z]+((\d)|([A-Z0-9][a-zA-Z0-9]+))*([a-z0-9A-Z])?$/; | ||
exports.camelCase = (data) => camelCaseRegex.exec(data) !== null; | ||
exports.version = validation_1.isSemVer; | ||
exports.networkVersion = (data) => /^(\d|[1-9]\d{1,2})\.(\d|[1-9]\d{1,2})$/.test(data); | ||
exports.path = (data) => /^(.?)(\/[^/]+)+(\/?)$/.test(data); | ||
exports.encryptedPassphrase = validation_1.isEncryptedPassphrase; | ||
exports.ip = validation_1.isIP; | ||
exports.ipOrFQDN = (data) => { | ||
const hostnameRegex = /^[a-zA-Z](([-0-9a-zA-Z]+)?[0-9a-zA-Z])?(\.[a-zA-Z](([-0-9a-zA-Z]+)?[0-9a-zA-Z])?)*$/; | ||
return validation_1.isIPV4(data) || hostnameRegex.test(data); | ||
}; | ||
exports.signature = validation_1.isSignature; | ||
exports.signedPublicKey = (data) => { | ||
try { | ||
const action = data[0]; | ||
if (action !== '+' && action !== '-') { | ||
return false; | ||
} | ||
const publicKeyString = data.slice(1); | ||
validation_1.validatePublicKey(publicKeyString); | ||
return true; | ||
exports.oddInteger = (data) => { | ||
if (typeof data === 'number') { | ||
return Number.isInteger(data) && data % 2 === 1; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
return /^\d*[13579]$/.test(data); | ||
}; | ||
exports.transferAmount = validation_1.isValidTransferAmount; | ||
exports.username = validation_1.isUsername; | ||
exports.transferData = (data) => !validation_1.isNullCharacterIncluded(data) && validation_1.isValidTransferData(data); | ||
exports.int64 = (data) => validation_1.isNumberString(data) && validation_1.isInt64(BigInt(data)); | ||
exports.uint64 = (data) => validation_1.isNumberString(data) && validation_1.isUint64(BigInt(data)); | ||
exports.uint32 = (data) => validation_1.isNumberString(data) && validation_1.isUint32(BigInt(data)); | ||
exports.int32 = (data) => validation_1.isNumberString(data) && validation_1.isInt32(BigInt(data)); | ||
//# sourceMappingURL=formats.js.map |
@@ -1,3 +0,5 @@ | ||
import { validator } from './lisk_validator'; | ||
import { validator, liskSchemaIdentifier } from './lisk_validator'; | ||
export * from './validation'; | ||
export { validator }; | ||
export * from './errors'; | ||
export * from './constants'; | ||
export { validator, liskSchemaIdentifier }; |
@@ -8,3 +8,6 @@ "use strict"; | ||
exports.validator = lisk_validator_1.validator; | ||
exports.liskSchemaIdentifier = lisk_validator_1.liskSchemaIdentifier; | ||
__export(require("./validation")); | ||
__export(require("./errors")); | ||
__export(require("./constants")); | ||
//# sourceMappingURL=index.js.map |
import * as Ajv from 'ajv'; | ||
export declare type ErrorObject = Ajv.ErrorObject; | ||
import { ValidateFunction } from 'ajv'; | ||
import { ErrorObject } from './errors'; | ||
export declare const liskSchemaIdentifier: string; | ||
declare class LiskValidator { | ||
private readonly validator; | ||
private readonly _validator; | ||
constructor(); | ||
validate(schema: object, data: object): ReadonlyArray<ErrorObject>; | ||
validate(schema: object, data: object): ErrorObject[]; | ||
validateSchema(schema: object | boolean): ReadonlyArray<ErrorObject>; | ||
compile(schema: object | boolean): ValidateFunction; | ||
removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv.Ajv; | ||
} | ||
export declare const validator: LiskValidator; | ||
export {}; |
@@ -5,27 +5,63 @@ "use strict"; | ||
const formats = require("./formats"); | ||
const errors_1 = require("./errors"); | ||
const field_number_1 = require("./keywords/field_number"); | ||
const data_type_1 = require("./keywords/data_type"); | ||
const lisk_meta_schema_1 = require("./lisk_meta_schema"); | ||
exports.liskSchemaIdentifier = lisk_meta_schema_1.liskMetaSchema.$id; | ||
class LiskValidator { | ||
constructor() { | ||
this.validator = new Ajv({ | ||
this._validator = new Ajv({ | ||
allErrors: true, | ||
schemaId: 'auto', | ||
useDefaults: false, | ||
addUsedSchema: false, | ||
}); | ||
for (const formatName of Object.keys(formats)) { | ||
this.validator.addFormat(formatName, formats[formatName]); | ||
this._validator.addFormat(formatName, formats[formatName]); | ||
} | ||
this.validator.addKeyword('uniqueSignedPublicKeys', { | ||
this._validator.addKeyword('uniqueSignedPublicKeys', { | ||
type: 'array', | ||
compile: () => (data) => new Set(data | ||
.filter(datum => typeof datum === 'string') | ||
.map((key) => key.slice(1))).size === data.length, | ||
compile: () => (data) => new Set(data.filter(datum => typeof datum === 'string').map((key) => key.slice(1))) | ||
.size === data.length, | ||
}); | ||
this._validator.addMetaSchema(lisk_meta_schema_1.liskMetaSchema); | ||
this._validator.addKeyword('fieldNumber', field_number_1.fieldNumberKeyword); | ||
this._validator.addKeyword('dataType', data_type_1.dataTypeKeyword); | ||
} | ||
validate(schema, data) { | ||
if (!this.validator.validate(schema, data)) { | ||
return this.validator.errors; | ||
if (!this._validator.validate(schema, data)) { | ||
return this._validator.errors; | ||
} | ||
return []; | ||
} | ||
validateSchema(schema) { | ||
if (!this._validator.validateSchema(schema)) { | ||
return this._validator.errors; | ||
} | ||
return []; | ||
} | ||
compile(schema) { | ||
try { | ||
return this._validator.compile(schema); | ||
} | ||
catch (error) { | ||
if (error instanceof errors_1.LiskValidationError) { | ||
throw error; | ||
} | ||
throw new errors_1.LiskValidationError([ | ||
{ | ||
message: error.message.toString(), | ||
dataPath: '', | ||
keyword: '', | ||
schemaPath: '', | ||
params: {}, | ||
}, | ||
]); | ||
} | ||
} | ||
removeSchema(schemaKeyRef) { | ||
return this._validator.removeSchema(schemaKeyRef); | ||
} | ||
} | ||
exports.validator = new LiskValidator(); | ||
//# sourceMappingURL=lisk_validator.js.map |
import { gte as isVersionGte, gtr as isGreaterThanVersionInRange, ltr as isLessThanVersionInRange } from 'semver'; | ||
export declare const isNullCharacterIncluded: (input: string) => boolean; | ||
export declare const isUsername: (username: string) => boolean; | ||
export declare const isSignature: (signature: string) => boolean; | ||
export declare const isGreaterThanZero: (amount: bigint) => boolean; | ||
export declare const isGreaterThanMaxTransactionAmount: (amount: bigint) => boolean; | ||
export declare const isGreaterThanMaxUInt64: (amount: bigint) => boolean; | ||
export declare const isGreaterThanMaxTransactionId: (id: bigint) => boolean; | ||
export declare const isNumberString: (num: unknown) => boolean; | ||
export declare const isPositiveNumberString: (num: unknown) => boolean; | ||
export declare const isValidInteger: (num: unknown) => boolean; | ||
export declare const hasNoDuplicate: (values: readonly string[]) => boolean; | ||
export declare const isStringBufferLessThan: (data: unknown, max: number) => boolean; | ||
export declare const isHexString: (data: unknown) => boolean; | ||
@@ -25,18 +15,11 @@ export declare const isEncryptedPassphrase: (data: string) => boolean; | ||
export declare const isPort: (port: string) => boolean; | ||
export declare const validatePublicKeysForDuplicates: (publicKeys: readonly string[]) => boolean; | ||
export declare const isStringEndsWith: (target: string, suffixes: readonly string[]) => boolean; | ||
export declare const isVersionMatch: typeof isVersionGte; | ||
export declare const validatePublicKey: (publicKey: string) => boolean; | ||
export declare const validatePublicKeys: (publicKeys: readonly string[]) => boolean; | ||
export declare const validateAddress: (address: string) => boolean; | ||
export declare const isValidNonTransferAmount: (data: string) => boolean; | ||
export declare const isValidTransferAmount: (data: string) => boolean; | ||
export declare const isValidFee: (data: string) => boolean; | ||
export declare const isValidNonce: (data: string) => boolean; | ||
export declare const isCsv: (data: string) => boolean; | ||
export declare const isValidTransferData: (data: string) => boolean; | ||
export declare const validateNetworkIdentifier: (networkIdentifier: string) => boolean; | ||
export declare const isInt32: (num: number | bigint) => boolean; | ||
export declare const isUint32: (num: number | bigint) => boolean; | ||
export declare const isInt64: (num: bigint) => boolean; | ||
export declare const isUint64: (num: bigint) => boolean; | ||
export declare const isString: (data: unknown) => boolean; | ||
export declare const isBoolean: (data: unknown) => boolean; | ||
export declare const isSInt32: (data: unknown) => boolean; | ||
export declare const isUInt32: (data: unknown) => boolean; | ||
export declare const isSInt64: (data: unknown) => boolean; | ||
export declare const isUInt64: (data: unknown) => boolean; | ||
export declare const isBytes: (data: unknown) => boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const lisk_cryptography_1 = require("@liskhq/lisk-cryptography"); | ||
const semver_1 = require("semver"); | ||
const validator_1 = require("validator"); | ||
const constants_1 = require("./constants"); | ||
exports.isNullCharacterIncluded = (input) => new RegExp(/\0|\\u0000|\\x00/).test(input); | ||
exports.isUsername = (username) => { | ||
if (exports.isNullCharacterIncluded(username)) { | ||
return false; | ||
} | ||
if (username !== username.trim().toLowerCase()) { | ||
return false; | ||
} | ||
if (/^[0-9]{1,21}[L|l]$/g.test(username)) { | ||
return false; | ||
} | ||
if (!/^[a-z0-9!@$&_.]+$/g.test(username)) { | ||
return false; | ||
} | ||
return true; | ||
}; | ||
exports.isSignature = (signature) => /^[a-f0-9]{128}$/i.test(signature); | ||
exports.isGreaterThanZero = (amount) => amount > BigInt(0); | ||
exports.isGreaterThanMaxTransactionAmount = (amount) => amount > constants_1.MAX_INT64; | ||
exports.isGreaterThanMaxUInt64 = (amount) => amount > constants_1.MAX_UINT64; | ||
exports.isGreaterThanMaxTransactionId = (id) => id > BigInt(constants_1.MAX_EIGHT_BYTE_NUMBER); | ||
exports.isNumberString = (num) => { | ||
@@ -34,19 +12,3 @@ if (typeof num !== 'string') { | ||
}; | ||
exports.isPositiveNumberString = (num) => { | ||
if (typeof num !== 'string') { | ||
return false; | ||
} | ||
return /^[0-9]+$/g.test(num); | ||
}; | ||
exports.isValidInteger = (num) => typeof num === 'number' ? Math.floor(num) === num : false; | ||
exports.hasNoDuplicate = (values) => { | ||
const unique = [...new Set(values)]; | ||
return unique.length === values.length; | ||
}; | ||
exports.isStringBufferLessThan = (data, max) => { | ||
if (typeof data !== 'string') { | ||
return false; | ||
} | ||
return Buffer.from(data).length <= max; | ||
}; | ||
exports.isHexString = (data) => { | ||
@@ -60,3 +22,3 @@ if (typeof data !== 'string') { | ||
const keyRegExp = /[a-zA-Z0-9]{2,15}/; | ||
const valueRegExp = /[a-f0-9]{1,256}/; | ||
const valueRegExp = /[a-f0-9]{1,512}/; | ||
const keyValueRegExp = new RegExp(`${keyRegExp.source}=${valueRegExp.source}`); | ||
@@ -77,54 +39,4 @@ const encryptedPassphraseRegExp = new RegExp(`^(${keyValueRegExp.source})(?:&(${keyValueRegExp.source})){0,10}$`); | ||
exports.isPort = (port) => validator_1.default.isPort(port); | ||
exports.validatePublicKeysForDuplicates = (publicKeys) => publicKeys.every((element, index) => { | ||
if (publicKeys.slice(index + 1).includes(element)) { | ||
throw new Error(`Duplicated public key: ${publicKeys[index]}.`); | ||
} | ||
return true; | ||
}); | ||
exports.isStringEndsWith = (target, suffixes) => suffixes.some(suffix => target.endsWith(suffix)); | ||
exports.isVersionMatch = semver_1.gte; | ||
exports.validatePublicKey = (publicKey) => { | ||
const publicKeyBuffer = lisk_cryptography_1.hexToBuffer(publicKey); | ||
if (publicKeyBuffer.length !== constants_1.MAX_PUBLIC_KEY_LENGTH) { | ||
throw new Error(`Public key ${publicKey} length differs from the expected 32 bytes for a public key.`); | ||
} | ||
return true; | ||
}; | ||
exports.validatePublicKeys = (publicKeys) => publicKeys.every(exports.validatePublicKey) && | ||
exports.validatePublicKeysForDuplicates(publicKeys); | ||
const MIN_ADDRESS_LENGTH = 2; | ||
const MAX_ADDRESS_LENGTH = 22; | ||
const BASE_TEN = 10; | ||
exports.validateAddress = (address) => { | ||
if (address.length < MIN_ADDRESS_LENGTH || | ||
address.length > MAX_ADDRESS_LENGTH) { | ||
throw new Error('Address length does not match requirements. Expected between 2 and 22 characters.'); | ||
} | ||
if (address[address.length - 1] !== 'L') { | ||
throw new Error('Address format does not match requirements. Expected "L" at the end.'); | ||
} | ||
if (address.includes('.')) { | ||
throw new Error('Address format does not match requirements. Address includes invalid character: `.`.'); | ||
} | ||
const addressString = address.slice(0, -1); | ||
if (!exports.isNumberString(addressString)) { | ||
throw new Error('Address format does not match requirements. Address includes non-numeric characters.'); | ||
} | ||
const addressNumber = BigInt(addressString); | ||
if (addressNumber > BigInt(constants_1.MAX_EIGHT_BYTE_NUMBER)) { | ||
throw new Error('Address format does not match requirements. Address out of maximum range.'); | ||
} | ||
if (addressString !== addressNumber.toString(BASE_TEN)) { | ||
throw new Error("Address string format does not match it's number representation."); | ||
} | ||
return true; | ||
}; | ||
exports.isValidNonTransferAmount = (data) => exports.isNumberString(data) && data === '0'; | ||
exports.isValidTransferAmount = (data) => exports.isNumberString(data) && | ||
exports.isGreaterThanZero(BigInt(data)) && | ||
!exports.isGreaterThanMaxTransactionAmount(BigInt(data)); | ||
exports.isValidFee = (data) => exports.isNumberString(data) && | ||
exports.isGreaterThanZero(BigInt(data)) && | ||
!exports.isGreaterThanMaxUInt64(BigInt(data)); | ||
exports.isValidNonce = (data) => exports.isNumberString(data) && !exports.isGreaterThanMaxUInt64(BigInt(data)); | ||
exports.isCsv = (data) => { | ||
@@ -140,29 +52,19 @@ if (typeof data !== 'string') { | ||
}; | ||
const MAX_TRANSFER_ASSET_DATA_LENGTH = 64; | ||
exports.isValidTransferData = (data) => Buffer.byteLength(data, 'utf8') <= MAX_TRANSFER_ASSET_DATA_LENGTH; | ||
const NETWORK_IDENTIFIER_LENGTH = 32; | ||
exports.validateNetworkIdentifier = (networkIdentifier) => { | ||
if (!networkIdentifier) { | ||
throw new Error(`Network identifier can not be empty.`); | ||
exports.isString = (data) => typeof data === 'string'; | ||
exports.isBoolean = (data) => typeof data === 'boolean'; | ||
exports.isSInt32 = (data) => { | ||
if (typeof data === 'number' && Number.isInteger(data)) { | ||
return data <= constants_1.MAX_SINT32 && data >= constants_1.MIN_SINT32; | ||
} | ||
const networkIdentifierBuffer = lisk_cryptography_1.hexToBuffer(networkIdentifier); | ||
if (networkIdentifierBuffer.length !== NETWORK_IDENTIFIER_LENGTH) { | ||
throw new Error(`Invalid network identifier length: ${networkIdentifier}`); | ||
} | ||
return true; | ||
return false; | ||
}; | ||
exports.isInt32 = (num) => { | ||
if (typeof num === 'number') { | ||
return num <= constants_1.MAX_INT32 && num >= constants_1.MIN_INT32; | ||
exports.isUInt32 = (data) => { | ||
if (typeof data === 'number' && Number.isInteger(data)) { | ||
return data <= constants_1.MAX_UINT32 && data >= 0; | ||
} | ||
return num <= BigInt(constants_1.MAX_INT32) && num >= BigInt(constants_1.MIN_INT32); | ||
return false; | ||
}; | ||
exports.isUint32 = (num) => { | ||
if (typeof num === 'number') { | ||
return num <= constants_1.MAX_UINT32 && num >= 0; | ||
} | ||
return num <= BigInt(constants_1.MAX_UINT32) && num >= BigInt(0); | ||
}; | ||
exports.isInt64 = (num) => num <= constants_1.MAX_INT64 && num >= constants_1.MIN_INT64; | ||
exports.isUint64 = (num) => num <= constants_1.MAX_UINT64 && num >= BigInt(0); | ||
exports.isSInt64 = (data) => typeof data === 'bigint' ? data <= constants_1.MAX_SINT64 && data >= constants_1.MIN_SINT64 : false; | ||
exports.isUInt64 = (data) => typeof data === 'bigint' ? data <= constants_1.MAX_UINT64 && data >= BigInt(0) : false; | ||
exports.isBytes = (data) => Buffer.isBuffer(data); | ||
//# sourceMappingURL=validation.js.map |
{ | ||
"name": "@liskhq/lisk-validator", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Validation library according to the Lisk protocol", | ||
@@ -28,5 +28,7 @@ "author": "Lisk Foundation <admin@lisk.io>, lightcurve GmbH <admin@lightcurve.io>", | ||
"format": "prettier --write '**/*'", | ||
"lint": "tslint --format verbose --project .", | ||
"lint:fix": "npm run lint -- --fix", | ||
"lint": "eslint --ext .js,.ts .", | ||
"lint:fix": "eslint --fix --ext .js,.ts .", | ||
"test": "jest", | ||
"test:coverage": "jest --coverage=true --coverage-reporters=text", | ||
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose", | ||
"test:watch": "npm test -- --watch", | ||
@@ -39,3 +41,3 @@ "prebuild": "rm -r dist-node/* || mkdir dist-node || true", | ||
"dependencies": { | ||
"@liskhq/lisk-cryptography": "^2.5.0", | ||
"@liskhq/lisk-cryptography": "^3.0.0", | ||
"@types/node": "12.12.11", | ||
@@ -45,2 +47,3 @@ "@types/semver": "7.1.0", | ||
"ajv": "6.12.0", | ||
"debug": "4.1.1", | ||
"semver": "7.1.3", | ||
@@ -50,17 +53,22 @@ "validator": "12.2.0" | ||
"devDependencies": { | ||
"@types/jest": "25.1.3", | ||
"@types/jest-when": "2.7.0", | ||
"jest": "25.1.0", | ||
"@types/jest": "26.0.13", | ||
"@types/jest-when": "2.7.1", | ||
"@typescript-eslint/eslint-plugin": "3.10.1", | ||
"@typescript-eslint/parser": "3.10.1", | ||
"eslint": "7.8.1", | ||
"eslint-config-lisk-base": "1.2.2", | ||
"eslint-config-prettier": "6.11.0", | ||
"eslint-plugin-import": "2.22.0", | ||
"eslint-plugin-jest": "24.0.0", | ||
"jest": "26.4.2", | ||
"jest-extended": "0.11.5", | ||
"jest-when": "2.7.0", | ||
"prettier": "1.19.1", | ||
"source-map-support": "0.5.16", | ||
"ts-jest": "25.2.1", | ||
"jest-when": "2.7.2", | ||
"lodash.clonedeep": "4.5.0", | ||
"prettier": "2.0.5", | ||
"source-map-support": "0.5.19", | ||
"ts-jest": "26.3.0", | ||
"ts-node": "8.6.2", | ||
"tsconfig-paths": "3.9.0", | ||
"tslint": "6.0.0", | ||
"tslint-config-prettier": "1.18.0", | ||
"tslint-immutable": "6.0.1", | ||
"typescript": "3.8.3" | ||
} | ||
} |
@@ -13,3 +13,3 @@ # @liskhq/lisk-validator | ||
Copyright 2016-2019 Lisk Foundation | ||
Copyright 2016-2020 Lisk Foundation | ||
@@ -16,0 +16,0 @@ Licensed under the Apache License, Version 2.0 (the "License"); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
40411
29
618
8
19
+ Addeddebug@4.1.1
+ Added@liskhq/lisk-cryptography@3.3.0(transitive)
+ Addeddebug@4.1.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addedsodium-native@3.2.1(transitive)
- Removed@liskhq/lisk-cryptography@2.5.0(transitive)
- Removednan@2.22.0(transitive)
- Removedsodium-native@2.4.6(transitive)