@vercel/board 0.58.0 → 0.58.1

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 (36) hide show
  1. package/dist/backend-local.mjs +1 -1
  2. package/dist/backend-postgres.mjs +2 -2
  3. package/dist/{chat-provider-BiJ8G6KY.d.mts → chat-provider-CW-YpGWe.d.mts} +4 -3
  4. package/dist/{chat-provider-Br2RXgLV.mjs → chat-provider-eRYSL4XG.mjs} +4 -4
  5. package/dist/cli-commands.mjs +1 -1
  6. package/dist/cli-embedded.mjs +2 -2
  7. package/dist/cli.mjs +6 -6
  8. package/dist/{commands-totPnoCC.mjs → commands-CkRYuvpd.mjs} +1 -0
  9. package/dist/{exports-WtqjdQwb.mjs → exports-CREw274K.mjs} +2 -2
  10. package/dist/index.mjs +1 -1
  11. package/dist/index.node.mjs +2 -2
  12. package/dist/inspect/app.js +1 -1
  13. package/dist/{inspect-CtPZz0WG.mjs → inspect-mdRycsHb.mjs} +2 -2
  14. package/dist/inspect-rfTRL8zp.mjs +2 -0
  15. package/dist/inspect.mjs +1 -1
  16. package/dist/{local-BPiDCkA4.mjs → local-B9UwaY2z.mjs} +2 -2
  17. package/dist/{local-B7Yp-B2z.mjs → local-DMQ-Eh6v.mjs} +2 -2
  18. package/dist/{main-BvkLqpUX.mjs → main-C7B22rE4.mjs} +14 -8
  19. package/dist/{serve-ChlJ955x.mjs → serve-C3B6EP7W.mjs} +3 -3
  20. package/dist/{server-CRdVLqny.mjs → server-D5S70_au.mjs} +3 -3
  21. package/dist/{shell-hTUuAc6A.mjs → shell-U3QkDJIF.mjs} +1 -1
  22. package/dist/sync-chat-sdk.d.mts +1 -1
  23. package/dist/sync-chat-sdk.mjs +1 -1
  24. package/dist/sync-github.d.mts +1 -1
  25. package/dist/sync-github.mjs +1 -1
  26. package/dist/sync-linear.d.mts +1 -1
  27. package/dist/sync-linear.mjs +1 -1
  28. package/dist/sync-slack.d.mts +21 -4
  29. package/dist/sync-slack.mjs +33 -2
  30. package/dist/{task-batch-CnRhVsh6.mjs → task-batch-BLUkrUqX.mjs} +2 -2
  31. package/dist/{version-rlZkE9nc.mjs → version-D3WaVccj.mjs} +1 -1
  32. package/docs/02-sync/03-slack.md +5 -0
  33. package/docs/02-sync/05-managed.md +2 -2
  34. package/docs/04-reference/01-cli.md +4 -4
  35. package/package.json +1 -1
  36. package/dist/inspect-wkA_8iyU.mjs +0 -2
@@ -1,2 +1,2 @@
1
- import { t as local } from "./local-BPiDCkA4.mjs";
1
+ import { t as local } from "./local-B9UwaY2z.mjs";
2
2
  export { local };
@@ -1,8 +1,8 @@
1
1
  import { t as HttpError } from "./errors-Ce_-E3_C.mjs";
2
- import { u as METHODS } from "./task-batch-CnRhVsh6.mjs";
2
+ import { u as METHODS } from "./task-batch-BLUkrUqX.mjs";
3
3
  import { C as duplicateBatchError, D as supersededAttemptError, E as sessionClearedError, T as lastIndexMismatchError, b as CLEAR_EVENT_TYPE, m as nullProtoRecord, n as NOTIFY_TIMINGS, r as POLL_TIMINGS, y as A2Error } from "./internal-CvsrprnU-DhZF6sZK.mjs";
4
4
  import { a as retryableLazy, o as platformWaitUntil } from "./server-DX7mM6nm-Cq1xPyqJ.mjs";
5
- import { n as a2, t as localScheduler } from "./local-B7Yp-B2z.mjs";
5
+ import { n as a2, t as localScheduler } from "./local-DMQ-Eh6v.mjs";
6
6
  import { n as defaultSleep, r as pollingStream } from "./store-polling-BZt2Rf3D-nlZUQLz2.mjs";
7
7
  import { r as sqlTables } from "./sql-CvBbb5Ui.mjs";
8
8
  import { n as SYSTEM_CLOCK, t as RANDOM_IDS } from "./store-N8PXxDAS-DWWgv-Vz.mjs";
