mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
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.
8 lines
373 B
TypeScript
8 lines
373 B
TypeScript
// The notes app's principals: its server and workers, the kit's owner, and the users its plugins may sign in.
|
|
|
|
/** Who someone is in the notes app. */
|
|
export type NotesPrincipal =
|
|
| { readonly kind: "server" }
|
|
| { readonly kind: "owner" }
|
|
| { readonly kind: "worker"; readonly project: string }
|
|
| { readonly kind: "user"; readonly id: string; readonly name: string };
|