@livedesk/client 0.1.17 → 0.1.18
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/livedesk-client.js +13 -0
- package/package.json +1 -1
package/bin/livedesk-client.js
CHANGED
|
@@ -62,6 +62,15 @@ when a packaged RemoteFast runtime is unavailable.
|
|
|
62
62
|
`.trimStart());
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
function readPackageVersion() {
|
|
66
|
+
try {
|
|
67
|
+
const packageInfo = JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf8'));
|
|
68
|
+
return packageInfo.version || '0.0.0';
|
|
69
|
+
} catch {
|
|
70
|
+
return '0.0.0';
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
65
74
|
function normalizeEngine(value) {
|
|
66
75
|
const engine = String(value || 'auto').trim().toLowerCase();
|
|
67
76
|
if (engine === 'c#' || engine === 'csharp' || engine === 'fast') {
|
|
@@ -819,6 +828,10 @@ async function main() {
|
|
|
819
828
|
printHelp();
|
|
820
829
|
return;
|
|
821
830
|
}
|
|
831
|
+
if (parsed.version) {
|
|
832
|
+
console.log(readPackageVersion());
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
822
835
|
|
|
823
836
|
const prepared = await prepareLoginConnection(parsed);
|
|
824
837
|
const fastRuntime = getFastRuntime();
|