docs: document plugin cli helpers

This commit is contained in:
Peter Steinberger
2026-06-04 11:01:13 -04:00
parent a94a939626
commit 169a4159de
10 changed files with 19 additions and 0 deletions
+2
View File
@@ -1,3 +1,4 @@
// Commander registration for plugin list/search/inspect/install/update/authoring commands.
import type { Command } from "commander";
import { formatDocsLink } from "../../packages/terminal-core/src/links.js";
import { theme } from "../../packages/terminal-core/src/theme.js";
@@ -52,6 +53,7 @@ export type PluginAuthoringInitOptions = {
};
function createModuleLoader<T>(load: () => Promise<T>): () => Promise<T> {
// Plugin runtime modules are heavy; load each command surface once on first use.
let promise: Promise<T> | undefined;
return () => (promise ??= load());
}