@vercel/board 0.37.0 → 0.38.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.
- package/dist/{access-BsP0hvcC.mjs → access-CVkjSfxj.mjs} +12 -12
- package/dist/access.d.mts +3 -3
- package/dist/access.mjs +6 -5
- package/dist/{actors-uoD62kiN.mjs → actors-kfMejhaw.mjs} +5 -4
- package/dist/{auth-CrjXLgOb.mjs → auth-B3bBYOqf.mjs} +2 -2
- package/dist/{auth-BHXgi696.d.mts → auth-BXLCkeB0.d.mts} +3 -3
- package/dist/{backend-BIvl2z1z.d.mts → backend-BkQlF1LQ.d.mts} +3 -3
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-C0WUS3-G.mjs → chat-provider-1WKsLEnM.mjs} +2 -2
- package/dist/{chat-provider-DFYEReZL.d.mts → chat-provider-DyNy5xdC.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 +3 -3
- package/dist/cli.mjs +5 -5
- package/dist/{commands-DGID-4Z2.d.mts → commands-B5d-lmNN.d.mts} +1 -1
- package/dist/{commands-D2pFCMSh.mjs → commands-BLS7erNu.mjs} +1 -1
- package/dist/{conformance-rCrc_mwi.mjs → conformance-qJF96jZI.mjs} +162 -20
- package/dist/conformance.d.mts +10 -2
- package/dist/conformance.mjs +1 -1
- package/dist/digest-DAxy9Ula.mjs +4 -0
- package/dist/{engine-COa73McY.mjs → engine-eUgO5jTM.mjs} +4 -4
- package/dist/{events-v8f7pF9f.mjs → events-C6HwB046.mjs} +2 -2
- package/dist/exports-BJ3wmEMY.d.mts +4 -0
- package/dist/{exports-DTezg4xR.mjs → exports-BsfcChdp.mjs} +80 -25
- package/dist/{external-BA2aCC_3.mjs → external-CHDxWIVf.mjs} +1 -1
- package/dist/{index-B1TZrMMu.d.mts → index-DpVyZa9b.d.mts} +2 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +3 -3
- package/dist/index.node.d.mts +5 -5
- package/dist/index.node.mjs +2 -2
- package/dist/inspect/app.js +21 -21
- package/dist/inspect-5mkjJYMS.mjs +2 -0
- package/dist/{inspect-CoFk2Xj7.mjs → inspect-DtCbBtOW.mjs} +4 -4
- package/dist/{local-Cm7a7_Q0.mjs → local-Bo3XzEKB.mjs} +22 -22
- package/dist/{main-DoZ8IFPb.mjs → main-0nvLgajF.mjs} +42 -36
- package/dist/{memory-DqwXlyK4.mjs → memory-DkoqhxIH.mjs} +2 -2
- package/dist/{middleware-k_XKQ6f7.mjs → middleware-CPqAuRtp.mjs} +1 -1
- package/dist/page-R0RoE_gM.mjs +2 -0
- package/dist/{page-LysMGAl3.mjs → page-UsfvSIWc.mjs} +2 -2
- package/dist/{provider-7pOnK8Jw.d.mts → provider-D5yVFisj.d.mts} +1 -1
- package/dist/{routes-BtsZzal-.d.mts → routes-BffuaoTX.d.mts} +11 -1
- package/dist/{schemas-BG205xds.mjs → schemas-AZkxk06N.mjs} +3 -3
- package/dist/{serve-2U_JPJtS.mjs → serve-D7I3KisQ.mjs} +3 -3
- package/dist/{server-Drul_uwj.mjs → server-Cc3nYq3H.mjs} +9 -7
- package/dist/{serving-6_bhBNAW.mjs → serving-DJMcG0dT.mjs} +1 -1
- package/dist/{sql-aetuEBZC.mjs → sql-l3ysn4O5.mjs} +2 -2
- package/dist/{sqlite-DvsB8ENQ.mjs → sqlite-CAwNHbQD.mjs} +2 -2
- package/dist/{sqlite-db-BPwRoDI7.mjs → sqlite-db-cm5yhrD-.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/{targets-B0D4tJDY.mjs → targets-B4Uikw0J.mjs} +6 -6
- package/dist/{tokens-Dn4cPZIr.mjs → tokens-DA9ipsZ-.mjs} +1 -1
- package/docs/01-board/01-mounting.md +1 -1
- package/docs/01-board/09-access.md +10 -5
- package/docs/03-guides/03-ci.md +10 -4
- package/docs/04-reference/01-cli.md +23 -9
- package/docs/04-reference/02-board.md +2 -1
- package/docs/04-reference/03-http.md +3 -3
- package/docs/04-reference/05-conformance.md +9 -2
- package/package.json +1 -1
- package/dist/digest-CLGw7653.mjs +0 -4
- package/dist/exports-Bb0m03fT.d.mts +0 -4
- package/dist/inspect-B8c0Wh5Z.mjs +0 -2
- package/dist/page-BAQpb-s-.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as forbidden } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as CAN_MAX, o as ChannelPath } from "./schemas-AZkxk06N.mjs";
|
|
3
3
|
//#region src/server/access.ts
|
|
4
4
|
/**
|
|
5
5
|
* What a principal may do in a channel. `read` covers messages, threads,
|
|
@@ -278,37 +278,37 @@ function decide(matched, channel) {
|
|
|
278
278
|
permissions: [...winner.permissions].sort((a, b) => ORDER.get(a) - ORDER.get(b))
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
/** An access as `x-board-
|
|
282
|
-
function
|
|
281
|
+
/** An access as `x-board-can` writes it, `dev/=read,post;ci/=read`, or `*=` for nothing: what a stored principal keeps. */
|
|
282
|
+
function canText(access) {
|
|
283
283
|
const entries = Object.entries(access.summary()).map(([pattern, permissions]) => `${pattern}=${permissions.join(",")}`);
|
|
284
284
|
return entries.length > 0 ? entries.join(";") : "*=";
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
287
|
-
* `x-board-
|
|
287
|
+
* `x-board-can`: `dev/=read,post,react,label;ci/=read`. Each entry is a
|
|
288
288
|
* pattern and its permissions (or `all`). It's meant for a proxy that holds the
|
|
289
289
|
* credential, like Pi's sandbox: the board intersects it with the principal's
|
|
290
290
|
* access, so it can only narrow, and a caller holding its own token gains
|
|
291
|
-
* nothing by sending it.
|
|
291
|
+
* nothing by sending it. `name` is what its errors call it: the CLI's `--can` writes the same.
|
|
292
292
|
*/
|
|
293
|
-
function
|
|
294
|
-
if (header.length > 4e3) throw new InvalidCan(
|
|
293
|
+
function parseCan(header, name = "x-board-can") {
|
|
294
|
+
if (header.length > 4e3) throw new InvalidCan(`${name} is longer than ${CAN_MAX} characters`);
|
|
295
295
|
const out = {};
|
|
296
296
|
const entries = header.split(";").map((entry) => entry.trim());
|
|
297
|
-
if (entries.every((entry) => entry === "")) throw new InvalidCan(
|
|
297
|
+
if (entries.every((entry) => entry === "")) throw new InvalidCan(`${name} is empty: write pattern=permissions, like dev/=read,post`);
|
|
298
298
|
for (const entry of entries) {
|
|
299
299
|
if (entry === "") continue;
|
|
300
300
|
const split = entry.indexOf("=");
|
|
301
|
-
if (split < 0) throw new InvalidCan(
|
|
301
|
+
if (split < 0) throw new InvalidCan(`${name} entry ${entry} needs =: write pattern=permissions, like dev/=read,post`);
|
|
302
302
|
const pattern = entry.slice(0, split).trim();
|
|
303
303
|
const list = entry.slice(split + 1).trim();
|
|
304
|
-
if (Object.hasOwn(out, pattern)) throw new InvalidCan(
|
|
304
|
+
if (Object.hasOwn(out, pattern)) throw new InvalidCan(`${name} lists ${pattern} twice`);
|
|
305
305
|
parsePattern(pattern);
|
|
306
306
|
const permissions = list === "" ? [] : list.split(",").map((permission) => permission.trim());
|
|
307
307
|
if (permissions.length === 1 && permissions[0] === "all") {
|
|
308
308
|
out[pattern] = "all";
|
|
309
309
|
continue;
|
|
310
310
|
}
|
|
311
|
-
for (const permission of permissions) if (!ORDER.has(permission)) throw new InvalidCan(
|
|
311
|
+
for (const permission of permissions) if (!ORDER.has(permission)) throw new InvalidCan(`${name}: unknown permission ${permission || "(empty)"}: use ${PERMISSIONS.join(", ")}, or all`);
|
|
312
312
|
out[pattern] = permissions;
|
|
313
313
|
}
|
|
314
314
|
return out;
|
|
@@ -396,4 +396,4 @@ function checkGrantChange(change) {
|
|
|
396
396
|
return null;
|
|
397
397
|
}
|
|
398
398
|
//#endregion
|
|
399
|
-
export {
|
|
399
|
+
export { canText as a, compileAccess as c, parsePattern as d, union as f, authorize as i, decide as l, InvalidCan as n, checkGrantChange as o, writtenCan as p, PERMISSIONS as r, combine as s, FULL_ACCESS as t, parseCan as u };
|
package/dist/access.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bt as FULL_ACCESS, Gt as InvalidCan, Ht as GrantChange, It as Access, Lt as AccessSummary, Qt as
|
|
2
|
-
import { _ as GrantExplanation, a as DEFAULT_CAN, b as explainGrants, c as IssuerConfig, f as Principal, g as DecidingGrant, h as Caller, i as Claims, l as Known, n as AuthenticateContext, p as PrincipalKind, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantFacts, x as grantAccess, y as GrantSource } from "./auth-
|
|
1
|
+
import { $t as Actor, Bt as FULL_ACCESS, Gt as InvalidCan, Ht as GrantChange, It as Access, Lt as AccessSummary, Qt as union, Rt as Can, Ut as GrantChangeRefusal, Vt as Grant, Wt as GrantShape, Xt as compileAccess, Yt as checkGrantChange, Zt as parseCan, nn as Author, qt as Permission, rn as CAN_MAX, zt as ChannelPattern } from "./routes-BffuaoTX.mjs";
|
|
2
|
+
import { _ as GrantExplanation, a as DEFAULT_CAN, b as explainGrants, c as IssuerConfig, f as Principal, g as DecidingGrant, h as Caller, i as Claims, l as Known, n as AuthenticateContext, p as PrincipalKind, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantFacts, x as grantAccess, y as GrantSource } from "./auth-BXLCkeB0.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, audience: string): ResolvedActor;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { type Access, type AccessSummary, type Authenticate, type AuthenticateContext, 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, 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, type Permission, type Principal, type PrincipalKind, checkGrantChange, compileAccess, explainGrants, grantAccess, parseCan, union };
|
package/dist/access.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { a as CAN_MAX } from "./schemas-AZkxk06N.mjs";
|
|
2
|
+
import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-CVkjSfxj.mjs";
|
|
3
|
+
import { E as grantAccess, T as explainGrants, n as DEFAULT_CAN } from "./auth-B3bBYOqf.mjs";
|
|
4
|
+
import { i as resolveActor } from "./actors-kfMejhaw.mjs";
|
|
5
|
+
import { t as oidcTokens } from "./tokens-DA9ipsZ-.mjs";
|
|
6
|
+
export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as badRequest } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import { b as toStorable } from "./schemas-
|
|
3
|
-
import { u as
|
|
2
|
+
import { b as toStorable } from "./schemas-AZkxk06N.mjs";
|
|
3
|
+
import { u as parseCan } from "./access-CVkjSfxj.mjs";
|
|
4
4
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
5
5
|
import { t as extractMentions } from "./mentions-CB6ShY4R.mjs";
|
|
6
6
|
//#region src/server/actors.ts
|
|
@@ -36,9 +36,10 @@ function claimsOf(headers) {
|
|
|
36
36
|
} catch {
|
|
37
37
|
throw badRequest("x-board-name must be URI-encoded");
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
if (headers.get("x-board-scope") !== null) throw badRequest("x-board-scope is x-board-can now: send the same value as x-board-can", "invalid_scope");
|
|
40
|
+
const scope = headers.get("x-board-can");
|
|
40
41
|
if (scope !== null) try {
|
|
41
|
-
|
|
42
|
+
parseCan(scope);
|
|
42
43
|
} catch (error) {
|
|
43
44
|
throw badRequest(error.message, "invalid_scope");
|
|
44
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as forbidden, l as unauthorized, r as badRequest, t as HttpError } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-CVkjSfxj.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
|
|
@@ -498,7 +498,7 @@ function createAuthority(options) {
|
|
|
498
498
|
*/
|
|
499
499
|
async function grant(principal, snapshot) {
|
|
500
500
|
const resolved = await resolve(principal, snapshot);
|
|
501
|
-
const scope = principal.scope === void 0 ? void 0 :
|
|
501
|
+
const scope = principal.scope === void 0 ? void 0 : parseCan(principal.scope);
|
|
502
502
|
if ("fixed" in resolved) return scope === void 0 ? resolved.fixed : resolved.fixed.narrow(scope);
|
|
503
503
|
const decided = grantAccess({
|
|
504
504
|
...resolved.facts,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { It as Access, Jt as WrittenCan, Kt as Level, Rt as Can, qt as Permission } from "./routes-
|
|
1
|
+
import { It as Access, Jt as WrittenCan, Kt as Level, Rt as Can, qt as Permission } from "./routes-BffuaoTX.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. */
|
|
@@ -99,7 +99,7 @@ type Claims = {
|
|
|
99
99
|
/** `x-board-handle` and `x-board-name`: a person's handle and display name. */
|
|
100
100
|
handle: string | null;
|
|
101
101
|
name: string | null;
|
|
102
|
-
/** `x-board-
|
|
102
|
+
/** `x-board-can`: what it narrows itself to, `dev/=read,post`. It only narrows. */
|
|
103
103
|
scope: string | null;
|
|
104
104
|
};
|
|
105
105
|
/** A request, as board() hands it to `authenticate`: what it said, none of it verified yet. */
|
|
@@ -127,7 +127,7 @@ type Principal = {
|
|
|
127
127
|
expiresAt: Date | null;
|
|
128
128
|
/** The verified token's claims, so its access can be worked out again later, as a schedule's sends do. Absent for people and the board's own code. */
|
|
129
129
|
facts?: TokenFacts;
|
|
130
|
-
/** The `x-board-
|
|
130
|
+
/** The `x-board-can` a proxy sent, which narrows whatever it may do. */
|
|
131
131
|
scope?: string;
|
|
132
132
|
/**
|
|
133
133
|
* The board token it came with (its ID), kept with what it stores: a schedule or a registration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as LinkedQuery, C as InboxItem, Ct as ThreadsPage, E as InboxQuery, Et as TokenBody, F as MessagesPage, I as MessagesQuery, It as Access, J as RegistrationView, K as RegisterBody, Kt as Level, M as MatchesQuery, N as Me, Nt as UploadStartBody, O as LabelBody, Ot as TokenView, P as MessageView, Pt as UploadTicket,
|
|
2
|
-
import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-
|
|
3
|
-
import { L as ProfileOption, M as BoardClient, P as ErrorOrigin, p as SyncProvider } from "./provider-
|
|
1
|
+
import { $t as Actor, A as LinkedQuery, C as InboxItem, Ct as ThreadsPage, E as InboxQuery, Et as TokenBody, F as MessagesPage, I as MessagesQuery, It as Access, J as RegistrationView, K as RegisterBody, Kt as Level, M as MatchesQuery, N as Me, Nt as UploadStartBody, O as LabelBody, Ot as TokenView, P as MessageView, Pt as UploadTicket, S as InboxEntry, St as ThreadView, T as InboxPushBody, W as ReactBody, Z as ScheduleBody, _ as GrantBody, _t as SyncReceiptBody, at as SourceJoinBody, b as GrantView, bt as SyncedView, c as DeleteBody, ct as SourceReadQuery, d as EventsPage, dt as SyncCopiesView, et as ScheduleView, f as EventsQuery, h as Explanation, ht as SyncImportBody, i as BoardEventView, in as Labels, it as SourceJoin, j as MatchView, jt as UpdateGrantBody, kt as TypingBody, l as Discovery, m as ExplainQuery, mt as SyncFindView, nn as Author, o as ChannelView, on as ExternalEvent, pt as SyncFindQuery, qt as Permission, s as CreateChannelBody, st as SourceRead, t as AckBody, tn as Attachment, tt as SchedulesQuery, u as EditBody, ut as SyncCopiesQuery, w as InboxNextQuery, wt as ThreadsQuery, x as InboxAckBody, yt as SyncThreadView, z as PostBody } from "./routes-BffuaoTX.mjs";
|
|
2
|
+
import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-BXLCkeB0.mjs";
|
|
3
|
+
import { L as ProfileOption, M as BoardClient, P as ErrorOrigin, p as SyncProvider } from "./provider-D5yVFisj.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/api/protocol.d.ts
|
|
6
6
|
type Input<S extends z.ZodType> = NonNullable<z.output<S>>;
|
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-Bo3XzEKB.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-CHDxWIVf.mjs";
|
|
2
|
+
import { c as SyncProvider, s as ResolvedTarget } from "./events-C6HwB046.mjs";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { Chat, stringifyMarkdown } from "chat";
|
|
5
5
|
//#region src/sync/chat.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as ProviderEvent, a as ProviderOptions, c as ReceivedEvent, d as ResolvedTarget, g as SyncFn, i as ProviderFile, k as SyncRoot, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, t as FetchedLink } from "./provider-
|
|
1
|
+
import { $t as Actor, an as ExternalAuthor, cn as ExternalLink, it as SourceJoin, sn as ExternalFile, st as SourceRead } from "./routes-BffuaoTX.mjs";
|
|
2
|
+
import { T as ProviderEvent, a as ProviderOptions, c as ReceivedEvent, d as ResolvedTarget, g as SyncFn, i as ProviderFile, k as SyncRoot, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, t as FetchedLink } from "./provider-D5yVFisj.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-B5d-lmNN.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-BLS7erNu.mjs";
|
|
2
2
|
export { commands, filters, globalOptions, groups, option, options, usage };
|
package/dist/cli-embedded.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as Board } from "./backend-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { d as Board } from "./backend-BkQlF1LQ.mjs";
|
|
2
|
+
import "./index-DpVyZa9b.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,6 +1,6 @@
|
|
|
1
|
-
import { g as VERSION } from "./targets-
|
|
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-
|
|
3
|
-
import { t as PAGE_SHA256 } from "./digest-
|
|
1
|
+
import { g as VERSION } from "./targets-B4Uikw0J.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-0nvLgajF.mjs";
|
|
3
|
+
import { t as PAGE_SHA256 } from "./digest-DAxy9Ula.mjs";
|
|
4
4
|
//#region src/cli/embedded.ts
|
|
5
5
|
/**
|
|
6
6
|
* The inspector's page as this version of board's npm package has it, for an app that bundles
|
package/dist/cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as option } from "./commands-
|
|
3
|
-
import {
|
|
4
|
-
import { r as main } from "./main-
|
|
5
|
-
import { n as stopped, r as startInspector } from "./inspect-
|
|
2
|
+
import { a as option } from "./commands-BLS7erNu.mjs";
|
|
3
|
+
import { f as projectDir } from "./server-Cc3nYq3H.mjs";
|
|
4
|
+
import { r as main } from "./main-0nvLgajF.mjs";
|
|
5
|
+
import { n as stopped, r as startInspector } from "./inspect-DtCbBtOW.mjs";
|
|
6
6
|
import { appendFile, readFile } from "node:fs/promises";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
//#region src/cli/local.ts
|
|
@@ -36,7 +36,7 @@ const local = { serve: {
|
|
|
36
36
|
if (args.length > 0) throw usage("serve takes no arguments: pass its port with --port, and its directory with --dir.");
|
|
37
37
|
const port = portFlag();
|
|
38
38
|
const root = projectDir();
|
|
39
|
-
const { localHandle, serveLocal } = await import("./serve-
|
|
39
|
+
const { localHandle, serveLocal } = await import("./serve-D7I3KisQ.mjs");
|
|
40
40
|
const handle = flags.handle ?? process.env.BOARD_HANDLE;
|
|
41
41
|
const local = await serveLocal({
|
|
42
42
|
dir: flags.dir ?? join(root, ".board"),
|
|
@@ -446,7 +446,7 @@ declare const options: {
|
|
|
446
446
|
readonly expires: {
|
|
447
447
|
readonly type: 'string';
|
|
448
448
|
readonly value: 'duration';
|
|
449
|
-
readonly description: 'how long it lives (default: 30d, at most 90d)';
|
|
449
|
+
readonly description: 'how long it lives (default: 30d, at most 90d; 1d and 7d on Vercel\'s board)';
|
|
450
450
|
};
|
|
451
451
|
readonly port: {
|
|
452
452
|
readonly type: 'string';
|
|
@@ -398,7 +398,7 @@ const options = {
|
|
|
398
398
|
expires: {
|
|
399
399
|
type: "string",
|
|
400
400
|
value: "duration",
|
|
401
|
-
description: "how long it lives (default: 30d, at most 90d)"
|
|
401
|
+
description: "how long it lives (default: 30d, at most 90d; 1d and 7d on Vercel's board)"
|
|
402
402
|
},
|
|
403
403
|
port: {
|
|
404
404
|
type: "string",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as BoardError } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { c as compileAccess } from "./access-CVkjSfxj.mjs";
|
|
3
3
|
//#region src/conformance/index.ts
|
|
4
4
|
var Mismatch = class extends Error {};
|
|
5
5
|
const show = (value) => JSON.stringify(value) ?? String(value);
|
|
@@ -28,6 +28,21 @@ async function refused(attempt, status, what) {
|
|
|
28
28
|
}
|
|
29
29
|
throw new Mismatch(`${what}: expected ${status}, and it succeeded`);
|
|
30
30
|
}
|
|
31
|
+
const NO_CAN = "this run can't call the board with an x-board-can header";
|
|
32
|
+
/**
|
|
33
|
+
* That `attempt`, by a caller narrowed with `x-board-can`, is refused as one: 403 `forbidden`.
|
|
34
|
+
* Vercel's API's refusal of a person's watchers goes on as it is, for the run to skip.
|
|
35
|
+
*/
|
|
36
|
+
async function narrowedOut(attempt, what) {
|
|
37
|
+
try {
|
|
38
|
+
await attempt;
|
|
39
|
+
} catch (error) {
|
|
40
|
+
if (error instanceof BoardError && error.code === "watchers_need_project") throw error;
|
|
41
|
+
if (error instanceof BoardError && error.status === 403 && error.code === "forbidden") return;
|
|
42
|
+
throw new Mismatch(`${what}, by a caller narrowed with x-board-can: expected 403 forbidden, got ${error instanceof BoardError ? `${error.status} ${error.code}` : String(error)}`);
|
|
43
|
+
}
|
|
44
|
+
throw new Mismatch(`${what}, by a caller narrowed with x-board-can: expected 403 forbidden, and it succeeded`);
|
|
45
|
+
}
|
|
31
46
|
/** Where a registration is woken, to put back after a check replaces it: its path (and branch) on a board that wakes by path, or its url. */
|
|
32
47
|
function wokenAt(registered) {
|
|
33
48
|
if (!registered?.path) return { url: registered?.url ?? null };
|
|
@@ -76,6 +91,17 @@ const grantFor = (ctx) => ({
|
|
|
76
91
|
principals: [projectFor(ctx)],
|
|
77
92
|
can: { [`${subtreeOf(ctx)}ci/`]: ["post"] }
|
|
78
93
|
});
|
|
94
|
+
/**
|
|
95
|
+
* Whom the checks that grant to someone besides the project name: the app the run was given, or
|
|
96
|
+
* else the repository, which a board that takes no GitHub principal in a grant refuses (Vercel's).
|
|
97
|
+
*/
|
|
98
|
+
const granteeOf = (ctx) => ctx.principals.app !== null ? {
|
|
99
|
+
kind: "app",
|
|
100
|
+
app: ctx.principals.app
|
|
101
|
+
} : {
|
|
102
|
+
kind: "github",
|
|
103
|
+
repository: ctx.principals.repository
|
|
104
|
+
};
|
|
79
105
|
/** A check that can't run here, and why: it's skipped, not failed. */
|
|
80
106
|
var Skip = class extends Error {};
|
|
81
107
|
/** A board that looks names up and has none for one a check named: what to pass instead. */
|
|
@@ -109,6 +135,7 @@ async function withGrants(ctx, check) {
|
|
|
109
135
|
made.push(grant.id);
|
|
110
136
|
} catch (error) {
|
|
111
137
|
if (error instanceof BoardError && error.status === 403) return;
|
|
138
|
+
if (error instanceof BoardError && error.code === "unsupported_principal") throw error;
|
|
112
139
|
throw unnamed(error) ?? new Mismatch(`${what}: expected 403, got ${error instanceof BoardError ? `${error.status} ${error.code}` : messageOf(error)}`);
|
|
113
140
|
}
|
|
114
141
|
throw new Mismatch(`${what}: expected 403, and it made the grant`);
|
|
@@ -568,6 +595,27 @@ const CHECKS = [
|
|
|
568
595
|
}), 400, "invalid_request", "posting to a malformed channel");
|
|
569
596
|
}
|
|
570
597
|
},
|
|
598
|
+
{
|
|
599
|
+
group: "core",
|
|
600
|
+
name: "narrows a caller to what its x-board-can says",
|
|
601
|
+
run: async (ctx) => {
|
|
602
|
+
if (!ctx.withCan) return NO_CAN;
|
|
603
|
+
const { root } = needRoot(ctx);
|
|
604
|
+
const narrowed = ctx.withCan(`${ctx.channel}=read`);
|
|
605
|
+
const me = await narrowed.me();
|
|
606
|
+
same(me.principal, ctx.me.principal, "a narrowed caller's principal, its own");
|
|
607
|
+
alike(me.can, { [ctx.channel]: ["read"] }, "what a caller narrowed to read says it may do");
|
|
608
|
+
same((await narrowed.thread(root.id)).message.id, root.id, "a thread read by a caller narrowed to read it");
|
|
609
|
+
await refused(narrowed.post(ctx.channel, {
|
|
610
|
+
text: "conformance: narrowed to read",
|
|
611
|
+
labels: ctx.labels,
|
|
612
|
+
noSync: true
|
|
613
|
+
}).then((message) => {
|
|
614
|
+
ctx.posted.push(message.id);
|
|
615
|
+
return message;
|
|
616
|
+
}), 403, "a post by a caller narrowed to read");
|
|
617
|
+
}
|
|
618
|
+
},
|
|
571
619
|
{
|
|
572
620
|
group: "schedules",
|
|
573
621
|
name: "schedules a reply, lists it, and cancels it",
|
|
@@ -627,7 +675,7 @@ const CHECKS = [
|
|
|
627
675
|
const first = await make(grantFor(ctx));
|
|
628
676
|
const again = await make(grantFor(ctx));
|
|
629
677
|
check(again.id !== first.id, `the same principals again should be another grant, got ${again.id} twice`);
|
|
630
|
-
const
|
|
678
|
+
const other = granteeOf(ctx);
|
|
631
679
|
const ci = `${subtreeOf(ctx)}ci/`;
|
|
632
680
|
const update = async (change) => {
|
|
633
681
|
try {
|
|
@@ -637,29 +685,23 @@ const CHECKS = [
|
|
|
637
685
|
}
|
|
638
686
|
};
|
|
639
687
|
const added = await update({
|
|
640
|
-
add: [
|
|
641
|
-
kind: "github",
|
|
642
|
-
repository
|
|
643
|
-
}, projectFor(ctx, ["production"])],
|
|
688
|
+
add: [other, projectFor(ctx, ["production"])],
|
|
644
689
|
can: { [ci]: ["read", "post"] }
|
|
645
690
|
});
|
|
646
691
|
same(added.grant.id, first.id, "the updated grant's id");
|
|
647
|
-
alike(added.grant.principals.map((principal) => principal.kind), ["project",
|
|
692
|
+
alike(added.grant.principals.map((principal) => principal.kind), ["project", other.kind], `principals after adding ${other.kind === "app" ? "an app" : "a repository"}, and the project again`);
|
|
648
693
|
const project = added.grant.principals[0];
|
|
649
694
|
alike(sortedOf(project?.kind === "project" ? project.environments : void 0), sortedOf(["preview", "production"]), "the project's environments, after adding it again");
|
|
650
695
|
alike(added.grant.can, { [ci]: ["read", "post"] }, "the updated grant's can");
|
|
651
696
|
alike((await update({ remove: [{
|
|
652
697
|
kind: "project",
|
|
653
698
|
project: ctx.principals.project
|
|
654
|
-
}] })).grant.principals.map((principal) => principal.kind), [
|
|
699
|
+
}] })).grant.principals.map((principal) => principal.kind), [other.kind], "principals after removing the project");
|
|
655
700
|
await rejects(update({ remove: [{
|
|
656
701
|
kind: "project",
|
|
657
702
|
project: ctx.principals.project
|
|
658
703
|
}] }), 400, "not_in_grant", "removing a principal the grant no longer names");
|
|
659
|
-
await rejects(update({ remove: [
|
|
660
|
-
kind: "github",
|
|
661
|
-
repository
|
|
662
|
-
}] }), 400, "grant_empty", "removing the last principal");
|
|
704
|
+
await rejects(update({ remove: [other] }), 400, "grant_empty", "removing the last principal");
|
|
663
705
|
await rejects(ctx.board.updateGrant(`${first.id}0`, { can: { [ci]: ["read"] } }), 404, "grant_not_found", "updating a grant that was never made");
|
|
664
706
|
})
|
|
665
707
|
},
|
|
@@ -862,10 +904,7 @@ const CHECKS = [
|
|
|
862
904
|
run: (ctx) => withGrants(ctx, async ({ make, deny, mint, keep }) => {
|
|
863
905
|
const subtree = subtreeOf(ctx);
|
|
864
906
|
const secret = `${subtree}secret/`;
|
|
865
|
-
const run =
|
|
866
|
-
kind: "github",
|
|
867
|
-
repository: ctx.principals.repository
|
|
868
|
-
};
|
|
907
|
+
const run = granteeOf(ctx);
|
|
869
908
|
const narrowed = await mint({
|
|
870
909
|
"*": "all",
|
|
871
910
|
[secret]: []
|
|
@@ -905,10 +944,7 @@ const CHECKS = [
|
|
|
905
944
|
can: { [open]: ["read"] }
|
|
906
945
|
});
|
|
907
946
|
await deny(narrowed, {
|
|
908
|
-
principals: [
|
|
909
|
-
kind: "github",
|
|
910
|
-
repository: ctx.principals.repository
|
|
911
|
-
}],
|
|
947
|
+
principals: [granteeOf(ctx)],
|
|
912
948
|
can: { [`${subtree}ci/`]: ["post"] }
|
|
913
949
|
}, `a grant from a token kept out of ${open}, which everyone reads`);
|
|
914
950
|
})
|
|
@@ -1061,6 +1097,23 @@ const CHECKS = [
|
|
|
1061
1097
|
}
|
|
1062
1098
|
}
|
|
1063
1099
|
},
|
|
1100
|
+
{
|
|
1101
|
+
group: "watchers",
|
|
1102
|
+
name: "refuses a caller narrowed with x-board-can its principal's watchers: registering, pulling, and acking",
|
|
1103
|
+
run: async (ctx) => {
|
|
1104
|
+
if (!ctx.withCan) return NO_CAN;
|
|
1105
|
+
const narrowed = ctx.withCan(`${ctx.channel}=all`);
|
|
1106
|
+
const registered = (await ctx.board.watchers()).find((r) => r.owner === ctx.me.principal);
|
|
1107
|
+
const now = {
|
|
1108
|
+
...wokenAt(registered),
|
|
1109
|
+
watch: registered?.watch ?? {},
|
|
1110
|
+
...registered?.sync ? { sync: registered.sync } : {}
|
|
1111
|
+
};
|
|
1112
|
+
await narrowedOut(narrowed.register(now), "registering watchers");
|
|
1113
|
+
await narrowedOut(narrowed.matches(), "pulling matches");
|
|
1114
|
+
await narrowedOut(narrowed.ack(`conformance-${ctx.labels.conformance}`, { lease: "conformance" }), "acking a match");
|
|
1115
|
+
}
|
|
1116
|
+
},
|
|
1064
1117
|
{
|
|
1065
1118
|
group: "sync",
|
|
1066
1119
|
name: "keeps sync's records: an import as a platform author, its lookups by platform ID, a receipt, and where it's synced",
|
|
@@ -1277,6 +1330,82 @@ const CHECKS = [
|
|
|
1277
1330
|
same(thread.message.noSync, true, "a post's noSync, read back");
|
|
1278
1331
|
same(thread.replies.find((m) => m.id === reply.id)?.noSync, true, "a reply's noSync, read back");
|
|
1279
1332
|
}
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
group: "sync",
|
|
1336
|
+
name: "refuses a caller narrowed with x-board-can sync's records: imports, receipts, and the inbox",
|
|
1337
|
+
run: async (ctx) => {
|
|
1338
|
+
if (!ctx.withCan) return NO_CAN;
|
|
1339
|
+
const { root } = needRoot(ctx);
|
|
1340
|
+
const registered = await registerSync(ctx);
|
|
1341
|
+
if ("skip" in registered) return registered.skip;
|
|
1342
|
+
const run = ctx.labels.conformance;
|
|
1343
|
+
const author = {
|
|
1344
|
+
id: `${SYNC_KEY}:user:${run}`,
|
|
1345
|
+
handle: "conformance",
|
|
1346
|
+
name: "Conformance",
|
|
1347
|
+
avatar: null,
|
|
1348
|
+
isBot: false
|
|
1349
|
+
};
|
|
1350
|
+
const thread = `${SYNC_KEY}:${run}:narrowed`;
|
|
1351
|
+
try {
|
|
1352
|
+
const narrowed = ctx.withCan(`${ctx.channel}=all`);
|
|
1353
|
+
await narrowedOut(narrowed.syncImport({
|
|
1354
|
+
op: "post",
|
|
1355
|
+
author,
|
|
1356
|
+
from: SYNC_KEY,
|
|
1357
|
+
channel: ctx.channel,
|
|
1358
|
+
text: "conformance: a narrowed import",
|
|
1359
|
+
labels: ctx.labels,
|
|
1360
|
+
noSync: true,
|
|
1361
|
+
origin: {
|
|
1362
|
+
channel: `${SYNC_KEY}:${run}`,
|
|
1363
|
+
thread,
|
|
1364
|
+
subthread: null,
|
|
1365
|
+
message: "1",
|
|
1366
|
+
context: null
|
|
1367
|
+
}
|
|
1368
|
+
}), "an import");
|
|
1369
|
+
await narrowedOut(narrowed.syncReceipt({
|
|
1370
|
+
kind: "failed",
|
|
1371
|
+
message: root.id,
|
|
1372
|
+
target: thread,
|
|
1373
|
+
error: "conformance"
|
|
1374
|
+
}), "a receipt");
|
|
1375
|
+
const event = {
|
|
1376
|
+
kind: "message",
|
|
1377
|
+
channel: `${SYNC_KEY}:${run}`,
|
|
1378
|
+
thread,
|
|
1379
|
+
subthread: null,
|
|
1380
|
+
message: "1",
|
|
1381
|
+
isRoot: true,
|
|
1382
|
+
text: "conformance: a narrowed push",
|
|
1383
|
+
context: null,
|
|
1384
|
+
author
|
|
1385
|
+
};
|
|
1386
|
+
await narrowedOut(narrowed.inboxPush(SYNC_KEY, [{
|
|
1387
|
+
id: `conformance-narrowed-${run}`,
|
|
1388
|
+
event,
|
|
1389
|
+
raw: null
|
|
1390
|
+
}]), "a push to the inbox");
|
|
1391
|
+
await narrowedOut(narrowed.inboxNext(SYNC_KEY, { limit: 1 }), "a lease from the inbox");
|
|
1392
|
+
await narrowedOut(narrowed.inboxAck(SYNC_KEY, `conformance-narrowed-${run}`, { lease: "conformance" }), "an ack to the inbox");
|
|
1393
|
+
} finally {
|
|
1394
|
+
await ctx.board.syncImport({
|
|
1395
|
+
op: "delete",
|
|
1396
|
+
author,
|
|
1397
|
+
from: SYNC_KEY,
|
|
1398
|
+
origin: {
|
|
1399
|
+
thread,
|
|
1400
|
+
message: "1"
|
|
1401
|
+
}
|
|
1402
|
+
}).catch(() => {});
|
|
1403
|
+
await ctx.board.register({
|
|
1404
|
+
...registered.where,
|
|
1405
|
+
watch: {}
|
|
1406
|
+
}).catch(() => {});
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1280
1409
|
}
|
|
1281
1410
|
];
|
|
1282
1411
|
/**
|
|
@@ -1366,6 +1495,7 @@ async function conformance(board, options = {}) {
|
|
|
1366
1495
|
me,
|
|
1367
1496
|
posted: [],
|
|
1368
1497
|
...options.withToken ? { withToken: options.withToken } : {},
|
|
1498
|
+
...options.withCan ? { withCan: options.withCan } : {},
|
|
1369
1499
|
principals: {
|
|
1370
1500
|
project: options.principals?.project ?? `prj_conformance${label}`,
|
|
1371
1501
|
repository: options.principals?.repository ?? `acme/conformance-${label}`,
|
|
@@ -1400,6 +1530,18 @@ async function conformance(board, options = {}) {
|
|
|
1400
1530
|
status: "skipped",
|
|
1401
1531
|
detail: "only a deployment registers watchers here"
|
|
1402
1532
|
});
|
|
1533
|
+
else if (group === "grants" && error instanceof BoardError && error.code === "unsupported_principal") checks.push({
|
|
1534
|
+
group,
|
|
1535
|
+
name,
|
|
1536
|
+
status: "skipped",
|
|
1537
|
+
detail: "this board takes no GitHub or OIDC principals in a grant"
|
|
1538
|
+
});
|
|
1539
|
+
else if (group === "tokens" && error instanceof BoardError && error.code === "unsupported_principal") checks.push({
|
|
1540
|
+
group,
|
|
1541
|
+
name,
|
|
1542
|
+
status: "skipped",
|
|
1543
|
+
detail: "this board mints tokens only for a deployment: run as one to check them"
|
|
1544
|
+
});
|
|
1403
1545
|
else checks.push({
|
|
1404
1546
|
group,
|
|
1405
1547
|
name,
|
package/dist/conformance.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as Board } from "./backend-
|
|
1
|
+
import { d as Board } from "./backend-BkQlF1LQ.mjs";
|
|
2
2
|
//#region src/conformance/index.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Checks that a board speaks the protocol, through a handle on it (`conformance(board())`), as
|
|
@@ -30,13 +30,21 @@ export type ConformanceOptions = {
|
|
|
30
30
|
* that check is skipped.
|
|
31
31
|
*/
|
|
32
32
|
withToken?: (secret: string) => Board;
|
|
33
|
+
/**
|
|
34
|
+
* The same board, with this run's credential and an `x-board-can` header that narrows it to
|
|
35
|
+
* `can` (`conformance=read`), as a proxy holding the credential sends it: the checks of a
|
|
36
|
+
* narrowed caller call it so. Without it, they're skipped.
|
|
37
|
+
*/
|
|
38
|
+
withCan?: (can: string) => Board;
|
|
33
39
|
/**
|
|
34
40
|
* Whom the grants checks name. A board that verifies tokens itself (`vb serve`) takes the made-up
|
|
35
41
|
* IDs they use without it; one that looks names up, as Vercel's API does, needs real ones on its
|
|
36
42
|
* team, or skips the checks that name them: a `project` (its name or ID), a GitHub `repository`
|
|
37
43
|
* no grant names, a `viewer` (a person's email or ID whose team role is viewer), to check
|
|
38
44
|
* that a role caps what grants give, and an `app` installed on the board's team (its slug or
|
|
39
|
-
* client ID), which a local board has none of.
|
|
45
|
+
* client ID), which a local board has none of. Checks that grant to someone besides the project
|
|
46
|
+
* name the app when there's one, and the repository otherwise: Vercel's board takes no GitHub
|
|
47
|
+
* principal in a grant, so give it an app. None may be the run's own: it throws before it
|
|
40
48
|
* writes.
|
|
41
49
|
*/
|
|
42
50
|
principals?: {
|
package/dist/conformance.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as conformance } from "./conformance-
|
|
1
|
+
import { t as conformance } from "./conformance-qJF96jZI.mjs";
|
|
2
2
|
export { conformance };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _ as fileSize, h as IMPORT_BYTES_MAX, p as ATTACHMENT_BYTES_MAX, r as badRequest, s as notFound, t as HttpError, y as typeOf } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { l as isThreadTarget, s as channelOf } from "./external-
|
|
2
|
+
import { b as toStorable, f as MESSAGE_TEXT_MAX, o as ChannelPath } from "./schemas-AZkxk06N.mjs";
|
|
3
|
+
import { l as isThreadTarget, s as channelOf } from "./external-CHDxWIVf.mjs";
|
|
4
4
|
import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
|
|
5
|
-
import { a as waitUntil, i as afterRetry, s as derivedId, t as DroppedError } from "./middleware-
|
|
5
|
+
import { a as waitUntil, i as afterRetry, s as derivedId, t as DroppedError } from "./middleware-CPqAuRtp.mjs";
|
|
6
6
|
import { n as replaceMentions } from "./mentions-CB6ShY4R.mjs";
|
|
7
|
-
import { a as immutable, d 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 routesFor, l as UnreadableError, n as SyncOverrides, o as ReceivedEvent, s as ResolvedTarget, u as channelMissing } from "./events-C6HwB046.mjs";
|
|
8
8
|
import { t as displayText } from "./bots-CGkO76qH.mjs";
|
|
9
9
|
//#region src/sync/engine.ts
|
|
10
10
|
/** `files`: a message with files may have no text. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as ExternalEvent, r as ExternalLocation } from "./external-
|
|
1
|
+
import { d as Labels, l as LabelKey } from "./schemas-AZkxk06N.mjs";
|
|
2
|
+
import { n as ExternalEvent, r as ExternalLocation } from "./external-CHDxWIVf.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/sync/fn.ts
|
|
5
5
|
const ROUTES = Symbol.for("board.syncRoutes");
|