UNPKG

@salesforce/plugin-templates

Version:

Commands to create metadata from a default or custom template

33 lines (32 loc) 1.94 kB
import { SfCommand } from '@salesforce/sf-plugins-core'; import { CreateOutput } from '@salesforce/templates'; export declare const UI_BUNDLES_DIR = "uiBundles"; export default class UiBundleGenerate extends SfCommand<CreateOutput> { static readonly summary: string; static readonly description: string; static readonly examples: string[]; static readonly flags: { name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>; template: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>; label: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>; 'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>; 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>; }; /** * Resolves the default output directory by reading the project's sfdx-project.json. * Returns the path to uiBundles under the default package directory, * or falls back to the current directory if not in a project context. */ private static getDefaultOutputDir; /** * Creates a new `.graphqlrc.yml` at the sfdx project root so the GraphQL LSP extension * can auto-discover it. The file at the project root references `schema.graphql` as a * sibling and uses a recursive glob for documents so nested ui-bundle src trees are picked up. * * Returns the new file path on success, or undefined when not running inside an sfdx project, * when the bundle's `.graphqlrc.yml` was not generated, or when a `.graphqlrc.yml` already * exists at the project root. */ private static createGraphqlrcAtProjectRoot; run(): Promise<CreateOutput>; }