@vercel/board 0.31.0 → 0.33.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/README.md +25 -20
- package/dist/{access-CY5xVMIK.mjs → access-N3XmkKXg.mjs} +3 -3
- package/dist/access.d.mts +4 -5
- package/dist/access.mjs +5 -5
- package/dist/{actors-Bm-ojWWT.mjs → actors-ihyN47OV.mjs} +3 -3
- package/dist/{auth-DLYSt_-A.d.mts → auth-D6z3rMNj.d.mts} +11 -93
- package/dist/{auth-CyO2aw5n.mjs → auth-r-_PeZyw.mjs} +39 -151
- package/dist/{backend-Bob-5CM7.d.mts → backend-CWpyR1A7.d.mts} +81 -51
- package/dist/backend-local.d.mts +28 -0
- package/dist/backend-local.mjs +2 -0
- package/dist/{chat-provider-DkFp2hrh.mjs → chat-provider-9hCT654s.mjs} +2 -2
- package/dist/{chat-provider-BChYrrA7.d.mts → chat-provider-DJpFUaFv.d.mts} +2 -3
- 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 +6 -6
- package/dist/{commands-DK4W3HCJ.d.mts → commands-BOBQHVqM.d.mts} +14 -0
- package/dist/{commands-L1JSGz2Z.mjs → commands-CHoMl06v.mjs} +39 -12
- package/dist/{conformance-DK43HiHf.mjs → conformance-qKmGLTAT.mjs} +40 -5
- package/dist/conformance.d.mts +1 -1
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-DurYIRt8.mjs → engine-JxgZiikU.mjs} +6 -8
- package/dist/{errors-CJXhhzvT.mjs → errors-Pk0XV1hK.mjs} +56 -2
- package/dist/{events-lujPA3gQ.mjs → events-IQg0k281.mjs} +2 -2
- package/dist/exports-BuKjVq2t.d.mts +4 -0
- package/dist/exports-gHDHlg0i.mjs +3207 -0
- package/dist/{external-D3p5T57R.mjs → external-CYe424fO.mjs} +1 -1
- package/dist/{folds-DLUzfibJ.d.mts → folds-DjFTiqIM.d.mts} +38 -44
- package/dist/index-CXvvYNYj.d.mts +11 -0
- package/dist/index.d.mts +9 -8
- package/dist/index.mjs +21 -8
- package/dist/index.node.d.mts +5 -6
- package/dist/index.node.mjs +3 -3
- package/dist/inspect/app.js +95 -95
- package/dist/{internal-CvsrprnU-zZMpDiRY.mjs → internal-CvsrprnU-CEPOUpAv.mjs} +63 -43
- package/dist/local-BbLjA5vI.mjs +8818 -0
- package/dist/{main-Dz-8komG.mjs → main-CQpCZJFw.mjs} +140 -36
- package/dist/{backend-a2/store-memory.mjs → memory-7RRnLa4X.mjs} +3 -3
- package/dist/middleware-BU7rVi9F.mjs +103 -0
- package/dist/{client-COfYrgfV.d.mts → provider-BlzUvcM9.d.mts} +665 -5
- package/dist/{schemas-DBmUO6pr.mjs → schemas-BG205xds.mjs} +2 -5
- package/dist/{serve-CTmow-YH.mjs → serve-D8_W4UN6.mjs} +33 -24
- package/dist/{node-BgeGcwX0.mjs → server-BiIUXWbU.mjs} +419 -6
- package/dist/{serving-DBFRo6U_.mjs → serving-D7rcUtSC.mjs} +1 -1
- package/dist/{sql-CT5xVuGr.mjs → sql-BQzKUqQt.mjs} +349 -114
- package/dist/sqlite-DCtZFEVm.mjs +30 -0
- package/dist/{sqlite-db-0WeSOEZN.mjs → sqlite-db-qLTs52Ny.mjs} +2 -3
- package/dist/{store-codec-pAG2oPgQ-SqDXlPBR.mjs → store-N8PXxDAS-BdL4Sq-f.mjs} +6 -2
- package/dist/{store-memory-B0PkVSuQ.mjs → store-memory-CKQVEzXN.mjs} +2 -4
- package/dist/store-memory-OdGsc-t_.mjs +2 -0
- package/dist/{store-polling-BZt2Rf3D-Div-bJ_D.mjs → store-polling-BZt2Rf3D-oh3aU_An.mjs} +1 -1
- package/dist/store-sqlite-CTxAVCcz.mjs +2 -0
- package/dist/{store-sqlite-D85t3tE7.mjs → store-sqlite-D6fIszST.mjs} +3 -4
- 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 +2 -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/{watchers-hash-BjwlnGD9.mjs → targets-CknPGGVi.mjs} +40 -10
- package/dist/{tokens-Dnyd_y1n.mjs → tokens-DPKjl3jf.mjs} +15 -43
- package/docs/01-board/01-mounting.md +243 -288
- package/docs/01-board/03-identity.md +41 -50
- package/docs/01-board/04-messages.md +19 -16
- package/docs/01-board/05-reading.md +3 -3
- package/docs/01-board/06-watchers.md +58 -105
- package/docs/01-board/07-schedules.md +21 -41
- package/docs/01-board/08-middleware.md +11 -17
- package/docs/01-board/09-access.md +76 -313
- package/docs/01-board/10-local.md +81 -0
- package/docs/01-quickstart.md +49 -126
- package/docs/02-sync/01-overview.md +25 -80
- package/docs/02-sync/02-functions.md +10 -16
- package/docs/02-sync/03-slack.md +13 -26
- package/docs/02-sync/04-github.md +8 -20
- package/docs/02-sync/07-linear.md +6 -10
- package/docs/03-guides/02-inspector.md +3 -3
- package/docs/03-guides/03-ci.md +88 -128
- package/docs/03-guides/04-triage.md +7 -15
- package/docs/03-guides/05-agent-factory.md +30 -36
- package/docs/04-reference/01-cli.md +118 -32
- package/docs/04-reference/02-board.md +60 -74
- package/docs/04-reference/03-http.md +119 -57
- package/docs/04-reference/05-conformance.md +31 -45
- package/docs/index.md +41 -65
- package/package.json +12 -83
- package/dist/a2-DngWY2Eb.mjs +0 -4238
- package/dist/access-DPcrKIH_.d.mts +0 -37
- package/dist/backend-a2/blob-vercel.d.mts +0 -8
- package/dist/backend-a2/blob-vercel.mjs +0 -81
- package/dist/backend-a2/contract.d.mts +0 -828
- package/dist/backend-a2/contract.mjs +0 -5
- package/dist/backend-a2/scheduler-local.d.mts +0 -11
- package/dist/backend-a2/scheduler-local.mjs +0 -2
- package/dist/backend-a2/scheduler-qstash.d.mts +0 -79
- package/dist/backend-a2/scheduler-qstash.mjs +0 -522
- package/dist/backend-a2/scheduler-vercel.d.mts +0 -38
- package/dist/backend-a2/scheduler-vercel.mjs +0 -204
- package/dist/backend-a2/store-memory.d.mts +0 -11
- package/dist/backend-a2/store-postgres.d.mts +0 -38
- package/dist/backend-a2/store-postgres.mjs +0 -2977
- package/dist/backend-a2/store-redis-http.d.mts +0 -17
- package/dist/backend-a2/store-redis-http.mjs +0 -520
- package/dist/backend-a2/store-redis.d.mts +0 -31
- package/dist/backend-a2/store-redis.mjs +0 -88
- package/dist/backend-a2/store-sqlite.d.mts +0 -12
- package/dist/backend-a2/store-sqlite.mjs +0 -31
- package/dist/backend-a2.d.mts +0 -2633
- package/dist/backend-a2.mjs +0 -3
- package/dist/backend-http-BRrRbjRx.d.mts +0 -672
- package/dist/backend-http-CvUKOn-m.mjs +0 -585
- package/dist/backend-http-D8mUzuKQ.mjs +0 -18
- package/dist/backend-http.d.mts +0 -10
- package/dist/backend-http.mjs +0 -2
- package/dist/backend-http.node.d.mts +0 -10
- package/dist/backend-http.node.mjs +0 -2
- package/dist/backend-vercel-Ba8JDtqW.mjs +0 -86
- package/dist/backend-vercel-BaSEUdwg.d.mts +0 -674
- package/dist/backend-vercel-CmY9yZ9m.mjs +0 -1656
- package/dist/backend-vercel.d.mts +0 -9
- package/dist/backend-vercel.mjs +0 -11
- package/dist/backend-vercel.node.d.mts +0 -17
- package/dist/backend-vercel.node.mjs +0 -2
- package/dist/blob-Bx8QPWEd.d.mts +0 -40
- package/dist/blob-WbB2DJKn.mjs +0 -201
- package/dist/errors-2vGs49Db.d.mts +0 -16
- package/dist/exports-CWIdN0Ub.mjs +0 -1389
- package/dist/exports-FBOQWT7O.d.mts +0 -5
- package/dist/files-SniSmeEr.mjs +0 -47
- package/dist/folds-Cu9Q9zyQ.mjs +0 -207
- package/dist/index-Ho-ayyQL.d.mts +0 -11
- package/dist/index.default-BUcwDaAe.mjs +0 -12
- package/dist/local-C76Fy5ad.mjs +0 -44
- package/dist/middleware-BavYSDUa.mjs +0 -62
- package/dist/platform-B4TnJtWu-Do3agKr5.mjs +0 -32
- package/dist/project-CQ4VUibA.mjs +0 -124
- package/dist/provider-gynDUoyW.d.mts +0 -665
- package/dist/redis-tables-DHf85ixI.mjs +0 -3895
- package/dist/reducer-Bswr11ar-P324o9vn.mjs +0 -74
- package/dist/reducer-CYPHsSmd-BXjGiptm.d.mts +0 -170
- package/dist/reducers-DcENwtwZ.mjs +0 -538
- package/dist/retryable-lazy-DZWmHpii-DpTc5PIP.mjs +0 -19
- package/dist/scheduler-task-X1SToDjP-D2Il2rln.mjs +0 -69
- package/dist/server-B9gu0qi1-DI1WvcVK.d.mts +0 -391
- package/dist/server-DG8D6VV0.mjs +0 -17
- package/dist/server-DX7mM6nm-D7N_7bug.mjs +0 -3611
- package/dist/session-clear-XJYpmUpg-2q8l_FJR.mjs +0 -63
- package/dist/store-DEzcHZOA-B-5vhxef.d.mts +0 -540
- package/dist/store-N8PXxDAS-DWWgv-Vz.mjs +0 -5
- package/dist/store-memory-4IBl0Ztu.mjs +0 -2
- package/dist/store-presence-polling-JuAy2Ck2-Dh-g_KYM.mjs +0 -109
- package/dist/store-sqlite-iBTYYKBj.mjs +0 -2
- package/dist/stream-buffer-DrTyiIuo-Be10yOBR.mjs +0 -53
- package/dist/targets-Cgjs29T0.mjs +0 -33
- package/dist/types-CmrFjpml.d.mts +0 -102
- package/dist/wait-until-Dw4XrIDQ.mjs +0 -42
- package/docs/01-board/02-database.md +0 -258
- package/docs/04-reference/04-log.md +0 -247
- package/sql/postgres/board.sql +0 -145
- package/sql/postgres/notifications.sql +0 -24
- package/sql/postgres/schema.sql +0 -451
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { $ as RegisterBody, A as InboxAckBody, At as ThreadsPage, B as MatchView, C as EventsPage, D as GrantBody, Dt as SyncedView, Et as SyncThreadView, F as InboxQuery, Ft as TokenView, G as MessagesQuery, H as Me, It as TypingBody, J as PostBody, L as LabelBody, M as InboxItem, N as InboxNextQuery, Nt as TokenBody, P as InboxPushBody, Rt as UploadStartBody, S as EditBody, St as SyncImportBody, U as MessageView, V as MatchesQuery, W as MessagesPage, Z as ReactBody, _ as BoardEventView, _t as SyncCopiesQuery, b as DeleteBody, bt as SyncFindQuery, ct as SchedulesQuery, dt as SourceJoin, ft as SourceJoinBody, ht as SourceReadQuery, it as ScheduleBody, j as InboxEntry, jt as ThreadsQuery, k as GrantView, kt as ThreadView, m as AckBody, mt as SourceRead, o as ProfileOption, st as ScheduleView, t as BoardClient, tt as RegistrationView, v as ChannelView, vt as SyncCopiesView, w as EventsQuery, wt as SyncReceiptBody, x as Discovery, xt as SyncFindView, y as CreateChannelBody, z as LinkedQuery, zt as UploadTicket } from "./client-COfYrgfV.mjs";
|
|
5
|
-
import { t as HttpError } from "./errors-2vGs49Db.mjs";
|
|
6
|
-
import { p as SyncProvider } from "./provider-gynDUoyW.mjs";
|
|
1
|
+
import { d as Attachment, f as Author, m as Access, o as ExternalEvent, p as Labels, t as Actor } from "./folds-DjFTiqIM.mjs";
|
|
2
|
+
import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-D6z3rMNj.mjs";
|
|
3
|
+
import { $ as EditBody, $t as SyncImportBody, At as RegisterBody, Ft as ScheduleBody, G as AckBody, Gt as SourceRead, Ht as SourceJoin, J as BoardEventView, Jt as SyncCopiesQuery, Kt as SourceReadQuery, L as ProfileOption, M as BoardClient, Mt as RegistrationView, Ot as ReactBody, P as ErrorOrigin, Q as Discovery, Qt as SyncFindView, Rt as ScheduleView, St as MessagesQuery, Tt as PostBody, Ut as SourceJoinBody, X as CreateChannelBody, Y as ChannelView, Yt as SyncCopiesView, Z as DeleteBody, Zt as SyncFindQuery, _t as MatchView, bt as MessageView, cn as ThreadsQuery, ct as InboxEntry, dt as InboxPushBody, et as EventsPage, fn as TokenView, ft as InboxQuery, gn as UploadTicket, gt as LinkedQuery, hn as UploadStartBody, in as SyncedView, it as GrantBody, lt as InboxItem, mt as LabelBody, on as ThreadView, ot as GrantView, p as SyncProvider, pn as TypingBody, rn as SyncThreadView, sn as ThreadsPage, st as InboxAckBody, tn as SyncReceiptBody, tt as EventsQuery, un as TokenBody, ut as InboxNextQuery, vt as MatchesQuery, xt as MessagesPage, yt as Me, zt as SchedulesQuery } from "./provider-BlzUvcM9.mjs";
|
|
7
4
|
import { z } from "zod";
|
|
8
5
|
//#region src/api/protocol.d.ts
|
|
9
6
|
type Input<S extends z.ZodType> = NonNullable<z.output<S>>;
|
|
@@ -316,6 +313,20 @@ type Protocol = {
|
|
|
316
313
|
};
|
|
317
314
|
type Method = keyof Protocol;
|
|
318
315
|
//#endregion
|
|
316
|
+
//#region src/server/errors.d.ts
|
|
317
|
+
declare class HttpError extends Error {
|
|
318
|
+
readonly status: number;
|
|
319
|
+
readonly code: string;
|
|
320
|
+
/** What fixes it, when there's one (`BoardError`'s `hint`). */
|
|
321
|
+
readonly hint: string | undefined;
|
|
322
|
+
/** `handle` for a handle's own error on its way through: everything else is the board's. */
|
|
323
|
+
readonly origin: ErrorOrigin;
|
|
324
|
+
constructor(status: number, code: string, message: string, options?: {
|
|
325
|
+
hint?: string;
|
|
326
|
+
origin?: ErrorOrigin;
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
//#endregion
|
|
319
330
|
//#region src/server/middleware.d.ts
|
|
320
331
|
/** Where a write came from, as the middleware sees it. */
|
|
321
332
|
type WriteSource =
|
|
@@ -402,33 +413,11 @@ type PolicyOptions = {
|
|
|
402
413
|
* from its credential or its headers (a session cookie). It replaces the built-in one, so no
|
|
403
414
|
* token's audience or the board's own project counts then, unless it calls `oidcTokens()` itself.
|
|
404
415
|
* Null when it recognizes nothing; to reject, return or throw a `Response`.
|
|
405
|
-
*/
|
|
406
|
-
authenticate?: Authenticate;
|
|
407
|
-
/**
|
|
408
|
-
* Who besides the board's people and its own deployments in the environment it runs in may use
|
|
409
|
-
* it, and what they may do in each channel: `vercelProject()`, `githubActions()`, `oidc()` from
|
|
410
|
-
* `@vercel/board/access`, and functions of your own, `(principal) => can`, for principals your
|
|
411
|
-
* `authenticate` returns. The first rule that matches decides; a function's undefined leaves it to
|
|
412
|
-
* the next. A production board's previews need a rule, as
|
|
413
|
-
* `vercelProject({ project: 'self', environments: ['preview'], can })`.
|
|
414
|
-
*
|
|
415
|
-
* Or a host's own model: one function of the principal its `authenticate` returned, giving what it
|
|
416
|
-
* may do in each channel (`'all'`, `['read']`, `{ 'dev/': ['post'] }`), or null for nothing.
|
|
417
|
-
* Nothing else is trusted then, not the board's own people or deployments.
|
|
418
416
|
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
417
|
+
* What a principal may do isn't its to say: people, and the board's own deployments in its
|
|
418
|
+
* environment, may do everything, and anyone else what the board's grants give.
|
|
421
419
|
*/
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* The board's Vercel project: `self` in the rules, whose people's development tokens it takes,
|
|
425
|
-
* and what discovery names for clients to mint them. Defaults to `VERCEL_PROJECT_ID` or
|
|
426
|
-
* `.vercel/project.json`.
|
|
427
|
-
*/
|
|
428
|
-
project?: {
|
|
429
|
-
id: string;
|
|
430
|
-
teamId?: string;
|
|
431
|
-
};
|
|
420
|
+
authenticate?: Authenticate;
|
|
432
421
|
};
|
|
433
422
|
//#endregion
|
|
434
423
|
//#region src/server/origin.d.ts
|
|
@@ -482,13 +471,27 @@ type Watcher = {
|
|
|
482
471
|
* `board()`'s options: where the board lives, who may use it and what its writes go through, and
|
|
483
472
|
* what runs here. The backend keeps or reaches the log; the policy is the board's.
|
|
484
473
|
*/
|
|
485
|
-
type BoardOptions = PolicyOptions & {
|
|
474
|
+
type BoardOptions = PolicyOptions & (BackendOptions | DefaultOptions) & {
|
|
475
|
+
/**
|
|
476
|
+
* Which of the team's boards this is, by its name: `security` is the team's board named
|
|
477
|
+
* security. Without one, the team's default board. A name is 1 to 64 characters with no `/`, and
|
|
478
|
+
* matches whatever its case. The backend reads it when board() binds it: `vercel()` finds that
|
|
479
|
+
* board, a board on `http()` is the one at its URL, whatever its name.
|
|
480
|
+
*/
|
|
481
|
+
name?: string;
|
|
482
|
+
/**
|
|
483
|
+
* With `name`: whether to make that board when the team has none by that name, whoever calls (a
|
|
484
|
+
* deployment, or a person: `next dev` with a login, a script). It does by default; `ensure: false`
|
|
485
|
+
* only finds one, and a name the team has none for fails with 404 `no_board`. `vb` passes false
|
|
486
|
+
* unless `--ensure` is given, so a typo at a terminal makes no board.
|
|
487
|
+
*/
|
|
488
|
+
ensure?: boolean;
|
|
486
489
|
/**
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
+
* Whose board this is: another team's, by its ID (`team_…`) or its slug, with `name` or without
|
|
491
|
+
* it for that team's default board. Without one, the team the environment finds: in Node, the
|
|
492
|
+
* deployment's, `VERCEL_ORG_ID`, or the linked project's.
|
|
490
493
|
*/
|
|
491
|
-
|
|
494
|
+
team?: string;
|
|
492
495
|
/**
|
|
493
496
|
* Runs on every post and edit before it reaches the backend, whatever it came from: requests (a
|
|
494
497
|
* board on `http()` using this one included), watchers, schedules, the handle, and sync's imports.
|
|
@@ -515,7 +518,7 @@ type BoardOptions = PolicyOptions & {
|
|
|
515
518
|
* The handle on a board: its methods act as the board's caller, through board(), which calls the
|
|
516
519
|
* backend's methods, and `fetch` serves it. Over `http()` the caller is whoever its `fetch`'s
|
|
517
520
|
* credentials say, with the profile `BOARD_AS` or the agent it runs in picks; on a board it keeps
|
|
518
|
-
* (`
|
|
521
|
+
* (`local()`), its own code, as `board:client`.
|
|
519
522
|
*/
|
|
520
523
|
type Board = BoardClient & {
|
|
521
524
|
/**
|
|
@@ -525,10 +528,30 @@ type Board = BoardClient & {
|
|
|
525
528
|
fetch(request: Request): Promise<Response>;
|
|
526
529
|
/**
|
|
527
530
|
* The handle, acting with `profile`: `<principal>+<profile>` over HTTP, `board:client:<profile>`
|
|
528
|
-
* on `
|
|
531
|
+
* on `local()`. `null` acts as yourself, outside any agent session.
|
|
529
532
|
*/
|
|
530
533
|
as(profile: ProfileOption): Board;
|
|
531
534
|
};
|
|
535
|
+
/** A board on a backend you pass, which says how it reaches the board itself. */
|
|
536
|
+
type BackendOptions = {
|
|
537
|
+
/**
|
|
538
|
+
* Where the board lives: `local()` from `@vercel/board/backend-local` keeps it in this process,
|
|
539
|
+
* or a backend of your own. By default, Vercel's board for your team, the one `name` names, or
|
|
540
|
+
* with `BOARD_URL` set (in Node), the board at that URL.
|
|
541
|
+
*/
|
|
542
|
+
backend: Backend;
|
|
543
|
+
fetch?: never;
|
|
544
|
+
};
|
|
545
|
+
/** A board on the backend board() picks: Vercel's, or with `BOARD_URL` set, the board at that URL. */
|
|
546
|
+
type DefaultOptions = {
|
|
547
|
+
backend?: undefined;
|
|
548
|
+
/**
|
|
549
|
+
* How requests reach Vercel's API, with credentials it takes: a token for the team. In Node it
|
|
550
|
+
* defaults to `VERCEL_TOKEN`, the deployment's OIDC token, or your `vercel login`; elsewhere, a
|
|
551
|
+
* browser say, pass one. A board at `BOARD_URL` gets the credentials `vb` sends it instead.
|
|
552
|
+
*/
|
|
553
|
+
fetch?: typeof fetch;
|
|
554
|
+
};
|
|
532
555
|
//#endregion
|
|
533
556
|
//#region src/server/backend.d.ts
|
|
534
557
|
/**
|
|
@@ -557,7 +580,7 @@ type SelfCaller = {
|
|
|
557
580
|
/**
|
|
558
581
|
* A handle (`via: client`, with the profile from `as(profile)`, or null for the board's own), a
|
|
559
582
|
* watcher, the middleware's handle (`via: middleware`), or sync (`via: engine`). Each backend
|
|
560
|
-
* decides who that is on its board: `board:client` and `board:client:<profile>` on
|
|
583
|
+
* decides who that is on its board: `board:client` and `board:client:<profile>` on local(), the
|
|
561
584
|
* token's holder with that profile elsewhere.
|
|
562
585
|
*/
|
|
563
586
|
self: string | null;
|
|
@@ -608,11 +631,21 @@ type InboxDelivery = {
|
|
|
608
631
|
};
|
|
609
632
|
/** What a backend gets from the board it serves: once, in memory, when board() is created. */
|
|
610
633
|
type BoardBinding = {
|
|
634
|
+
/**
|
|
635
|
+
* Which of the team's boards this is, as `board({ name })` says it: `security`, or null for the
|
|
636
|
+
* team's default board. A backend that keeps one board, or reaches one by its URL, may leave it
|
|
637
|
+
* unread.
|
|
638
|
+
*/
|
|
639
|
+
name: string | null;
|
|
640
|
+
/** Whose board it is, as `board({ team })` says it, by the team's ID or slug: null for the team the environment finds. */
|
|
641
|
+
team: string | null;
|
|
642
|
+
/** Whether to make the board `name` names when the team has none by that name: `board({ ensure })`, true unless it says false. */
|
|
643
|
+
ensure: boolean;
|
|
611
644
|
/** What runs on this board's events, by ID: this project's watchers, and sync's outbound at `SYNC` when it syncs. */
|
|
612
645
|
subscriptions: Record<string, Subscription>;
|
|
613
646
|
/**
|
|
614
647
|
* Runs one subscription on an event. A throw is the backend's to retry; `attempt` counts tries
|
|
615
|
-
* from 1, and sync gives up on a delivery, and says so, before
|
|
648
|
+
* from 1, and sync gives up on a delivery, and says so, before the backend stops trying it.
|
|
616
649
|
*/
|
|
617
650
|
run(id: string, event: WatcherContext['event'], meta: {
|
|
618
651
|
trigger: string;
|
|
@@ -658,8 +691,8 @@ type BoardBinding = {
|
|
|
658
691
|
*/
|
|
659
692
|
typing(messages: readonly MessageView[], status: string | undefined): Promise<string[]>;
|
|
660
693
|
/**
|
|
661
|
-
* What a principal the backend stored may do now, under board()'s
|
|
662
|
-
* at each send, a registrant at each event and pull. Null once it may do nothing.
|
|
694
|
+
* What a principal the backend stored may do now, under board()'s defaults and the board's grants:
|
|
695
|
+
* a schedule's creator at each send, a registrant at each event and pull. Null once it may do nothing.
|
|
663
696
|
*/
|
|
664
697
|
accessNow(principal: Known): Promise<Access | null>;
|
|
665
698
|
/** The board's own Vercel project and team, as board() knows them: what discovery names, for clients to mint tokens with. */
|
|
@@ -667,8 +700,6 @@ type BoardBinding = {
|
|
|
667
700
|
id: string | null;
|
|
668
701
|
teamId: string | null;
|
|
669
702
|
}>;
|
|
670
|
-
/** The OIDC issuers board()'s rules name, which no grant's issuer may share principals with. */
|
|
671
|
-
issuers(): readonly string[];
|
|
672
703
|
/**
|
|
673
704
|
* A handle through board(), as `caller`: what a backend writes for someone outside a request
|
|
674
705
|
* goes through it, so board()'s middleware sees it, a schedule's send as its creator, say. A
|
|
@@ -708,19 +739,18 @@ interface Backend extends ProtocolMethods {
|
|
|
708
739
|
/** Routes of its own, beside the protocol: one at a protocol route's path takes its place. */
|
|
709
740
|
readonly routes: readonly BackendRoute[];
|
|
710
741
|
/**
|
|
711
|
-
* Whether the board lives here. One that keeps it (`
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
* project.
|
|
742
|
+
* Whether the board lives here. One that keeps it (`local()`) serves requests: its people, the
|
|
743
|
+
* board's own deployments, and whoever its grants and tokens let in. One that uses another board
|
|
744
|
+
* (Vercel's, or one at `BOARD_URL`) answers only wake-ups and webhooks.
|
|
715
745
|
*/
|
|
716
746
|
readonly keeps: boolean;
|
|
717
747
|
/**
|
|
718
|
-
* Whether a schedule's sends come back through board(), as
|
|
748
|
+
* Whether a schedule's sends come back through board(), as local()'s do, so its middleware screens
|
|
719
749
|
* each. A backend whose sends post elsewhere, as vercel()'s do from Vercel's API, says false, and
|
|
720
750
|
* board() screens a schedule's message once, when it's made. True when left out.
|
|
721
751
|
*/
|
|
722
752
|
readonly sendsSchedulesHere?: boolean;
|
|
723
|
-
/** Its grants and tokens, for a backend that keeps them (`
|
|
753
|
+
/** Its grants and tokens, for a backend that keeps them (`local()`): board() checks requests against them. */
|
|
724
754
|
readonly trust?: Trust;
|
|
725
755
|
/**
|
|
726
756
|
* board() calls it once, when it's created, before any request: what background work needs
|
|
@@ -729,4 +759,4 @@ interface Backend extends ProtocolMethods {
|
|
|
729
759
|
bind(board: BoardBinding): void;
|
|
730
760
|
}
|
|
731
761
|
//#endregion
|
|
732
|
-
export { Protocol as C, Method as S,
|
|
762
|
+
export { Protocol as C, Method as S, MiddlewareContext as _, Identity as a, WriteSource as b, SelfCaller as c, Board as d, BoardOptions as f, Middleware as g, DroppedError as h, Caller as i, Subscription as l, WatcherContext as m, BackendRoute as n, InboxDelivery as o, Watcher as p, BoardBinding as r, ProtocolMethods as s, Backend as t, VerifiedCaller as u, Write as v, HttpError as x, WritePatch as y };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { t as Backend } from "./backend-CWpyR1A7.mjs";
|
|
2
|
+
//#region src/server/local.d.ts
|
|
3
|
+
type LocalOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Where it keeps its files: `.board` under the working directory by default. Each board is one
|
|
6
|
+
* SQLite file there, `local.db` for the default board and one named for the board otherwise,
|
|
7
|
+
* whatever its team, with its attachments in the folder of the same name.
|
|
8
|
+
*/
|
|
9
|
+
dir?: string;
|
|
10
|
+
/** Keeps the board in memory, attachments too, for tests: nothing is written, and it's gone with the process. */
|
|
11
|
+
memory?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/** A board kept in this process. `close()` closes its file, once nothing uses it. */
|
|
14
|
+
type LocalBackend = Backend & {
|
|
15
|
+
/** Stops its timers and closes the board's file. What was still to send doesn't, as after a restart. */
|
|
16
|
+
close(): Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A board kept in this process: in SQLite under `.board/` (or `dir`), one file per board's name
|
|
20
|
+
* (whatever `board({ team })` says: there's one team here),
|
|
21
|
+
* its attachments next to it, and a scheduler whose timers run here, so schedules send, and
|
|
22
|
+
* watchers and sync retry, while the process runs. `memory` keeps it all in memory, for tests.
|
|
23
|
+
* A restart drops pending timers, so it's for development, `vb serve`, tests, and working offline,
|
|
24
|
+
* never serverless functions.
|
|
25
|
+
*/
|
|
26
|
+
export declare function local(options?: LocalOptions): LocalBackend;
|
|
27
|
+
//#endregion
|
|
28
|
+
export type { LocalBackend, LocalOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./external-
|
|
2
|
-
import { c as SyncProvider, s as ResolvedTarget } from "./events-
|
|
1
|
+
import "./external-CYe424fO.mjs";
|
|
2
|
+
import { c as SyncProvider, s as ResolvedTarget } from "./events-IQg0k281.mjs";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { Chat, stringifyMarkdown } from "chat";
|
|
5
5
|
//#region src/sync/chat.ts
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
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-gynDUoyW.mjs";
|
|
1
|
+
import { a as ExternalAuthor, c as ExternalLink, s as ExternalFile, t as Actor } from "./folds-DjFTiqIM.mjs";
|
|
2
|
+
import { Gt as SourceRead, Ht as SourceJoin, 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-BlzUvcM9.mjs";
|
|
4
3
|
import { Adapter, Author, FileUpload, Message, ReactionEvent, StateAdapter } from "chat";
|
|
5
4
|
//#region src/sync/chat-provider.d.ts
|
|
6
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-BOBQHVqM.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-CHoMl06v.mjs";
|
|
2
2
|
export { commands, filters, globalOptions, groups, option, options, usage };
|
package/dist/cli-embedded.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { d as Board } from "./backend-CWpyR1A7.mjs";
|
|
2
|
+
import "./index-CXvvYNYj.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,4 +1,4 @@
|
|
|
1
|
-
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 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-CQpCZJFw.mjs";
|
|
2
2
|
//#region src/cli/embedded.ts
|
|
3
3
|
/**
|
|
4
4
|
* Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
|
|
@@ -75,7 +75,7 @@ function vb(board, argv, options = {}) {
|
|
|
75
75
|
board,
|
|
76
76
|
write: (chunk) => void (stdout += typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true })),
|
|
77
77
|
error: (chunk) => void (stderr += chunk),
|
|
78
|
-
readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach can't read files", "readFile"),
|
|
78
|
+
readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach and --text-file can't read files", "readFile"),
|
|
79
79
|
writeFile: options.writeFile ? async (path, data) => options.writeFile(path, data) : lacking("download can't save files", "writeFile"),
|
|
80
80
|
stdin: options.stdin !== void 0 ? async () => options.stdin : lacking("- can't read stdin", "stdin"),
|
|
81
81
|
...options.signal ? { signal: options.signal } : {}
|
package/dist/cli.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import "./schemas-
|
|
4
|
-
import { a as option } from "./commands-
|
|
5
|
-
import {
|
|
6
|
-
import { r as main, u as who } from "./main-
|
|
2
|
+
import { p as ATTACHMENT_BYTES_MAX } from "./errors-Pk0XV1hK.mjs";
|
|
3
|
+
import "./schemas-BG205xds.mjs";
|
|
4
|
+
import { a as option } from "./commands-CHoMl06v.mjs";
|
|
5
|
+
import { d as projectDir } from "./server-BiIUXWbU.mjs";
|
|
6
|
+
import { r as main, u as who } from "./main-CQpCZJFw.mjs";
|
|
7
7
|
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
8
8
|
import { appendFile, readFile } from "node:fs/promises";
|
|
9
9
|
import { join } from "node:path";
|
|
@@ -661,7 +661,7 @@ const local = {
|
|
|
661
661
|
if (args.length > 0) throw usage("serve takes no arguments: pass its port with --port, and its directory with --dir.");
|
|
662
662
|
const port = portFlag();
|
|
663
663
|
const root = projectDir();
|
|
664
|
-
const { localHandle, serveLocal } = await import("./serve-
|
|
664
|
+
const { localHandle, serveLocal } = await import("./serve-D8_W4UN6.mjs");
|
|
665
665
|
const handle = flags.handle ?? process.env.BOARD_HANDLE;
|
|
666
666
|
const local = await serveLocal({
|
|
667
667
|
dir: flags.dir ?? join(root, ".board"),
|
|
@@ -96,6 +96,15 @@ declare const options: {
|
|
|
96
96
|
readonly value: 'team';
|
|
97
97
|
readonly description: "a team's board in Vercel's API, by its slug or ID";
|
|
98
98
|
};
|
|
99
|
+
readonly name: {
|
|
100
|
+
readonly type: 'string';
|
|
101
|
+
readonly value: 'board';
|
|
102
|
+
readonly description: "the team's board with this name, on --scope's team";
|
|
103
|
+
};
|
|
104
|
+
readonly ensure: {
|
|
105
|
+
readonly type: 'boolean';
|
|
106
|
+
readonly description: 'with --name: make that board if the team has none by that name';
|
|
107
|
+
};
|
|
99
108
|
readonly team: {
|
|
100
109
|
readonly type: 'string';
|
|
101
110
|
readonly value: 'team';
|
|
@@ -162,6 +171,11 @@ declare const options: {
|
|
|
162
171
|
readonly value: 'file';
|
|
163
172
|
readonly description: 'attach a file';
|
|
164
173
|
};
|
|
174
|
+
readonly 'text-file': {
|
|
175
|
+
readonly type: 'string';
|
|
176
|
+
readonly value: 'path';
|
|
177
|
+
readonly description: 'the text, from a file: - reads stdin';
|
|
178
|
+
};
|
|
165
179
|
readonly unset: {
|
|
166
180
|
readonly type: 'string';
|
|
167
181
|
readonly multiple: true;
|
|
@@ -48,6 +48,15 @@ const options = {
|
|
|
48
48
|
value: "team",
|
|
49
49
|
description: "a team's board in Vercel's API, by its slug or ID"
|
|
50
50
|
},
|
|
51
|
+
name: {
|
|
52
|
+
type: "string",
|
|
53
|
+
value: "board",
|
|
54
|
+
description: "the team's board with this name, on --scope's team"
|
|
55
|
+
},
|
|
56
|
+
ensure: {
|
|
57
|
+
type: "boolean",
|
|
58
|
+
description: "with --name: make that board if the team has none by that name"
|
|
59
|
+
},
|
|
51
60
|
team: {
|
|
52
61
|
type: "string",
|
|
53
62
|
value: "team",
|
|
@@ -114,6 +123,11 @@ const options = {
|
|
|
114
123
|
value: "file",
|
|
115
124
|
description: "attach a file"
|
|
116
125
|
},
|
|
126
|
+
"text-file": {
|
|
127
|
+
type: "string",
|
|
128
|
+
value: "path",
|
|
129
|
+
description: "the text, from a file: - reads stdin"
|
|
130
|
+
},
|
|
117
131
|
unset: {
|
|
118
132
|
type: "string",
|
|
119
133
|
multiple: true,
|
|
@@ -259,6 +273,8 @@ const filters = [
|
|
|
259
273
|
const globalOptions = [
|
|
260
274
|
"url",
|
|
261
275
|
"scope",
|
|
276
|
+
"name",
|
|
277
|
+
"ensure",
|
|
262
278
|
"team",
|
|
263
279
|
"as",
|
|
264
280
|
"avatar",
|
|
@@ -273,7 +289,7 @@ const id = (description = "a message ID, as read shows it (#812)") => ({
|
|
|
273
289
|
required: true,
|
|
274
290
|
description
|
|
275
291
|
});
|
|
276
|
-
const text = (description = "what it says: - reads it from stdin, and it may be left out when you --attach") => ({
|
|
292
|
+
const text = (description = "what it says: - reads it from stdin, and it may be left out when you --attach or --text-file") => ({
|
|
277
293
|
name: "text",
|
|
278
294
|
required: false,
|
|
279
295
|
description
|
|
@@ -502,6 +518,7 @@ const commands = [
|
|
|
502
518
|
}, text()],
|
|
503
519
|
options: [
|
|
504
520
|
option("label", "label it", "k=v"),
|
|
521
|
+
option("text-file"),
|
|
505
522
|
option("attach"),
|
|
506
523
|
option("sync"),
|
|
507
524
|
option("no-sync"),
|
|
@@ -522,18 +539,27 @@ const commands = [
|
|
|
522
539
|
description: "a reply in a thread",
|
|
523
540
|
arguments: [id("the ID of a message in the thread"), text()],
|
|
524
541
|
options: [
|
|
542
|
+
option("label", "label it", "k=v"),
|
|
543
|
+
option("text-file"),
|
|
525
544
|
option("attach"),
|
|
526
545
|
option("idempotency-key"),
|
|
527
546
|
option("no-sync"),
|
|
528
547
|
option("after", AFTER)
|
|
529
548
|
],
|
|
530
|
-
examples: [
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
549
|
+
examples: [
|
|
550
|
+
{
|
|
551
|
+
name: "reply in a thread",
|
|
552
|
+
value: "reply 812 \"on it\""
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
name: "reply with a label",
|
|
556
|
+
value: "reply 812 \"fixed in a1b2c3\" --label step=fix"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
name: "reply only if #815 is still the thread's newest",
|
|
560
|
+
value: "reply 812 \"on it\" --after 815"
|
|
561
|
+
}
|
|
562
|
+
]
|
|
537
563
|
},
|
|
538
564
|
{
|
|
539
565
|
group: "messages",
|
|
@@ -552,6 +578,7 @@ const commands = [
|
|
|
552
578
|
option("for"),
|
|
553
579
|
option("times"),
|
|
554
580
|
option("label", "label it", "k=v"),
|
|
581
|
+
option("text-file"),
|
|
555
582
|
option("attach"),
|
|
556
583
|
option("no-sync")
|
|
557
584
|
],
|
|
@@ -603,10 +630,10 @@ const commands = [
|
|
|
603
630
|
description: "change a message's text",
|
|
604
631
|
arguments: [id(), {
|
|
605
632
|
name: "text",
|
|
606
|
-
required:
|
|
607
|
-
description: "its new text: - reads it from stdin"
|
|
633
|
+
required: false,
|
|
634
|
+
description: "its new text: - reads it from stdin, and it may be left out when you --text-file"
|
|
608
635
|
}],
|
|
609
|
-
options: [option("if-revision")],
|
|
636
|
+
options: [option("text-file"), option("if-revision")],
|
|
610
637
|
examples: [{
|
|
611
638
|
name: "fix a typo",
|
|
612
639
|
value: "edit 812 \"deploys are green again\""
|
|
@@ -793,7 +820,7 @@ const commands = [
|
|
|
793
820
|
{
|
|
794
821
|
group: "messages",
|
|
795
822
|
name: "conformance",
|
|
796
|
-
description: "check that
|
|
823
|
+
description: "check that a board you name speaks the protocol (1 if a check fails): it posts, and deletes what it posted",
|
|
797
824
|
arguments: [],
|
|
798
825
|
options: [option("channel", "the channel to check in (default: conformance)")],
|
|
799
826
|
examples: [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as BoardError } from "./errors-
|
|
2
|
-
import {
|
|
1
|
+
import { u as BoardError } from "./errors-Pk0XV1hK.mjs";
|
|
2
|
+
import { i as compileAccess } from "./access-N3XmkKXg.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);
|
|
@@ -41,9 +41,9 @@ function isRef(value, what) {
|
|
|
41
41
|
check(typeof value === "string" && value.length >= 1 && value.length <= 128, `${what} should be a string of 1 to 128 characters, got ${show(value)}`);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* The groups a board may keep none of, saying so with a 501: a board
|
|
45
|
-
*
|
|
46
|
-
*
|
|
44
|
+
* The groups a board may keep none of, saying so with a 501: a board without a scheduler answers
|
|
45
|
+
* `no_scheduler`, and without a blob store `no_files`; a backend of one's own that keeps no grants
|
|
46
|
+
* answers `no_grants`. A board that's meant to keep something and doesn't yet answers otherwise,
|
|
47
47
|
* and fails.
|
|
48
48
|
*/
|
|
49
49
|
const OPTIONAL = /* @__PURE__ */ new Set([
|
|
@@ -382,6 +382,41 @@ const CHECKS = [
|
|
|
382
382
|
})}`);
|
|
383
383
|
}
|
|
384
384
|
},
|
|
385
|
+
{
|
|
386
|
+
group: "core",
|
|
387
|
+
name: "drops a deleted message from what its labels find",
|
|
388
|
+
run: async (ctx) => {
|
|
389
|
+
const label = {
|
|
390
|
+
...ctx.labels,
|
|
391
|
+
tombstone: ctx.labels.conformance
|
|
392
|
+
};
|
|
393
|
+
const root = await ctx.board.post(ctx.channel, {
|
|
394
|
+
text: "conformance: a labeled root to delete",
|
|
395
|
+
labels: label,
|
|
396
|
+
noSync: true
|
|
397
|
+
});
|
|
398
|
+
ctx.posted.push(root.id);
|
|
399
|
+
const kept = await reply(ctx, root.id, "conformance: a reply under it");
|
|
400
|
+
const found = async () => ({
|
|
401
|
+
threads: (await ctx.board.threads({
|
|
402
|
+
channel: ctx.channel,
|
|
403
|
+
label
|
|
404
|
+
})).threads.map((t) => t.message.id),
|
|
405
|
+
messages: (await ctx.board.messages({
|
|
406
|
+
channel: ctx.channel,
|
|
407
|
+
label
|
|
408
|
+
})).messages.map((m) => m.id)
|
|
409
|
+
});
|
|
410
|
+
const before = await found();
|
|
411
|
+
check(before.threads.includes(root.id) && before.messages.includes(kept.id), `its labels should find the root and its reply before the delete, got ${show(before)}`);
|
|
412
|
+
await ctx.board.delete(root.id);
|
|
413
|
+
const { labels } = (await ctx.board.thread(root.id)).message;
|
|
414
|
+
check(Object.keys(labels).length === 0, `a deleted message should keep no labels, got ${show(labels)}`);
|
|
415
|
+
const after = await found();
|
|
416
|
+
check(!after.threads.includes(root.id), `a label read should leave out a deleted root's thread, got ${show(after.threads)}`);
|
|
417
|
+
check(!after.messages.includes(root.id) && !after.messages.includes(kept.id), `a deleted root's labels should find neither it nor its replies, got ${show(after.messages)}`);
|
|
418
|
+
}
|
|
419
|
+
},
|
|
385
420
|
{
|
|
386
421
|
group: "core",
|
|
387
422
|
name: "lists the channel and you in it",
|
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-qKmGLTAT.mjs";
|
|
2
2
|
export { conformance };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { l as isThreadTarget, s as channelOf } from "./external-
|
|
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-Pk0XV1hK.mjs";
|
|
2
|
+
import { a as ChannelPath, b as toStorable, d as MESSAGE_TEXT_MAX } from "./schemas-BG205xds.mjs";
|
|
3
|
+
import { l as isThreadTarget, s as channelOf } from "./external-CYe424fO.mjs";
|
|
4
4
|
import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { r as derivedId, t as waitUntil } from "./wait-until-Dw4XrIDQ.mjs";
|
|
5
|
+
import { i as waitUntil, o as derivedId, t as DroppedError } from "./middleware-BU7rVi9F.mjs";
|
|
7
6
|
import { n as replaceMentions } from "./mentions-CB6ShY4R.mjs";
|
|
8
|
-
import { t as DroppedError } from "./middleware-BavYSDUa.mjs";
|
|
9
7
|
import { t as afterRetry } from "./attempts-HXcskN1w.mjs";
|
|
10
|
-
import { a as immutable, d as routesFor, l as UnreadableError, n as SyncOverrides, o as ReceivedEvent, s as ResolvedTarget, u as channelMissing } from "./events-
|
|
8
|
+
import { a as immutable, d as routesFor, l as UnreadableError, n as SyncOverrides, o as ReceivedEvent, s as ResolvedTarget, u as channelMissing } from "./events-IQg0k281.mjs";
|
|
11
9
|
import { t as displayText } from "./bots-CGkO76qH.mjs";
|
|
12
10
|
//#region src/sync/engine.ts
|
|
13
11
|
/** `files`: a message with files may have no text. */
|
|
@@ -90,7 +88,7 @@ function createSyncEngine(entries) {
|
|
|
90
88
|
if (!bound) throw new Error("sync used before board() bound it");
|
|
91
89
|
return bound;
|
|
92
90
|
};
|
|
93
|
-
/** Sync's own caller: on
|
|
91
|
+
/** Sync's own caller: on a local board, `board:sync`; on http(), this deployment itself. */
|
|
94
92
|
const me = {
|
|
95
93
|
self: "sync",
|
|
96
94
|
origin: { via: { kind: "engine" } }
|