Skip to content

Commit

Permalink
Merge pull request #639 from amtrack/fix/flags
Browse files Browse the repository at this point in the history
  • Loading branch information
amtrack authored Nov 1, 2024
2 parents 4eb4a3c + 7fec1cb commit e46e164
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions src/browserforce-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,32 @@ import { Browserforce } from './browserforce.js';
import { ConfigParser } from './config-parser.js';
import * as DRIVERS from './plugins/index.js';

const baseFlags = {
'target-org': requiredOrgFlagWithDeprecations,
definitionfile: Flags.string({
char: 'f',
description: 'path to a browserforce state file'
}),
planfile: Flags.string({
char: 'p',
name: 'plan',
description: 'path to a browserforce plan file'
}),
statefile: Flags.string({
char: 's',
name: 'state',
description: 'path to a browserforce definition file\nThe schema is similar to the scratch org definition file.\nSee https://github.com/amtrack/sfdx-browserforce-plugin#supported-org-preferences for supported values.'
})
};

export abstract class BrowserforceCommand<T> extends SfCommand<T> {

static baseFlags = {
...SfCommand.baseFlags,
'target-org': requiredOrgFlagWithDeprecations,
definitionfile: Flags.string({
char: 'f',
description: 'path to a browserforce state file'
}),
planfile: Flags.string({
char: 'p',
name: 'plan',
description: 'path to a browserforce plan file'
}),
statefile: Flags.string({
char: 's',
name: 'state',
description: 'path to a browserforce definition file\nThe schema is similar to the scratch org definition file.\nSee https://github.com/amtrack/sfdx-browserforce-plugin#supported-org-preferences for supported values.'
})
};
protected bf: Browserforce;
protected settings: any[];

public async init(): Promise<void> {
await super.init();
const { flags } = await this.parse({
flags: this.ctor.flags,
baseFlags
baseFlags: BrowserforceCommand.baseFlags
});
let definition;
if (flags.definitionfile) {
Expand Down

0 comments on commit e46e164

Please sign in to comment.