@vercel/board 0.48.0 → 0.48.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/{bots-CLKKMgYf.mjs → bots-CqPYxkqK.mjs} +15 -8
- package/dist/cli-embedded.mjs +2 -2
- package/dist/cli.mjs +5 -5
- package/dist/{engine-B3Yd0OPc.mjs → engine-BQ0hJw2w.mjs} +4 -3
- package/dist/{exports-B5xOYHj_.mjs → exports-BzSG0_wL.mjs} +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.node.mjs +2 -2
- package/dist/inspect/app.js +1 -1
- package/dist/inspect/engine.js +3 -3
- package/dist/inspect-BB-XUPuz.mjs +2 -0
- package/dist/{inspect-CAz9PGLf.mjs → inspect-n9brh-TT.mjs} +1 -1
- package/dist/{local-CKMP4xH3.mjs → local-BdKxz-Dn.mjs} +1 -1
- package/dist/{main-DZZQEFVl.mjs → main-BgiViRZ8.mjs} +6 -6
- package/dist/{serve-DBJTP0xd.mjs → serve-C2Jbr7pR.mjs} +2 -2
- package/dist/{server-DmlyIzMj.mjs → server-EOQC5Gtq.mjs} +3 -3
- package/dist/sync-slack.mjs +1 -1
- package/dist/{task-batch-CmKvTLSu.mjs → task-batch-D4p9N8lN.mjs} +1 -1
- package/package.json +1 -1
- package/dist/inspect-CNECs4UG.mjs +0 -2
package/dist/backend-local.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as local } from "./local-
|
|
1
|
+
import { t as local } from "./local-BdKxz-Dn.mjs";
|
|
2
2
|
export { local };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
//#region src/contract/bots.ts
|
|
2
|
-
/** Vercel for GitHub's bot account (`vercel[bot]`), as the board names it. */
|
|
3
|
-
const VERCEL_BOT = "github:user:35613825";
|
|
4
1
|
const VERCEL_MARKER = /^\[vc\]: #\S*\r?\n/;
|
|
5
2
|
const LINK = /\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g;
|
|
6
3
|
const STATUS = /!\[([^\]]+)\]\(https:\/\/vercel\.com\/static\/status\/[^)]+\)\s*(?:\[[^\]]*\]\((https?:\/\/[^)\s]+)\))?/;
|
|
@@ -60,13 +57,23 @@ function formatVercelDeployments(deployments) {
|
|
|
60
57
|
}).join("\n");
|
|
61
58
|
}
|
|
62
59
|
/**
|
|
60
|
+
* Whether Vercel for GitHub's bot wrote it: the bot itself, where its platform ID is its actor, or,
|
|
61
|
+
* on a board where an import is by a profile of the syncing principal
|
|
62
|
+
* (`<principal>+github:user:35613825`), that principal's import of it from GitHub, which the board
|
|
63
|
+
* checked (`verified`). A profile that only carries the bot's name, or one that isn't an import, isn't.
|
|
64
|
+
*/
|
|
65
|
+
function byVercelBot(written, author) {
|
|
66
|
+
if (written.by.actor === "github:user:35613825") return true;
|
|
67
|
+
return written.by.profile === "github:user:35613825" && !!written.from && author?.kind === "external" && author.verified === true && author.platform === "github";
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
63
70
|
* A message's text as people should see it: known bot messages in their
|
|
64
|
-
* readable form, anything else as is. Only the bot itself gets that form
|
|
65
|
-
* no one can hide a message's text behind a look-alike table.
|
|
71
|
+
* readable form, anything else as is. Only the bot itself gets that form
|
|
72
|
+
* (`byVercelBot`), so no one can hide a message's text behind a look-alike table.
|
|
66
73
|
*/
|
|
67
|
-
function displayText(text,
|
|
68
|
-
const deployments =
|
|
74
|
+
function displayText(text, bot) {
|
|
75
|
+
const deployments = bot ? vercelDeployments(text) : null;
|
|
69
76
|
return deployments ? `**▲ Vercel**\n${formatVercelDeployments(deployments)}` : text;
|
|
70
77
|
}
|
|
71
78
|
//#endregion
|
|
72
|
-
export { vercelDeployments as i, displayText as n, formatVercelDeployments as r,
|
|
79
|
+
export { vercelDeployments as i, displayText as n, formatVercelDeployments as r, byVercelBot as t };
|
package/dist/cli-embedded.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as stoppedBy } from "./exports-
|
|
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-
|
|
1
|
+
import { a as stoppedBy } from "./exports-BzSG0_wL.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-BgiViRZ8.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
2
|
import { a as option } from "./commands-Dk6_cHLS.mjs";
|
|
3
|
-
import { m as projectDir } from "./server-
|
|
4
|
-
import { r as main } from "./main-
|
|
5
|
-
import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-
|
|
3
|
+
import { m as projectDir } from "./server-EOQC5Gtq.mjs";
|
|
4
|
+
import { r as main } from "./main-BgiViRZ8.mjs";
|
|
5
|
+
import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-n9brh-TT.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-
|
|
40
|
+
return (await import("./inspect-BB-XUPuz.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-
|
|
84
|
+
const { serveLocal } = await import("./serve-C2Jbr7pR.mjs");
|
|
85
85
|
const local = await serveLocal({
|
|
86
86
|
dir: flags.dir ?? join(root, ".board"),
|
|
87
87
|
hosts,
|
|
@@ -5,7 +5,7 @@ import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
|
|
|
5
5
|
import { a as waitUntil, c as platformProfile, f as viaText, i as afterRetry, l as shownName, m as derivedId, o as actorParts, t as DroppedError } from "./middleware-CT6vMNUc.mjs";
|
|
6
6
|
import { a as replaceMentions, n as isEmail, t as extractMentions } from "./mentions-CnWt9Z5b.mjs";
|
|
7
7
|
import { a as immutable, d as opensBlock, f as routesFor, l as UnreadableError, n as SyncOverrides, o as ReceivedEvent, s as ResolvedTarget, u as channelMissing } from "./events-B-qyxNsJ.mjs";
|
|
8
|
-
import { i as vercelDeployments, n as displayText } from "./bots-
|
|
8
|
+
import { i as vercelDeployments, n as displayText, t as byVercelBot } from "./bots-CqPYxkqK.mjs";
|
|
9
9
|
//#region src/sync/engine.ts
|
|
10
10
|
/** `files`: a message with files may have no text. */
|
|
11
11
|
const clampText = (raw, files = false) => {
|
|
@@ -1010,10 +1010,11 @@ function createSyncEngine(entries) {
|
|
|
1010
1010
|
const name = `${own}${after}`;
|
|
1011
1011
|
const attribution = `${environment}${after}`;
|
|
1012
1012
|
const platform = platformOf(key);
|
|
1013
|
+
const bot = byVercelBot(message, actor);
|
|
1013
1014
|
const body = (renderer ?? ((input) => platform.render(input)))(immutable({
|
|
1014
1015
|
message: {
|
|
1015
1016
|
...structuredClone(message),
|
|
1016
|
-
text: displayText(message.text,
|
|
1017
|
+
text: displayText(message.text, bot)
|
|
1017
1018
|
},
|
|
1018
1019
|
author: actor ? { ...actor } : null,
|
|
1019
1020
|
mentionOf: (id) => nativeMention(key, id, actors),
|
|
@@ -1023,7 +1024,7 @@ function createSyncEngine(entries) {
|
|
|
1023
1024
|
if (typeof body !== "string") throw badRequest("a provider renderer must return markdown");
|
|
1024
1025
|
const labeled = `**${name}**: `;
|
|
1025
1026
|
const markdown = await textFor(key, actors, body.startsWith(labeled) && opensBlock(body.slice(labeled.length)) ? `**${name}**:\n\n${body.slice(labeled.length)}` : body);
|
|
1026
|
-
const deployments =
|
|
1027
|
+
const deployments = bot ? vercelDeployments(message.text) : null;
|
|
1027
1028
|
return {
|
|
1028
1029
|
markdown,
|
|
1029
1030
|
...actor?.verified ? { as: {
|
|
@@ -4,7 +4,7 @@ import { A as RegisterBody, B as SyncFindQuery, C as LabelBody, D as PostBody, E
|
|
|
4
4
|
import { _ as sha256, a as waitUntil, c as platformProfile, d as userIdOf, m as derivedId, o as actorParts, r as runMiddleware, s as importedHandle, t as DroppedError, u as underPrincipal } from "./middleware-CT6vMNUc.mjs";
|
|
5
5
|
import { n as blocksIn, r as findBlocks } from "./blocks-CVoBC7ur.mjs";
|
|
6
6
|
import { a as replaceMentions, i as mentionTerms, o as settleMentions, r as mentionTerm, t as extractMentions } from "./mentions-CnWt9Z5b.mjs";
|
|
7
|
-
import { a as runMatch, d as openapi, f as queryObject, g as VERSION, h as SYNC, i as canonicalWatchers, l as METHODS, m as readJson, n as SYNC_ACTOR, o as compileWatcher, p as readCapped, r as syncTarget, t as batchPlan, u as createRouter } from "./task-batch-
|
|
7
|
+
import { a as runMatch, d as openapi, f as queryObject, g as VERSION, h as SYNC, i as canonicalWatchers, l as METHODS, m as readJson, n as SYNC_ACTOR, o as compileWatcher, p as readCapped, r as syncTarget, t as batchPlan, u as createRouter } from "./task-batch-D4p9N8lN.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-C06pIr0M.mjs";
|
|
9
9
|
import { C as verifiesTokens, E as explainGrants, S as verifiedIssuers, d as createAuthority, f as fromTokens, m as hostPrincipal, o as VERCEL_ISSUER, p as grantIssuers, t as DEFAULT_CAN$1, v as namesByLogin } from "./auth-B9-wXQ-x.mjs";
|
|
10
10
|
import { a as resolveActor, o as viaOf, r as claimsOf, t as KNOWN_AGENTS } from "./actors-Dkyg-oo0.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { f as BoardError, m as duration, t as HttpError } from "./errors-QhkdzI-o.mjs";
|
|
2
2
|
import { t as DroppedError } from "./middleware-CT6vMNUc.mjs";
|
|
3
3
|
import { t as block } from "./blocks-CVoBC7ur.mjs";
|
|
4
|
-
import { n as createTasksInChunks, o as createVercel, r as createBoard, t as TasksInChunksError } from "./exports-
|
|
4
|
+
import { n as createTasksInChunks, o as createVercel, r as createBoard, t as TasksInChunksError } from "./exports-BzSG0_wL.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
|
|
@@ -24,7 +24,7 @@ function board(options = {}) {
|
|
|
24
24
|
if (!fetch) throw new Error("board: pass a fetch that sends credentials Vercel's API takes, or a backend: outside Node there's no environment to find them in");
|
|
25
25
|
return vercel({ fetch });
|
|
26
26
|
},
|
|
27
|
-
sync: () => import("./engine-
|
|
27
|
+
sync: () => import("./engine-BQ0hJw2w.mjs"),
|
|
28
28
|
serving: null,
|
|
29
29
|
sandbox: null
|
|
30
30
|
});
|
package/dist/index.node.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as BoardError, m as duration, t as HttpError } from "./errors-QhkdzI-o.mjs";
|
|
2
2
|
import { t as DroppedError } from "./middleware-CT6vMNUc.mjs";
|
|
3
3
|
import { t as block } from "./blocks-CVoBC7ur.mjs";
|
|
4
|
-
import { n as createTasksInChunks, t as TasksInChunksError } from "./exports-
|
|
5
|
-
import { t as board } from "./server-
|
|
4
|
+
import { n as createTasksInChunks, t as TasksInChunksError } from "./exports-BzSG0_wL.mjs";
|
|
5
|
+
import { t as board } from "./server-EOQC5Gtq.mjs";
|
|
6
6
|
export { BoardError, DroppedError, HttpError, TasksInChunksError, block, board, createTasksInChunks, duration };
|