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 +6 -3
- package/package.json +1 -1
- package/src/config.js +1 -1
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(
|
|
27
|
-
.description(
|
|
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
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;
|