@swell/cli
Version:
Swell's command line interface/utility
42 lines (41 loc) • 1.83 kB
TypeScript
import { SwellCommand } from '../../swell-command.js';
export default class Models extends SwellCommand {
static summary: string;
static description: string;
static args: {
'collection-path': 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>;
private listModels;
private showStandardModels;
private showAppModels;
private showModels;
private getModelPath;
private showModelDetail;
private resolveModelPath;
private resolveAppModelPath;
private throwModelNotFound;
private emitModel;
/**
* Detail-mode hints for a model record. Mirrors `InspectResourceCommand.hints`
* but lives here because `models` doesn't extend that base.
*
* Two hints: the records collection at the model's runtime address, and the
* mutation event stream filtered by canonical model string. Both interpolate
* from the record's own fields — `app_id`, `namespace`, `name` — so we stay
* consistent with column 1 if the platform renames anything.
*
* Canonical model string: `accounts` (system), `content/blogs` (namespaced
* system), `apps/<hex>/<col>` (app). The records path mirrors that with a
* leading slash.
*/
private modelHints;
}