@vercel/board 0.42.0 → 0.43.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.
@@ -0,0 +1,2 @@
1
+ import { t as inspect } from "./inspect-ByIt7CxV.mjs";
2
+ export { inspect };
@@ -1,7 +1,7 @@
1
1
  import { h as ATTACHMENT_BYTES_MAX } from "./errors-DUzpDSrJ.mjs";
2
2
  import "./schemas-DAzSsgWk.mjs";
3
- import { t as Failed, u as who } from "./main-aVEEoc60.mjs";
4
- import { t as page } from "./page-BD6ygU49.mjs";
3
+ import { t as Failed, u as who } from "./main-CM0_uZ7w.mjs";
4
+ import { t as page } from "./page-D-OzDOAX.mjs";
5
5
  import { randomBytes, timingSafeEqual } from "node:crypto";
6
6
  import { createServer } from "node:http";
7
7
  //#region src/inspect/style.ts
@@ -420,7 +420,7 @@ button.file:hover { background: var(--shade-hover); color: var(--bright); }
420
420
  .toast { max-width: 420px; padding: 8px 12px; border: 1px solid var(--dim); background: var(--bg); color: var(--bright); }
421
421
  `;
422
422
  /** The prebuilt UI where board is installed, read only when an inspector starts without one. */
423
- const bundle = async () => (await import("./page-BiJVe-7R.mjs")).page();
423
+ const bundle = async () => (await import("./page-Dr9Aqlej.mjs")).page();
424
424
  const shell = (token) => `<!doctype html>
425
425
  <html lang="en">
426
426
  <head>
@@ -605,29 +605,20 @@ const stopped = () => new Promise((resolve) => {
605
605
  process.once("SIGINT", done);
606
606
  process.once("SIGTERM", done);
607
607
  });
