@vercel/board 0.20.0 → 0.21.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 (31) hide show
  1. package/README.md +0 -25
  2. package/dist/{a2-D__qQpe7.mjs → a2-BgNAyr_f.mjs} +1 -1
  3. package/dist/backend-a2.mjs +1 -1
  4. package/dist/{backend-http-CG5y03UP.mjs → backend-http-CLcXkcAU.mjs} +190 -140
  5. package/dist/backend-http-Dzb4lpMG.mjs +18 -0
  6. package/dist/backend-http.mjs +1 -1
  7. package/dist/backend-http.node.mjs +1 -1
  8. package/dist/backend-vercel-BjUpoLR9.mjs +60 -0
  9. package/dist/backend-vercel-CYOqtLPc.d.mts +656 -0
  10. package/dist/backend-vercel-DjL8tYIF.mjs +1314 -0
  11. package/dist/backend-vercel.d.mts +9 -0
  12. package/dist/backend-vercel.mjs +11 -0
  13. package/dist/backend-vercel.node.d.mts +12 -0
  14. package/dist/backend-vercel.node.mjs +2 -0
  15. package/dist/cli-embedded.d.mts +5 -5
  16. package/dist/cli-embedded.mjs +6 -5
  17. package/dist/cli.mjs +3 -3
  18. package/dist/{exports-DqWJ7nzC.mjs → exports-DIivm0je.mjs} +1 -1
  19. package/dist/{index.default-C3luVnd-.mjs → index.default-DNKzR4md.mjs} +1 -1
  20. package/dist/index.mjs +2 -2
  21. package/dist/index.node.mjs +1 -1
  22. package/dist/inspect/app.js +29 -29
  23. package/dist/{main-wB-VfTCL.mjs → main-BZ7nOIhV.mjs} +75 -508
  24. package/dist/{backend-http-c-VHpUOs.mjs → node-BeKPcokJ.mjs} +15 -17
  25. package/dist/{serve-AnApUWOR.mjs → serve-8zkBGMmb.mjs} +3 -3
  26. package/dist/{server-BqVickb5.mjs → server-Du0rSpcW.mjs} +2 -2
  27. package/dist/{watchers-hash-DYwvkhdX.mjs → watchers-hash-9sxfL1Gd.mjs} +1 -1
  28. package/docs/03-guides/01-coding-agents.md +0 -94
  29. package/docs/04-reference/01-cli.md +26 -23
  30. package/docs/index.md +1 -2
  31. package/package.json +6 -1
@@ -0,0 +1,9 @@
1
+ import { n as VercelOptions, t as VercelBackend } from "./backend-vercel-CYOqtLPc.mjs";
2
+ //#region src/backend-vercel/index.default.d.ts
3
+ /**
4
+ * Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
5
+ * the team in: pass `team`, and a `fetch` that sends a token Vercel's API takes.
6
+ */
7
+ export declare function vercel(options?: VercelOptions): VercelBackend;
8
+ //#endregion
9
+ export type { VercelBackend, VercelOptions };
@@ -0,0 +1,11 @@
1
+ import { t as createVercel } from "./backend-vercel-DjL8tYIF.mjs";
2
+ //#region src/backend-vercel/index.default.ts
3
+ /**
4
+ * Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
5
+ * the team in: pass `team`, and a `fetch` that sends a token Vercel's API takes.
6
+ */
7
+ function vercel(options = {}) {
8
+ return createVercel(options, null);
9
+ }
10
+ //#endregion
11
+ export { vercel };
@@ -0,0 +1,12 @@
1
+ import { n as VercelOptions, t as VercelBackend } from "./backend-vercel-CYOqtLPc.mjs";
2
+ //#region src/backend-vercel/index.d.ts
3
+ /** Where `token` comes from, in words: what `vb whoami` says. */
4
+ export declare function credentialSource(): string;
5
+ /**
6
+ * Your team's board, in Vercel's API: this board keeps nothing, and reads and writes that one as
7
+ * this deployment's project, or as you. Without `board`, the team's board; without `fetch`, it
8
+ * sends the credentials the Vercel CLI or the deployment has.
9
+ */
10
+ export declare function vercel(options?: VercelOptions): VercelBackend;
11
+ //#endregion
12
+ export type { VercelBackend, VercelOptions };
@@ -0,0 +1,2 @@
1
+ import { n as vercel, t as credentialSource } from "./backend-vercel-BjUpoLR9.mjs";
2
+ export { credentialSource, vercel };
@@ -1,14 +1,14 @@
1
- import "./provider-D11Dfda0.mjs";
2
1
  import { d as Board } from "./backend-CWmd4UH-.mjs";
3
2
  import "./index-DsMPCv_K.mjs";
4
3
  //#region src/cli/main.d.ts
5
- /** The command word: the first argument that isn't a flag or a string flag's value. */
6
- export declare function commandWord(args: string[]): string | undefined;
4
+ /** The command word: the first argument that isn't a flag or a string flag's value (a bare `--mentions` takes none). */
5
+ export declare function commandWord(argv: string[]): string | undefined;
7
6
  //#endregion
8
7
  //#region src/cli/embedded.d.ts
9
8
  /**
10
- * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). An agent's hook
11
- * runs it the same way, by that name. `run` takes what follows the name, and answers the exit code:
9
+ * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
10
+ * URL anywhere, it talks to the team's board in Vercel's API: `VERCEL_ORG_ID`'s, the nearest linked
11
+ * project's team's (`.vercel`), your login's, or `--scope`'s. `run` takes what follows the name, and answers the exit code:
12
12
  * 0 success, 1 error, 2 misuse, 124 when `wait` times out. It never exits the process itself. One `run`
13
13
  * at a time: a run's flags are the CLI's while it runs.
14
14
  */
@@ -1,16 +1,17 @@
1
- import { n as main, r as mainWith, t as commandWord } from "./main-wB-VfTCL.mjs";
1
+ import { n as main, r as mainWith, t as commandWord } from "./main-BZ7nOIhV.mjs";
2
2
  //#region src/cli/embedded.ts
3
3
  /**
4
- * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). An agent's hook
5
- * runs it the same way, by that name. `run` takes what follows the name, and answers the exit code:
4
+ * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
5
+ * URL anywhere, it talks to the team's board in Vercel's API: `VERCEL_ORG_ID`'s, the nearest linked
6
+ * project's team's (`.vercel`), your login's, or `--scope`'s. `run` takes what follows the name, and answers the exit code:
6
7
  * 0 success, 1 error, 2 misuse, 124 when `wait` times out. It never exits the process itself. One `run`
7
8
  * at a time: a run's flags are the CLI's while it runs.
8
9
  */
9
10
  function createApp(options) {
10
11
  return { run: (args) => main(args, {
11
12
  name: options.appName,
12
- command: options.appName,
13
- commands: {}
13
+ commands: {},
14
+ teamBoard: true
14
15
  }) };
15
16
  }
16
17
  const lacking = (what) => async () => {
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as ATTACHMENT_BYTES_MAX } from "./files-SniSmeEr.mjs";
3
3
  import "./schemas-Be08nyfW.mjs";
4
- import { c as projectUrl, s as projectDir } from "./backend-http-c-VHpUOs.mjs";
5
- import { i as who, n as main } from "./main-wB-VfTCL.mjs";
4
+ import { o as projectDir, s as projectUrl } from "./node-BeKPcokJ.mjs";
5
+ import { i as who, n as main } from "./main-BZ7nOIhV.mjs";
6
6
  import { randomBytes, timingSafeEqual } from "node:crypto";
7
7
  import { readFile } from "node:fs/promises";
8
8
  import { join } from "node:path";
