@terafina/tffa-sfdx-plugin 14.0.0 → 14.1.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 +42 -12
- package/bin/pmd/apex_ruleset.xml +104 -0
- package/bin/pmd/apex_test_ruleset.xml +1 -1
- package/bin/pmd/apex_vf_ruleset.xml +17 -0
- package/bin/pmd/lib/pmd-visualforce-6.47.0.jar +0 -0
- package/bin/update.sh +0 -1
- package/lib/commands/tffa/apexdoc.d.ts +1 -0
- package/lib/commands/tffa/apexdoc.js +12 -3
- package/lib/commands/tffa/apexdoc.js.map +1 -1
- package/lib/commands/tffa/lint.js +10 -7
- package/lib/commands/tffa/lint.js.map +1 -1
- package/lib/commands/tffa/source/apiset.d.ts +11 -0
- package/lib/commands/tffa/source/apiset.js +89 -0
- package/lib/commands/tffa/source/apiset.js.map +1 -0
- package/lib/services/apexdoc/common/models/apex-model.js +7 -2
- package/lib/services/apexdoc/common/models/apex-model.js.map +1 -1
- package/lib/services/apexdoc/common/models/class-model.d.ts +3 -0
- package/lib/services/apexdoc/common/models/class-model.js +7 -0
- package/lib/services/apexdoc/common/models/class-model.js.map +1 -1
- package/lib/services/apexdoc/common/models/engine-config.d.ts +1 -1
- package/lib/services/apexdoc/common/models/engine-config.js +8 -3
- package/lib/services/apexdoc/common/models/engine-config.js.map +1 -1
- package/lib/services/apexdoc/common/settings.d.ts +2 -1
- package/lib/services/apexdoc/common/settings.js +16 -3
- package/lib/services/apexdoc/common/settings.js.map +1 -1
- package/lib/services/lint/apex-class-scan.d.ts +1 -3
- package/lib/services/lint/apex-class-scan.js +16 -109
- package/lib/services/lint/apex-class-scan.js.map +1 -1
- package/lib/services/lint/apex-pmd.d.ts +1 -0
- package/lib/services/lint/apex-pmd.js +10 -4
- package/lib/services/lint/apex-pmd.js.map +1 -1
- package/lib/services/lint/metadata-scan.d.ts +10 -4
- package/lib/services/lint/metadata-scan.js +44 -65
- package/lib/services/lint/metadata-scan.js.map +1 -1
- package/lib/services/lint/rules.d.ts +10 -0
- package/lib/services/lint/rules.js +86 -0
- package/lib/services/lint/rules.js.map +1 -0
- package/lib/utils/constants.d.ts +9 -0
- package/lib/utils/constants.js +14 -0
- package/lib/utils/constants.js.map +1 -0
- package/lib/utils/ignored-files.d.ts +2 -0
- package/lib/utils/ignored-files.js +66 -1
- package/lib/utils/ignored-files.js.map +1 -1
- package/messages/apexdoc.json +5 -0
- package/messages/lint.json +5 -0
- package/messages/ping.json +1 -1
- package/messages/sourceApiSet.json +8 -0
- package/oclif.manifest.json +1 -1
- package/package.json +18 -17
|
@@ -9,11 +9,13 @@ const fs_1 = require("fs");
|
|
|
9
9
|
const path = require("path");
|
|
10
10
|
const xml2js = require("xml2js");
|
|
11
11
|
const ignored_files_1 = tslib_1.__importDefault(require("../../utils/ignored-files"));
|
|
12
|
+
const rules_1 = require("./rules");
|
|
12
13
|
class MetadataScan {
|
|
13
14
|
constructor(namespace) {
|
|
14
15
|
this.namespace = undefined;
|
|
15
16
|
this.ignoreFiles = [];
|
|
16
17
|
this.violations = [];
|
|
18
|
+
this.apiViolations = [];
|
|
17
19
|
this.namespace = namespace;
|
|
18
20
|
}
|
|
19
21
|
async scan(sourceFolder, minapi) {
|
|
@@ -24,24 +26,6 @@ class MetadataScan {
|
|
|
24
26
|
await this.scanAPIVersion(sourceFolder, minapi);
|
|
25
27
|
return this.violations;
|
|
26
28
|
}
|
|
27
|
-
/**
|
|
28
|
-
* scan json files
|
|
29
|
-
*/
|
|
30
|
-
async scanJSONFiles(path, minapi) {
|
|
31
|
-
const fileContent = (0, fs_1.readFileSync)(path + '/sfdx-project.json');
|
|
32
|
-
const obj = JSON.parse(fileContent.toString());
|
|
33
|
-
if (minapi > parseInt(obj['sourceApiVersion'])) {
|
|
34
|
-
// this.logger.debug(obj["sourceApiVersion"]);
|
|
35
|
-
const o = {
|
|
36
|
-
label: 'Project source api version not equal to ' + minapi,
|
|
37
|
-
message: 'Please update sourceApiVersion to ' + minapi + ' sfdx-project.json',
|
|
38
|
-
category: 'API',
|
|
39
|
-
level: 'FATAL',
|
|
40
|
-
exceptions: ['sfdx-project.json']
|
|
41
|
-
};
|
|
42
|
-
this.violations.push(o);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
29
|
/**
|
|
46
30
|
* parse objects
|
|
47
31
|
* @param {*} objpath
|
|
@@ -120,10 +104,20 @@ class MetadataScan {
|
|
|
120
104
|
}
|
|
121
105
|
}
|
|
122
106
|
if (found) {
|
|
123
|
-
|
|
107
|
+
if (!(ignored_files_1.default.skipObjects.includes(tabname) ||
|
|
108
|
+
ignored_files_1.default.skipStandardObjects.includes(tabname) ||
|
|
109
|
+
tabname.match(ignored_files_1.default.skipObjectPrefixes) ||
|
|
110
|
+
tabname.match(ignored_files_1.default.integrationPrefixes))) {
|
|
111
|
+
fieldUnderScoreViolations.push(tabname + '.' + fieldname);
|
|
112
|
+
}
|
|
124
113
|
}
|
|
125
114
|
if (tabname.startsWith('tffa__') && !fieldname.startsWith('CZ') && !fieldname.startsWith('cz')) {
|
|
126
|
-
|
|
115
|
+
if (!(ignored_files_1.default.skipObjects.includes(tabname) ||
|
|
116
|
+
ignored_files_1.default.skipStandardObjects.includes(tabname) ||
|
|
117
|
+
tabname.match(ignored_files_1.default.skipObjectPrefixes) ||
|
|
118
|
+
tabname.match(ignored_files_1.default.integrationPrefixes))) {
|
|
119
|
+
fieldCZNameViolations.push(tabname + '.' + fieldname);
|
|
120
|
+
}
|
|
127
121
|
}
|
|
128
122
|
const xml = (0, fs_1.readFileSync)(fieldFile);
|
|
129
123
|
try {
|
|
@@ -146,66 +140,46 @@ class MetadataScan {
|
|
|
146
140
|
}
|
|
147
141
|
}
|
|
148
142
|
if (tabViolations.length > 0) {
|
|
149
|
-
const o = {
|
|
150
|
-
label: 'Custom Objects should have a description',
|
|
151
|
-
message: `It is a best practice that Custom Objects have a description.`,
|
|
152
|
-
exceptions: tabViolations,
|
|
153
|
-
category: 'INTERNAL',
|
|
154
|
-
level: 'FATAL'
|
|
155
|
-
};
|
|
143
|
+
const o = { ...rules_1.Rules.customrules['CUSTOM_TAB_DESCRIPTION'], exceptions: tabViolations };
|
|
156
144
|
this.violations.push(o);
|
|
157
145
|
}
|
|
158
146
|
if (fieldViolations.length > 0) {
|
|
159
|
-
const o = {
|
|
160
|
-
label: 'Custom Fields should have a description',
|
|
161
|
-
message: `It is a best practice that Custom Fields have a description.`,
|
|
162
|
-
exceptions: fieldViolations,
|
|
163
|
-
category: 'INTERNAL',
|
|
164
|
-
level: 'FATAL'
|
|
165
|
-
};
|
|
147
|
+
const o = { ...rules_1.Rules.customrules['CUSTOM_FIELD_DESCRIPTION'], exceptions: fieldViolations };
|
|
166
148
|
this.violations.push(o);
|
|
167
149
|
}
|
|
168
150
|
if (fieldUnderScoreViolations.length > 0) {
|
|
169
|
-
const o = {
|
|
170
|
-
label: 'Custom fields should not contain underscores.',
|
|
171
|
-
message: `It is a best practice that Custom fields should not contain underscores.`,
|
|
172
|
-
exceptions: fieldUnderScoreViolations,
|
|
173
|
-
category: 'INTERNAL',
|
|
174
|
-
level: 'WARN'
|
|
175
|
-
};
|
|
151
|
+
const o = { ...rules_1.Rules.customrules['CUSTOM_FIELD_UNDERSCORE'], exceptions: fieldUnderScoreViolations };
|
|
176
152
|
this.violations.push(o);
|
|
177
153
|
}
|
|
178
154
|
if (fieldCZNameViolations.length > 0) {
|
|
179
|
-
const o = {
|
|
180
|
-
label: 'Custom fields in managed object should start with CZ.',
|
|
181
|
-
message: `It is a best practice that Custom fields should start with CZ in a managed object.`,
|
|
182
|
-
exceptions: fieldCZNameViolations,
|
|
183
|
-
category: 'INTERNAL',
|
|
184
|
-
level: 'WARN'
|
|
185
|
-
};
|
|
155
|
+
const o = { ...rules_1.Rules.customrules['CUSTOM_FIELD_CZ'], exceptions: fieldCZNameViolations };
|
|
186
156
|
this.violations.push(o);
|
|
187
157
|
}
|
|
188
158
|
if (tableCZNameViolations.length > 0) {
|
|
189
|
-
const o = {
|
|
190
|
-
label: 'Custom objects should start with CZ.',
|
|
191
|
-
message: `It is a best practice that Custom objects should start with CZ to avoid clash with managed package`,
|
|
192
|
-
exceptions: tableCZNameViolations,
|
|
193
|
-
category: 'INTERNAL',
|
|
194
|
-
level: 'WARN'
|
|
195
|
-
};
|
|
159
|
+
const o = { ...rules_1.Rules.customrules['CUSTOM_TAB_CZ'], exceptions: tableCZNameViolations };
|
|
196
160
|
this.violations.push(o);
|
|
197
161
|
}
|
|
198
162
|
}
|
|
199
|
-
|
|
200
|
-
|
|
163
|
+
/**
|
|
164
|
+
* scan api
|
|
165
|
+
* @param sourceFolder
|
|
166
|
+
* @param minapi
|
|
167
|
+
*/
|
|
201
168
|
async scanAPIVersion(sourceFolder, minapi) {
|
|
202
169
|
await this.scanAPIVersionByType('ApexClass', sourceFolder, 'app/main/default/classes', minapi);
|
|
203
170
|
await this.scanAPIVersionByType('ApexClass', sourceFolder, 'app/test/default/classes', minapi);
|
|
204
171
|
await this.scanAPIVersionByType('ApexTrigger', sourceFolder, 'app/main/default/triggers', minapi);
|
|
205
172
|
await this.scanAPIVersionByType('ApexPage', sourceFolder, 'app/main/default/pages', minapi);
|
|
173
|
+
if (this.apiViolations.length > 0) {
|
|
174
|
+
const o = {
|
|
175
|
+
...rules_1.Rules.customrules['MINAPI_VERSION'],
|
|
176
|
+
exceptions: this.apiViolations,
|
|
177
|
+
message: `You appear to be using a version of Metadata API less than the minimum specified. Use the ` + minapi
|
|
178
|
+
};
|
|
179
|
+
this.violations.push(o);
|
|
180
|
+
}
|
|
206
181
|
}
|
|
207
182
|
scanAPIVersionByType(type, sourceFolder, basePath, minapi) {
|
|
208
|
-
const apiViolations = [];
|
|
209
183
|
const srcPath = path.join(sourceFolder, basePath);
|
|
210
184
|
if (!(0, fs_1.existsSync)(srcPath)) {
|
|
211
185
|
return;
|
|
@@ -226,19 +200,24 @@ class MetadataScan {
|
|
|
226
200
|
else if (result) {
|
|
227
201
|
const json = result;
|
|
228
202
|
if (minapi > parseInt(json[type].apiVersion)) {
|
|
229
|
-
apiViolations.push(f);
|
|
203
|
+
this.apiViolations.push(f);
|
|
230
204
|
}
|
|
231
205
|
}
|
|
232
206
|
});
|
|
233
207
|
}
|
|
234
208
|
}
|
|
235
|
-
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* scan json files
|
|
212
|
+
*/
|
|
213
|
+
async scanJSONFiles(path, minapi) {
|
|
214
|
+
const fileContent = (0, fs_1.readFileSync)(path + '/sfdx-project.json');
|
|
215
|
+
const obj = JSON.parse(fileContent.toString());
|
|
216
|
+
if (minapi > parseInt(obj['sourceApiVersion'])) {
|
|
236
217
|
const o = {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
category: 'API',
|
|
241
|
-
level: 'FATAL'
|
|
218
|
+
...rules_1.Rules.customrules['PROJECT_API_VERSION'],
|
|
219
|
+
exceptions: ['sfdx-project.json'],
|
|
220
|
+
message: 'Please update sourceApiVersion to ' + minapi + ' sfdx-project.json'
|
|
242
221
|
};
|
|
243
222
|
this.violations.push(o);
|
|
244
223
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata-scan.js","sourceRoot":"","sources":["../../../src/services/lint/metadata-scan.ts"],"names":[],"mappings":";;;AAAA;;IAEI;AACJ,2CAA0C;AAC1C,2BAA2D;AAC3D,6BAA8B;AAC9B,iCAAkC;AAClC,sFAAqD;
|
|
1
|
+
{"version":3,"file":"metadata-scan.js","sourceRoot":"","sources":["../../../src/services/lint/metadata-scan.ts"],"names":[],"mappings":";;;AAAA;;IAEI;AACJ,2CAA0C;AAC1C,2BAA2D;AAC3D,6BAA8B;AAC9B,iCAAkC;AAClC,sFAAqD;AACrD,mCAAgC;AAEhC,MAAqB,YAAY;IAE/B,YAAmB,SAAkB;QADrC,cAAS,GAAG,SAAS,CAAC;QAItB,gBAAW,GAAG,EAAE,CAAC;QACjB,eAAU,GAAc,EAAE,CAAC;QAE3B,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GAAG,QAAQ,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,EAAE;YAC9C,MAAM,CAAC,GAAG;gBACR,GAAG,aAAK,CAAC,WAAW,CAAC,qBAAqB,CAAC;gBAC3C,UAAU,EAAE,CAAC,mBAAmB,CAAC;gBACjC,OAAO,EAAE,oCAAoC,GAAG,MAAM,GAAG,oBAAoB;aAC9E,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACzB;IACH,CAAC;CACF;AAzOD,+BAyOC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Rules = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Copyright (c) NCR Terafina
|
|
7
|
+
**/
|
|
8
|
+
const ignored_files_1 = tslib_1.__importDefault(require("../../utils/ignored-files"));
|
|
9
|
+
class Rules {
|
|
10
|
+
}
|
|
11
|
+
exports.Rules = Rules;
|
|
12
|
+
Rules.customrules = {
|
|
13
|
+
APEX_NAME_CONVENTION: {
|
|
14
|
+
label: 'Files violating naming conventions',
|
|
15
|
+
category: 'INTERNAL',
|
|
16
|
+
level: 'FATAL',
|
|
17
|
+
message: 'Classes should' + '\nend with [' + ignored_files_1.default.allowedClassNameListEnd.join(', ') + ']'
|
|
18
|
+
},
|
|
19
|
+
CUSTOM_TAB_DESCRIPTION: {
|
|
20
|
+
label: 'Custom Objects should have a description',
|
|
21
|
+
category: 'INTERNAL',
|
|
22
|
+
level: 'FATAL',
|
|
23
|
+
message: 'It is a best practice that Custom Objects have a description.'
|
|
24
|
+
},
|
|
25
|
+
CUSTOM_FIELD_DESCRIPTION: {
|
|
26
|
+
label: 'Custom Fields should have a description',
|
|
27
|
+
category: 'INTERNAL',
|
|
28
|
+
level: 'FATAL',
|
|
29
|
+
message: 'It is a best practice that Custom Fields have a description'
|
|
30
|
+
},
|
|
31
|
+
CUSTOM_FIELD_UNDERSCORE: {
|
|
32
|
+
label: 'Custom fields should not contain underscores.',
|
|
33
|
+
category: 'INTERNAL',
|
|
34
|
+
level: 'WARN',
|
|
35
|
+
message: 'It is a best practice that Custom fields should not contain underscores.'
|
|
36
|
+
},
|
|
37
|
+
CUSTOM_FIELD_CZ: {
|
|
38
|
+
label: 'Custom fields in managed object should start with CZ.',
|
|
39
|
+
category: 'INTERNAL',
|
|
40
|
+
level: 'WARN',
|
|
41
|
+
message: 'It is a best practice that Custom fields should start with CZ in a managed object.'
|
|
42
|
+
},
|
|
43
|
+
CUSTOM_TAB_CZ: {
|
|
44
|
+
label: 'Custom objects should start with CZ.',
|
|
45
|
+
category: 'INTERNAL',
|
|
46
|
+
level: 'WARN',
|
|
47
|
+
message: 'It is a best practice that Custom objects should start with CZ to avoid clash with managed package'
|
|
48
|
+
},
|
|
49
|
+
MINAPI_VERSION: {
|
|
50
|
+
label: 'Using old Metadata API Version',
|
|
51
|
+
category: 'API',
|
|
52
|
+
level: 'FATAL',
|
|
53
|
+
message: 'You appear to be using a version of Metadata API less than the minimum specified.'
|
|
54
|
+
},
|
|
55
|
+
PROJECT_API_VERSION: {
|
|
56
|
+
label: 'Project source api version using old Metadata API Version',
|
|
57
|
+
category: 'API',
|
|
58
|
+
level: 'FATAL',
|
|
59
|
+
message: 'Please update sourceApiVersion in sfdx-project.json'
|
|
60
|
+
},
|
|
61
|
+
DIRECT_ABSTRACT_CLASS: {
|
|
62
|
+
label: 'Instances of (tffa\\.AbstractRepository\\.|tffa\\.AbstractController\\.|tffa\\.AbstractRESTService\\.)',
|
|
63
|
+
category: 'INTERNAL',
|
|
64
|
+
level: 'FATAL',
|
|
65
|
+
message: 'Do not call methods directly of an abstract class . Extend the abstract class and use methods directly'
|
|
66
|
+
},
|
|
67
|
+
SOQL_REPOSITORY: {
|
|
68
|
+
label: 'Instances of (\\[select |\\[update |\\[upsert |\\[delete |\\bDatabase\\.query\\b|\\bDatabase\\.update\\b|\\bDatabase\\.insert\\b|\\bDatabase\\.upsert\\b|\\bDatabase\\.delete\\b)',
|
|
69
|
+
category: 'INTERNAL',
|
|
70
|
+
level: 'FATAL',
|
|
71
|
+
message: 'Any SOQL should be encapsulated into Repository classes extending tffa.AbstractRepository. Use doQuery method '
|
|
72
|
+
},
|
|
73
|
+
NO_SUPPRESSWARNINGS: {
|
|
74
|
+
label: 'Instances of SuppressWarnings',
|
|
75
|
+
category: 'PMD',
|
|
76
|
+
level: 'WARN',
|
|
77
|
+
message: 'Do not supress PMD warnings , instead fix them '
|
|
78
|
+
},
|
|
79
|
+
NO_SYSTEM_ASSERT_HARDCODING: {
|
|
80
|
+
label: 'Instances of (System\\.assertEquals\\(true\\, true\\)|System\\.assertNotEquals\\(true\\, false\\)|System\\.assertNotEquals\\(false\\, true\\)|System\\.assert\\(true\\))',
|
|
81
|
+
category: 'PMD',
|
|
82
|
+
level: 'FATAL',
|
|
83
|
+
message: 'Apex unit tests should include at least one assertion . Do not hard code values. Use proper variables'
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../src/services/lint/rules.ts"],"names":[],"mappings":";;;;AAAA;;IAEI;AACJ,sFAAqD;AASrD,MAAa,KAAK;;AAAlB,sBA6EC;AA5Ee,iBAAW,GAAyB;IAChD,oBAAoB,EAAE;QACpB,KAAK,EAAE,oCAAoC;QAC3C,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,gBAAgB,GAAG,cAAc,GAAG,uBAAY,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG;KACnG;IACD,sBAAsB,EAAE;QACtB,KAAK,EAAE,0CAA0C;QACjD,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,+DAA+D;KACzE;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O,EAAE,uGAAuG;KACjH;CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Constants = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright (c) NCR Terafina
|
|
6
|
+
**/
|
|
7
|
+
class Constants {
|
|
8
|
+
}
|
|
9
|
+
exports.Constants = Constants;
|
|
10
|
+
/**
|
|
11
|
+
* All constants
|
|
12
|
+
*/
|
|
13
|
+
Constants.API_VERSION = 55;
|
|
14
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":";;;AAAA;;IAEI;AACJ,MAAa,SAAS;;AAAtB,8BAKC;AAJC;;GAEG;AACW,qBAAW,GAAG,EAAE,CAAC"}
|
|
@@ -9,6 +9,8 @@ export default class IgnoredFiles {
|
|
|
9
9
|
static skipProjects: string[];
|
|
10
10
|
static skipStandardObjects: string[];
|
|
11
11
|
static ignoreFiles: string[];
|
|
12
|
+
static allowedClassNameListEnd: string[];
|
|
13
|
+
static allowedClassNameListStart: string[];
|
|
12
14
|
static files: any[];
|
|
13
15
|
static logger: Logger;
|
|
14
16
|
static init(sourceFolder: string): Promise<void>;
|
|
@@ -83,7 +83,72 @@ IgnoredFiles.ignoreFiles = [
|
|
|
83
83
|
'ExpressionEvaluator',
|
|
84
84
|
'Migration_V14_0_0',
|
|
85
85
|
'Migration_V14_0_0_1',
|
|
86
|
-
'Migration_V14_0_0_2'
|
|
86
|
+
'Migration_V14_0_0_2',
|
|
87
|
+
'kycReport.page',
|
|
88
|
+
'dueDiligenceReport.page'
|
|
87
89
|
];
|
|
90
|
+
IgnoredFiles.allowedClassNameListEnd = [
|
|
91
|
+
'Repository',
|
|
92
|
+
'DTO',
|
|
93
|
+
'Request',
|
|
94
|
+
'Response',
|
|
95
|
+
'Result',
|
|
96
|
+
'Provider',
|
|
97
|
+
'Service',
|
|
98
|
+
'Controller',
|
|
99
|
+
'Constants',
|
|
100
|
+
'Job',
|
|
101
|
+
'Executor',
|
|
102
|
+
'Processor',
|
|
103
|
+
'Ext',
|
|
104
|
+
'Utlity',
|
|
105
|
+
'Utils',
|
|
106
|
+
'Util',
|
|
107
|
+
'Resolver',
|
|
108
|
+
'Factory',
|
|
109
|
+
'EventExtension',
|
|
110
|
+
'EventFactory',
|
|
111
|
+
'Exception',
|
|
112
|
+
'Calculator',
|
|
113
|
+
'Builder',
|
|
114
|
+
'Type',
|
|
115
|
+
'Logger',
|
|
116
|
+
'Context',
|
|
117
|
+
'Exporter',
|
|
118
|
+
'Status',
|
|
119
|
+
'Handler',
|
|
120
|
+
'Client',
|
|
121
|
+
'Serializer',
|
|
122
|
+
'Parser',
|
|
123
|
+
'Adapter',
|
|
124
|
+
'Configuration',
|
|
125
|
+
'Configurations',
|
|
126
|
+
'Mapper',
|
|
127
|
+
'Helper',
|
|
128
|
+
'Extension',
|
|
129
|
+
'Dom',
|
|
130
|
+
'Render',
|
|
131
|
+
'Record',
|
|
132
|
+
'Records',
|
|
133
|
+
'Generator',
|
|
134
|
+
'Formatter',
|
|
135
|
+
'Notifier',
|
|
136
|
+
'Enricher',
|
|
137
|
+
'Signer',
|
|
138
|
+
'Batch',
|
|
139
|
+
'Assigner',
|
|
140
|
+
'Dispatcher',
|
|
141
|
+
'Namespace',
|
|
142
|
+
'Interaction',
|
|
143
|
+
'Cipher',
|
|
144
|
+
'APICall',
|
|
145
|
+
'Cache',
|
|
146
|
+
'Validator',
|
|
147
|
+
'Evaluator',
|
|
148
|
+
'Matcher',
|
|
149
|
+
'Credential',
|
|
150
|
+
'Comparator'
|
|
151
|
+
];
|
|
152
|
+
IgnoredFiles.allowedClassNameListStart = ['Migration', 'SObject'];
|
|
88
153
|
IgnoredFiles.files = [];
|
|
89
154
|
//# sourceMappingURL=ignored-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignored-files.js","sourceRoot":"","sources":["../../src/utils/ignored-files.ts"],"names":[],"mappings":";AAAA;;IAEI;;;AAEJ,2CAA0C;AAC1C,2BAAkC;AAClC,wDAAwB;AAExB,MAAqB,YAAY;
|
|
1
|
+
{"version":3,"file":"ignored-files.js","sourceRoot":"","sources":["../../src/utils/ignored-files.ts"],"names":[],"mappings":";AAAA;;IAEI;;;AAEJ,2CAA0C;AAC1C,2BAAkC;AAClC,wDAAwB;AAExB,MAAqB,YAAY;IA2HxB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,YAAoB;QAC3C,IAAI,CAAC,MAAM,GAAG,MAAM,aAAM,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,oBAAoB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAC3C,MAAM,WAAW,GAAG,IAAA,iBAAY,EAAC,YAAY,GAAG,eAAe,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,WAAW;aACvB,QAAQ,EAAE;aACV,KAAK,CAAC,OAAO,CAAC;aACd,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;QACvD,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE;YACtB,IAAI,QAAQ,GAAG,EAAE,CAAC;YAClB,IAAI,YAAY,IAAI,YAAY,IAAI,GAAG,EAAE;gBACvC,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;gBACtC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC3B;YACD,IAAI,oBAAoB,IAAI,YAAY,EAAE;gBACxC,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC;gBAC9C,IAAI,CAAC,KAAK,CAAC,IA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,yBAAyB;CAC1B,CAAC;AAEY,oCAAuB,GAAG;IACtC,YAAY;IACZ,KAAK;IACL,SAAS;IACT,UAAU;IACV,QAAQ;IACR,UAAU;IACV,SAAS;IACT,YAAY;IACZ,WAAW;IACX,KAAK;IACL,UAAU;IACV,WAAW;IACX,KAAK;IACL,QAAQ;IACR,OAAO;IACP,MAAM;IACN,UAAU;IACV,SAAS;IACT,gBAAgB;IAChB,cAAc;IACd,WAAW;IACX,YAAY;IACZ,SAAS;IACT,MAAM;IACN,QAAQ;IACR,SAAS;IACT,UAAU;IACV,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,UAAU;IACV,YAAY;IACZ,WAAW;IACX,aAAa;IACb,QAAQ;IACR,SAAS;IACT,OAAO;IACP,WAAW;IACX,WAAW;IACX,SAAS;IACT,YAAY;IACZ,YAAY;CACb,CAAC;AAEY,sCAAyB,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAErD,kBAAK,GAAG,EAAE,CAAC"}
|
package/messages/ping.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"commandDescription": "Upgrades the current project and all metadata to the latest API version",
|
|
3
|
+
"flagApiversionDescription": "specify the API version ",
|
|
4
|
+
"sourceFolderDescription": "directory containing sfdx project",
|
|
5
|
+
"msgNoMetadataInPackageDirectories": "No metadata files found in package directories.",
|
|
6
|
+
"successMessage": "%s files have been set to API version %s in package directory '%s'.",
|
|
7
|
+
"msgReadingPackageDirectories": "Reading content of package directories."
|
|
8
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"14.
|
|
1
|
+
{"version":"14.1.1","commands":{"tffa:apexdoc":{"id":"tffa:apexdoc","description":"Generate Apex API Documentation","strict":true,"usage":"<%= command.id %> [-s <directory>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["Generate Apex API Documentation :\t$sfdx tffa:apexdoc "],"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"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"destfolder":{"name":"destfolder","type":"option","char":"d","description":"directory to generate the api docs","multiple":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"destfolder":{"kind":"directory","char":"d","description":"directory to generate the api docs","input":[],"multiple":false,"type":"option"}}},"tffa:lint":{"id":"tffa:lint","description":"scan a sfdx project and provide a violations report based on defined standards","strict":true,"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]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$sfdx tffa:lint"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"generate json output","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"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"minapi":{"name":"minapi","type":"option","char":"m","description":"minimum api version to use during quality checks","multiple":false,"default":55},"rulesetpath":{"name":"rulesetpath","type":"option","char":"r","description":"path to pmd ruleset","multiple":false},"eject":{"name":"eject","type":"boolean","char":"e","description":"update local pmd ruleset","allowNo":false},"level":{"name":"level","type":"boolean","char":"f","description":"emit fatal violations only","allowNo":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"minapi":{"kind":"integer","char":"m","description":"minimum api version to use during quality checks","default":55,"input":[],"multiple":false,"type":"option"},"json":{"kind":"boolean","char":"j","description":"generate json output","allowNo":false,"type":"boolean"},"rulesetpath":{"kind":"filepath","char":"r","description":"path to pmd ruleset","input":[],"multiple":false,"type":"option"},"eject":{"kind":"boolean","char":"e","description":"update local pmd ruleset","allowNo":false,"type":"boolean"},"level":{"kind":"boolean","char":"f","description":"emit fatal violations only","allowNo":false,"type":"boolean"}}},"tffa:meta":{"id":"tffa:meta","description":"scan a sfdx project for metadata","strict":true,"usage":"<%= command.id %> [-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]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["scan a sfdx project for metadata :\t$sfdx tffa:meta"],"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"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"destpath":{"name":"destpath","type":"option","char":"d","description":"full path output file","multiple":false,"default":"."},"clientname":{"name":"clientname","type":"option","char":"c","description":"name of the client","multiple":false,"default":"."},"output":{"name":"output","type":"option","char":"o","description":"output format json csv human","helpValue":"(json|csv|human)","multiple":false,"options":["json","csv","human"]},"fields":{"name":"fields","type":"boolean","char":"f","description":"generate field output","allowNo":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"destpath":{"kind":"directory","char":"d","description":"full path output file","default":".","input":[],"multiple":false,"type":"option"},"clientname":{"kind":"directory","char":"c","description":"name of the client","default":".","input":[],"multiple":false,"type":"option"},"output":{"kind":"enum","helpValue":"(json|csv|human)","char":"o","options":["json","csv","human"],"description":"output format json csv human","input":[],"multiple":false,"type":"option"},"fields":{"kind":"boolean","char":"f","description":"generate field output","allowNo":false,"type":"boolean"}}},"tffa:ping":{"id":"tffa:ping","description":"ping and test the plugin","strict":true,"usage":"<%= command.id %> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:ping "],"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"}},"args":[{"name":"file"}],"flagsConfig":{}},"tffa:source:apiset":{"id":"tffa:source:apiset","description":"Upgrades the current project and all metadata to the latest API version","strict":true,"usage":"<%= command.id %> [-h <help>] [-s <directory>] [-a <integer>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:source:apiset "],"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"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"api":{"name":"api","type":"option","char":"a","description":"specify the API version ","multiple":false,"default":55}},"args":[],"flagsConfig":{"help":{"kind":"help","description":"Show CLI help.","char":"h","allowNo":false,"type":"boolean"},"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"api":{"kind":"integer","char":"a","description":"specify the API version ","default":55,"input":[],"multiple":false,"type":"option"}}}}}
|
package/package.json
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
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": "14.
|
|
4
|
+
"version": "14.1.1",
|
|
5
5
|
"author": "Terafina Inc",
|
|
6
6
|
"bugs": "https://github.com/terafinainc/tffa-sfdx-plugin/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "1.
|
|
8
|
+
"@oclif/core": "1.13.10",
|
|
9
9
|
"@oclif/plugin-help": "5.1.12",
|
|
10
10
|
"@oclif/plugin-plugins": "2.1.0",
|
|
11
11
|
"@oclif/plugin-version": "1.1.1",
|
|
12
12
|
"@oclif/plugin-warn-if-update-available": "2.0.4",
|
|
13
|
-
"@salesforce/command": "5.2.
|
|
13
|
+
"@salesforce/command": "5.2.4",
|
|
14
14
|
"@salesforce/core": "2.37.1",
|
|
15
15
|
"find-java-home": "1.2.2",
|
|
16
16
|
"cheerio": "1.0.0-rc.12",
|
|
17
|
-
"csv-stringify": "6.
|
|
17
|
+
"csv-stringify": "6.2.0",
|
|
18
18
|
"fs-extra": "10.1.0",
|
|
19
19
|
"lodash.escape": "4.0.1",
|
|
20
20
|
"pretty": "2.0.0",
|
|
21
21
|
"rimraf": "3.0.2",
|
|
22
22
|
"tslib": "2.4.0",
|
|
23
|
-
"xml2js": "0.4.23"
|
|
23
|
+
"xml2js": "0.4.23",
|
|
24
|
+
"recursive-readdir": "2.2.2",
|
|
25
|
+
"replace-in-file": "6.3.5"
|
|
24
26
|
},
|
|
25
27
|
"devDependencies": {
|
|
26
28
|
"@commitlint/cli": "17.0.3",
|
|
27
29
|
"@commitlint/config-angular": "17.0.3",
|
|
28
|
-
"@oclif/test": "2.1.
|
|
30
|
+
"@oclif/test": "2.1.1",
|
|
29
31
|
"@salesforce/dev-config": "3.1.0",
|
|
30
32
|
"@salesforce/ts-sinon": "1.3.21",
|
|
31
33
|
"@types/chai": "4",
|
|
@@ -33,33 +35,33 @@
|
|
|
33
35
|
"@types/fs-extra": "9.0.13",
|
|
34
36
|
"@types/js-yaml": "4.0.5",
|
|
35
37
|
"@types/mocha": "9.1.1",
|
|
36
|
-
"@types/node": "18.
|
|
38
|
+
"@types/node": "18.7.5",
|
|
39
|
+
"@types/recursive-readdir": "^2.2.1",
|
|
37
40
|
"@types/xml2js": "0.4.11",
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
39
|
-
"@typescript-eslint/parser": "5.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "5.33.1",
|
|
42
|
+
"@typescript-eslint/parser": "5.33.1",
|
|
40
43
|
"chai": "4",
|
|
41
|
-
"eslint": "8.
|
|
44
|
+
"eslint": "8.22.0",
|
|
42
45
|
"eslint-config-prettier": "8.5.0",
|
|
43
46
|
"eslint-plugin-deprecation": "1.3.2",
|
|
44
47
|
"eslint-plugin-header": "3.1.1",
|
|
45
48
|
"eslint-plugin-import": "2.26.0",
|
|
46
|
-
"eslint-plugin-jest": "26.
|
|
47
|
-
"eslint-plugin-jsdoc": "39.3.
|
|
49
|
+
"eslint-plugin-jest": "26.8.3",
|
|
50
|
+
"eslint-plugin-jsdoc": "39.3.6",
|
|
48
51
|
"eslint-plugin-prefer-arrow": "1.2.3",
|
|
49
|
-
"eslint-plugin-sonarjs": "0.
|
|
52
|
+
"eslint-plugin-sonarjs": "0.15.0",
|
|
50
53
|
"globby": "11.0.1",
|
|
51
54
|
"htmlparser2": "8.0.1",
|
|
52
55
|
"husky": "8.0.1",
|
|
53
56
|
"mem-fs": "2.2.1",
|
|
54
|
-
"mem-fs-editor": "9.
|
|
57
|
+
"mem-fs-editor": "9.5.0",
|
|
55
58
|
"mocha": "10.0.0",
|
|
56
59
|
"nyc": "15.1.0",
|
|
57
|
-
"oclif": "3",
|
|
60
|
+
"oclif": "3.1.2",
|
|
58
61
|
"prettier": "2.7.1",
|
|
59
62
|
"prettier-plugin-apex": "1.10.0",
|
|
60
63
|
"properties-parser": "0.3.1",
|
|
61
64
|
"properties-reader": "2.2.0",
|
|
62
|
-
"replace-in-file": "6.3.5",
|
|
63
65
|
"standard-version": "9.5.0",
|
|
64
66
|
"ts-node": "10",
|
|
65
67
|
"typescript": "4.7.4",
|
|
@@ -119,7 +121,6 @@
|
|
|
119
121
|
"release_major": "npm run release -- --release-as major",
|
|
120
122
|
"release_major_rc": "npm run release -- --release-as major --prerelease rc",
|
|
121
123
|
"update-dependencies": "ncu -u && git add . && git commit -m 'chore(deps): update dependencies'",
|
|
122
|
-
"yaml-2-grammar": "node ./scripts/grammar/convertGrammar.js",
|
|
123
124
|
"prepare": "husky install"
|
|
124
125
|
},
|
|
125
126
|
"standard-version": {
|