UNPKG

@swell/cli

Version:

Swell's command line interface/utility

50 lines (49 loc) 2.46 kB
import { SwellCommand } from '../../swell-command.js'; export default class Extensions extends SwellCommand { static summary: string; static description: string; static args: { identifier: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>; }; static flags: { app: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>; live: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>; json: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>; yes: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>; }; static examples: string[]; run(): Promise<void>; protected catch(error: Error): Promise<any>; /** * List mode is bounded to two parallel round-trip phases regardless of app * count: phase 1 fans `/client/apps`, the three settings singletons, and a * single `/data/:functions` filter; phase 2 fans `/apps/<id>/configs?type=component` * only for apps with a non-empty `extensions[]`. * * `include` / `aggregate` are NOT used here — the CLI's `node-fetch` * transport cannot transmit GET-with-body, and URL-form transmission of * those payloads is silently dropped server-side. Verified empirically * against the live admin API. Don't reach for those primitives. */ private showList; /** * Detail mode is bounded to one round-trip's worth of latency: the install * record (or `/apps/<id>` fallback), the relevant settings singleton(s), * `/data/:functions?where[app_id]=<id>&where[extension]=<extId>`, and * `/apps/<id>/configs?type=component` — all in parallel. */ private showDetail; /** * `extensions` emits a synthesized envelope rather than a raw API record — * other inspect subcommands print one upstream record, but here the JSON * nests `manifest`, `native_bindings[].record`, `bound.functions[]`, and * `bound.components[]` under shared status fields. * * The `Next steps:` footer mixes runnable shell commands and merchant-UI * lines (prefixed `(merchant)`). The structured `action` and `action_owner` * fields above give an agent a parseable signal independent of the footer. */ private emitDetail; private fetchSafe; private printPreamble; }