@vercel/board 0.18.1 → 0.20.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 (64) hide show
  1. package/dist/{a2-CW8jHGD_.mjs → a2-D__qQpe7.mjs} +37 -6
  2. package/dist/access.mjs +3 -3
  3. package/dist/{actors-BOamkEuz.mjs → actors-rPnEQLZu.mjs} +2 -2
  4. package/dist/{auth-Drg9FiC2.mjs → auth-5nLsx9qB.mjs} +1 -1
  5. package/dist/{backend-B-SJ7p6p.d.mts → backend-CWmd4UH-.d.mts} +8 -1
  6. package/dist/backend-a2.d.mts +22 -2
  7. package/dist/backend-a2.mjs +1 -1
  8. package/dist/{backend-http-7cNb8nJI.d.mts → backend-http-BfWQfvqB.d.mts} +22 -2
  9. package/dist/{backend-http-CDDS7MLI.mjs → backend-http-CG5y03UP.mjs} +25 -6
  10. package/dist/{backend-http-BjH8jMDi.mjs → backend-http-c-VHpUOs.mjs} +19 -6
  11. package/dist/backend-http.d.mts +1 -1
  12. package/dist/backend-http.mjs +1 -1
  13. package/dist/backend-http.node.d.mts +1 -1
  14. package/dist/backend-http.node.mjs +1 -1
  15. package/dist/{chat-provider-DNJQyajS.d.mts → chat-provider-D0k3y8zY.d.mts} +4 -1
  16. package/dist/{chat-provider-YHy-WbrB.mjs → chat-provider-DnHibqnM.mjs} +4 -1
  17. package/dist/cli-embedded.d.mts +47 -0
  18. package/dist/cli-embedded.mjs +64 -0
  19. package/dist/cli.mjs +73 -1661
  20. package/dist/{client-BA-J7usH.mjs → client-ClznIBMg.mjs} +2 -0
  21. package/dist/{conformance-CT5EeHeC.mjs → conformance-DQ9qVzWP.mjs} +47 -6
  22. package/dist/conformance.d.mts +1 -1
  23. package/dist/conformance.mjs +1 -1
  24. package/dist/{engine-D0oBUBEK.mjs → engine-kHfSOXnQ.mjs} +15 -4
  25. package/dist/{errors-DX3hpwWt.mjs → errors-CQ-fwxM3.mjs} +13 -1
  26. package/dist/{exports-CwsfgCul.mjs → exports-DqWJ7nzC.mjs} +15 -6
  27. package/dist/exports-ggfE9jNv.d.mts +4 -0
  28. package/dist/index-DsMPCv_K.d.mts +11 -0
  29. package/dist/index.d.mts +4 -4
  30. package/dist/{index.default-jkA7eFFe.mjs → index.default-C3luVnd-.mjs} +1 -1
  31. package/dist/index.mjs +6 -6
  32. package/dist/index.node.d.mts +4 -12
  33. package/dist/index.node.mjs +4 -4
  34. package/dist/inspect/app.js +93 -92
  35. package/dist/inspect/engine.js +4 -4
  36. package/dist/main-wB-VfTCL.mjs +1744 -0
  37. package/dist/{middleware-CqaCwucP.mjs → middleware-DUjyQP_a.mjs} +1 -1
  38. package/dist/{provider-B0b9Qxw4.d.mts → provider-D11Dfda0.d.mts} +91 -22
  39. package/dist/{provider-B3DpYSDq.mjs → provider-poIkXapd.mjs} +4 -0
  40. package/dist/{serve-Dpb7zMJ0.mjs → serve-AnApUWOR.mjs} +4 -4
  41. package/dist/{server-Bj1_ugXd.mjs → server-BqVickb5.mjs} +4 -4
  42. package/dist/{serving-CNkgUPW1.mjs → serving-B307gppu.mjs} +1 -1
  43. package/dist/sync-github.d.mts +2 -2
  44. package/dist/sync-github.mjs +2 -2
  45. package/dist/sync-kapso.d.mts +2 -2
  46. package/dist/sync-kapso.mjs +2 -2
  47. package/dist/sync-linear.d.mts +2 -2
  48. package/dist/sync-linear.mjs +2 -2
  49. package/dist/sync-slack.d.mts +11 -2
  50. package/dist/sync-slack.mjs +57 -17
  51. package/dist/sync.chat.d.mts +1 -1
  52. package/dist/sync.chat.mjs +1 -1
  53. package/dist/sync.d.mts +1 -1
  54. package/dist/sync.mjs +1 -1
  55. package/dist/{tokens-DhuzKzAl.mjs → tokens-DUXaXwOj.mjs} +2 -2
  56. package/dist/{watchers-hash-qlnbKQQ0.mjs → watchers-hash-DYwvkhdX.mjs} +38 -7
  57. package/docs/01-board/06-watchers.md +7 -0
  58. package/docs/02-sync/03-slack.md +14 -1
  59. package/docs/02-sync/06-providers.md +1 -0
  60. package/docs/04-reference/01-cli.md +55 -3
  61. package/docs/04-reference/02-board.md +8 -3
  62. package/docs/04-reference/03-http.md +7 -4
  63. package/package.json +5 -1
  64. package/dist/exports-ZsgjzEnM.d.mts +0 -4
