How to use the @salesforce/command.flags.url 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 wadewegner / sfdx-waw-plugin / src / commands / waw / auth / username / login.ts View on Github external
import { AnyJson, getString } from '@salesforce/ts-types';
import * as jsforce from 'jsforce';

// Initialize Messages with the current plugin directory

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages('sfdx-waw-plugin', 'waw');

export default class ApexLogGet extends SfdxCommand {
  public static description = messages.getMessage('auth.username.login.description');
  public static examples = [];

  public static readonly flagsConfig = {
    instanceurl: flags.url({
      char: 'r',
      description: messages.getMessage('auth.username.login.flags.instanceurl')
    username: flags.string({
      char: 'u',
      description: messages.getMessage('auth.username.login.flags.username'),
      required: true
    password: flags.string({
      char: 'p',
      description: messages.getMessage('auth.username.login.flags.password')

  public async run(): Promise<AnyJson> {
    const username = this.flags.username;