xp-command 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/index.js CHANGED
@@ -20,12 +20,15 @@ import { isAPIError, isEconnRefused } from "../src/error.js";
20
20
  import history from "../src/history.js";
21
21
  import { sleep } from "../src/sleep.js";
22
22
 
23
+ import packageJson from '../package.json' with { type: 'json' };
24
+
23
25
  const PREFIX = "🛩 ";
24
26
 
25
27
  program
26
- .version("1.0.0")
27
- .description("xp-command")
28
- .option("-p, --port <number>", "server port number");
28
+ .version(packageJson.version)
29
+ .description(`${PREFIX} ${packageJson.name}\n${packageJson.description}`)
30
+ .option("-p, --port <number>", "server port number")
31
+ .helpOption('-h, --help', 'display this help text');
29
32
 
30
33
  /**
31
34
  * @param {string} command
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-command",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Quick cockpit commands for X-Plane 12 - set your radios, altimeter, autopilot, and more from the terminal while flying.",
5
5
  "keywords": [
6
6
  "xplane",
package/src/config.js CHANGED
@@ -47,7 +47,7 @@ export const getConfig = async () => {
47
47
  let aircraft;
48
48
  aircraft = /** @type {string} */ (
49
49
  await getDatarefValue("sim/aircraft/view/acf_ui_name")
50
- );
50
+ ).replaceAll(/[./\\]/g, ' ');
51
51
  const aircraftConfigPath = join(osHomedir, ".xp-command", `${aircraft}.yml`);
52
52
 
53
53
  let config;