-
Notifications
You must be signed in to change notification settings - Fork 0
/
validation.ts
49 lines (34 loc) · 1.84 KB
/
validation.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { FlagsConfig, SfdxCommand } from '@salesforce/command';
import { Messages } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import Utils from '../../../../shared/utils';
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// 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('@dx-cli-toolbox/sfdx-toolbox-project-utils', 'toolbox-project-stage-validation');
export default class Validation extends SfdxCommand {
public static description = messages.getMessage('commandDescription');
public static examples = [messages.getMessage('examplesDescription')];
// public static args = [{name: 'file'}];
public static flagsConfig: FlagsConfig = {
...Utils.flagsCommonConfig(),
...Utils.flagScopeDefault(false),
...{ }
};
// Command doesn't required username
protected static requiresUsername = false;
// Command doesn't support username
protected static supportsUsername = false;
// Comment this out if your command does not require a hub org username
protected static requiresDevhubUsername = false;
// If true, then the command supported the parameter of specifying the 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 = true;
public async run(): Promise<AnyJson> {
this.ux.log('TODO Need to implement toolbox:project:stage:validation command');
// TODO - Need to implement validation of "toolbox.project.*" JSON section of sfdx-project.json
return;
}
}