Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

netoax
Copy link
Contributor

@netoax netoax commented Nov 21, 2019

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:

  • auth device
  • list devices
  • listen to commands
  • delete thing
  • update schema
  • create thing
  • publish data

Does this close any currently open issues?

Nops.

Any relevant logs, error output, etc?

Nops.

@netoax netoax added enhancement New feature or request priority: low labels Nov 21, 2019
@netoax netoax added this to the Sprint-50 milestone Nov 21, 2019
@netoax netoax requested review from ramonhpr and lcbm November 21, 2019 15:41
@netoax netoax self-assigned this Nov 21, 2019
@@ -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"
Copy link
Contributor

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
Copy link
Contributor

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


const listenCommands = (args) => {
const topic = 'fog';
const commands = ['data.update', 'data.request'];
Copy link
Contributor

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.

@netoax netoax modified the milestones: Sprint-50, Sprint-51 Dec 2, 2019
@netoax
Copy link
Contributor Author

netoax commented Dec 19, 2019

Codacy 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

@lcbm lcbm removed their request for review November 10, 2022 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants