UNPKG

@modyo/cli

Version:

Modyo CLI Command line to expose local development tools

34 lines (33 loc) 2.54 kB
import { Command } from '@oclif/core'; export default class Preview extends Command { static readonly summary = "Preview local widget over Modyo platform"; static readonly description = "The `preview` command is responsible for informing the platform about local entry points so that the widget can be rendered on the platform locally.\n\nMODYO_VERSION=version\nMODYO_TOKEN=token\nMODYO_ACCOUNT_URL=account-url\nMODYO_SITE_ID=siteId\nMODYO_SITE_HOST=siteHost\nMODYO_LOCAL_PORT=port\nMODYO_LOCAL_DOM_ID=domId\nMODYO_LOCAL_ENTRY_JS=entryJs\n"; static readonly examples: string[]; static readonly flags: { help: import("@oclif/core/lib/interfaces").BooleanFlag<void>; token: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>; version: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>; 'account-url': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>; 'site-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>; 'site-host': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>; port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>; 'dom-id': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>; 'entry-js': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>; }; run(): Promise<void>; /** * Handles errors thrown during command execution. * * This method is invoked by oclif when {@link run} (or other command * lifecycle methods) throws an exception or returns a rejected promise. * It explicitly handles {@link Errors.CLIError} instances that have a * non-zero `oclif.exit` code by delegating to {@link this.error} so that * the process exits with the appropriate status code and message. * All other errors are forwarded to the base {@link Command.catch} * implementation for default handling. * * @param error - The error thrown during command execution; may be any value, * but is typically an instance of {@link Errors.CLIError} or `Error`. */ catch(error: any): Promise<any>; }