@vercel/board 0.32.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-K8dY1nBY.d.mts → auth-D6z3rMNj.d.mts} +7 -93
- package/dist/{auth-8pRZnF1M.mjs → auth-r-_PeZyw.mjs} +32 -148
- package/dist/{backend-DxE9wGKm.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 +1 -1
- package/dist/cli.mjs +6 -6
- package/dist/{commands-CpyPV_tk.d.mts → commands-BOBQHVqM.d.mts} +9 -0
- package/dist/{commands-DsnQKTdB.mjs → commands-CHoMl06v.mjs} +12 -1
- package/dist/{conformance-3RBKxwbp.mjs → conformance-qKmGLTAT.mjs} +5 -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-CcYDo9Hb.mjs → main-CQpCZJFw.mjs} +91 -23
- 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-Bplieh0C.mjs → serve-D8_W4UN6.mjs} +33 -24
- package/dist/{node-BgeGcwX0.mjs → server-BiIUXWbU.mjs} +419 -6
- package/dist/{serving-Y7s7VDjB.mjs → serving-D7rcUtSC.mjs} +1 -1
- package/dist/{sql-E1K5g_ih.mjs → sql-BQzKUqQt.mjs} +349 -114
- package/dist/sqlite-DCtZFEVm.mjs +30 -0
- package/dist/{sqlite-db-CzcD_FW8.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-CurCzwhe.mjs → targets-CknPGGVi.mjs} +40 -10
- package/dist/{tokens-C7kYyrAG.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 +15 -14
- 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 +104 -22
- 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-DiDc77Uf.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-CaN06CaD.d.mts +0 -672
- package/dist/backend-http-CoaCghuJ.mjs +0 -18
- package/dist/backend-http-l5A8UmL-.mjs +0 -585
- 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-BE65okBC.mjs +0 -86
- package/dist/backend-vercel-CVxoTNF2.mjs +0 -1744
- package/dist/backend-vercel-jg-6PAgD.d.mts +0 -674
- 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-BnUZuRm9.mjs +0 -1389
- package/dist/exports-u5mApVvn.d.mts +0 -5
- package/dist/files-SniSmeEr.mjs +0 -47
- package/dist/folds-DsWfIftc.mjs +0 -208
- package/dist/index-UXpTPWNc.d.mts +0 -11
- package/dist/index.default-Dp8gexln.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-4Vl7_uy5.mjs +0 -124
- package/dist/provider-gynDUoyW.d.mts +0 -665
- package/dist/redis-tables-BFRj_SEJ.mjs +0 -3895
- package/dist/reducer-Bswr11ar-P324o9vn.mjs +0 -74
- package/dist/reducer-CYPHsSmd-BXjGiptm.d.mts +0 -170
- package/dist/reducers-DQVSP3kk.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-DX7mM6nm-D7N_7bug.mjs +0 -3611
- package/dist/server-wIpAEjpX.mjs +0 -17
- 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,20 +1,42 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
//#region src/server/access.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* What a principal may do in a channel. `read` covers messages, threads,
|
|
5
|
+
* `/events`, and schedules; `post` starts threads and edits your own messages;
|
|
6
|
+
* `manage` is the board's own bookkeeping (inbox, sources).
|
|
7
|
+
*/
|
|
8
|
+
declare const PERMISSIONS: readonly ['read', 'post', 'react', 'label', 'sync', 'manage'];
|
|
9
|
+
type Permission = (typeof PERMISSIONS)[number];
|
|
10
|
+
/** `*`, a channel (`feedback`), or a channel and its subtree (`feedback/`). */
|
|
11
|
+
type ChannelPattern = string;
|
|
12
|
+
type Grant = 'all' | readonly Permission[];
|
|
13
|
+
/** `'all'`, a list for every channel (`['post']` is `{ '*': ['post'] }`), or a map from pattern to grant. */
|
|
14
|
+
type Can = Grant | Readonly<Record<ChannelPattern, Grant>>;
|
|
15
|
+
/** Each pattern's whole answer, implications included. */
|
|
16
|
+
type AccessSummary = Readonly<Record<ChannelPattern, readonly Permission[]>>;
|
|
17
|
+
type Access = {
|
|
18
|
+
can(permission: Permission, channel: string): boolean;
|
|
19
|
+
/** The hot path for feeds: memoized per channel. */
|
|
20
|
+
readable(channel: string): boolean;
|
|
21
|
+
/** `read` in every channel, including ones that don't exist yet. */
|
|
22
|
+
readsAll: boolean;
|
|
23
|
+
/** `permission` in every channel, including ones that don't exist yet: `everywhere('manage')` is full access. */
|
|
24
|
+
everywhere(permission: Permission): boolean;
|
|
25
|
+
/** `permission` in some channel. */
|
|
26
|
+
anywhere(permission: Permission): boolean;
|
|
27
|
+
/** Only what both this and `scope` allow, channel by channel. It never widens. */
|
|
28
|
+
narrow(scope: Can | Access): Access;
|
|
29
|
+
/** Each pattern and its permissions, `*` first and the rest sorted; an empty `*` is left out. */
|
|
30
|
+
summary(): AccessSummary;
|
|
31
|
+
};
|
|
32
|
+
/** Access from config: `'all'`, a list for every channel, or a map from pattern to grant. Throws on a bad pattern or permission. */
|
|
33
|
+
declare function compileAccess(can: Can): Access;
|
|
34
|
+
declare const FULL_ACCESS: Access;
|
|
35
|
+
/** What any of `accesses` allows, channel by channel: grants that match one principal add up. */
|
|
36
|
+
declare function union(accesses: readonly Access[]): Access;
|
|
37
|
+
//#endregion
|
|
2
38
|
//#region src/contract/schemas.d.ts
|
|
3
|
-
declare const CHANNEL_PATH_MAX = 80;
|
|
4
|
-
declare const MESSAGE_TEXT_MAX = 10000;
|
|
5
|
-
declare const ATTACHMENTS_PER_MESSAGE_MAX = 10;
|
|
6
|
-
/** `errors-www`, `www/production`: lowercase segments joined by `/`. */
|
|
7
|
-
declare const ChannelPath: z.ZodString;
|
|
8
|
-
declare const MessageText: z.ZodString;
|
|
9
|
-
/** A message is named by the log index of its `message.posted` event. */
|
|
10
|
-
declare const MessageId: z.ZodNumber;
|
|
11
|
-
declare const LabelKey: z.ZodString;
|
|
12
|
-
declare const LabelValue: z.ZodString;
|
|
13
39
|
declare const Labels: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
14
|
-
/** Normalized short names, as Chat SDK names them: `eyes`, `check`, `thumbs_up`. */
|
|
15
|
-
declare const Emoji: z.ZodString;
|
|
16
|
-
/** `vercel:user:u_abc123`, or `vercel:user:u_abc123+claude` for a profile. */
|
|
17
|
-
declare const ActorId: z.ZodString;
|
|
18
40
|
/** What an actor is: a `person`, an `agent` acting for a principal (`--as claude`), a deployment, a workflow, or a platform user (`external`). */
|
|
19
41
|
declare const ActorKind: z.ZodEnum<{
|
|
20
42
|
agent: "agent";
|
|
@@ -23,16 +45,12 @@ declare const ActorKind: z.ZodEnum<{
|
|
|
23
45
|
person: "person";
|
|
24
46
|
workflow: "workflow";
|
|
25
47
|
}>;
|
|
26
|
-
declare const Handle: z.ZodString;
|
|
27
48
|
declare const Author: z.ZodObject<{
|
|
28
49
|
actor: z.ZodString;
|
|
29
50
|
principal: z.ZodString;
|
|
30
51
|
profile: z.ZodNullable<z.ZodString>;
|
|
31
52
|
session: z.ZodNullable<z.ZodString>;
|
|
32
53
|
}, z.core.$strip>;
|
|
33
|
-
/** 128 random bits, base64url: an attachment is named by an ID nobody can guess. */
|
|
34
|
-
/** 128 random bits, base64url, as A2 makes them; or `att_` and a UUID, as Vercel's board does. */
|
|
35
|
-
declare const AttachmentId: z.ZodString;
|
|
36
54
|
/** A file on a message. The board records `type` and `size` from what it stored, never from the request. */
|
|
37
55
|
declare const Attachment: z.ZodObject<{
|
|
38
56
|
id: z.ZodString;
|
|
@@ -40,10 +58,7 @@ declare const Attachment: z.ZodObject<{
|
|
|
40
58
|
type: z.ZodString;
|
|
41
59
|
size: z.ZodNumber;
|
|
42
60
|
}, z.core.$strip>;
|
|
43
|
-
type ChannelPath = z.infer<typeof ChannelPath>;
|
|
44
|
-
type MessageId = z.infer<typeof MessageId>;
|
|
45
61
|
type Labels = z.infer<typeof Labels>;
|
|
46
|
-
type ActorId = z.infer<typeof ActorId>;
|
|
47
62
|
type ActorKind = z.infer<typeof ActorKind>;
|
|
48
63
|
type Author = z.infer<typeof Author>;
|
|
49
64
|
type Attachment = z.infer<typeof Attachment>;
|
|
@@ -264,9 +279,8 @@ declare const boardEvents: {
|
|
|
264
279
|
host: z.ZodOptional<z.ZodLiteral<true>>;
|
|
265
280
|
}, z.core.$strip>;
|
|
266
281
|
};
|
|
267
|
-
declare const BOARD_SESSION = "board";
|
|
268
282
|
type BoardEvents = typeof boardEvents;
|
|
269
|
-
/** One event of the board log, of type `K
|
|
283
|
+
/** One event of the board log, of type `K`, in the shape its log stores it. */
|
|
270
284
|
type BoardEvent<K extends keyof BoardEvents & string = keyof BoardEvents & string> = { [T in keyof BoardEvents & string]: {
|
|
271
285
|
id: string;
|
|
272
286
|
type: T;
|
|
@@ -510,18 +524,12 @@ type Message = {
|
|
|
510
524
|
/** The index of its post, or of its last edit or delete. Folds from before it existed leave it out. */
|
|
511
525
|
revision?: number;
|
|
512
526
|
};
|
|
513
|
-
type MessagesState = {
|
|
514
|
-
byId: Record<string, Message>;
|
|
515
|
-
/** Thread root → reply IDs, in log order. */
|
|
516
|
-
replies: Record<string, number[]>;
|
|
517
|
-
};
|
|
518
527
|
type Channel = {
|
|
519
528
|
path: string;
|
|
520
529
|
lastIndex: number;
|
|
521
530
|
messages: number;
|
|
522
531
|
threads: number;
|
|
523
532
|
};
|
|
524
|
-
type ChannelsState = Record<string, Channel>;
|
|
525
533
|
type Actor = {
|
|
526
534
|
id: string;
|
|
527
535
|
kind: ActorKind;
|
|
@@ -531,11 +539,6 @@ type Actor = {
|
|
|
531
539
|
/** A host's principal, or one of its profiles: once it's seen as one, it stays one. Views leave it out. */
|
|
532
540
|
host?: true;
|
|
533
541
|
};
|
|
534
|
-
type ActorsState = {
|
|
535
|
-
byId: Record<string, Actor>;
|
|
536
|
-
/** Lowercased handle → actor IDs. Handles aren't reserved, so several can share one. */
|
|
537
|
-
byHandle: Record<string, string[]>;
|
|
538
|
-
};
|
|
539
542
|
/** A copy of a board message on a platform. */
|
|
540
543
|
/** `files`: the platform's IDs for the message's files, or null when it refused them; unset until they're sent. */
|
|
541
544
|
/** `by`: the principal of the sync elsewhere that recorded it, whose copy it is to change; none for the board's own sync's. */
|
|
@@ -545,14 +548,5 @@ type ExternalCopy = {
|
|
|
545
548
|
files?: string[] | null;
|
|
546
549
|
by?: string;
|
|
547
550
|
};
|
|
548
|
-
type SyncedThread = {
|
|
549
|
-
root: number;
|
|
550
|
-
channel: string;
|
|
551
|
-
kinds?: Record<string, 'channel' | 'thread'>;
|
|
552
|
-
/** External channels (start a thread there) and threads (joined), in sync order. */
|
|
553
|
-
targets: string[];
|
|
554
|
-
/** Target → the external thread it resolved to. A thread target resolves to itself. */
|
|
555
|
-
external: Record<string, string>;
|
|
556
|
-
};
|
|
557
551
|
//#endregion
|
|
558
|
-
export {
|
|
552
|
+
export { union as S, ChannelPattern as _, ExternalAuthor as a, Permission as b, ExternalLink as c, Attachment as d, Author as f, Can as g, AccessSummary as h, Message as i, Link as l, Access as m, Channel as n, ExternalEvent as o, Labels as p, ExternalCopy as r, ExternalFile as s, Actor as t, BoardEvent as u, FULL_ACCESS as v, compileAccess as x, Grant as y };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { d as Board, f as BoardOptions } from "./backend-CWpyR1A7.mjs";
|
|
2
|
+
import "./exports-BuKjVq2t.mjs";
|
|
3
|
+
//#region src/server/index.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The handle on a board. Without a `backend`, it's Vercel's board for your team, the one `name`
|
|
6
|
+
* names, reached with the credentials the Vercel CLI or the deployment has (or `fetch`'s). With
|
|
7
|
+
* `BOARD_URL` set, it's the board at that URL instead: `vb serve`'s, say.
|
|
8
|
+
*/
|
|
9
|
+
declare function board(options?: BoardOptions): Board;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { board as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { $ as
|
|
4
|
-
import { C as Protocol, S as Method, _ as
|
|
5
|
-
import
|
|
6
|
-
import "./exports-u5mApVvn.mjs";
|
|
1
|
+
import { d as Attachment } from "./folds-DjFTiqIM.mjs";
|
|
2
|
+
import { i as Claims, r as CallerRequest } from "./auth-D6z3rMNj.mjs";
|
|
3
|
+
import { $ as EditBody, $t as SyncImportBody, At as RegisterBody, B as ScheduleTiming, Bt as SchedulesQueryInput, Ct as MessagesQueryInput, Dt as REGISTERED_WATCHERS_MAX, Et as PostInput, F as Filters, Ft as ScheduleBody, G as AckBody, Gt as SourceRead, H as WaitOptions, Ht as SourceJoin, I as PostOptions, It as ScheduleBodyOutput, J as BoardEventView, Jt as SyncCopiesQuery, K as ActorView, Kt as SourceReadQuery, L as ProfileOption, Lt as ScheduleInput, Mt as RegistrationView, N as BoardError, Nt as ResolvedSyncTarget, Ot as ReactBody, Pt as RouteName, Q as Discovery, Qt as SyncFindView, R as ReplyOptions, Rt as ScheduleView, St as MessagesQuery, Tt as PostBody, U as Written, Ut as SourceJoinBody, V as UploadInput, Vt as SchedulesQueryOutput, W as duration, Wt as SourceMessage, X as CreateChannelBody, Xt as SyncFindInput, Y as ChannelView, Yt as SyncCopiesView, Z as DeleteBody, Zt as SyncFindQuery, _n as routes, _t as MatchView, an as ThreadSummaryView, at as GrantInput, bt as MessageView, cn as ThreadsQuery, ct as InboxEntry, dn as TokenInput, dt as InboxPushBody, en as SyncImportInput, et as EventsPage, fn as TokenView, ft as InboxQuery, gn as UploadTicket, gt as LinkedQuery, hn as UploadStartBody, ht as LinkView, in as SyncedView, it as GrantBody, jt as RegisterInput, kt as Ref, ln as ThreadsQueryInput, lt as InboxItem, mn as TypingResult, mt as LabelBody, nn as SyncReceiptInput, nt as EventsQueryInput, on as ThreadView, ot as GrantView, pn as TypingBody, pt as LABEL_CONDITIONS_MAX, q as ApiError, qt as SyncBody, rn as SyncThreadView, rt as FiltersInput, sn as ThreadsPage, st as InboxAckBody, tn as SyncReceiptBody, tt as EventsQuery, un as TokenBody, ut as InboxNextQuery, vt as MatchesQuery, wt as ParsedFilters, xt as MessagesPage, yt as Me, z as ScheduleOptions, zt as SchedulesQuery } from "./provider-BlzUvcM9.mjs";
|
|
4
|
+
import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-CWpyR1A7.mjs";
|
|
5
|
+
import "./exports-BuKjVq2t.mjs";
|
|
7
6
|
//#region src/server/index.default.d.ts
|
|
8
7
|
/**
|
|
9
|
-
* The handle on a board.
|
|
10
|
-
*
|
|
8
|
+
* The handle on a board. Without a `backend`, it's Vercel's board for the team, the one `name`
|
|
9
|
+
* names: outside Node there's no environment to find credentials in, so pass a `fetch` that sends
|
|
10
|
+
* them. Or pass the backend: `board({ backend: http(url) })`, whose `fetch` sends the page's own
|
|
11
|
+
* session.
|
|
11
12
|
*/
|
|
12
13
|
export declare function board(options?: BoardOptions): Board;
|
|
13
14
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
import { f as duration, t as HttpError, u as BoardError } from "./errors-
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as createBoard } from "./exports-
|
|
4
|
-
|
|
1
|
+
import { f as duration, t as HttpError, u as BoardError } from "./errors-Pk0XV1hK.mjs";
|
|
2
|
+
import { t as DroppedError } from "./middleware-BU7rVi9F.mjs";
|
|
3
|
+
import { r as createVercel, t as createBoard } from "./exports-gHDHlg0i.mjs";
|
|
4
|
+
//#region src/backend-vercel/index.default.ts
|
|
5
|
+
/**
|
|
6
|
+
* Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
|
|
7
|
+
* the team in: pass `team`, and a `fetch` that sends a token Vercel's API takes.
|
|
8
|
+
*/
|
|
9
|
+
function vercel(options = {}) {
|
|
10
|
+
return createVercel(options, null);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
5
13
|
//#region src/server/index.default.ts
|
|
6
14
|
/**
|
|
7
|
-
* The handle on a board.
|
|
8
|
-
*
|
|
15
|
+
* The handle on a board. Without a `backend`, it's Vercel's board for the team, the one `name`
|
|
16
|
+
* names: outside Node there's no environment to find credentials in, so pass a `fetch` that sends
|
|
17
|
+
* them. Or pass the backend: `board({ backend: http(url) })`, whose `fetch` sends the page's own
|
|
18
|
+
* session.
|
|
9
19
|
*/
|
|
10
20
|
function board(options = {}) {
|
|
11
21
|
return createBoard(options, {
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
backend: (fetch) => {
|
|
23
|
+
if (!fetch) throw new Error("board: pass a fetch that sends credentials Vercel's API takes, or a backend: outside Node there's no environment to find them in");
|
|
24
|
+
return vercel({ fetch });
|
|
25
|
+
},
|
|
26
|
+
sync: () => import("./engine-JxgZiikU.mjs"),
|
|
14
27
|
serving: null
|
|
15
28
|
});
|
|
16
29
|
}
|
package/dist/index.node.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { $ as
|
|
4
|
-
import { C as Protocol, S as Method, _ as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as board } from "./index-UXpTPWNc.mjs";
|
|
1
|
+
import { d as Attachment } from "./folds-DjFTiqIM.mjs";
|
|
2
|
+
import { i as Claims, r as CallerRequest } from "./auth-D6z3rMNj.mjs";
|
|
3
|
+
import { $ as EditBody, $t as SyncImportBody, At as RegisterBody, B as ScheduleTiming, Bt as SchedulesQueryInput, Ct as MessagesQueryInput, Dt as REGISTERED_WATCHERS_MAX, Et as PostInput, F as Filters, Ft as ScheduleBody, G as AckBody, Gt as SourceRead, H as WaitOptions, Ht as SourceJoin, I as PostOptions, It as ScheduleBodyOutput, J as BoardEventView, Jt as SyncCopiesQuery, K as ActorView, Kt as SourceReadQuery, L as ProfileOption, Lt as ScheduleInput, Mt as RegistrationView, N as BoardError, Nt as ResolvedSyncTarget, Ot as ReactBody, Pt as RouteName, Q as Discovery, Qt as SyncFindView, R as ReplyOptions, Rt as ScheduleView, St as MessagesQuery, Tt as PostBody, U as Written, Ut as SourceJoinBody, V as UploadInput, Vt as SchedulesQueryOutput, W as duration, Wt as SourceMessage, X as CreateChannelBody, Xt as SyncFindInput, Y as ChannelView, Yt as SyncCopiesView, Z as DeleteBody, Zt as SyncFindQuery, _n as routes, _t as MatchView, an as ThreadSummaryView, at as GrantInput, bt as MessageView, cn as ThreadsQuery, ct as InboxEntry, dn as TokenInput, dt as InboxPushBody, en as SyncImportInput, et as EventsPage, fn as TokenView, ft as InboxQuery, gn as UploadTicket, gt as LinkedQuery, hn as UploadStartBody, ht as LinkView, in as SyncedView, it as GrantBody, jt as RegisterInput, kt as Ref, ln as ThreadsQueryInput, lt as InboxItem, mn as TypingResult, mt as LabelBody, nn as SyncReceiptInput, nt as EventsQueryInput, on as ThreadView, ot as GrantView, pn as TypingBody, pt as LABEL_CONDITIONS_MAX, q as ApiError, qt as SyncBody, rn as SyncThreadView, rt as FiltersInput, sn as ThreadsPage, st as InboxAckBody, tn as SyncReceiptBody, tt as EventsQuery, un as TokenBody, ut as InboxNextQuery, vt as MatchesQuery, wt as ParsedFilters, xt as MessagesPage, yt as Me, z as ScheduleOptions, zt as SchedulesQuery } from "./provider-BlzUvcM9.mjs";
|
|
4
|
+
import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-CWpyR1A7.mjs";
|
|
5
|
+
import { t as board } from "./index-CXvvYNYj.mjs";
|
|
7
6
|
export { type AckBody, type ActorView, type ApiError, type Attachment, type Backend, type BackendRoute, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type ChannelView, type Claims, type CreateChannelBody, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type Filters, type FiltersInput, type GrantBody, type GrantInput, type GrantView, HttpError, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SelfCaller, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncBody, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncThreadView, type SyncedView, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TokenBody, type TokenInput, type TokenView, type TypingBody, type TypingResult, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, board, duration, type routes };
|
package/dist/index.node.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as duration, t as HttpError, u as BoardError } from "./errors-
|
|
2
|
-
import { t as DroppedError } from "./middleware-
|
|
3
|
-
import { t as board } from "./server-
|
|
1
|
+
import { f as duration, t as HttpError, u as BoardError } from "./errors-Pk0XV1hK.mjs";
|
|
2
|
+
import { t as DroppedError } from "./middleware-BU7rVi9F.mjs";
|
|
3
|
+
import { t as board } from "./server-BiIUXWbU.mjs";
|
|
4
4
|
export { BoardError, DroppedError, HttpError, board, duration };
|