@vercel/board 0.58.1 → 0.59.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 (32) hide show
  1. package/dist/{backend-9H57DlQt.d.mts → backend-BtQfimL9.d.mts} +33 -15
  2. package/dist/backend-local.d.mts +1 -1
  3. package/dist/backend-local.mjs +1 -1
  4. package/dist/backend-postgres.d.mts +1 -1
  5. package/dist/backend-postgres.mjs +2 -2
  6. package/dist/cli-embedded.d.mts +2 -2
  7. package/dist/cli-embedded.mjs +2 -2
  8. package/dist/cli.mjs +5 -5
  9. package/dist/conformance.d.mts +1 -1
  10. package/dist/{exports-CREw274K.mjs → exports-CVn4-cJw.mjs} +9 -3
  11. package/dist/{exports-Bh09j6Bd.d.mts → exports-D87KpsSi.d.mts} +27 -2
  12. package/dist/index-CEhxdS5w.d.mts +19 -0
  13. package/dist/index.d.mts +9 -3
  14. package/dist/index.mjs +16 -4
  15. package/dist/index.node.d.mts +4 -4
  16. package/dist/index.node.mjs +3 -3
  17. package/dist/inspect/app.js +27 -27
  18. package/dist/inspect-Dpo80DCM.mjs +2 -0
  19. package/dist/{inspect-mdRycsHb.mjs → inspect-FiqR2gH8.mjs} +2 -2
  20. package/dist/inspect.mjs +1 -1
  21. package/dist/{local-DMQ-Eh6v.mjs → local-BEBMGqdU.mjs} +2 -2
  22. package/dist/{local-B9UwaY2z.mjs → local-PquD719G.mjs} +2 -2
  23. package/dist/{main-C7B22rE4.mjs → main-CKjm9hso.mjs} +4 -4
  24. package/dist/{serve-C3B6EP7W.mjs → serve-DwpXzLhp.mjs} +3 -3
  25. package/dist/{server-D5S70_au.mjs → server-CKCAEME6.mjs} +18 -5
  26. package/dist/{shell-U3QkDJIF.mjs → shell-953VaBzO.mjs} +1 -1
  27. package/dist/{task-batch-BLUkrUqX.mjs → task-batch-BfE8TCBM.mjs} +1 -1
  28. package/dist/{version-D3WaVccj.mjs → version-yDZzeoWl.mjs} +1 -1
  29. package/docs/01-board/01-mounting.md +16 -0
  30. package/package.json +1 -1
  31. package/dist/index-mgNwCwJ4.d.mts +0 -11
  32. package/dist/inspect-rfTRL8zp.mjs +0 -2
@@ -0,0 +1,2 @@
1
+ import { n as inspect } from "./inspect-FiqR2gH8.mjs";
2
+ export { inspect };
@@ -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-C7B22rE4.mjs";
4
- import { n as relative, r as shell, t as CSP } from "./shell-U3QkDJIF.mjs";
3
+ import { t as Failed, u as who } from "./main-CKjm9hso.mjs";
4
+ import { n as relative, r as shell, t as CSP } from "./shell-953VaBzO.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-U3QkDJIF.mjs";
3
+ import { n as relative, r as shell, t as CSP } from "./shell-953VaBzO.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 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";
6
6
  import { i as mentionTerm, n as isEmail, o as mentionsIn, r as meTerms, s as replaceMentions, t as extractMentions } from "./mentions-DBGmqkr2.mjs";
7
7
  import { a as waitUntil, c as platformProfile, d as userIdOf, l as shownName, n as MIDDLEWARE_ACTOR, o as actorParts, s as importedHandle, t as DroppedError } from "./middleware-DVBOEd8G.mjs";
