@salesforce/plugin-info 2.2.15 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -76,31 +76,64 @@ sfdx plugins
76
76
 
77
77
  <!-- commands -->
78
78
 
79
- - [`sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-inforeleasenotesdisplay--v-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
79
+ - [`sfdx doctor`](#sfdx-doctor)
80
+ - [`sfdx info:releasenotes:display`](#sfdx-inforeleasenotesdisplay)
80
81
 
81
- ## `sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
82
+ ## `sfdx doctor`
82
83
 
83
- Display Salesforce CLI release notes on the command line.
84
+ Gather CLI configuration data and run diagnostic tests to discover and report potential problems in your environment.
84
85
 
85
86
  ```
86
87
  USAGE
87
- $ sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel
88
- trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
88
+ $ sfdx doctor
89
89
 
90
90
  OPTIONS
91
- -v, --version=version CLI version or tag for which to
92
- display release notes.
91
+ -c, --command=command
92
+ -d, --output-dir=output-dir
93
+ -i, --create-issue
94
+ -p, --plugin=plugin
95
+ --json Format output as json.
96
+
97
+ DESCRIPTION
98
+ When you run the doctor command without parameters, it first displays a diagnostic overview of your environment. It
99
+ then writes a detailed diagnosis to a JSON file in the current directory. Use the --outputdir to specify a different
100
+ directory. To run diagnostic tests on a specific plugin, use the --plugin parameter. If the plugin isn't listening to
101
+ the doctor, then you get a warning.
102
+
103
+ Use the --command parameter to run a specific command in debug mode; the doctor writes both stdout and stderr to *.log
104
+ files that you can provide to Salesforce Customer Support or attach to a GitHub issue.
105
+
106
+ Plugin providers can also implement their own doctor diagnostic tests by listening to the "sf-doctor" event and
107
+ running plugin specific tests that are then included in the doctor diagnostics log.
108
+
109
+ EXAMPLES
110
+ - Run CLI doctor diagnostics:
111
+ $ sfdx doctor
112
+ Run CLI doctor diagnostics and the specified command, and write the debug output to a file:
113
+ $ sfdx doctor --command "force:org:list --all"
114
+ Run CLI doctor diagnostics for a specific plugin:
115
+ $ sfdx doctor --plugin @salesforce/plugin-source
116
+ ```
117
+
118
+ _See code: [src/commands/doctor.ts](https://github.com/salesforcecli/plugin-info/blob/v2.2.14-t.0/src/commands/doctor.ts)_
93
119
 
94
- --json format output as json
120
+ ## `sfdx info:releasenotes:display`
95
121
 
96
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
97
- this command invocation
122
+ Display Salesforce CLI release notes on the command line.
123
+
124
+ ```
125
+ USAGE
126
+ $ sfdx info:releasenotes:display
127
+
128
+ OPTIONS
129
+ -v, --version=version CLI version or tag for which to display release notes.
130
+ --json Format output as json.
98
131
 
99
132
  ALIASES
100
133
  $ sfdx whatsnew
101
134
 
102
135
  EXAMPLES
103
- Display release notes for the currently installed CLI version:
136
+ - Display release notes for the currently installed CLI version:
104
137
  $ sfdx info:releasenotes:display
105
138
  Display release notes for CLI version 7.120.0:
106
139
  $ sfdx info:releasenotes:display --version 7.120.0
@@ -108,6 +141,6 @@ EXAMPLES
108
141
  $ sfdx info:releasenotes:display --version latest
109
142
  ```
110
143
 
111
- _See code: [src/commands/info/releasenotes/display.ts](https://github.com/salesforcecli/plugin-info/blob/v2.0.1/src/commands/info/releasenotes/display.ts)_
144
+ _See code: [src/commands/info/releasenotes/display.ts](https://github.com/salesforcecli/plugin-info/blob/v2.2.14-t.0/src/commands/info/releasenotes/display.ts)_
112
145
 
113
146
  <!-- commandsstop -->
@@ -1,13 +1,15 @@
1
- import { flags, SfdxCommand } from '@salesforce/command';
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
2
  import { SfDoctorDiagnosis } from '../doctor';
3
- export default class Doctor extends SfdxCommand {
4
- static description: string;
5
- static examples: string[];
6
- protected static flagsConfig: {
7
- command: flags.Discriminated<flags.String>;
8
- plugin: flags.Discriminated<flags.String>;
9
- outputdir: flags.Discriminated<flags.String>;
10
- createissue: flags.Discriminated<flags.Boolean<boolean>>;
3
+ export default class Doctor extends SfCommand<SfDoctorDiagnosis> {
4
+ static readonly summary: string;
5
+ static readonly description: string;
6
+ static readonly examples: string[];
7
+ static readonly flags: {
8
+ command: import("@oclif/core/lib/interfaces").OptionFlag<string>;
9
+ plugin: import("@oclif/core/lib/interfaces").OptionFlag<string>;
10
+ 'output-dir': import("@oclif/core/lib/interfaces").OptionFlag<string>;
11
+ 'create-issue': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string>;
11
13
  };
12
14
  private tasks;
13
15
  private doctor;
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const os = require("os");
10
10
  const path = require("path");
11
11
  const child_process_1 = require("child_process");
12
- const command_1 = require("@salesforce/command");
12
+ const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
13
13
  const core_1 = require("@salesforce/core");
14
14
  const open = require("open");
15
15
  const got_1 = require("got");
@@ -18,7 +18,7 @@ const proxy_from_env_1 = require("proxy-from-env");
18
18
  const doctor_1 = require("../doctor");
19
19
  core_1.Messages.importMessagesDirectory(__dirname);
20
20
  const messages = core_1.Messages.loadMessages('@salesforce/plugin-info', 'doctor');
21
- class Doctor extends command_1.SfdxCommand {
21
+ class Doctor extends sf_plugins_core_1.SfCommand {
22
22
  constructor() {
23
23
  super(...arguments);
24
24
  // Array of promises that are various doctor tasks to perform
@@ -28,41 +28,38 @@ class Doctor extends command_1.SfdxCommand {
28
28
  this.filesWrittenMsgs = [];
29
29
  }
30
30
  async run() {
31
+ const { flags } = await this.parse(Doctor);
31
32
  this.doctor = doctor_1.Doctor.getInstance();
32
33
  const lifecycle = core_1.Lifecycle.getInstance();
33
- const pluginFlag = this.flags.plugin;
34
- const commandFlag = this.flags.command;
35
- const outputdirFlag = this.flags.outputdir;
36
- const createissueFlag = this.flags.createissue;
37
- this.outputDir = path.resolve(outputdirFlag ?? process.cwd());
34
+ this.outputDir = path.resolve(flags['output-dir'] ?? process.cwd());
38
35
  // eslint-disable-next-line @typescript-eslint/require-await
39
36
  lifecycle.on('Doctor:diagnostic', async (data) => {
40
- this.ux.log(`${data.status} - ${data.testName}`);
37
+ this.log(`${data.status} - ${data.testName}`);
41
38
  this.doctor.addDiagnosticStatus(data);
42
39
  });
43
- if (commandFlag) {
44
- this.setupCommandExecution(commandFlag);
40
+ if (flags.command) {
41
+ this.setupCommandExecution(flags.command);
45
42
  }
46
- if (pluginFlag) {
43
+ if (flags.plugin) {
47
44
  // verify the plugin flag matches an installed plugin
48
- const plugin = this.config.plugins.find((p) => p.name === pluginFlag);
45
+ const plugin = this.config.plugins.find((p) => p.name === flags.plugin);
49
46
  if (plugin) {
50
- const eventName = `sf-doctor-${pluginFlag}`;
47
+ const eventName = `sf-doctor-${flags.plugin}`;
51
48
  const hasDoctorHook = plugin.hooks && Object.keys(plugin.hooks).some((hook) => hook === eventName);
52
49
  if (hasDoctorHook) {
53
- this.ux.styledHeader(`Running diagnostics for plugin: ${pluginFlag}`);
50
+ this.styledHeader(`Running diagnostics for plugin: ${flags.plugin}`);
54
51
  this.tasks.push(this.config.runHook(eventName, { doctor: this.doctor }));
55
52
  }
56
53
  else {
57
- this.ux.log(`${pluginFlag} doesn't have diagnostic tests to run.`);
54
+ this.log(`${flags.plugin} doesn't have diagnostic tests to run.`);
58
55
  }
59
56
  }
60
57
  else {
61
- throw new core_1.SfError(messages.getMessage('pluginNotInstalledError', [pluginFlag]), 'UnknownPluginError');
58
+ throw new core_1.SfError(messages.getMessage('pluginNotInstalledError', [flags.plugin]), 'UnknownPluginError');
62
59
  }
63
60
  }
64
61
  else {
65
- this.ux.styledHeader('Running all diagnostics');
62
+ this.styledHeader('Running all diagnostics');
66
63
  // Fire events for plugins that have sf-doctor hooks
67
64
  this.config.plugins.forEach((plugin) => {
68
65
  const eventName = `sf-doctor-${plugin.name}`;
@@ -76,18 +73,22 @@ class Doctor extends command_1.SfdxCommand {
76
73
  const diagnosis = this.doctor.getDiagnosis();
77
74
  const diagnosisLocation = this.doctor.writeFileSync(path.join(this.outputDir, 'diagnosis.json'), JSON.stringify(diagnosis, null, 2));
78
75
  this.filesWrittenMsgs.push(`Wrote doctor diagnosis to: ${diagnosisLocation}`);
79
- this.ux.log();
80
- this.filesWrittenMsgs.forEach((msg) => this.ux.log(msg));
81
- this.ux.log();
82
- this.ux.styledHeader('Suggestions');
83
- diagnosis.suggestions.forEach((s) => this.ux.log(` * ${s}`));
84
- if (createissueFlag) {
76
+ this.log();
77
+ this.filesWrittenMsgs.forEach((msg) => this.log(msg));
78
+ this.log();
79
+ this.styledHeader('Suggestions');
80
+ diagnosis.suggestions.forEach((s) => this.log(` * ${s}`));
81
+ if (flags['create-issue']) {
85
82
  const raw = 'https://raw.githubusercontent.com/forcedotcom/cli/main/.github/ISSUE_TEMPLATE/bug_report.md';
86
83
  const ghIssue = await (0, got_1.default)(raw, {
87
84
  throwHttpErrors: false,
88
85
  agent: { https: ProxyAgent((0, proxy_from_env_1.getProxyForUrl)(raw)) },
89
86
  });
90
- const title = await this.ux.prompt('Enter a title for your new issue');
87
+ const title = (await this.prompt({
88
+ type: 'input',
89
+ name: 'title',
90
+ message: 'Enter a title for your new issue',
91
+ })).title;
91
92
  const url = encodeURI(`https://github.com/forcedotcom/cli/issues/new?title=${title}&body=${this.generateIssueMarkdown(ghIssue.body, diagnosis)}&labels=doctor,investigating,${this.config.bin}`);
92
93
  await this.openUrl(url);
93
94
  }
@@ -106,7 +107,7 @@ class Doctor extends command_1.SfdxCommand {
106
107
  const info = `
107
108
  \`\`\`
108
109
  ${diagnosis.cliConfig.userAgent}
109
- ${diagnosis.versionDetail.pluginVersions.join(os.EOL)}
110
+ ${diagnosis.versionDetail.pluginVersions?.join(os.EOL)}
110
111
  \`\`\`
111
112
  ${diagnosis.sfdxEnvVars.length
112
113
  ? `
@@ -160,8 +161,8 @@ ${this.doctor
160
161
  // in the current or specified directory.
161
162
  setupCommandExecution(command) {
162
163
  const cmdString = this.parseCommand(command);
163
- this.ux.styledHeader('Running command with debugging');
164
- this.ux.log(`${cmdString}\n`);
164
+ this.styledHeader('Running command with debugging');
165
+ this.log(`${cmdString}\n`);
165
166
  this.doctor.addCommandName(cmdString);
166
167
  const execPromise = new Promise((resolve) => {
167
168
  const execOptions = {
@@ -181,25 +182,29 @@ ${this.doctor
181
182
  }
182
183
  }
183
184
  exports.default = Doctor;
184
- Doctor.description = messages.getMessage('commandDescription');
185
+ Doctor.summary = messages.getMessage('summary');
186
+ Doctor.description = messages.getMessage('description');
185
187
  Doctor.examples = messages.getMessage('examples').split(os.EOL);
186
- Doctor.flagsConfig = {
187
- command: command_1.flags.string({
188
+ Doctor.flags = {
189
+ command: sf_plugins_core_1.Flags.string({
188
190
  char: 'c',
189
- description: messages.getMessage('flags.command'),
191
+ summary: messages.getMessage('flags.command'),
190
192
  }),
191
- plugin: command_1.flags.string({
193
+ plugin: sf_plugins_core_1.Flags.string({
192
194
  char: 'p',
193
- description: messages.getMessage('flags.plugin'),
195
+ summary: messages.getMessage('flags.plugin'),
194
196
  }),
195
- outputdir: command_1.flags.directory({
196
- char: 'o',
197
- description: messages.getMessage('flags.outputdir'),
197
+ 'output-dir': sf_plugins_core_1.Flags.directory({
198
+ char: 'd',
199
+ summary: messages.getMessage('flags.output-dir.summary'),
200
+ aliases: ['outputdir', 'o'],
198
201
  }),
199
- createissue: command_1.flags.boolean({
202
+ 'create-issue': sf_plugins_core_1.Flags.boolean({
200
203
  char: 'i',
201
- description: messages.getMessage('flags.createissue'),
204
+ summary: messages.getMessage('flags.create-issue.summary'),
202
205
  default: false,
206
+ aliases: ['createissue'],
203
207
  }),
208
+ loglevel: sf_plugins_core_1.loglevel,
204
209
  };
205
210
  //# sourceMappingURL=doctor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,yBAAyB;AACzB,6BAA6B;AAC7B,iDAAqC;AACrC,iDAAyD;AACzD,2CAAgE;AAChE,6BAA6B;AAC7B,6BAAsB;AACtB,0CAA0C;AAC1C,mDAAgD;AAChD,sCAA4E;AAG5E,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,QAAQ,CAAC,CAAC;AAE5E,MAAqB,MAAO,SAAQ,qBAAW;IAA/C;;QAwBE,6DAA6D;QAC7D,qDAAqD;QACrD,8DAA8D;QACtD,UAAK,GAAwB,EAAE,CAAC;QAGhC,qBAAgB,GAAa,EAAE,CAAC;IA4L1C,CAAC;IA1LQ,KAAK,CAAC,GAAG;QACd,IAAI,CAAC,MAAM,GAAG,eAAQ,CAAC,WAAW,EAAE,CAAC;QACrC,MAAM,SAAS,GAAG,gBAAS,CAAC,WAAW,EAAE,CAAC;QAE1C,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAgB,CAAC;QAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,OAAiB,CAAC;QACjD,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,SAAmB,CAAC;QACrD,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,WAAsB,CAAC;QAC1D,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAE9D,4DAA4D;QAC5D,SAAS,CAAC,EAAE,CAAmB,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE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;QACH,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/B,CAAC;;AAjOH,yBAkOC;AAjOwB,cAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,kBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,eAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAEzD,YAAK,GAAG;IAC7B,OAAO,EAAE,uBAAK,CAAC,MAAM,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC;KAC9C,CAAC;IACF,MAAM,EAAE,uBAAK,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC;KAC7C,CAAC;IACF,YAAY,EAAE,uBAAK,CAAC,SAAS,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;QACxD,OAAO,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC;KAC5B,CAAC;IACF,cAAc,EAAE,uBAAK,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;QAC1D,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,CAAC,aAAa,CAAC;KACzB,CAAC;IACF,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
@@ -1,17 +1,18 @@
1
- import { flags, SfdxCommand } from '@salesforce/command';
2
- export default class Display extends SfdxCommand {
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export default class Display extends SfCommand<DisplayOutput> {
3
3
  private static helpers;
4
- static description: string;
4
+ static readonly summary: string;
5
+ static readonly description: string;
5
6
  static aliases: string[];
6
- static examples: string[];
7
- protected static flagsConfig: {
8
- version: flags.Discriminated<flags.String>;
9
- hook: flags.Discriminated<flags.Boolean<boolean>>;
7
+ static readonly examples: string[];
8
+ static readonly flags: {
9
+ version: import("@oclif/core/lib/interfaces").OptionFlag<string>;
10
+ hook: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string>;
10
12
  };
11
13
  run(): Promise<DisplayOutput>;
12
14
  }
13
- interface DisplayOutput {
15
+ export interface DisplayOutput {
14
16
  body: string;
15
17
  url: string;
16
18
  }
17
- export {};
@@ -12,7 +12,7 @@ const os = require("os");
12
12
  const marked_1 = require("marked");
13
13
  const TerminalRenderer = require("marked-terminal");
14
14
  const kit_1 = require("@salesforce/kit");
15
- const command_1 = require("@salesforce/command");
15
+ const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
16
16
  const core_1 = require("@salesforce/core");
17
17
  const getInfoConfig_1 = require("../../../shared/getInfoConfig");
18
18
  const getReleaseNotes_1 = require("../../../shared/getReleaseNotes");
@@ -25,15 +25,17 @@ const HIDE_FOOTER = 'SFDX_HIDE_RELEASE_NOTES_FOOTER';
25
25
  // Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
26
26
  // or any library that is using the messages framework can also be loaded this way.
27
27
  const messages = core_1.Messages.loadMessages('@salesforce/plugin-info', 'display');
28
- class Display extends command_1.SfdxCommand {
28
+ class Display extends sf_plugins_core_1.SfCommand {
29
29
  async run() {
30
+ const logger = core_1.Logger.childFromRoot(this.constructor.name);
31
+ const { flags } = await this.parse(Display);
30
32
  const env = new kit_1.Env();
31
- const isHook = !!this.flags.hook;
33
+ const isHook = !!flags.hook;
32
34
  if (env.getBoolean(HIDE_NOTES) && isHook) {
33
35
  // We don't ever want to exit the process for info:releasenotes:display (whatsnew)
34
36
  // In most cases we will log a message, but here we only trace log in case someone using stdout of the update command
35
- this.logger.trace(`release notes disabled via env var: ${HIDE_NOTES}`);
36
- this.logger.trace('exiting');
37
+ logger.trace(`release notes disabled via env var: ${HIDE_NOTES}`);
38
+ logger.trace('exiting');
37
39
  await core_1.Lifecycle.getInstance().emitTelemetry({ eventName: 'NOTES_HIDDEN' });
38
40
  return;
39
41
  }
@@ -41,7 +43,7 @@ class Display extends command_1.SfdxCommand {
41
43
  const installedVersion = this.config.pjson.version;
42
44
  const infoConfig = await (0, getInfoConfig_1.getInfoConfig)(this.config.root);
43
45
  const { distTagUrl, releaseNotesPath, releaseNotesFilename } = infoConfig.releasenotes;
44
- let version = this.flags.version ?? installedVersion;
46
+ let version = flags.version ?? installedVersion;
45
47
  if (Display.helpers.includes(version)) {
46
48
  version = await (0, getDistTagVersion_1.getDistTagVersion)(distTagUrl, version);
47
49
  }
@@ -51,12 +53,12 @@ class Display extends command_1.SfdxCommand {
51
53
  renderer: new TerminalRenderer({ emoji: false }),
52
54
  });
53
55
  tokens.unshift(marked_1.marked.lexer(`# Release notes for '${this.config.bin}':`)[0]);
54
- if (this.flags.json) {
56
+ if (flags.json) {
55
57
  const body = tokens.map((token) => token.raw).join(os.EOL);
56
58
  return { body, url: releaseNotesPath };
57
59
  }
58
60
  else {
59
- this.ux.log(marked_1.marked.parser(tokens));
61
+ this.log(marked_1.marked.parser(tokens));
60
62
  }
61
63
  if (isHook) {
62
64
  if (env.getBoolean(HIDE_FOOTER)) {
@@ -64,7 +66,7 @@ class Display extends command_1.SfdxCommand {
64
66
  }
65
67
  else {
66
68
  const footer = messages.getMessage('footer', [this.config.bin, releaseNotesPath, HIDE_NOTES, HIDE_FOOTER]);
67
- this.ux.log(marked_1.marked.parse(footer));
69
+ this.log(marked_1.marked.parse(footer));
68
70
  }
69
71
  }
70
72
  }
@@ -73,8 +75,8 @@ class Display extends command_1.SfdxCommand {
73
75
  // Do not throw error if --hook is passed, just warn so we don't exit any processes.
74
76
  // --hook is passed in the post install/update scripts
75
77
  const { message, stack, name } = err;
76
- this.ux.warn(`${this.id} failed: ${message}`);
77
- this.logger.trace(stack);
78
+ this.warn(`${this.id} failed: ${message}`);
79
+ logger.trace(stack);
78
80
  await core_1.Lifecycle.getInstance().emitTelemetry({
79
81
  eventName: 'COMMAND_ERROR',
80
82
  type: 'EXCEPTION',
@@ -94,17 +96,21 @@ class Display extends command_1.SfdxCommand {
94
96
  }
95
97
  exports.default = Display;
96
98
  Display.helpers = ['stable', 'stable-rc', 'latest', 'latest-rc', 'rc'];
99
+ Display.summary = messages.getMessage('commandDescription');
97
100
  Display.description = messages.getMessage('commandDescription');
98
101
  Display.aliases = ['whatsnew'];
99
102
  Display.examples = messages.getMessage('examples', [Display.helpers.join(', ')]).split(os.EOL);
100
- Display.flagsConfig = {
101
- version: command_1.flags.string({
103
+ Display.flags = {
104
+ version: sf_plugins_core_1.Flags.string({
102
105
  char: 'v',
103
- description: messages.getMessage('flags.version'),
106
+ summary: messages.getMessage('flags.version.summary'),
107
+ description: messages.getMessage('flags.version.description'),
104
108
  }),
105
- hook: command_1.flags.boolean({
109
+ hook: sf_plugins_core_1.Flags.boolean({
106
110
  hidden: true,
107
- description: messages.getMessage('flags.hook'),
111
+ summary: messages.getMessage('flags.hook.summary'),
112
+ description: messages.getMessage('flags.hook.description'),
108
113
  }),
114
+ loglevel: sf_plugins_core_1.loglevel,
109
115
  };
110
116
  //# sourceMappingURL=display.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/info/releasenotes/display.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,4EAA4E;AAC5E,uDAAuD;AAEvD,yBAAyB;AACzB,mCAAgC;AAChC,oDAAoD;AACpD,yCAAsC;AACtC,iDAAyD;AACzD,2CAAuD;AAEvD,iEAA8D;AAC9D,qEAAkE;AAClE,yEAAsE;AACtE,yEAAsE;AAEtE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,UAAU,GAAG,yBAAyB,CAAC;AAC7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AAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AAEvD,eAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AACpD,mBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAEjE,eAAO,GAAG,CAAC,UAAU,CAAC,CAAC;AAEd,gBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAEvF,aAAK,GAAG;IAC7B,OAAO,EAAE,uBAAK,CAAC,MAAM,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;QACrD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;KAC9D,CAAC;IACF,IAAI,EAAE,uBAAK,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAClD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;KAC3D,CAAC;IACF,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
@@ -0,0 +1,39 @@
1
+ # commandDescription
2
+
3
+ Display Salesforce CLI release notes on the command line.
4
+
5
+ # flags.version.summary
6
+
7
+ CLI version or tag for which to display release notes.
8
+
9
+ # flags.version.description
10
+
11
+ CLI version or tag for which to display release notes.
12
+
13
+ # flags.hook.summary
14
+
15
+ This hidden parameter is used in post install or update hooks.
16
+
17
+ # flags.hook.description
18
+
19
+ This hidden parameter is used in post install or update hooks.
20
+
21
+ # examples
22
+
23
+ - Display release notes for the currently installed CLI version:
24
+ $ <%= config.bin %> <%= command.id %>
25
+ Display release notes for CLI version 7.120.0:
26
+ $ <%= config.bin %> <%= command.id %> --version 7.120.0
27
+ Display release notes for the CLI version that corresponds to a tag (%s):
28
+ $ <%= config.bin %> <%= command.id %> --version latest
29
+
30
+ # footer
31
+
32
+ ---
33
+
34
+ - Run `%s whatsnew` to manually view the current release notes.
35
+ - You can also view them on GitHub by visiting the [forcedotcom/cli](%s) repo.
36
+ - Silence notes by setting the `%s` env var to `true`.
37
+ - Hide this footer by setting the `%s` env var to `true`.
38
+
39
+ ---
@@ -0,0 +1,58 @@
1
+ # summary
2
+
3
+ Gather CLI configuration data and run diagnostic tests to discover and report potential problems in your environment.
4
+
5
+ # description
6
+
7
+ Gather CLI configuration data and run diagnostic tests to discover and report potential problems in your environment.
8
+
9
+ When you run the doctor command without parameters, it first displays a diagnostic overview of your environment. It then writes a detailed diagnosis to a JSON file in the current directory. Use the --outputdir to specify a different directory. To run diagnostic tests on a specific plugin, use the --plugin parameter. If the plugin isn't listening to the doctor, then you get a warning.
10
+
11
+ Use the --command parameter to run a specific command in debug mode; the doctor writes both stdout and stderr to \*.log files that you can provide to Salesforce Customer Support or attach to a GitHub issue.
12
+
13
+ Plugin providers can also implement their own doctor diagnostic tests by listening to the "sf-doctor" event and running plugin specific tests that are then included in the doctor diagnostics log.
14
+
15
+ # flags.command
16
+
17
+ command to run in debug mode ; results are written to a log file
18
+
19
+ # flags.plugin
20
+
21
+ specific plugin on which to run diagnostics
22
+
23
+ # flags.output-dir.summary
24
+
25
+ directory to save all created files rather than the current working directory
26
+
27
+ # flags.create-issue.summary
28
+
29
+ create a new issue on our GitHub repo and attach all diagnostic results
30
+
31
+ # examples
32
+
33
+ - Run CLI doctor diagnostics:
34
+ $ <%= config.bin %> doctor
35
+ Run CLI doctor diagnostics and the specified command, and write the debug output to a file:
36
+ $ <%= config.bin %> doctor --command "force:org:list --all"
37
+ Run CLI doctor diagnostics for a specific plugin:
38
+ $ <%= config.bin %> doctor --plugin @salesforce/plugin-source
39
+
40
+ # pinnedSuggestions.checkGitHubIssues
41
+
42
+ Check https://github.com/forcedotcom/cli/issues for CLI issues posted by the community.
43
+
44
+ # pinnedSuggestions.checkSfdcStatus
45
+
46
+ Check http://status.salesforce.com for general Salesforce availability and performance.
47
+
48
+ # doctorNotInitializedError
49
+
50
+ Must first initialize a new SfDoctor.
51
+
52
+ # doctorAlreadyInitializedError
53
+
54
+ SfDoctor has already been initialized.
55
+
56
+ # pluginNotInstalledError
57
+
58
+ Specified plugin [%s] isn't installed. Install it, correct the name, or choose another plugin.
@@ -1 +1 @@
1
- {"version":"2.2.15","commands":{"doctor":{"id":"doctor","description":"Gather CLI configuration data and run diagnostic tests to discover and report potential problems in your environment.\n\nWhen you run the doctor command without parameters, it first displays a diagnostic overview of your environment. It then writes a detailed diagnosis to a JSON file in the current directory. Use the --outputdir to specify a different directory. To run diagnostic tests on a specific plugin, use the --plugin parameter. If the plugin isn't listening to the doctor, then you get a warning.\n\nUse the --command parameter to run a specific command in debug mode; the doctor writes both stdout and stderr to *.log files that you can provide to Salesforce Customer Support or attach to a GitHub issue.\n\nPlugin providers can also implement their own doctor diagnostic tests by listening to the \"sf-doctor\" event and running plugin specific tests that are then included in the doctor diagnostics log.\n","strict":true,"usage":"<%= command.id %> [-c <string>] [-p <string>] [-o <directory>] [-i] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-info","pluginAlias":"@salesforce/plugin-info","pluginType":"core","aliases":[],"examples":["Run CLI doctor diagnostics:"," $ <%= config.bin %> doctor","Run CLI doctor diagnostics and the specified command, and write the debug output to a file:"," $ <%= config.bin %> doctor --command \"force:org:list --all\"","Run CLI doctor diagnostics for a specific plugin:"," $ <%= config.bin %> doctor --plugin @salesforce/plugin-source"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"command":{"name":"command","type":"option","char":"c","description":"command to run in debug mode ; results are written to a log file","multiple":false},"plugin":{"name":"plugin","type":"option","char":"p","description":"specific plugin on which to run diagnostics ","multiple":false},"outputdir":{"name":"outputdir","type":"option","char":"o","description":"directory to save all created files rather than the current working directory","multiple":false},"createissue":{"name":"createissue","type":"boolean","char":"i","description":"create a new issue on our GitHub repo and attach all diagnostic results","allowNo":false}},"args":[],"flagsConfig":{"command":{"kind":"string","char":"c","description":"command to run in debug mode ; results are written to a log file","input":[],"multiple":false,"type":"option"},"plugin":{"kind":"string","char":"p","description":"specific plugin on which to run diagnostics ","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"o","description":"directory to save all created files rather than the current working directory","input":[],"multiple":false,"type":"option"},"createissue":{"kind":"boolean","char":"i","description":"create a new issue on our GitHub repo and attach all diagnostic results","default":false,"allowNo":false,"type":"boolean"}}},"info:releasenotes:display":{"id":"info:releasenotes:display","description":"Display Salesforce CLI release notes on the command line.","strict":true,"usage":"<%= command.id %> [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-info","pluginAlias":"@salesforce/plugin-info","pluginType":"core","aliases":["whatsnew"],"examples":["Display release notes for the currently installed CLI version:","$ <%= config.bin %> <%= command.id %>","Display release notes for CLI version 7.120.0:","$ <%= config.bin %> <%= command.id %> --version 7.120.0","Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):","$ <%= config.bin %> <%= command.id %> --version latest"," "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"version":{"name":"version","type":"option","char":"v","description":"CLI version or tag for which to display release notes.","multiple":false},"hook":{"name":"hook","type":"boolean","description":"This hidden parameter is used in post install or update hooks.","hidden":true,"allowNo":false}},"args":[],"helpers":["stable","stable-rc","latest","latest-rc","rc"],"flagsConfig":{"version":{"kind":"string","char":"v","description":"CLI version or tag for which to display release notes.","input":[],"multiple":false,"type":"option"},"hook":{"kind":"boolean","hidden":true,"description":"This hidden parameter is used in post install or update hooks.","allowNo":false,"type":"boolean"}}}}}
1
+ {"version":"2.3.1","commands":{"doctor":{"id":"doctor","summary":"Gather CLI configuration data and run diagnostic tests to discover and report potential problems in your environment.","description":"Gather CLI configuration data and run diagnostic tests to discover and report potential problems in your environment.\n\nWhen you run the doctor command without parameters, it first displays a diagnostic overview of your environment. It then writes a detailed diagnosis to a JSON file in the current directory. Use the --outputdir to specify a different directory. To run diagnostic tests on a specific plugin, use the --plugin parameter. If the plugin isn't listening to the doctor, then you get a warning.\n\nUse the --command parameter to run a specific command in debug mode; the doctor writes both stdout and stderr to \\*.log files that you can provide to Salesforce Customer Support or attach to a GitHub issue.\n\nPlugin providers can also implement their own doctor diagnostic tests by listening to the \"sf-doctor\" event and running plugin specific tests that are then included in the doctor diagnostics log.","strict":true,"pluginName":"@salesforce/plugin-info","pluginAlias":"@salesforce/plugin-info","pluginType":"core","aliases":[],"examples":["Run CLI doctor diagnostics:","$ <%= config.bin %> doctor","Run CLI doctor diagnostics and the specified command, and write the debug output to a file:","$ <%= config.bin %> doctor --command \"force:org:list --all\"","Run CLI doctor diagnostics for a specific plugin:","$ <%= config.bin %> doctor --plugin @salesforce/plugin-source"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"command":{"name":"command","type":"option","char":"c","summary":"command to run in debug mode ; results are written to a log file","multiple":false},"plugin":{"name":"plugin","type":"option","char":"p","summary":"specific plugin on which to run diagnostics","multiple":false},"output-dir":{"name":"output-dir","type":"option","char":"d","summary":"directory to save all created files rather than the current working directory","multiple":false,"aliases":["outputdir","o"]},"create-issue":{"name":"create-issue","type":"boolean","char":"i","summary":"create a new issue on our GitHub repo and attach all diagnostic results","allowNo":false,"aliases":["createissue"]},"loglevel":{"name":"loglevel","type":"option","hidden":true,"multiple":false,"deprecated":{"message":"The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."}}},"args":[]},"info:releasenotes:display":{"id":"info:releasenotes:display","summary":"Display Salesforce CLI release notes on the command line.","description":"Display Salesforce CLI release notes on the command line.","strict":true,"pluginName":"@salesforce/plugin-info","pluginAlias":"@salesforce/plugin-info","pluginType":"core","aliases":["whatsnew"],"examples":["Display release notes for the currently installed CLI version:","$ <%= config.bin %> <%= command.id %>","Display release notes for CLI version 7.120.0:","$ <%= config.bin %> <%= command.id %> --version 7.120.0","Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):","$ <%= config.bin %> <%= command.id %> --version latest"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"version":{"name":"version","type":"option","char":"v","summary":"CLI version or tag for which to display release notes.","description":"CLI version or tag for which to display release notes.","multiple":false},"hook":{"name":"hook","type":"boolean","summary":"This hidden parameter is used in post install or update hooks.","description":"This hidden parameter is used in post install or update hooks.","hidden":true,"allowNo":false},"loglevel":{"name":"loglevel","type":"option","hidden":true,"multiple":false,"deprecated":{"message":"The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."}}},"args":[],"helpers":["stable","stable-rc","latest","latest-rc","rc"]}}}
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-info",
3
3
  "description": "Plugin for accessing cli info from the command line",
4
- "version": "2.2.15",
4
+ "version": "2.3.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "main": "lib/index.js",
8
8
  "dependencies": {
9
- "@oclif/core": "^1.20.0",
10
- "@salesforce/command": "^5.2.37",
11
- "@salesforce/core": "^3.30.12",
12
- "@salesforce/kit": "^1.6.1",
9
+ "@oclif/core": "^1.23.0",
10
+ "@salesforce/core": "^3.32.12",
11
+ "@salesforce/kit": "^1.8.0",
12
+ "@salesforce/sf-plugins-core": "^1.21.3",
13
13
  "got": "^11.8.6",
14
14
  "marked": "^4.2.5",
15
15
  "marked-terminal": "^4.2.0",
@@ -25,7 +25,7 @@
25
25
  "@salesforce/cli-plugins-testkit": "^3.2.15",
26
26
  "@salesforce/dev-config": "^3.1.0",
27
27
  "@salesforce/dev-scripts": "^3.1.0",
28
- "@salesforce/plugin-command-reference": "^1.5.9",
28
+ "@salesforce/plugin-command-reference": "^1.5.10",
29
29
  "@salesforce/prettier-config": "^0.0.2",
30
30
  "@salesforce/ts-sinon": "1.4.2",
31
31
  "@swc/core": "^1.3.24",
@@ -45,6 +45,7 @@
45
45
  "eslint-plugin-header": "^3.1.1",
46
46
  "eslint-plugin-import": "^2.26.0",
47
47
  "eslint-plugin-jsdoc": "^39.6.4",
48
+ "eslint-plugin-sf-plugin": "^1.3.1",
48
49
  "husky": "^7.0.4",
49
50
  "mocha": "^9.1.3",
50
51
  "nyc": "^15.1.0",
@@ -118,6 +119,7 @@
118
119
  "test": "sf-test",
119
120
  "test:command-reference": "./bin/dev commandreference:generate --erroronwarnings",
120
121
  "test:deprecation-policy": "./bin/dev snapshot:compare",
122
+ "test:json-schema": "./bin/dev schema:compare",
121
123
  "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
122
124
  "version": "oclif-dev readme"
123
125
  },
@@ -125,7 +127,7 @@
125
127
  "access": "public"
126
128
  },
127
129
  "sfdx": {
128
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.2.15.crt",
129
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.2.15.sig"
130
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.3.1.crt",
131
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.3.1.sig"
130
132
  }
131
133
  }
@@ -1,22 +0,0 @@
1
- module.exports = {
2
- commandDescription: 'Display Salesforce CLI release notes on the command line.',
3
- flags: {
4
- version: 'CLI version or tag for which to display release notes.',
5
- hook: 'This hidden parameter is used in post install or update hooks.',
6
- },
7
- examples: [
8
- `Display release notes for the currently installed CLI version:
9
- $ <%= config.bin %> <%= command.id %>
10
- Display release notes for CLI version 7.120.0:
11
- $ <%= config.bin %> <%= command.id %> --version 7.120.0
12
- Display release notes for the CLI version that corresponds to a tag (%s):
13
- $ <%= config.bin %> <%= command.id %> --version latest
14
- `,
15
- ],
16
- footer: `---
17
- - Run \`%s whatsnew\` to manually view the current release notes.
18
- - You can also view them on GitHub by visiting the [forcedotcom/cli](%s) repo.
19
- - Silence notes by setting the \`%s\` env var to \`true\`.
20
- - Hide this footer by setting the \`%s\` env var to \`true\`.
21
- ---`,
22
- };
@@ -1,33 +0,0 @@
1
- module.exports = {
2
- commandDescription: `Gather CLI configuration data and run diagnostic tests to discover and report potential problems in your environment.
3
-
4
- When you run the doctor command without parameters, it first displays a diagnostic overview of your environment. It then writes a detailed diagnosis to a JSON file in the current directory. Use the --outputdir to specify a different directory. To run diagnostic tests on a specific plugin, use the --plugin parameter. If the plugin isn't listening to the doctor, then you get a warning.
5
-
6
- Use the --command parameter to run a specific command in debug mode; the doctor writes both stdout and stderr to *.log files that you can provide to Salesforce Customer Support or attach to a GitHub issue.
7
-
8
- Plugin providers can also implement their own doctor diagnostic tests by listening to the "sf-doctor" event and running plugin specific tests that are then included in the doctor diagnostics log.
9
- `,
10
- flags: {
11
- command: 'command to run in debug mode ; results are written to a log file',
12
- newissue: 'create a new GitHub issue and attach all diagnostic results',
13
- plugin: 'specific plugin on which to run diagnostics ',
14
- outputdir: 'directory to save all created files rather than the current working directory',
15
- createissue: 'create a new issue on our GitHub repo and attach all diagnostic results',
16
- },
17
- examples: [
18
- `Run CLI doctor diagnostics:
19
- $ <%= config.bin %> doctor
20
- Run CLI doctor diagnostics and the specified command, and write the debug output to a file:
21
- $ <%= config.bin %> doctor --command "force:org:list --all"
22
- Run CLI doctor diagnostics for a specific plugin:
23
- $ <%= config.bin %> doctor --plugin @salesforce/plugin-source`,
24
- ],
25
- pinnedSuggestions: {
26
- checkGitHubIssues: 'Check https://github.com/forcedotcom/cli/issues for CLI issues posted by the community.',
27
- checkSfdcStatus: 'Check http://status.salesforce.com for general Salesforce availability and performance.',
28
- },
29
- doctorNotInitializedError: 'Must first initialize a new SfDoctor.',
30
- doctorAlreadyInitializedError: 'SfDoctor has already been initialized.',
31
- pluginNotInstalledError:
32
- "Specified plugin [%s] isn't installed. Install it, correct the name, or choose another plugin.",
33
- };
@@ -1,22 +0,0 @@
1
- {
2
- "HelpDefaults": "If not supplied, the apiversion, template, and outputdir use default values.\n",
3
- "HelpOutputDirRelative": "The outputdir can be an absolute path or relative to the current working directory.\n",
4
- "HelpOutputDirRelativeLightning": "If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.\n",
5
- "HelpExamplesTitle": "\nExamples:\n",
6
- "OutputDirFlagDescription": "folder for saving the created files",
7
- "OutputDirFlagLongDescription": "The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.",
8
- "TemplateFlagDescription": "template to use for file creation",
9
- "TemplateFlagLongDescription": "The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.",
10
- "TargetDirOutput": "target dir = %s",
11
- "App": "app",
12
- "Event": "event",
13
- "Interface": "interface",
14
- "Test": "test",
15
- "Component": "component",
16
- "Page": "page",
17
-
18
- "AlphaNumericNameError": "Name must contain only alphanumeric characters.",
19
- "NameMustStartWithLetterError": "Name must start with a letter.",
20
- "EndWithUnderscoreError": "Name can't end with an underscore.",
21
- "DoubleUnderscoreError": "Name can't contain 2 consecutive underscores."
22
- }