@swell/cli
Version:
Swell's command line interface/utility
64 lines (63 loc) • 3.02 kB
TypeScript
import { AppCommand } from './app-command.js';
import { App, AppConfig, AppVersion } from './lib/apps/index.js';
/**
* Extends the AppCommand with methods that ease managing remote apps and
* configurations.
*/
export declare abstract class RemoteAppCommand extends AppCommand {
static delayOrientation: boolean;
static orientation: AppCommandOrientation;
app: App;
appCreated: boolean;
appType: string;
storefront?: any;
storefrontLocalUrl?: string;
themeSyncApp?: boolean;
appFrontendUrl(storeId: string, installedAppId: string): string;
cleanRemoteConfigs(remoteConfigs: AppConfig[], deleteDeprecated?: boolean): Promise<AppConfig[]>;
dashboardUrl(flags?: {
[flag: string]: any;
}, storeId?: string): string;
deleteConfig(configId: string, filePath?: string, appConfigId?: string): Promise<any>;
protected getApp(id?: string): Promise<App>;
protected getAppWithConfig(id?: string): Promise<App>;
getConfigData(configId: string): Promise<any>;
protected getCreateUpdateApp(updateApp?: App | null): Promise<App>;
protected getInstalledApp(): Promise<any>;
protected getLocalAppConfigs(): AppConfig[];
protected getVersion(version?: null | string | undefined): Promise<AppVersion>;
protected getVersions(version?: null | string | undefined): Promise<AppVersion[]>;
protected handleRequestErrors(request: () => any, spinnerError?: () => void): Promise<any>;
init(): Promise<void>;
protected installApp(version: string, spinner?: any): Promise<any>;
isConfigDeprecated(config: AppConfig): boolean;
localFrontendUrl(storeId: string, sessionId: string): string;
logOrientation(orientation?: AppCommandOrientation): Promise<void>;
postConfigData(configJson: any): Promise<any>;
protected pullAppConfigs(force?: boolean, confirmRemove?: boolean): Promise<{
pulled: string[];
removed: string[];
}>;
pullAppJsonAndRemoteConfigs(): Promise<AppConfig[]>;
protected pullRemoteFile(config: AppConfig, log?: boolean): Promise<any>;
protected pushAppConfigs(force?: boolean): Promise<{
pushed: string[];
removed: string[];
}>;
protected pushRemoteFile(config: AppConfig, log?: boolean): Promise<any>;
protected removeLocalFile(config: AppConfig, log?: boolean): Promise<any>;
protected removeRemoteFile(config: AppConfig, log?: boolean): Promise<any>;
protected showErrors(errors: any, spinnerError?: () => void): void;
storefrontFrontendUrl(storeId: string, storefront?: any, branchId?: string, preview?: boolean): string;
protected swellRcPath(): string;
protected timestampStyled(): string;
protected updateInstalledApp(version: string, spinner?: any): Promise<void>;
protected updateVersion(version: string, body: any, spinner?: any): Promise<void>;
/**
* Reads the .swellrc file and sets up the remote app configuration.
*
* @returns App
*/
private initApp;
private showOrientation;
}