c8ctl-plugin-nano 1.2.0 → 1.3.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
@@ -376,9 +376,23 @@ start/stop/status/logs lifecycle as `nano`.
376
376
  > setting the download URL you were given by the Nano BPM team, or by pointing
377
377
  > the plugin at a binary you already have.
378
378
 
379
+ ### Quick install (closed-alpha invitees)
380
+
381
+ If you were given a ProcessOS download URL, this one-liner installs the Camunda 8
382
+ CLI (`@camunda8/cli`) and this plugin, then configures the download URL:
383
+
384
+ ```bash
385
+ curl -fsSL https://gist.githubusercontent.com/jwulf/9015a7c660b274c568d80e85c3914161/raw/install-processos.sh \
386
+ | bash -s -- "<the download URL you were given>"
387
+ ```
388
+
389
+ (Requires Node.js 18+. The canonical script lives at
390
+ [`install-processos.sh`](./install-processos.sh).) Then run `c8ctl processos start`.
391
+
392
+
379
393
  ```bash
380
- # Closed-alpha channel: the plugin downloads + caches the matching binary
381
- export PROCESSOS_DOWNLOAD_URL=<url you were given>
394
+ # Closed-alpha channel: persist the download URL, then start
395
+ c8ctl processos set download-url <url you were given>
382
396
  c8ctl processos start # fetches processos-<os>-<arch> on first run
383
397
 
384
398
  # …or point the plugin at a binary you already have
@@ -386,8 +400,10 @@ c8ctl processos set bin ~/Downloads/processos
386
400
  c8ctl processos start
387
401
  ```
388
402
 
389
- `PROCESSOS_DOWNLOAD_URL` is the prefix the release binaries live under (e.g. the
390
- `…/processos/latest/` bucket URL). The plugin appends the per-platform asset name
403
+ The download URL is the prefix the release binaries live under (e.g. the
404
+ `…/processos/latest/` bucket URL). Persist it with `c8ctl processos set
405
+ download-url <url>`, or set `PROCESSOS_DOWNLOAD_URL` in your environment (the env
406
+ var wins when both are present). The plugin appends the per-platform asset name
391
407
  (`processos-darwin-arm64`, `processos-linux-x64`, `processos-win32-x64.exe`, …),
392
408
  downloads it to `<stateHome>/bin/`, marks it executable, and runs it. The cached
393
409
  download is reused on subsequent starts.
@@ -407,7 +423,7 @@ c8ctl processos stop
407
423
 
408
424
  ### Automatic update notice
409
425
 
410
- When you're on the closed-alpha channel (`PROCESSOS_DOWNLOAD_URL` set), the
426
+ When you're on the closed-alpha channel (download URL configured), the
411
427
  plugin checks for newer ProcessOS builds in the background and prints a short
412
428
  one-line notice (at most **once per day**) when the published version is newer
413
429
  than the one you're running. It compares your installed binary's version against
@@ -457,6 +473,7 @@ Settings persist under a `processos` key in the same `config.json` as `nano`.
457
473
 
