@drsamonline/cli 0.12.19 → 0.12.21

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.js +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drsamonline/cli",
3
- "version": "0.12.19",
3
+ "version": "0.12.21",
4
4
  "description": "The `sui` command line.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/cli.js CHANGED
@@ -247,9 +247,12 @@ async function cmdUp(flags) {
247
247
  const shown = host === '0.0.0.0' ? '127.0.0.1' : host;
248
248
  const combos = Object.keys(config.combos);
249
249
  console.log('');
250
+ // The port the server actually bound, not the one that was asked for: `--port 0`
251
+ // means "any free port", and printing 0 sends the user to a URL that cannot work.
252
+ const bound = server.address()?.port ?? port;
250
253
  console.log(`sui ${VERSION} is up`);
251
- console.log(` endpoint http://${shown}:${port}/v1`);
252
- console.log(` dashboard http://${shown}:${port}/`);
254
+ console.log(` endpoint http://${shown}:${bound}/v1`);
255
+ console.log(` dashboard http://${shown}:${bound}/`);
253
256
  console.log(` config ${config.path ?? '(none)'}`);
254
257
  console.log(` combos ${combos.join(', ')}`);
255
258
  console.log(` paid tier ${config.paidTiers?.enabled ? 'ENABLED — paid credentials will load' : 'closed (paid credentials are never read)'}`);