asyx 0.9.0 → 0.9.1

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/README.md CHANGED
@@ -130,7 +130,7 @@ Names use 3–30 characters: lowercase letters, digits and hyphens, starting and
130
130
  With `--json`, `asyx setup` prints one JSON object per line on stdout and nothing else:
131
131
 
132
132
  ```text
133
- {"event":"approval_required","url":"https://www.asyx.ai/console/tunnel?...","code":"ABC-123","clientId":"cli_…","expiresInSeconds":600}
133
+ {"event":"approval_required","url":"https://www.asyx.ai/console/devices?...","code":"ABC-123","clientId":"cli_…","expiresInSeconds":600}
134
134
  {"event":"enrolled","clientId":"cli_…","hostname":"orders-api.tunnel.asyx.ai"}
135
135
  ```
136
136
 
@@ -256,6 +256,12 @@ asyx tunnel --minecraft --to <hostname> [--port <n>] [--name <alias>]
256
256
 
257
257
  ---
258
258
 
259
+ ## What's new in 0.9.1
260
+
261
+ **The live line names your public address** — an HTTP tunnel now prints `Tunnel live at https://<your address>` and then `Forwarding to http://localhost:<port>`, instead of only the local address.
262
+
263
+ **Approval opens on the Devices page** — the link `asyx setup` prints now opens asyx.ai/console/devices, where the new computer is approved above your device list. Links printed by older versions still work.
264
+
259
265
  ## What's new in 0.9.0
260
266
 
261
267
  **Pick one of your addresses at setup** — `asyx setup --address <name>` makes one of your account's existing addresses this device's default instead of creating a new one. On a device that is already set up, it changes its default. The approval page also lists your addresses next to "A new address".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asyx",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Asyx tunnel CLI — secure localhost exposure (HTTP, TCP, UDP)",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -7,7 +7,7 @@ import { ensureKeyAndCsr } from '../lib/csr.js';
7
7
  import { loadOrCreateClientId } from '../lib/device.js';
8
8
  import { parseSetupArgs, approvalUrl, checkName, describeAnswer, setupCode, EXIT } from '../lib/naming.js';
9
9
 
10
- const CONSOLE_URL = process.env.ASYX_CONSOLE_URL || 'https://www.asyx.ai/console/tunnel';
10
+ const CONSOLE_URL = process.env.ASYX_CONSOLE_URL || 'https://www.asyx.ai/console/devices'; // Story 4.15 c4: approval opens on the Devices page
11
11
  const STS_URL = process.env.ASYX_STS_URL || 'https://www.asyx.ai/www/sts';
12
12
  // A person has to open the link, maybe sign in, and press Approve (4.7): wait up to 10 minutes.
13
13
  const APPROVAL_DEADLINE_MS = Number(process.env.ASYX_SETUP_TIMEOUT_MS || 10 * 60_000);
@@ -620,7 +620,7 @@ async function httpTunnel(localPort, secGroupSlug) {
620
620
  if (secGroupSlug && assignment.quickpassSlug) {
621
621
  process.stdout.write(`🛡️ QuickPass secured (group=${assignment.quickpassSlug})\n`);
622
622
  }
623
- process.stdout.write(`🌐 Tunnel live at http://localhost:${localPort}\n`);
623
+ process.stdout.write(httpLiveLines(assignment, localPort));
624
624
  // QPA-CLI-12: Lease and relay info only shown with LOG_LEVEL=info or higher
625
625
  const logLevel = (process.env.ASYX_LOG_LEVEL || process.env.LOG_LEVEL || 'warn').toLowerCase();
626
626
  if (logLevel === 'info' || logLevel === 'debug') {
@@ -984,3 +984,11 @@ async function udpTunnel(targetPort, requestedExternalPort = null, targetHost =
984
984
  function sleep(ms) { return new Promise(r => setTimeout(r, ms)); }
985
985
 
986
986
  // Story 11.2: exp claim (seconds) of an assignment token, or null
987
+
988
+ /** Defect 11.47: the HTTP live line names the public address visitors use, then the local port. */
989
+ export function httpLiveLines(assignment, localPort) {
990
+ const publicHost = typeof assignment?.fqdn === 'string' && assignment.fqdn.trim() ? assignment.fqdn.trim() : null;
991
+ return publicHost
992
+ ? `🌐 Tunnel live at https://${publicHost}\n Forwarding to http://localhost:${localPort}\n`
993
+ : `🌐 Tunnel live at http://localhost:${localPort}\n`;
994
+ }