wiseengineering / crispy-cli Goto Github PK
View Code? Open in Web Editor NEWCLI to communicate with `crispy-api`.
License: MIT License
CLI to communicate with `crispy-api`.
License: MIT License
based on #1
First of all, we need steps on how we would like to deploy our app to npm.
So far I know, there is a too to manage it https://docs.npm js.com/cli/update.html
we can use it and have both git tags
and package.json
with specified version
As a second step, we need to add a workflow to publish this package based on the version in package.json
, here is the link
https://docs.npmjs.com/creating-and-publishing-scoped-public-packages
Let's start from npm commands we have to run to publish app and going to automate this workflow with CircleCI (WiseEngineering/crispy#4)
We need to describe CLI interface and actions we will rely to crispy-cli
As this tool will be used by developers we need a few examples of how to setup/use
To be able to show everything about running migration we have to implement functionality that will send API requests about this and store that data in API. The next step will be to show all the data in web
We need command-line interface for this app.
For start, we have to look into a simple Typescript app based on the command line library.
Let's move from point to point and consider about:
Now, we've responded with Promise<object>
from database
https://github.com/WiseEngineering/crispy-cli/blob/master/src/models/migrations.ts#L14-L22
Will be good to have Typescript types like Promise or array of migration
Now, we running only migration that was passed.
This is not good, as we have to protect from running :
it should cover few points for start:
crispy-cli
should be able to make requests to API, we need to be able to define where this APIwe haven't implemented any of logger module, will be good to have one
here is one of code pointers where it can be used:
https://github.com/WiseEngineering/crispy-cli/blob/master/src/commands/migrations/migrate.ts#L48
during implementation, let's think about:
To cover all those points we might use some command line formatter library like https://www.npmjs.com/package/js-beautify
Now, we have the only stub for migration run: https://github.com/WiseEngineering/crispy-cli/blob/add-tests-command/src/commands/migrations/migrate.ts#L15
I think, we have to consider about running them based on runnner
option from migration schema and use transactions for mysql runner.
If to speak about runners, I believe, we might start from default mysql
runner and then move forward and think about it more
Key points to think/to look:
Most critical functionality is migration-schema
where we selecting migrations that should be run
but we need to cover as much as possible to be sure everything is okay
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.