c8ctl-plugin-nano 1.16.0 → 1.17.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.
Files changed (2) hide show
  1. package/c8ctl-plugin.js +42 -5
  2. package/package.json +8 -8
package/c8ctl-plugin.js CHANGED
@@ -461,6 +461,19 @@ function webConsoleUrl(baseUrl) {
461
461
  return `${baseUrl}/console`;
462
462
  }
463
463
 
464
+ /**
465
+ * Human label for the console link, keyed on the runtime console profile.
466
+ * The default `studio` profile IS the full web IDE, so name it as such — users
467
+ * kept missing that Nano ships a browser IDE when it was labelled "Web console".
468
+ * `observe` is the read-only console. `off` serves no console, so the label is
469
+ * meaningless there; callers must guard `profile !== 'off'` before rendering it,
470
+ * and this helper returns null for `off` to enforce that contract.
471
+ */
472
+ function consoleLinkLabel(profile) {
473
+ if (profile === 'off') return null;
474
+ return profile === 'studio' ? 'Web IDE (Studio)' : `Web console (${profile})`;
475
+ }
476
+
464
477
  /** Probe a node's always-on GET /v2/topology endpoint for reachability. */
465
478
  async function probeHealthy(url) {
466
479
  const controller = new AbortController();
@@ -788,6 +801,7 @@ async function startCluster(req) {
788
801
  inMemory,
789
802
  historyMax: historyMax ?? null,
790
803
  basePort,
804
+ consoleProfile,
791
805
  nodes,
792
806
  };
793
807
  writeState(state);
@@ -834,15 +848,22 @@ async function printSummary(state) {
834
848
  // The landing page (and the /docs user guide + /console) only exist in builds
835
849
  // compiled with the web console; probe so we advertise the right entry point.
836
850
  const hasConsole = await probePath(entry.url, '/');
837
- if (hasConsole) {
838
- console.log(` Start here ${entry.url}/ (landing: console, user guide & API docs)`);
851
+ const profile = state.consoleProfile ?? 'studio';
852
+ // Lead with the web IDE it is Nano's headline surface and the thing users
853
+ // most often did not realise was there. Only advertise it when this build
854
+ // actually serves a console and the profile is not 'off'.
855
+ if (hasConsole && profile !== 'off') {
856
+ console.log(` ${consoleLinkLabel(profile)} ${webConsoleUrl(entry.url)}`);
857
+ const surface = profile === 'studio' ? 'the Nano web IDE' : 'the Nano web console';
858
+ console.log(` ^ open this in your browser: ${surface}`);
859
+ console.log('');
839
860
  }
840
- console.log(` REST API ${entry.url}/v2`);
841
- console.log(` Topology ${entry.url}/v2/topology`);
842
861
  if (hasConsole) {
843
- console.log(` Web console ${webConsoleUrl(entry.url)}`);
862
+ console.log(` Landing ${entry.url}/ (console, user guide & API docs)`);
844
863
  console.log(` User guide ${entry.url}/docs`);
845
864
  }
865
+ console.log(` REST API ${entry.url}/v2`);
866
+ console.log(` Topology ${entry.url}/v2/topology`);
846
867
  if (state.workspaceDir) {
847
868
  console.log(` Workspace ${state.workspaceDir} (models/, workers/)`);
848
869
  }
@@ -1052,6 +1073,21 @@ async function statusCluster(req) {
1052
1073
  }
1053
1074
  console.log('');
1054
1075
 
1076
+ // Surface the web IDE again here so it stays discoverable long after the
1077
+ // initial `start` scrolled off — probe a healthy node so we only advertise a
1078
+ // console that is actually served (API-only builds 404 `/`).
1079
+ const profile = state.consoleProfile ?? 'studio';
1080
+ if (overall !== 'stopped' && profile !== 'off') {
1081
+ // Only probe a HEALTHY node: it already answered /v2/topology this run, so
1082
+ // GET / returns fast. Falling back to a merely-alive (unreachable) node
1083
+ // would add a full probe timeout to every `nano status` in a degraded state.
1084
+ const consoleNode = checks.find((c) => c.healthy);
1085
+ if (consoleNode && (await probePath(consoleNode.url, '/'))) {
1086
+ console.log(` ${consoleLinkLabel(profile)} ${webConsoleUrl(consoleNode.url)}`);
1087
+ console.log('');
1088
+ }
1089
+ }
1090
+
1055
1091
  // Enrich with the live topology when reachable — the authoritative view of
1056
1092
  // partition leadership across the cluster.
1057
1093
  if (topo) {
@@ -4217,6 +4253,7 @@ export { resolveBinary, findBinary, launcherEnvMarkers };
4217
4253
  export { buildNpmInvocation };
4218
4254
  export {
4219
4255
  webConsoleUrl,
4256
+ consoleLinkLabel,
4220
4257
  hireWorker,
4221
4258
  };
4222
4259
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c8ctl-plugin-nano",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "type": "module",
5
5
  "description": "c8ctl plugin to start, inspect, and stop a local Nano BPM (nanobpmn) cluster",
6
6
  "main": "c8ctl-plugin.js",
@@ -49,12 +49,12 @@
49
49
  "semantic-release": "^25.0.3"
50
50
  },
51
51
  "optionalDependencies": {
52
- "@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.16.0",
53
- "@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.16.0",
54
- "@nanobpm/c8ctl-plugin-nano-linux-x64": "1.16.0",
55
- "@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.16.0",
56
- "@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.16.0",
57
- "@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.16.0",
58
- "@nanobpm/c8ctl-plugin-nano-win32-x64": "1.16.0"
52
+ "@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.17.0",
53
+ "@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.17.0",
54
+ "@nanobpm/c8ctl-plugin-nano-linux-x64": "1.17.0",
55
+ "@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.17.0",
56
+ "@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.17.0",
57
+ "@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.17.0",
58
+ "@nanobpm/c8ctl-plugin-nano-win32-x64": "1.17.0"
59
59
  }
60
60
  }