Skip to content

Commit

Permalink
fix: document backwards-compatibility expectations for `litra-devices…
Browse files Browse the repository at this point in the history
…` CLI command
  • Loading branch information
timrogers committed Mar 28, 2023
1 parent f108236 commit 52ef119
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/commonjs/cli/litra-devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const commander_1 = require("commander");
const driver_1 = require("../driver");
commander_1.program
.name('litra-devices')
.description('Lists Litra devices connected to your computer. Defaults to human-readable plain text.')
.option('--json', 'output the list of devices in structured JSON format');
.description('Lists Litra devices connected to your computer. Defaults to human-readable plain text. The structure and content of the plain text output may change in future versions. If you need a machine-readable output with consistency guarantees, use the `--json` option.')
.option('--json', 'output the list of devices in structured JSON format. New attributes may be added to the JSON output in future versions. Existing attributes will only be removed or changed in a backwards-incompatible way in major versions.');
commander_1.program.parse();
const { json } = commander_1.program.opts();
const devices = (0, driver_1.findDevices)();
Expand Down
6 changes: 3 additions & 3 deletions dist/esm/cli/litra-devices.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node
import { program } from 'commander';
import { findDevices, getBrightnessInLumen, getNameForDevice, getTemperatureInKelvin, isOn } from '../driver';
import { findDevices, getBrightnessInLumen, getNameForDevice, getTemperatureInKelvin, isOn, } from '../driver';
program
.name('litra-devices')
.description('Lists Litra devices connected to your computer. Defaults to human-readable plain text.')
.option('--json', 'output the list of devices in structured JSON format');
.description('Lists Litra devices connected to your computer. Defaults to human-readable plain text. The structure and content of the plain text output may change in future versions. If you need a machine-readable output with consistency guarantees, use the `--json` option.')
.option('--json', 'output the list of devices in structured JSON format. New attributes may be added to the JSON output in future versions. Existing attributes will only be removed or changed in a backwards-incompatible way in major versions.');
program.parse();
const { json } = program.opts();
const devices = findDevices();
Expand Down
8 changes: 5 additions & 3 deletions src/cli/litra-devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import {
program
.name('litra-devices')
.description(
'Lists Litra devices connected to your computer. Defaults to human-readable plain text.',
'Lists Litra devices connected to your computer. Defaults to human-readable plain text. The structure and content of the plain text output may change in future versions. If you need a machine-readable output with consistency guarantees, use the `--json` option.',
)
.option('--json', 'output the list of devices in structured JSON format');

.option(
'--json',
'output the list of devices in structured JSON format. New attributes may be added to the JSON output in future versions. Existing attributes will only be removed or changed in a backwards-incompatible way in major versions.',
);
program.parse();
const { json } = program.opts();

Expand Down

0 comments on commit 52ef119

Please sign in to comment.