@vercel/board 0.44.0 → 0.45.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/{access-BgBiaCyx.mjs → access-3udXjJAg.mjs} +2 -2
- package/dist/access.d.mts +3 -3
- package/dist/access.mjs +6 -6
- package/dist/{actors-DkZsnMgA.mjs → actors-DasGZnfb.mjs} +3 -3
- package/dist/{auth-C8jxty0C.d.mts → auth-BG_whr9_.d.mts} +1 -1
- package/dist/{auth-Ft4AJptx.mjs → auth-aiOVE82-.mjs} +2 -2
- package/dist/{backend-_3W_5g6y.d.mts → backend-D6yTo8Un.d.mts} +3 -3
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-DZ4DsAZ7.mjs → chat-provider-BvNqOQFL.mjs} +2 -2
- package/dist/{chat-provider-HQo68RWL.d.mts → chat-provider-V2jnjVLq.d.mts} +2 -2
- package/dist/cli-commands.d.mts +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.d.mts +2 -2
- package/dist/cli-embedded.mjs +2 -2
- package/dist/cli.mjs +14 -7
- package/dist/{commands-B75pBXIV.mjs → commands-CqdnjUkm.mjs} +6 -0
- package/dist/{commands-DHGZWeSZ.d.mts → commands-DewS14_P.d.mts} +6 -0
- package/dist/{conformance-CHqXZoGe.mjs → conformance-BInS4_6b.mjs} +3 -3
- package/dist/conformance.d.mts +1 -1
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-D07DTYSi.mjs → engine-XVBt02Bl.mjs} +5 -5
- package/dist/{errors-DUzpDSrJ.mjs → errors-ZazTZh-s.mjs} +20 -3
- package/dist/{events-voButVQW.mjs → events-D17RndlV.mjs} +2 -2
- package/dist/{exports-BNk4w-b2.mjs → exports-DCxecX15.mjs} +205 -48
- package/dist/exports-Gspe1eEq.d.mts +4 -0
- package/dist/{external-DymyhUzl.mjs → external-DfhN7lKK.mjs} +1 -1
- package/dist/{index-CwOOIT0e.d.mts → index-Djmr4GzQ.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +4 -4
- package/dist/index.node.d.mts +6 -6
- package/dist/index.node.mjs +3 -3
- package/dist/inspect/app.js +88 -88
- package/dist/inspect-C8U3A4jQ.mjs +2 -0
- package/dist/{inspect-dtQlHBcq.mjs → inspect-CHsgnf_5.mjs} +23 -7
- package/dist/{local-CnGNTReZ.mjs → local-DE9vmanM.mjs} +25 -14
- package/dist/{main-CpsAmpEy.mjs → main-CF1Me3jg.mjs} +19 -11
- package/dist/{memory-DhduVbUu.mjs → memory-DyEL0fvN.mjs} +2 -2
- package/dist/{middleware-0DUFrav-.mjs → middleware-BHHKHA9q.mjs} +2 -2
- package/dist/{origin-D4ER_Tze.mjs → origin-BbwhnKrg.mjs} +7 -7
- package/dist/{provider-CVI-DlWl.d.mts → provider-BC9mPYVh.d.mts} +14 -6
- package/dist/{routes-DrByOCc1.mjs → routes-CkUetTO2.mjs} +12 -13
- package/dist/{routes-CErTwlSZ.d.mts → routes-zm4TXKCC.d.mts} +6 -1
- package/dist/{schemas-DAzSsgWk.mjs → schemas-BhZaystC.mjs} +8 -2
- package/dist/{serve-BQT5quKD.mjs → serve-CEMvl0EH.mjs} +4 -4
- package/dist/{server-FlDE6BDt.mjs → server-Bmz0zqYM.mjs} +8 -8
- package/dist/{serving-hcxzaCCO.mjs → serving-BLVRrJ7P.mjs} +1 -1
- package/dist/{sql-P9g-rLIF.mjs → sql-CyVcjw8x.mjs} +2 -2
- package/dist/{sqlite-B3rCcIof.mjs → sqlite-Con-8duk.mjs} +2 -2
- package/dist/{sqlite-db-D0Fyju-4.mjs → sqlite-db-BdzxtUOV.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +2 -2
- package/dist/sync-chat-sdk.mjs +2 -2
- package/dist/sync-github.d.mts +2 -2
- package/dist/sync-github.mjs +2 -2
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-linear.mjs +2 -2
- package/dist/sync-slack.d.mts +3 -3
- package/dist/sync-slack.mjs +4 -4
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{tokens-BSMpTPEe.mjs → tokens-BErYXuHZ.mjs} +2 -2
- package/docs/01-board/01-mounting.md +2 -2
- package/docs/01-board/04-messages.md +1 -1
- package/docs/01-board/07-schedules.md +2 -2
- package/docs/01-board/09-access.md +8 -0
- package/docs/03-guides/02-inspector.md +16 -0
- package/docs/04-reference/02-board.md +23 -2
- package/docs/04-reference/03-http.md +3 -3
- package/package.json +1 -1
- package/dist/exports-DFwXKst5.d.mts +0 -4
- package/dist/inspect-DBLdh9NM.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as forbidden } from "./errors-
|
|
2
|
-
import { a as CAN_MAX,
|
|
1
|
+
import { a as forbidden } from "./errors-ZazTZh-s.mjs";
|
|
2
|
+
import { a as CAN_MAX, s as ChannelPath } from "./schemas-BhZaystC.mjs";
|
|
3
3
|
//#region src/server/access.ts
|
|
4
4
|
/**
|
|
5
5
|
* What a principal may do in a channel. `read` covers messages, threads,
|
package/dist/access.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as
|
|
2
|
-
import { _ as GrantFacts, a as DEFAULT_CAN, b as grantAccess, c as IssuerConfig, d as Principal, f as PrincipalKind, g as GrantExplanation, h as DecidingGrant, i as Claims, l as Known, m as Caller, n as AuthenticateContext, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantSource, y as explainGrants } from "./auth-
|
|
1
|
+
import { $t as compileAccess, Bt as Can, Gt as GrantChangeRefusal, Ht as FULL_ACCESS, Kt as GrantShape, Qt as checkGrantChange, Rt as Access, Ut as Grant, Vt as ChannelPattern, Wt as GrantChange, Xt as Permission, Yt as PERMISSIONS, an as Author, en as parseCan, nn as Actor, on as CAN_MAX, qt as InvalidCan, tn as union, zt as AccessSummary } from "./routes-zm4TXKCC.mjs";
|
|
2
|
+
import { _ as GrantFacts, a as DEFAULT_CAN, b as grantAccess, c as IssuerConfig, d as Principal, f as PrincipalKind, g as GrantExplanation, h as DecidingGrant, i as Claims, l as Known, m as Caller, n as AuthenticateContext, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantSource, y as explainGrants } from "./auth-BG_whr9_.mjs";
|
|
3
3
|
//#region src/server/tokens.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* The OIDC tokens made out to this board: a request's bearer token, from Vercel (people and
|
|
@@ -25,4 +25,4 @@ type ResolvedActor = {
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function resolveActor(principal: Principal, claims: Claims): ResolvedActor;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { type Access, type AccessSummary, type Authenticate, type AuthenticateContext, CAN_MAX, type Caller, type CallerRequest, type Can, type ChannelPattern, type Claims, DEFAULT_CAN, type DecidingGrant, FULL_ACCESS, type Grant, type GrantChange, type GrantChangeRefusal, type GrantExplanation, type GrantFacts, type GrantShape, type GrantSource, type HostPrincipal, InvalidCan, type IssuerConfig, type Known, type OidcTokensOptions, type Permission, type Principal, type PrincipalKind, checkGrantChange, compileAccess, explainGrants, grantAccess, parseCan, union };
|
|
28
|
+
export { type Access, type AccessSummary, type Authenticate, type AuthenticateContext, CAN_MAX, type Caller, type CallerRequest, type Can, type ChannelPattern, type Claims, DEFAULT_CAN, type DecidingGrant, FULL_ACCESS, type Grant, type GrantChange, type GrantChangeRefusal, type GrantExplanation, type GrantFacts, type GrantShape, type GrantSource, type HostPrincipal, InvalidCan, type IssuerConfig, type Known, type OidcTokensOptions, PERMISSIONS, type Permission, type Principal, type PrincipalKind, checkGrantChange, compileAccess, explainGrants, grantAccess, parseCan, union };
|
package/dist/access.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as CAN_MAX } from "./schemas-
|
|
2
|
-
import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-
|
|
3
|
-
import { C as explainGrants, t as DEFAULT_CAN, w as grantAccess } from "./auth-
|
|
4
|
-
import { a as resolveActor } from "./actors-
|
|
5
|
-
import { t as oidcTokens } from "./tokens-
|
|
6
|
-
export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
|
|
1
|
+
import { a as CAN_MAX } from "./schemas-BhZaystC.mjs";
|
|
2
|
+
import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-3udXjJAg.mjs";
|
|
3
|
+
import { C as explainGrants, t as DEFAULT_CAN, w as grantAccess } from "./auth-aiOVE82-.mjs";
|
|
4
|
+
import { a as resolveActor } from "./actors-DasGZnfb.mjs";
|
|
5
|
+
import { t as oidcTokens } from "./tokens-BErYXuHZ.mjs";
|
|
6
|
+
export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, PERMISSIONS, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { u as parseCan } from "./access-
|
|
1
|
+
import { g as parseProfileHeader, r as badRequest } from "./errors-ZazTZh-s.mjs";
|
|
2
|
+
import { C as toStorable } from "./schemas-BhZaystC.mjs";
|
|
3
|
+
import { u as parseCan } from "./access-3udXjJAg.mjs";
|
|
4
4
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
5
5
|
//#region src/server/actors.ts
|
|
6
6
|
/** Agents whose marks the board serves at `/avatars/<name>`, for a caller to pass as an avatar. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bt as Can, Jt as Level, Rt as Access, Xt as
|
|
1
|
+
import { Bt as Can, Jt as Level, Rt as Access, Xt as Permission, Zt as WrittenCan } from "./routes-zm4TXKCC.mjs";
|
|
2
2
|
import { JWTVerifyGetKey } from "jose";
|
|
3
3
|
//#region src/server/grants.d.ts
|
|
4
4
|
/** Who asks, as a verified token says, in the terms grants name them by. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as forbidden,
|
|
2
|
-
import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-
|
|
1
|
+
import { a as forbidden, r as badRequest, t as HttpError, u as unauthorized } from "./errors-ZazTZh-s.mjs";
|
|
2
|
+
import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-3udXjJAg.mjs";
|
|
3
3
|
//#region src/server/grants.ts
|
|
4
4
|
/**
|
|
5
5
|
* How close `principal` is to the caller, or null when it doesn't name it: `principal` for its own
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as ScheduleBody, A as LabelBody, Bt as Can, C as InboxAckBody, D as InboxPushBody, Dt as ThreadView, E as InboxNextQuery, F as Me, Ft as UploadStartBody, I as MessageView, It as UploadTicket, J as RegisterBody, Jt as Level, K as ReactBody, L as MessagesPage, M as LinkedQuery, N as MatchView, Nt as UpdateGrantBody, O as InboxQuery, Ot as ThreadsPage, P as MatchesQuery, R as MessagesQuery, Rt as Access, St as SyncReceiptBody, T as InboxItem, Tt as SyncedView, V as PostBody, X as RegistrationView,
|
|
2
|
-
import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-
|
|
3
|
-
import { I as ErrorOrigin, P as BoardClient, m as SyncProvider
|
|
1
|
+
import { $ as ScheduleBody, A as LabelBody, Bt as Can, C as InboxAckBody, D as InboxPushBody, Dt as ThreadView, E as InboxNextQuery, F as Me, Ft as UploadStartBody, I as MessageView, It as UploadTicket, J as RegisterBody, Jt as Level, K as ReactBody, L as MessagesPage, M as LinkedQuery, N as MatchView, Nt as UpdateGrantBody, O as InboxQuery, Ot as ThreadsPage, P as MatchesQuery, R as MessagesQuery, Rt as Access, St as SyncReceiptBody, T as InboxItem, Tt as SyncedView, V as PostBody, X as RegistrationView, Xt as Permission, a as BoardEventView, an as Author, bt as SyncImportBody, c as CreateChannelBody, ct as SchemaView, d as EditBody, f as EventsPage, ft as SourceRead, g as Explanation, gt as SyncCopiesView, h as ExplainQuery, ht as SyncCopiesQuery, in as Attachment, jt as TypingBody, kt as ThreadsQuery, l as DeleteBody, ln as ExternalEvent, lt as SourceJoin, n as ActorView, nn as Actor, nt as ScheduleView, ot as SchemaBody, p as EventsQuery, pt as SourceReadQuery, rt as SchedulesQuery, s as ChannelView, sn as Labels, t as AckBody, u as Discovery, ut as SourceJoinBody, v as GrantBody, vt as SyncFindQuery, w as InboxEntry, wt as SyncThreadView, x as GrantView, yt as SyncFindView } from "./routes-zm4TXKCC.mjs";
|
|
2
|
+
import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-BG_whr9_.mjs";
|
|
3
|
+
import { H as ProfileOption, I as ErrorOrigin, P as BoardClient, m as SyncProvider } from "./provider-BC9mPYVh.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/server/sandbox.d.ts
|
|
6
6
|
/** How a rule matches a value: a regular expression (RE2), or the value exactly. */
|
package/dist/backend-local.d.mts
CHANGED
package/dist/backend-local.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as local } from "./local-
|
|
1
|
+
import { t as local } from "./local-DE9vmanM.mjs";
|
|
2
2
|
export { local };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./external-
|
|
2
|
-
import { c as SyncProvider, s as ResolvedTarget } from "./events-
|
|
1
|
+
import "./external-DfhN7lKK.mjs";
|
|
2
|
+
import { c as SyncProvider, s as ResolvedTarget } from "./events-D17RndlV.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { Chat, stringifyMarkdown } from "chat";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as SyncRoot, E as ProviderEvent, _ as SyncFn, a as ProviderOptions, c as Receive, f as ResolvedTarget, i as ProviderFile, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, r as ProviderDelivery, t as FetchedLink } from "./provider-
|
|
1
|
+
import { cn as ExternalAuthor, dn as ExternalLink, ft as SourceRead, lt as SourceJoin, nn as Actor, un as ExternalFile } from "./routes-zm4TXKCC.mjs";
|
|
2
|
+
import { A as SyncRoot, E as ProviderEvent, _ as SyncFn, a as ProviderOptions, c as Receive, f as ResolvedTarget, i as ProviderFile, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, r as ProviderDelivery, t as FetchedLink } from "./provider-BC9mPYVh.mjs";
|
|
3
3
|
import { Adapter, Author, FileUpload, Message, ReactionEvent, StateAdapter } from "chat";
|
|
4
4
|
//#region src/sync/chat-provider.d.ts
|
|
5
5
|
type ChatInput = {
|
package/dist/cli-commands.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-
|
|
1
|
+
import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-DewS14_P.mjs";
|
|
2
2
|
export { CliArgument, CliCommand, CliExample, CliOption, OptionName, commands, filters, globalOptions, groups, option, options, usage };
|
package/dist/cli-commands.mjs
CHANGED
|
@@ -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-
|
|
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-CqdnjUkm.mjs";
|
|
2
2
|
export { commands, filters, globalOptions, groups, option, options, usage };
|
package/dist/cli-embedded.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as Board } from "./backend-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { f as Board } from "./backend-D6yTo8Un.mjs";
|
|
2
|
+
import "./index-Djmr4GzQ.mjs";
|
|
3
3
|
//#region src/cli/failure.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* What kind of failure it is, which fixes the exit code: 2 for `usage` and `missing_input`, 130
|
package/dist/cli-embedded.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r 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 { r as stoppedBy } from "./exports-DCxecX15.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-CF1Me3jg.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-
|
|
3
|
-
import { f as projectDir } from "./server-
|
|
4
|
-
import { r as main } from "./main-
|
|
5
|
-
import { n as stopped, r as startInspector } from "./inspect-
|
|
2
|
+
import { a as option } from "./commands-CqdnjUkm.mjs";
|
|
3
|
+
import { f as projectDir } from "./server-Bmz0zqYM.mjs";
|
|
4
|
+
import { r as main } from "./main-CF1Me3jg.mjs";
|
|
5
|
+
import { n as stopped, r as startInspector } from "./inspect-CHsgnf_5.mjs";
|
|
6
6
|
import { appendFile, readFile } from "node:fs/promises";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
//#region src/cli/local.ts
|
|
@@ -22,15 +22,22 @@ const local = {
|
|
|
22
22
|
name: "inspect",
|
|
23
23
|
description: "the board in your browser, as you: read, post, react (local only)",
|
|
24
24
|
arguments: [],
|
|
25
|
-
options: [
|
|
25
|
+
options: [
|
|
26
|
+
option("port", "the port to listen on (default: a free one)"),
|
|
27
|
+
option("no-open"),
|
|
28
|
+
option("allow-host")
|
|
29
|
+
],
|
|
26
30
|
examples: [{
|
|
27
31
|
name: "open the board in your browser",
|
|
28
32
|
value: "inspect"
|
|
33
|
+
}, {
|
|
34
|
+
name: "serve it behind a proxy on another name",
|
|
35
|
+
value: "inspect --allow-host box.tailnet.ts.net"
|
|
29
36
|
}]
|
|
30
37
|
},
|
|
31
38
|
async run(args, context) {
|
|
32
39
|
if (args.length > 0) throw context.usage("inspect takes no arguments: pass its port with --port.");
|
|
33
|
-
return (await import("./inspect-
|
|
40
|
+
return (await import("./inspect-C8U3A4jQ.mjs")).inspect(context);
|
|
34
41
|
}
|
|
35
42
|
},
|
|
36
43
|
serve: {
|
|
@@ -53,7 +60,7 @@ const local = {
|
|
|
53
60
|
if (args.length > 0) throw usage("serve takes no arguments: pass its port with --port, and its directory with --dir.");
|
|
54
61
|
const port = portFlag();
|
|
55
62
|
const root = projectDir();
|
|
56
|
-
const { serveLocal } = await import("./serve-
|
|
63
|
+
const { serveLocal } = await import("./serve-CEMvl0EH.mjs");
|
|
57
64
|
const local = await serveLocal({
|
|
58
65
|
dir: flags.dir ?? join(root, ".board"),
|
|
59
66
|
...port !== void 0 ? { port } : {}
|
|
@@ -165,6 +165,12 @@ const options = {
|
|
|
165
165
|
type: "boolean",
|
|
166
166
|
description: "don't open the browser"
|
|
167
167
|
},
|
|
168
|
+
"allow-host": {
|
|
169
|
+
type: "string",
|
|
170
|
+
multiple: true,
|
|
171
|
+
value: "host",
|
|
172
|
+
description: "also answer requests for this host, from a proxy in front: whoever reaches it there acts as you"
|
|
173
|
+
},
|
|
168
174
|
in: {
|
|
169
175
|
type: "string",
|
|
170
176
|
value: "duration",
|
|
@@ -215,6 +215,12 @@ declare const options: {
|
|
|
215
215
|
readonly type: 'boolean';
|
|
216
216
|
readonly description: "don't open the browser";
|
|
217
217
|
};
|
|
218
|
+
readonly 'allow-host': {
|
|
219
|
+
readonly type: 'string';
|
|
220
|
+
readonly multiple: true;
|
|
221
|
+
readonly value: 'host';
|
|
222
|
+
readonly description: 'also answer requests for this host, from a proxy in front: whoever reaches it there acts as you';
|
|
223
|
+
};
|
|
218
224
|
readonly in: {
|
|
219
225
|
readonly type: 'string';
|
|
220
226
|
readonly value: 'duration';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as BoardError } from "./errors-ZazTZh-s.mjs";
|
|
2
|
+
import "./routes-CkUetTO2.mjs";
|
|
2
3
|
import { c as canonical, t as block } from "./blocks-CVoBC7ur.mjs";
|
|
3
|
-
import "./
|
|
4
|
-
import { a as canText, c as compileAccess } from "./access-BgBiaCyx.mjs";
|
|
4
|
+
import { a as canText, c as compileAccess } from "./access-3udXjJAg.mjs";
|
|
5
5
|
//#region src/conformance/index.ts
|
|
6
6
|
var Mismatch = class extends Error {};
|
|
7
7
|
const show = (value) => JSON.stringify(value) ?? String(value);
|
package/dist/conformance.d.mts
CHANGED
package/dist/conformance.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as conformance } from "./conformance-
|
|
1
|
+
import { t as conformance } from "./conformance-BInS4_6b.mjs";
|
|
2
2
|
export { conformance };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { l as isThreadTarget, s as channelOf } from "./external-
|
|
1
|
+
import { C as typeOf, _ as ATTACHMENT_BYTES_MAX, r as badRequest, s as notFound, t as HttpError, x as fileSize, y as IMPORT_BYTES_MAX } from "./errors-ZazTZh-s.mjs";
|
|
2
|
+
import { C as toStorable, p as MESSAGE_TEXT_MAX, s as ChannelPath } from "./schemas-BhZaystC.mjs";
|
|
3
|
+
import { l as isThreadTarget, s as channelOf } from "./external-DfhN7lKK.mjs";
|
|
4
4
|
import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
|
|
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-
|
|
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-BHHKHA9q.mjs";
|
|
6
6
|
import { a as replaceMentions, n as isEmail, t as extractMentions } from "./mentions-DfZGp3B-.mjs";
|
|
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-
|
|
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-D17RndlV.mjs";
|
|
8
8
|
import { i as vercelDeployments, n as displayText } from "./bots-CLKKMgYf.mjs";
|
|
9
9
|
//#region src/sync/engine.ts
|
|
10
10
|
/** `files`: a message with files may have no text. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as MESSAGE_TEXT_MAX } from "./schemas-BhZaystC.mjs";
|
|
2
2
|
import { r as normalizeEmoji } from "./emoji-CTLpvH-A.mjs";
|
|
3
3
|
import { ZodError } from "zod";
|
|
4
4
|
//#region src/contract/files.ts
|
|
@@ -244,6 +244,19 @@ const messageBody = (input) => {
|
|
|
244
244
|
attachments: attachments.map((a) => typeof a === "string" ? a : a.id)
|
|
245
245
|
} : rest;
|
|
246
246
|
};
|
|
247
|
+
/** Tells `onState` each change, once: `live` when the board answers, `retrying` when a request fails. It never guesses. */
|
|
248
|
+
function eventsState(onState) {
|
|
249
|
+
let current = null;
|
|
250
|
+
const tell = (next) => {
|
|
251
|
+
if (next === current) return;
|
|
252
|
+
current = next;
|
|
253
|
+
onState?.(next);
|
|
254
|
+
};
|
|
255
|
+
return {
|
|
256
|
+
answered: () => tell("live"),
|
|
257
|
+
failed: () => tell("retrying")
|
|
258
|
+
};
|
|
259
|
+
}
|
|
247
260
|
const UNITS = {
|
|
248
261
|
ms: 1,
|
|
249
262
|
s: 1e3,
|
|
@@ -605,10 +618,11 @@ function createBoardClient(options) {
|
|
|
605
618
|
inboxNext: async (key, opts = {}) => (await call("GET", `/inbox/${path(key)}/next${queryString(opts)}`)).items,
|
|
606
619
|
/** How an inbox event went: done, or an error to try it again. */
|
|
607
620
|
inboxAck: (key, id, body) => call("POST", `/inbox/${path(key)}/${path(id)}/ack`, { body }),
|
|
608
|
-
/** Live events. Reconnects from the last seen index whenever the stream closes. */
|
|
621
|
+
/** Live events. Reconnects from the last seen index whenever the stream closes, and tells `onState` whether it's live or retrying. */
|
|
609
622
|
async *events(query = {}, opts = {}) {
|
|
610
623
|
let after = query.after;
|
|
611
624
|
let failures = 0;
|
|
625
|
+
const state = eventsState(opts.onState);
|
|
612
626
|
while (!opts.signal?.aborted) {
|
|
613
627
|
let response;
|
|
614
628
|
try {
|
|
@@ -622,10 +636,12 @@ function createBoardClient(options) {
|
|
|
622
636
|
} catch (error) {
|
|
623
637
|
if (opts.signal?.aborted) return;
|
|
624
638
|
if (error instanceof BoardError && error.status >= 400 && error.status < 500) throw error;
|
|
639
|
+
state.failed();
|
|
625
640
|
await new Promise((r) => setTimeout(r, Math.min(3e4, 500 * 2 ** failures++)));
|
|
626
641
|
continue;
|
|
627
642
|
}
|
|
628
643
|
failures = 0;
|
|
644
|
+
state.answered();
|
|
629
645
|
try {
|
|
630
646
|
for await (const message of parseSse(response.body, opts.signal)) {
|
|
631
647
|
if (message.id !== void 0) after = message.id;
|
|
@@ -633,6 +649,7 @@ function createBoardClient(options) {
|
|
|
633
649
|
}
|
|
634
650
|
} catch (error) {
|
|
635
651
|
if (opts.signal?.aborted) return;
|
|
652
|
+
state.failed();
|
|
636
653
|
await new Promise((r) => setTimeout(r, Math.min(3e4, 500 * 2 ** failures++)));
|
|
637
654
|
}
|
|
638
655
|
}
|
|
@@ -757,4 +774,4 @@ function toErrorResponse(error) {
|
|
|
757
774
|
} }, 500);
|
|
758
775
|
}
|
|
759
776
|
//#endregion
|
|
760
|
-
export {
|
|
777
|
+
export { typeOf as C, mediaType as S, ATTACHMENT_BYTES_MAX as _, forbidden as a, fileName as b, textTooLong as c, BoardError as d, createBoardClient as f, parseProfileHeader as g, formatProfileHeader as h, duplicateId as i, toErrorResponse as l, eventsState as m, RejectedError as n, json as o, duration as p, badRequest as r, notFound as s, HttpError as t, unauthorized as u, DIRECT_UPLOAD_BYTES_MAX as v, fileSize as x, IMPORT_BYTES_MAX as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as ExternalEvent, r as ExternalLocation } from "./external-
|
|
1
|
+
import { f as Labels, u as LabelKey } from "./schemas-BhZaystC.mjs";
|
|
2
|
+
import { n as ExternalEvent, r as ExternalLocation } from "./external-DfhN7lKK.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/sync/fn.ts
|
|
5
5
|
const ROUTES = Symbol.for("board.syncRoutes");
|