
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
sequelize-generator-schematic
Advanced tools
Aimed to make code generation a little simpler, this command line tool generates Typescript code for Sequelize entity model classes.
The sequelize-generator schematic doesn't generate all the desired table structure, but most of the code required to make nice database models based on some copy & pasting process.
The entitytype-generator schematic generates a sequelize-less "type" class, that can be used elsewhere (frontend or other backend classes).
Execute:
git clone git@github.com:jsanta/sequelize-generator.git
cd sequelize-generator
npm install
npm run build
cd <your project folder>
npm link <sequelize-generator folder>
Execute:
npm i sequelize-generator-schematic
sequelize-generator schematicFrom the command line, execute:
ng g sequelize-generator-schematic:sequelize-generator --project=<project_name> <path> --flat --schema=<the database schema for the table>
entitytype-generator schematicFrom the command line, execute:
ng g sequelize-generator-schematic:entitytype-generator --project=<project_name> --flat <path>
These type classes generated by the schematic require some extra objects from the so called 'utils' module. You can find this module in the schematic source.
Editing the generated files is absolutely required.
For EntityValidators to work you'll need to run first:
npm install --save ajv typescript-json-schema
Beware: Large database models that consider multiple different schemas can lead to class collisions (user table, named as user, in different schemas, each table with a sightly different struncture (believe me, it happens...)). Be sure to name your classes in an intelligent way to avoid errors due to name collisions (eg schemaCache caching the wrong json-schema => wrong validations).
Contact me at:
e-Mail: j [at] santa dot cl
Twitter: @JSantaCL
Medium: https://medium.com/@jsantacl
FAQs
Sequelize entity model generator.
We found that sequelize-generator-schematic 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.