sfdx-hardis
Version:
Swiss-army-knife Toolbox for Salesforce. Allows you to define a complete CD/CD Pipeline. Orchestrate base commands and assist users with interactive wizards
44 lines • 1.76 kB
JavaScript
/* jscpd:ignore-start */
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
import { Messages } from '@salesforce/core';
import { uxLog } from '../../../common/utils/index.js';
import { getConfig } from '../../../config/index.js';
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('sfdx-hardis', 'org');
export default class ConfigGet extends SfCommand {
static title = 'Deploy metadata sources to org';
static description = 'Returns sfdx-hardis project config for a given level';
static examples = ['$ sf hardis:project:deploy:sources:metadata'];
static flags = {
level: Flags.string({
char: 'l',
default: 'project',
description: 'project,branch or user',
options: ['project', 'branch', 'user'],
}),
debug: Flags.boolean({
char: 'd',
default: false,
description: messages.getMessage('debugMode'),
}),
websocket: Flags.string({
description: messages.getMessage('websocket'),
}),
skipauth: Flags.boolean({
description: 'Skip authentication check when a default username is required',
}),
}; // Set this to true if your command requires a project workspace; 'requiresProject' is false by default
static requiresProject = false;
configInfo = {};
/* jscpd:ignore-end */
async run() {
const { flags } = await this.parse(ConfigGet);
const level = flags.level || 'project';
this.configInfo = await getConfig(level);
uxLog(this, JSON.stringify(this.configInfo));
return {
config: this.configInfo,
};
}
}
//# sourceMappingURL=get.js.map