458
474
  ```bash
459
475
  c8ctl processos set bin <path> # path to the downloaded ProcessOS binary
476
+ c8ctl processos set download-url <url> # closed-alpha binary download URL (enables ProcessOS)
460
477
  c8ctl processos set port <n> # listen port (default 8090)
461
478
  c8ctl processos set nano-url <url> # target Nano BPM engine (default http://localhost:8080)
462
479
  c8ctl processos set data-dir <path> # PROCESSOS_DATA_DIR (default <stateHome>/processos-data)
@@ -467,8 +484,9 @@ c8ctl processos config # show current settings and on-disk path
467
484
 
468
485
  The binary is resolved in this order: `--binary` flag → `set bin` →
469
486
  `$PROCESSOS_BINARY` → a cached download under `<stateHome>/bin/` → a local
470
- `processos/target/{release,debug}/processos` build → a fresh download from
471
- `PROCESSOS_DOWNLOAD_URL`. Typed settings (`port`, `nano-url`, `data-dir`) always
487
+ `processos/target/{release,debug}/processos` build → a fresh download from the
488
+ configured download URL (`set download-url` / `$PROCESSOS_DOWNLOAD_URL`). Typed
489
+ settings (`port`, `nano-url`, `data-dir`) always
472
490
  win over generic `env` passthrough values when launching.
473
491
 
474
492
  ## Installing
package/c8ctl-plugin.js CHANGED
@@ -1400,6 +1400,18 @@ function getProcessosNanoUrl() {
1400
1400
  return cfg.nanoUrl || process.env.NANO_BASE_URL || DEFAULT_NANO_URL;
1401
1401
  }
1402
1402
 
1403
+ /**
1404
+ * The closed-alpha download URL: env var (PROCESSOS_DOWNLOAD_URL) wins, then the
1405
+ * persisted `processos set download-url` config value. Null when neither is set.
1406
+ */
1407
+ function getProcessosDownloadUrl() {
1408
+ const fromEnv = process.env.PROCESSOS_DOWNLOAD_URL;
1409
+ if (fromEnv && String(fromEnv).trim()) return String(fromEnv).trim();
1410
+ const cfg = readProcessosConfig();
1411
+ if (cfg.downloadUrl && String(cfg.downloadUrl).trim()) return String(cfg.downloadUrl).trim();
1412
+ return null;
1413
+ }
1414
+
1403
1415
  /** The listen port (flag overrides configured value, which overrides default). */
1404
1416
  function getProcessosPort(req) {
1405
1417
  const cfg = readProcessosConfig();
@@ -1589,7 +1601,7 @@ async function resolveProcessosBinary(req) {
1589
1601
  const configured = findConfiguredProcessosBinary(req); // may throw on a missing configured path
1590
1602
  if (configured) return configured;
1591
1603
 
1592
- const dlUrl = process.env.PROCESSOS_DOWNLOAD_URL;
1604
+ const dlUrl = getProcessosDownloadUrl();
1593
1605
  if (dlUrl) {
1594
1606
  const dest = getProcessosCachedBinaryPath();
1595
1607
  const meta = await fetchProcessosVersionMeta(dlUrl);
@@ -1628,7 +1640,7 @@ async function resolveProcessosBinary(req) {
1628
1640
  * given a PROCESSOS_DOWNLOAD_URL to fetch it from.
1629
1641
  */
1630
1642
  function processosEnabled(req) {
1631
- if (process.env.PROCESSOS_DOWNLOAD_URL) return true;
1643
+ if (getProcessosDownloadUrl()) return true;
1632
1644
  try {
1633
1645
  if (findConfiguredProcessosBinary(req)) return true;
1634
1646
  } catch {
@@ -1645,8 +1657,10 @@ function printProcessosClosedAlpha() {
1645
1657
  'ProcessOS is in closed alpha and is not available yet.\n' +
1646
1658
  '\n' +
1647
1659
  'To enable it, set the download URL you were given by the Nano BPM team:\n' +
1648
- ' export PROCESSOS_DOWNLOAD_URL=<url>\n' +
1649
- ' c8ctl processos start # downloads + runs the matching binary\n' +
1660
+ ' c8ctl processos set download-url <url> # persists it for this machine\n' +
1661
+ ' c8ctl processos start # downloads + runs the matching binary\n' +
1662
+ '\n' +
1663
+ '(or set PROCESSOS_DOWNLOAD_URL in your environment for the same effect)\n' +
1650
1664
  '\n' +
1651
1665
  'or, if you already have the binary, point the plugin at it:\n' +
1652
1666
  ' c8ctl processos set bin <path>',
@@ -1751,7 +1765,7 @@ function printProcessosUpdateNotice(current, latest) {
1751
1765
  function maybeNotifyProcessosUpdate(req) {
1752
1766
  try {
1753
1767
  if (updateNotifierDisabled()) return;
1754
- const dlUrl = process.env.PROCESSOS_DOWNLOAD_URL;
1768
+ const dlUrl = getProcessosDownloadUrl();
1755
1769
  if (!dlUrl) return; // no published channel to compare against
1756
1770
  const current = getInstalledProcessosVersion(req);
1757
1771
  if (!current) return;
@@ -2030,6 +2044,8 @@ const PROCESSOS_SET_FIELDS = {
2030
2044
  port: 'port',
2031
2045
  'nano-url': 'nanoUrl',
2032
2046
  nanourl: 'nanoUrl',
2047
+ 'download-url': 'downloadUrl',
2048
+ downloadurl: 'downloadUrl',
2033
2049
  'data-dir': 'dataDir',
2034
2050
  datadir: 'dataDir',
2035
2051
  env: 'env',
@@ -2039,6 +2055,7 @@ function printProcessosSetUsage() {
2039
2055
  const logger = getLogger();
2040
2056
  logger.info('Usage: c8ctl processos set <field> <value>');
2041
2057
  logger.info(' bin <path> Path to the downloaded ProcessOS binary');
2058
+ logger.info(' download-url <url> Closed-alpha binary download URL (enables ProcessOS)');
2042
2059
  logger.info(' port <n> Listen port (default 8090)');
2043
2060
  logger.info(' nano-url <url> Target Nano BPM engine URL (default http://localhost:8080)');
2044
2061
  logger.info(' data-dir <path> ProcessOS data directory');
@@ -2111,6 +2128,16 @@ function setProcessosConfig(req) {
2111
2128
  }
2112
2129
  cfg.nanoUrl = val;
2113
2130
  logger.info(`Set nano-url = ${val}`);
2131
+ } else if (field === 'downloadUrl') {
2132
+ const val = req.positional[1];
2133
+ if (val === undefined || val === '') {
2134
+ // Allow clearing with an empty value: c8ctl processos set download-url ""
2135
+ delete cfg.downloadUrl;
2136
+ logger.info('Cleared download-url');
2137
+ } else {
2138
+ cfg.downloadUrl = String(val).trim();
2139
+ logger.info(`Set download-url = ${cfg.downloadUrl}`);
2140
+ }
2114
2141
  } else if (field === 'dataDir') {
2115
2142
  const val = req.positional[1];
2116
2143
  if (!val) {
@@ -2144,7 +2171,13 @@ function showProcessosConfig() {
2144
2171
  }
2145
2172
  console.log('');
2146
2173
  console.log(' closed-alpha channel:');
2147
- console.log(` download url ${process.env.PROCESSOS_DOWNLOAD_URL || '(not set — ProcessOS is a closed alpha; set PROCESSOS_DOWNLOAD_URL to enable)'}`);
2174
+ const dlUrl = getProcessosDownloadUrl();
2175
+ const dlSource = process.env.PROCESSOS_DOWNLOAD_URL && String(process.env.PROCESSOS_DOWNLOAD_URL).trim()
2176
+ ? ' (from $PROCESSOS_DOWNLOAD_URL)'
2177
+ : cfg.downloadUrl
2178
+ ? ' (from "processos set download-url")'
2179
+ : '';
2180
+ console.log(` download url ${dlUrl ? dlUrl + dlSource : '(not set — ProcessOS is a closed alpha; "c8ctl processos set download-url <url>" to enable)'}`);
2148
2181
  const cached = getProcessosCachedBinaryPath();
2149
2182
  const meta = readProcessosBinaryMeta();
2150
2183
  console.log(` cached binary ${existsSync(cached) ? cached : '(none — downloaded on first "processos start")'}`);
@@ -2155,7 +2188,7 @@ function showProcessosConfig() {
2155
2188
  console.log(` state file ${getProcessosStateFile()}`);
2156
2189
  console.log(` log file ${getProcessosLogFile()}`);
2157
2190
  console.log('');
2158
- console.log(' Change with: c8ctl processos set bin <path> | set port <n> | set nano-url <url> | set data-dir <path> | set env KEY=VALUE');
2191
+ console.log(' Change with: c8ctl processos set bin <path> | set download-url <url> | set port <n> | set nano-url <url> | set data-dir <path> | set env KEY=VALUE');
2159
2192
  }
2160
2193
 
2161
2194
  function printProcessosUsage() {
@@ -2167,11 +2200,11 @@ function printProcessosUsage() {
2167
2200
  console.log(' c8ctl processos stop');
2168
2201
  console.log(' c8ctl processos restart [...]');
2169
2202
  console.log(' c8ctl processos logs [--follow]');
2170
- console.log(' c8ctl processos set bin <path> | port <n> | nano-url <url> | data-dir <path> | env KEY=VALUE');
2203
+ console.log(' c8ctl processos set bin <path> | download-url <url> | port <n> | nano-url <url> | data-dir <path> | env KEY=VALUE');
2171
2204
  console.log(' c8ctl processos config');
2172
2205
  console.log('');
2173
2206
  console.log('ProcessOS is a closed alpha. Enable it with the download URL you were given:');
2174
- console.log(' export PROCESSOS_DOWNLOAD_URL=<url> # plugin downloads + runs the matching binary');
2207
+ console.log(' c8ctl processos set download-url <url> # plugin downloads + runs the matching binary');
2175
2208
  console.log('or point the plugin at a binary you already have: "c8ctl processos set bin <path>".');
2176
2209
  console.log('By default ProcessOS spawns its own internal pilot Nano engine (the plugin auto-wires the nano');
2177
2210
  console.log('binary into PROCESSOS_NANO_BIN). Use --no-spawn-nano to instead use the --nano-url engine for');
@@ -2236,7 +2269,7 @@ export const metadata = {
2236
2269
  processos: {
2237
2270
  description: 'Manage a local ProcessOS instance — start, status, stop, logs, config',
2238
2271
  examples: [
2239
- { command: 'export PROCESSOS_DOWNLOAD_URL=<url>', description: 'Enable the closed alpha + auto-download the matching binary' },
2272
+ { command: 'c8ctl processos set download-url <url>', description: 'Enable the closed alpha + auto-download the matching binary' },
2240
2273
  { command: 'c8ctl processos set bin <path>', description: 'Point the plugin at a ProcessOS binary you already have' },
2241
2274
  { command: 'c8ctl processos start', description: 'Start ProcessOS against the local Nano BPM engine' },
2242
2275
  { command: 'c8ctl processos start --nano-url http://localhost:8080', description: 'Start against a specific engine' },
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.2",
3
- "commit": "44ad803",
4
- "updated": "2026-06-30T06:04:34Z"
2
+ "version": "0.0.3",
3
+ "commit": "a3511a2",
4
+ "updated": "2026-06-30T20:29:46Z"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c8ctl-plugin-nano",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
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,10 +49,10 @@
49
49
  "semantic-release": "^25.0.3"
50
50
  },
51
51
  "optionalDependencies": {
52
- "@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.2.0",
53
- "@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.2.0",
54
- "@nanobpm/c8ctl-plugin-nano-linux-x64": "1.2.0",
55
- "@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.2.0",
56
- "@nanobpm/c8ctl-plugin-nano-win32-x64": "1.2.0"
52
+ "@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.3.1",
53
+ "@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.3.1",
54
+ "@nanobpm/c8ctl-plugin-nano-linux-x64": "1.3.1",
55
+ "@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.3.1",
56
+ "@nanobpm/c8ctl-plugin-nano-win32-x64": "1.3.1"
57
57
  }
58
58
  }