pi-mono/packages/chord/test/next-node/fixtures/app/worker.ts
Mario Zechner 072e413bf3 feat(chord): Chord v2 slice 13, the app kit
chord/next/app: startApp and startWorker with the fixed app layout, worker kinds,
AppInfo and WorkerInfo; sessions (hashed tokens, rolling cookies, bearer tokens),
the one-time owner link, the owner token file, device pairing; Files per host
with ordered chunked uploads; export and import per address; plugin roots,
installs and applyChanges; optional users, invite and ephemeral login facets.
HTTP: deny by default (public routes and sockets), remoteAddress,
readSignedCookie. Examples 53-55.
2026-11-02 15:13:37 +00:00

13 lines
656 B
TypeScript

// The worker entry of the app kit's tests: `startWorker` with the tests' API (Chord's surface and the kit's objects as
// `@test/app/v1`, as the server's tests have it).
import * as chordNext from "../../../../src/next/index.ts";
import { AppInfo, Files, Sessions, startWorker, WorkerInfo } from "../../../../src/next-node/app/index.ts";
const v1 = { ...chordNext, AppInfo, WorkerInfo, Files, Sessions };
startWorker({
api: { name: "@test/app", versions: ["v1"], modules: { "@test/app/v1": v1 } },
kinds: { server: { platform: "node" }, worker: { platform: "node" }, teamworker: { platform: "node" } },
onError: (error) => console.error(error),
});