UNPKG

@swell/cli

Version:

Swell's command line interface/utility

58 lines (57 loc) 3.29 kB
import { PackageManager } from './lib/package-manager.js'; import { SwellCommand } from './swell-command.js'; export declare abstract class CreateAppCommand extends SwellCommand { protected commandExample: string; static baseFlags: { frontend: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>; 'storefront-app': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>; 'integration-type': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>; 'integration-id': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>; yes: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>; }; private devApi; constructor(argv: string[], config: any); addAllowedHostsToAngular(configPath: string): Promise<void>; addAllowedHostsToAstro(configPath: string): Promise<void>; addAllowedHostsToNuxt(configPath: string): Promise<void>; /** * For frameworks whose dev server is Vite directly. Astro/Nuxt nest the * vite block inside their own defineConfig — see addViteAllowedHosts. */ addAllowedHostsToVite(configPath: string): Promise<void>; /** * Add vite allowedHosts configuration to a framework config file. * Supports config files that use a defineX({}) pattern (Astro, Nuxt, etc.) */ private addViteAllowedHosts; createAppConfigFolders(swellConfig: any): Promise<void>; createFrontendApp(swellConfig: any, flags: any, directCreate?: boolean, kind?: string): Promise<boolean>; createStorefrontApp(swellConfig: any, flags: any, directCreate?: boolean): Promise<boolean>; createThemeApp(config: any, flags: any, installedStorefrontApp: any): Promise<boolean>; doesPackageManagerExist(packageManager: string): Promise<boolean>; execWithStdio(cwd: string, command: string, onOutput?: (string: string) => any | false): Promise<void>; findPackageManager(pkg?: string): Promise<string | undefined>; getInstalledStorefrontApps(): Promise<any[] | boolean>; getProjectType(frameworkType: string): { installCommand: string; appTypes?: string[] | undefined; buildCommand?: string | undefined; devCommand: string; displayOrder?: number | undefined; mainPackage: string; name: string; slug: string; }; setupPackage(name: string, config: any, pkg: PackageManager): Promise<void>; tryPackageSetup(name: string, config: any, pkg: PackageManager): Promise<void>; /** * Fix wrangler.jsonc `main` field when it points to a build artifact that * doesn't exist at dev time. The @cloudflare/vite-plugin validates this path * at startup and crashes during `astro dev` if it can't resolve it. * * Only replaces the exact legacy value that C3 currently scaffolds. * Once C3 updates its template, this becomes a no-op. */ private fixAstroWranglerEntrypoint; private addFrontendAllowedHosts; }