asyx 0.10.0 → 0.11.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/AGENTS.md +42 -0
- package/bin/asyx.js +1 -1
- package/package.json +6 -3
- package/src/commands/account.js +80 -71
- package/src/commands/app.js +317 -151
- package/src/commands/in-use-messages.js +47 -48
- package/src/commands/mqtt-broker.js +36 -49
- package/src/commands/mqtt.js +111 -149
- package/src/commands/name.js +24 -22
- package/src/commands/reject-messages.js +123 -123
- package/src/commands/setup.js +107 -131
- package/src/commands/sts.js +45 -61
- package/src/commands/tunnel.js +853 -931
- package/src/commands/validate-target-host.js +36 -59
- package/src/lib/aws-iot-config.js +30 -0
- package/src/lib/certs.js +15 -18
- package/src/lib/csr.js +107 -182
- package/src/lib/device.js +26 -37
- package/src/lib/ids.js +1 -2
- package/src/lib/naming.js +74 -68
- package/src/lib/pairing.js +10 -11
- package/src/lib/shared-transport.js +5 -9
- package/src/main.js +63 -53
- package/vendor/tunnel-core/dist/control-plane/MqttControlPlaneClient.js +25 -287
- package/vendor/tunnel-core/dist/control-plane/MqttControlPlaneTransport.js +0 -72
- package/vendor/tunnel-core/dist/control-plane/session.js +0 -20
- package/vendor/tunnel-core/dist/errors.js +0 -19
- package/vendor/tunnel-core/dist/flows/account.js +1 -6
- package/vendor/tunnel-core/dist/flows/goodbye.js +0 -4
- package/vendor/tunnel-core/dist/flows/http.js +24 -112
- package/vendor/tunnel-core/dist/flows/identity.js +11 -10
- package/vendor/tunnel-core/dist/flows/in-use.js +0 -6
- package/vendor/tunnel-core/dist/flows/reopen.js +0 -4
- package/vendor/tunnel-core/dist/flows/tcp.js +18 -84
- package/vendor/tunnel-core/dist/flows/udp.js +15 -52
- package/vendor/tunnel-core/dist/lib/fingerprint.js +38 -42
- package/vendor/tunnel-core/dist/lib/jwt-verifier.js +14 -67
- package/vendor/tunnel-core/dist/lib/logger.js +1 -9
- package/vendor/tunnel-core/dist/lib/refresh-helpers.js +1 -22
- package/vendor/tunnel-core/dist/lifecycle.js +1 -8
- package/vendor/tunnel-core/dist/mqtt/awaiter-map.js +1 -53
- package/vendor/tunnel-core/dist/mqtt/events/handlers.js +10 -64
- package/vendor/tunnel-core/dist/mqtt/events/index.js +3 -36
- package/vendor/tunnel-core/dist/mqtt/events/schemas.js +0 -1
- package/vendor/tunnel-core/dist/mqtt/ingress.js +0 -60
- package/vendor/tunnel-core/dist/state/assignment.js +6 -122
- package/vendor/tunnel-core/dist/state/instance-registry.js +0 -63
- package/vendor/tunnel-core/dist/tcp-v1/framing.js +2 -64
- package/vendor/tunnel-core/dist/tunnel/http-tunnel.js +64 -331
- package/vendor/tunnel-core/dist/tunnel/httpws-constants.js +5 -14
- package/vendor/tunnel-core/dist/tunnel/reconnect.js +10 -50
- package/vendor/tunnel-core/dist/tunnel/request-sink.js +0 -16
- package/vendor/tunnel-core/dist/tunnel/tcp-tunnel.js +32 -195
- package/vendor/tunnel-core/dist/tunnel/udp-tunnel.js +28 -153
- package/vendor/tunnel-core/dist/tunnel/ws-control.js +4 -39
- package/vendor/tunnel-core/dist/types.js +0 -2
- package/vendor/tunnel-core/dist/udp-v1/framing.js +2 -64
- package/vendor/tunnel-core/package.json +0 -25
- package/vendor/tunnel-core/dist/control-plane/MqttControlPlaneClient.d.ts +0 -273
- package/vendor/tunnel-core/dist/control-plane/MqttControlPlaneTransport.d.ts +0 -79
- package/vendor/tunnel-core/dist/control-plane/session.d.ts +0 -55
- package/vendor/tunnel-core/dist/errors.d.ts +0 -49
- package/vendor/tunnel-core/dist/flows/account.d.ts +0 -24
- package/vendor/tunnel-core/dist/flows/goodbye.d.ts +0 -10
- package/vendor/tunnel-core/dist/flows/http.d.ts +0 -61
- package/vendor/tunnel-core/dist/flows/identity.d.ts +0 -23
- package/vendor/tunnel-core/dist/flows/in-use.d.ts +0 -27
- package/vendor/tunnel-core/dist/flows/reopen.d.ts +0 -9
- package/vendor/tunnel-core/dist/flows/tcp.d.ts +0 -85
- package/vendor/tunnel-core/dist/flows/udp.d.ts +0 -52
- package/vendor/tunnel-core/dist/lib/adapt-logger.d.ts +0 -2
- package/vendor/tunnel-core/dist/lib/fingerprint.d.ts +0 -145
- package/vendor/tunnel-core/dist/lib/jwt-verifier.d.ts +0 -27
- package/vendor/tunnel-core/dist/lib/logger.d.ts +0 -9
- package/vendor/tunnel-core/dist/lib/refresh-helpers.d.ts +0 -16
- package/vendor/tunnel-core/dist/lifecycle.d.ts +0 -24
- package/vendor/tunnel-core/dist/mqtt/awaiter-map.d.ts +0 -56
- package/vendor/tunnel-core/dist/mqtt/events/handlers.d.ts +0 -60
- package/vendor/tunnel-core/dist/mqtt/events/index.d.ts +0 -1
- package/vendor/tunnel-core/dist/mqtt/events/schemas.d.ts +0 -498
- package/vendor/tunnel-core/dist/mqtt/ingress.d.ts +0 -63
- package/vendor/tunnel-core/dist/state/assignment.d.ts +0 -136
- package/vendor/tunnel-core/dist/state/instance-registry.d.ts +0 -88
- package/vendor/tunnel-core/dist/tcp-v1/framing.d.ts +0 -43
- package/vendor/tunnel-core/dist/tunnel/http-tunnel.d.ts +0 -140
- package/vendor/tunnel-core/dist/tunnel/httpws-constants.d.ts +0 -13
- package/vendor/tunnel-core/dist/tunnel/reconnect.d.ts +0 -76
- package/vendor/tunnel-core/dist/tunnel/request-sink.d.ts +0 -40
- package/vendor/tunnel-core/dist/tunnel/tcp-tunnel.d.ts +0 -92
- package/vendor/tunnel-core/dist/tunnel/udp-tunnel.d.ts +0 -93
- package/vendor/tunnel-core/dist/tunnel/ws-control.d.ts +0 -22
- package/vendor/tunnel-core/dist/types.d.ts +0 -24
- package/vendor/tunnel-core/dist/udp-v1/framing.d.ts +0 -41
package/src/lib/naming.js
CHANGED
|
@@ -1,89 +1,95 @@
|
|
|
1
|
-
// Story 2.1 r3: hostname choice for `asyx setup` and `asyx name check`.
|
|
2
|
-
// The server decides (GET /www/names/check, POST /www/sts/authorize); these checks only give an early,
|
|
3
|
-
// clear answer in the terminal. The terminal never prompts (4.7 c5).
|
|
4
1
|
import os from 'node:os';
|
|
5
2
|
import { createHash } from 'node:crypto';
|
|
6
|
-
|
|
7
3
|
export const ZONE = 'tunnel.asyx.ai';
|
|
8
|
-
export const LABEL_RE = /^[a-z0-9](?:[a-z0-9-]{1,28}[a-z0-9])$/;
|
|
4
|
+
export const LABEL_RE = /^[a-z0-9](?:[a-z0-9-]{1,28}[a-z0-9])$/;
|
|
9
5
|
export const NAMES_URL = process.env.ASYX_NAMES_URL || 'https://www.asyx.ai/www/names/check';
|
|
10
|
-
|
|
11
|
-
// Exit codes (documented in webui/content/docs/ai-agent-checklist.mdx)
|
|
12
6
|
export const EXIT = { OK: 0, FAILED: 1, USAGE: 2, NAME_UNAVAILABLE: 3 };
|
|
13
|
-
|
|
14
|
-
/** "Orders-API.tunnel.asyx.ai" -> "orders-api"; returns the label or null when it is not valid. */
|
|
15
7
|
export function normalizeLabel(input) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
let l = String(input || '').trim().toLowerCase();
|
|
9
|
+
if (l.endsWith(`.${ZONE}`))
|
|
10
|
+
l = l.slice(0, -(ZONE.length + 1));
|
|
11
|
+
return LABEL_RE.test(l) ? l : null;
|
|
19
12
|
}
|
|
20
|
-
|
|
21
|
-
/** Parses `asyx setup` options. Returns { hostname, random, json } or { error }. */
|
|
22
13
|
export function parseSetupArgs(argv) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
14
|
+
const out = { hostname: null, random: false, json: false, address: null };
|
|
15
|
+
for (let i = 0; i < argv.length; i++) {
|
|
16
|
+
const a = argv[i];
|
|
17
|
+
if (a === 'setup')
|
|
18
|
+
continue;
|
|
19
|
+
if (a === '--json')
|
|
20
|
+
out.json = true;
|
|
21
|
+
else if (a === '--random')
|
|
22
|
+
out.random = true;
|
|
23
|
+
else if (a === '--hostname' || a.startsWith('--hostname=')) {
|
|
24
|
+
const v = a.includes('=') ? a.slice(a.indexOf('=') + 1) : argv[++i];
|
|
25
|
+
if (!v)
|
|
26
|
+
return { error: '--hostname needs a name, for example --hostname orders-api' };
|
|
27
|
+
const label = normalizeLabel(v);
|
|
28
|
+
if (!label)
|
|
29
|
+
return { error: `"${v}" is not a valid name: use 3-30 characters a-z, 0-9 and hyphens, starting and ending with a letter or digit` };
|
|
30
|
+
out.hostname = label;
|
|
31
|
+
}
|
|
32
|
+
else if (a === '--address' || a.startsWith('--address=')) {
|
|
33
|
+
const v = a.includes('=') ? a.slice(a.indexOf('=') + 1) : argv[++i];
|
|
34
|
+
if (!v)
|
|
35
|
+
return { error: '--address needs one of your addresses, for example --address orders-api' };
|
|
36
|
+
const label = normalizeLabel(v);
|
|
37
|
+
if (!label)
|
|
38
|
+
return { error: `"${v}" is not a valid address name` };
|
|
39
|
+
out.address = label;
|
|
40
|
+
}
|
|
41
|
+
else
|
|
42
|
+
return { error: `unknown option ${a}` };
|
|
43
|
+
}
|
|
44
|
+
if ([out.hostname, out.random, out.address].filter(Boolean).length > 1)
|
|
45
|
+
return { error: 'use one of --hostname, --random or --address' };
|
|
46
|
+
return out;
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
/** The approval link. v=2 tells the page this CLI supports device naming (2.1 r3). */
|
|
49
48
|
export function approvalUrl(base, { clientId, ticket, hostname, random, address, machine = os.hostname() }) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
const q = new URLSearchParams({ clientId, ticket, v: '2' });
|
|
50
|
+
if (machine)
|
|
51
|
+
q.set('machine', String(machine).slice(0, 64));
|
|
52
|
+
if (hostname)
|
|
53
|
+
q.set('hostname', hostname);
|
|
54
|
+
if (random)
|
|
55
|
+
q.set('random', '1');
|
|
56
|
+
if (address)
|
|
57
|
+
q.set('address', address);
|
|
58
|
+
return `${base}?${q.toString()}`;
|
|
56
59
|
}
|
|
57
|
-
|
|
58
|
-
/** Asks the server whether <label>.tunnel.asyx.ai can be claimed. Throws on network/service errors. */
|
|
59
60
|
export async function checkName(label, { fetchImpl = fetch, url = NAMES_URL } = {}) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
const res = await fetchImpl(`${url}?label=${encodeURIComponent(label)}`, { headers: { accept: 'application/json' } });
|
|
62
|
+
if (res.status === 429) {
|
|
63
|
+
const e = new Error('too many name checks, try again in a minute');
|
|
64
|
+
e.code = 'rate_limited';
|
|
65
|
+
throw e;
|
|
66
|
+
}
|
|
67
|
+
if (!res.ok) {
|
|
68
|
+
const e = new Error(`name check failed (HTTP ${res.status})`);
|
|
69
|
+
e.code = 'service_error';
|
|
70
|
+
throw e;
|
|
71
|
+
}
|
|
72
|
+
return res.json();
|
|
64
73
|
}
|
|
65
|
-
|
|
66
74
|
const REASONS = {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
hostname_taken: 'is taken',
|
|
76
|
+
hostname_reserved: 'is reserved',
|
|
77
|
+
hostname_cooling_down: 'was released recently and is not available yet',
|
|
78
|
+
hostname_invalid: 'is not a valid name',
|
|
71
79
|
};
|
|
72
80
|
export function describeAnswer(a) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
if (a.status === 'available')
|
|
82
|
+
return `${a.hostname} is available`;
|
|
83
|
+
const name = a.hostname || a.label;
|
|
84
|
+
const s = a.suggestions?.length ? ` Try: ${a.suggestions.join(', ')}` : '';
|
|
85
|
+
return `${name} ${REASONS[a.status] || 'is not available'}.${s}`;
|
|
77
86
|
}
|
|
78
|
-
|
|
79
|
-
/** Defect 11.25 / Story 4.7 c6: the short code the terminal shows and the approval page asks for.
|
|
80
|
-
* Derived from the setup ticket, so the CLI and the server agree without storing anything; it is never
|
|
81
|
-
* put in the approval link. Alphabet without look-alikes (no I, L, O, U, 0, 1). */
|
|
82
87
|
export const SETUP_CODE_ALPHABET = "ABCDEFGHJKMNPQRSTVWXYZ23456789";
|
|
83
88
|
export function setupCode(ticket) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
const h = createHash("sha256").update(`asyx-setup-code|${ticket}`).digest();
|
|
90
|
+
let s = "";
|
|
91
|
+
for (let i = 0; i < 6; i++)
|
|
92
|
+
s += SETUP_CODE_ALPHABET[h[i] % SETUP_CODE_ALPHABET.length];
|
|
93
|
+
return `${s.slice(0, 3)}-${s.slice(3)}`;
|
|
88
94
|
}
|
|
89
95
|
export const normalizeCode = (c) => String(c || "").toUpperCase().replace(/[^A-Z0-9]/g, "");
|
package/src/lib/pairing.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import open from "open";
|
|
2
2
|
import chalk from "chalk";
|
|
3
|
-
|
|
4
3
|
export async function startPairing(deviceCode) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
const claimUrl = `https://www.asyx.ai/console/tunnel?code=${encodeURIComponent(deviceCode)}`;
|
|
5
|
+
console.log(chalk.gray(`Preparing browser for pairing...`));
|
|
6
|
+
try {
|
|
7
|
+
await open(claimUrl);
|
|
8
|
+
console.log(chalk.green("✅ Opening your default browser to complete pairing..."));
|
|
9
|
+
}
|
|
10
|
+
catch (err) {
|
|
11
|
+
console.log(chalk.yellow("⚠️ Could not open your browser automatically."));
|
|
12
|
+
console.log(`Please visit:\n${chalk.cyan(claimUrl)}`);
|
|
13
|
+
}
|
|
15
14
|
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { MemoryTransport } from "@asyx/mqtt-client";
|
|
2
|
-
|
|
3
|
-
// Simple singleton pattern for shared transport in dev mode
|
|
4
2
|
let sharedTransport = null;
|
|
5
|
-
|
|
6
3
|
export function getSharedTransport() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
if (!sharedTransport) {
|
|
5
|
+
sharedTransport = new MemoryTransport();
|
|
6
|
+
}
|
|
7
|
+
return sharedTransport;
|
|
11
8
|
}
|
|
12
|
-
|
|
13
9
|
export function resetSharedTransport() {
|
|
14
|
-
|
|
10
|
+
sharedTransport = null;
|
|
15
11
|
}
|
package/src/main.js
CHANGED
|
@@ -2,30 +2,24 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import cmdSetup from "./commands/setup.js";
|
|
4
4
|
import cmdSts from "./commands/sts.js";
|
|
5
|
-
|
|
6
5
|
const require = createRequire(import.meta.url);
|
|
7
6
|
const pkg = require("../package.json");
|
|
8
|
-
|
|
9
7
|
export const CLI_VERSION = pkg.version;
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
if (!process.env.ASYX_CLIENT_VERSION)
|
|
9
|
+
process.env.ASYX_CLIENT_VERSION = `asyx-cli@${CLI_VERSION}`;
|
|
12
10
|
export const CLI_DESCRIPTION = pkg.description;
|
|
13
|
-
|
|
14
|
-
// Unified error handling
|
|
15
11
|
process.on('unhandledRejection', (err) => {
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
console.error('Unexpected error:', err?.message ?? err);
|
|
13
|
+
process.exit(1);
|
|
18
14
|
});
|
|
19
|
-
|
|
20
15
|
const handleFailure = (label) => (err) => {
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
console.error(`${label} failed:`, err?.message ?? err);
|
|
17
|
+
process.exit(1);
|
|
23
18
|
};
|
|
24
|
-
|
|
25
19
|
async function run() {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
const cmd = process.argv[2];
|
|
21
|
+
if (!cmd || cmd === "help" || cmd === "--help" || cmd === "-h") {
|
|
22
|
+
console.log(`asyx ${CLI_VERSION}
|
|
29
23
|
|
|
30
24
|
Usage: asyx <command>
|
|
31
25
|
|
|
@@ -52,48 +46,64 @@ Usage: asyx <command>
|
|
|
52
46
|
asyx tunnel --udp --port 27015 --to orders-api.tunnel.asyx.ai
|
|
53
47
|
asyx app create orders-api (--hostname <label>, --random or --address <existing>)
|
|
54
48
|
asyx tunnel --http --port 3000 --app orders-api
|
|
49
|
+
asyx app list (each app's state: active, revoked or deleted)
|
|
50
|
+
asyx app forget orders-api (remove this computer's copy of its credentials)
|
|
55
51
|
|
|
56
52
|
Options for each tunnel type: asyx tunnel --help
|
|
57
53
|
Documentation: https://www.asyx.ai/docs
|
|
58
54
|
`);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
55
|
+
process.exit(0);
|
|
56
|
+
}
|
|
57
|
+
if (cmd === "--version" || cmd === "-v") {
|
|
58
|
+
console.log(`asyx ${CLI_VERSION}`);
|
|
59
|
+
process.exit(0);
|
|
60
|
+
}
|
|
61
|
+
if (cmd === "setup") {
|
|
62
|
+
cmdSetup(process.argv.slice(2)).catch(handleFailure('Setup'));
|
|
63
|
+
}
|
|
64
|
+
else if (cmd === "name") {
|
|
65
|
+
const { default: cmdName } = await import("./commands/name.js");
|
|
66
|
+
cmdName(process.argv.slice(3)).then((code) => process.exit(code), handleFailure('Name'));
|
|
67
|
+
}
|
|
68
|
+
else if (cmd === "port") {
|
|
69
|
+
const { cmdPort } = await import("./commands/account.js");
|
|
70
|
+
cmdPort(process.argv.slice(3)).then((code) => process.exit(code), handleFailure('Port release'));
|
|
71
|
+
}
|
|
72
|
+
else if (cmd === "sts") {
|
|
73
|
+
cmdSts(process.argv.slice(2)).catch(handleFailure('STS'));
|
|
74
|
+
}
|
|
75
|
+
else if (cmd === "mqtt") {
|
|
76
|
+
const { default: mqttCommand } = await import("./commands/mqtt.js");
|
|
77
|
+
mqttCommand().catch(handleFailure('MQTT'));
|
|
78
|
+
}
|
|
79
|
+
else if (cmd === "app") {
|
|
80
|
+
const { default: cmdApp } = await import("./commands/app.js");
|
|
81
|
+
cmdApp(process.argv.slice(3)).then((code) => process.exit(code), handleFailure('App'));
|
|
82
|
+
}
|
|
83
|
+
else if (cmd === "tunnel") {
|
|
84
|
+
let args = process.argv.slice(3);
|
|
85
|
+
const at = args.indexOf("--app");
|
|
86
|
+
if (at !== -1) {
|
|
87
|
+
const { appIdForTunnel, appRefusalForTunnel, reconcileApps } = await import("./commands/app.js");
|
|
88
|
+
const name = args[at + 1];
|
|
89
|
+
const rec = appIdForTunnel(name) ? null : await reconcileApps({ out: console.error });
|
|
90
|
+
const appId = appIdForTunnel(name);
|
|
91
|
+
if (!appId) {
|
|
92
|
+
const gone = rec?.removed?.includes(String(name || '').trim().toLowerCase());
|
|
93
|
+
if (!gone)
|
|
94
|
+
console.error(appRefusalForTunnel(name));
|
|
95
|
+
process.exit(gone || /revoked/.test(appRefusalForTunnel(name) || '') ? 1 : 2);
|
|
96
|
+
}
|
|
97
|
+
process.env.ASYX_CLIENT_ID = appId;
|
|
98
|
+
process.env.ASYX_APP_ID = appId;
|
|
99
|
+
args = [...args.slice(0, at), ...args.slice(at + 2)];
|
|
100
|
+
}
|
|
101
|
+
const { default: tunnelCommand } = await import("./commands/tunnel.js");
|
|
102
|
+
tunnelCommand(args).catch(handleFailure('Tunnel'));
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
console.log(`Unknown command: ${cmd}\nRun "asyx help" for the list of commands.`);
|
|
106
|
+
process.exit(1);
|
|
90
107
|
}
|
|
91
|
-
const { default: tunnelCommand } = await import("./commands/tunnel.js");
|
|
92
|
-
tunnelCommand(args).catch(handleFailure('Tunnel'));
|
|
93
|
-
} else {
|
|
94
|
-
console.log(`Unknown command: ${cmd}\nRun "asyx help" for the list of commands.`);
|
|
95
|
-
process.exit(1);
|
|
96
|
-
}
|
|
97
108
|
}
|
|
98
|
-
|
|
99
109
|
run();
|