
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

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 whichenglishpushkin delete controller whichenglishpushkin scaffold whichenglishThe 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:rollbackafter 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.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.