Giter Site home page Giter Site logo

crispy-cli's People

Contributors

dependabot[bot] avatar svirgunvolodia avatar vitaliimelnychuk avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

crispy-cli's Issues

Register `crispy-cli` in npm and add publish workflow

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)

Send information about running migration to API

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

Init project

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:

  • linting
  • formatting
  • versions management
  • CI/CD
  • tests
  • commands doc

Add config interface for crispy-cli

it should cover few points for start:

  • MySQL connection as crispy should be able to handle migration versions and running commands
  • where migrations should be stored -> directory in repo and table in db
  • where API is hosted. As crispy-cli should be able to make requests to API, we need to be able to define where this API

add logging library

we 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:

  • how to show errors to user
  • how to show log lines to user
  • how to .to show everything in development mode

To cover all those points we might use some command line formatter library like https://www.npmjs.com/package/js-beautify

Add migrations runner

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:

  • use runners module in migrate/rollback commands
  • use rollback when migration failed
  • add tests for this flow as it's important one

Add unit tests

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.