c8ctl-plugin-nano 1.13.0 → 1.13.2

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
@@ -79,12 +79,13 @@ c8ctl nano status
79
79
  # Inspect a cluster c8ctl did NOT start (queries /v2/topology on the given port)
80
80
  c8ctl nano status --port 8080
81
81
 
82
- # Tail a node's log (-f / --follow to stream)
83
- c8ctl nano logs 1 --follow
82
+ # Tail a node's log (-f / --follow to stream). Node ids are 0-indexed,
83
+ # so a single-node cluster is node 0.
84
+ c8ctl nano logs 0 --follow
84
85
 
85
86
  # Simulate a node failing (freeze it) and recovering (resume it)
86
- c8ctl nano pause 1
87
- c8ctl nano resume 1
87
+ c8ctl nano pause 0
88
+ c8ctl nano resume 0
88
89
 
89
90
  # Stop the cluster (engine data is retained)
90
91
  c8ctl nano stop
package/c8ctl-plugin.js CHANGED
@@ -1119,6 +1119,20 @@ function logsCluster(req) {
1119
1119
 
1120
1120
  function controlNode(req, { signal, verb, paused }) {
1121
1121
  const logger = getLogger();
1122
+
1123
+ // pause/resume rely on SIGSTOP/SIGCONT, which are POSIX-only. On Windows
1124
+ // Node throws "Unknown signal: SIGSTOP" from process.kill, so fail fast with
1125
+ // a clear message instead of a raw crash (see nano-bpm#390).
1126
+ if (process.platform === 'win32') {
1127
+ logger.error(
1128
+ `"c8ctl nano ${verb}" isn't supported on Windows yet — it relies on ` +
1129
+ `SIGSTOP/SIGCONT, which Windows doesn't have. To simulate a node ` +
1130
+ `failing and recovering, use "c8ctl nano stop <id>" then ` +
1131
+ `"c8ctl nano start" instead.`,
1132
+ );
1133
+ process.exit(1);
1134
+ }
1135
+
1122
1136
  const state = readState();
1123
1137
 
1124
1138
  if (!state || !Array.isArray(state.nodes) || state.nodes.length === 0) {
@@ -1127,16 +1141,17 @@ function controlNode(req, { signal, verb, paused }) {
1127
1141
  }
1128
1142
 
1129
1143
  const nodeIds = state.nodes.map((n) => n.id).join(', ');
1144
+ const exampleId = state.nodes[0].id;
1130
1145
  const idArg = req.positional[0];
1131
1146
  if (idArg === undefined) {
1132
- logger.error(`Specify a node id, e.g. "c8ctl nano ${verb} 1". Nodes: ${nodeIds}`);
1147
+ logger.error(`Specify a node id, e.g. "c8ctl nano ${verb} ${exampleId}". Running nodes: [${nodeIds}]`);
1133
1148
  process.exit(1);
1134
1149
  }
1135
1150
 
1136
1151
  const id = Number.parseInt(idArg, 10);
1137
1152
  const node = Number.isFinite(id) ? state.nodes.find((n) => n.id === id) : undefined;
1138
1153
  if (!node) {
1139
- logger.error(`No node "${idArg}" in the running cluster. Nodes: ${nodeIds}`);
1154
+ logger.error(`No node "${idArg}" in the running cluster. Running nodes: [${nodeIds}]`);
1140
1155
  process.exit(1);
1141
1156
  }
1142
1157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c8ctl-plugin-nano",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
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.13.0",
53
- "@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.13.0",
54
- "@nanobpm/c8ctl-plugin-nano-linux-x64": "1.13.0",
55
- "@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.13.0",
56
- "@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.13.0",
57
- "@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.13.0",
58
- "@nanobpm/c8ctl-plugin-nano-win32-x64": "1.13.0"
52
+ "@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.13.2",
53
+ "@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.13.2",
54
+ "@nanobpm/c8ctl-plugin-nano-linux-x64": "1.13.2",
55
+ "@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.13.2",
56
+ "@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.13.2",
57
+ "@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.13.2",
58
+ "@nanobpm/c8ctl-plugin-nano-win32-x64": "1.13.2"
59
59
  }
60
60
  }