@swell/cli
Version:
Swell's command line interface/utility
39 lines (38 loc) • 1.26 kB
TypeScript
/**
* Helper module for the `info` command. Encapsulates the logic for
* displaying the app's information.
*/
import { App, AppVersion } from './apps';
interface FieldDefinition {
label: string;
transform?: (_arg: any) => Promise<string> | string;
value?: any;
}
export declare class FieldDefinitions {
app: App;
versions: AppVersion[];
constructor(app: App, versions: AppVersion[]);
get client(): FieldDefinition;
get dateCreated(): FieldDefinition;
get dateUpdated(): FieldDefinition;
get description(): FieldDefinition;
get installed(): FieldDefinition;
get name(): FieldDefinition;
get publicId(): FieldDefinition;
get published(): FieldDefinition;
get version(): FieldDefinition;
/**
* Returns a FieldDefinition object for the given field.
*
* The function uses the field name to find its value in the app object. If
* the FieldDefinition has a transform function for the required field,
* it will be called to transform the value before returning the
* FieldDefinition.
*
* @param field The field to get the definition for
*
* @returns The FieldDefinition object
*/
getFieldDefinition(field: string): FieldDefinition;
}
export {};