Skip to content
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
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ jest-html-reporters-attach
jest_html_reporters.html
smartthings-*.zip

# the Typescript outDir that oclif prefers
packages/cli/lib
packages/edge/lib

# functional tests
.pytest_cache
__pycache__
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- All commands now have examples in their help (`smartthings <command> --help`).
- args that require enum-like types are now case-insensitive. e.g. For example, you can now list zigbee
devices with `smartthings devices --type zigbee`.
- The config file location is now determined by [envPaths](https://www.npmjs.com/package/env-paths) library
- The config file location is now determined by [env-paths](https://www.npmjs.com/package/env-paths) library
rather than oclif. A reasonable attempt has been made at finding the old config and copying it for
the user so normally no change is needed. (Future changes will need to be made to the new file, of course.)
The `config` command now displays the location of the configuration file.
Expand Down
10 changes: 3 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ commands. Some ground rules to follow when creating or updating commands:
* Commands should be kebab case. The module name is used as the command name and can be placed in
a topic by placing it in that topic's directory.
* Commands should always include a short one-line description that starts with a lowercase letter
and does not end with a period. A more detailed description can be included after a newline. This
description can be split across lines but should not include newlines (oclif will wrap it).
and does not end with a period. More details can be provided in the epilog if necessary.
* Flags are also kebab case and should have a short single-character version only if they are
expected to be used often.
* Descriptions of flags should be short, start with a lowercase letter, and include no ending
Expand All @@ -68,12 +67,9 @@ commands. Some ground rules to follow when creating or updating commands:
* Descriptions for arguments should be a short phrase without a capital letter and without ending
punctuation.
* Examples of common tasks should be included with a description of the example.
* Use the [object format](https://oclif.io/docs/commands#other-command-options)
rather than the simple string format when providing examples.
* When specifying an id in an example, use a representative example id.
* One-line descriptions should start with a lowercase letter and not end with a period.
* There is no need to include `$ ` prefix for command examples because oclif includes it
automatically.
* Use `$0` in place of `smartthings` in the example.

### Command Naming

Expand Down Expand Up @@ -138,7 +134,7 @@ If you are not familiar with SmartThings, we have
[extensive online documentation](https://developer.smartthings.com/docs/getting-started/welcome/).

To create and manage your services and devices on SmartThings, create an account in the
[developer workspace](https://smartthings.developer.samsung.com/workspace/).
[developer console](https://developer.smartthings.com/console).

The [SmartThings Community](https://community.smartthings.com/) is a good place share and
ask questions.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ asking you to log in and give the CLI permission to access your account.
The CLI will automatically request login as needed.

You can also use a personal access token (PAT) for authentication by passing a `--token <uuid>` flag to commands or by creating a
[configuration file](https://github.com/SmartThingsCommunity/smartthings-cli/blob/main/packages/cli/doc/configuration.md)
[configuration file](https://github.com/SmartThingsCommunity/smartthings-cli/blob/main/doc/configuration.md)
and including the token in a `token` key for your profile. We generally don't recommend this approach
since it less secure, given that PATs don't expire unless revoked by the user, but it can be useful when working with
headless servers or for users who frequently switch between accounts.
Expand Down Expand Up @@ -285,4 +285,4 @@ $ SMARTTHINGS_DEBUG=true smartthings <command>
```

More details about advanced configuration and logging in the CLI can be found on the
[configuration documentation page](https://github.com/SmartThingsCommunity/smartthings-cli/blob/master/packages/cli/doc/configuration.md).
[configuration documentation page](https://github.com/SmartThingsCommunity/smartthings-cli/blob/main/doc/configuration.md).
8 changes: 4 additions & 4 deletions doc/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ Command line flags always override configuration options.

Logging is useful when you are developing the CLI itself or if you need to debug an issue experienced during general use.

By default, a rolling log file will be created at the [OCLIF CLI cache](https://oclif.io/docs/config) directory.
* macOS: `~/Library/Caches/@smartthings/cli`
* Unix: `~/.cache/@smartthings/cli`
* Windows: `%LOCALAPPDATA%\@smartthings\cli`
By default, a rolling log file will be created at the log directory specified by [env-paths](https://www.npmjs.com/package/env-paths) directory.
* macOS: `~/Library/Logs/@smartthings/cli`
* Unix: `~/.local/state/@smartthings/cli` (or `$XDG_STATE_HOME/@smartthings/cli`)
* Windows: `%LOCALAPPDATA%\@smartthings\cli\Log`

The CLI uses [log4js](https://log4js-node.github.io/log4js-node/) for logging.

Expand Down
2 changes: 0 additions & 2 deletions src/lib/command/util/installedschema-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export const installedSchemaInstances = async (
locationIds: string[] | undefined,
options: { verbose: boolean },
): Promise<(InstalledSchemaApp & WithNamedLocation)[]> => {
// We accept and handle undefined locationIds because that's what we get from oclif even
// though the type is just `string[]`.
if (!locationIds || locationIds.length == 0) {
locationIds = (await client.locations.list()).map(it => it.locationId)
}
Expand Down
Loading