mirror of
https://github.com/arx-research/libhalo.git
synced 2026-05-09 03:00:08 -04:00
27 lines
685 B
JavaScript
27 lines
685 B
JavaScript
/**
|
|
* LibHaLo - Programmatically interact with HaLo tags from the web browser, mobile application or the desktop.
|
|
* Copyright by Arx Research, Inc., a Delaware corporation
|
|
* License: MIT
|
|
*/
|
|
|
|
const {parseArgs} = require('./args_cli.js');
|
|
const {runHalo} = require("./cli");
|
|
const {printVersionInfo, getVersionInfo} = require("./version");
|
|
|
|
let args = parseArgs();
|
|
|
|
if (args && args.name === "cli_version") {
|
|
if (args.output === "json") {
|
|
let versionInfo = getVersionInfo() ?? {};
|
|
console.log(JSON.stringify(versionInfo));
|
|
} else {
|
|
printVersionInfo();
|
|
}
|
|
}
|
|
|
|
if (!args || args.name === "cli_version") {
|
|
process.exit(0);
|
|
}
|
|
|
|
runHalo("cli", args);
|