
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
The pushkin tool is created to easily generate or delete a set of routes, migrations, bookshelf models, seeds and workers for a new quiz.
npm install --global pushkin
docker-compose -f docker-compose.debug.yml up
in your pushkin folderpushkin [action] [entity]
pushkin
Command | Description |
---|---|
pushkin | list all pushkin commands |
pushkin generate entity yourQuizName | creates an entity with desired name |
pushkin delete entity yourQuizName | deletes an existing entity with name |
pushkin list entity | list all entities |
pushkin scaffold yourQuizName | genarates controller, model and worker |
pushkin seed yourQuizName | list instructions for seeding an individual quiz |
pushkin generate model whichenglish
pushkin delete controller whichenglish
pushkin scaffold whichenglish
The core of this cli tool are the manager files listed in /src
. Each of them are responsible for three methods: generate
, delete
and list
.
Upon the command pushkin [action] A B
where action is one of the methods, A is the entity and B is the name desired, pushkin simply calls the appropriate methods in the corresponding manager file.
For example, pushkin generate controller whichenglish
calls controllerManager's generate method to create a brand new controller file by coping controller.js
in /templates/controllesr
for quiz whichenglish
.
To change the methods created in the manager files, please edit the manager files, mainly in controllerManager.js
, modelManager.js
, and workerManager.js
. Feel free to make changes to all the methods listed.
To change the templates for controllers
, migrations
, models
, seeds
or workers
, please edit the files listed under the /templates
folder. Remember these templates are copied over to the desinated folder to put in action, please make sure any migration templates added or changed will take effect when running the migrations, the bookshelf model templates will also have to change correspondingly to proper establish the relations between all the tables. This is very important due to the fact that the routes heavily rely on these bookshelf models.
To change the actual command handled by commander.js, please edit the files listed under /bin
Delete a model by pushkin delete model [yourQuizname]
could be easily executed.
This command will delete migration files, bookshelf model files and seed files for [yourQuizName]
. Due to the nature of knex migrations, if you do not roll back these migrations before you execute delete, this WILL cause the migration folder to corrupt.
pushkin delete model ...
pushkin-db-worker
: bash -c "clear && docker exec -it pushkin_db-worker_1 bash"
node_modules/.bin/knex migrate:rollback
after the above steps are done, it is safe to delete a model.
Due to the fact that the only way to fix the corrupted migration folder issue is to drop the table that is causing the migration to corrupt, we STRONGLY RECOMMEND to back up your data on a daily basis. Here are the steps to drop a table:
pushkin-db
: bash -c "clear && docker exec -it pushkin_db_1 sh"
psql --user postgres
to connect to psql\c [yourDataBaseName]
/bin
: handles shell commands by using commander.js Git-style sub-commands, for more info please visit https://github.com/tj/commander.js//src
: consists controllerManager.js
, modelManager.js
, scaffoldManager.js
and workerManager.js
which are in charge of coping the corresponding templates over to the desinated location/templates
: consists template files for controller, migrations, models and seeds/tests
: tests are written for all managersFAQs

We found that pushkin 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.