@beyondwork/wb-cli 0.1.36 → 0.1.38

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publisher": "beyondwork",
4
4
  "displayName": "Beyond Work",
5
5
  "description": "Tool for interacting with Beyond Work workblocks from VS Code and CLI.",
6
- "version": "0.1.36",
6
+ "version": "0.1.38",
7
7
  "vsce": {
8
8
  "baseContentUrl": "https://github.com/bwllaming/code/blob/HEAD/src/vscode/beyondwork",
9
9
  "baseImagesUrl": "https://github.com/bwllaming/code/raw/HEAD/src/vscode/beyondwork"
@@ -41,7 +41,9 @@ done from Studio.
41
41
  checkout). Without `--update`, or when the CLI reports the push as not published, the version
42
42
  stays behind, and a deploy in Studio would ship it without your change.
43
43
  7. **Prove it.** Run `wb-cli test [<module>]` when the module has tests, then `wb-cli run
44
- <module>`, or `wb-cli run <module>/<task> --inputs '{...}'`, for what you changed. A run never
44
+ <module>`, or `wb-cli run <module>/<task> --inputs '{...}'`, for what you changed. Since wb-cli
45
+ 0.1.36, `wb-cli run <module>/<task>` calls an invokable task without a run. It returns no run id
46
+ and no logs, and the active run stays unchanged. A run never
45
47
  passes through Studio's Start and stops at a task UI. Drive what a person sees, from Start
46
48
  through each task UI to the result, in a browser as `references/browser-validation.md` next to
47
49
  this file describes. That needs a browser tool that acts where the user is signed in to the
@@ -52,13 +54,16 @@ done from Studio.
52
54
 
53
55
  ## Credentials
54
56
 
55
- `wb-cli tenants` lists the tenants that have a token in `~/.config/beyondwork/credentials.json`,
56
- with the user each token belongs to. You never handle a token: do not open the credentials file,
57
- source an environment file that holds one, ask for it, or put it in a command, because your
58
- transcript and the shell history are kept. When a tenant has no token, ask the user to run
59
- `wb-cli add-tenant <host>` in their own terminal and paste an API token at its prompt. You may pipe
60
- a token from a tool that already holds it into `wb-cli add-tenant <host>`, because the token then
61
- reaches neither your transcript nor a command line.
57
+ `wb-cli tenants` lists the tenants that have a credential in
58
+ `~/.config/beyondwork/credentials.json`, with the user each one belongs to and whether it is a
59
+ sign-in or an API token. You never handle a credential: do not open the credentials file, source an
60
+ environment file that holds one, ask for it, or put it in a command, because your transcript and the
61
+ shell history are kept. When a tenant has no credential, or wb-cli reports that the sign-in expired
62
+ or was revoked, ask the user to run `wb-cli login <host>` in their own terminal. `login` waits for a
63
+ person to sign in in a browser, so do not run it yourself. On a tenant that no person signs in to,
64
+ such as a devenv tenant, pipe an API token from a tool that already holds it into
65
+ `wb-cli add-tenant <host>`, because the token then reaches neither your transcript nor a command
66
+ line.
62
67
 
63
68
  ## Branches
64
69
 
@@ -30,7 +30,7 @@ NS=$(cd "$REPO" && eval "$(DIRENV_LOG_FORMAT= direnv export bash 2>/dev/null)" &
30
30
  awk -v h="$HOST" '{for (i = 2; i <= NF; i++) if ($i == h) { print $1; exit }}') || true
31
31
  [ -n "$NS" ] || { echo "No ingress on dev-eu1 serves $HOST: the tenant is not on dev-eu1, or kubectl has no access. Report the UI as not checked in a browser." >&2; exit 1; }
32
32
  EMAIL=$("$W" tenants "$HOST" --json | jq -r '.tenants[0].user // empty') || true
33
- [ -n "$EMAIL" ] || { echo "wb-cli has no working token for $HOST; run wb-cli tenants $HOST to see why." >&2; exit 1; }
33
+ [ -n "$EMAIL" ] || { echo "wb-cli has no working sign-in for $HOST; run wb-cli tenants $HOST to see why." >&2; exit 1; }
34
34
  echo "host=$HOST tenant=$TENANT namespace=$NS email=$EMAIL workspace=$WORKSPACE_URL"
35
35
 
36
36
  # 3. Mint the cookie into a private file. Never print it. A Forbidden here means the tenant's