mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 09:38:54 +00:00
chore(plugins): the host plugin API file holds its size baseline again
Tightens the two comments the rawBodyBase64 field and the type parity note added to runtime/plugin-sdk.ts, lowers its lint:size entry, and points the shared guide at the client files it names by their full path.
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* The plugin API as the isolated child implements it: its own copy of the published
|
||||
* trek-plugin-sdk types, so the child has zero external deps (plugin-sdk's
|
||||
* test/host-types.test-d.ts holds the two to the same names and members).
|
||||
* PURE — no server imports. This runs inside the isolated child. Every ctx
|
||||
* method is plumbing that turns a call into an RPC message to the host; the
|
||||
* child holds no db handle, no secrets, no network by default.
|
||||
* The plugin API as the isolated child implements it, its own copy of the trek-plugin-sdk
|
||||
* types (plugin-sdk's test/host-types.test-d.ts holds the two to the same names and members).
|
||||
* PURE: no server imports, zero external deps. Every ctx method is plumbing that turns a call
|
||||
* into an RPC message to the host; the child holds no db handle, no secrets, no network.
|
||||
*/
|
||||
|
||||
/** Mirrors the published package's constant — bumped on any breaking API change. */
|
||||
@@ -337,8 +335,7 @@ export interface PluginRequest {
|
||||
* providers; never Cookie/Authorization/session). Empty on authenticated routes.
|
||||
* Verify a provider signature against a secret you hold in `ctx.config`/`ctx.settings`. */
|
||||
headers: Record<string, string>;
|
||||
/** The RAW body, base64 — only on `auth:false` routes (webhooks), else null. Run an HMAC
|
||||
* over this, never over the parsed `body` (re-serializing does not reproduce the bytes). */
|
||||
/** Raw body, base64, on `auth:false` routes only (else null): HMAC this, not the parsed `body`. */
|
||||
rawBodyBase64?: string | null;
|
||||
user: { id: number; username: string; isAdmin: boolean } | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user