
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@tailored-apps/dedition
Advanced tools
Wrapper for AJV which can read all json files and adds them as schemas
ajv
(https://www.npmjs.com/package/ajv) and ajv-error
(https://www.npmjs.com/package/ajv-errors).json
filesimport validator from 'dedition'
const valid = validator({ ajvOptions = {}, logger = createDefaultLogger()} = {})
ajvOptions
are all the options which are normally passed to ajv
(https://www.npmjs.com/package/ajv#options)logger
can be passed optionally (i.e.: a winston instance), if not passed a default logger is createdThere are two ajv-options set at any time:
allErrors = true
jsonPointers = true
These are mandatory and CANNOT be overwritten, since ajv-errors
needs these two options to function
After initializing validator
you have access to several functions
Adds a given schema to the ajv
instance using the passed schemaName
as identifier
schemaName
Identifier for the schemaschemaObj
is a ajv
validation schema (https://www.npmjs.com/package/ajv#validation-keywords)Returns: void
Adds the schema from the given filePath
(must be a valid .json file) to the ajv
instance.
The identifier is the fileName without the .json-extension
i.e.: Person.json
-> Identifier: Person
filePath
is the path to the .json fileReturns: void
Adds all the schemas from the given folderPath
(only files inside this folder with extension .json are recognized) to the ajv
instance.
The identifier is the file name without the .json-extenision
i.e.: Person.json
-> Identifier: Person
folderPath
is the path to the folder where the schema files are locatedReturns: void
Validates an Object with the given schema which is identified by the schema identifier string
schemaName
: Name of the schemaobj
: Object to validateReturns: true if valid, otherwise 400: BadRequestError
(from package http-errors
)
Removes all the schemas from the ajv
instance
Returns: void
Checks wheter an schema exists or not
schemaName
: Name of the schemaReturns: True or False wheter the schema exists or not
Returns the schema for a given schemaName
schemaName
: Name of the schemaReturns: Validation Schema object or 500: InternalServerError
(from package http-errors
)
FAQs
Wrapper for AJV which can read all json files and adds them as schemas
The npm package @tailored-apps/dedition receives a total of 0 weekly downloads. As such, @tailored-apps/dedition popularity was classified as not popular.
We found that @tailored-apps/dedition demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.