How to use the @salesforce/command.flags.builtin function in @salesforce/command

To help you get started, we’ve selected a few @salesforce/command examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stomita / sfdx-migration-automatic / src / commands / automig / load.ts View on Github external
char: 'd',
      description: messages.getMessage('inputDirFlagDescription'),
      required: true
    mappingobjects: flags.array({
      char: 'm',
      description: messages.getMessage('mappingObjectsFlagDescription'),
      map: (value: string) => {
        const [ object, keyField = 'Name' ] = value.split(':');
        return { object, keyField };
    deletebeforeload: flags.boolean({
      description: messages.getMessage('deleteBeforeLoadFlagDescription')
    verbose: flags.builtin()

  // Comment this out if your command does not require an org username
  protected static requiresUsername = true;

  // Comment this out if your command does not support a hub org username
  protected static supportsDevhubUsername = false;

  // Set this to true if your command requires a project workspace; 'requiresProject' is false by default
  protected static requiresProject = false;

  public async run(): Promise<AnyJson> {
    const inputDir = this.flags.inputdir;
github nawforce / ApexLink / assist / cli / src / commands / apexlink / check.ts View on Github external
json: flags.boolean({
      description: "show output in json format (disables --verbose && --csv)"
    csv: flags.boolean({
      description: "show output in csv format (disables --verbose)"
    depends: flags.boolean({
      description: "show dependency information for Apex classes"
    zombies: flags.boolean({
      description: "show class fields, properties & methods that are not being used"
    warnings: flags.boolean({
      description: "show warnings messages for legal but possibly faulty code "
    verbose: flags.builtin({
      description: "show progress messages"

  protected static requiresUsername = false;
  protected static supportsDevhubUsername = false;
  protected static requiresProject = false;

  public async run(): Promise<AnyJson> {
    const json = this.flags.json || false;
    const csv = this.flags.csv || false;
    const depends = this.flags.depends || false;
    const zombies = this.flags.zombies || false;
    const warnings = this.flags.warnings || false;
    const verbose = this.flags.verbose || false;