@cparra/apexdocs 3.19.9-beta.3 → 3.19.9-beta.4
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/dist/cli/generate.js +18 -4
- package/package.json +1 -1
package/dist/cli/generate.js
CHANGED
|
@@ -591,21 +591,34 @@ logger.setDebug(isDebugEnabledFromProcessArgs());
|
|
|
591
591
|
const reflectionDebugLogger = logger$1.createReflectionDebugLogger(logger);
|
|
592
592
|
function main() {
|
|
593
593
|
const aggregatedFailures = [];
|
|
594
|
+
let aggregatedFailureCount = 0;
|
|
594
595
|
let commandsRun = 0;
|
|
595
596
|
function printDebugSummary() {
|
|
596
597
|
if (!logger.isDebugEnabled()) {
|
|
597
598
|
return;
|
|
598
599
|
}
|
|
599
600
|
logger.debug(`commandsRun=${commandsRun}`);
|
|
600
|
-
logger.debug(`aggregatedFailures=${
|
|
601
|
+
logger.debug(`aggregatedFailures=${aggregatedFailureCount}`);
|
|
602
|
+
}
|
|
603
|
+
function failureToErrorItems(failure) {
|
|
604
|
+
const maybeFailureWithErrors = failure;
|
|
605
|
+
if (maybeFailureWithErrors && Array.isArray(maybeFailureWithErrors.errors)) {
|
|
606
|
+
return maybeFailureWithErrors.errors;
|
|
607
|
+
}
|
|
608
|
+
if (Array.isArray(failure)) {
|
|
609
|
+
return failure;
|
|
610
|
+
}
|
|
611
|
+
return [failure];
|
|
601
612
|
}
|
|
602
613
|
function printFailuresAtEnd() {
|
|
603
614
|
if (aggregatedFailures.length === 0) {
|
|
604
615
|
return;
|
|
605
616
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
617
|
+
const flattened = aggregatedFailures.flatMap(failureToErrorItems);
|
|
618
|
+
const count = flattened.length;
|
|
619
|
+
logger.logSingle(`\u26A0\uFE0F ${count} error item(s) occurred. Please review the following issues:`, "red");
|
|
620
|
+
for (const item of flattened) {
|
|
621
|
+
logger.error(item);
|
|
609
622
|
}
|
|
610
623
|
}
|
|
611
624
|
function parseResult(result, config) {
|
|
@@ -613,6 +626,7 @@ function main() {
|
|
|
613
626
|
(failure) => {
|
|
614
627
|
logger.logSingle(`${config.targetGenerator}: completed with errors`, "red");
|
|
615
628
|
aggregatedFailures.push(failure);
|
|
629
|
+
aggregatedFailureCount += failureToErrorItems(failure).length;
|
|
616
630
|
},
|
|
617
631
|
(successMessage) => {
|
|
618
632
|
logger.logSingle(successMessage);
|