sfdx-hardis 5.17.4 → 5.18.0
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image `hardisgroupcom/sfdx-hardis@beta`
|
|
6
6
|
|
|
7
|
+
## [5.18.0] 2025-02-03
|
|
8
|
+
|
|
9
|
+
- New command [hardis:doc:fieldusage](https://sfdx-hardis.cloudity.com/hardis/doc/fieldusage/) : generate a report with custom field's usage from metadata dependencies.
|
|
10
|
+
|
|
7
11
|
## [5.17.4] 2025-01-31
|
|
8
12
|
|
|
9
13
|
- [hardis:doc:project2markdown](https://sfdx-hardis.cloudity.com/hardis/doc/project2markdown/): Fixes pages menu
|
|
@@ -30,10 +34,10 @@ Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image
|
|
|
30
34
|
- [hardis:doc:project2markdown](https://sfdx-hardis.cloudity.com/hardis/doc/project2markdown/) enhancements:
|
|
31
35
|
- Generate Apex classes documentation using `@cparra/apexdocs`, and describe them using AI if available
|
|
32
36
|
- Generate Lightning Pages documentation and describe them using AI if available
|
|
33
|
-
- Display error message in case of XML parsing error
|
|
34
|
-
- Do not raise issues when managed items fields don't have descriptions
|
|
35
|
-
- Do not raise inactive validation rule issue when the VR is from a managed package
|
|
36
|
-
- Fix New JSON coverage formatter is selecting wrong JSON from sf project deploy command
|
|
37
|
+
- Display error message in case of XML parsing error
|
|
38
|
+
- Do not raise issues when managed items fields don't have descriptions
|
|
39
|
+
- Do not raise inactive validation rule issue when the VR is from a managed package
|
|
40
|
+
- Fix New JSON coverage formatter is selecting wrong JSON from sf project deploy command
|
|
37
41
|
|
|
38
42
|
## [5.16.4] 2025-01-22
|
|
39
43
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Connection } from '@salesforce/core';
|
|
3
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
4
|
+
export default class HardisDocFieldusage extends SfCommand<any> {
|
|
5
|
+
static flags: any;
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
querySObjects(connection: Connection, sObjectsFilter?: string[]): Promise<any>;
|
|
9
|
+
getFilteredSObjects(connection: Connection, sObjectsFilter?: string[]): Promise<Record<string, {
|
|
10
|
+
publisherId: string;
|
|
11
|
+
fields: any[];
|
|
12
|
+
}>>;
|
|
13
|
+
queryCustomFields(connection: Connection, sObjectName: string): Promise<any>;
|
|
14
|
+
queryMetadataComponentDependency(connection: Connection, fieldIds: string[]): Promise<any>;
|
|
15
|
+
run(): Promise<AnyJson>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { requiredOrgFlagWithDeprecations, SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Flags } from '@salesforce/sf-plugins-core';
|
|
3
|
+
import sortArray from 'sort-array';
|
|
4
|
+
import { generateReports, uxLog } from '../../../common/utils/index.js';
|
|
5
|
+
import { soqlQuery, soqlQueryTooling } from '../../../common/utils/apiUtils.js';
|
|
6
|
+
export default class HardisDocFieldusage extends SfCommand {
|
|
7
|
+
static flags = {
|
|
8
|
+
'target-org': requiredOrgFlagWithDeprecations,
|
|
9
|
+
'sObjects': Flags.string({
|
|
10
|
+
char: 's',
|
|
11
|
+
description: 'Comma-separated list of sObjects to filter',
|
|
12
|
+
required: false,
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
static description = `
|
|
16
|
+
Retrieves custom field usage from metadata dependencies for specified sObjects.
|
|
17
|
+

|
|
18
|
+
`;
|
|
19
|
+
static examples = [
|
|
20
|
+
'$ sf hardis:doc:fieldusage',
|
|
21
|
+
'$ sf hardis:doc:fieldusage --sObjects Account,Contact,Opportunity',
|
|
22
|
+
'$ sf hardis:doc:fieldusage --target-org myOrgAlias --sObjects CustomObject__c'
|
|
23
|
+
];
|
|
24
|
+
async querySObjects(connection, sObjectsFilter) {
|
|
25
|
+
let sObjectsQuery = `
|
|
26
|
+
SELECT Id, DeveloperName, PublisherId, IsCustomizable, IsCustomSetting
|
|
27
|
+
FROM EntityDefinition
|
|
28
|
+
WHERE IsCustomizable = true
|
|
29
|
+
`;
|
|
30
|
+
if (sObjectsFilter && sObjectsFilter.length > 0) {
|
|
31
|
+
const sObjectsList = sObjectsFilter
|
|
32
|
+
.map(sObject => sObject.trim().replace(/__c$/, ''))
|
|
33
|
+
.map(sObject => `'${sObject}'`)
|
|
34
|
+
.join(',');
|
|
35
|
+
sObjectsQuery += ` AND DeveloperName IN (${sObjectsList})`;
|
|
36
|
+
}
|
|
37
|
+
const sObjectResults = await soqlQuery(sObjectsQuery, connection);
|
|
38
|
+
uxLog(this, `Found ${sObjectResults.records.length} sObjects.`);
|
|
39
|
+
return sObjectResults;
|
|
40
|
+
}
|
|
41
|
+
async getFilteredSObjects(connection, sObjectsFilter) {
|
|
42
|
+
const sObjectResults = await this.querySObjects(connection, sObjectsFilter);
|
|
43
|
+
const sObjectsDict = {};
|
|
44
|
+
sObjectResults.records.forEach((record) => {
|
|
45
|
+
if (!record.DeveloperName.endsWith('__Share') && !record.DeveloperName.endsWith('__ChangeEvent')) {
|
|
46
|
+
sObjectsDict[record.DeveloperName] = {
|
|
47
|
+
publisherId: record.PublisherId,
|
|
48
|
+
fields: []
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return sObjectsDict;
|
|
53
|
+
}
|
|
54
|
+
async queryCustomFields(connection, sObjectName) {
|
|
55
|
+
uxLog(this, `Extracting fields for sObject: ${sObjectName}`);
|
|
56
|
+
const queryTooling = `
|
|
57
|
+
SELECT Id, DeveloperName
|
|
58
|
+
FROM CustomField
|
|
59
|
+
WHERE EntityDefinition.DeveloperName = '${sObjectName}'
|
|
60
|
+
`;
|
|
61
|
+
const fieldResults = await soqlQueryTooling(queryTooling, connection);
|
|
62
|
+
return fieldResults;
|
|
63
|
+
}
|
|
64
|
+
async queryMetadataComponentDependency(connection, fieldIds) {
|
|
65
|
+
const metadataQuery = `
|
|
66
|
+
SELECT MetadataComponentId, MetadataComponentType, MetadataComponentName, RefMetadataComponentName, RefMetadataComponentId
|
|
67
|
+
FROM MetadataComponentDependency
|
|
68
|
+
WHERE RefMetadataComponentId IN (${fieldIds.join(',')})
|
|
69
|
+
`;
|
|
70
|
+
const dependencyResults = await soqlQueryTooling(metadataQuery, connection);
|
|
71
|
+
return dependencyResults;
|
|
72
|
+
}
|
|
73
|
+
async run() {
|
|
74
|
+
const { flags } = await this.parse(HardisDocFieldusage);
|
|
75
|
+
const connection = flags['target-org'].getConnection();
|
|
76
|
+
const sObjectsFilter = flags['sObjects'] ? flags['sObjects'].split(',').map(s => s.trim()) : undefined;
|
|
77
|
+
const sObjectsDict = await this.getFilteredSObjects(connection, sObjectsFilter);
|
|
78
|
+
const fieldQueries = Object.keys(sObjectsDict).map(async (sObjectName) => {
|
|
79
|
+
const fieldResults = await this.queryCustomFields(connection, sObjectName);
|
|
80
|
+
if (fieldResults.records.length > 0) {
|
|
81
|
+
fieldResults.records.forEach((field) => {
|
|
82
|
+
sObjectsDict[sObjectName].fields.push({
|
|
83
|
+
id: field.Id,
|
|
84
|
+
name: field.DeveloperName,
|
|
85
|
+
type: "custom",
|
|
86
|
+
usedIn: []
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
await Promise.all(fieldQueries);
|
|
92
|
+
const dependencyQueries = Object.entries(sObjectsDict).map(async ([sObjectName, { fields }]) => {
|
|
93
|
+
if (fields.length === 0) {
|
|
94
|
+
uxLog(this, `sObject ${sObjectName} does not have any custom fields, skipping dependencies.`);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
uxLog(this, `Retrieving dependencies for sObject: ${sObjectName}`);
|
|
98
|
+
const fieldIds = fields.map((field) => `'${field.id}'`);
|
|
99
|
+
const dependencyResults = await this.queryMetadataComponentDependency(connection, fieldIds);
|
|
100
|
+
dependencyResults.records.forEach((dep) => {
|
|
101
|
+
const field = fields.find(f => f.id === dep.RefMetadataComponentId);
|
|
102
|
+
if (field) {
|
|
103
|
+
field.usedIn.push({ id: dep.MetadataComponentId, type: dep.MetadataComponentType, name: dep.MetadataComponentName });
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
await Promise.all(dependencyQueries);
|
|
108
|
+
const columns = [
|
|
109
|
+
{ key: 'sObjectName', header: 'sObject Name' },
|
|
110
|
+
{ key: 'fieldName', header: 'Field Name' },
|
|
111
|
+
{ key: 'fieldType', header: 'Field Type' },
|
|
112
|
+
{ key: 'dependencyType', header: 'Dependency Type' },
|
|
113
|
+
{ key: 'dependencyName', header: 'Dependency Name' }
|
|
114
|
+
];
|
|
115
|
+
const rows = [];
|
|
116
|
+
for (const [sObjectName, { fields }] of Object.entries(sObjectsDict)) {
|
|
117
|
+
fields.forEach((field) => {
|
|
118
|
+
field.usedIn.forEach((dep) => {
|
|
119
|
+
const row = {};
|
|
120
|
+
row[columns[0].key] = sObjectName;
|
|
121
|
+
row[columns[1].key] = field.name;
|
|
122
|
+
row[columns[2].key] = field.type;
|
|
123
|
+
row[columns[3].key] = dep.type;
|
|
124
|
+
row[columns[4].key] = dep.name;
|
|
125
|
+
rows.push(row);
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
const resultSorted = sortArray(rows, {
|
|
130
|
+
by: [columns[0].key, columns[1].key, columns[3].key],
|
|
131
|
+
order: ['asc', 'asc', 'asc'],
|
|
132
|
+
});
|
|
133
|
+
console.table(rows);
|
|
134
|
+
const reportFiles = await generateReports(resultSorted, columns, this, {
|
|
135
|
+
logFileName: 'fields-usage',
|
|
136
|
+
logLabel: 'Find fields usage',
|
|
137
|
+
});
|
|
138
|
+
return {
|
|
139
|
+
outputString: 'Processed fieldusage doc',
|
|
140
|
+
result: resultSorted,
|
|
141
|
+
reportFiles,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=fieldusage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldusage.js","sourceRoot":"","sources":["../../../../src/commands/hardis/doc/fieldusage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGpD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAEhF,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,SAAc;IAEtD,MAAM,CAAC,KAAK,GAAQ;QACzB,YAAY,EAAE,+BAA+B;QAC7C,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC;YACvB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH,CAAC;IAEK,MAAM,CAAC,WAAW,GAAG;;;GAG3B,CAAC;IAEK,MAAM,CAAC,QAAQ,GAAG;QACvB,4BAA4B;QAC5B,mEAAmE;QACnE,+EAA+E;KAChF,CAAC;IAEK,KAAK,CAAC,aAAa,CAAC,UAAsB,EAAE,cAAyB;QAC1E,IAAI,aAAa,GAAG;;;;KAInB,CAAC;QAEF,IAAI,cAAc,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChD,MAAM,YAAY,GAAG,cAAc;iBAChC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;iBAClD,GAAG,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C,IAAI,EAAE;YACnC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YACpD,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;SAC7B,CAAC,CAAC;QAEH,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEpB,MAAM,WAAW,GAAG,MAAM,eAAe,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE;YACrE,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,mBAAmB;SAC9B,CAAC,CAAC;QAEH,OAAO;YACL,YAAY,EAAE,0BAA0B;YACxC,MAAM,EAAE,YAAY;YACpB,WAAW;SACZ,CAAC;IACJ,CAAC"}
|
package/oclif.lock
CHANGED
|
@@ -3388,10 +3388,10 @@
|
|
|
3388
3388
|
resolved "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz"
|
|
3389
3389
|
integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==
|
|
3390
3390
|
|
|
3391
|
-
"@types/ws@^8.5.
|
|
3392
|
-
version "8.5.
|
|
3393
|
-
resolved "https://registry.
|
|
3394
|
-
integrity sha512-
|
|
3391
|
+
"@types/ws@^8.5.14":
|
|
3392
|
+
version "8.5.14"
|
|
3393
|
+
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.14.tgz#93d44b268c9127d96026cf44353725dd9b6c3c21"
|
|
3394
|
+
integrity sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==
|
|
3395
3395
|
dependencies:
|
|
3396
3396
|
"@types/node" "*"
|
|
3397
3397
|
|
|
@@ -6338,10 +6338,10 @@ fs-constants@^1.0.0:
|
|
|
6338
6338
|
resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz"
|
|
6339
6339
|
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
|
|
6340
6340
|
|
|
6341
|
-
fs-extra@^11.0.0, fs-extra@^11.1.1, fs-extra@^11.2.0:
|
|
6342
|
-
version "11.
|
|
6343
|
-
resolved "https://registry.
|
|
6344
|
-
integrity sha512-
|
|
6341
|
+
fs-extra@^11.0.0, fs-extra@^11.1.1, fs-extra@^11.2.0, fs-extra@^11.3.0:
|
|
6342
|
+
version "11.3.0"
|
|
6343
|
+
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.0.tgz#0daced136bbaf65a555a326719af931adc7a314d"
|
|
6344
|
+
integrity sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==
|
|
6345
6345
|
dependencies:
|
|
6346
6346
|
graceful-fs "^4.2.0"
|
|
6347
6347
|
jsonfile "^6.0.1"
|
|
@@ -8445,10 +8445,10 @@ math-random@^1.0.1:
|
|
|
8445
8445
|
resolved "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz"
|
|
8446
8446
|
integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==
|
|
8447
8447
|
|
|
8448
|
-
mega-linter-runner@^8.
|
|
8449
|
-
version "8.
|
|
8450
|
-
resolved "https://registry.
|
|
8451
|
-
integrity sha512-
|
|
8448
|
+
mega-linter-runner@^8.4.1:
|
|
8449
|
+
version "8.4.1"
|
|
8450
|
+
resolved "https://registry.yarnpkg.com/mega-linter-runner/-/mega-linter-runner-8.4.1.tgz#0e7bf76395deb0f60edb258986d0ec1349e6f4d1"
|
|
8451
|
+
integrity sha512-gPbNgK7+v8r9JkIuHY/aY9FmqE3aAWDZKr1IofHYCe61Bq1/Z3VFw3/PJI91LH+tzJR0Fnun1oDQAUAoXIuHYw==
|
|
8452
8452
|
dependencies:
|
|
8453
8453
|
chalk "^5.3.0"
|
|
8454
8454
|
find-package-json "^1.2.0"
|
|
@@ -9548,10 +9548,10 @@ pako@~1.0.2:
|
|
|
9548
9548
|
resolved "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz"
|
|
9549
9549
|
integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
|
|
9550
9550
|
|
|
9551
|
-
papaparse@^5.5.
|
|
9552
|
-
version "5.5.
|
|
9553
|
-
resolved "https://registry.yarnpkg.com/papaparse/-/papaparse-5.5.
|
|
9554
|
-
integrity sha512-
|
|
9551
|
+
papaparse@^5.5.2:
|
|
9552
|
+
version "5.5.2"
|
|
9553
|
+
resolved "https://registry.yarnpkg.com/papaparse/-/papaparse-5.5.2.tgz#fb67cc5a03ba8930cb435dc4641a25d6804bd4d7"
|
|
9554
|
+
integrity sha512-PZXg8UuAc4PcVwLosEEDYjPyfWnTEhOrUfdv+3Bx+NuAb+5NhDmXzg5fHWmdCh1mP5p7JAZfFr3IMQfcntNAdA==
|
|
9555
9555
|
|
|
9556
9556
|
param-case@^3.0.4:
|
|
9557
9557
|
version "3.0.4"
|
package/oclif.manifest.json
CHANGED
|
@@ -57,78 +57,6 @@
|
|
|
57
57
|
"world:hello"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"hardis:cache:clear": {
|
|
61
|
-
"aliases": [],
|
|
62
|
-
"args": {},
|
|
63
|
-
"description": "Clear cache generated by sfdx-hardis",
|
|
64
|
-
"examples": [
|
|
65
|
-
"$ sf hardis:cache:clear"
|
|
66
|
-
],
|
|
67
|
-
"flags": {
|
|
68
|
-
"json": {
|
|
69
|
-
"description": "Format output as json.",
|
|
70
|
-
"helpGroup": "GLOBAL",
|
|
71
|
-
"name": "json",
|
|
72
|
-
"allowNo": false,
|
|
73
|
-
"type": "boolean"
|
|
74
|
-
},
|
|
75
|
-
"flags-dir": {
|
|
76
|
-
"helpGroup": "GLOBAL",
|
|
77
|
-
"name": "flags-dir",
|
|
78
|
-
"summary": "Import flag values from a directory.",
|
|
79
|
-
"hasDynamicHelp": false,
|
|
80
|
-
"multiple": false,
|
|
81
|
-
"type": "option"
|
|
82
|
-
},
|
|
83
|
-
"debug": {
|
|
84
|
-
"char": "d",
|
|
85
|
-
"description": "Activate debug mode (more logs)",
|
|
86
|
-
"name": "debug",
|
|
87
|
-
"allowNo": false,
|
|
88
|
-
"type": "boolean"
|
|
89
|
-
},
|
|
90
|
-
"websocket": {
|
|
91
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
92
|
-
"name": "websocket",
|
|
93
|
-
"hasDynamicHelp": false,
|
|
94
|
-
"multiple": false,
|
|
95
|
-
"type": "option"
|
|
96
|
-
},
|
|
97
|
-
"skipauth": {
|
|
98
|
-
"description": "Skip authentication check when a default username is required",
|
|
99
|
-
"name": "skipauth",
|
|
100
|
-
"allowNo": false,
|
|
101
|
-
"type": "boolean"
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"hasDynamicHelp": false,
|
|
105
|
-
"hiddenAliases": [],
|
|
106
|
-
"id": "hardis:cache:clear",
|
|
107
|
-
"pluginAlias": "sfdx-hardis",
|
|
108
|
-
"pluginName": "sfdx-hardis",
|
|
109
|
-
"pluginType": "core",
|
|
110
|
-
"strict": true,
|
|
111
|
-
"enableJsonFlag": true,
|
|
112
|
-
"title": "Clear sfdx-hardis cache",
|
|
113
|
-
"requiresProject": false,
|
|
114
|
-
"isESM": true,
|
|
115
|
-
"relativePath": [
|
|
116
|
-
"lib",
|
|
117
|
-
"commands",
|
|
118
|
-
"hardis",
|
|
119
|
-
"cache",
|
|
120
|
-
"clear.js"
|
|
121
|
-
],
|
|
122
|
-
"aliasPermutations": [],
|
|
123
|
-
"permutations": [
|
|
124
|
-
"hardis:cache:clear",
|
|
125
|
-
"cache:hardis:clear",
|
|
126
|
-
"cache:clear:hardis",
|
|
127
|
-
"hardis:clear:cache",
|
|
128
|
-
"clear:hardis:cache",
|
|
129
|
-
"clear:cache:hardis"
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
60
|
"hardis:auth:login": {
|
|
133
61
|
"aliases": [],
|
|
134
62
|
"args": {},
|
|
@@ -310,6 +238,154 @@
|
|
|
310
238
|
"get:config:hardis"
|
|
311
239
|
]
|
|
312
240
|
},
|
|
241
|
+
"hardis:cache:clear": {
|
|
242
|
+
"aliases": [],
|
|
243
|
+
"args": {},
|
|
244
|
+
"description": "Clear cache generated by sfdx-hardis",
|
|
245
|
+
"examples": [
|
|
246
|
+
"$ sf hardis:cache:clear"
|
|
247
|
+
],
|
|
248
|
+
"flags": {
|
|
249
|
+
"json": {
|
|
250
|
+
"description": "Format output as json.",
|
|
251
|
+
"helpGroup": "GLOBAL",
|
|
252
|
+
"name": "json",
|
|
253
|
+
"allowNo": false,
|
|
254
|
+
"type": "boolean"
|
|
255
|
+
},
|
|
256
|
+
"flags-dir": {
|
|
257
|
+
"helpGroup": "GLOBAL",
|
|
258
|
+
"name": "flags-dir",
|
|
259
|
+
"summary": "Import flag values from a directory.",
|
|
260
|
+
"hasDynamicHelp": false,
|
|
261
|
+
"multiple": false,
|
|
262
|
+
"type": "option"
|
|
263
|
+
},
|
|
264
|
+
"debug": {
|
|
265
|
+
"char": "d",
|
|
266
|
+
"description": "Activate debug mode (more logs)",
|
|
267
|
+
"name": "debug",
|
|
268
|
+
"allowNo": false,
|
|
269
|
+
"type": "boolean"
|
|
270
|
+
},
|
|
271
|
+
"websocket": {
|
|
272
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
273
|
+
"name": "websocket",
|
|
274
|
+
"hasDynamicHelp": false,
|
|
275
|
+
"multiple": false,
|
|
276
|
+
"type": "option"
|
|
277
|
+
},
|
|
278
|
+
"skipauth": {
|
|
279
|
+
"description": "Skip authentication check when a default username is required",
|
|
280
|
+
"name": "skipauth",
|
|
281
|
+
"allowNo": false,
|
|
282
|
+
"type": "boolean"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"hasDynamicHelp": false,
|
|
286
|
+
"hiddenAliases": [],
|
|
287
|
+
"id": "hardis:cache:clear",
|
|
288
|
+
"pluginAlias": "sfdx-hardis",
|
|
289
|
+
"pluginName": "sfdx-hardis",
|
|
290
|
+
"pluginType": "core",
|
|
291
|
+
"strict": true,
|
|
292
|
+
"enableJsonFlag": true,
|
|
293
|
+
"title": "Clear sfdx-hardis cache",
|
|
294
|
+
"requiresProject": false,
|
|
295
|
+
"isESM": true,
|
|
296
|
+
"relativePath": [
|
|
297
|
+
"lib",
|
|
298
|
+
"commands",
|
|
299
|
+
"hardis",
|
|
300
|
+
"cache",
|
|
301
|
+
"clear.js"
|
|
302
|
+
],
|
|
303
|
+
"aliasPermutations": [],
|
|
304
|
+
"permutations": [
|
|
305
|
+
"hardis:cache:clear",
|
|
306
|
+
"cache:hardis:clear",
|
|
307
|
+
"cache:clear:hardis",
|
|
308
|
+
"hardis:clear:cache",
|
|
309
|
+
"clear:hardis:cache",
|
|
310
|
+
"clear:cache:hardis"
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"hardis:doc:fieldusage": {
|
|
314
|
+
"aliases": [],
|
|
315
|
+
"args": {},
|
|
316
|
+
"description": "\n Retrieves custom field usage from metadata dependencies for specified sObjects.\n \n ",
|
|
317
|
+
"examples": [
|
|
318
|
+
"$ sf hardis:doc:fieldusage",
|
|
319
|
+
"$ sf hardis:doc:fieldusage --sObjects Account,Contact,Opportunity",
|
|
320
|
+
"$ sf hardis:doc:fieldusage --target-org myOrgAlias --sObjects CustomObject__c"
|
|
321
|
+
],
|
|
322
|
+
"flags": {
|
|
323
|
+
"json": {
|
|
324
|
+
"description": "Format output as json.",
|
|
325
|
+
"helpGroup": "GLOBAL",
|
|
326
|
+
"name": "json",
|
|
327
|
+
"allowNo": false,
|
|
328
|
+
"type": "boolean"
|
|
329
|
+
},
|
|
330
|
+
"flags-dir": {
|
|
331
|
+
"helpGroup": "GLOBAL",
|
|
332
|
+
"name": "flags-dir",
|
|
333
|
+
"summary": "Import flag values from a directory.",
|
|
334
|
+
"hasDynamicHelp": false,
|
|
335
|
+
"multiple": false,
|
|
336
|
+
"type": "option"
|
|
337
|
+
},
|
|
338
|
+
"target-org": {
|
|
339
|
+
"aliases": [
|
|
340
|
+
"targetusername",
|
|
341
|
+
"u"
|
|
342
|
+
],
|
|
343
|
+
"char": "o",
|
|
344
|
+
"deprecateAliases": true,
|
|
345
|
+
"name": "target-org",
|
|
346
|
+
"noCacheDefault": true,
|
|
347
|
+
"required": true,
|
|
348
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
349
|
+
"hasDynamicHelp": true,
|
|
350
|
+
"multiple": false,
|
|
351
|
+
"type": "option"
|
|
352
|
+
},
|
|
353
|
+
"sObjects": {
|
|
354
|
+
"char": "s",
|
|
355
|
+
"description": "Comma-separated list of sObjects to filter",
|
|
356
|
+
"name": "sObjects",
|
|
357
|
+
"required": false,
|
|
358
|
+
"hasDynamicHelp": false,
|
|
359
|
+
"multiple": false,
|
|
360
|
+
"type": "option"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"hasDynamicHelp": true,
|
|
364
|
+
"hiddenAliases": [],
|
|
365
|
+
"id": "hardis:doc:fieldusage",
|
|
366
|
+
"pluginAlias": "sfdx-hardis",
|
|
367
|
+
"pluginName": "sfdx-hardis",
|
|
368
|
+
"pluginType": "core",
|
|
369
|
+
"strict": true,
|
|
370
|
+
"enableJsonFlag": true,
|
|
371
|
+
"isESM": true,
|
|
372
|
+
"relativePath": [
|
|
373
|
+
"lib",
|
|
374
|
+
"commands",
|
|
375
|
+
"hardis",
|
|
376
|
+
"doc",
|
|
377
|
+
"fieldusage.js"
|
|
378
|
+
],
|
|
379
|
+
"aliasPermutations": [],
|
|
380
|
+
"permutations": [
|
|
381
|
+
"hardis:doc:fieldusage",
|
|
382
|
+
"doc:hardis:fieldusage",
|
|
383
|
+
"doc:fieldusage:hardis",
|
|
384
|
+
"hardis:fieldusage:doc",
|
|
385
|
+
"fieldusage:hardis:doc",
|
|
386
|
+
"fieldusage:doc:hardis"
|
|
387
|
+
]
|
|
388
|
+
},
|
|
313
389
|
"hardis:doc:flow2markdown": {
|
|
314
390
|
"aliases": [],
|
|
315
391
|
"args": {},
|
|
@@ -14289,5 +14365,5 @@
|
|
|
14289
14365
|
]
|
|
14290
14366
|
}
|
|
14291
14367
|
},
|
|
14292
|
-
"version": "5.
|
|
14368
|
+
"version": "5.18.0"
|
|
14293
14369
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Swiss-army-knife Toolbox for Salesforce.\n Allows you to define a complete CD/CD Pipeline.\n Orchestrate base commands and assist users with interactive wizards",
|
|
4
4
|
"author": "NicolasVuillamy @nvuillam",
|
|
5
5
|
"bugs": "https://github.com/hardisgroupcom/sfdx-hardis/issues",
|
|
6
|
-
"version": "5.
|
|
6
|
+
"version": "5.18.0",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@actions/github": "^6.0.0",
|
|
9
9
|
"@cparra/apexdocs": "^3.7.3",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"farmhash": "^4.0.1",
|
|
35
35
|
"fast-xml-parser": "^4.5.1",
|
|
36
36
|
"form-data": "^4.0.1",
|
|
37
|
-
"fs-extra": "^11.
|
|
37
|
+
"fs-extra": "^11.3.0",
|
|
38
38
|
"fs-readdir-recursive": "^1.1.0",
|
|
39
39
|
"glob": "^11.0.1",
|
|
40
40
|
"he": "^1.2.0",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"make-fetch-happen": "^14.0.3",
|
|
46
46
|
"markdown-toc": "^1.2.0",
|
|
47
47
|
"marked": "^14.1.4",
|
|
48
|
-
"mega-linter-runner": "^8.
|
|
48
|
+
"mega-linter-runner": "^8.4.1",
|
|
49
49
|
"moment": "^2.30.1",
|
|
50
50
|
"open": "^10.1.0",
|
|
51
51
|
"openai": "^4.78.1",
|
|
52
52
|
"ora": "^8.1.1",
|
|
53
|
-
"papaparse": "^5.5.
|
|
53
|
+
"papaparse": "^5.5.2",
|
|
54
54
|
"pascalcase": "^2.0.0",
|
|
55
55
|
"psl": "^1.15.0",
|
|
56
56
|
"puppeteer-core": "^23.11.1",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@types/sort-array": "^4.1.2",
|
|
91
91
|
"@types/update-notifier": "^6.0.8",
|
|
92
92
|
"@types/which": "^3.0.4",
|
|
93
|
-
"@types/ws": "^8.5.
|
|
93
|
+
"@types/ws": "^8.5.14",
|
|
94
94
|
"@types/xml2js": "^0.4.14",
|
|
95
95
|
"eslint-plugin-sf-plugin": "^1.20.14",
|
|
96
96
|
"oclif": "^4.17.17",
|