@cparra/apexdocs 3.17.1-beta.0 → 3.17.1-beta.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.
|
@@ -3561,7 +3561,7 @@ var __async$3 = (__this, __arguments, generator) => {
|
|
|
3561
3561
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
3562
3562
|
});
|
|
3563
3563
|
};
|
|
3564
|
-
function generateDocs(unparsedBundles, config) {
|
|
3564
|
+
function generateDocs(unparsedBundles, config, debugLogger) {
|
|
3565
3565
|
const translations = mergeTranslations({ markdown: config.translations });
|
|
3566
3566
|
const convertToReferences = apply(parsedFilesToReferenceGuide, config);
|
|
3567
3567
|
const convertToRenderableBundle = apply(parsedFilesToRenderableBundle, config);
|
|
@@ -3580,7 +3580,7 @@ function generateDocs(unparsedBundles, config) {
|
|
|
3580
3580
|
}
|
|
3581
3581
|
return _function.pipe(
|
|
3582
3582
|
TE__namespace.right(replaceMacros(unparsedBundles, config.macros)),
|
|
3583
|
-
TE__namespace.flatMap((unparsedBundles2) => generateForApex(filterApexSourceFiles(unparsedBundles2), config)),
|
|
3583
|
+
TE__namespace.flatMap((unparsedBundles2) => generateForApex(filterApexSourceFiles(unparsedBundles2), config, debugLogger)),
|
|
3584
3584
|
TE__namespace.chain((parsedApexFiles) => {
|
|
3585
3585
|
return _function.pipe(
|
|
3586
3586
|
reflectCustomFieldsAndObjectsAndMetadataRecords(
|
|
@@ -3643,10 +3643,9 @@ function replaceMacros(unparsedBundles, macros) {
|
|
|
3643
3643
|
});
|
|
3644
3644
|
});
|
|
3645
3645
|
}
|
|
3646
|
-
function generateForApex(apexBundles, config) {
|
|
3646
|
+
function generateForApex(apexBundles, config, debugLogger) {
|
|
3647
3647
|
const filterOutOfScope = apply(filterScope, config.scope);
|
|
3648
3648
|
const removeExcluded = apply(removeExcludedTags, config.excludeTags);
|
|
3649
|
-
const debugLogger = void 0;
|
|
3650
3649
|
return _function.pipe(
|
|
3651
3650
|
apexBundles,
|
|
3652
3651
|
(bundles) => reflectApexSourceBestEffort(
|
|
@@ -3833,16 +3832,20 @@ var __spreadValues$7 = (a, b) => {
|
|
|
3833
3832
|
return a;
|
|
3834
3833
|
};
|
|
3835
3834
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
3836
|
-
function generate$1(bundles, config) {
|
|
3835
|
+
function generate$1(bundles, config, debugLogger) {
|
|
3837
3836
|
return _function.pipe(
|
|
3838
|
-
generateDocumentationBundle(bundles, config),
|
|
3837
|
+
generateDocumentationBundle(bundles, config, debugLogger),
|
|
3839
3838
|
TE__namespace.flatMap((files) => writeFilesToSystem$1(files, config.targetDir))
|
|
3840
3839
|
);
|
|
3841
3840
|
}
|
|
3842
|
-
function generateDocumentationBundle(bundles, config) {
|
|
3843
|
-
return generateDocs(
|
|
3844
|
-
|
|
3845
|
-
|
|
3841
|
+
function generateDocumentationBundle(bundles, config, debugLogger) {
|
|
3842
|
+
return generateDocs(
|
|
3843
|
+
bundles,
|
|
3844
|
+
__spreadProps$6(__spreadValues$7({}, config), {
|
|
3845
|
+
referenceGuideTemplate
|
|
3846
|
+
}),
|
|
3847
|
+
debugLogger
|
|
3848
|
+
);
|
|
3846
3849
|
}
|
|
3847
3850
|
function writeFilesToSystem$1(files, outputDir) {
|
|
3848
3851
|
return _function.pipe(
|
|
@@ -6277,6 +6280,21 @@ class Apexdocs {
|
|
|
6277
6280
|
const readFiles = apply(processFiles, new DefaultFileSystem());
|
|
6278
6281
|
function processMarkdown(config, logger) {
|
|
6279
6282
|
return __async(this, null, function* () {
|
|
6283
|
+
const debugLogger = {
|
|
6284
|
+
onStart: (filePath) => {
|
|
6285
|
+
if (!logger.isDebugEnabled()) return;
|
|
6286
|
+
logger.debug(`Parsing: ${filePath}`);
|
|
6287
|
+
},
|
|
6288
|
+
onSuccess: (filePath) => {
|
|
6289
|
+
if (!logger.isDebugEnabled()) return;
|
|
6290
|
+
logger.logSingle(`Parsing: ${filePath} OK`, "green");
|
|
6291
|
+
},
|
|
6292
|
+
onFailure: (filePath, errorMessage) => {
|
|
6293
|
+
if (!logger.isDebugEnabled()) return;
|
|
6294
|
+
logger.logSingle(`Parsing: ${filePath} FAILED`, "red");
|
|
6295
|
+
logger.debug(`Parsing error: ${filePath} - ${errorMessage}`);
|
|
6296
|
+
}
|
|
6297
|
+
};
|
|
6280
6298
|
return _function.pipe(
|
|
6281
6299
|
resolveAndValidateSourceDirectories(config),
|
|
6282
6300
|
E__namespace.mapLeft((error) => new FileReadingError(`Failed to resolve source directories: ${error.message}`, error)),
|
|
@@ -6289,7 +6307,7 @@ function processMarkdown(config, logger) {
|
|
|
6289
6307
|
)
|
|
6290
6308
|
),
|
|
6291
6309
|
TE__namespace.fromEither,
|
|
6292
|
-
TE__namespace.flatMap((fileBodies) => generate$1(fileBodies, config)),
|
|
6310
|
+
TE__namespace.flatMap((fileBodies) => generate$1(fileBodies, config, debugLogger)),
|
|
6293
6311
|
TE__namespace.map(() => "\u2714\uFE0F Documentation generated successfully!"),
|
|
6294
6312
|
// Best-effort behavior: if there were recoverable parse/reflection failures, they should be returned here
|
|
6295
6313
|
// (for presentation to the user at the end of the run), not thrown earlier.
|
package/dist/cli/generate.js
CHANGED
package/dist/index.js
CHANGED