@@ -291,6 +291,8 @@ function createBoardClient(options) {
291
291
  target,
292
292
  ...opts
293
293
  })}`),
294
+ /** Adds the app to a public channel so `readSource` can read it, where the sync opted in with `join`. Full access only. */
295
+ joinSource: (key, target) => call("POST", `/sources/${key}/join`, { body: { target } }),
294
296
  poll,
295
297
  /** A platform's write, as its platform author: idempotent per platform event for a post, found from its origin otherwise. */
296
298
  syncImport: (body) => call("POST", "/sync/imports", { body }),
@@ -1,4 +1,4 @@
1
- import { t as BoardError } from "./client-BA-J7usH.mjs";
1
+ import { t as BoardError } from "./client-ClznIBMg.mjs";
2
2
  //#region src/conformance/index.ts
3
3
  var Mismatch = class extends Error {};
4
4
  const show = (value) => JSON.stringify(value) ?? String(value);
@@ -17,6 +17,14 @@ async function rejects(attempt, status, code, what) {
17
17
  }
18
18
  throw new Mismatch(`${what}: expected ${status} ${code}, and it succeeded`);
19
19
  }
20
+ /** Where a registration is woken, to put back after a check replaces it: its path (and branch) on a board that wakes by path, or its url. */
21
+ function wokenAt(registered) {
22
+ if (!registered?.path) return { url: registered?.url ?? null };
23
+ return {
24
+ path: registered.path,
25
+ ...registered.branch ? { branch: registered.branch } : {}
26
+ };
27
+ }
20
28
  /** An ID or cursor as the protocol shapes them: a string of 1 to 128 characters. */
21
29
  function isRef(value, what) {
22
30
  check(typeof value === "string" && value.length >= 1 && value.length <= 128, `${what} should be a string of 1 to 128 characters, got ${show(value)}`);
@@ -274,7 +282,7 @@ const CHECKS = [
274
282
  run: async (ctx) => {
275
283
  const registered = (await ctx.board.watchers()).find((r) => r.owner === ctx.me.principal);
276
284
  if (registered && (Object.keys(registered.watch).length > 0 || (registered.sync?.length ?? 0) > 0)) return "this token has watchers or a sync registered here, and checking would replace them";
277
- const url = registered?.url ?? null;
285
+ const where = wokenAt(registered);
278
286
  await ctx.board.register({
279
287
  url: null,
280
288
  watch: { conformance: { tail: `${ctx.channel} --label conformance=${ctx.labels.conformance}` } }
@@ -290,7 +298,40 @@ const CHECKS = [
290
298
  await rejects(ctx.board.ack(match.id, { lease: match.lease }), 404, "no_match", "acking a match twice");
291
299
  } finally {
292
300
  await ctx.board.register({
293
- url,
301
+ ...where,
302
+ watch: {}
303
+ });
304
+ }
305
+ }
306
+ },
307
+ {
308
+ group: "watchers",
309
+ name: "wakes by path only where its discovery says so, and only a Vercel project",
310
+ run: async (ctx) => {
311
+ const registered = (await ctx.board.watchers()).find((r) => r.owner === ctx.me.principal);
312
+ if (registered && (Object.keys(registered.watch).length > 0 || (registered.sync?.length ?? 0) > 0)) return "this token has watchers or a sync registered here, and checking would replace them";
313
+ const byPath = (await ctx.board.discovery()).wake_by_path;
314
+ const environment = /^vercel:project:[^:]+:(.+)$/.exec(ctx.me.principal)?.[1] ?? null;
315
+ if (byPath && environment !== null && environment !== "production" && environment !== "preview") return `a path wakes production or a preview, and this token is ${environment}'s`;
316
+ const where = wokenAt(registered);
317
+ const branch = environment === "preview" ? { branch: "conformance" } : {};
318
+ const attempt = () => ctx.board.register({
319
+ path: "/conformance",
320
+ ...branch,
321
+ watch: {}
322
+ });
323
+ try {
324
+ if (!byPath) await rejects(attempt(), 501, "no_wake_by_path", "a path, on a board that wakes only urls");
325
+ else if (environment === null) await rejects(attempt(), 403, "not_a_project", "a path, from a token that isn't a Vercel project's");
326
+ else {
327
+ const view = await attempt();
328
+ same(view.path, "/conformance", "the registration's path");
329
+ same(view.url, null, "the registration's url");
330
+ same(view.branch ?? null, environment === "preview" ? "conformance" : null, "the registration's branch");
331
+ }
332
+ } finally {
333
+ await ctx.board.register({
334
+ ...where,
294
335
  watch: {}
295
336
  });
296
337
  }
