fixup! diigo-cache: diigo counts pages from 0; migrate stored pages (schema v2)

Docs per the docs-files-api skill: a 1–2 line @file; what a declaration is or does in JSDoc on it, not in // comments or the file header.

Generated-by: Claude Opus 5.5
This commit is contained in:
dckc committed 2026-10-07 09:34:06 -05:00
1 parent 2a7d0ae0cb
commit 2bb18a9e96
2 files changed
+10 -14

No files matched your search

+7 -8
View File
@@ -1,11 +1,4 @@
/**
* @file a stand-in for webapp's `WebAppFactory` entrypoint, for tests: an
* auxiliary worker (plain JS — the vitest pool doesn't transform aux
* workers) serving diigo-shaped `load_user_items` pages. 250 items (3
* pages of 100, the last short), every third private; a few webapp ids
* are known. Counts its diigo calls so tests
* can tell a cache hit (no call) from a miss.
*/
/** @file a stand-in for webapp's `WebAppFactory`, serving diigo-shaped pages to tests. */
import { RpcTarget, WorkerEntrypoint } from "cloudflare:workers";
const KNOWN_WEBAPP = "fake-webapp-id";
@@ -106,6 +99,12 @@ class FakeGet extends RpcTarget {
}
}
/**
* webapp's `WebAppFactory` entrypoint, faked: an auxiliary worker (plain
* JS; the vitest pool doesn't transform aux workers) serving
* `load_user_items` pages for a few known webapp ids. Counts its diigo
* calls, so tests can tell a cache hit (no call) from a miss.
*/
export class WebAppFactory extends WorkerEntrypoint {
async at(id) {
const kind = {