Versions 293 to 318
Lines 159–166 at 318 (were 159–165 at 293)
159159
162− const c = globalThis.crypto as unknown as { DigestStream?: unknown };
162+ // Through a cast: abso's worker compiles this file too (tool.lock.json), and its types have no globalThis.crypto.
Lines 190–197 at 318 (were 189–194 at 293)
190191 handle: (request: Request, env: unknown, ctx: unknown, issues: unknown) => Promise<Response>;
194+ issuesFetch: (request: Request, env: unknown, ctx: unknown, route: unknown) => Promise<Response>;
194197
Lines 243–255 at 318 (were 240–246 at 293)
240243 `local projects couldn't load the server's code: ${e instanceof Error ? e.message : String(e)}`,
243− return { DatabaseSync: sqlite.DatabaseSync, handle: loaded.handle, ProjectObject: loaded.ProjectObject };
Lines 265–274 at 318 (were 256–261 at 293)
257266 /** PRAGMA data_version when this process last used the project: it changes when another process writes. */
268+ /** The project's issues, asks and news: issues.sqlite beside it, opened when a call first reaches them. */
270+ /** The issues object for the call under way: made again for each call, as another process may have written. */
260273
261274/** Every store file this process has open: closed when its command ends (closeLocalStores). */
Lines 284–293 at 318 (were 271–278 at 293)
273286
274−const PROJECT_PATH = /^\/p\/([^/]+)\//;
275−const NAME = /^[A-Za-z0-9._-]{1,100}$/;
287+/** A project's calls, and its issues, asks and news, which the open server keeps at /issues/p/<project>/. */
289+/** A project's name is also its folder in the store, so it never starts with a dot ("." and ".." would leave it). */
277292
Lines 327–365 at 318 (were 312–321 at 293)
315− // Issues, asks and news aren't in local projects yet: a start note's issue hooks find nothing to call.
316− ISSUES_DO: { idFromName: (n: string) => n, get: () => ({}) },
338+ db.exec("PRAGMA journal_mode = WAL; PRAGMA busy_timeout = 120000; PRAGMA synchronous = NORMAL");
318− return async (input, init = {}) => {
350+ // One call at a time, as a Durable Object takes them: a call holds its project's write transaction across awaits,
351+ // and the connection can't start a second (two calls at once come from Promise.all in ci and waiting --mine).
361+
Lines 373–382 at 318 (were 329–335 at 293)
376+ // Every call, issues ones too, holds the project file's lock, so local writers of the project and of its
334381 const version = (p.db.prepare("PRAGMA data_version").get() as { data_version: number }).data_version;
Lines 384–390 at 318 (were 337–343 at 293)
340− issuesNone,
343390 // The answer is read whole before the write is kept, so a body that fails to arrive keeps nothing either.
Lines 403–407 at 318 (were 356–362 at 293)
359− };
361−
362−const issuesNone = async () => json(404, { error: "issues, asks and news aren't in local projects yet" });
- MCP
- compare on this site's /mcp
- CLI
- abso diff 293 318 client/src/local-store.ts --json
- JSON
- /christopher/abso-core/compare/293..318?file=client%2Fsrc%2Flocal-store.ts&format=json