@@ -315,7 +356,7 @@ const CHECKS = [
315
356
  };
316
357
  const registered = (await ctx.board.watchers()).find((registration) => registration.owner === ctx.me.principal);
317
358
  if (registered && (Object.keys(registered.watch).length > 0 || (registered.sync?.length ?? 0) > 0)) return "this token has watchers or a sync registered here, which registering would replace";
318
- const url = registered?.url ?? null;
359
+ const where = wokenAt(registered);
319
360
  try {
320
361
  await ctx.board.register({
321
362
  url: null,
@@ -350,7 +391,7 @@ const CHECKS = [
350
391
  });
351
392
  } catch (error) {
352
393
  await ctx.board.register({
353
- url,
394
+ ...where,
354
395
  watch: {}
355
396
  }).catch(() => {});
356
397
  if (error instanceof BoardError && error.status === 403) return `this token can't sync in ${ctx.channel}`;
@@ -431,7 +472,7 @@ const CHECKS = [
431
472
  }
432
473
  }).catch(() => {});
433
474
  await ctx.board.register({
434
- url,
475
+ ...where,
435
476
  watch: {}
436
477
  }).catch(() => {});
437
478
  }
@@ -1,4 +1,4 @@
1
- import { d as Board } from "./backend-B-SJ7p6p.mjs";
1
+ import { d as Board } from "./backend-CWmd4UH-.mjs";
2
2
  //#region src/conformance/index.d.ts
3
3
  /**
4
4
  * Checks that a board speaks the protocol, through a handle on it (`conformance(board())`), as
@@ -1,2 +1,2 @@
1
- import { t as conformance } from "./conformance-CT5EeHeC.mjs";
1
+ import { t as conformance } from "./conformance-DQ9qVzWP.mjs";
2
2
  export { conformance };
@@ -3,11 +3,11 @@ import { C as toStorable, c as ChannelPath, m as MESSAGE_TEXT_MAX } from "./sche
3
3
  import { c as externalMessageKey, l as isThreadTarget, s as channelOf } from "./external-BV_cUncs.mjs";
4
4
  import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
5
5
  import { n as derivedId } from "./ids-C6AYo1bu.mjs";
6
- import { r as badRequest, s as notFound, t as HttpError } from "./errors-DX3hpwWt.mjs";
6
+ import { r as badRequest, s as notFound, t as HttpError } from "./errors-CQ-fwxM3.mjs";
7
7
  import { n as replaceMentions } from "./mentions-CB6ShY4R.mjs";
8
- import { t as DroppedError } from "./middleware-CqaCwucP.mjs";
8
+ import { t as DroppedError } from "./middleware-DUjyQP_a.mjs";
9
9
  import { n as waitUntil, t as afterRetry } from "./attempts-CLG840Oj.mjs";
10
- import { a as channelMissing, i as UnreadableError, n as ResolvedTarget, o as routesFor, t as ReceivedEvent } from "./provider-B3DpYSDq.mjs";
10
+ import { a as channelMissing, i as UnreadableError, n as ResolvedTarget, o as routesFor, t as ReceivedEvent } from "./provider-poIkXapd.mjs";
11
11
  import { a as immutable, n as SyncOverrides } from "./events-CewD4kw7.mjs";
12
12
  import { t as displayText } from "./bots-CGkO76qH.mjs";
13
13
  //#region src/sync/engine.ts
@@ -1509,6 +1509,16 @@ function createSyncEngine(entries) {
1509
1509
  throw badRequest(`can't read ${target} from ${key}: ${describe(error)}`, "platform_error");
1510
1510
  }
1511
1511
  }
1512
+ /** Adds the app to a channel so it can be read on demand: nothing is synced or stored. */
1513
+ async function joinSource(key, target) {
1514
+ const platform = platformOf(key);
1515
+ try {
1516
+ return await platform.join(target);
1517
+ } catch (error) {
1518
+ if (error instanceof UnreadableError) throw new HttpError(unreadableStatus(error.code), error.code, error.message);
1519
+ throw badRequest(`can't join ${target} on ${key}: ${describe(error)}`, "platform_error");
1520
+ }
1521
+ }
1512
1522
  return {
1513
1523
  entries,
1514
1524
  bind(next) {
@@ -1528,7 +1538,8 @@ function createSyncEngine(entries) {
1528
1538
  signedIn,
1529
1539
  redeemSignIn,
1530
1540
  typing,
1531
- readSource
1541
+ readSource,
1542
+ joinSource
1532
1543
  };
1533
1544
  }
1534
1545
  //#endregion
@@ -29,6 +29,18 @@ const json = (body, status = 200, headers) => new Response(JSON.stringify(body),
29
29
  ...headers
30
30
  }
31
31
  });
