Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
compile-schemas-to-typescript
Advanced tools
Transform a directory of JSON Schems into TypeScript Interfaces
This module is a wrapper around the json-schema-to-typescript
library that enables transformation of directories of schemas instead of individual schemas. If directory support is added to the json-schema-to-typescript
library this module will be archived.
This module works as an CLI. Install as a dependency and call compile-schemas-to-typescript
from a npm script, or use npx
npx compile-schemas-to-typescript <schema-dir> <types-output-dir>
compileSchema(input: string, output: string): Promise<void>
The method iterates over the contents of the input
directory and compiles any .json
files into TypeScript interfaces and stores the generated output into the specified output
directory.
const compileSchemas = require('compile-schemas-to-typescript')
(async () => {
try {
await compileSchemas('./schemas', './types')
} catch (err) {
console.error(err)
process.exit(1)
}
})()
This project is actively maintained by the Fastify team.
Contributions are welcome! Please open an issue and a pull request.
Licensed under MIT.
FAQs
Transform a directory of JSON Schems into TypeScript Interfaces
The npm package compile-schemas-to-typescript receives a total of 39 weekly downloads. As such, compile-schemas-to-typescript popularity was classified as not popular.
We found that compile-schemas-to-typescript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.