buddy-tunnel
Advanced tools
Comparing version 1.0.7-dev to 1.0.8-dev
{ | ||
"name": "buddy-tunnel", | ||
"preferGlobal": false, | ||
"version": "1.0.7-dev", | ||
"version": "1.0.8-dev", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -22,2 +22,3 @@ import { Command } from 'commander'; | ||
import waitUntilServiceRunning from '../../service/wait.js'; | ||
import Cfg from '../../cfg.js'; | ||
@@ -35,9 +36,9 @@ const commandServiceEnable = new Command('enable'); | ||
} | ||
let token; | ||
let token = options.token; | ||
let id; | ||
const port = Input.port(options.port); | ||
if (options.id && options.token) { | ||
if (options.id && token) { | ||
id = options.id; | ||
token = options.token; | ||
} else { | ||
if (token) Cfg.setToken(token); | ||
const agent = await ApiAgent.register(true); | ||
@@ -44,0 +45,0 @@ id = agent.id; |
@@ -145,3 +145,3 @@ const ERR_SERVICE_NOT_REGISTERED = 'Service not registered. Exiting...'; | ||
const OPTION_SERVICE_START = 'start service right away'; | ||
const OPTION_SERVICE_TOKEN = 'token to authorize existing agent service'; | ||
const OPTION_SERVICE_TOKEN = 'token to authorize existing agent service or token to add a new agent'; | ||
const OPTION_SERVICE_PORT = 'service api port'; | ||
@@ -148,0 +148,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
261400
5485