@@ -27,7 +27,8 @@ type ChatTransport = Omit<ProviderOptions, 'uploadsFiles'> & {
27
27
  mentionById?(id: string): string | null;
28
28
  /** The platform's users a message's text mentions as `@[<their id>]`, which `markdown` wrote there. */
29
29
  mentioned?(text: string): Promise<ExternalAuthor[]>;
30
- author?(author: Author, raw: unknown): ExternalAuthor;
30
+ /** Who wrote a message or reacted, where the platform knows them better than the adapter's record does. Nothing keeps the adapter's. */
31
+ author?(author: Author, raw: unknown): ExternalAuthor | null | Promise<ExternalAuthor | null>;
31
32
  /** A channel's name as its native ID. Without it, a name is the ID. */
32
33
  resolveChannel?(key: string): Promise<string>;
33
34
  /**
@@ -95,13 +96,13 @@ declare abstract class ChatSyncProvider<E extends ProviderEvent = ProviderEvent>
95
96
  };
96
97
  inboxChannel(key: string, thread: string): string;
97
98
  eventId(key: string, input: ChatInput): string;
98
- protected author(author: Author, raw: unknown): {
99
+ protected author(author: Author, raw: unknown): Promise<{
99
100
  id: string;
100
101
  handle: string;
101
102
  name: string;
102
103
  avatar: string | null;
103
104
  isBot: boolean;
104
- };
105
+ }>;
105
106
  protected authorOf(message: Message): Promise<{
106
107
  id: string;
107
108
  handle: string;
@@ -203,11 +203,11 @@ var ChatSyncProvider = class extends SyncProvider {
203
203
  const at = message.metadata?.editedAt ? new Date(message.metadata.editedAt).getTime() : NaN;
204
204
  return `edited:${location}|${createHash("sha256").update(message.text).digest("base64url")}${Number.isFinite(at) ? `|${at}` : ""}`;
205
205
  }
206
- author(author, raw) {
207
- return this.transport.author?.(author, raw) ?? externalAuthor(this.platform, author);
206
+ async author(author, raw) {
207
+ return await this.transport.author?.(author, raw) ?? externalAuthor(this.platform, author);
208
208
  }
209
209
  async authorOf(message) {
210
- const author = this.author(message.author, message.raw);
210
+ const author = await this.author(message.author, message.raw);
211
211
  const avatar = await this.transport.avatar?.(message).catch(() => null);
212
212
  return avatar ? {
213
213
  ...author,
@@ -237,7 +237,7 @@ var ChatSyncProvider = class extends SyncProvider {
237
237
  message: event.messageId,
238
238
  emoji,
239
239
  added: event.added,
240
- author: this.author(event.user, event.raw)
240
+ author: await this.author(event.user, event.raw)
241
241
  }
242
242
  };
243
243
  }
@@ -1,2 +1,2 @@
1
- import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-totPnoCC.mjs";
1
+ import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-CkRYuvpd.mjs";
2
2
  export { commands, filters, globalOptions, groups, option, options, usage };
@@ -1,5 +1,5 @@
1
- import { o as stoppedBy } from "./exports-WtqjdQwb.mjs";
2
- import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-BvkLqpUX.mjs";
1
+ import { o as stoppedBy } from "./exports-CREw274K.mjs";
2
+ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-C7B22rE4.mjs";
3
3
  //#region src/cli/embedded.ts
4
4
  /**
5
5
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { a as option } from "./commands-totPnoCC.mjs";
3
- import { _ as projectDir } from "./server-CRdVLqny.mjs";
4
- import { r as main } from "./main-BvkLqpUX.mjs";
5
- import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-CtPZz0WG.mjs";
2
+ import { a as option } from "./commands-CkRYuvpd.mjs";
3
+ import { _ as projectDir } from "./server-D5S70_au.mjs";
4
+ import { r as main } from "./main-C7B22rE4.mjs";
5
+ import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-mdRycsHb.mjs";
6
6
  import { appendFile, readFile } from "node:fs/promises";
7
7
  import { join } from "node:path";
8
8
  //#region src/cli/local.ts
@@ -37,7 +37,7 @@ const local = {
37
37
  },
38
38
  async run(args, context) {
39
39
  if (args.length > 0) throw context.usage("inspect takes no arguments: pass its port with --port.");
40
- return (await import("./inspect-wkA_8iyU.mjs")).inspect(context);
40
+ return (await import("./inspect-rfTRL8zp.mjs")).inspect(context);
41
41
  }
42
42
  },
43
43
  serve: {
@@ -81,7 +81,7 @@ const local = {
81
81
  }, "tailscale");
82
82
  if (tailscale.length > 0 && hosts.length > 0) throw usage("--tailscale takes Tailscale's word for who's calling, which another proxy in front could forge: it doesn't go with --allow-host.");
83
83
  const root = projectDir();
84
- const { serveLocal } = await import("./serve-ChlJ955x.mjs");
84
+ const { serveLocal } = await import("./serve-C3B6EP7W.mjs");
85
85
  const local = await serveLocal({
86
86
  dir: flags.dir ?? join(root, ".board"),
87
87
  hosts,
@@ -1167,6 +1167,7 @@ const commands = [
1167
1167
  runsWithoutSubcommand: true,
1168
1168
  subcommands: [{
1169
1169
  name: "remove",
1170
+ aliases: ["rm"],
1170
1171
  description: "stop a sync the board runs (with sync where its events land): what it brought in stays",
1171
1172
  arguments: [{
1172
1173
  name: "sync",
@@ -4,9 +4,9 @@ import { $ as PostBody, A as ClaimTaskBody, B as ExplainQuery, C as ActorsQuery,
4
4
  import { n as blocksIn, r as findBlocks } from "./blocks-CVoBC7ur.mjs";
5
5
  import { a as mentionTerms, c as settleMentions, i as mentionTerm, r as meTerms, s as replaceMentions, t as extractMentions } from "./mentions-DBGmqkr2.mjs";
6
6
  import { a as waitUntil, c as platformProfile, d as userIdOf, o as actorParts, r as runMiddleware, s as importedHandle, t as DroppedError, u as underPrincipal } from "./middleware-DVBOEd8G.mjs";
7
- import { t as VERSION } from "./version-rlZkE9nc.mjs";
7
+ import { t as VERSION } from "./version-D3WaVccj.mjs";
8
8
  import { a as canText, c as compileAccess, d as parsePattern, n as InvalidCan, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-D1AHzFSP.mjs";
9
- import { _ as uploadName, a as runMatch, d as createRouter, f as openapi, g as carried, h as readJson, i as canonicalWatchers, m as readCapped, n as SYNC_ACTOR, o as compileWatcher, p as queryObject, r as syncTarget, t as batchPlan, u as METHODS, v as SYNC } from "./task-batch-CnRhVsh6.mjs";
9
+ import { _ as uploadName, a as runMatch, d as createRouter, f as openapi, g as carried, h as readJson, i as canonicalWatchers, m as readCapped, n as SYNC_ACTOR, o as compileWatcher, p as queryObject, r as syncTarget, t as batchPlan, u as METHODS, v as SYNC } from "./task-batch-BLUkrUqX.mjs";
10
10
  import { C as verifiedIssuers, D as explainGrants, d as createAuthority, f as fromTokens, m as hostPrincipal, o as VERCEL_ISSUER, p as grantIssuers, t as DEFAULT_CAN$1, v as namesByLogin, w as verifiesTokens } from "./auth-Cc5_pdi7.mjs";
11
11
  import { a as resolveActor, o as viaOf, r as claimsOf, t as KNOWN_AGENTS } from "./actors-CCth21rU.mjs";
12
12
  import { t as checkValue } from "./data-values-CoTP0SQG.mjs";
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { f as BoardError, m as duration, t as HttpError } from "./errors-Ce_-E3_C.mjs";
2
2
  import { t as block } from "./blocks-CVoBC7ur.mjs";
3
3
  import { t as DroppedError } from "./middleware-DVBOEd8G.mjs";
4
- import { c as createVercel, n as createTasksInChunks, r as createBoard, t as TasksInChunksError } from "./exports-WtqjdQwb.mjs";
4
+ import { c as createVercel, n as createTasksInChunks, r as createBoard, t as TasksInChunksError } from "./exports-CREw274K.mjs";
5
5
  //#region src/backend-vercel/index.default.ts
6
6
  /**
7
7
  * Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
@@ -1,6 +1,6 @@
1
1
  import { f as BoardError, m as duration, t as HttpError } from "./errors-Ce_-E3_C.mjs";
2
2
  import { t as block } from "./blocks-CVoBC7ur.mjs";
3
3
  import { t as DroppedError } from "./middleware-DVBOEd8G.mjs";
4
- import { n as createTasksInChunks, t as TasksInChunksError } from "./exports-WtqjdQwb.mjs";
5
- import { t as board } from "./server-CRdVLqny.mjs";
4
+ import { n as createTasksInChunks, t as TasksInChunksError } from "./exports-CREw274K.mjs";
5
+ import { t as board } from "./server-D5S70_au.mjs";
6
6
  export { BoardError, DroppedError, HttpError, TasksInChunksError, block, board, createTasksInChunks, duration };