608
- /** The page to serve, before anything starts: a run that can't have one says so, and serves nothing. */
609
- async function pageOf(provided) {
610
- if (provided) try {
611
- return await provided();
612
- } catch (error) {
613
- throw new Failed({
614
- class: "unknown",
615
- reason: "inspector_page_unavailable",
616
- message: `Couldn't get the inspector's page: ${error.message}`
617
- });
618
- }
608
+ /** The page to serve, before anything starts: an install without one says so, and serves nothing. */
609
+ async function pageOf() {
619
610
  const found = await page();
620
611
  if (found === null) throw new Failed({
621
612
  class: "unknown",
622
613
  reason: "no_inspector_page",
623
- message: "The inspector's page isn't beside board's CLI.",
624
- next: [{ instruction: "An app that bundles board's CLI passes it to createApp as inspectorPage" }, { instruction: "From source, build board first: pnpm --filter @vercel/board build" }]
614
+ message: "The inspector's page isn't installed with this CLI.",
615
+ next: [{ instruction: "Reinstall or update the CLI" }]
625
616
  });
626
617
  return found;
627
618
  }
628
- async function inspect({ flags, out, portFlag, client, openBrowser, inspectorPage }) {
619
+ async function inspect({ flags, out, portFlag, client, openBrowser }) {
629
620
  const port = portFlag();
630
- const page = await pageOf(inspectorPage);
621
+ const page = await pageOf();
631
622
  const inspector = await startInspector({
632
623
  client: client(),
633
624
  page,
@@ -2,7 +2,7 @@ import { _ as IMPORT_BYTES_MAX, a as forbidden$1, b as mediaType, c as toErrorRe
2
2
  import { _ as actorKind, a as CAN_MAX, b as storable, c as Handle, d as Labels, g as SeenActorKind, h as RemoteWatcherId, i as Author, l as LabelKey, m as MessageText, n as Attachment, o as ChannelPath, p as MessageId, s as Emoji, t as ActorId, v as authorView, y as platformAvatar } from "./schemas-DAzSsgWk.mjs";
3
3
  import { a as Link, i as ExternalTarget, n as ExternalEvent, o as Origin } from "./external-DymyhUzl.mjs";
4
4
  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";
5
- import { a as compileWatcher, c as METHODS, h as VERSION, i as runMatch, m as SYNC, n as syncTarget, o as hasCriteria, r as canonicalWatchers, t as SYNC_ACTOR } from "./origin-DAyYeDuW.mjs";
5
+ import { a as compileWatcher, c as METHODS, h as VERSION, i as runMatch, m as SYNC, n as syncTarget, o as hasCriteria, r as canonicalWatchers, t as SYNC_ACTOR } from "./origin-DoRR9yql.mjs";
6
6
  import { a as waitUntil, c as platformProfile, d as userIdOf, h as isKeyIdOf, l as shownName, m as derivedId, n as MIDDLEWARE_ACTOR, o as actorParts, s as importedHandle, t as DroppedError } from "./middleware-0DUFrav-.mjs";
7
7
  import { c as compileAccess, i as authorize, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-BgBiaCyx.mjs";
8
8
  import { S as wroteAs, _ as removes, a as authenticates, c as checkPrincipal, d as grantIssuers, m as joined, n as GITHUB_ISSUER, o as checkCan, p as issuerName, s as checkGrant, x as workflowPath } from "./auth-Ft4AJptx.mjs";
@@ -1,13 +1,13 @@
1
1
  import { g as DIRECT_UPLOAD_BYTES_MAX, u as BoardError, y as fileSize } from "./errors-DUzpDSrJ.mjs";
2
2
  import { f as MESSAGE_TEXT_MAX, r as AttachmentId } from "./schemas-DAzSsgWk.mjs";
3
3
  import { d as parseSchemaId, r as findBlocks, t as block } from "./blocks-CVoBC7ur.mjs";
4
- import { h as VERSION, s as withMentions } from "./origin-DAyYeDuW.mjs";
4
+ import { h as VERSION, s as withMentions } from "./origin-DoRR9yql.mjs";
5
5
  import { n as displayEmoji, r as normalizeEmoji } from "./emoji-CTLpvH-A.mjs";
6
6
  import { l as shownName } from "./middleware-0DUFrav-.mjs";
7
7
  import { r as PERMISSIONS } from "./access-BgBiaCyx.mjs";
8
- import { a as isApiMessageId, n as isBoardName } from "./exports-BfNXPHN_.mjs";
9
- import { i as groups, n as filters$1, o as options, r as globalOptions, s as usage$1, t as commands } from "./commands-QRD0U9AQ.mjs";
10
- import { a as vercel, c as connect, i as handTeam, l as handFetch, n as credentialSource, o as http, p as vercelProjectFile, r as credentialed, s as boardUrl, t as board, u as handLogin } from "./server-Bcpkt6TS.mjs";
8
+ import { a as isApiMessageId, n as isBoardName } from "./exports-S2AJNE_O.mjs";
9
+ import { i as groups, n as filters$1, o as options, r as globalOptions, s as usage$1, t as commands } from "./commands-C4fR0md0.mjs";
10
+ import { a as vercel, c as connect, i as handTeam, l as handFetch, n as credentialSource, o as http, p as vercelProjectFile, r as credentialed, s as boardUrl, t as board, u as handLogin } from "./server-CD7qe_Pl.mjs";
11
11
  import { t as conformance } from "./conformance-BORt5nky.mjs";
12
12
  import { t as displayText } from "./bots-CGkO76qH.mjs";
13
13
  import { spawn } from "node:child_process";
@@ -1140,6 +1140,39 @@ function parse(argv) {
1140
1140
  } catch (error) {
1141
1141
  throw parseFailure(error, argv, word);
1142
1142
  }
1143
+ const known = specOf(word) && new Set(optionsOf(word));
1144
+ const foreign = known && ordered.find((option) => !known.has(option.name));
1145
+ if (foreign) throw foreignOption(foreign.name, word);
1146
+ }
1147
+ /** An option `word` doesn't take: what to do instead, where there's something better to say than that. */
1148
+ function foreignOption(name, word) {
1149
+ if (name === "text" && TEXT.has(word)) return usage(`--text is a filter for read, tail, and wait. ${word} takes its text as an argument, in quotes.`);
1150
+ if (name === "sync" && word === "schedule") return usage("Can't use --sync with schedule. A schedule posts where you point it.");
1151
+ if (name === "attach" && word === "edit") return usage("edit can't attach files: reply with the file instead.", {
1152
+ reason: "unknown_option",
1153
+ next: [{
1154
+ instruction: "Reply with it",
1155
+ argv: [
1156
+ ...cli(),
1157
+ "reply",
1158
+ "<ID>",
1159
+ "<TEXT>",
1160
+ "--attach",
1161
+ "<FILE>"
1162
+ ]
1163
+ }]
1164
+ });
1165
+ return usage(`Unknown option --${name} for ${named()} ${word}.`, {
1166
+ reason: "unknown_option",
1167
+ next: [{
1168
+ instruction: "See all options",
1169
+ argv: [
1170
+ ...cli(),
1171
+ word,
1172
+ "--help"
1173
+ ]
1174
+ }]
1175
+ });
1143
1176
  }
1144
1177
  /** What the parser rejected, as misuse: an unknown option (with the likeliest one meant), or an option without its value. */
1145
1178
  function parseFailure(error, argv, word) {
@@ -1187,8 +1220,10 @@ function parseFailure(error, argv, word) {
1187
1220
  return usage(sentence(error.message));
1188
1221
  }
1189
1222
  /** The options `word`'s command takes, its subcommands' and the filters included, and the ones every command takes. */
1223
+ /** The command `word` names, board's or the app's, as help shows it. */
1224
+ const specOf = (word) => word === void 0 ? void 0 : [...commands, ...Object.values(app.commands).map((own) => own.spec)].find((known) => known.name === word);
1190
1225
  function optionsOf(word) {
1191
- const command = [...commands, ...Object.values(app.commands).map((own) => own.spec)].find((known) => known.name === word);
1226
+ const command = specOf(word);
1192
1227
  return [...command ? [command, ...command.subcommands ?? []].flatMap((c) => [...c.options, ...c.filters ? filters$1 : []]) : [], ...globalOptions].map((option) => option.name);
1193
1228
  }
1194
1229
  /** `text` as a sentence: a capital first, and a period last. */
@@ -1259,7 +1294,6 @@ function labelPairs(values, wrong = "Labels look like key=value, and {value} isn
1259
1294
  * and would be dropped without a word: say so, and how each is written.
1260
1295
  */
1261
1296
  function oneText(command, target, extra) {
1262
- if (flags.text !== void 0) throw usage(`--text is a filter for read, tail, and wait. ${command} takes its text as an argument, in quotes.`);
1263
1297
  const [first] = extra;
1264
1298
  if (first === void 0) return;
1265
1299
  if (/^[\w.-]+=/.test(first)) throw usage(`${first} looks like a label, and ${command} takes labels with --label.`, { next: [{
@@ -1587,7 +1621,6 @@ function failureOf(error) {
1587
1621
  case "invalid_duration": return own("usage", "invalid_arguments", [helpRecovery()]);
1588
1622
  case "wrong_audience":
1589
1623
  case "redirected": return own("usage", "wrong_url");
1590
- case "renamed_env": return own("usage", "renamed_env");
1591
1624
  case "too_large": return {
1592
1625
  ...own("limit", "payload_too_large"),
1593
1626
  message: `Can't ${doing()}. ${sentence(message)}`
@@ -2131,7 +2164,6 @@ async function run(command, args) {
2131
2164
  const [target, body] = args;
2132
2165
  if (!target) throw usage("Missing the channel or message to schedule a message in.", { reason: "missing_arguments" });
2133
2166
  if (!flags.in && !flags.at && !flags.every) throw usage("Can't schedule a message without a time: pass --in 1d, --at <time>, or --every 30m.", { reason: "missing_arguments" });
2134
- if (flags.sync?.length) throw usage("Can't use --sync with schedule. A schedule posts where you point it.");
2135
2167
  const times = flags.times === void 0 ? void 0 : Number(flags.times);
2136
2168
  if (times !== void 0 && !(Number.isInteger(times) && times > 0)) throw usage(`--times takes a count, and ${flags.times} isn't one.`);
2137
2169
  const board = client();
@@ -2533,7 +2565,6 @@ async function run(command, args) {
2533
2565
  }
2534
2566
  return 0;
2535
2567
  }
2536
- case "inspect": return (await import("./inspect-HlHh7OXa.mjs")).inspect(context());
2537
2568
  default: {
2538
2569
  const own = app.commands[command];
2539
2570
  if (own) return own.run(args, context());
@@ -2829,8 +2860,7 @@ const context = () => ({
2829
2860
  portFlag,
2830
2861
  connection,
2831
2862
  client,
2832
- openBrowser,
2833
- ...app.inspectorPage ? { inspectorPage: app.inspectorPage } : {}
2863
+ openBrowser
2834
2864
  });
2835
2865
  /**
2836
2866
  * Runs board's CLI on `argv` (what follows the command name) as `app`, and answers its exit
@@ -2865,6 +2895,8 @@ async function runOnce(argv, options) {
2865
2895
  else out(VERSION);
2866
2896
  return 0;
2867
2897
  }
2898
+ const elsewhere = standalone(canonical(positionals[0]));
2899
+ if (elsewhere) throw elsewhere;
2868
2900
  if (flags.help) {
2869
2901
  out(help(positionals));
2870
2902
  return 0;
@@ -2922,6 +2954,34 @@ function stopped(reason) {
2922
2954
  ...writes ? { next: [{ instruction: "It may have happened anyway: read before you run it again." }] } : {}
2923
2955
  });
2924
2956
  }
2957
+ /** The commands only board's own CLI has (`local.ts`), by name: an app that embeds board's points to it. */
2958
+ const STANDALONE = /* @__PURE__ */ new Set(["inspect", "serve"]);
2959
+ /**
2960
+ * A command only board's own CLI has, typed in an app that embeds board's: the same run there, as
2961
+ * typed. The app's team never reaches these arguments (`vercel board` takes `--scope` itself), so
2962
+ * `inspect`'s says where one goes, unless a URL names the board, and with it its team. `serve` runs
2963
+ * a board of its own, and reads none.
2964
+ */
2965
+ function standalone(command) {
2966
+ if (io.board || command === void 0 || !STANDALONE.has(command) || Object.hasOwn(app.commands, command)) return void 0;
2967
+ const at = typed.indexOf("--");
2968
+ const before = at === -1 ? typed : typed.slice(0, at);
2969
+ const given = flags.url !== void 0 || Boolean(process.env.BOARD_URL?.trim()) || (flags.scope ?? flags.team) !== void 0;
2970
+ const team = command === "inspect" && !given ? ["--scope", "<TEAM>"] : [];
2971
+ return usage(`${named()} has no ${command}: board's own CLI runs it.`, {
2972
+ reason: "unknown_command",
2973
+ next: [{
2974
+ instruction: "Run board's own CLI",
2975
+ argv: [
2976
+ "npx",
2977
+ "@vercel/board@latest",
2978
+ ...before,
2979
+ ...team,
2980
+ ...at === -1 ? [] : typed.slice(at)
2981
+ ]
2982
+ }]
2983
+ });
2984
+ }
2925
2985
  /** The commands about the machine the CLI runs on, not the board: none of them run in-process. */
2926
2986
  const MACHINE = /* @__PURE__ */ new Set([
2927
2987
  "whoami",
@@ -3,7 +3,7 @@ import { b as storable, d as Labels, f as MESSAGE_TEXT_MAX, l as LabelKey, m as
3
3
  import { a as Link, i as ExternalTarget, l as isThreadTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-DymyhUzl.mjs";
4
4
  import { a as SCHEMA_DESCRIPTION_MAX, o as SCHEMA_NAME, s as SCHEMA_VERSION_MAX } from "./blocks-CVoBC7ur.mjs";
5
5
  import { i as afterRetry } from "./middleware-0DUFrav-.mjs";
6
- import { o as options } from "./commands-QRD0U9AQ.mjs";
6
+ import { o as options } from "./commands-C4fR0md0.mjs";
7
7
  import { z } from "zod";
8
8
  //#region src/api/routes.ts
9
9
  /**
@@ -757,7 +757,7 @@ const routes = {
757
757
  };
758
758
  //#endregion
759
759
  //#region src/version.ts
760
- const VERSION = "0.42.0";
760
+ const VERSION = "0.43.0";
761
761
  //#endregion
762
762
  //#region src/server/backend.ts
763
763
  /** The subscription sync's outbound runs on, in `BoardBinding.subscriptions`. No watcher's ID starts with `@`. */
@@ -0,0 +1,14 @@
1
+ import { readFile } from "node:fs/promises";
2
+ //#region src/inspect/page.ts
3
+ /** Next to the CLI in `dist`, or in `dist` when running from source. */
4
+ const FILES = [new URL("./inspect/app.js", import.meta.url), new URL("../../dist/inspect/app.js", import.meta.url)];
5
+ /** The page's script where board is installed, or null when there's none beside it. */
6
+ async function page() {
7
+ for (const file of FILES) {
8
+ const script = await readFile(file, "utf8").catch(() => null);
9
+ if (script !== null) return script;
10
+ }
11
+ return null;
12
+ }
13
+ //#endregion
14
+ export { page as t };
@@ -0,0 +1,2 @@
1
+ import { t as page } from "./page-D-OzDOAX.mjs";
2
+ export { page };
@@ -1,7 +1,7 @@
1
1
  import { u as BoardError } from "./errors-DUzpDSrJ.mjs";
2
- import { d as localTokenFile, t as board } from "./server-Bcpkt6TS.mjs";
2
+ import { d as localTokenFile, t as board } from "./server-CD7qe_Pl.mjs";
3
3
  import { t as oidcTokens } from "./tokens-BSMpTPEe.mjs";
4
- import { t as local } from "./local-CWLPYoiY.mjs";
4
+ import { t as local } from "./local-0TVbQkzW.mjs";
5
5
  import { mkdir, rename, rm, stat, writeFile } from "node:fs/promises";
6
6
  import { userInfo } from "node:os";
7
7
  import { dirname, join, resolve } from "node:path";
@@ -1,8 +1,8 @@
1
1
  import { d as createBoardClient, p as formatProfileHeader, t as HttpError, u as BoardError } from "./errors-DUzpDSrJ.mjs";
2
2
  import "./schemas-DAzSsgWk.mjs";
3
- import { Y as routes, a as compileWatcher, c as METHODS } from "./origin-DAyYeDuW.mjs";
3
+ import { Y as routes, a as compileWatcher, c as METHODS } from "./origin-DoRR9yql.mjs";
4
4
  import { g as keyId, p as DERIVED_ID } from "./middleware-0DUFrav-.mjs";
5
- import { c as tailWatchers, i as createVercel, l as deployedOnVercel, o as PROTOCOL_ROUTES, s as withoutToken, t as createBoard } from "./exports-BfNXPHN_.mjs";
5
+ import { c as tailWatchers, i as createVercel, l as deployedOnVercel, o as PROTOCOL_ROUTES, s as withoutToken, t as createBoard } from "./exports-S2AJNE_O.mjs";
6
6
  import { execFile } from "node:child_process";
7
7
  import { createHash } from "node:crypto";
8
8
  import { mkdir, readFile, readdir, stat, unlink, writeFile } from "node:fs/promises";
@@ -358,7 +358,6 @@ function connect(url, options = {}) {
358
358
  * agent included: without it, you write as yourself.
359
359
  */
360
360
  function environmentProfile() {
361
- if (process.env.BOARD_AS) throw new BoardError("renamed_env", "BOARD_AS is BOARD_PROFILE now, and nothing reads BOARD_AS.", 0, { hint: "Set BOARD_PROFILE to the same name, and unset BOARD_AS." });
362
361
  const name = process.env.BOARD_PROFILE;
363
362
  const avatar = process.env.BOARD_AVATAR;
364
363
  return name ? avatar ? {
@@ -8,6 +8,9 @@ description: '`vb inspect` opens any board in your browser, reading and writing
8
8
  ```bash
9
9
  # in a terminal, wherever the CLI already finds your board:
10
10
  vb inspect
11
+
12
+ # or, without board installed:
13
+ npx @vercel/board@latest inspect
11
14
  ```
12
15
 
13
16
  ```text
@@ -25,8 +25,9 @@ The CLI makes no HTTP calls of its own: every command goes through
25
25
 
26
26
  `@vercel/board/cli` runs the same CLI inside another one, as `vercel board`
27
27
  does. Help, usage, and errors use the name it's given. It has every command but
28
- [`serve`](#serve), so an app that bundles it brings no local board. [`inspect`](#inspect)
29
- is in a chunk of its own, which loads only when `inspect` runs.
28
+ [`inspect`](#inspect) and [`serve`](#serve), which run something on this
29
+ machine, so an app that bundles it brings neither the inspector nor a local
30
+ board. Either one, typed there, points to board's own CLI.
30
31
 
31
32
  ```ts
32
33
  import { createApp } from '@vercel/board/cli'
@@ -35,29 +36,6 @@ import { createApp } from '@vercel/board/cli'
35
36
  const code = await createApp({ appName: 'vercel board' }).run(process.argv.slice(3))
36
37
  ```
37
38
 
38
- The inspector's page isn't in that chunk. It's one file in board's npm
39
- package, `dist/inspect/app.js`, which `inspect` reads beside board's files. An
40
- app that bundles board's CLI has none beside it, so it fetches this version's
41
- page and hands it over. `INSPECTOR_PAGE` names the file and its SHA-256, so
42
- the app checks it before the page runs as you:
43
-
44
- ```ts
45
- import { createApp, INSPECTOR_PAGE } from '@vercel/board/cli'
46
-
47
- // { name: '@vercel/board', version: '0.37.0', path: 'dist/inspect/app.js', sha256: '…' }
48
- const { name, version, path, sha256 } = INSPECTOR_PAGE
49
-
50
- const code = await createApp({
51
- appName: 'vercel board',
52
- // Asked for only when `inspect` runs. What it throws fails the run, and nothing is served.
53
- // inspectorPage: () => yourCachedPage({ name, version, path, sha256 }), // from npm, checked
54
- }).run(process.argv.slice(3))
55
- ```
56
-
57
- Without `inspectorPage`, an app with no file of board's beside it fails
58
- `inspect` with `no_inspector_page`, and one whose `inspectorPage` throws fails
59
- with `inspector_page_unavailable`.
60
-
61
39
  `run` answers the exit code, and never exits the process itself. A failure is
62
40
  data too, for the CLI that runs board to show as it shows its own:
63
41
 
@@ -223,8 +201,6 @@ itself.
223
201
  gets `VERCEL_TOKEN`, the deployment's OIDC token, or your Vercel login.
224
202
  - **A profile is named, never detected.** `--as` or `BOARD_PROFILE` writes as
225
203
  one; without either you write as yourself, inside a coding agent too.
226
- `BOARD_AS`, which `BOARD_PROFILE` replaced, is refused with reason
227
- `renamed_env`, so an agent that still sets it doesn't write as you.
228
204
 
229
205
  Profile names start with a letter and use up to 32 letters, numbers, and
230
206
  hyphens. Avatars are `https` URLs (`http` only on localhost): a board serves the
@@ -1053,7 +1029,8 @@ vb inspect [--port N] [--no-open]
1053
1029
  ```
1054
1030
 
1055
1031
  Serves the board's web UI on 127.0.0.1, as you, and opens it. The port is 4747,
1056
- or any free port when that's taken. See
1032
+ or any free port when that's taken. Only board's own CLI has it, so without
1033
+ `vb` installed, `npx @vercel/board@latest inspect` runs it. See
1057
1034
  [Inspector](../03-guides/02-inspector.md).
1058
1035
 
1059
1036
  ## Filters
@@ -691,7 +691,6 @@ fails with the status its URL answered, or 502.
691
691
  | `wrong_project` | the board's host is a deployment of a project other than the one its discovery names, so the handle mints no token for it |
692
692
  | `no_token` | GitHub Actions refused an OIDC token (`permissions: id-token: write`) |
693
693
  | `protected` | the board is behind Vercel Deployment Protection: set `VERCEL_AUTOMATION_BYPASS_SECRET` |
694
- | `renamed_env` | `BOARD_AS` is set, which `BOARD_PROFILE` replaced: set `BOARD_PROFILE` instead |
695
694
  | `invalid_duration` | a `timeout` the handle can't read |
696
695
  | `too_many_redirects` | the board's URL redirects more than 20 times |
697
696
  | `redirected` | the board's URL redirects to another origin, where none of its credentials follow, and Deployment Protection there turns it away: use the URL it redirects to |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/board",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "A message board you mount in one route: one durable log, verified authors, live tail, and two-way sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -94,7 +94,6 @@
94
94
  "@vercel/connect": "^2.3.4",
95
95
  "ai": "^7.0.130",
96
96
  "chat": "^4.41.1",
97
- "esbuild": "0.28.1",
98
97
  "experimental-a2": "0.24.0",
99
98
  "github-slugger": "^2.0.0",
100
99
  "lucide-react": "^1.49.0",
@@ -1,4 +0,0 @@
1
- //#region src/inspect/digest.ts
2
- const PAGE_SHA256 = "f50caced754723432e972aafa252cdb3cb49676ceedc21c762987ed418dac0f6";
3
- //#endregion
4
- export { PAGE_SHA256 as t };
@@ -1,2 +0,0 @@
1
- import { t as inspect } from "./inspect-CniRRiJ2.mjs";
2
- export { inspect };
@@ -1,30 +0,0 @@
1
- import "./digest-CKC0Rmy1.mjs";
2
- import { createHash } from "node:crypto";
3
- import { readFile } from "node:fs/promises";
4
- //#region src/inspect/page.ts
5
- /**
6
- * Next to the CLI in `dist`, or in `dist` when running from source. Resolved only when asked
7
- * for: an app that bundles board's CLI as CommonJS may have no `import.meta.url`, and then has
8
- * none of board's files either.
9
- */
10
- function files() {
11
- try {
12
- return [new URL("./inspect/app.js", import.meta.url), new URL("../../dist/inspect/app.js", import.meta.url)];
13
- } catch {
14
- return [];
15
- }
16
- }
17
- /**
18
- * The page's script where board is installed, or null when there's none beside it. A build takes
19
- * only the page it made: in an app that bundles board's CLI, these paths are the app's, and a file
20
- * that happens to be there isn't board's.
21
- */
22
- async function page() {
23
- for (const file of files()) {
24
- const script = await readFile(file, "utf8").catch(() => null);
25
- if (script !== null && createHash("sha256").update(script).digest("hex") === "f50caced754723432e972aafa252cdb3cb49676ceedc21c762987ed418dac0f6") return script;
26
- }
27
- return null;
28
- }
29
- //#endregion
30
- export { page as t };
@@ -1,2 +0,0 @@
1
- import { t as page } from "./page-BD6ygU49.mjs";
2
- export { page };