@vercel/board 0.28.0 → 0.29.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/{a2-B0_VlbtC.mjs → a2-HUbQJ0RD.mjs} +16 -192
- package/dist/access.d.mts +1 -1
- package/dist/access.mjs +3 -3
- package/dist/{actors-BLXVp4oZ.mjs → actors-DcJhFbwJ.mjs} +2 -2
- package/dist/{auth-lTkOgvcE.mjs → auth-JO22iIwr.mjs} +1 -1
- package/dist/{backend-ZKYTe3xa.d.mts → backend-CPC_vyOo.d.mts} +5 -5
- package/dist/backend-a2/blob-vercel.d.mts +1 -1
- package/dist/backend-a2/contract.d.mts +1 -1
- package/dist/backend-a2/contract.mjs +3 -3
- package/dist/backend-a2/store-memory.d.mts +1 -1
- package/dist/backend-a2/store-memory.mjs +2 -2
- package/dist/backend-a2/store-postgres.d.mts +1 -1
- package/dist/backend-a2/store-postgres.mjs +1 -1
- package/dist/backend-a2/store-redis-http.d.mts +1 -1
- package/dist/backend-a2/store-redis-http.mjs +1 -1
- package/dist/backend-a2/store-redis.d.mts +1 -1
- package/dist/backend-a2/store-redis.mjs +1 -1
- package/dist/backend-a2/store-sqlite.d.mts +1 -1
- package/dist/backend-a2/store-sqlite.mjs +2 -2
- package/dist/backend-a2.d.mts +8 -5
- package/dist/backend-a2.mjs +2 -1
- package/dist/{backend-http-BvNFrvcY.mjs → backend-http-Bmp0IgD3.mjs} +1 -1
- package/dist/{backend-http-E7YU0qhn.d.mts → backend-http-CqfKhrnn.d.mts} +5 -3
- package/dist/{backend-http-CfLVYqmj.mjs → backend-http-CzIJMm58.mjs} +3 -3
- package/dist/backend-http.d.mts +1 -1
- package/dist/backend-http.mjs +1 -1
- package/dist/backend-http.node.d.mts +1 -1
- package/dist/backend-http.node.mjs +1 -1
- package/dist/{backend-vercel-CIRObA0t.d.mts → backend-vercel-4tvcPKqX.d.mts} +7 -3
- package/dist/{backend-vercel-D87pIp2k.mjs → backend-vercel-BNauAs7w.mjs} +68 -10
- package/dist/{backend-vercel-DTrDiSk5.mjs → backend-vercel-DQc_TaHp.mjs} +1 -1
- package/dist/backend-vercel.d.mts +1 -1
- package/dist/backend-vercel.mjs +1 -1
- package/dist/backend-vercel.node.d.mts +1 -1
- package/dist/backend-vercel.node.mjs +1 -1
- package/dist/blob-DdbpJqN1.mjs +182 -0
- package/dist/{blob-B-9AvYis.d.mts → blob-DmiQjrYy.d.mts} +2 -2
- package/dist/{chat-provider-DsNEBQiA.d.mts → chat-provider-BWHbChcQ.d.mts} +5 -3
- package/dist/{chat-provider-DnHibqnM.mjs → chat-provider-COtsU5jB.mjs} +2 -2
- 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 +4 -4
- package/dist/{client-xLxeDz0f.d.mts → client-BqAjk0Q4.d.mts} +8 -1
- package/dist/{commands-BFookFtn.mjs → commands-C3R1AWgm.mjs} +4 -1
- package/dist/conformance.d.mts +1 -1
- package/dist/{engine-Bfe6pcXb.mjs → engine-DQxXk7dX.mjs} +20 -12
- package/dist/{errors-CB4tnZGz.d.mts → errors-DDktVeUa.d.mts} +1 -1
- package/dist/{events-CewD4kw7.mjs → events-qf5XG5VQ.mjs} +2 -2
- package/dist/{exports-CCzw2Vdw.mjs → exports-BG-0Wyn-.mjs} +9 -9
- package/dist/exports-mhAYiU4i.d.mts +5 -0
- package/dist/{external-BV_cUncs.mjs → external-D3p5T57R.mjs} +4 -2
- package/dist/{folds-Dyjput8M.mjs → folds-BDMSxBUf.mjs} +2 -2
- package/dist/{folds-jS9wlh9_.d.mts → folds-ZkHM4M-v.d.mts} +2 -0
- package/dist/{index-C05it0mC.d.mts → index-D3VvNfh_.d.mts} +2 -2
- package/dist/index.d.mts +5 -5
- package/dist/{index.default-DmKxH_E6.mjs → index.default-rB8sJ9RX.mjs} +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.node.d.mts +5 -5
- package/dist/index.node.mjs +2 -2
- package/dist/inspect/app.js +3 -3
- package/dist/inspect/engine.js +5 -5
- package/dist/{main-eci7w-aP.mjs → main-CVBqe3VO.mjs} +11 -8
- package/dist/{middleware-ChKM1zuu.mjs → middleware-CXjEeef4.mjs} +1 -1
- package/dist/{project-DMDST9kl.mjs → project-CBXlLftU.mjs} +1 -1
- package/dist/{provider-poIkXapd.mjs → provider-BaVmi4Hi.mjs} +3 -1
- package/dist/{provider-Cdg1qadh.d.mts → provider-DmSTp9lI.d.mts} +9 -2
- package/dist/{redis-tables-DN9PfIDi.mjs → redis-tables-BJQVUspu.mjs} +2 -2
- package/dist/{reducers-BcmSs4qf.mjs → reducers-DJzVpXwM.mjs} +3 -3
- package/dist/{schemas-Be08nyfW.mjs → schemas-DBmUO6pr.mjs} +2 -1
- package/dist/{serve-B09an9DQ.mjs → serve-G9RuaDSr.mjs} +4 -3
- package/dist/{server-DTX0prGr.mjs → server-BixV_byP.mjs} +4 -4
- package/dist/{serving-CvOWEym2.mjs → serving-B75Y4BF-.mjs} +1 -1
- package/dist/{sql-U9WTxrwJ.mjs → sql-D4Z_efJX.mjs} +2 -2
- package/dist/{sqlite-db-Ds4majtT.mjs → sqlite-db-Bz2JkfCU.mjs} +1 -1
- package/dist/sync-github.d.mts +4 -2
- package/dist/sync-github.mjs +4 -14
- package/dist/sync-kapso.d.mts +3 -2
- package/dist/sync-kapso.mjs +3 -3
- package/dist/sync-linear.d.mts +12 -2
- package/dist/sync-linear.mjs +189 -9
- package/dist/sync-slack.d.mts +41 -5
- package/dist/sync-slack.mjs +70 -11
- package/dist/sync.chat.d.mts +1 -1
- package/dist/sync.chat.mjs +1 -1
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +3 -3
- package/dist/tags-BpFo6q0_.mjs +14 -0
- package/dist/{targets-C-wdR5wP.mjs → targets-Cgjs29T0.mjs} +1 -1
- package/dist/{tokens-BuCU-61R.mjs → tokens-CC3izSNr.mjs} +1 -1
- package/dist/{types-aCAf6lGU.d.mts → types-No0WdhE5.d.mts} +1 -1
- package/dist/{watchers-hash-7DJU9b-n.mjs → watchers-hash-BDhLVkV5.mjs} +7 -5
- package/docs/02-sync/03-slack.md +6 -2
- package/docs/02-sync/07-linear.md +28 -6
- package/docs/04-reference/01-cli.md +4 -2
- package/package.json +1 -1
- package/dist/exports-D22M68rk.d.mts +0 -5
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as RemoteWatcherId, b as actorKind,
|
|
3
|
-
import "./external-
|
|
4
|
-
import { a as METHODS, d as VERSION, f as SYNC, n as compileWatcher, r as hasCriteria, t as canonicalWatchers } from "./watchers-hash-
|
|
1
|
+
import { r as IMPORT_BYTES_MAX, t as ATTACHMENT_BYTES_MAX } from "./files-SniSmeEr.mjs";
|
|
2
|
+
import { _ as RemoteWatcherId, b as actorKind, x as platformAvatar } from "./schemas-DBmUO6pr.mjs";
|
|
3
|
+
import "./external-D3p5T57R.mjs";
|
|
4
|
+
import { a as METHODS, d as VERSION, f as SYNC, n as compileWatcher, r as hasCriteria, t as canonicalWatchers } from "./watchers-hash-BDhLVkV5.mjs";
|
|
5
5
|
import { r as duration, t as BoardError } from "./client-D0Px7KzF.mjs";
|
|
6
6
|
import { i as isKeyIdOf, r as derivedId, t as waitUntil } from "./wait-until-Dw4XrIDQ.mjs";
|
|
7
7
|
import { a as forbidden, c as toErrorResponse, i as duplicateId, r as badRequest, s as notFound, t as HttpError } from "./errors-CusN4x2l.mjs";
|
|
8
8
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
9
9
|
import { n as replaceMentions } from "./mentions-CB6ShY4R.mjs";
|
|
10
|
-
import { _ as FULL_ACCESS, i as authenticates, v as authorize } from "./auth-
|
|
11
|
-
import { a as resolveMentions, n as actorSeen } from "./actors-
|
|
12
|
-
import { n as MIDDLEWARE_ACTOR, t as DroppedError } from "./middleware-
|
|
13
|
-
import { n as syncTarget, r as withEmailMentions } from "./targets-
|
|
10
|
+
import { _ as FULL_ACCESS, i as authenticates, v as authorize } from "./auth-JO22iIwr.mjs";
|
|
11
|
+
import { a as resolveMentions, n as actorSeen } from "./actors-DcJhFbwJ.mjs";
|
|
12
|
+
import { n as MIDDLEWARE_ACTOR, t as DroppedError } from "./middleware-CXjEeef4.mjs";
|
|
13
|
+
import { n as syncTarget, r as withEmailMentions } from "./targets-Cgjs29T0.mjs";
|
|
14
14
|
import { t as A2Error } from "./session-clear-wHd5GCpZ-BnKSxReK.mjs";
|
|
15
15
|
import { a as reducer } from "./reducer-CjmvZSAb-D_OSISmj.mjs";
|
|
16
|
-
import { _ as BOARD_SESSION, a as IDENTITY_SESSION, c as SCHEDULES_SESSION, d as inboxContract, f as inboxSession, g as watchSession, h as watchContract, l as boardContract, m as schedulesContract, n as channelsReducer, o as INBOXES_SESSION, p as registryContract, r as identityCodesReducer, s as REGISTRY_SESSION, t as actorsReducer, u as identityContract } from "./reducers-
|
|
16
|
+
import { _ as BOARD_SESSION, a as IDENTITY_SESSION, c as SCHEDULES_SESSION, d as inboxContract, f as inboxSession, g as watchSession, h as watchContract, l as boardContract, m as schedulesContract, n as channelsReducer, o as INBOXES_SESSION, p as registryContract, r as identityCodesReducer, s as REGISTRY_SESSION, t as actorsReducer, u as identityContract } from "./reducers-DJzVpXwM.mjs";
|
|
17
17
|
import { n as createServer, t as consumer } from "./server-DtFrWxi3-Boa6gdWO.mjs";
|
|
18
|
-
import { a as linkedTo, i as iso, n as foldMessages, o as personOf, t as foldActors } from "./folds-
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
18
|
+
import { a as linkedTo, i as iso, n as foldMessages, o as personOf, t as foldActors } from "./folds-BDMSxBUf.mjs";
|
|
19
|
+
import { c as readUpload, i as finishUpload, l as startUpload, n as attachmentNotFound, t as attachmentBody, u as writeUpload } from "./blob-DdbpJqN1.mjs";
|
|
20
|
+
import { t as concernedMessageId } from "./project-CBXlLftU.mjs";
|
|
21
|
+
import { t as TABLES_CONSUMER } from "./sql-D4Z_efJX.mjs";
|
|
21
22
|
import { t as afterRetry } from "./attempts-HXcskN1w.mjs";
|
|
22
23
|
import { createHash, randomBytes } from "node:crypto";
|
|
23
|
-
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
24
|
-
import { dirname, join } from "node:path";
|
|
25
24
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
26
25
|
import { lookup } from "node:dns";
|
|
27
26
|
import { request } from "node:https";
|
|
@@ -36,181 +35,6 @@ async function idempotentId(...parts) {
|
|
|
36
35
|
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20, 32)}`;
|
|
37
36
|
}
|
|
38
37
|
//#endregion
|
|
39
|
-
//#region src/server/blob.ts
|
|
40
|
-
/** Files in memory, for tests: forgets everything when the process ends. */
|
|
41
|
-
function memoryBlob() {
|
|
42
|
-
const files = /* @__PURE__ */ new Map();
|
|
43
|
-
return {
|
|
44
|
-
put: async (key, data, contentType) => void files.set(key, {
|
|
45
|
-
data: data.slice(),
|
|
46
|
-
contentType
|
|
47
|
-
}),
|
|
48
|
-
get: async (key) => files.get(key) ?? null
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
/** Files on disk, for development and `vb serve`: under `dir`, `.a2/attachments` by default. */
|
|
52
|
-
function fsBlob(dir = ".a2/attachments") {
|
|
53
|
-
const path = (key) => join(dir, ...key.split("/"));
|
|
54
|
-
return {
|
|
55
|
-
async put(key, data, contentType) {
|
|
56
|
-
await mkdir(dirname(path(key)), { recursive: true });
|
|
57
|
-
await writeFile(path(key), data);
|
|
58
|
-
await writeFile(`${path(key)}.type`, contentType);
|
|
59
|
-
},
|
|
60
|
-
async get(key) {
|
|
61
|
-
try {
|
|
62
|
-
const [data, contentType] = await Promise.all([readFile(path(key)), readFile(`${path(key)}.type`, "utf8")]);
|
|
63
|
-
return {
|
|
64
|
-
data: new Uint8Array(data),
|
|
65
|
-
contentType
|
|
66
|
-
};
|
|
67
|
-
} catch {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
const dataKey = (id) => `board/attachments/${id}`;
|
|
74
|
-
/** A direct upload the board signed, until it's finished: what it's called, and who may finish it. */
|
|
75
|
-
const ticketKey = (id) => `board/uploads/${id}.json`;
|
|
76
|
-
const metaKey = (id) => `board/attachments/${id}.json`;
|
|
77
|
-
/** `shot.png`, as the board stores a name: no paths, no control characters. */
|
|
78
|
-
function fileName(name) {
|
|
79
|
-
return (name ?? "").split(/[\\/]/).pop().replace(/[\u0000-\u001f\u007f]/g, "").trim().slice(0, 255) || "file";
|
|
80
|
-
}
|
|
81
|
-
/** `image/png`, or `application/octet-stream` when the type isn't one. */
|
|
82
|
-
function mediaType(type) {
|
|
83
|
-
const value = (type ?? "").split(";")[0].trim().toLowerCase();
|
|
84
|
-
return /^[a-z0-9][a-z0-9!#$&^_.+-]*\/[a-z0-9][a-z0-9!#$&^_.+-]*$/.test(value) && value.length <= 255 ? value : "application/octet-stream";
|
|
85
|
-
}
|
|
86
|
-
/** A board without a blob store keeps no files: every file route says so. */
|
|
87
|
-
const noBlob = () => new HttpError(501, "no_files", "this board keeps no files: pass `blob` to `a2()`");
|
|
88
|
-
/** 128 random bits, base64url, drawn again when they'd start with `-`, which a command line reads as a flag. */
|
|
89
|
-
function attachmentId() {
|
|
90
|
-
for (;;) {
|
|
91
|
-
const id = randomBytes(16).toString("base64url");
|
|
92
|
-
if (!id.startsWith("-")) return id;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Stores an upload under a fresh ID, with its metadata beside it. `uploadedBy`
|
|
97
|
-
* is the principal that sent it, who can read it before any message carries it.
|
|
98
|
-
* `max` is the most it can be: `ATTACHMENT_BYTES_MAX` unless the board's own sync imports it.
|
|
99
|
-
*/
|
|
100
|
-
async function writeUpload(blob, input, max = ATTACHMENT_BYTES_MAX) {
|
|
101
|
-
if (!blob) throw noBlob();
|
|
102
|
-
if (input.data.byteLength === 0) throw badRequest("the file is empty");
|
|
103
|
-
if (input.data.byteLength > max) throw new HttpError(413, "too_large", `attachments are at most ${max / 1024 / 1024} MB`);
|
|
104
|
-
const attachment = {
|
|
105
|
-
id: attachmentId(),
|
|
106
|
-
name: fileName(input.name),
|
|
107
|
-
type: mediaType(input.type),
|
|
108
|
-
size: input.data.byteLength
|
|
109
|
-
};
|
|
110
|
-
await blob.put(dataKey(attachment.id), input.data, attachment.type);
|
|
111
|
-
const meta = input.uploadedBy === void 0 ? attachment : {
|
|
112
|
-
...attachment,
|
|
113
|
-
uploadedBy: input.uploadedBy
|
|
114
|
-
};
|
|
115
|
-
await blob.put(metaKey(attachment.id), new TextEncoder().encode(JSON.stringify(meta)), "application/json");
|
|
116
|
-
return attachment;
|
|
117
|
-
}
|
|
118
|
-
async function bytes(data) {
|
|
119
|
-
return data instanceof Uint8Array ? data : new Uint8Array(await new Response(data).arrayBuffer());
|
|
120
|
-
}
|
|
121
|
-
const attachmentNotFound = (id) => notFound(`no attachment: ${id}`, "attachment_not_found");
|
|
122
|
-
/**
|
|
123
|
-
* An upload's metadata, as the board recorded it, never what a request says,
|
|
124
|
-
* and who uploaded it: null for files the board imported itself, or stored
|
|
125
|
-
* before it recorded that.
|
|
126
|
-
*/
|
|
127
|
-
async function readUpload(blob, id) {
|
|
128
|
-
if (!blob) throw noBlob();
|
|
129
|
-
const found = Attachment.shape.id.safeParse(id).success ? await blob.get(metaKey(id)) : null;
|
|
130
|
-
if (!found) throw attachmentNotFound(id);
|
|
131
|
-
const meta = JSON.parse(new TextDecoder().decode(await bytes(found.data)));
|
|
132
|
-
return {
|
|
133
|
-
attachment: Attachment.parse(meta),
|
|
134
|
-
uploadedBy: typeof meta.uploadedBy === "string" ? meta.uploadedBy : null
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
/** An attachment's bytes as the store keeps them, a stream or the bytes, for board() to serve. */
|
|
138
|
-
async function attachmentBody(blob, id) {
|
|
139
|
-
if (!blob) throw noBlob();
|
|
140
|
-
const found = await blob.get(dataKey(id));
|
|
141
|
-
if (!found) throw attachmentNotFound(id);
|
|
142
|
-
return found.data;
|
|
143
|
-
}
|
|
144
|
-
/** How long a direct upload's URL takes bytes: long enough for 100 MB on a slow link. */
|
|
145
|
-
const DIRECT_UPLOAD_TTL_MS = 18e5;
|
|
146
|
-
const noDirectUploads = () => new HttpError(501, "no_direct_uploads", `this board's blob store can't take direct uploads, so files are at most ${ATTACHMENT_BYTES_MAX / 1024 / 1024} MB`);
|
|
147
|
-
/**
|
|
148
|
-
* Starts a direct upload: a fresh ID, and a URL in the store to `PUT` its bytes to. The board
|
|
149
|
-
* keeps what the request said the file is until `finishUpload` checks the store has it.
|
|
150
|
-
*/
|
|
151
|
-
async function startUpload(blob, input) {
|
|
152
|
-
if (!blob) throw noBlob();
|
|
153
|
-
if (!blob.uploadUrl || !blob.head) throw noDirectUploads();
|
|
154
|
-
if (input.size > 104857600) throw new HttpError(413, "too_large", `direct uploads are at most ${DIRECT_UPLOAD_BYTES_MAX / 1024 / 1024} MB`);
|
|
155
|
-
const expires = new Date(Date.now() + DIRECT_UPLOAD_TTL_MS);
|
|
156
|
-
const ticket = {
|
|
157
|
-
id: attachmentId(),
|
|
158
|
-
name: fileName(input.name),
|
|
159
|
-
type: mediaType(input.type),
|
|
160
|
-
size: input.size,
|
|
161
|
-
uploadedBy: input.uploadedBy,
|
|
162
|
-
expiresAt: expires.toISOString()
|
|
163
|
-
};
|
|
164
|
-
await blob.put(ticketKey(ticket.id), new TextEncoder().encode(JSON.stringify(ticket)), "application/json");
|
|
165
|
-
const { url, headers } = await blob.uploadUrl(dataKey(ticket.id), {
|
|
166
|
-
contentType: ticket.type,
|
|
167
|
-
maxBytes: ticket.size,
|
|
168
|
-
expiresAt: expires
|
|
169
|
-
});
|
|
170
|
-
return {
|
|
171
|
-
id: ticket.id,
|
|
172
|
-
url,
|
|
173
|
-
headers: {
|
|
174
|
-
...headers,
|
|
175
|
-
"content-type": ticket.type
|
|
176
|
-
},
|
|
177
|
-
expiresAt: ticket.expiresAt
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Finishes a direct upload: once the store has exactly the bytes its start said, the board records
|
|
182
|
-
* the attachment, as `writeUpload` does. Only its uploader may finish it; a second finish answers
|
|
183
|
-
* the same attachment. It never reads the record before writing it: a store with a cache (Vercel
|
|
184
|
-
* Blob's CDN) would keep that miss, and the post that names the file would find nothing.
|
|
185
|
-
*/
|
|
186
|
-
async function finishUpload(blob, id, principal) {
|
|
187
|
-
if (!blob) throw noBlob();
|
|
188
|
-
const found = Attachment.shape.id.safeParse(id).success ? await blob.get(ticketKey(id)) : null;
|
|
189
|
-
const ticket = found ? JSON.parse(new TextDecoder().decode(await bytes(found.data))) : null;
|
|
190
|
-
if (!ticket || ticket.uploadedBy !== principal) throw notFound(`no upload: ${id}`, "upload_not_found");
|
|
191
|
-
if (!blob.head) throw noDirectUploads();
|
|
192
|
-
const stored = await blob.head(dataKey(id));
|
|
193
|
-
if (!stored) throw new HttpError(409, "not_uploaded", `nothing's been uploaded for ${id} yet: PUT the file to its URL first`);
|
|
194
|
-
if (stored.size !== ticket.size) throw badRequest(`the store has ${stored.size} bytes for ${id}, but its upload said ${ticket.size}`, "size_mismatch");
|
|
195
|
-
const attachment = {
|
|
196
|
-
id,
|
|
197
|
-
name: ticket.name,
|
|
198
|
-
type: ticket.type,
|
|
199
|
-
size: stored.size
|
|
200
|
-
};
|
|
201
|
-
try {
|
|
202
|
-
await blob.put(metaKey(id), new TextEncoder().encode(JSON.stringify({
|
|
203
|
-
...attachment,
|
|
204
|
-
uploadedBy: principal
|
|
205
|
-
})), "application/json");
|
|
206
|
-
} catch (error) {
|
|
207
|
-
const done = await blob.get(metaKey(id)).catch(() => null);
|
|
208
|
-
if (!done) throw error;
|
|
209
|
-
return Attachment.parse(JSON.parse(new TextDecoder().decode(await bytes(done.data))));
|
|
210
|
-
}
|
|
211
|
-
return attachment;
|
|
212
|
-
}
|
|
213
|
-
//#endregion
|
|
214
38
|
//#region src/server/feed.ts
|
|
215
39
|
/** Bookkeeping events, shown only with `all`: who's who, and delivery receipts. */
|
|
216
40
|
const HIDDEN = /* @__PURE__ */ new Set([
|
|
@@ -3264,11 +3088,11 @@ function build(options, binding) {
|
|
|
3264
3088
|
const { message, replies } = await methods.message(caller, { id }, signal);
|
|
3265
3089
|
return { targets: await binding.typing([message, ...replies], status) };
|
|
3266
3090
|
},
|
|
3267
|
-
async readSource(caller, { key, target, limit }) {
|
|
3091
|
+
async readSource(caller, { key, target, limit, after }) {
|
|
3268
3092
|
if (!binding.sync.some((entry) => entry.key === key)) throw notFound(`this board doesn't run sync entry ${key}: read it where its sync runs`, "not_synced_here");
|
|
3269
3093
|
const { principal } = await identityOf(caller);
|
|
3270
3094
|
if (!principal.access.everywhere("manage")) throw forbidden("this token can't read a source: it needs manage in every channel");
|
|
3271
|
-
return binding.readSource(key, target, limit ?? 50);
|
|
3095
|
+
return binding.readSource(key, target, limit ?? 50, after ?? null);
|
|
3272
3096
|
},
|
|
3273
3097
|
async joinSource(caller, { key, target }) {
|
|
3274
3098
|
if (!binding.sync.some((entry) => entry.key === key)) throw notFound(`this board doesn't run sync entry ${key}: join it where its sync runs`, "not_synced_here");
|
|
@@ -4085,4 +3909,4 @@ function a2(options = {}) {
|
|
|
4085
3909
|
return backend;
|
|
4086
3910
|
}
|
|
4087
3911
|
//#endregion
|
|
4088
|
-
export {
|
|
3912
|
+
export { a2 as t };
|
package/dist/access.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as Grant, i as ChannelPattern, n as AccessSummary, o as Permission, r as Can, t as Access } from "./access-CV96SYgr.mjs";
|
|
2
2
|
import { _ as oidc, a as CallerRequest, c as HostPrincipal, d as OidcTokensOptions, f as Principal, g as githubActions, h as compileRules, i as AuthenticateContext, l as IssuerConfig, m as RuleFunction, n as AccessRule, o as Claims, p as PrincipalKind, r as Authenticate, t as AccessFunction, u as Known, v as vercelProject } from "./auth-CU56Q2Xh.mjs";
|
|
3
|
-
import { C as Author, t as Actor } from "./folds-
|
|
3
|
+
import { C as Author, t as Actor } from "./folds-ZkHM4M-v.mjs";
|
|
4
4
|
//#region src/server/tokens.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* The OIDC tokens made out to this board: a request's bearer token, from Vercel (people and
|
package/dist/access.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as compileRules, c as githubActions, h as vercelProject, p as oidc } from "./auth-
|
|
2
|
-
import { i as resolveActor } from "./actors-
|
|
3
|
-
import { t as oidcTokens } from "./tokens-
|
|
1
|
+
import { a as compileRules, c as githubActions, h as vercelProject, p as oidc } from "./auth-JO22iIwr.mjs";
|
|
2
|
+
import { i as resolveActor } from "./actors-DcJhFbwJ.mjs";
|
|
3
|
+
import { t as oidcTokens } from "./tokens-CC3izSNr.mjs";
|
|
4
4
|
export { compileRules, githubActions, oidc, oidcTokens, resolveActor, vercelProject };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as toStorable } from "./schemas-
|
|
1
|
+
import { C as toStorable } from "./schemas-DBmUO6pr.mjs";
|
|
2
2
|
import { r as badRequest } from "./errors-CusN4x2l.mjs";
|
|
3
3
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
4
4
|
import { t as extractMentions } from "./mentions-CB6ShY4R.mjs";
|
|
5
|
-
import { y as parseScope } from "./auth-
|
|
5
|
+
import { y as parseScope } from "./auth-JO22iIwr.mjs";
|
|
6
6
|
//#region src/server/actors.ts
|
|
7
7
|
/** Agents whose avatars the board serves itself. */
|
|
8
8
|
const KNOWN_AGENTS = [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as Access } from "./access-CV96SYgr.mjs";
|
|
2
2
|
import { m as RuleFunction, n as AccessRule, r as Authenticate, s as Granted, t as AccessFunction, u as Known } from "./auth-CU56Q2Xh.mjs";
|
|
3
|
-
import { A as Labels, C as Author, t as Actor, u as ExternalEvent, x as Attachment } from "./folds-
|
|
4
|
-
import { A as InboxItem, At as SyncRootsQuery, B as Me, C as EventsQuery, D as IdentityView, Et as SyncImportBody, Ft as ThreadView, H as MessagesPage, Ht as UploadTicket, I as LinkedAccount, It as ThreadsPage, K as PersonView, L as LinkedQuery, Lt as ThreadsQuery, M as InboxPushBody, Mt as SyncUnlinkBody, N as InboxQuery, Nt as SyncedView, O as InboxAckBody, Ot as SyncReceiptBody, P as LabelBody, Q as RegisterBody, R as MatchView, S as EventsPage, St as SyncCopiesView, Tt as SyncFindView, U as MessagesQuery, V as MessageView, Vt as UploadStartBody, X as ReactBody, _ as BoardEventView, b as Discovery, bt as SyncCodeView, dt as SourceJoin, et as RegistrationView, ft as SourceJoinBody, gt as SyncAccountBody, ht as SourceReadQuery, j as InboxNextQuery, jt as SyncThreadView, k as InboxEntry, m as AckBody, mt as SourceRead, o as ProfileOption, ot as ScheduleView, q as PostBody, rt as ScheduleBody, st as SchedulesQuery, t as BoardClient, v as ChannelView, wt as SyncFindQuery, x as EditBody, xt as SyncCopiesQuery, yt as SyncCodeBody, z as MatchesQuery, zt as TypingBody } from "./client-
|
|
5
|
-
import { t as HttpError } from "./errors-
|
|
6
|
-
import { p as SyncProvider } from "./provider-
|
|
3
|
+
import { A as Labels, C as Author, t as Actor, u as ExternalEvent, x as Attachment } from "./folds-ZkHM4M-v.mjs";
|
|
4
|
+
import { A as InboxItem, At as SyncRootsQuery, B as Me, C as EventsQuery, D as IdentityView, Et as SyncImportBody, Ft as ThreadView, H as MessagesPage, Ht as UploadTicket, I as LinkedAccount, It as ThreadsPage, K as PersonView, L as LinkedQuery, Lt as ThreadsQuery, M as InboxPushBody, Mt as SyncUnlinkBody, N as InboxQuery, Nt as SyncedView, O as InboxAckBody, Ot as SyncReceiptBody, P as LabelBody, Q as RegisterBody, R as MatchView, S as EventsPage, St as SyncCopiesView, Tt as SyncFindView, U as MessagesQuery, V as MessageView, Vt as UploadStartBody, X as ReactBody, _ as BoardEventView, b as Discovery, bt as SyncCodeView, dt as SourceJoin, et as RegistrationView, ft as SourceJoinBody, gt as SyncAccountBody, ht as SourceReadQuery, j as InboxNextQuery, jt as SyncThreadView, k as InboxEntry, m as AckBody, mt as SourceRead, o as ProfileOption, ot as ScheduleView, q as PostBody, rt as ScheduleBody, st as SchedulesQuery, t as BoardClient, v as ChannelView, wt as SyncFindQuery, x as EditBody, xt as SyncCopiesQuery, yt as SyncCodeBody, z as MatchesQuery, zt as TypingBody } from "./client-BqAjk0Q4.mjs";
|
|
5
|
+
import { t as HttpError } from "./errors-DDktVeUa.mjs";
|
|
6
|
+
import { p as SyncProvider } from "./provider-DmSTp9lI.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region src/api/protocol.d.ts
|
|
9
9
|
type Input<S extends z.ZodType> = NonNullable<z.output<S>>;
|
|
@@ -616,7 +616,7 @@ type BoardBinding = {
|
|
|
616
616
|
* Reads a platform channel or thread with sync entry `key`'s app, which only board() has: what
|
|
617
617
|
* `readSource` answers. 404 `not_synced_here` for an entry it doesn't run.
|
|
618
618
|
*/
|
|
619
|
-
readSource(key: string, target: string, limit: number): Promise<SourceRead>;
|
|
619
|
+
readSource(key: string, target: string, limit: number, after: string | null): Promise<SourceRead>;
|
|
620
620
|
/** Adds sync entry `key`'s app to a channel, where it opted in: what `joinSource` answers. 404 `not_synced_here` likewise. */
|
|
621
621
|
joinSource(key: string, target: string): Promise<SourceJoin>;
|
|
622
622
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Labels, C as Author, D as Handle, E as Emoji, M as MessageId, N as MessageText, O as LabelKey, S as AttachmentId, T as ChannelPath, _ as BoardEvents, b as ActorKind, g as BoardEvent, h as BOARD_SESSION, i as ChannelsState, j as MESSAGE_TEXT_MAX, k as LabelValue, l as ExternalAuthor, m as Origin, n as ActorsState, o as Message, r as Channel, s as MessagesState, t as Actor, v as ATTACHMENTS_PER_MESSAGE_MAX, w as CHANNEL_PATH_MAX, x as Attachment, y as ActorId } from "../folds-
|
|
1
|
+
import { A as Labels, C as Author, D as Handle, E as Emoji, M as MessageId, N as MessageText, O as LabelKey, S as AttachmentId, T as ChannelPath, _ as BoardEvents, b as ActorKind, g as BoardEvent, h as BOARD_SESSION, i as ChannelsState, j as MESSAGE_TEXT_MAX, k as LabelValue, l as ExternalAuthor, m as Origin, n as ActorsState, o as Message, r as Channel, s as MessagesState, t as Actor, v as ATTACHMENTS_PER_MESSAGE_MAX, w as CHANNEL_PATH_MAX, x as Attachment, y as ActorId } from "../folds-ZkHM4M-v.mjs";
|
|
2
2
|
import { l as Reducer, n as Contract } from "../reducer-CYPHsSmd-BQIfozGi.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/contract/files.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as DIRECT_UPLOAD_BYTES_MAX, r as IMPORT_BYTES_MAX, t as ATTACHMENT_BYTES_MAX } from "../files-SniSmeEr.mjs";
|
|
2
|
-
import { a as AttachmentId, c as ChannelPath, d as LabelKey, f as LabelValue, g as MessageText, h as MessageId, i as Attachment, l as Emoji, m as MESSAGE_TEXT_MAX, n as ActorId, o as Author, p as Labels, r as ActorKind, s as CHANNEL_PATH_MAX, t as ATTACHMENTS_PER_MESSAGE_MAX, u as Handle } from "../schemas-
|
|
3
|
-
import { o as Origin } from "../external-
|
|
4
|
-
import { _ as BOARD_SESSION, i as messagesReducer, l as boardContract, n as channelsReducer, t as actorsReducer } from "../reducers-
|
|
2
|
+
import { a as AttachmentId, c as ChannelPath, d as LabelKey, f as LabelValue, g as MessageText, h as MessageId, i as Attachment, l as Emoji, m as MESSAGE_TEXT_MAX, n as ActorId, o as Author, p as Labels, r as ActorKind, s as CHANNEL_PATH_MAX, t as ATTACHMENTS_PER_MESSAGE_MAX, u as Handle } from "../schemas-DBmUO6pr.mjs";
|
|
3
|
+
import { o as Origin } from "../external-D3p5T57R.mjs";
|
|
4
|
+
import { _ as BOARD_SESSION, i as messagesReducer, l as boardContract, n as channelsReducer, t as actorsReducer } from "../reducers-DJzVpXwM.mjs";
|
|
5
5
|
export { ATTACHMENTS_PER_MESSAGE_MAX, ATTACHMENT_BYTES_MAX, ActorId, ActorKind, Attachment, AttachmentId, Author, BOARD_SESSION, CHANNEL_PATH_MAX, ChannelPath, DIRECT_UPLOAD_BYTES_MAX, Emoji, Handle, IMPORT_BYTES_MAX, LabelKey, LabelValue, Labels, MESSAGE_TEXT_MAX, MessageId, MessageText, Origin, actorsReducer, boardContract, channelsReducer, messagesReducer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as Clock } from "../store-D0MhBvg6-4Z2L0Kqd.mjs";
|
|
2
|
-
import { t as BoardStore } from "../types-
|
|
2
|
+
import { t as BoardStore } from "../types-No0WdhE5.mjs";
|
|
3
3
|
//#region src/store/memory.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A board that lives in memory, for tests: its log in A2's memory store, its
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as sqlTables } from "../sql-
|
|
2
|
-
import { t as sqliteDb } from "../sqlite-db-
|
|
1
|
+
import { r as sqlTables } from "../sql-D4Z_efJX.mjs";
|
|
2
|
+
import { t as sqliteDb } from "../sqlite-db-Bz2JkfCU.mjs";
|
|
3
3
|
import { t as memory$1 } from "../store-memory-Bas9Uq5C.mjs";
|
|
4
4
|
//#region src/store/memory.ts
|
|
5
5
|
/**
|
|
@@ -3,7 +3,7 @@ import { m as nullProtoRecord, n as NOTIFY_TIMINGS } from "../internal-CvsrprnU-
|
|
|
3
3
|
import { n as defaultSleep, r as pollingStream } from "../store-polling-BZt2Rf3D-BiEM6_HB.mjs";
|
|
4
4
|
import { r as platformWaitUntil } from "../platform-B4TnJtWu-CwcTyKg2.mjs";
|
|
5
5
|
import { t as retryableLazy } from "../retryable-lazy-DZWmHpii-Bye-W8q7.mjs";
|
|
6
|
-
import { r as sqlTables } from "../sql-
|
|
6
|
+
import { r as sqlTables } from "../sql-D4Z_efJX.mjs";
|
|
7
7
|
import { a as idleLogCursor, i as idempotentReplay, n as decodeCause, r as decodeReturnedEventIds, t as cursorKeyOf } from "../store-codec-DwrWlgQx-CYxGW0aD.mjs";
|
|
8
8
|
import { n as SYSTEM_CLOCK, t as RANDOM_IDS } from "../store-N8PXxDAS-BWBgzBHp.mjs";
|
|
9
9
|
import { t as pollPresence } from "../store-presence-polling-JuAy2Ck2-CYpuK75X.mjs";
|
|
@@ -2,7 +2,7 @@ import { t as A2Error } from "../session-clear-wHd5GCpZ-BnKSxReK.mjs";
|
|
|
2
2
|
import { n as NOTIFY_TIMINGS } from "../internal-CvsrprnU-CRY89I-b.mjs";
|
|
3
3
|
import { n as defaultSleep } from "../store-polling-BZt2Rf3D-BiEM6_HB.mjs";
|
|
4
4
|
import { n as SYSTEM_CLOCK, t as RANDOM_IDS } from "../store-N8PXxDAS-BWBgzBHp.mjs";
|
|
5
|
-
import { n as createRedisNotifyStore, t as redisTables } from "../redis-tables-
|
|
5
|
+
import { n as createRedisNotifyStore, t as redisTables } from "../redis-tables-BJQVUspu.mjs";
|
|
6
6
|
//#region ../../node_modules/.pnpm/experimental-a2@0.22.0_@upstash+qstash@2.12.0_@vercel+queue@0.7.0_ai@7.0.130_zod@4.6.5__52060f00b21aecfab049c27fa3abd2f9/node_modules/experimental-a2/dist/store-redis-http.js
|
|
7
7
|
function redisHttpSubscriptions({ url, token, onReconnect, fallback }) {
|
|
8
8
|
const subscriptions = /* @__PURE__ */ new Map();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BoardStore } from "../types-
|
|
1
|
+
import { t as BoardStore } from "../types-No0WdhE5.mjs";
|
|
2
2
|
//#region ../../node_modules/.pnpm/experimental-a2@0.22.0_@upstash+qstash@2.12.0_@vercel+queue@0.7.0_ai@7.0.130_zod@4.6.5__52060f00b21aecfab049c27fa3abd2f9/node_modules/experimental-a2/dist/store-redis.d.ts
|
|
3
3
|
//#region src/store-redis-notify.d.ts
|
|
4
4
|
type RedisConnection = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as A2Error } from "../session-clear-wHd5GCpZ-BnKSxReK.mjs";
|
|
2
2
|
import { t as retryableLazy } from "../retryable-lazy-DZWmHpii-Bye-W8q7.mjs";
|
|
3
3
|
import { n as SYSTEM_CLOCK, t as RANDOM_IDS } from "../store-N8PXxDAS-BWBgzBHp.mjs";
|
|
4
|
-
import { n as createRedisNotifyStore, t as redisTables } from "../redis-tables-
|
|
4
|
+
import { n as createRedisNotifyStore, t as redisTables } from "../redis-tables-BJQVUspu.mjs";
|
|
5
5
|
//#region ../../node_modules/.pnpm/experimental-a2@0.22.0_@upstash+qstash@2.12.0_@vercel+queue@0.7.0_ai@7.0.130_zod@4.6.5__52060f00b21aecfab049c27fa3abd2f9/node_modules/experimental-a2/dist/store-redis.js
|
|
6
6
|
/**
|
|
7
7
|
* experimental-a2/store-redis — the Redis-protocol store backend, on Redis
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as sqlTables } from "../sql-
|
|
1
|
+
import { r as sqlTables } from "../sql-D4Z_efJX.mjs";
|
|
2
2
|
import { t as sqlite$1 } from "../store-sqlite-CxxPCcCT.mjs";
|
|
3
|
-
import { t as sqliteDb } from "../sqlite-db-
|
|
3
|
+
import { t as sqliteDb } from "../sqlite-db-Bz2JkfCU.mjs";
|
|
4
4
|
//#region src/store/sqlite.ts
|
|
5
5
|
/**
|
|
6
6
|
* A board in one SQLite file, A2's log and board's tables side by side: `a2()`'s
|
package/dist/backend-a2.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as Actor, x as Attachment } from "./folds-
|
|
1
|
+
import { t as Actor, x as Attachment } from "./folds-ZkHM4M-v.mjs";
|
|
2
2
|
import { l as Reducer, r as ContractEvent } from "./reducer-CYPHsSmd-BQIfozGi.mjs";
|
|
3
3
|
import { a as SessionAppend, c as SessionConsumeOptions, d as SessionSchedule, f as StateOptions, l as SessionConsumeResult, n as A2Server, o as SessionClearOptions, p as SessionCleared, r as Consumer, s as SessionClearResult, t as A2Scheduler, u as SessionDeadLetters } from "./server-qgez0Xny-D5mLfqFQ.mjs";
|
|
4
|
-
import { A as InboxItem, B as Me, D as IdentityView, Ft as ThreadView, H as MessagesPage, Ht as UploadTicket, I as LinkedAccount, It as ThreadsPage, K as PersonView, Nt as SyncedView, R as MatchView, S as EventsPage, St as SyncCopiesView, Tt as SyncFindView, V as MessageView, b as Discovery, bt as SyncCodeView, dt as SourceJoin, et as RegistrationView, jt as SyncThreadView, k as InboxEntry, mt as SourceRead, ot as ScheduleView, v as ChannelView } from "./client-
|
|
5
|
-
import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-
|
|
6
|
-
import { n as fsBlob, r as memoryBlob, t as BlobStore } from "./blob-
|
|
7
|
-
import { t as BoardStore } from "./types-
|
|
4
|
+
import { A as InboxItem, B as Me, D as IdentityView, Ft as ThreadView, H as MessagesPage, Ht as UploadTicket, I as LinkedAccount, It as ThreadsPage, K as PersonView, Nt as SyncedView, R as MatchView, S as EventsPage, St as SyncCopiesView, Tt as SyncFindView, V as MessageView, b as Discovery, bt as SyncCodeView, dt as SourceJoin, et as RegistrationView, jt as SyncThreadView, k as InboxEntry, mt as SourceRead, ot as ScheduleView, v as ChannelView } from "./client-BqAjk0Q4.mjs";
|
|
5
|
+
import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-CPC_vyOo.mjs";
|
|
6
|
+
import { n as fsBlob, r as memoryBlob, t as BlobStore } from "./blob-DmiQjrYy.mjs";
|
|
7
|
+
import { t as BoardStore } from "./types-No0WdhE5.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
//#region src/server/transport.d.ts
|
|
10
10
|
/**
|
|
@@ -284,6 +284,7 @@ export declare function a2(options?: A2Options): {
|
|
|
284
284
|
} & {
|
|
285
285
|
target: string;
|
|
286
286
|
limit?: number | undefined;
|
|
287
|
+
after?: string | undefined;
|
|
287
288
|
}, signal: AbortSignal) => Promise<SourceRead>;
|
|
288
289
|
joinSource: (caller: Caller, input: {
|
|
289
290
|
key: string;
|
|
@@ -601,6 +602,7 @@ export declare function a2(options?: A2Options): {
|
|
|
601
602
|
type: string;
|
|
602
603
|
title: string;
|
|
603
604
|
url: string | null;
|
|
605
|
+
body?: string | null | undefined;
|
|
604
606
|
labels: Record<string, string>;
|
|
605
607
|
unset: string[];
|
|
606
608
|
owns?: string[] | undefined;
|
|
@@ -992,6 +994,7 @@ export declare function a2(options?: A2Options): {
|
|
|
992
994
|
type: z.ZodString;
|
|
993
995
|
title: z.ZodString;
|
|
994
996
|
url: z.ZodNullable<z.ZodString>;
|
|
997
|
+
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
995
998
|
labels: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
996
999
|
unset: z.ZodArray<z.ZodString>;
|
|
997
1000
|
owns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
package/dist/backend-a2.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as createHttp } from "./backend-http-
|
|
1
|
+
import { r as createHttp } from "./backend-http-CzIJMm58.mjs";
|
|
2
2
|
import { i as environmentProfile, n as boardUrl, r as connect } from "./node-Zd_C-gxP.mjs";
|
|
3
3
|
//#region src/backend-http/index.ts
|
|
4
4
|
const environment = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Actor, x as Attachment } from "./folds-
|
|
2
|
-
import { A as InboxItem, B as Me, D as IdentityView, Ft as ThreadView, H as MessagesPage, Ht as UploadTicket, I as LinkedAccount, It as ThreadsPage, K as PersonView, Nt as SyncedView, R as MatchView, S as EventsPage, St as SyncCopiesView, Tt as SyncFindView, V as MessageView, b as Discovery, bt as SyncCodeView, dt as SourceJoin, et as RegistrationView, jt as SyncThreadView, k as InboxEntry, mt as SourceRead, o as ProfileOption, ot as ScheduleView, v as ChannelView } from "./client-
|
|
3
|
-
import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-
|
|
1
|
+
import { t as Actor, x as Attachment } from "./folds-ZkHM4M-v.mjs";
|
|
2
|
+
import { A as InboxItem, B as Me, D as IdentityView, Ft as ThreadView, H as MessagesPage, Ht as UploadTicket, I as LinkedAccount, It as ThreadsPage, K as PersonView, Nt as SyncedView, R as MatchView, S as EventsPage, St as SyncCopiesView, Tt as SyncFindView, V as MessageView, b as Discovery, bt as SyncCodeView, dt as SourceJoin, et as RegistrationView, jt as SyncThreadView, k as InboxEntry, mt as SourceRead, o as ProfileOption, ot as ScheduleView, v as ChannelView } from "./client-BqAjk0Q4.mjs";
|
|
3
|
+
import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-CPC_vyOo.mjs";
|
|
4
4
|
//#region src/server/backend-http.d.ts
|
|
5
5
|
type HttpOptions = {
|
|
6
6
|
/**
|
|
@@ -258,6 +258,7 @@ declare function createHttp(url: string | undefined, options: HttpOptions, envir
|
|
|
258
258
|
} & {
|
|
259
259
|
target: string;
|
|
260
260
|
limit?: number | undefined;
|
|
261
|
+
after?: string | undefined;
|
|
261
262
|
}, signal: AbortSignal) => Promise<SourceRead>;
|
|
262
263
|
joinSource: (caller: Caller, input: {
|
|
263
264
|
key: string;
|
|
@@ -575,6 +576,7 @@ declare function createHttp(url: string | undefined, options: HttpOptions, envir
|
|
|
575
576
|
type: string;
|
|
576
577
|
title: string;
|
|
577
578
|
url: string | null;
|
|
579
|
+
body?: string | null | undefined;
|
|
578
580
|
labels: Record<string, string>;
|
|
579
581
|
unset: string[];
|
|
580
582
|
owns?: string[] | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./files-SniSmeEr.mjs";
|
|
2
|
-
import "./schemas-
|
|
3
|
-
import { K as routes, O as RegisterBody, a as METHODS, n as compileWatcher, t as canonicalWatchers } from "./watchers-hash-
|
|
2
|
+
import "./schemas-DBmUO6pr.mjs";
|
|
3
|
+
import { K as routes, O as RegisterBody, a as METHODS, n as compileWatcher, t as canonicalWatchers } from "./watchers-hash-BDhLVkV5.mjs";
|
|
4
4
|
import { n as createBoardClient, t as BoardError } from "./client-D0Px7KzF.mjs";
|
|
5
5
|
import { a as keyId, n as DERIVED_ID, o as sha256, r as derivedId, t as waitUntil } from "./wait-until-Dw4XrIDQ.mjs";
|
|
6
6
|
import { a as forbidden, o as json, t as HttpError } from "./errors-CusN4x2l.mjs";
|
|
@@ -479,7 +479,7 @@ function createHttp(url, options, environment) {
|
|
|
479
479
|
return discovery();
|
|
480
480
|
},
|
|
481
481
|
async readSource(caller, input, signal) {
|
|
482
|
-
if ("self" in caller && bound().sync.some((entry) => entry.key === input.key)) return bound().readSource(input.key, input.target, input.limit ?? 50);
|
|
482
|
+
if ("self" in caller && bound().sync.some((entry) => entry.key === input.key)) return bound().readSource(input.key, input.target, input.limit ?? 50, input.after ?? null);
|
|
483
483
|
return remoteCall("readSource", caller, input, signal);
|
|
484
484
|
},
|
|
485
485
|
async joinSource(caller, input, signal) {
|
package/dist/backend-http.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as HttpOptions, t as HttpBackend } from "./backend-http-
|
|
1
|
+
import { n as HttpOptions, t as HttpBackend } from "./backend-http-CqfKhrnn.mjs";
|
|
2
2
|
//#region src/backend-http/index.default.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* The board at `url`, which keeps the log. Outside Node there's no environment to find it or a
|
package/dist/backend-http.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as http } from "./index.default-
|
|
1
|
+
import { t as http } from "./index.default-rB8sJ9RX.mjs";
|
|
2
2
|
export { http };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as HttpOptions, t as HttpBackend } from "./backend-http-
|
|
1
|
+
import { n as HttpOptions, t as HttpBackend } from "./backend-http-CqfKhrnn.mjs";
|
|
2
2
|
//#region src/backend-http/index.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* The board at `url`, which keeps the log: this board uses it as this deployment. Without a
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as http } from "./backend-http-
|
|
1
|
+
import { t as http } from "./backend-http-Bmp0IgD3.mjs";
|
|
2
2
|
export { http };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Actor, x as Attachment } from "./folds-
|
|
2
|
-
import { A as InboxItem, B as Me, D as IdentityView, Ft as ThreadView, H as MessagesPage, Ht as UploadTicket, I as LinkedAccount, It as ThreadsPage, K as PersonView, Nt as SyncedView, R as MatchView, S as EventsPage, St as SyncCopiesView, Tt as SyncFindView, V as MessageView, b as Discovery, bt as SyncCodeView, dt as SourceJoin, et as RegistrationView, jt as SyncThreadView, k as InboxEntry, mt as SourceRead, o as ProfileOption, ot as ScheduleView, v as ChannelView } from "./client-
|
|
3
|
-
import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-
|
|
1
|
+
import { t as Actor, x as Attachment } from "./folds-ZkHM4M-v.mjs";
|
|
2
|
+
import { A as InboxItem, B as Me, D as IdentityView, Ft as ThreadView, H as MessagesPage, Ht as UploadTicket, I as LinkedAccount, It as ThreadsPage, K as PersonView, Nt as SyncedView, R as MatchView, S as EventsPage, St as SyncCopiesView, Tt as SyncFindView, V as MessageView, b as Discovery, bt as SyncCodeView, dt as SourceJoin, et as RegistrationView, jt as SyncThreadView, k as InboxEntry, mt as SourceRead, o as ProfileOption, ot as ScheduleView, v as ChannelView } from "./client-BqAjk0Q4.mjs";
|
|
3
|
+
import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-CPC_vyOo.mjs";
|
|
4
4
|
//#region src/server/backend-vercel.d.ts
|
|
5
5
|
type VercelOptions = {
|
|
6
6
|
/** The team whose board it is: its ID (`team_…`) or its slug. In Node, by default your deployment's, or `VERCEL_ORG_ID`. */
|
|
@@ -14,6 +14,8 @@ type VercelOptions = {
|
|
|
14
14
|
* a deployment's OIDC token, or your `vercel login`. Elsewhere, pass one that sends them.
|
|
15
15
|
*/
|
|
16
16
|
fetch?: typeof fetch;
|
|
17
|
+
/** How files reach Vercel's storage, on URLs the API signs: `fetch` by default, never with credentials. */
|
|
18
|
+
files?: typeof fetch;
|
|
17
19
|
};
|
|
18
20
|
/** What finds the API's credentials and the team, in the Node build. A browser has none. */
|
|
19
21
|
type VercelEnvironment = {
|
|
@@ -257,6 +259,7 @@ declare function createVercel(options: VercelOptions, environment: VercelEnviron
|
|
|
257
259
|
} & {
|
|
258
260
|
target: string;
|
|
259
261
|
limit?: number | undefined;
|
|
262
|
+
after?: string | undefined;
|
|
260
263
|
}, signal: AbortSignal) => Promise<SourceRead>;
|
|
261
264
|
joinSource: (caller: Caller, input: {
|
|
262
265
|
key: string;
|
|
@@ -574,6 +577,7 @@ declare function createVercel(options: VercelOptions, environment: VercelEnviron
|
|
|
574
577
|
type: string;
|
|
575
578
|
title: string;
|
|
576
579
|
url: string | null;
|
|
580
|
+
body?: string | null | undefined;
|
|
577
581
|
labels: Record<string, string>;
|
|
578
582
|
unset: string[];
|
|
579
583
|
owns?: string[] | undefined;
|