conductor-remote 1.8.0 → 1.9.0
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/cli.js +15 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
// The one remaining wrinkle is node:sqlite, still flagged experimental in 24.
|
|
9
9
|
// We silence *only* that warning here (instead of re-execing node with
|
|
10
10
|
// --disable-warning) so the entrypoint stays a shebang + import.
|
|
11
|
+
import { readFileSync } from 'node:fs'
|
|
12
|
+
|
|
11
13
|
const emitWarning = process.emitWarning.bind(process)
|
|
12
14
|
process.emitWarning = (warning, ...rest) => {
|
|
13
15
|
const type = typeof rest[0] === 'string' ? rest[0] : rest[0]?.type
|
|
@@ -27,6 +29,13 @@ if (major < REQUIRED_MAJOR) {
|
|
|
27
29
|
|
|
28
30
|
const [cmd, ...rest] = process.argv.slice(2)
|
|
29
31
|
|
|
32
|
+
function version() {
|
|
33
|
+
// Read the installed manifest lazily; semantic-release stamps the real version
|
|
34
|
+
// into it at publish time (the checked-in value is a placeholder).
|
|
35
|
+
const { version } = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'))
|
|
36
|
+
console.info(version)
|
|
37
|
+
}
|
|
38
|
+
|
|
30
39
|
function usage() {
|
|
31
40
|
console.info(
|
|
32
41
|
[
|
|
@@ -36,6 +45,7 @@ function usage() {
|
|
|
36
45
|
' conductor-remote [start] run the relay (default)',
|
|
37
46
|
' conductor-remote service <subcommand> manage the login LaunchAgent',
|
|
38
47
|
' install | uninstall | restart | status',
|
|
48
|
+
' conductor-remote --version print the installed version',
|
|
39
49
|
'',
|
|
40
50
|
'Install flags (each also settable via the env var in [brackets]):',
|
|
41
51
|
' --expose public|tailnet reachability: public Funnel (default) or tailnet-only [EXPOSE]',
|
|
@@ -62,6 +72,11 @@ switch (cmd) {
|
|
|
62
72
|
process.argv = [process.argv[0], process.argv[1], ...rest]
|
|
63
73
|
await import('../scripts/service.ts')
|
|
64
74
|
break
|
|
75
|
+
case '-v':
|
|
76
|
+
case '--version':
|
|
77
|
+
case 'version':
|
|
78
|
+
version()
|
|
79
|
+
break
|
|
65
80
|
case '-h':
|
|
66
81
|
case '--help':
|
|
67
82
|
case 'help':
|
package/package.json
CHANGED