1.5.0 • Published 7 months ago

@golemio/cli v1.5.0

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
7 months ago

Golemio CLI

Golemio CLI is a collection of executables intended to be used with Golemio projects and modules

Install the CLI

Prerequisites

Install globally

# With npm
$ npm install -g @golemio/cli

# With yarn
$ yarn global add @golemio/cli

# Test it out
$ golemio

Install locally

$ cd my-project

# With npm
$ npm install --save-dev @golemio/cli

# With Yarn
$ yarn add --dev @golemio/cli

# Test it out
$ npm run golemio
$ yarn golemio

Commands summary

CommandDescription
golemioDefault command (welcome)
golemio helpView available commands
golemio migrate-db helpView available migration commands and flags
golemio migrate-db create \<name>Create new migration scripts (--postgres or --mongo)
golemio migrate-db upRun up migrations (--postgres and/or --mongo)
golemio migrate-db downRun down migrations (--postgres and/or --mongo)
golemio import-db-data helpView available db data import commands and flags
golemio import-db-dataImport db data (--postgres and/or --mongo)

Environmental variables

VariableExampleRequired
POSTGRES_CONNpostgres://oict:oict-pass@localhost/oict-test:white_check_mark: (mdb and idd postgres)
MONGO_CONNmongodb://localhost:27017/oict-test:white_check_mark: (mdb and idd mongo)
POSTGRES_MIGRATIONS_DIRdb/migrations/postgresql (default):negative_squared_cross_mark:
SQL_DUMP_FILESdb/example/*.sql:white_check_mark: (idd postgres)
MONGO_DATA_PATHSdb/example/**/mongo_data:white_check_mark: (idd mongo)

Development

Prerequisites

Local environment

To set up your local development environment, install project dependencies and create .env file in the root of the project (see .env.template for reference)

$ yarn
$ cp .env.template .env

Now you can run the CLI in development mode, just type

$ ./bin/golemio.js

You don't need to compile the source code as the script automatically registers the ts-node loader in development mode

Unit tests

Unit tests are located at test/unit. You can run them by typing

$ yarn test-unit

Integration tests

Integration tests are located at test/integration. You can run them by typing

# Run local services, recommended
$ docker-compose up -d

$ yarn test-integration

License

MIT

1.4.4-dev.925914955

10 months ago

1.4.6

9 months ago

1.4.5

9 months ago

1.4.4

10 months ago

1.4.4-dev.925937058

10 months ago

1.4.5-dev.925957696

10 months ago

1.5.0

8 months ago

1.4.4-dev.925957187

10 months ago

1.4.3

11 months ago

1.4.3-dev.898127964

11 months ago

1.4.4-dev.899473139

11 months ago

1.4.3-dev.899373587

11 months ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago