@rhizogrip/spore-cli 1.49.4 → 1.50.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/package.json +2 -2
  2. package/src/dispatch.js +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhizogrip/spore-cli",
3
- "version": "1.49.4",
3
+ "version": "1.50.0",
4
4
  "author": {
5
5
  "name": "Christophe Le Bars",
6
6
  "email": "clb@toort.net"
@@ -54,7 +54,7 @@
54
54
  "minimist": "^1.2.8"
55
55
  },
56
56
  "optionalDependencies": {
57
- "@rhizogrip/spore": "1.49.4"
57
+ "@rhizogrip/spore": "1.50.0"
58
58
  },
59
59
  "license": "Apache-2.0"
60
60
  }
package/src/dispatch.js CHANGED
@@ -165,7 +165,7 @@ function renderShow (result) {
165
165
  line('delivered', shown.join('\n' + ' '.repeat(13)) + (rest ? `\n${' '.repeat(13)}…and ${rest} more` : ''))
166
166
  }
167
167
  if (result.precursors.length) line('precursors', result.precursors.join(', '))
168
- if (result.plugins.length) line('plugins', result.plugins.join(', '))
168
+ if (result.plugins.length) line('plugins', result.plugins.map(name => pluginText(name, result.pluginOptions[name])).join(', '))
169
169
  if (result.differs.length) line('docs', `${result.differs.join(', ')} differ from what is installed — spore upgrade ${basename(result.ws)}`)
170
170
  const { disk } = result
171
171
  line('disk', `${bytesText(disk.total)} — data ${bytesText(disk.data)} · records ${bytesText(disk.state)} · streams ${bytesText(disk.calls)} · sent ${bytesText(disk.inbox)} · other ${bytesText(disk.other)}`)
@@ -259,6 +259,10 @@ export function scheduleLine (one) {
259
259
  return `${one.name} ${when} ${one.state}${where}`
260
260
  }
261
261
 
262
+ const pluginText = (name, set) => set
263
+ ? `${name} (${Object.entries(set).map(([option, value]) => `${option}: ${value}`).join(', ')})`
264
+ : name
265
+
262
266
  const jobGrant = (grant) => grant
263
267
  ? `${grant.count} at once, ${durationText(grant.wall)} each${grant.maxWait ? `, routed within ${durationText(grant.maxWait)}` : ''}${grant.perDay ? `, ${grant.perDay} triage cells a day` : ''}`
264
268
  : 'none granted'
@@ -462,6 +466,9 @@ function renderPlugin (result) {
462
466
  for (const [i, [key, kind]] of Object.entries(result.settings).entries()) {
463
467
  line(i ? '' : 'settings', `${key} (${kind})${result.configured?.[key] === undefined ? '' : ` = ${result.configured[key]}`}`)
464
468
  }
469
+ for (const [i, [name, spec]] of Object.entries(result.options).entries()) {
470
+ line(i ? '' : 'options', `${result.name}.${name}: ${spec.values.map(value => value === spec.default ? `${value} (default)` : value).join(' | ')}`)
471
+ }
465
472
  for (const [i, [name, path]] of Object.entries(result.programs).entries()) line(i ? '' : 'programs', `${name} → ${path}`)
466
473
  for (const [i, [name, value]] of Object.entries(result.env).entries()) line(i ? '' : 'env', `${name}=${value}`)
467
474
  if (result.contain) line('contain', result.contain.keep ? `${result.contain.keep}, and nothing else of ${result.contain.hide}` : `nothing of ${result.contain.hide}`)