style(plugins): keep the runtime and the SDK within their size baselines

The plugin data engine added three lines to each; six comments that wrapped past 120 columns now fit in one.
This commit is contained in:
Maurice
2026-11-17 14:53:24 +01:00
parent 3a4c523509
commit ba043cb1c0
2 changed files with 6 additions and 6 deletions
@@ -435,7 +435,7 @@ export class PluginRuntimeService implements OnApplicationBootstrap, OnModuleDes
// errors (each body is wrapped in try/catch); the .catch below is defense-in-
// depth against a future regression, same shape as the pruneErrorLog call in
// the onLog hook above.
void this.fireDueScheduled().catch(() => { /* fireDueScheduled already handles its own errors — this is a backstop */ });
void this.fireDueScheduled().catch(() => { /* a backstop: fireDueScheduled handles its own errors */ });
void this.drainUserErasures();
});
}
@@ -1020,7 +1020,7 @@ export class PluginRuntimeService implements OnApplicationBootstrap, OnModuleDes
this.stopWatch(id);
removePluginCodeEntry(dest); // drop any prior link — never follows into the author's source
fs.mkdirSync(path.dirname(dest), { recursive: true });
fs.symlinkSync(sourceDir, dest, 'junction'); // Windows junction (no elevation); POSIX ignores the type -> dir symlink
fs.symlinkSync(sourceDir, dest, 'junction'); // Windows junction (no elevation); POSIX: a dir symlink
await discoverPlugins(this.discoveryRepos); // registers/updates the row from the linked manifest, INACTIVE
// Same as a sideload: the plugin has left the registry trust model, so a block that
// described a refused REGISTRY update no longer describes the code that will run.
@@ -1161,7 +1161,7 @@ export class PluginRuntimeService implements OnApplicationBootstrap, OnModuleDes
invoke(id: string, method: string, params: Record<string, unknown>, actingUserId?: number): Promise<unknown> {
return this.supervisor.invoke(id, method, params, { actingUserId });
}
/** Ids of active plugins implementing a provider hook (e.g. 'placeDetailProvider'), or one optional function of it. */
/** Ids of active plugins implementing a provider hook ('placeDetailProvider'), or one optional function of it. */
providersOf(hook: string, fn?: string): string[] {
return this.supervisor.providersOf(hook, fn);
}
@@ -127,7 +127,7 @@ export interface PluginContext {
listNotes(tripId: number): Promise<unknown[]>;
/** A trip's polls (with options + voters). Needs 'db:read:collab'. */
listPolls(tripId: number): Promise<unknown[]>;
/** A trip's chat messages (newest 100, oldest first; `before` = a message id to page back). Needs 'db:read:collab'. */
/** A trip's chat messages: newest 100, oldest first; `before` pages back from a message. Needs 'db:read:collab'. */
listMessages(tripId: number, before?: number): Promise<unknown[]>;
createNote(tripId: number, input: { title: string; content?: string; category?: string; color?: string; website?: string; pinned?: boolean }): Promise<unknown>;
createPoll(tripId: number, input: { question: string; options: unknown[]; multiple?: boolean; deadline?: string }): Promise<unknown>;
@@ -175,7 +175,7 @@ export interface PluginContext {
};
/** Exchange rates (tenant-free, cached upstream). Needs 'rates:read'. */
rates: {
/** A map of quote → rate relative to `base` (e.g. base 'EUR' → { USD: 1.08, ... }). `null` on an upstream failure. */
/** A map of quote → rate relative to `base` (base 'EUR' → { USD: 1.08 }). `null` on an upstream failure. */
get(base: string): Promise<Record<string, number> | null>;
};
/** The global place-category reference list (read-only). Needs 'db:read:categories'. */
@@ -450,7 +450,7 @@ export interface SearchRequest {
}
export interface SearchProvider {
search(request: SearchRequest, ctx: PluginContext): Promise<SearchResultPlace[]>;
/** Optional: the same question while it is typed (#2221). The host only calls it when the child reported it at load. */
/** Optional: the same question while it is typed (#2221). The host calls it only if the child reported it at load. */
suggest?(request: SearchRequest, ctx: PluginContext): Promise<SearchResultPlace[]>;
}
/**