@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.
- package/dist/backend-local.mjs +1 -1
- package/dist/backend-postgres.mjs +2 -2
- package/dist/{chat-provider-BiJ8G6KY.d.mts → chat-provider-CW-YpGWe.d.mts} +4 -3
- package/dist/{chat-provider-Br2RXgLV.mjs → chat-provider-eRYSL4XG.mjs} +4 -4
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.mjs +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/{commands-totPnoCC.mjs → commands-CkRYuvpd.mjs} +1 -0
- package/dist/{exports-WtqjdQwb.mjs → exports-CREw274K.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/index.node.mjs +2 -2
- package/dist/inspect/app.js +1 -1
- package/dist/{inspect-CtPZz0WG.mjs → inspect-mdRycsHb.mjs} +2 -2
- package/dist/inspect-rfTRL8zp.mjs +2 -0
- package/dist/inspect.mjs +1 -1
- package/dist/{local-BPiDCkA4.mjs → local-B9UwaY2z.mjs} +2 -2
- package/dist/{local-B7Yp-B2z.mjs → local-DMQ-Eh6v.mjs} +2 -2
- package/dist/{main-BvkLqpUX.mjs → main-C7B22rE4.mjs} +14 -8
- package/dist/{serve-ChlJ955x.mjs → serve-C3B6EP7W.mjs} +3 -3
- package/dist/{server-CRdVLqny.mjs → server-D5S70_au.mjs} +3 -3
- package/dist/{shell-hTUuAc6A.mjs → shell-U3QkDJIF.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +1 -1
- package/dist/sync-chat-sdk.mjs +1 -1
- package/dist/sync-github.d.mts +1 -1
- package/dist/sync-github.mjs +1 -1
- package/dist/sync-linear.d.mts +1 -1
- package/dist/sync-linear.mjs +1 -1
- package/dist/sync-slack.d.mts +21 -4
- package/dist/sync-slack.mjs +33 -2
- package/dist/{task-batch-CnRhVsh6.mjs → task-batch-BLUkrUqX.mjs} +2 -2
- package/dist/{version-rlZkE9nc.mjs → version-D3WaVccj.mjs} +1 -1
- package/docs/02-sync/03-slack.md +5 -0
- package/docs/02-sync/05-managed.md +2 -2
- package/docs/04-reference/01-cli.md +4 -4
- package/package.json +1 -1
- package/dist/inspect-wkA_8iyU.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-C7B22rE4.mjs";
|
|
4
|
+
import { n as relative, r as shell, t as CSP } from "./shell-U3QkDJIF.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-U3QkDJIF.mjs";
|
|
4
4
|
import { t as page } from "./page-7KWSGxyC.mjs";
|
|
5
5
|
//#region src/inspect/handler.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as HttpError } from "./errors-Ce_-E3_C.mjs";
|
|
2
|
-
import { u as METHODS } from "./task-batch-
|
|
3
|
-
import { i as memoryBlob, n as a2, r as fsBlob, t as localScheduler } from "./local-
|
|
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";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { join, resolve } from "node:path";
|
|
6
6
|
//#region src/server/local.ts
|
|
@@ -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-
|
|
8
|
+
import { t as VERSION } from "./version-D3WaVccj.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-
|
|
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";
|
|
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";
|
|
@@ -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-
|
|
8
|
+
import { t as VERSION } from "./version-D3WaVccj.mjs";
|
|
9
9
|
import { r as PERMISSIONS } from "./access-D1AHzFSP.mjs";
|
|
10
|
-
import { c as mentionValue, l 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 { 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-
|
|
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";
|
|
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";
|
|
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";
|
|
@@ -1139,7 +1139,11 @@ function commandHelp(name, path) {
|
|
|
1139
1139
|
"",
|
|
1140
1140
|
...wrap(command.description, COLUMNS)
|
|
1141
1141
|
];
|
|
1142
|
-
if (command.aliases?.length) lines.push("", `also: ${command.aliases.map((alias) =>
|
|
1142
|
+
if (command.aliases?.length) lines.push("", `also: ${command.aliases.map((alias) => [
|
|
1143
|
+
name,
|
|
1144
|
+
...path.slice(0, -1).map((above) => above.name),
|
|
1145
|
+
alias
|
|
1146
|
+
].join(" ")).join(", ")}`);
|
|
1143
1147
|
const section = (title, entries) => {
|
|
1144
1148
|
if (entries.length) lines.push("", `${title}:`, ...rows(entries));
|
|
1145
1149
|
};
|
|
@@ -1174,7 +1178,7 @@ function commandPath(words, all) {
|
|
|
1174
1178
|
const command = all.find((candidate) => candidate.name === words[0] || candidate.aliases?.includes(words[0]));
|
|
1175
1179
|
if (!command) return null;
|
|
1176
1180
|
const at = command.argumentsBeforeSubcommand ? command.arguments.length + 1 : 1;
|
|
1177
|
-
const sub = command.subcommands?.find((candidate) => candidate.name === words[at]);
|
|
1181
|
+
const sub = command.subcommands?.find((candidate) => candidate.name === words[at] || candidate.aliases?.includes(words[at]));
|
|
1178
1182
|
return sub ? [command, sub] : [command];
|
|
1179
1183
|
}
|
|
1180
1184
|
//#endregion
|
|
@@ -5033,8 +5037,10 @@ async function runOnce(argv, options) {
|
|
|
5033
5037
|
out(help(positionals));
|
|
5034
5038
|
return 0;
|
|
5035
5039
|
}
|
|
5036
|
-
const [word, ...
|
|
5040
|
+
const [word, ...words] = positionals;
|
|
5037
5041
|
const command = canonical(word);
|
|
5042
|
+
const sub = subcommandOf(command);
|
|
5043
|
+
const args = sub && words[0] !== sub.name ? [sub.name, ...words.slice(1)] : words;
|
|
5038
5044
|
current = {
|
|
5039
5045
|
command,
|
|
5040
5046
|
args
|
|
@@ -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-
|
|
2
|
+
import { i as hostCheckedBy } from "./exports-CREw274K.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-
|
|
4
|
+
import { g as localTokenFile, t as board } from "./server-D5S70_au.mjs";
|
|
5
5
|
import { t as oidcTokens } from "./tokens-XagdeYrv.mjs";
|
|
6
|
-
import { t as local } from "./local-
|
|
6
|
+
import { t as local } from "./local-B9UwaY2z.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-
|
|
5
|
-
import { o as compileWatcher, u as METHODS } 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-
|
|
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";
|
|
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";
|
package/dist/sync-chat-sdk.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as SyncFn, m as SyncProvider, x as channels } from "./provider-BnK0Bif7.mjs";
|
|
2
|
-
import { r as ChatTransport, t as ChatInput } from "./chat-provider-
|
|
2
|
+
import { r as ChatTransport, t as ChatInput } from "./chat-provider-CW-YpGWe.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ReactionEvent } from "chat";
|
|
5
5
|
//#region src/sync/chat-sdk.d.ts
|
package/dist/sync-chat-sdk.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as eventSchema, p as channels, r as envelope } from "./events-mWKc1uvZ.mjs";
|
|
2
|
-
import { t as ChatSyncProvider } from "./chat-provider-
|
|
2
|
+
import { t as ChatSyncProvider } from "./chat-provider-eRYSL4XG.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
//#region src/sync/chat-sdk.ts
|
|
5
5
|
const schemaOf = (platform) => eventSchema(platform, "message");
|
package/dist/sync-github.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as SyncFn, b as SyncUnit, p as SyncContext } from "./provider-BnK0Bif7.mjs";
|
|
2
|
-
import { n as ChatSyncProvider } from "./chat-provider-
|
|
2
|
+
import { n as ChatSyncProvider } from "./chat-provider-CW-YpGWe.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { Adapter } from "chat";
|
|
5
5
|
//#region src/sync/github.d.ts
|
package/dist/sync-github.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as withRoutes, i as eventSchema, m as into, r as envelope } from "./events-mWKc1uvZ.mjs";
|
|
2
|
-
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-
|
|
2
|
+
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-eRYSL4XG.mjs";
|
|
3
3
|
import { n as tagOf, t as slug } from "./tags-CxDCF_tt.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { connectGitHubAdapter } from "@vercel/connect/chat";
|
package/dist/sync-linear.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { qt as SourceRead } from "./routes-D5FtKOP_.mjs";
|
|
2
2
|
import { _ as SyncFn, b as SyncUnit, f as ResolvedTarget, l as ReceivedEvent, o as ProviderPost, p as SyncContext, r as ProviderDelivery } from "./provider-BnK0Bif7.mjs";
|
|
3
|
-
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-
|
|
3
|
+
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-CW-YpGWe.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { Adapter } from "chat";
|
|
6
6
|
//#region src/sync/linear.d.ts
|
package/dist/sync-linear.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as eventSchema, l as UnreadableError, p as channels, r as envelope } from "./events-mWKc1uvZ.mjs";
|
|
2
|
-
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-
|
|
2
|
+
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-eRYSL4XG.mjs";
|
|
3
3
|
import { n as tagOf, t as slug } from "./tags-CxDCF_tt.mjs";
|
|
4
4
|
import "zod";
|
|
5
5
|
import { connectLinearAdapter } from "@vercel/connect/chat";
|
package/dist/sync-slack.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nr as ExternalLink } from "./routes-D5FtKOP_.mjs";
|
|
2
2
|
import { _ as SyncFn, f as ResolvedTarget, o as ProviderPost, p as SyncContext, r as ProviderDelivery, s as ProviderSender, x as channels } from "./provider-BnK0Bif7.mjs";
|
|
3
|
-
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-
|
|
3
|
+
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-CW-YpGWe.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { Adapter } from "chat";
|
|
6
6
|
//#region src/sync/slack-deployments.d.ts
|
|
@@ -69,6 +69,14 @@ export type SlackClient = {
|
|
|
69
69
|
user?: SlackUser;
|
|
70
70
|
}>;
|
|
71
71
|
};
|
|
72
|
+
/** A bot's name and picture, for a message an app posts with no user of its own; needs `users:read`. */
|
|
73
|
+
bots?: {
|
|
74
|
+
info(args: {
|
|
75
|
+
bot: string;
|
|
76
|
+
}): Promise<{
|
|
77
|
+
bot?: SlackBot;
|
|
78
|
+
}>;
|
|
79
|
+
};
|
|
72
80
|
files?: {
|
|
73
81
|
delete(args: {
|
|
74
82
|
file: string;
|
|
@@ -190,14 +198,23 @@ type SlackFile = {
|
|
|
190
198
|
title?: string;
|
|
191
199
|
permalink?: string;
|
|
192
200
|
};
|
|
201
|
+
/** A bot as Slack describes it: in `bots.info`, and in a message's `bot_profile`. */
|
|
202
|
+
type SlackBot = {
|
|
203
|
+
name?: string;
|
|
204
|
+
icons?: {
|
|
205
|
+
image_72?: string;
|
|
206
|
+
image_48?: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
193
209
|
type SlackMessage = {
|
|
194
210
|
ts?: string;
|
|
195
211
|
text?: string;
|
|
196
212
|
user?: string;
|
|
197
213
|
username?: string;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
214
|
+
bot_id?: string;
|
|
215
|
+
bot_profile?: SlackBot;
|
|
216
|
+
/** The picture a message was posted under, where it names one. */
|
|
217
|
+
icons?: SlackBot['icons'];
|
|
201
218
|
files?: SlackFile[];
|
|
202
219
|
thread_ts?: string;
|
|
203
220
|
reply_count?: number;
|
package/dist/sync-slack.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { m as MESSAGE_TEXT_MAX } from "./schemas-CUSTEFIy.mjs";
|
|
|
2
2
|
import "./external-DkWafjn-.mjs";
|
|
3
3
|
import { t as extractMentions } from "./mentions-DBGmqkr2.mjs";
|
|
4
4
|
import { d as opensBlock, i as eventSchema, l as UnreadableError, p as channels, r as envelope } from "./events-mWKc1uvZ.mjs";
|
|
5
|
-
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-
|
|
5
|
+
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-eRYSL4XG.mjs";
|
|
6
6
|
import { r as formatVercelDeployments } from "./bots-CqPYxkqK.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { stringifyMarkdown } from "chat";
|
|
@@ -599,6 +599,21 @@ var SlackProvider = class extends ChatSyncProvider {
|
|
|
599
599
|
}
|
|
600
600
|
return promise;
|
|
601
601
|
}
|
|
602
|
+
const bots = /* @__PURE__ */ new Map();
|
|
603
|
+
function botOf(bot) {
|
|
604
|
+
let promise = bots.get(bot);
|
|
605
|
+
if (!promise) {
|
|
606
|
+
promise = client().then(async (web) => (await web?.bots?.info({ bot }))?.bot ?? null).catch(() => null);
|
|
607
|
+
bots.set(bot, promise);
|
|
608
|
+
}
|
|
609
|
+
return promise;
|
|
610
|
+
}
|
|
611
|
+
/** The message as a bot posted it with no user, or nothing: one a user wrote, or a bot's own user, is the adapter's to name. */
|
|
612
|
+
const fromBot = (raw) => {
|
|
613
|
+
const event = raw;
|
|
614
|
+
return event && !event.user && event.bot_id ? event : null;
|
|
615
|
+
};
|
|
616
|
+
const pictureOf = (icons) => icons?.image_72 ?? icons?.image_48 ?? null;
|
|
602
617
|
const converter = options.adapter.formatConverter;
|
|
603
618
|
const mrkdwn = (text) => {
|
|
604
619
|
try {
|
|
@@ -924,7 +939,23 @@ var SlackProvider = class extends ChatSyncProvider {
|
|
|
924
939
|
}
|
|
925
940
|
}];
|
|
926
941
|
},
|
|
927
|
-
|
|
942
|
+
async author(author, raw) {
|
|
943
|
+
const event = fromBot(raw);
|
|
944
|
+
if (!event) return null;
|
|
945
|
+
const name = event.username || event.bot_profile?.name || (await botOf(event.bot_id))?.name || event.bot_id;
|
|
946
|
+
return {
|
|
947
|
+
id: `slack:user:${author.userId}`,
|
|
948
|
+
handle: name,
|
|
949
|
+
name,
|
|
950
|
+
avatar: null,
|
|
951
|
+
isBot: true
|
|
952
|
+
};
|
|
953
|
+
},
|
|
954
|
+
async avatar(message) {
|
|
955
|
+
const event = fromBot(message.raw);
|
|
956
|
+
if (!event) return message.author.userId ? avatarOf(message.author.userId) : null;
|
|
957
|
+
return pictureOf(event.icons) ?? pictureOf(event.bot_profile?.icons) ?? pictureOf((await botOf(event.bot_id))?.icons);
|
|
958
|
+
},
|
|
928
959
|
groupThread: (thread) => thread,
|
|
929
960
|
isRoot: (thread, messageId) => thread.slice(thread.lastIndexOf(":") + 1) === messageId,
|
|
930
961
|
context: () => null,
|
|
@@ -3,9 +3,9 @@ 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-
|
|
6
|
+
import { t as VERSION } from "./version-D3WaVccj.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-CkRYuvpd.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 `@`. */
|
package/docs/02-sync/03-slack.md
CHANGED
|
@@ -87,6 +87,11 @@ most once a minute, while the other channels sync.
|
|
|
87
87
|
|
|
88
88
|
- **Messages, replies, edits, deletes, and reactions,** both ways. Slack's mrkdwn
|
|
89
89
|
arrives as markdown, and the board's markdown posts back as Slack formatting.
|
|
90
|
+
- **Who wrote it.** A person's message comes in under their Slack name, handle,
|
|
91
|
+
and picture. An app that posts with no user of its own, as it answers a slash
|
|
92
|
+
command or through an incoming webhook, is named as its message names it, then
|
|
93
|
+
from Slack's record of the bot (`bots.info`, under `users:read`), then by its
|
|
94
|
+
bot ID.
|
|
90
95
|
- **Mentions** sync both ways by the user's ID. `<@U0456>` comes in as a
|
|
91
96
|
mention of that user, `@[slack:user:U0456]` under key `slack`, and the board
|
|
92
97
|
meets them, by their Slack name, handle, and picture, though they never
|
|
@@ -45,7 +45,7 @@ prints the command to paste into the channel:
|
|
|
45
45
|
|
|
46
46
|
```text
|
|
47
47
|
$ vb sync alerts slack/vercel:#alerts
|
|
48
|
-
syn_9c2f7b alerts slack/vercel:#alerts pending:
|
|
48
|
+
syn_9c2f7b alerts slack/vercel:#alerts pending: someone in its Slack channel has to accept it with /vercel board sync accept syn_9c2f7b
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
Running that command in Slack starts nothing yet. It shows whoever ran it,
|
|
@@ -84,7 +84,7 @@ channel's. One that isn't running says so, and why:
|
|
|
84
84
|
```text
|
|
85
85
|
$ vb syncs
|
|
86
86
|
syn_4f9a2c support slack/vercel:#support
|
|
87
|
-
syn_9c2f7b alerts slack/vercel:#alerts pending:
|
|
87
|
+
syn_9c2f7b alerts slack/vercel:#alerts pending: someone in its Slack channel has to accept it with /vercel board sync accept syn_9c2f7b
|
|
88
88
|
syn_1b77e0 ops slack/vercel:#ops paused: Vercel's Slack app can no longer reach the channel. Once it's back in it, mirror the channel again.
|
|
89
89
|
```
|
|
90
90
|
|
|
@@ -1336,11 +1336,11 @@ goes through. Each takes `sync` in the channel.
|
|
|
1336
1336
|
|
|
1337
1337
|
```text
|
|
1338
1338
|
$ vb sync alerts slack/vercel:#alerts
|
|
1339
|
-
syn_9c2f7b alerts slack/vercel:#alerts pending:
|
|
1339
|
+
syn_9c2f7b alerts slack/vercel:#alerts pending: someone in its Slack channel has to accept it with /vercel board sync accept syn_9c2f7b
|
|
1340
1340
|
$ vb syncs alerts
|
|
1341
|
-
syn_9c2f7b alerts slack/vercel:#alerts pending:
|
|
1341
|
+
syn_9c2f7b alerts slack/vercel:#alerts pending: someone in its Slack channel has to accept it with /vercel board sync accept syn_9c2f7b
|
|
1342
1342
|
$ vb sync remove syn_9c2f7b
|
|
1343
|
-
removed syn_9c2f7b alerts slack/vercel:#alerts pending:
|
|
1343
|
+
removed syn_9c2f7b alerts slack/vercel:#alerts pending: someone in its Slack channel has to accept it with /vercel board sync accept syn_9c2f7b
|
|
1344
1344
|
```
|
|
1345
1345
|
|
|
1346
1346
|
With `--json`, making one prints `{ sync, outcome }`, where `outcome` is
|
|
@@ -1356,7 +1356,7 @@ vb syncs [channel]
|
|
|
1356
1356
|
Lists the syncs the board runs itself, oldest first: every channel's, or one's.
|
|
1357
1357
|
A row is a sync's ID, its channel, and what it syncs with, as the command that
|
|
1358
1358
|
made it says it. One that isn't running ends with its state and why:
|
|
1359
|
-
`pending:
|
|
1359
|
+
`pending: someone in its Slack channel has to accept it with /vercel board sync accept <id>`,
|
|
1360
1360
|
`paused: Vercel's Slack app can no longer reach the channel. Once it's back in it, mirror the channel again.`
|
|
1361
1361
|
|
|
1362
1362
|
### sources
|
package/package.json
CHANGED