@terafina/tffa-sfdx-plugin 17.0.0-rc.7 → 17.0.0-rc.9
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 +26 -33
- package/lib/commands/tffa/apexdoc.d.ts +7 -6
- package/lib/commands/tffa/apexdoc.js +10 -9
- package/lib/commands/tffa/apexdoc.js.map +1 -1
- package/lib/commands/tffa/lint.d.ts +10 -9
- package/lib/commands/tffa/lint.js +21 -19
- package/lib/commands/tffa/lint.js.map +1 -1
- package/oclif.manifest.json +5 -120
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ $ npm install -g @terafina/tffa-sfdx-plugin
|
|
|
41
41
|
$ sfdx COMMAND
|
|
42
42
|
running command...
|
|
43
43
|
$ sfdx (--version|-v)
|
|
44
|
-
@terafina/tffa-sfdx-plugin/17.0.0-rc.
|
|
44
|
+
@terafina/tffa-sfdx-plugin/17.0.0-rc.9 linux-x64 node-v18.14.0
|
|
45
45
|
$ sfdx --help [COMMAND]
|
|
46
46
|
USAGE
|
|
47
47
|
$ sfdx COMMAND
|
|
@@ -53,10 +53,10 @@ USAGE
|
|
|
53
53
|
|
|
54
54
|
<!-- commands -->
|
|
55
55
|
* [`sfdx help [COMMANDS]`](#sfdx-help-commands)
|
|
56
|
-
* [`sfdx tffa:apexdoc
|
|
56
|
+
* [`sfdx tffa:apexdoc`](#sfdx-tffaapexdoc)
|
|
57
57
|
* [`sfdx tffa:data:export -s <array> [-d <string>] [-g <string>] [-o <array>] [-c <array>] [-s] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-tffadataexport--s-array--d-string--g-string--o-array--c-array--s--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
58
58
|
* [`sfdx tffa:data:import [-f <array>] [-p <string>] [-s <array>] [-i] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-tffadataimport--f-array--p-string--s-array--i--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
59
|
-
* [`sfdx tffa:lint
|
|
59
|
+
* [`sfdx tffa:lint`](#sfdx-tffalint)
|
|
60
60
|
* [`sfdx tffa:meta [-s <directory>] [-d <directory>] [-c <directory>] [-o json|csv|human] [-f] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-tffameta--s-directory--d-directory--c-directory--o-jsoncsvhuman--f---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
61
61
|
* [`sfdx tffa:ping [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-tffaping---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
62
62
|
* [`sfdx tffa:source:apiset [-h <help>] [-s <directory>] [-a <integer>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-tffasourceapiset--h-help--s-directory--a-integer---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
@@ -83,22 +83,20 @@ DESCRIPTION
|
|
|
83
83
|
|
|
84
84
|
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.4/src/commands/help.ts)_
|
|
85
85
|
|
|
86
|
-
## `sfdx tffa:apexdoc
|
|
86
|
+
## `sfdx tffa:apexdoc`
|
|
87
87
|
|
|
88
88
|
Command to generate apex documentation similar to javadoc based on the comments in apex classes.
|
|
89
89
|
|
|
90
90
|
```
|
|
91
91
|
USAGE
|
|
92
|
-
$ sfdx tffa:apexdoc [-s <
|
|
93
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
92
|
+
$ sfdx tffa:apexdoc [--json] [-s <value>] [-d <value>]
|
|
94
93
|
|
|
95
94
|
FLAGS
|
|
96
|
-
-d, --destfolder=<value>
|
|
97
|
-
-s, --sourcefolder=<value>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
--
|
|
101
|
-
this command invocation
|
|
95
|
+
-d, --destfolder=<value> directory to generate the api docs
|
|
96
|
+
-s, --sourcefolder=<value> [default: .] directory containing sfdx project
|
|
97
|
+
|
|
98
|
+
GLOBAL FLAGS
|
|
99
|
+
--json Format output as json.
|
|
102
100
|
|
|
103
101
|
DESCRIPTION
|
|
104
102
|
Command to generate apex documentation similar to javadoc based on the comments in apex classes.
|
|
@@ -111,7 +109,7 @@ EXAMPLES
|
|
|
111
109
|
$ sfdx tffa:apexdoc
|
|
112
110
|
```
|
|
113
111
|
|
|
114
|
-
_See code: [src/commands/tffa/apexdoc.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.
|
|
112
|
+
_See code: [src/commands/tffa/apexdoc.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.9/src/commands/tffa/apexdoc.ts)_
|
|
115
113
|
|
|
116
114
|
## `sfdx tffa:data:export -s <array> [-d <string>] [-g <string>] [-o <array>] [-c <array>] [-s] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
117
115
|
|
|
@@ -180,7 +178,7 @@ EXAMPLES
|
|
|
180
178
|
Writing 144 records to ./data/configuration/DisclosureMatrix__c.json
|
|
181
179
|
```
|
|
182
180
|
|
|
183
|
-
_See code: [src/commands/tffa/data/export.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.
|
|
181
|
+
_See code: [src/commands/tffa/data/export.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.9/src/commands/tffa/data/export.ts)_
|
|
184
182
|
|
|
185
183
|
## `sfdx tffa:data:import [-f <array>] [-p <string>] [-s <array>] [-i] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
186
184
|
|
|
@@ -268,28 +266,23 @@ EXAMPLES
|
|
|
268
266
|
Importing record(s) and relationships of tffa__AddOnService__c... done
|
|
269
267
|
```
|
|
270
268
|
|
|
271
|
-
_See code: [src/commands/tffa/data/import.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.
|
|
269
|
+
_See code: [src/commands/tffa/data/import.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.9/src/commands/tffa/data/import.ts)_
|
|
272
270
|
|
|
273
|
-
## `sfdx tffa:lint
|
|
271
|
+
## `sfdx tffa:lint`
|
|
274
272
|
|
|
275
273
|
Scans a sfdx project and provide a violations report based on defined standards.
|
|
276
274
|
|
|
277
275
|
```
|
|
278
276
|
USAGE
|
|
279
|
-
$ sfdx tffa:lint [-s <
|
|
280
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
277
|
+
$ sfdx tffa:lint [-j] [-s <value>] [-m <value>] [-r <value>] [-e] [-f]
|
|
281
278
|
|
|
282
279
|
FLAGS
|
|
283
|
-
-e, --eject
|
|
284
|
-
-f, --level
|
|
285
|
-
-j, --json
|
|
286
|
-
-m, --minapi=<value>
|
|
287
|
-
|
|
288
|
-
-
|
|
289
|
-
-s, --sourcefolder=<value> [default: .] directory containing
|
|
290
|
-
sfdx project
|
|
291
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
292
|
-
this command invocation
|
|
280
|
+
-e, --eject update local pmd ruleset
|
|
281
|
+
-f, --level emit fatal violations only
|
|
282
|
+
-j, --json generate json output
|
|
283
|
+
-m, --minapi=<value> [default: 56] minimum api version to use during quality checks
|
|
284
|
+
-r, --rulesetpath=<value> path to pmd ruleset
|
|
285
|
+
-s, --sourcefolder=<value> [default: .] directory containing sfdx project
|
|
293
286
|
|
|
294
287
|
DESCRIPTION
|
|
295
288
|
Scans a sfdx project and provide a violations report based on defined standards.
|
|
@@ -327,7 +320,7 @@ EXAMPLES
|
|
|
327
320
|
$sfdx tffa:lint
|
|
328
321
|
```
|
|
329
322
|
|
|
330
|
-
_See code: [src/commands/tffa/lint.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.
|
|
323
|
+
_See code: [src/commands/tffa/lint.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.9/src/commands/tffa/lint.ts)_
|
|
331
324
|
|
|
332
325
|
## `sfdx tffa:meta [-s <directory>] [-d <directory>] [-c <directory>] [-o json|csv|human] [-f] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
333
326
|
|
|
@@ -356,7 +349,7 @@ EXAMPLES
|
|
|
356
349
|
$ sfdx tffa:meta
|
|
357
350
|
```
|
|
358
351
|
|
|
359
|
-
_See code: [src/commands/tffa/meta.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.
|
|
352
|
+
_See code: [src/commands/tffa/meta.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.9/src/commands/tffa/meta.ts)_
|
|
360
353
|
|
|
361
354
|
## `sfdx tffa:ping [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
362
355
|
|
|
@@ -378,7 +371,7 @@ EXAMPLES
|
|
|
378
371
|
$ sfdx tffa:ping
|
|
379
372
|
```
|
|
380
373
|
|
|
381
|
-
_See code: [src/commands/tffa/ping.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.
|
|
374
|
+
_See code: [src/commands/tffa/ping.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.9/src/commands/tffa/ping.ts)_
|
|
382
375
|
|
|
383
376
|
## `sfdx tffa:source:apiset [-h <help>] [-s <directory>] [-a <integer>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
384
377
|
|
|
@@ -406,7 +399,7 @@ EXAMPLES
|
|
|
406
399
|
$ sfdx tffa:source:apiset
|
|
407
400
|
```
|
|
408
401
|
|
|
409
|
-
_See code: [src/commands/tffa/source/apiset.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.
|
|
402
|
+
_See code: [src/commands/tffa/source/apiset.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.9/src/commands/tffa/source/apiset.ts)_
|
|
410
403
|
|
|
411
404
|
## `sfdx tffa:source:createfield -s <string> -n <string> -t checkbox|currency|date|datetime|email|number|percent|phone|picklist|picklist-multi|text|textarea|textarea-long|textarea-rich [-r] [-l <number>] [-d <string>] [-p <array>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
412
405
|
|
|
@@ -493,7 +486,7 @@ EXAMPLES
|
|
|
493
486
|
Creates a long textarea field
|
|
494
487
|
```
|
|
495
488
|
|
|
496
|
-
_See code: [src/commands/tffa/source/createfield.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.
|
|
489
|
+
_See code: [src/commands/tffa/source/createfield.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.9/src/commands/tffa/source/createfield.ts)_
|
|
497
490
|
|
|
498
491
|
## `sfdx version`
|
|
499
492
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) NCR Terafina
|
|
3
3
|
**/
|
|
4
|
-
import {
|
|
5
|
-
export default class ApexDoc extends
|
|
4
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
5
|
+
export default class ApexDoc extends SfCommand<void> {
|
|
6
6
|
static description: string;
|
|
7
|
+
private logger;
|
|
7
8
|
static examples: string[];
|
|
8
9
|
private currentFile;
|
|
9
|
-
|
|
10
|
-
sourcefolder:
|
|
11
|
-
destfolder:
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
sourcefolder: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
destfolder: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
13
|
};
|
|
13
|
-
run(): Promise<
|
|
14
|
+
run(): Promise<void>;
|
|
14
15
|
/**
|
|
15
16
|
* Entry point for the program. Called by SFDX on extension activation.
|
|
16
17
|
*
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
**/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
-
const command_1 = require("@salesforce/command");
|
|
8
7
|
const Models = tslib_1.__importStar(require("../../services/apexdoc/common/models"));
|
|
9
8
|
const core_1 = require("@salesforce/core");
|
|
10
9
|
const settings_1 = tslib_1.__importStar(require("../../services/apexdoc/common/settings"));
|
|
@@ -14,20 +13,22 @@ const perf_hooks_1 = require("perf_hooks");
|
|
|
14
13
|
const line_reader_1 = tslib_1.__importDefault(require("../../services/apexdoc/common/line-reader"));
|
|
15
14
|
const utils_1 = tslib_1.__importDefault(require("../../services/apexdoc/common/utils"));
|
|
16
15
|
const array_utils_1 = require("../../services/apexdoc/common/array-utils");
|
|
16
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
17
17
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
18
|
const messages = core_1.Messages.loadMessages('@terafina/tffa-sfdx-plugin', 'apexdoc');
|
|
19
|
-
class ApexDoc extends
|
|
19
|
+
class ApexDoc extends sf_plugins_core_1.SfCommand {
|
|
20
20
|
async run() {
|
|
21
|
-
|
|
21
|
+
this.logger = core_1.Logger.childFromRoot(this.constructor.name);
|
|
22
|
+
const { flags } = await this.parse(ApexDoc);
|
|
23
|
+
await core_1.SfProject.resolve(flags.sourcefolder);
|
|
22
24
|
try {
|
|
23
|
-
settings_1.default.config = settings_1.default.getConfig(settings_1.Feature.ENGINE,
|
|
25
|
+
settings_1.default.config = settings_1.default.getConfig(settings_1.Feature.ENGINE, flags.sourcefolder, flags.destfolder);
|
|
24
26
|
this.generateDocs(settings_1.default.config);
|
|
25
27
|
}
|
|
26
28
|
catch (e) {
|
|
27
29
|
this.logger.error(e);
|
|
28
|
-
throw new core_1.
|
|
30
|
+
throw new core_1.SfError(e.message, 'XMLNotFoundError');
|
|
29
31
|
}
|
|
30
|
-
return '';
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
33
34
|
* Entry point for the program. Called by SFDX on extension activation.
|
|
@@ -267,13 +268,13 @@ class ApexDoc extends command_1.SfdxCommand {
|
|
|
267
268
|
exports.default = ApexDoc;
|
|
268
269
|
ApexDoc.description = messages.getMessage('commandDescription');
|
|
269
270
|
ApexDoc.examples = [`$ sfdx tffa:apexdoc`];
|
|
270
|
-
ApexDoc.
|
|
271
|
-
sourcefolder:
|
|
271
|
+
ApexDoc.flags = {
|
|
272
|
+
sourcefolder: sf_plugins_core_1.Flags.directory({
|
|
272
273
|
char: 's',
|
|
273
274
|
description: messages.getMessage('sourceFolderDescription'),
|
|
274
275
|
default: '.'
|
|
275
276
|
}),
|
|
276
|
-
destfolder:
|
|
277
|
+
destfolder: sf_plugins_core_1.Flags.directory({
|
|
277
278
|
char: 'd',
|
|
278
279
|
description: messages.getMessage('destFolderDescription')
|
|
279
280
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apexdoc.js","sourceRoot":"","sources":["../../../src/commands/tffa/apexdoc.ts"],"names":[],"mappings":";AAAA;;IAEI;;;AAEJ,
|
|
1
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AC,SAAS,EAAE,CAAC,CAAC;YACxC,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YACxD,YAAY,GAAG,SAAS,CAAC;SAC1B;QAED,OAA6B,YAAY,CAAC;IAC5C,CAAC;;AA/SH,0BAgTC;AA/Se,mBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAGxD,gBAAQ,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAG1B,aAAK,GAAG;IAC7B,YAAY,EAAE,uBAAK,CAAC,SAAS,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;QAC3D,OAAO,EAAE,GAAG;KACb,CAAC;IACF,UAAU,EAAE,uBAAK,CAAC,SAAS,CAAC;QAC1B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;KAC1D,CAAC;CACH,CAAC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) NCR Terafina
|
|
3
3
|
**/
|
|
4
|
-
import {
|
|
5
|
-
export default class Lint extends
|
|
4
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
5
|
+
export default class Lint extends SfCommand<void> {
|
|
6
6
|
static description: string;
|
|
7
7
|
static examples: string[];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
private logger;
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
sourcefolder: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
minapi: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
rulesetpath: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
+
eject: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
level: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
};
|
|
16
17
|
run(): Promise<any>;
|
|
17
18
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
**/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
-
const
|
|
7
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
8
8
|
const core_1 = require("@salesforce/core");
|
|
9
9
|
const apex_class_scan_1 = tslib_1.__importDefault(require("../../services/lint/apex-class-scan"));
|
|
10
10
|
const ignored_files_1 = tslib_1.__importDefault(require("../../utils/ignored-files"));
|
|
@@ -15,30 +15,32 @@ const eslint_scan_1 = tslib_1.__importDefault(require("../../services/lint/eslin
|
|
|
15
15
|
const stylelint_scan_1 = tslib_1.__importDefault(require("../../services/lint/stylelint-scan"));
|
|
16
16
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
17
17
|
const messages = core_1.Messages.loadMessages('@terafina/tffa-sfdx-plugin', 'lint');
|
|
18
|
-
class Lint extends
|
|
18
|
+
class Lint extends sf_plugins_core_1.SfCommand {
|
|
19
19
|
async run() {
|
|
20
|
-
|
|
20
|
+
this.logger = core_1.Logger.childFromRoot(this.constructor.name);
|
|
21
|
+
const { flags } = await this.parse(Lint);
|
|
22
|
+
const project = await core_1.SfProject.resolve(flags.sourcefolder);
|
|
21
23
|
const projectJson = await project.resolveProjectConfig();
|
|
22
24
|
const namespace = projectJson.namespace;
|
|
23
25
|
this.logger.info('namespace: [' + namespace + ']');
|
|
24
|
-
if (
|
|
25
|
-
await new apex_pmd_1.default().eject(
|
|
26
|
+
if (flags.eject) {
|
|
27
|
+
await new apex_pmd_1.default().eject(flags.sourcefolder);
|
|
26
28
|
return;
|
|
27
29
|
}
|
|
28
30
|
const violations = [];
|
|
29
31
|
let mViolations = [];
|
|
30
|
-
await ignored_files_1.default.init(
|
|
31
|
-
mViolations = await new apex_class_scan_1.default().scan(
|
|
32
|
+
await ignored_files_1.default.init(flags.sourcefolder);
|
|
33
|
+
mViolations = await new apex_class_scan_1.default().scan(flags.sourcefolder);
|
|
32
34
|
violations.push(...mViolations);
|
|
33
|
-
mViolations = await new metadata_scan_1.default(namespace).scan(
|
|
35
|
+
mViolations = await new metadata_scan_1.default(namespace).scan(flags.sourcefolder, flags.minapi);
|
|
34
36
|
violations.push(...mViolations);
|
|
35
|
-
mViolations = await new apex_pmd_1.default().scan(
|
|
37
|
+
mViolations = await new apex_pmd_1.default().scan(flags.sourcefolder, flags.rulesetpath);
|
|
36
38
|
violations.push(...mViolations);
|
|
37
|
-
mViolations = await new eslint_scan_1.default().scan(
|
|
39
|
+
mViolations = await new eslint_scan_1.default().scan(flags.sourcefolder);
|
|
38
40
|
violations.push(...mViolations);
|
|
39
|
-
mViolations = await new stylelint_scan_1.default().scan(
|
|
41
|
+
mViolations = await new stylelint_scan_1.default().scan(flags.sourcefolder);
|
|
40
42
|
violations.push(...mViolations);
|
|
41
|
-
this.printViolations(
|
|
43
|
+
this.printViolations(flags.json, violations, flags.level);
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* print output
|
|
@@ -62,30 +64,30 @@ class Lint extends command_1.SfdxCommand {
|
|
|
62
64
|
exports.default = Lint;
|
|
63
65
|
Lint.description = messages.getMessage('commandDescription');
|
|
64
66
|
Lint.examples = [`$sfdx tffa:lint`];
|
|
65
|
-
Lint.
|
|
66
|
-
sourcefolder:
|
|
67
|
+
Lint.flags = {
|
|
68
|
+
sourcefolder: sf_plugins_core_1.Flags.directory({
|
|
67
69
|
char: 's',
|
|
68
70
|
description: messages.getMessage('sourceFolderDescription'),
|
|
69
71
|
default: '.'
|
|
70
72
|
}),
|
|
71
|
-
minapi:
|
|
73
|
+
minapi: sf_plugins_core_1.Flags.integer({
|
|
72
74
|
char: 'm',
|
|
73
75
|
description: messages.getMessage('flagApiversionDescription'),
|
|
74
76
|
default: constants_1.Constants.API_VERSION
|
|
75
77
|
}),
|
|
76
|
-
json:
|
|
78
|
+
json: sf_plugins_core_1.Flags.boolean({
|
|
77
79
|
char: 'j',
|
|
78
80
|
description: 'generate json output'
|
|
79
81
|
}),
|
|
80
|
-
rulesetpath:
|
|
82
|
+
rulesetpath: sf_plugins_core_1.Flags.file({
|
|
81
83
|
char: 'r',
|
|
82
84
|
description: 'path to pmd ruleset'
|
|
83
85
|
}),
|
|
84
|
-
eject:
|
|
86
|
+
eject: sf_plugins_core_1.Flags.boolean({
|
|
85
87
|
char: 'e',
|
|
86
88
|
description: 'update local pmd ruleset'
|
|
87
89
|
}),
|
|
88
|
-
level:
|
|
90
|
+
level: sf_plugins_core_1.Flags.boolean({
|
|
89
91
|
char: 'f',
|
|
90
92
|
description: 'emit fatal violations only'
|
|
91
93
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.js","sourceRoot":"","sources":["../../../src/commands/tffa/lint.ts"],"names":[],"mappings":";AAAA;;IAEI;;;AAEJ,
|
|
1
|
+
{"version":3,"file":"lint.js","sourceRoot":"","sources":["../../../src/commands/tffa/lint.ts"],"names":[],"mappings":";AAAA;;IAEI;;;AAEJ,iEAA+D;AAC/D,2CAA+D;AAC/D,kGAAgE;AAChE,sFAAqD;AACrD,8FAA6D;AAC7D,oFAAmD;AACnD,qDAAkD;AAClD,0FAAyD;AACzD,gGAA+D;AAE/D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC;AAE7E,MAAqB,IAAK,SAAQ,2BAAe;IAkCxC,KAAK,CAAC,GAAG;QACd,IAAI,CAAC,MA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CAAC,SAAS,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;QAC3D,OAAO,EAAE,GAAG;KACb,CAAC;IACF,MAAM,EAAE,uBAAK,CAAC,OAAO,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;QAC7D,OAAO,EAAE,qBAAS,CAAC,WAAW;KAC/B,CAAC;IACF,IAAI,EAAE,uBAAK,CAAC,OAAO,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,sBAAsB;KACpC,CAAC;IACF,WAAW,EAAE,uBAAK,CAAC,IAAI,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,qBAAqB;KACnC,CAAC;IACF,KAAK,EAAE,uBAAK,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,0BAA0B;KACxC,CAAC;IACF,KAAK,EAAE,uBAAK,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,4BAA4B;KAC1C,CAAC;CACH,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "17.0.0-rc.
|
|
2
|
+
"version": "17.0.0-rc.9",
|
|
3
3
|
"commands": {
|
|
4
4
|
"tffa:apexdoc": {
|
|
5
5
|
"id": "tffa:apexdoc",
|
|
6
6
|
"description": "Command to generate apex documentation similar to javadoc based on the comments in apex classes.\nPlease read more at [Documenting Apex Classes](development-guidelines/documentation).\nOnce generated you can use vscode plugin [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) and select index.html from generated folder and run Open with LiveServer to render the html",
|
|
7
7
|
"strict": true,
|
|
8
|
-
"usage": "<%= command.id %> [-s <directory>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
9
8
|
"pluginName": "@terafina/tffa-sfdx-plugin",
|
|
10
9
|
"pluginAlias": "@terafina/tffa-sfdx-plugin",
|
|
11
10
|
"pluginType": "core",
|
|
@@ -17,32 +16,10 @@
|
|
|
17
16
|
"json": {
|
|
18
17
|
"name": "json",
|
|
19
18
|
"type": "boolean",
|
|
20
|
-
"description": "
|
|
19
|
+
"description": "Format output as json.",
|
|
20
|
+
"helpGroup": "GLOBAL",
|
|
21
21
|
"allowNo": false
|
|
22
22
|
},
|
|
23
|
-
"loglevel": {
|
|
24
|
-
"name": "loglevel",
|
|
25
|
-
"type": "option",
|
|
26
|
-
"description": "logging level for this command invocation",
|
|
27
|
-
"required": false,
|
|
28
|
-
"helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
|
|
29
|
-
"multiple": false,
|
|
30
|
-
"options": [
|
|
31
|
-
"trace",
|
|
32
|
-
"debug",
|
|
33
|
-
"info",
|
|
34
|
-
"warn",
|
|
35
|
-
"error",
|
|
36
|
-
"fatal",
|
|
37
|
-
"TRACE",
|
|
38
|
-
"DEBUG",
|
|
39
|
-
"INFO",
|
|
40
|
-
"WARN",
|
|
41
|
-
"ERROR",
|
|
42
|
-
"FATAL"
|
|
43
|
-
],
|
|
44
|
-
"default": "warn"
|
|
45
|
-
},
|
|
46
23
|
"sourcefolder": {
|
|
47
24
|
"name": "sourcefolder",
|
|
48
25
|
"type": "option",
|
|
@@ -59,32 +36,12 @@
|
|
|
59
36
|
"multiple": false
|
|
60
37
|
}
|
|
61
38
|
},
|
|
62
|
-
"args": {}
|
|
63
|
-
"flagsConfig": {
|
|
64
|
-
"sourcefolder": {
|
|
65
|
-
"kind": "directory",
|
|
66
|
-
"char": "s",
|
|
67
|
-
"description": "directory containing sfdx project",
|
|
68
|
-
"default": ".",
|
|
69
|
-
"input": [],
|
|
70
|
-
"multiple": false,
|
|
71
|
-
"type": "option"
|
|
72
|
-
},
|
|
73
|
-
"destfolder": {
|
|
74
|
-
"kind": "directory",
|
|
75
|
-
"char": "d",
|
|
76
|
-
"description": "directory to generate the api docs",
|
|
77
|
-
"input": [],
|
|
78
|
-
"multiple": false,
|
|
79
|
-
"type": "option"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
39
|
+
"args": {}
|
|
82
40
|
},
|
|
83
41
|
"tffa:lint": {
|
|
84
42
|
"id": "tffa:lint",
|
|
85
43
|
"description": "Scans a sfdx project and provide a violations report based on defined standards.\nPerforms static analysis of source code with a command-line interface and report output.\nThe command creates \"Rule Violations\" when the it identifies issues. Developers use this information as feedback to fix their code.\n\nThe rules used in the lint command are:\n\n- [Apex PMD](https://pmd.github.io/latest/pmd_rules_apex.html) to statically analyse Apex Code to find design, performance and security vulnerabilities. It allowes us to have a better quality and avoid maintenance, performance and bug problems in our Apex code. for Salesforce apex classes are scans during build and development process.\n- Custom rules\n - Custom Objects should have a description\n - Custom Fields should have a description'\n - Custom fields should not contain underscores.\n - Custom fields in managed object should start with CZ.\n - Custom objects should start with CZ.\n - Using Metadata API Version and Project source api version should be the latest supported.\n - Files violating naming conventions\n - Do not use isCreateable, isAccessible, isUpdateable, CRUD/FLS Checks are checked by tffa.AbstractRepository\n - Do not call methods directly of an abstract class. Call methods from Repository classes extending tffa.AbstractRepository\n - Do not call methods directly of an abstract class. Call methods from Controllers classes extending tffa.AbstractController',\n - Do not call methods directly of an abstract class. Call methods from RESTService classes extending tffa.AbstractRESTService\n - Any SOQL should be encapsulated into Repository classes extending tffa.AbstractRepository. Use doQuery method\n - Do not supress PMD warnings using @SupressWarnings\n\nThe lint command is integrated into the jenkins build to report violations and fail builds\n",
|
|
86
44
|
"strict": true,
|
|
87
|
-
"usage": "<%= command.id %> [-s <directory>] [-m <integer>] [-r <filepath>] [-e] [-f] [-j] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
88
45
|
"pluginName": "@terafina/tffa-sfdx-plugin",
|
|
89
46
|
"pluginAlias": "@terafina/tffa-sfdx-plugin",
|
|
90
47
|
"pluginType": "core",
|
|
@@ -100,29 +57,6 @@
|
|
|
100
57
|
"description": "generate json output",
|
|
101
58
|
"allowNo": false
|
|
102
59
|
},
|
|
103
|
-
"loglevel": {
|
|
104
|
-
"name": "loglevel",
|
|
105
|
-
"type": "option",
|
|
106
|
-
"description": "logging level for this command invocation",
|
|
107
|
-
"required": false,
|
|
108
|
-
"helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
|
|
109
|
-
"multiple": false,
|
|
110
|
-
"options": [
|
|
111
|
-
"trace",
|
|
112
|
-
"debug",
|
|
113
|
-
"info",
|
|
114
|
-
"warn",
|
|
115
|
-
"error",
|
|
116
|
-
"fatal",
|
|
117
|
-
"TRACE",
|
|
118
|
-
"DEBUG",
|
|
119
|
-
"INFO",
|
|
120
|
-
"WARN",
|
|
121
|
-
"ERROR",
|
|
122
|
-
"FATAL"
|
|
123
|
-
],
|
|
124
|
-
"default": "warn"
|
|
125
|
-
},
|
|
126
60
|
"sourcefolder": {
|
|
127
61
|
"name": "sourcefolder",
|
|
128
62
|
"type": "option",
|
|
@@ -161,56 +95,7 @@
|
|
|
161
95
|
"allowNo": false
|
|
162
96
|
}
|
|
163
97
|
},
|
|
164
|
-
"args": {}
|
|
165
|
-
"flagsConfig": {
|
|
166
|
-
"sourcefolder": {
|
|
167
|
-
"kind": "directory",
|
|
168
|
-
"char": "s",
|
|
169
|
-
"description": "directory containing sfdx project",
|
|
170
|
-
"default": ".",
|
|
171
|
-
"input": [],
|
|
172
|
-
"multiple": false,
|
|
173
|
-
"type": "option"
|
|
174
|
-
},
|
|
175
|
-
"minapi": {
|
|
176
|
-
"kind": "integer",
|
|
177
|
-
"char": "m",
|
|
178
|
-
"description": "minimum api version to use during quality checks",
|
|
179
|
-
"default": 56,
|
|
180
|
-
"input": [],
|
|
181
|
-
"multiple": false,
|
|
182
|
-
"type": "option"
|
|
183
|
-
},
|
|
184
|
-
"json": {
|
|
185
|
-
"kind": "boolean",
|
|
186
|
-
"char": "j",
|
|
187
|
-
"description": "generate json output",
|
|
188
|
-
"allowNo": false,
|
|
189
|
-
"type": "boolean"
|
|
190
|
-
},
|
|
191
|
-
"rulesetpath": {
|
|
192
|
-
"kind": "filepath",
|
|
193
|
-
"char": "r",
|
|
194
|
-
"description": "path to pmd ruleset",
|
|
195
|
-
"input": [],
|
|
196
|
-
"multiple": false,
|
|
197
|
-
"type": "option"
|
|
198
|
-
},
|
|
199
|
-
"eject": {
|
|
200
|
-
"kind": "boolean",
|
|
201
|
-
"char": "e",
|
|
202
|
-
"description": "update local pmd ruleset",
|
|
203
|
-
"allowNo": false,
|
|
204
|
-
"type": "boolean"
|
|
205
|
-
},
|
|
206
|
-
"level": {
|
|
207
|
-
"kind": "boolean",
|
|
208
|
-
"char": "f",
|
|
209
|
-
"description": "emit fatal violations only",
|
|
210
|
-
"allowNo": false,
|
|
211
|
-
"type": "boolean"
|
|
212
|
-
}
|
|
213
|
-
}
|
|
98
|
+
"args": {}
|
|
214
99
|
},
|
|
215
100
|
"tffa:meta": {
|
|
216
101
|
"id": "tffa:meta",
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terafina/tffa-sfdx-plugin",
|
|
3
3
|
"description": "sfdx plugin from Terafina containing tools for scanning and extending digital applications for the financial services industry.",
|
|
4
|
-
"version": "17.0.0-rc.
|
|
4
|
+
"version": "17.0.0-rc.9",
|
|
5
5
|
"author": "Terafina Inc",
|
|
6
6
|
"bugs": "https://github.com/terafinainc/tffa-sfdx-plugin/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "2.0.
|
|
8
|
+
"@oclif/core": "2.0.11",
|
|
9
9
|
"@oclif/plugin-help": "5.2.4",
|
|
10
10
|
"@oclif/plugin-plugins": "2.3.0",
|
|
11
11
|
"@oclif/plugin-version": "1.2.1",
|
|
12
12
|
"@oclif/plugin-warn-if-update-available": "2.0.26",
|
|
13
|
-
"@salesforce/command": "5.
|
|
13
|
+
"@salesforce/command": "5.3.0",
|
|
14
14
|
"@salesforce/core": "3.33.1",
|
|
15
|
+
"@salesforce/sf-plugins-core": "2.0.2",
|
|
15
16
|
"find-java-home": "2.0.0",
|
|
16
17
|
"cheerio": "1.0.0-rc.12",
|
|
17
|
-
"csv-stringify": "6.2.
|
|
18
|
+
"csv-stringify": "6.2.4",
|
|
18
19
|
"fs-extra": "11.1.0",
|
|
19
20
|
"lodash.escape": "4.0.1",
|
|
20
21
|
"pretty": "2.0.0",
|
|
@@ -35,11 +36,11 @@
|
|
|
35
36
|
"@types/fs-extra": "11.0.1",
|
|
36
37
|
"@types/js-yaml": "4.0.5",
|
|
37
38
|
"@types/mocha": "10.0.1",
|
|
38
|
-
"@types/node": "18.
|
|
39
|
+
"@types/node": "18.13.0",
|
|
39
40
|
"@types/recursive-readdir": "2.2.1",
|
|
40
41
|
"@types/xml2js": "0.4.11",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
42
|
-
"@typescript-eslint/parser": "5.
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "5.51.0",
|
|
43
|
+
"@typescript-eslint/parser": "5.51.0",
|
|
43
44
|
"chai": "4",
|
|
44
45
|
"eslint": "8.33.0",
|
|
45
46
|
"eslint-config-prettier": "8.6.0",
|
|
@@ -57,8 +58,8 @@
|
|
|
57
58
|
"mem-fs-editor": "9.6.0",
|
|
58
59
|
"mocha": "10.2.0",
|
|
59
60
|
"nyc": "15.1.0",
|
|
60
|
-
"oclif": "3.6.
|
|
61
|
-
"prettier": "2.8.
|
|
61
|
+
"oclif": "3.6.3",
|
|
62
|
+
"prettier": "2.8.4",
|
|
62
63
|
"prettier-plugin-apex": "1.12.0",
|
|
63
64
|
"properties-parser": "0.3.1",
|
|
64
65
|
"properties-reader": "2.2.0",
|