From f18d75c42c05583a7d1dd3ab0b3c75ace7a1b138 Mon Sep 17 00:00:00 2001 From: Ross Stenersen Date: Thu, 16 Mar 2023 11:18:35 -0500 Subject: [PATCH] docs: remove stub edge command and clear description of edge topic --- packages/cli/README.md | 18 ------------------ packages/edge/README.md | 18 ------------------ packages/edge/package.json | 7 ++++++- .../edge/src/__tests__/commands/edge.test.ts | 13 ------------- packages/edge/src/commands/edge.ts | 18 ------------------ 5 files changed, 6 insertions(+), 68 deletions(-) delete mode 100644 packages/edge/src/__tests__/commands/edge.test.ts delete mode 100644 packages/edge/src/commands/edge.ts diff --git a/packages/cli/README.md b/packages/cli/README.md index 8e3494c8..5b42bd1a 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -174,7 +174,6 @@ that map to the API spec. * [`smartthings devices:rename [ID] [LABEL]`](#smartthings-devicesrename-id-label) * [`smartthings devices:status [ID]`](#smartthings-devicesstatus-id) * [`smartthings devices:update [ID]`](#smartthings-devicesupdate-id) -* [`smartthings edge`](#smartthings-edge) * [`smartthings edge:channels [IDORINDEX]`](#smartthings-edgechannels-idorindex) * [`smartthings edge:channels:assign [DRIVERID] [VERSION]`](#smartthings-edgechannelsassign-driverid-version) * [`smartthings edge:channels:create`](#smartthings-edgechannelscreate) @@ -2903,23 +2902,6 @@ DESCRIPTION _See code: [src/commands/devices/update.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/cli@1.1.2/packages/cli/src/commands/devices/update.ts)_ -## `smartthings edge` - -edge topic - -``` -USAGE - $ smartthings edge [-h] - -COMMON FLAGS - -h, --help Show CLI help. - -DESCRIPTION - edge topic -``` - -_See code: [@smartthings/plugin-cli-edge](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/plugin-cli-edge@2.0.1/packages/edge/src/commands/edge.ts)_ - ## `smartthings edge:channels [IDORINDEX]` list all channels owned by you or retrieve a single channel diff --git a/packages/edge/README.md b/packages/edge/README.md index fb68be86..90a1ea23 100644 --- a/packages/edge/README.md +++ b/packages/edge/README.md @@ -20,7 +20,6 @@ for information on running the CLI. # Commands -* [`smartthings edge`](#smartthings-edge) * [`smartthings edge:channels [IDORINDEX]`](#smartthings-edgechannels-idorindex) * [`smartthings edge:channels:assign [DRIVERID] [VERSION]`](#smartthings-edgechannelsassign-driverid-version) * [`smartthings edge:channels:create`](#smartthings-edgechannelscreate) @@ -46,23 +45,6 @@ for information on running the CLI. * [`smartthings edge:drivers:switch [DEVICEID]`](#smartthings-edgedriversswitch-deviceid) * [`smartthings edge:drivers:uninstall [DRIVERID]`](#smartthings-edgedriversuninstall-driverid) -## `smartthings edge` - -edge topic - -``` -USAGE - $ smartthings edge [-h] - -COMMON FLAGS - -h, --help Show CLI help. - -DESCRIPTION - edge topic -``` - -_See code: [src/commands/edge.ts](https://github.com/SmartThingsCommunity/smartthings-cli/blob/@smartthings/plugin-cli-edge@2.0.1/packages/edge/src/commands/edge.ts)_ - ## `smartthings edge:channels [IDORINDEX]` list all channels owned by you or retrieve a single channel diff --git a/packages/edge/package.json b/packages/edge/package.json index 72577263..9ed4118f 100644 --- a/packages/edge/package.json +++ b/packages/edge/package.json @@ -37,7 +37,12 @@ "repositoryPrefix": "<%- repo %>/blob/@smartthings/plugin-cli-edge@<%- version %>/packages/edge/<%- commandPath %>", "devPlugins": [ "@oclif/plugin-help" - ] + ], + "topics": { + "edge": { + "description": "" + } + } }, "dependencies": { "@log4js-node/log4js-api": "^1.0.2", diff --git a/packages/edge/src/__tests__/commands/edge.test.ts b/packages/edge/src/__tests__/commands/edge.test.ts deleted file mode 100644 index 0d7904e0..00000000 --- a/packages/edge/src/__tests__/commands/edge.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import EdgeCommand from '../../commands/edge' - - -describe('EdgeCommand', () => { - it('logs info on getting help when invoked without arguments', async () => { - const logSpy = jest.spyOn(EdgeCommand.prototype, 'log') - - await expect(EdgeCommand.run([])).resolves.not.toThrow() - - expect(logSpy).toHaveBeenCalledTimes(1) - expect(logSpy).toHaveBeenCalledWith('Run "smartthings edge --help" for info on the edge topic.') - }) -}) diff --git a/packages/edge/src/commands/edge.ts b/packages/edge/src/commands/edge.ts deleted file mode 100644 index 3bf22a00..00000000 --- a/packages/edge/src/commands/edge.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Command } from '@oclif/core' - -import { SmartThingsCommand } from '@smartthings/cli-lib' - - -/** - * There is no top-level command for the `edge` topic, so we provide this stub to give - * oclif a description of the topic. - */ -export default class EdgeCommand extends Command { - static description = 'edge topic' - - static flags = { help: SmartThingsCommand.flags.help } - - async run(): Promise { - this.log('Run "smartthings edge --help" for info on the edge topic.') - } -}