@rfany/rf 0.19.1 → 0.19.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rf.mjs +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rfany/rf",
3
- "version": "0.19.1",
3
+ "version": "0.19.2",
4
4
  "description": "rollforward's command line for people: what its page does, from a shell or a desktop agent, as you",
5
5
  "license": "MIT",
6
6
  "repository": { "type": "git", "url": "git+https://github.com/spoj/rollforward.git", "directory": "cli" },
package/rf.mjs CHANGED
@@ -1057,11 +1057,11 @@ else if (cmd === 'kill' && args.length === 1 && /^\d+$/.test(args[0])) {
1057
1057
  process.exit(2);
1058
1058
  }
1059
1059
  const people = flags.clear ? [] : String(edits[0] ?? '').split(',').map(p => p.trim()).filter(Boolean);
1060
- if ((flags.add || flags.remove) && !people.length) {
1060
+ if ((flags.add !== undefined || flags.remove !== undefined) && !people.length) {
1061
1061
  console.error(usage(cmd));
1062
1062
  process.exit(2);
1063
1063
  }
1064
- const key = flags.add ? 'add' : flags.remove ? 'remove' : 'people';
1064
+ const key = flags.add !== undefined ? 'add' : flags.remove !== undefined ? 'remove' : 'people';
1065
1065
  const all = await (await (edits.length ? post('/capabilities', { cap, [key]: people }, 'PUT') : api('/capabilities'))).json();
1066
1066
  if (flags.json) console.log(JSON.stringify(all, null, 1));
1067
1067
  else for (const [c, who] of Object.entries(all)) if (!cap || c === cap) console.log(`${c}: ${who.join(', ') || (c === 'vpn' || c === 'wake-check' ? 'no one' : 'admins only')}`);