@beyondwork/wb-cli 0.1.35 → 0.1.37
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/CHANGELOG.md +14 -0
- package/out/cli.js +732 -146
- package/out/extension.js +121 -121
- package/package.json +1 -1
- package/wb-cli/skills/bw-workblock/SKILL.md +19 -7
- package/wb-cli/skills/bw-workblock/references/browser-run.sh +1 -1
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.
|
|
6
|
+
"version": "0.1.37",
|
|
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"
|
|
@@ -52,13 +52,16 @@ done from Studio.
|
|
|
52
52
|
|
|
53
53
|
## Credentials
|
|
54
54
|
|
|
55
|
-
`wb-cli tenants` lists the tenants that have a
|
|
56
|
-
with the user each
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
`wb-cli tenants` lists the tenants that have a credential in
|
|
56
|
+
`~/.config/beyondwork/credentials.json`, with the user each one belongs to and whether it is a
|
|
57
|
+
sign-in or an API token. You never handle a credential: do not open the credentials file, source an
|
|
58
|
+
environment file that holds one, ask for it, or put it in a command, because your transcript and the
|
|
59
|
+
shell history are kept. When a tenant has no credential, or wb-cli reports that the sign-in expired
|
|
60
|
+
or was revoked, ask the user to run `wb-cli login <host>` in their own terminal. `login` waits for a
|
|
61
|
+
person to sign in in a browser, so do not run it yourself. On a tenant that no person signs in to,
|
|
62
|
+
such as a devenv tenant, pipe an API token from a tool that already holds it into
|
|
63
|
+
`wb-cli add-tenant <host>`, because the token then reaches neither your transcript nor a command
|
|
64
|
+
line.
|
|
62
65
|
|
|
63
66
|
## Branches
|
|
64
67
|
|
|
@@ -80,6 +83,15 @@ the published state. When the CLI refuses a push or a pull (exit 3), its message
|
|
|
80
83
|
edit there. Other failures during `push --update` do not necessarily mean the save succeeded;
|
|
81
84
|
use the command's reported outcome.
|
|
82
85
|
|
|
86
|
+
## Spaces and your active version
|
|
87
|
+
|
|
88
|
+
A Space module, like any run that you start outside a Studio workspace, loads your active version
|
|
89
|
+
of the workblock. It is `main` until you change it, and `main` is empty until the first deploy. To
|
|
90
|
+
try a version in a Space, publish it with `wb-cli push --update`, run `wb-cli use <name>` in the
|
|
91
|
+
checkout, and reload the Space. The setting applies only to you: each user runs their own active
|
|
92
|
+
version, and a Space cannot name a version for a module. `wb-cli use` without a name prints your
|
|
93
|
+
active version. Run `wb-cli use main` when you are done.
|
|
94
|
+
|
|
83
95
|
## Other platform requests
|
|
84
96
|
|
|
85
97
|
`wb-cli api <verb> '<json>'` sends one request of the platform's WebSocket API as your user, for
|
|
@@ -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
|
|
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
|