ultrahope 0.1.1 → 0.1.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/dist/index.js +14 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
// index.ts
|
|
4
|
+
import { createRequire } from "module";
|
|
5
|
+
|
|
3
6
|
// commands/jj.ts
|
|
4
7
|
import { execSync as execSync2, spawnSync } from "child_process";
|
|
5
8
|
|
|
@@ -1977,6 +1980,8 @@ function parseArgs(args2) {
|
|
|
1977
1980
|
}
|
|
1978
1981
|
|
|
1979
1982
|
// index.ts
|
|
1983
|
+
var require2 = createRequire(import.meta.url);
|
|
1984
|
+
var { version } = require2("../package.json");
|
|
1980
1985
|
var [command, ...args] = process.argv.slice(2);
|
|
1981
1986
|
async function main() {
|
|
1982
1987
|
switch (command) {
|
|
@@ -1989,6 +1994,10 @@ async function main() {
|
|
|
1989
1994
|
case "login":
|
|
1990
1995
|
await login(args);
|
|
1991
1996
|
break;
|
|
1997
|
+
case "--version":
|
|
1998
|
+
case "-v":
|
|
1999
|
+
console.log(`ultrahope ${version}`);
|
|
2000
|
+
break;
|
|
1992
2001
|
case "--help":
|
|
1993
2002
|
case "-h":
|
|
1994
2003
|
case void 0:
|
|
@@ -2000,7 +2009,9 @@ async function main() {
|
|
|
2000
2009
|
}
|
|
2001
2010
|
}
|
|
2002
2011
|
function printHelp2() {
|
|
2003
|
-
console.log(`
|
|
2012
|
+
console.log(`ultrahope ${version}
|
|
2013
|
+
|
|
2014
|
+
Usage: ultrahope <command>
|
|
2004
2015
|
|
|
2005
2016
|
Commands:
|
|
2006
2017
|
translate Translate input to various formats
|
|
@@ -2008,7 +2019,8 @@ Commands:
|
|
|
2008
2019
|
login Authenticate with device flow
|
|
2009
2020
|
|
|
2010
2021
|
Options:
|
|
2011
|
-
--
|
|
2022
|
+
--version, -v Show version
|
|
2023
|
+
--help, -h Show this help message`);
|
|
2012
2024
|
}
|
|
2013
2025
|
main().catch((err) => {
|
|
2014
2026
|
console.error(err);
|