@cparra/apexdocs 3.17.1-beta.1 → 3.17.1-beta.2
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.
|
@@ -3656,13 +3656,24 @@ function generateForApex(apexBundles, config, debugLogger) {
|
|
|
3656
3656
|
},
|
|
3657
3657
|
debugLogger
|
|
3658
3658
|
),
|
|
3659
|
-
TE__namespace.
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3659
|
+
TE__namespace.flatMap(({ successes, errors }) => {
|
|
3660
|
+
const filtered = _function.pipe(
|
|
3661
|
+
TE__namespace.right(successes),
|
|
3662
|
+
TE__namespace.map(filterOutOfScope),
|
|
3663
|
+
TE__namespace.map(addInheritedMembersToTypes),
|
|
3664
|
+
TE__namespace.map(addInheritanceChainToTypes),
|
|
3665
|
+
TE__namespace.map(removeExcluded)
|
|
3666
|
+
);
|
|
3667
|
+
return _function.pipe(
|
|
3668
|
+
filtered,
|
|
3669
|
+
TE__namespace.flatMap((parsed) => {
|
|
3670
|
+
if (errors.errors.length > 0) {
|
|
3671
|
+
return TE__namespace.left(errors);
|
|
3672
|
+
}
|
|
3673
|
+
return TE__namespace.right(parsed);
|
|
3674
|
+
})
|
|
3675
|
+
);
|
|
3676
|
+
})
|
|
3666
3677
|
);
|
|
3667
3678
|
}
|
|
3668
3679
|
function transformReferenceHook(config) {
|
|
@@ -4826,12 +4837,15 @@ function openApi(logger, fileBodies, config) {
|
|
|
4826
4837
|
});
|
|
4827
4838
|
const debugLogger = {
|
|
4828
4839
|
onStart: (filePath) => {
|
|
4840
|
+
if (!logger.isDebugEnabled()) return;
|
|
4829
4841
|
logger.debug(`Parsing: ${filePath}`);
|
|
4830
4842
|
},
|
|
4831
4843
|
onSuccess: (filePath) => {
|
|
4844
|
+
if (!logger.isDebugEnabled()) return;
|
|
4832
4845
|
logger.logSingle(`Parsing: ${filePath} OK`, "green");
|
|
4833
4846
|
},
|
|
4834
4847
|
onFailure: (filePath, errorMessage) => {
|
|
4848
|
+
if (!logger.isDebugEnabled()) return;
|
|
4835
4849
|
logger.logSingle(`Parsing: ${filePath} FAILED`, "red");
|
|
4836
4850
|
logger.debug(`Parsing error: ${filePath} - ${errorMessage}`);
|
|
4837
4851
|
}
|
|
@@ -4845,9 +4859,7 @@ function openApi(logger, fileBodies, config) {
|
|
|
4845
4859
|
debugLogger
|
|
4846
4860
|
)();
|
|
4847
4861
|
if (E__namespace.isLeft(reflectedEither)) {
|
|
4848
|
-
|
|
4849
|
-
logger.error(errors);
|
|
4850
|
-
return;
|
|
4862
|
+
return E__namespace.left(reflectedEither.left);
|
|
4851
4863
|
}
|
|
4852
4864
|
const { successes: parsedFiles, errors: recoverableErrors } = reflectedEither.right;
|
|
4853
4865
|
if (recoverableErrors.errors.length > 0) {
|
|
@@ -4882,13 +4894,24 @@ function openApi(logger, fileBodies, config) {
|
|
|
4882
4894
|
const processor = new OpenApiDocsProcessor(logger);
|
|
4883
4895
|
Transpiler.generate(filteredTypes, processor);
|
|
4884
4896
|
const generatedFiles = processor.fileBuilder().files();
|
|
4885
|
-
yield _function.pipe(
|
|
4897
|
+
const writeResult = yield _function.pipe(
|
|
4886
4898
|
writeFiles(generatedFiles, config.targetDir, (file) => {
|
|
4887
4899
|
logger.logSingle(`${file.outputDocPath} processed.`, "green");
|
|
4888
4900
|
}),
|
|
4889
|
-
TE__namespace.
|
|
4901
|
+
TE__namespace.mapLeft((error) => new FileWritingError("An error occurred while writing files to the system.", error))
|
|
4890
4902
|
)();
|
|
4903
|
+
if (E__namespace.isLeft(writeResult)) {
|
|
4904
|
+
return E__namespace.left(writeResult.left);
|
|
4905
|
+
}
|
|
4891
4906
|
ErrorLogger.logErrors(logger, filteredTypes);
|
|
4907
|
+
if (recoverableErrors.errors.length > 0) {
|
|
4908
|
+
return E__namespace.left(
|
|
4909
|
+
new ReflectionErrors(
|
|
4910
|
+
recoverableErrors.errors.map((e) => __spreadValues$2({}, e))
|
|
4911
|
+
)
|
|
4912
|
+
);
|
|
4913
|
+
}
|
|
4914
|
+
return E__namespace.right(void 0);
|
|
4892
4915
|
});
|
|
4893
4916
|
}
|
|
4894
4917
|
function filterByScopes(logger, manifest) {
|
package/dist/cli/generate.js
CHANGED
package/dist/index.js
CHANGED