Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

Rename all core into engine #55

Merged
merged 5 commits into from
Jun 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 29 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $ npm install -g mesg-cli
$ mesg-cli COMMAND
running command...
$ mesg-cli (-v|--version|version)
mesg-cli/0.0.0 darwin-x64 node-v11.14.0
mesg-cli/0.0.0 darwin-x64 node-v12.3.1
$ mesg-cli --help [COMMAND]
USAGE
$ mesg-cli COMMAND
Expand All @@ -36,7 +36,6 @@ USAGE
* [`mesg-cli account:import ACCOUNT`](#mesg-cli-accountimport-account)
* [`mesg-cli account:import-private-key PRIVATE_KEY`](#mesg-cli-accountimport-private-key-private_key)
* [`mesg-cli account:list`](#mesg-cli-accountlist)
* [`mesg-cli autocomplete [SHELL]`](#mesg-cli-autocomplete-shell)
* [`mesg-cli daemon:logs`](#mesg-cli-daemonlogs)
* [`mesg-cli daemon:start`](#mesg-cli-daemonstart)
* [`mesg-cli daemon:status`](#mesg-cli-daemonstatus)
Expand All @@ -45,6 +44,7 @@ USAGE
* [`mesg-cli marketplace:create-offer SID`](#mesg-cli-marketplacecreate-offer-sid)
* [`mesg-cli marketplace:publish SERVICE_PATH`](#mesg-cli-marketplacepublish-service_path)
* [`mesg-cli marketplace:purchase SERVICE_ID OFFER_ID`](#mesg-cli-marketplacepurchase-service_id-offer_id)
* [`mesg-cli service:compile [SERVICE_PATH_OR_URL]`](#mesg-cli-servicecompile-service_path_or_url)
* [`mesg-cli service:delete SERVICE`](#mesg-cli-servicedelete-service)
* [`mesg-cli service:deploy [SERVICE_PATH_OR_URL]`](#mesg-cli-servicedeploy-service_path_or_url)
* [`mesg-cli service:detail SERVICE`](#mesg-cli-servicedetail-service)
Expand Down Expand Up @@ -179,32 +179,9 @@ ALIASES

_See code: [src/commands/account/list.ts](https://github.com/mesg-foundation/cli/blob/v0.0.0/src/commands/account/list.ts)_

## `mesg-cli autocomplete [SHELL]`

display autocomplete installation instructions

```
USAGE
$ mesg-cli autocomplete [SHELL]

ARGUMENTS
SHELL shell type

OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)

EXAMPLES
$ mesg-cli autocomplete
$ mesg-cli autocomplete bash
$ mesg-cli autocomplete zsh
$ mesg-cli autocomplete --refresh-cache
```

_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v0.1.0/src/commands/autocomplete/index.ts)_

## `mesg-cli daemon:logs`

Show the Core's logs
Show the Engine's logs

```
USAGE
Expand All @@ -213,7 +190,7 @@ USAGE
OPTIONS
-h, --help show CLI help
-q, --quiet
--name=name (required) [default: core] name of the service running the core
--name=name (required) [default: engine] name of the service running the engine
--silent
--tail=tail [default: -1] Output specified number of lines at the end of logs
```
Expand All @@ -234,16 +211,16 @@ OPTIONS
--log-force-colors log force colors
--log-format=(text|json) [default: text] log format
--log-level=(debug|info|warn|error|fatal|panic) [default: info] log level
--name=name (required) [default: core] name of the service running the core
--name=name (required) [default: engine] name of the service running the engine
--silent
--version=version (required) [default: latest] Version of the core to run
--version=version (required) [default: latest] Version of the engine to run
```

_See code: [src/commands/daemon/start.ts](https://github.com/mesg-foundation/cli/blob/v0.0.0/src/commands/daemon/start.ts)_

## `mesg-cli daemon:status`

Get the Core's status
Get the Engine's status

```
USAGE
Expand All @@ -252,7 +229,7 @@ USAGE
OPTIONS
-h, --help show CLI help
-q, --quiet
--name=name (required) [default: core] name of the service running the core
--name=name (required) [default: engine] name of the service running the engine
--silent
```

Expand All @@ -269,7 +246,7 @@ USAGE
OPTIONS
-h, --help show CLI help
-q, --quiet
--name=name (required) [default: core] name of the service running the core
--name=name (required) [default: engine] name of the service running the engine
--silent
```

Expand Down Expand Up @@ -358,6 +335,25 @@ OPTIONS

_See code: [src/commands/marketplace/purchase.ts](https://github.com/mesg-foundation/cli/blob/v0.0.0/src/commands/marketplace/purchase.ts)_

## `mesg-cli service:compile [SERVICE_PATH_OR_URL]`

Compile a service and upload its source to IPFS

```
USAGE
$ mesg-cli service:compile [SERVICE_PATH_OR_URL]

ARGUMENTS
SERVICE_PATH_OR_URL [default: ./] Path of the service or url to access it

OPTIONS
-h, --help show CLI help
-q, --quiet
--silent
```

_See code: [src/commands/service/compile.ts](https://github.com/mesg-foundation/cli/blob/v0.0.0/src/commands/service/compile.ts)_

## `mesg-cli service:delete SERVICE`

Delete one or many services
Expand Down Expand Up @@ -465,6 +461,7 @@ ARGUMENTS
OPTIONS
-h, --help show CLI help
-q, --quiet
-s, --save Save to default readme file
--silent

ALIASES
Expand Down
2 changes: 1 addition & 1 deletion src/commands/daemon/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {flags} from '@oclif/command'
import Command from '../../docker-command'

export default class Logs extends Command {
static description = 'Show the Core\'s logs'
static description = 'Show the Engine\'s logs'

static flags = {
...Command.flags,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/daemon/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class Start extends Command {
static flags = {
...Command.flags,
version: flags.string({
description: 'Version of the core to run',
description: 'Version of the engine to run',
required: true,
default: 'latest'
}),
Expand Down
2 changes: 1 addition & 1 deletion src/commands/daemon/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const enum ServiceStatus {
}

export default class Status extends Command {
static description = 'Get the Core\'s status'
static description = 'Get the Engine\'s status'

static flags = {
...Command.flags
Expand Down
4 changes: 2 additions & 2 deletions src/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Contents

- [Installation](#Installation)
- [MESG Engine](#MESG-Core)
- [MESG Engine](#MESG-Engine)
- [Deploy the Service](#Service)
- [Definitions](#Definitions)
{{#if events}}
Expand All @@ -25,7 +25,7 @@

### MESG Engine

This service requires [MESG Engine](https://github.com/mesg-foundation/core) to be installed first.
This service requires [MESG Engine](https://github.com/mesg-foundation/engine) to be installed first.

You can install MESG Engine by running the following command or [follow the installation guide](https://docs.mesg.com/guide/start-here/installation.html).

Expand Down
15 changes: 8 additions & 7 deletions src/docker-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export default abstract class extends Command {
static flags = {
...Command.flags,
name: flags.string({
description: 'name of the service running the core',
description: 'name of the service running the engine',
required: true,
default: 'core'
default: 'engine'
}),
}

Expand Down Expand Up @@ -95,25 +95,26 @@ export default abstract class extends Command {
'com.docker.stack.namespace': options.name
},
Env: [
'MESG_SERVER_ADDRESS=:50052',
`MESG_LOG_FORMAT=${options.format}`,
`MESG_LOG_LEVEL=${options.level}`,
`MESG_LOG_FORCECOLORS=${options.colors}`,
`MESG_CORE_NAME=${options.name}`,
'MESG_CORE_PATH=/mesg',
`MESG_NAME=${options.name}`,
],
Mounts: [{
Source: '/var/run/docker.sock',
Target: '/var/run/docker.sock',
Type: 'bind',
}, {
Source: join(homedir(), '.mesg'),
Target: '/mesg',
Target: '/root/.mesg',
Type: 'bind',
}],
},
Networks: [
{Target: network.id, Alias: 'core'},
{
Target: network.id,
Alias: options.name,
},
]
},
EndpointSpec: {
Expand Down