8
- import { t as VERSION } from "./version-D3WaVccj.mjs";
8
+ import { t as VERSION } from "./version-yDZzeoWl.mjs";
9
9
  import { c as compileAccess, i as authorize, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-D1AHzFSP.mjs";
10
- import { _ as uploadName, a as runMatch, g as carried, i as canonicalWatchers, n as SYNC_ACTOR, o as compileWatcher, r as syncTarget, s as hasCriteria, t as batchPlan, u as METHODS, v as SYNC } from "./task-batch-BLUkrUqX.mjs";
10
+ import { _ as uploadName, a as runMatch, g as carried, i as canonicalWatchers, n as SYNC_ACTOR, o as compileWatcher, r as syncTarget, s as hasCriteria, t as batchPlan, u as METHODS, v as SYNC } from "./task-batch-BfE8TCBM.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-Cc5_pdi7.mjs";
13
13
  import { i as ownedActor, n as actorSeen, o as viaOf } from "./actors-CCth21rU.mjs";
@@ -1,6 +1,6 @@
1
1
  import { t as HttpError } from "./errors-Ce_-E3_C.mjs";
2
- import { u as METHODS } from "./task-batch-BLUkrUqX.mjs";
3
- import { i as memoryBlob, n as a2, r as fsBlob, t as localScheduler } from "./local-DMQ-Eh6v.mjs";
2
+ import { u as METHODS } from "./task-batch-BfE8TCBM.mjs";
3
+ import { i as memoryBlob, n as a2, r as fsBlob, t as localScheduler } from "./local-BEBMGqdU.mjs";
4
4
  import { createHash } from "node:crypto";
5
5
  import { join, resolve } from "node:path";
6
6
  //#region src/server/local.ts
@@ -5,12 +5,12 @@ import { n as displayEmoji, r as normalizeEmoji } from "./emoji-CTLpvH-A.mjs";
5
5
  import { d as parseSchemaId, r as findBlocks, t as block } from "./blocks-CVoBC7ur.mjs";
6
6
  import { n as isEmail, s as replaceMentions, t as extractMentions } from "./mentions-DBGmqkr2.mjs";
7
7
  import { l as shownName } from "./middleware-DVBOEd8G.mjs";
8
- import { t as VERSION } from "./version-D3WaVccj.mjs";
8
+ import { t as VERSION } from "./version-yDZzeoWl.mjs";
9
9
  import { r as PERMISSIONS } from "./access-D1AHzFSP.mjs";
10
- import { c as mentionValue, l as withMentions } from "./task-batch-BLUkrUqX.mjs";
11
- import { a as isBoardName, l as isApiMessageId, n as createTasksInChunks, s as apiThreadRoot, t as TasksInChunksError } from "./exports-CREw274K.mjs";
10
+ import { c as mentionValue, l as withMentions } from "./task-batch-BfE8TCBM.mjs";
11
+ import { a as isBoardName, l as isApiMessageId, n as createTasksInChunks, s as apiThreadRoot, t as TasksInChunksError } from "./exports-CVn4-cJw.mjs";
12
12
  import { i as groups, n as filters$1, o as options, r as globalOptions, s as usage$1, t as commands } from "./commands-CkRYuvpd.mjs";
13
- import { a as handTeam, d as connect, f as environmentProfile, h as handToken, i as handProgram, l as boardUrl, m as handLogin, n as credentialSource, o as vercel, p as handFetch, r as credentialed, s as http, t as board, u as configDir, v as vercelProjectFile } from "./server-D5S70_au.mjs";
13
+ import { a as handProgram, c as http, d as configDir, f as connect, g as handToken, h as handLogin, i as credentialed, m as handFetch, o as handTeam, p as environmentProfile, r as credentialSource, s as vercel, t as board, u as boardUrl, y as vercelProjectFile } from "./server-CKCAEME6.mjs";
14
14
  import { n as everyChannel, t as conformance } from "./conformance-D9XutDay.mjs";
15
15
  import { n as displayText, t as byVercelBot } from "./bots-CqPYxkqK.mjs";
16
16
  import { spawn } from "node:child_process";
@@ -1,9 +1,9 @@
1
1
  import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-Ce_-E3_C.mjs";
2
- import { i as hostCheckedBy } from "./exports-CREw274K.mjs";
2
+ import { i as hostCheckedBy } from "./exports-CVn4-cJw.mjs";
3
3
  import { i as LOGINS, r as LOGIN } from "./auth-Cc5_pdi7.mjs";
4
- import { g as localTokenFile, t as board } from "./server-D5S70_au.mjs";
4
+ import { _ as localTokenFile, t as board } from "./server-CKCAEME6.mjs";
5
5
  import { t as oidcTokens } from "./tokens-XagdeYrv.mjs";
6
- import { t as local } from "./local-B9UwaY2z.mjs";
6
+ import { t as local } from "./local-PquD719G.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";
@@ -1,9 +1,9 @@
1
1
  import { n as formatProfileHeader } from "./profile-header-O8wC8yk8.mjs";
2
2
  import "./schemas-CUSTEFIy.mjs";
3
3
  import { Ct as routes, _ as DERIVED_ID, b as keyId, f as BoardError, g as refusalCode, p as createBoardClient, t as HttpError } from "./errors-Ce_-E3_C.mjs";
4
- import { t as VERSION } from "./version-D3WaVccj.mjs";
5
- import { o as compileWatcher, u as METHODS } from "./task-batch-BLUkrUqX.mjs";
6
- import { c as createVercel, d as withoutToken, f as tailWatchers, p as deployedOnVercel, r as createBoard, u as PROTOCOL_ROUTES } from "./exports-CREw274K.mjs";
4
+ import { t as VERSION } from "./version-yDZzeoWl.mjs";
5
+ import { o as compileWatcher, u as METHODS } from "./task-batch-BfE8TCBM.mjs";
6
+ import { c as createVercel, d as withoutToken, f as tailWatchers, p as deployedOnVercel, r as createBoard, u as PROTOCOL_ROUTES } from "./exports-CVn4-cJw.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";
@@ -1128,11 +1128,24 @@ function vercel(options = {}) {
1128
1128
  */
1129
1129
  function board(options = {}) {
1130
1130
  return createBoard(options, {
1131
- backend: (fetch) => process.env.BOARD_URL?.trim() ? http() : vercel(fetch ? { fetch } : {}),
1131
+ backend: (fetch, id) => process.env.BOARD_URL?.trim() ? http() : vercel({
1132
+ ...fetch ? { fetch } : {},
1133
+ ...id ? { board: id } : {}
1134
+ }),
1132
1135
  sync: () => import("./engine-DVWbcEIB.mjs"),
1133
1136
  serving: () => import("./serving-BVtrFzK4.mjs"),
1134
1137
  sandbox: (url, token) => sandboxHeaders(url, url, token)
1135
1138
  });
1136
1139
  }
1140
+ /**
1141
+ * The team's boards in Vercel's API that your credentials may use, every page of them, and the ID
1142
+ * of its default board when you may use it: what `vb list` lists. `team` is a team's ID (`team_…`)
1143
+ * or slug, by default the one the environment finds, and the credentials are the ones `board()`
1144
+ * finds. Pass a board's `name` to `board()` to use one. `BOARD_URL` names a board of its own, with
1145
+ * no team's boards to list, so it doesn't change what this lists.
1146
+ */
1147
+ function listBoards(options = {}) {
1148
+ return vercel(options).boards();
1149
+ }
1137
1150
  //#endregion
1138
- export { projectDir as _, handTeam as a, PASSED as c, connect as d, environmentProfile as f, localTokenFile as g, handToken as h, handProgram as i, boardUrl as l, handLogin as m, credentialSource as n, vercel as o, handFetch as p, credentialed as r, http as s, board as t, configDir as u, vercelProjectFile as v };
1151
+ export { localTokenFile as _, handProgram as a, http as c, configDir as d, connect as f, handToken as g, handLogin as h, credentialed as i, PASSED as l, handFetch as m, listBoards as n, handTeam as o, environmentProfile as p, credentialSource as r, vercel as s, board as t, boardUrl as u, projectDir as v, vercelProjectFile as y };
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "./version-D3WaVccj.mjs";
1
+ import { t as VERSION } from "./version-yDZzeoWl.mjs";
2
2
  //#region src/inspect/style.ts
3
3
  /**
4
4
  * Just Chat's look: mono, quiet, one accent, hairlines only under headers.
@@ -3,7 +3,7 @@ import "./schemas-CUSTEFIy.mjs";
3
3
  import { l as isThreadTarget } from "./external-DkWafjn-.mjs";
4
4
  import { Ct as routes, H as Filters, r as badRequest, t as HttpError } from "./errors-Ce_-E3_C.mjs";
5
5
  import { i as afterRetry } from "./middleware-DVBOEd8G.mjs";
6
- import { t as VERSION } from "./version-D3WaVccj.mjs";
6
+ import { t as VERSION } from "./version-yDZzeoWl.mjs";
7
7
  import { t as own } from "./own-OwgPWdmh.mjs";
8
8
  import { o as options } from "./commands-CkRYuvpd.mjs";
9
9
  import { z } from "zod";
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const VERSION = "0.58.1";
3
+ const VERSION = "0.59.0";
4
4
  //#endregion
5
5
  export { VERSION as t };
@@ -180,6 +180,22 @@ export const acmeGeneral = board({ team: 'acme' })
180
180
  someone who manages the board grants it. The team's default board says the
181
181
  same.
182
182
 
183
+ To pick one at runtime, `listBoards()` lists the team's boards you may use,
184
+ each by its `id` and the `name` `board()` takes, with the ID of the default
185
+ board, as `vb list` does:
186
+
187
+ ```ts
188
+ import { board, listBoards } from '@vercel/board'
189
+
190
+ const { boards } = await listBoards({ team: 'acme' })
191
+ const incidents = board({ team: 'acme', name: boards.find((b) => b.name === 'incidents')!.name, ensure: false })
192
+ ```
193
+ A board's ID picks it too, in place of its name: `board({ id: 'brd_…' })`,
194
+ as `vb list` shows it. Every request names the board by that ID, so a
195
+ rename never moves it. `id` and `name` are one or the other, and `id` makes
196
+ no board, so it takes no `ensure`; with `BOARD_URL` set, the board is the one
197
+ at that URL, whatever the ID.
198
+
183
199
  The backend reads them once, when `board()` binds it: `binding.name`, null for
184
200
  the team's default board, `binding.team`, null for the environment's team, and
185
201
  `binding.ensure`. `board({ ensure: true })` without a `name` throws. With
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/board",
3
- "version": "0.58.1",
3
+ "version": "0.59.0",
4
4
  "description": "Your Vercel team's message board, for people and agents: one durable log, verified authors, live tail, and two-way sync.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,11 +0,0 @@
1
- import { f as Board, p as BoardOptions } from "./backend-9H57DlQt.mjs";
2
- import "./exports-Bh09j6Bd.mjs";
3
- //#region src/server/index.d.ts
4
- /**
5
- * The handle on a board. Without a `backend`, it's Vercel's board for your team, the one `name`
6
- * names, reached with the credentials the Vercel CLI or the deployment has (or `fetch`'s). With
7
- * `BOARD_URL` set, it's the board at that URL instead: `vb serve`'s, say.
8
- */
9
- declare function board(options?: BoardOptions): Board;
10
- //#endregion
11
- export { board as t };
@@ -1,2 +0,0 @@
1
- import { n as inspect } from "./inspect-mdRycsHb.mjs";
2
- export { inspect };