@rfany/rf 0.6.0 → 0.7.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 +1 -1
  2. package/rf.mjs +13 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rfany/rf",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
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
@@ -17,7 +17,7 @@ rf upload PATH FILE [--onto ITEM] [--output]
17
17
  rf wake PATH AT REASON [--label LABEL] AT now, +<n>m|h|d or a date; PATH an open instance, or a series with LABEL
18
18
  rf agents [WORKSPACE] [--set FILE|-] the company's AGENTS.md, or a workspace's; setting the company's is for admins
19
19
  rf skills
20
- rf websites
20
+ rf connections
21
21
  rf status [--long MIN] [--json] what goes on and what's stuck: runs going, flagged past MIN minutes (30), and queued, with why;
22
22
  what waits on whom since when; open instances whose last run failed
23
23
  rf runs [PATH] [--since DATE] [--failed] [--running] [--long MIN] [--json]
@@ -36,9 +36,12 @@ Admins:
36
36
  rf people [--set FILE|-] [-n] [--force] everyone as lines of ROLE EMAIL, each with a comment; --set sets the roles of the people
37
37
  listed and adds new ones, removing no one
38
38
  rf user add EMAIL [admin|publisher] | role EMAIL admin|publisher|user [--force] | disable EMAIL | enable EMAIL | signout EMAIL | remove EMAIL
39
- rf website set ID URL [--name NAME] [--hosts HOST,...] a website people sign in to at URL, and the other hosts its pages need,
40
- such as sso.example.com or *.example.com; a run's browser on it reaches only those
41
- rf website remove ID
39
+ rf connection set NAME TYPE [--SETTING VALUE]... an outside system runs reach as their runner, by a login each person makes:
40
+ graph, Microsoft 365, with no settings; databricks, --host HOST --warehouse ID, a workspace
41
+ and its SQL warehouse; website, --url URL [--hosts HOST,...] [--title TITLE] [--writeback
42
+ false], where people sign in, the other hosts its pages need, such as *.example.com, and
43
+ whether a run's browser writes its state back
44
+ rf connection remove NAME
42
45
  rf brand [--text TEXT] [--logo FILE] [--clear] the deployment's text and logo, a .png, .jpg, .gif, .webp or .svg, which top
43
46
  the sidebar and are the page's title and icon; --clear goes back to the plain look, and with
44
47
  no option it prints them`;
@@ -277,13 +280,13 @@ else if (cmd === 'comment' && args.length === 2) {
277
280
  console.log(await (await post(`/skills/${encodeURIComponent(args[1])}/versions`, { from: Number(args[2]) })).text());
278
281
  } else if (cmd === 'skills') {
279
282
  for (const s of await get('/skills')) console.log(`${s.id} v${s.pushed.version} by ${s.pushed.by} ${s.pushed.at} ${s.description}`);
280
- } else if (cmd === 'websites') {
281
- for (const w of await get('/websites')) console.log(`${w.id} ${w.url} ${w.hosts.join(' ') || '-'} ${w.name}`);
282
- } else if (cmd === 'website' && args[0] === 'set' && args.length === 3) {
283
- await post(`/websites/${encodeURIComponent(args[1])}`, { url: args[2], name: flags.name, hosts: typeof flags.hosts === 'string' ? flags.hosts.split(',') : [] }, 'PUT');
283
+ } else if (cmd === 'connections') {
284
+ for (const { name, type, login, updated_by, updated_at, ...settings } of await get('/connections')) console.log(`${name} ${type} ${JSON.stringify(settings)}`);
285
+ } else if (cmd === 'connection' && args[0] === 'set' && args.length === 3) {
286
+ await post(`/connections/${encodeURIComponent(args[1])}`, { type: args[2], ...flags }, 'PUT');
284
287
  console.log('saved');
285
- } else if (cmd === 'website' && args[0] === 'remove' && args[1]) {
286
- await api(`/websites/${encodeURIComponent(args[1])}`, { method: 'DELETE' });
288
+ } else if (cmd === 'connection' && args[0] === 'remove' && args[1]) {
289
+ await api(`/connections/${encodeURIComponent(args[1])}`, { method: 'DELETE' });
287
290
  console.log('removed');
288
291
  } else if (cmd === 'status' && !args.length) {
289
292
  const s = await get('/api/status'), long = Number(flags.long ?? 30);