@vercel/board 0.54.1 → 0.55.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.
- package/dist/backend-local.mjs +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.mjs +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/{commands-D8HctFGJ.mjs → commands-CZUxX6HF.mjs} +26 -0
- package/dist/{exports-D6Q99t_O.mjs → exports-FRbxGU5M.mjs} +22 -2
- package/dist/index.mjs +1 -1
- package/dist/index.node.mjs +2 -2
- package/dist/inspect/app.js +1 -1
- package/dist/{inspect-Cb1Sj8QV.mjs → inspect-Aomn2jXK.mjs} +2 -2
- package/dist/inspect-CGLv6b5v.mjs +2 -0
- package/dist/inspect.mjs +1 -1
- package/dist/{local-BtzF9fRs.mjs → local-Dn0vv-1e.mjs} +2 -2
- package/dist/{main-Dicvkp6D.mjs → main-CSuYOx6C.mjs} +52 -6
- package/dist/{serve-BMOtQEiQ.mjs → serve-_qRPIp-J.mjs} +3 -3
- package/dist/{server--J1DfQjI.mjs → server-24oEf9i9.mjs} +2 -2
- package/dist/{shell-DsDyOFd1.mjs → shell-DB4WVhfU.mjs} +1 -1
- package/dist/{task-batch-BviIruES.mjs → task-batch-BSJ3ihpF.mjs} +2 -2
- package/dist/{version-1isUFDyU.mjs → version-1dDjcBkK.mjs} +1 -1
- package/docs/04-reference/01-cli.md +25 -0
- package/package.json +1 -1
- package/dist/inspect-DeY883DA.mjs +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as ATTACHMENT_BYTES_MAX, r as parseProfileHeader, t as InvalidProfileHeader } from "./profile-header-O8wC8yk8.mjs";
|
|
2
2
|
import "./schemas-CUSTEFIy.mjs";
|
|
3
|
-
import { t as Failed, u as who } from "./main-
|
|
4
|
-
import { n as relative, r as shell, t as CSP } from "./shell-
|
|
3
|
+
import { t as Failed, u as who } from "./main-CSuYOx6C.mjs";
|
|
4
|
+
import { n as relative, r as shell, t as CSP } from "./shell-DB4WVhfU.mjs";
|
|
5
5
|
import { t as page } from "./page-7KWSGxyC.mjs";
|
|
6
6
|
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
7
7
|
import { createServer } from "node:http";
|
package/dist/inspect.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as ATTACHMENT_BYTES_MAX, r as parseProfileHeader, t as InvalidProfileHeader } from "./profile-header-O8wC8yk8.mjs";
|
|
2
2
|
import "./schemas-CUSTEFIy.mjs";
|
|
3
|
-
import { n as relative, r as shell, t as CSP } from "./shell-
|
|
3
|
+
import { n as relative, r as shell, t as CSP } from "./shell-DB4WVhfU.mjs";
|
|
4
4
|
import { t as page } from "./page-7KWSGxyC.mjs";
|
|
5
5
|
//#region src/inspect/handler.ts
|
|
6
6
|
/**
|
|
@@ -5,9 +5,9 @@ import { a as duplicateId, c as notFound, f as BoardError, i as batchTooLarge, l
|
|
|
5
5
|
import { a as waitUntil, c as platformProfile, d as userIdOf, h as isKeyIdOf, l as shownName, m as derivedId, n as MIDDLEWARE_ACTOR, o as actorParts, s as importedHandle, t as DroppedError } from "./middleware-BY4qqIh3.mjs";
|
|
6
6
|
import { a as SCHEMA_DESCRIPTION_MAX, c as canonical, d as parseSchemaId, f as schemaId, i as BUILT_IN_SCHEMAS, l as checkDefinition, n as blocksIn, o as SCHEMA_NAME, s as SCHEMA_VERSION_MAX, u as isBuiltInName } from "./blocks-CVoBC7ur.mjs";
|
|
7
7
|
import { a as replaceMentions, i as mentionTerms, n as isEmail, r as mentionTerm, t as extractMentions } from "./mentions-CnWt9Z5b.mjs";
|
|
8
|
-
import { t as VERSION } from "./version-
|
|
8
|
+
import { t as VERSION } from "./version-1dDjcBkK.mjs";
|
|
9
9
|
import { c as compileAccess, i as authorize, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-HzqFpgL_.mjs";
|
|
10
|
-
import { _ as SYNC, a as runMatch, g as uploadName, h as carried, i as canonicalWatchers, l as METHODS, n as SYNC_ACTOR, o as compileWatcher, r as syncTarget, s as hasCriteria, t as batchPlan } from "./task-batch-
|
|
10
|
+
import { _ as SYNC, a as runMatch, g as uploadName, h as carried, i as canonicalWatchers, l as METHODS, n as SYNC_ACTOR, o as compileWatcher, r as syncTarget, s as hasCriteria, t as batchPlan } from "./task-batch-BSJ3ihpF.mjs";
|
|
11
11
|
import { n as setOwn, t as own } from "./own-OwgPWdmh.mjs";
|
|
12
12
|
import { E as wroteAs, T as workflowPath, b as removes, c as checkCan, g as joined, h as issuerName, l as checkGrant, n as GITHUB_ISSUER, p as grantIssuers, s as authenticates, u as checkPrincipal } from "./auth-D9ycDQK0.mjs";
|
|
13
13
|
import { i as ownedActor, n as actorSeen, o as viaOf } from "./actors-D-u6bitG.mjs";
|
|
@@ -5,12 +5,12 @@ import { n as displayEmoji, r as normalizeEmoji } from "./emoji-CTLpvH-A.mjs";
|
|
|
5
5
|
import { l as shownName } from "./middleware-BY4qqIh3.mjs";
|
|
6
6
|
import { d as parseSchemaId, r as findBlocks, t as block } from "./blocks-CVoBC7ur.mjs";
|
|
7
7
|
import { a as replaceMentions, n as isEmail, t as extractMentions } from "./mentions-CnWt9Z5b.mjs";
|
|
8
|
-
import { t as VERSION } from "./version-
|
|
8
|
+
import { t as VERSION } from "./version-1dDjcBkK.mjs";
|
|
9
9
|
import { r as PERMISSIONS } from "./access-HzqFpgL_.mjs";
|
|
10
|
-
import { c as withMentions } from "./task-batch-
|
|
11
|
-
import { a as isBoardName, l as isApiMessageId, n as createTasksInChunks, s as apiThreadRoot, t as TasksInChunksError } from "./exports-
|
|
12
|
-
import { i as groups, n as filters$1, o as options, r as globalOptions, s as usage$1, t as commands } from "./commands-
|
|
13
|
-
import { _ as vercelProjectFile, a as vercel, c as boardUrl, d as environmentProfile, f as handFetch, i as handTeam, l as configDir, m as handToken, n as credentialSource, o as http, p as handLogin, r as credentialed, t as board, u as connect } from "./server
|
|
10
|
+
import { c as withMentions } from "./task-batch-BSJ3ihpF.mjs";
|
|
11
|
+
import { a as isBoardName, l as isApiMessageId, n as createTasksInChunks, s as apiThreadRoot, t as TasksInChunksError } from "./exports-FRbxGU5M.mjs";
|
|
12
|
+
import { i as groups, n as filters$1, o as options, r as globalOptions, s as usage$1, t as commands } from "./commands-CZUxX6HF.mjs";
|
|
13
|
+
import { _ as vercelProjectFile, a as vercel, c as boardUrl, d as environmentProfile, f as handFetch, i as handTeam, l as configDir, m as handToken, n as credentialSource, o as http, p as handLogin, r as credentialed, t as board, u as connect } from "./server-24oEf9i9.mjs";
|
|
14
14
|
import { n as everyChannel, t as conformance } from "./conformance-BNiLcKra.mjs";
|
|
15
15
|
import { n as displayText, t as byVercelBot } from "./bots-CqPYxkqK.mjs";
|
|
16
16
|
import { spawn } from "node:child_process";
|
|
@@ -2083,7 +2083,8 @@ function doing() {
|
|
|
2083
2083
|
case "schedule": return a === "cancel" ? `cancel schedule ${b}` : `schedule a message in ${message ? ref(a) : a ?? "a channel"}`;
|
|
2084
2084
|
case "channels": return a === "create" ? `create ${b ?? "the channel"}` : "list channels";
|
|
2085
2085
|
case "schedules":
|
|
2086
|
-
case "actors":
|
|
2086
|
+
case "actors":
|
|
2087
|
+
case "boards": return `list ${command}`;
|
|
2087
2088
|
case "tasks": {
|
|
2088
2089
|
if (a === void 0 || !TASK_VERBS.has(a)) return a === void 0 ? "list tasks" : `list tasks in ${a}`;
|
|
2089
2090
|
const one = b === void 0 ? "a task" : `task ${ref(b)}`;
|
|
@@ -2535,6 +2536,37 @@ function connection(url = flags.url, options = {}) {
|
|
|
2535
2536
|
};
|
|
2536
2537
|
}
|
|
2537
2538
|
/**
|
|
2539
|
+
* The team's boards, in Vercel's API: `--scope`'s team, the one `--url` or `BOARD_URL` names when
|
|
2540
|
+
* it's a team's board there, or the one the environment finds. A board of its own (`vb serve`, a
|
|
2541
|
+
* deployment's) is one board, with no team's to list.
|
|
2542
|
+
*/
|
|
2543
|
+
async function teamBoards() {
|
|
2544
|
+
if (io.board) throw usage("boards isn't available in-process: the board handle you pass is one board.", {
|
|
2545
|
+
reason: "not_available",
|
|
2546
|
+
next: []
|
|
2547
|
+
});
|
|
2548
|
+
if (flags.name !== void 0 || flags.ensure) throw usage(`boards lists every board of the team, and --${flags.name !== void 0 ? "name" : "ensure"} picks one: leave it out.`, { reason: "conflicting_options" });
|
|
2549
|
+
let team = flags.scope ?? flags.team;
|
|
2550
|
+
if (team !== void 0 && flags.url !== void 0) throw usage("--url names its board, its team included, and --scope a team: pass one of them.", { reason: "conflicting_options" });
|
|
2551
|
+
const url = flags.url ?? (team === void 0 ? configuredUrl() : null);
|
|
2552
|
+
if (url !== null && url !== void 0) {
|
|
2553
|
+
const onVercel = vercelBoard(url.replace(/\/+$/, ""));
|
|
2554
|
+
if (!onVercel) throw usage(`${url} is a board of its own, with no team's boards to list: boards lists a team's, in Vercel's API.`, {
|
|
2555
|
+
reason: "not_available",
|
|
2556
|
+
next: [{
|
|
2557
|
+
instruction: "List a team's boards",
|
|
2558
|
+
argv: rerunWithout(["--url"], "--scope", "<TEAM>")
|
|
2559
|
+
}]
|
|
2560
|
+
});
|
|
2561
|
+
team = onVercel.team;
|
|
2562
|
+
}
|
|
2563
|
+
sent = credentialSource;
|
|
2564
|
+
return vercel({
|
|
2565
|
+
...team !== void 0 ? { team } : {},
|
|
2566
|
+
...sending(void 0)
|
|
2567
|
+
}).boards();
|
|
2568
|
+
}
|
|
2569
|
+
/**
|
|
2538
2570
|
* The team's board this run names: `--name`, or `BOARD_NAME`, on `--scope`'s team or the one the
|
|
2539
2571
|
* environment finds. A URL names a board itself, its team included. `BOARD_NAME` is read only
|
|
2540
2572
|
* where it picks the board: beside `BOARD_URL`, which names another, nothing says which one.
|
|
@@ -2791,6 +2823,20 @@ async function run(command, args) {
|
|
|
2791
2823
|
if (listed.next !== null) out(`\n(more not shown: ${commandLine(rerunWithout(["--after"], "--after", listed.next))})`);
|
|
2792
2824
|
return 0;
|
|
2793
2825
|
}
|
|
2826
|
+
case "boards": {
|
|
2827
|
+
const [sub, extra] = args;
|
|
2828
|
+
if (sub !== void 0 && sub !== "list") throw usage(`Unknown command ${sub} for ${named()} boards.`, { reason: "unknown_command" });
|
|
2829
|
+
if (extra !== void 0) throw usage(`boards list takes no arguments: ${extra} is one too many.`);
|
|
2830
|
+
const listed = await teamBoards();
|
|
2831
|
+
if (flags.json) return result(listed), 0;
|
|
2832
|
+
if (listed.boards.length === 0) return out("no boards you can use on this team yet"), 0;
|
|
2833
|
+
const width = Math.max(...listed.boards.map((board) => board.name.length));
|
|
2834
|
+
for (const board of listed.boards) {
|
|
2835
|
+
const notes = [...board.id === listed.defaultBoardId ? ["default"] : [], ...board.visibility === "private" ? ["private"] : []];
|
|
2836
|
+
out(`${board.name.padEnd(width)} ${board.id}${notes.length > 0 ? ` ${notes.join(", ")}` : ""}`.trimEnd());
|
|
2837
|
+
}
|
|
2838
|
+
return 0;
|
|
2839
|
+
}
|
|
2794
2840
|
case "actors": {
|
|
2795
2841
|
const actors = await client().actors();
|
|
2796
2842
|
if (flags.json) return result({ actors }), 0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-DDfXnZ2b.mjs";
|
|
2
|
-
import { i as hostCheckedBy } from "./exports-
|
|
2
|
+
import { i as hostCheckedBy } from "./exports-FRbxGU5M.mjs";
|
|
3
3
|
import { i as LOGINS, r as LOGIN } from "./auth-D9ycDQK0.mjs";
|
|
4
|
-
import { h as localTokenFile, t as board } from "./server
|
|
4
|
+
import { h as localTokenFile, t as board } from "./server-24oEf9i9.mjs";
|
|
5
5
|
import { t as oidcTokens } from "./tokens-B3gXkQCs.mjs";
|
|
6
|
-
import { t as local } from "./local-
|
|
6
|
+
import { t as local } from "./local-Dn0vv-1e.mjs";
|
|
7
7
|
import { mkdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
8
8
|
import { userInfo } from "node:os";
|
|
9
9
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -2,8 +2,8 @@ import { n as formatProfileHeader } from "./profile-header-O8wC8yk8.mjs";
|
|
|
2
2
|
import "./schemas-CUSTEFIy.mjs";
|
|
3
3
|
import { f as BoardError, ht as routes, p as createBoardClient, t as HttpError } from "./errors-DDfXnZ2b.mjs";
|
|
4
4
|
import { g as keyId, p as DERIVED_ID } from "./middleware-BY4qqIh3.mjs";
|
|
5
|
-
import { l as METHODS, o as compileWatcher } from "./task-batch-
|
|
6
|
-
import { c as createVercel, d as withoutToken, f as tailWatchers, p as deployedOnVercel, r as createBoard, u as PROTOCOL_ROUTES } from "./exports-
|
|
5
|
+
import { l as METHODS, o as compileWatcher } from "./task-batch-BSJ3ihpF.mjs";
|
|
6
|
+
import { c as createVercel, d as withoutToken, f as tailWatchers, p as deployedOnVercel, r as createBoard, u as PROTOCOL_ROUTES } from "./exports-FRbxGU5M.mjs";
|
|
7
7
|
import { execFile } from "node:child_process";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
import { mkdir, readFile, readdir, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -3,9 +3,9 @@ import "./schemas-CUSTEFIy.mjs";
|
|
|
3
3
|
import { l as isThreadTarget } from "./external-DkWafjn-.mjs";
|
|
4
4
|
import { I as Filters, ht as routes, r as badRequest, t as HttpError } from "./errors-DDfXnZ2b.mjs";
|
|
5
5
|
import { i as afterRetry } from "./middleware-BY4qqIh3.mjs";
|
|
6
|
-
import { t as VERSION } from "./version-
|
|
6
|
+
import { t as VERSION } from "./version-1dDjcBkK.mjs";
|
|
7
7
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
8
|
-
import { o as options } from "./commands-
|
|
8
|
+
import { o as options } from "./commands-CZUxX6HF.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/server/backend.ts
|
|
11
11
|
/** The subscription sync's outbound runs on, in `BoardBinding.subscriptions`. No watcher's ID starts with `@`. */
|
|
@@ -354,6 +354,7 @@ $ vb read 812
|
|
|
354
354
|
| `wait` | `{ event }`: `{ cursor, type, createdAt, payload, message, actor }` |
|
|
355
355
|
| `tail` | one event per line, as they come |
|
|
356
356
|
| `whoami` | `{ actor, name, handle, profile, expiresAt, can, board, source }` |
|
|
357
|
+
| `boards` | `{ boards, defaultBoardId }` |
|
|
357
358
|
|
|
358
359
|
```bash
|
|
359
360
|
vb read prs --label state=open --json | jq -r '.threads[] | "#\(.message.id) \(.replies) \(.message.text)"'
|
|
@@ -710,6 +711,30 @@ prints `{ explanation }`.
|
|
|
710
711
|
|
|
711
712
|
## Reading
|
|
712
713
|
|
|
714
|
+
### boards
|
|
715
|
+
|
|
716
|
+
```text
|
|
717
|
+
vb boards [--scope <team>]
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
The team's boards you can use, in Vercel's API: each one's name, the one
|
|
721
|
+
`--name` takes, its ID, and `default` for the team's default board or `private`
|
|
722
|
+
for one only its members see. The team is `--scope`'s, the one `--url` or
|
|
723
|
+
`BOARD_URL` names when it's a team's board there, or the Vercel project's you're
|
|
724
|
+
in. A board of its own (`vb serve`, a deployment's at its URL) is one board,
|
|
725
|
+
with no team's to list, and `--name` picks one board, so with either it's misuse.
|
|
726
|
+
It runs `vb boards list`.
|
|
727
|
+
|
|
728
|
+
```text
|
|
729
|
+
$ vb boards --scope acme
|
|
730
|
+
General brd_8f2a default
|
|
731
|
+
security brd_1c9e private
|
|
732
|
+
design brd_77d0
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
With `--json`, it prints `{ boards, defaultBoardId }`, each board `{ id, name,
|
|
736
|
+
teamId, visibility }` as Vercel's API lists it.
|
|
737
|
+
|
|
713
738
|
### channels
|
|
714
739
|
|
|
715
740
|
```text
|
package/package.json
CHANGED