-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLI to facilitate the development #40
base: master
Are you sure you want to change the base?
Conversation
@@ -27,7 +27,8 @@ | |||
"pre-commit": "^1.2.2", | |||
"request": "^2.87.0", | |||
"winston": "^3.0.0", | |||
"winston-syslog": "^2.0.0" | |||
"winston-syslog": "^2.0.0", | |||
"yargs": "^13.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that should be as devDependency
|
||
This CLI aims to ease the development process when sending messages to or from the connector through devices and data API. | ||
|
||
### Run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a command to run npm install
tools/cli/cmds/listenCommands.js
Outdated
|
||
const listenCommands = (args) => { | ||
const topic = 'fog'; | ||
const commands = ['data.update', 'data.request']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add device.*
and schema.updated
to get a response from the commands.
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- tools/cli/cmds/createThing.js 1
- tools/cli/cmds/deleteThing.js 1
- tools/cli/cmds/updateSchema.js 1
- tools/cli/cmds/authDevice.js 1
- tools/cli/cmds/listDevices.js 1
- tools/cli/cmds/listenCommands.js 1
- tools/cli/network/connection.js 2
- tools/cli/cmds/publishData.js 5
Clones added
============
- tools/cli/cmds/createThing.js 4
- tools/cli/cmds/deleteThing.js 3
- tools/cli/cmds/updateSchema.js 4
- tools/cli/cmds/authDevice.js 4
- tools/cli/cmds/listDevices.js 2
- tools/cli/cmds/listenCommands.js 2
- tools/cli/cmds/publishData.js 1
See the complete overview on Codacy |
What does this implement/fix? Explain your changes.
This patch adds a command-line interface (CLI) to operate on the connector service. The implemented commands are:
Does this close any currently open issues?
Nops.
Any relevant logs, error output, etc?
Nops.