@hraza01/skyhook 1.1.0 → 1.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/package.json +1 -1
- package/src/cli.js +11 -1
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
+
import fs from "fs"
|
|
2
|
+
import path from "path"
|
|
3
|
+
import { fileURLToPath } from "url"
|
|
1
4
|
import chalk from "chalk"
|
|
2
5
|
import { intro } from "@clack/prompts"
|
|
3
6
|
import ora from "ora"
|
|
4
7
|
import terminalLink from "terminal-link"
|
|
5
8
|
import figlet from "figlet"
|
|
6
9
|
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
11
|
+
const __dirname = path.dirname(__filename)
|
|
12
|
+
const packageJson = JSON.parse(
|
|
13
|
+
fs.readFileSync(path.join(__dirname, "../package.json"), "utf-8"),
|
|
14
|
+
)
|
|
15
|
+
const { version } = packageJson
|
|
16
|
+
|
|
7
17
|
/**
|
|
8
18
|
* Display version information
|
|
9
19
|
*/
|
|
10
20
|
export function showVersionInfo() {
|
|
11
|
-
console.log(
|
|
21
|
+
console.log(`skyhook v${version}`)
|
|
12
22
|
process.exit(0)
|
|
13
23
|
}
|
|
14
24
|
|