@beyondwork/wb-cli 0.1.44 → 0.1.45
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 +5 -0
- package/out/cli.js +481 -189
- package/out/extension.js +105 -103
- package/package.json +1 -1
- package/wb-cli/skills/bw-workblock/SKILL.md +34 -13
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.45",
|
|
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"
|
|
@@ -64,7 +64,9 @@ so that the user can deploy it from Studio.
|
|
|
64
64
|
4. **Edit.** A test is an entry under the module's `tests:` (`name`, `type: pytest`) plus
|
|
65
65
|
`<module>/tests/<name>.py`. A task's code reaches a test as a pytest fixture, not as a module to
|
|
66
66
|
import: `def test_x(flag_gaps): assert flag_gaps.flag(...)` gets task "Flag Gaps", the parameter
|
|
67
|
-
being the task name in lower case with spaces replaced by underscores. A
|
|
67
|
+
being the task name in lower case with spaces replaced by underscores. A test of TypeScript tasks
|
|
68
|
+
has `type: bun` and the file `<module>/tests/<name>.test.ts`. It imports `describe`, `test` and
|
|
69
|
+
`expect` from `bun:test`, and a task asset as `@tasks/<task folder>/main.ts`. A new module, task or test
|
|
68
70
|
needs no `id` line, because wb-cli derives the id from its name. Never copy the `id` of another
|
|
69
71
|
entry. A file no manifest entry claims is not pushed. Change only what the request asks for: no
|
|
70
72
|
fixes to nearby tasks, no tidying of files you did not need to touch, and no tasks beyond the
|
|
@@ -104,21 +106,40 @@ so that the user can deploy it from Studio.
|
|
|
104
106
|
a host it lists every tenant in `~/.config/beyondwork/credentials.json`, with the user each one
|
|
105
107
|
belongs to and whether it is a sign-in or an API token. You never handle a credential: do not open the credentials file, source an
|
|
106
108
|
environment file that holds one, ask for it, or put it in a command, because your transcript and the
|
|
107
|
-
shell history are kept.
|
|
108
|
-
or was revoked, ask the user to run `wb-cli login <host>` in their own terminal. `login` waits for a
|
|
109
|
-
person to sign in in a browser, so do not run it yourself. On a tenant that no person signs in to,
|
|
110
|
-
such as a devenv tenant, pipe an API token from a tool that already holds it into
|
|
111
|
-
`wb-cli add-tenant <host>`, because the token then reaches neither your transcript nor a command
|
|
112
|
-
line.
|
|
109
|
+
shell history are kept.
|
|
113
110
|
|
|
114
|
-
|
|
111
|
+
When the tenant has no credential, or wb-cli reports that the sign-in expired or was revoked, start
|
|
112
|
+
the sign-in at once. Do not ask the user first.
|
|
113
|
+
|
|
114
|
+
1. Run `wb-cli login --no-browser <host>` in the background. It prints a sign-in link, then waits
|
|
115
|
+
five minutes for the user to click the link and sign in in their browser. `--no-browser` stops
|
|
116
|
+
`login` from opening a browser on this machine, so the user always signs in from the link.
|
|
117
|
+
2. The user does not see the command's output. End your reply with the full link, and ask the user
|
|
118
|
+
only to click it. After the sign-in, the browser goes to the port in the link's `redirect_uri`
|
|
119
|
+
on this machine. If the user's browser runs on another machine, name that port: the user must
|
|
120
|
+
forward it.
|
|
121
|
+
3. Continue the task when `login` returns with "Signed in to <host> as <user>".
|
|
122
|
+
|
|
123
|
+
On a tenant that no person signs in to, such as a devenv tenant, pipe an API token from a tool that
|
|
124
|
+
already holds it into `wb-cli add-tenant <host>`, because the token then reaches neither your
|
|
125
|
+
transcript nor a command line.
|
|
126
|
+
|
|
127
|
+
## Git history
|
|
128
|
+
|
|
129
|
+
`wb-cli clone` and `wb-cli pull` bring the real commits of the branch into the checkout, with the
|
|
130
|
+
platform's commit IDs, authors, dates and messages. `git log`, `git log -p -- <path>`, `git blame` and
|
|
131
|
+
`git show` work as in any repository. Git shows a message that Studio stores beside a commit under
|
|
132
|
+
`Notes (wb-cli):` in `git log` and `git show`, not in `git blame`.
|
|
133
|
+
|
|
134
|
+
The newest commit is wb-cli's: it folds the platform's manifests into this checkout's one
|
|
135
|
+
`manifest.yaml`, so `git show HEAD` lists every manifest. For the history of a manifest, name its
|
|
136
|
+
platform path: `<module>/manifest.yaml` or `<module>/<task>/manifest.yaml`.
|
|
115
137
|
|
|
116
|
-
wb-cli records local Git snapshots of the authoring files when it clones, pulls, merges, or pushes.
|
|
117
|
-
These snapshots have their own commit IDs and history, separate from the platform's commits.
|
|
118
138
|
`git status` lists local edits, including new files; `git diff HEAD` shows edits to tracked files.
|
|
119
|
-
`
|
|
120
|
-
|
|
121
|
-
|
|
139
|
+
`wb-cli push` saves every edit as one platform commit with the message you give it, whether or not
|
|
140
|
+
you ran `git commit`. `git push` has no remote. A push adds wb-cli's own commits on top, and the next
|
|
141
|
+
`wb-cli pull` puts the checkout on the platform's commit. `wb-cli log <branch>` lists the commits of
|
|
142
|
+
another branch.
|
|
122
143
|
|
|
123
144
|
## Pushes and refusals
|
|
124
145
|
|