@@ -633,7 +633,7 @@ main(process.argv.slice(2), {
633
633
  if (args.length > 0) throw usage("usage: board serve [--port N] [--dir <dir>] [--no-inspect] [--no-open]");
634
634
  const port = portFlag();
635
635
  const root = projectDir();
636
- const { localHandle, serveLocal } = await import("./serve-AnApUWOR.mjs");
636
+ const { localHandle, serveLocal } = await import("./serve-8zkBGMmb.mjs");
637
637
  const handle = flags.handle ?? process.env.BOARD_HANDLE;
638
638
  const local = await serveLocal({
639
639
  dir: flags.dir ?? join(root, ".board"),
@@ -1,6 +1,6 @@
1
1
  import { t as ATTACHMENT_BYTES_MAX } from "./files-SniSmeEr.mjs";
2
2
  import "./schemas-Be08nyfW.mjs";
3
- import { A as ScheduleBody, B as SyncImportBody, C as LinkedQuery, D as ReactBody, E as PostBody, F as SyncAccountBody, G as TypingBody, H as SyncRootsQuery, I as SyncBody, K as UploadStartBody, L as SyncCodeBody, M as SignInQuery, N as SourceJoinBody, O as Ref, P as SourceReadQuery, R as SyncCopiesQuery, S as LabelBody, T as MessagesQuery, U as SyncUnlinkBody, V as SyncReceiptBody, W as ThreadsQuery, _ as IdentityUnlinkBody, b as InboxPushBody, c as openapi, d as readJson, f as VERSION, g as EventsQuery, h as EditBody, j as SchedulesQuery, k as RegisterBody, l as queryObject, m as AckBody, o as METHODS, p as SYNC, s as createRouter, u as readCapped, v as InboxAckBody, w as MatchesQuery, x as InboxQuery, y as InboxNextQuery, z as SyncFindQuery } from "./watchers-hash-DYwvkhdX.mjs";
3
+ import { A as ScheduleBody, B as SyncImportBody, C as LinkedQuery, D as ReactBody, E as PostBody, F as SyncAccountBody, G as TypingBody, H as SyncRootsQuery, I as SyncBody, K as UploadStartBody, L as SyncCodeBody, M as SignInQuery, N as SourceJoinBody, O as Ref, P as SourceReadQuery, R as SyncCopiesQuery, S as LabelBody, T as MessagesQuery, U as SyncUnlinkBody, V as SyncReceiptBody, W as ThreadsQuery, _ as IdentityUnlinkBody, b as InboxPushBody, c as openapi, d as readJson, f as VERSION, g as EventsQuery, h as EditBody, j as SchedulesQuery, k as RegisterBody, l as queryObject, m as AckBody, o as METHODS, p as SYNC, s as createRouter, u as readCapped, v as InboxAckBody, w as MatchesQuery, x as InboxQuery, y as InboxNextQuery, z as SyncFindQuery } from "./watchers-hash-9sxfL1Gd.mjs";
4
4
  import { n as createBoardClient, t as BoardError } from "./client-ClznIBMg.mjs";
5
5
  import { n as derivedId } from "./ids-C6AYo1bu.mjs";
6
6
  import { a as forbidden, c as toErrorResponse, l as unauthorized, n as RejectedError, o as json, r as badRequest, s as notFound, t as HttpError } from "./errors-CQ-fwxM3.mjs";
@@ -1,4 +1,4 @@
1
- import { t as createHttp } from "./backend-http-CG5y03UP.mjs";
1
+ import { r as createHttp } from "./backend-http-CLcXkcAU.mjs";
2
2
  //#region src/backend-http/index.default.ts
3
3
  /**
4
4
  * The board at `url`, which keeps the log. Outside Node there's no environment to find it or a
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { r as duration, t as BoardError } from "./client-ClznIBMg.mjs";
2
2
  import { t as HttpError } from "./errors-CQ-fwxM3.mjs";
3
- import { t as http } from "./index.default-C3luVnd-.mjs";
4
- import { t as createBoard } from "./exports-DqWJ7nzC.mjs";
3
+ import { t as http } from "./index.default-DNKzR4md.mjs";
4
+ import { t as createBoard } from "./exports-DIivm0je.mjs";
5
5
  import { t as DroppedError } from "./middleware-DUjyQP_a.mjs";
6
6
  //#region src/server/index.default.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  import { r as duration, t as BoardError } from "./client-ClznIBMg.mjs";
2
2
  import { t as HttpError } from "./errors-CQ-fwxM3.mjs";
3
3
  import { t as DroppedError } from "./middleware-DUjyQP_a.mjs";
4
- import { t as board } from "./server-BqVickb5.mjs";
4
+ import { t as board } from "./server-Du0rSpcW.mjs";
5
5
  export { BoardError, DroppedError, HttpError, board, duration };