32
+ /**
33
+ * The issue a request is told about. A union that matched no option says only "Invalid input", so
34
+ * it's the first issue of the option that came closest, the one with the fewest, at its own path.
35
+ */
36
+ function reported(issue) {
37
+ if (issue.code !== "invalid_union" || issue.errors.length === 0) return issue;
38
+ const first = issue.errors.reduce((best, option) => option.length < best.length ? option : best)[0];
39
+ return first ? reported({
40
+ ...first,
41
+ path: [...issue.path, ...first.path]
42
+ }) : issue;
43
+ }
32
44
  /** Every failure becomes `{ error: { code, message } }` with a matching status. */
33
45
  function toErrorResponse(error) {
34
46
  if (error instanceof RejectedError) return error.response;
@@ -37,7 +49,7 @@ function toErrorResponse(error) {
37
49
  message: error.message
38
50
  } }, error.status);
39
51
  if (error instanceof ZodError) {
40
- const issue = error.issues[0];
52
+ const issue = error.issues[0] && reported(error.issues[0]);
41
53
  const path = issue?.path.length ? `${issue.path.join(".")}: ` : "";
42
54
  return json({ error: {
43
55
  code: "invalid_request",
@@ -1,12 +1,12 @@
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 SyncReceiptBody, C as LinkedQuery, D as ReactBody, E as PostBody, F as SyncBody, G as UploadStartBody, H as SyncUnlinkBody, I as SyncCodeBody, L as SyncCopiesQuery, M as SignInQuery, N as SourceReadQuery, O as Ref, P as SyncAccountBody, R as SyncFindQuery, S as LabelBody, T as MessagesQuery, U as ThreadsQuery, V as SyncRootsQuery, W as TypingBody, _ 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 SyncImportBody } from "./watchers-hash-qlnbKQQ0.mjs";
4
- import { n as createBoardClient, t as BoardError } from "./client-BA-J7usH.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";
4
+ import { n as createBoardClient, t as BoardError } from "./client-ClznIBMg.mjs";
5
5
  import { n as derivedId } from "./ids-C6AYo1bu.mjs";
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-DX3hpwWt.mjs";
7
- import { d as issuersOf, g as verifiesTokens, l as hostPrincipal, o as createAuthority, s as fromTokens } from "./auth-Drg9FiC2.mjs";
8
- import { i as resolveActor, r as claimsOf, t as KNOWN_AGENTS } from "./actors-BOamkEuz.mjs";
9
- import { r as runMiddleware, t as DroppedError } from "./middleware-CqaCwucP.mjs";
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";
7
+ import { d as issuersOf, g as verifiesTokens, l as hostPrincipal, o as createAuthority, s as fromTokens } from "./auth-5nLsx9qB.mjs";
8
+ import { i as resolveActor, r as claimsOf, t as KNOWN_AGENTS } from "./actors-rPnEQLZu.mjs";
9
+ import { r as runMiddleware, t as DroppedError } from "./middleware-DUjyQP_a.mjs";
10
10
  import { n as syncTarget, r as withEmailMentions, t as mentionsEmails } from "./targets-C-wdR5wP.mjs";
11
11
  //#region src/server/policy.ts
12
12
  /**
@@ -298,6 +298,10 @@ async function inputOf(name, request, url, params) {
298
298
  key,
299
299
  ...SourceReadQuery.parse(queryObject(url))
300
300
  };
301
+ case "joinSource": return {
302
+ key,
303
+ ...SourceJoinBody.parse(await body())
304
+ };
301
305
  case "linked": return LinkedQuery.parse(queryObject(url));
302
306
  }
303
307
  }
@@ -1087,6 +1091,10 @@ async function createServe(context) {
1087
1091
  if (!engine || !entries[key]) throw notFound(`this board doesn't run sync entry ${key}: read it where its sync runs`, "not_synced_here");
1088
1092
  return engine.readSource(key, target, limit);
1089
1093
  },
1094
+ async joinSource(key, target) {
1095
+ if (!engine || !entries[key]) throw notFound(`this board doesn't run sync entry ${key}: join it where its sync runs`, "not_synced_here");
1096
+ return engine.joinSource(key, target);
1097
+ },
1090
1098
  typing: async (messages, status) => engine ? engine.typing(messages, status) : []
1091
1099
  };
1092
1100
  }
@@ -1220,6 +1228,7 @@ function createBoard(options, runtime) {
1220
1228
  pull: async () => ownEntries.length > 0 ? (await server()).pull() : 0,
1221
1229
  sync: ownEntries,
1222
1230
  readSource: async (key, target, limit) => (await server()).readSource(key, target, limit),
1231
+ joinSource: async (key, target) => (await server()).joinSource(key, target),
1223
1232
  locate: (url) => {
1224
1233
  const read = /* @__PURE__ */ new Map();
1225
1234
  for (const entry of Object.values(entries)) {
@@ -0,0 +1,4 @@
1
+ import "./auth-CU56Q2Xh.mjs";
2
+ import "./schemas-CWxs3ECJ.mjs";
3
+ import "./provider-D11Dfda0.mjs";
4
+ import "./backend-CWmd4UH-.mjs";
@@ -0,0 +1,11 @@
1
+ import { d as Board, f as BoardOptions } from "./backend-CWmd4UH-.mjs";
2
+ import "./exports-ggfE9jNv.mjs";
3
+ //#region src/server/index.d.ts
4
+ /**
5
+ * The handle on a board. With a `backend`, the board lives there: `a2()` keeps it in this
6
+ * deployment, `http(url)` uses another. Without one, it's `http()` to the board the environment
7
+ * points at: `BOARD_URL`, then the repo's link (`vb link`, `vb serve`), then `vb use`'s.
8
+ */
9
+ declare function board(options?: BoardOptions): Board;
10
+ //#endregion
11
+ export { board as t };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { a as CallerRequest, o as Claims } from "./auth-CU56Q2Xh.mjs";
2
2
  import { i as Attachment } from "./schemas-CWxs3ECJ.mjs";
3
- import { $ as Discovery, $t as SyncFindInput, At as Ref, B as ReplyOptions, Bt as SchedulesQueryInput, Ct as MessagesQueryInput, Dt as PostInput, Et as PostBody, Ft as ScheduleBody, G as Written, Gt as SourceReadQuery, H as ScheduleTiming, Ht as SignInQuery, I as BoardError, It as ScheduleBodyOutput, J as ActorView, Jt as SyncBody, K as duration, Kt as SyncAccountBody, L as Filters, Lt as ScheduleInput, Mt as RegistrationView, Nt as ResolvedSyncTarget, Ot as REGISTERED_WATCHERS_MAX, Pt as RouteName, Q as DeleteBody, Qt as SyncCopiesView, R as PostOptions, Rt as ScheduleView, St as MessagesQuery, Tt as PersonView, U as UploadInput, Ut as SourceMessage, V as ScheduleOptions, Vt as SchedulesQueryOutput, W as WaitOptions, Wt as SourceRead, X as BoardEventView, Xt as SyncCodeView, Y as ApiError, Yt as SyncCodeBody, Z as ChannelView, Zt as SyncCopiesQuery, _n as UploadStartBody, _t as MatchView, an as SyncReceiptInput, at as IdentityUnlinkBody, bt as MessageView, cn as SyncUnlinkBody, ct as InboxEntry, dn as ThreadView, dt as InboxPushBody, en as SyncFindQuery, et as EditBody, fn as ThreadsPage, ft as InboxQuery, gn as TypingResult, gt as LinkedQuery, hn as TypingBody, ht as LinkedAccount, in as SyncReceiptBody, it as FiltersInput, jt as RegisterBody, kt as ReactBody, ln as SyncedView, lt as InboxItem, mn as ThreadsQueryInput, mt as LinkView, nn as SyncImportBody, nt as EventsQuery, on as SyncRootsQuery, ot as IdentityView, pn as ThreadsQuery, pt as LabelBody, q as AckBody, qt as SyncAccountInput, rn as SyncImportInput, rt as EventsQueryInput, sn as SyncThreadView, st as InboxAckBody, tn as SyncFindView, tt as EventsPage, un as ThreadSummaryView, ut as InboxNextQuery, vn as UploadTicket, vt as MatchesQuery, wt as ParsedFilters, xt as MessagesPage, yn as routes, yt as Me, z as ProfileOption, zt as SchedulesQuery } from "./provider-B0b9Qxw4.mjs";
4
- import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-B-SJ7p6p.mjs";
5
- import "./exports-ZsgjzEnM.mjs";
3
+ import { $ as Discovery, $t as SyncCodeView, At as Ref, B as ReplyOptions, Bt as SchedulesQuery, Ct as MessagesQueryInput, Dt as PostInput, Et as PostBody, Ft as RouteName, G as Written, Gt as SourceJoinBody, H as ScheduleTiming, Ht as SchedulesQueryOutput, I as BoardError, It as ScheduleBody, J as ActorView, Jt as SourceReadQuery, K as duration, Kt as SourceMessage, L as Filters, Lt as ScheduleBodyOutput, Mt as RegisterInput, Nt as RegistrationView, Ot as REGISTERED_WATCHERS_MAX, Pt as ResolvedSyncTarget, Q as DeleteBody, Qt as SyncCodeBody, R as PostOptions, Rt as ScheduleInput, Sn as routes, St as MessagesQuery, Tt as PersonView, U as UploadInput, Ut as SignInQuery, V as ScheduleOptions, Vt as SchedulesQueryInput, W as WaitOptions, Wt as SourceJoin, X as BoardEventView, Xt as SyncAccountInput, Y as ApiError, Yt as SyncAccountBody, Z as ChannelView, Zt as SyncBody, _n as ThreadsQueryInput, _t as MatchView, an as SyncImportBody, at as IdentityUnlinkBody, bn as UploadStartBody, bt as MessageView, cn as SyncReceiptInput, ct as InboxEntry, dn as SyncUnlinkBody, dt as InboxPushBody, en as SyncCopiesQuery, et as EditBody, fn as SyncedView, ft as InboxQuery, gn as ThreadsQuery, gt as LinkedQuery, hn as ThreadsPage, ht as LinkedAccount, in as SyncFindView, it as FiltersInput, jt as RegisterBody, kt as ReactBody, ln as SyncRootsQuery, lt as InboxItem, mn as ThreadView, mt as LinkView, nn as SyncFindInput, nt as EventsQuery, on as SyncImportInput, ot as IdentityView, pn as ThreadSummaryView, pt as LabelBody, q as AckBody, qt as SourceRead, rn as SyncFindQuery, rt as EventsQueryInput, sn as SyncReceiptBody, st as InboxAckBody, tn as SyncCopiesView, tt as EventsPage, un as SyncThreadView, ut as InboxNextQuery, vn as TypingBody, vt as MatchesQuery, wt as ParsedFilters, xn as UploadTicket, xt as MessagesPage, yn as TypingResult, yt as Me, z as ProfileOption, zt as ScheduleView } from "./provider-D11Dfda0.mjs";
4
+ import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-CWmd4UH-.mjs";
5
+ import "./exports-ggfE9jNv.mjs";
6
6
  //#region src/server/index.default.d.ts
7
7
  /**
8
8
  * The handle on a board. Outside Node there's no environment to find one in, so pass its
@@ -10,4 +10,4 @@ import "./exports-ZsgjzEnM.mjs";
10
10
  */
11
11
  export declare function board(options?: BoardOptions): Board;
12
12
  //#endregion
13
- export { type AckBody, type ActorView, type ApiError, type Attachment, type Backend, type BackendRoute, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type ChannelView, type Claims, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type Filters, type FiltersInput, HttpError, type Identity, type IdentityUnlinkBody, type IdentityView, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LabelBody, type LinkView, type LinkedAccount, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PersonView, type PostBody, type PostInput, type PostOptions, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SelfCaller, type SignInQuery, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncAccountBody, type SyncAccountInput, type SyncBody, type SyncCodeBody, type SyncCodeView, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncRootsQuery, type SyncThreadView, type SyncUnlinkBody, type SyncedView, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, duration, type routes };
13
+ export { type AckBody, type ActorView, type ApiError, type Attachment, type Backend, type BackendRoute, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type ChannelView, type Claims, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type Filters, type FiltersInput, HttpError, type Identity, type IdentityUnlinkBody, type IdentityView, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LabelBody, type LinkView, type LinkedAccount, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PersonView, type PostBody, type PostInput, type PostOptions, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SelfCaller, type SignInQuery, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncAccountBody, type SyncAccountInput, type SyncBody, type SyncCodeBody, type SyncCodeView, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncRootsQuery, type SyncThreadView, type SyncUnlinkBody, type SyncedView, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, duration, type routes };
@@ -1,4 +1,4 @@
1
- import { t as createHttp } from "./backend-http-CDDS7MLI.mjs";
1
+ import { t as createHttp } from "./backend-http-CG5y03UP.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,8 +1,8 @@
1
- import { r as duration, t as BoardError } from "./client-BA-J7usH.mjs";
2
- import { t as HttpError } from "./errors-DX3hpwWt.mjs";
3
- import { t as http } from "./index.default-jkA7eFFe.mjs";
4
- import { t as createBoard } from "./exports-CwsfgCul.mjs";
5
- import { t as DroppedError } from "./middleware-CqaCwucP.mjs";
1
+ import { r as duration, t as BoardError } from "./client-ClznIBMg.mjs";
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";
5
+ import { t as DroppedError } from "./middleware-DUjyQP_a.mjs";
6
6
  //#region src/server/index.default.ts
7
7
  /**
8
8
  * The handle on a board. Outside Node there's no environment to find one in, so pass its
@@ -11,7 +11,7 @@ import { t as DroppedError } from "./middleware-CqaCwucP.mjs";
11
11
  function board(options = {}) {
12
12
  return createBoard(options, {
13
13
  http: () => http(),
14
- sync: () => import("./engine-D0oBUBEK.mjs"),
14
+ sync: () => import("./engine-kHfSOXnQ.mjs"),
15
15
  serving: null
16
16
  });
17
17
  }
@@ -1,14 +1,6 @@
1
1
  import { a as CallerRequest, o as Claims } from "./auth-CU56Q2Xh.mjs";
2
2
  import { i as Attachment } from "./schemas-CWxs3ECJ.mjs";
3
- import { $ as Discovery, $t as SyncFindInput, At as Ref, B as ReplyOptions, Bt as SchedulesQueryInput, Ct as MessagesQueryInput, Dt as PostInput, Et as PostBody, Ft as ScheduleBody, G as Written, Gt as SourceReadQuery, H as ScheduleTiming, Ht as SignInQuery, I as BoardError, It as ScheduleBodyOutput, J as ActorView, Jt as SyncBody, K as duration, Kt as SyncAccountBody, L as Filters, Lt as ScheduleInput, Mt as RegistrationView, Nt as ResolvedSyncTarget, Ot as REGISTERED_WATCHERS_MAX, Pt as RouteName, Q as DeleteBody, Qt as SyncCopiesView, R as PostOptions, Rt as ScheduleView, St as MessagesQuery, Tt as PersonView, U as UploadInput, Ut as SourceMessage, V as ScheduleOptions, Vt as SchedulesQueryOutput, W as WaitOptions, Wt as SourceRead, X as BoardEventView, Xt as SyncCodeView, Y as ApiError, Yt as SyncCodeBody, Z as ChannelView, Zt as SyncCopiesQuery, _n as UploadStartBody, _t as MatchView, an as SyncReceiptInput, at as IdentityUnlinkBody, bt as MessageView, cn as SyncUnlinkBody, ct as InboxEntry, dn as ThreadView, dt as InboxPushBody, en as SyncFindQuery, et as EditBody, fn as ThreadsPage, ft as InboxQuery, gn as TypingResult, gt as LinkedQuery, hn as TypingBody, ht as LinkedAccount, in as SyncReceiptBody, it as FiltersInput, jt as RegisterBody, kt as ReactBody, ln as SyncedView, lt as InboxItem, mn as ThreadsQueryInput, mt as LinkView, nn as SyncImportBody, nt as EventsQuery, on as SyncRootsQuery, ot as IdentityView, pn as ThreadsQuery, pt as LabelBody, q as AckBody, qt as SyncAccountInput, rn as SyncImportInput, rt as EventsQueryInput, sn as SyncThreadView, st as InboxAckBody, tn as SyncFindView, tt as EventsPage, un as ThreadSummaryView, ut as InboxNextQuery, vn as UploadTicket, vt as MatchesQuery, wt as ParsedFilters, xt as MessagesPage, yn as routes, yt as Me, z as ProfileOption, zt as SchedulesQuery } from "./provider-B0b9Qxw4.mjs";
4
- import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-B-SJ7p6p.mjs";
5
- import "./exports-ZsgjzEnM.mjs";
6
- //#region src/server/index.d.ts
7
- /**
8
- * The handle on a board. With a `backend`, the board lives there: `a2()` keeps it in this
9
- * deployment, `http(url)` uses another. Without one, it's `http()` to the board the environment
10
- * points at: `BOARD_URL`, then the repo's link (`vb link`, `vb serve`), then `vb use`'s.
11
- */
12
- export declare function board(options?: BoardOptions): Board;
13
- //#endregion
14
- export { type AckBody, type ActorView, type ApiError, type Attachment, type Backend, type BackendRoute, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type ChannelView, type Claims, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type Filters, type FiltersInput, HttpError, type Identity, type IdentityUnlinkBody, type IdentityView, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LabelBody, type LinkView, type LinkedAccount, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PersonView, type PostBody, type PostInput, type PostOptions, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SelfCaller, type SignInQuery, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncAccountBody, type SyncAccountInput, type SyncBody, type SyncCodeBody, type SyncCodeView, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncRootsQuery, type SyncThreadView, type SyncUnlinkBody, type SyncedView, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, duration, type routes };
3
+ import { $ as Discovery, $t as SyncCodeView, At as Ref, B as ReplyOptions, Bt as SchedulesQuery, Ct as MessagesQueryInput, Dt as PostInput, Et as PostBody, Ft as RouteName, G as Written, Gt as SourceJoinBody, H as ScheduleTiming, Ht as SchedulesQueryOutput, I as BoardError, It as ScheduleBody, J as ActorView, Jt as SourceReadQuery, K as duration, Kt as SourceMessage, L as Filters, Lt as ScheduleBodyOutput, Mt as RegisterInput, Nt as RegistrationView, Ot as REGISTERED_WATCHERS_MAX, Pt as ResolvedSyncTarget, Q as DeleteBody, Qt as SyncCodeBody, R as PostOptions, Rt as ScheduleInput, Sn as routes, St as MessagesQuery, Tt as PersonView, U as UploadInput, Ut as SignInQuery, V as ScheduleOptions, Vt as SchedulesQueryInput, W as WaitOptions, Wt as SourceJoin, X as BoardEventView, Xt as SyncAccountInput, Y as ApiError, Yt as SyncAccountBody, Z as ChannelView, Zt as SyncBody, _n as ThreadsQueryInput, _t as MatchView, an as SyncImportBody, at as IdentityUnlinkBody, bn as UploadStartBody, bt as MessageView, cn as SyncReceiptInput, ct as InboxEntry, dn as SyncUnlinkBody, dt as InboxPushBody, en as SyncCopiesQuery, et as EditBody, fn as SyncedView, ft as InboxQuery, gn as ThreadsQuery, gt as LinkedQuery, hn as ThreadsPage, ht as LinkedAccount, in as SyncFindView, it as FiltersInput, jt as RegisterBody, kt as ReactBody, ln as SyncRootsQuery, lt as InboxItem, mn as ThreadView, mt as LinkView, nn as SyncFindInput, nt as EventsQuery, on as SyncImportInput, ot as IdentityView, pn as ThreadSummaryView, pt as LabelBody, q as AckBody, qt as SourceRead, rn as SyncFindQuery, rt as EventsQueryInput, sn as SyncReceiptBody, st as InboxAckBody, tn as SyncCopiesView, tt as EventsPage, un as SyncThreadView, ut as InboxNextQuery, vn as TypingBody, vt as MatchesQuery, wt as ParsedFilters, xn as UploadTicket, xt as MessagesPage, yn as TypingResult, yt as Me, z as ProfileOption, zt as ScheduleView } from "./provider-D11Dfda0.mjs";
4
+ import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-CWmd4UH-.mjs";
5
+ import { t as board } from "./index-DsMPCv_K.mjs";
6
+ export { type AckBody, type ActorView, type ApiError, type Attachment, type Backend, type BackendRoute, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type ChannelView, type Claims, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type Filters, type FiltersInput, HttpError, type Identity, type IdentityUnlinkBody, type IdentityView, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LabelBody, type LinkView, type LinkedAccount, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PersonView, type PostBody, type PostInput, type PostOptions, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SelfCaller, type SignInQuery, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncAccountBody, type SyncAccountInput, type SyncBody, type SyncCodeBody, type SyncCodeView, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncRootsQuery, type SyncThreadView, type SyncUnlinkBody, type SyncedView, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, board, duration, type routes };
@@ -1,5 +1,5 @@
1
- import { r as duration, t as BoardError } from "./client-BA-J7usH.mjs";
2
- import { t as HttpError } from "./errors-DX3hpwWt.mjs";
3
- import { t as DroppedError } from "./middleware-CqaCwucP.mjs";
4
- import { t as board } from "./server-Bj1_ugXd.mjs";
1
+ import { r as duration, t as BoardError } from "./client-ClznIBMg.mjs";
2
+ import { t as HttpError } from "./errors-CQ-fwxM3.mjs";
3
+ import { t as DroppedError } from "./middleware-DUjyQP_a.mjs";
4
+ import { t as board } from "./server-BqVickb5.mjs";
5
5
  export { BoardError, DroppedError, HttpError, board, duration };