@sfdxy/mule-lint 1.4.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/README.md +413 -0
- package/dist/bin/mule-lint.d.ts +3 -0
- package/dist/bin/mule-lint.d.ts.map +1 -0
- package/dist/bin/mule-lint.js +123 -0
- package/dist/bin/mule-lint.js.map +1 -0
- package/dist/src/core/ComplexityCalculator.d.ts +42 -0
- package/dist/src/core/ComplexityCalculator.d.ts.map +1 -0
- package/dist/src/core/ComplexityCalculator.js +123 -0
- package/dist/src/core/ComplexityCalculator.js.map +1 -0
- package/dist/src/core/FileScanner.d.ts +58 -0
- package/dist/src/core/FileScanner.d.ts.map +1 -0
- package/dist/src/core/FileScanner.js +161 -0
- package/dist/src/core/FileScanner.js.map +1 -0
- package/dist/src/core/XPathHelper.d.ts +81 -0
- package/dist/src/core/XPathHelper.d.ts.map +1 -0
- package/dist/src/core/XPathHelper.js +229 -0
- package/dist/src/core/XPathHelper.js.map +1 -0
- package/dist/src/core/XmlParser.d.ts +38 -0
- package/dist/src/core/XmlParser.d.ts.map +1 -0
- package/dist/src/core/XmlParser.js +131 -0
- package/dist/src/core/XmlParser.js.map +1 -0
- package/dist/src/core/YamlParser.d.ts +30 -0
- package/dist/src/core/YamlParser.d.ts.map +1 -0
- package/dist/src/core/YamlParser.js +120 -0
- package/dist/src/core/YamlParser.js.map +1 -0
- package/dist/src/core/index.d.ts +4 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/index.js +21 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/engine/LintEngine.d.ts +60 -0
- package/dist/src/engine/LintEngine.d.ts.map +1 -0
- package/dist/src/engine/LintEngine.js +271 -0
- package/dist/src/engine/LintEngine.js.map +1 -0
- package/dist/src/engine/index.d.ts +2 -0
- package/dist/src/engine/index.d.ts.map +1 -0
- package/dist/src/engine/index.js +18 -0
- package/dist/src/engine/index.js.map +1 -0
- package/dist/src/formatters/JsonFormatter.d.ts +18 -0
- package/dist/src/formatters/JsonFormatter.d.ts.map +1 -0
- package/dist/src/formatters/JsonFormatter.js +45 -0
- package/dist/src/formatters/JsonFormatter.js.map +1 -0
- package/dist/src/formatters/SarifFormatter.d.ts +8 -0
- package/dist/src/formatters/SarifFormatter.d.ts.map +1 -0
- package/dist/src/formatters/SarifFormatter.js +115 -0
- package/dist/src/formatters/SarifFormatter.js.map +1 -0
- package/dist/src/formatters/TableFormatter.d.ts +10 -0
- package/dist/src/formatters/TableFormatter.d.ts.map +1 -0
- package/dist/src/formatters/TableFormatter.js +100 -0
- package/dist/src/formatters/TableFormatter.js.map +1 -0
- package/dist/src/formatters/index.d.ts +10 -0
- package/dist/src/formatters/index.d.ts.map +1 -0
- package/dist/src/formatters/index.js +42 -0
- package/dist/src/formatters/index.js.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +28 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/rules/api-led/ApiLedRules.d.ts +42 -0
- package/dist/src/rules/api-led/ApiLedRules.d.ts.map +1 -0
- package/dist/src/rules/api-led/ApiLedRules.js +95 -0
- package/dist/src/rules/api-led/ApiLedRules.js.map +1 -0
- package/dist/src/rules/base/BaseRule.d.ts +89 -0
- package/dist/src/rules/base/BaseRule.d.ts.map +1 -0
- package/dist/src/rules/base/BaseRule.js +137 -0
- package/dist/src/rules/base/BaseRule.js.map +1 -0
- package/dist/src/rules/complexity/FlowComplexityRule.d.ts +18 -0
- package/dist/src/rules/complexity/FlowComplexityRule.d.ts.map +1 -0
- package/dist/src/rules/complexity/FlowComplexityRule.js +58 -0
- package/dist/src/rules/complexity/FlowComplexityRule.js.map +1 -0
- package/dist/src/rules/dataweave/DataWeaveRules.d.ts +45 -0
- package/dist/src/rules/dataweave/DataWeaveRules.d.ts.map +1 -0
- package/dist/src/rules/dataweave/DataWeaveRules.js +168 -0
- package/dist/src/rules/dataweave/DataWeaveRules.js.map +1 -0
- package/dist/src/rules/documentation/FlowDescriptionRule.d.ts +16 -0
- package/dist/src/rules/documentation/FlowDescriptionRule.d.ts.map +1 -0
- package/dist/src/rules/documentation/FlowDescriptionRule.js +33 -0
- package/dist/src/rules/documentation/FlowDescriptionRule.js.map +1 -0
- package/dist/src/rules/documentation/MissingDocNameRule.d.ts +17 -0
- package/dist/src/rules/documentation/MissingDocNameRule.d.ts.map +1 -0
- package/dist/src/rules/documentation/MissingDocNameRule.js +44 -0
- package/dist/src/rules/documentation/MissingDocNameRule.js.map +1 -0
- package/dist/src/rules/error-handling/CorrelationIdRule.d.ts +26 -0
- package/dist/src/rules/error-handling/CorrelationIdRule.d.ts.map +1 -0
- package/dist/src/rules/error-handling/CorrelationIdRule.js +86 -0
- package/dist/src/rules/error-handling/CorrelationIdRule.js.map +1 -0
- package/dist/src/rules/error-handling/GenericErrorRule.d.ts +22 -0
- package/dist/src/rules/error-handling/GenericErrorRule.d.ts.map +1 -0
- package/dist/src/rules/error-handling/GenericErrorRule.js +51 -0
- package/dist/src/rules/error-handling/GenericErrorRule.js.map +1 -0
- package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts +17 -0
- package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts.map +1 -0
- package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js +77 -0
- package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js.map +1 -0
- package/dist/src/rules/error-handling/HttpStatusRule.d.ts +21 -0
- package/dist/src/rules/error-handling/HttpStatusRule.d.ts.map +1 -0
- package/dist/src/rules/error-handling/HttpStatusRule.js +57 -0
- package/dist/src/rules/error-handling/HttpStatusRule.js.map +1 -0
- package/dist/src/rules/error-handling/MissingErrorHandlerRule.d.ts +17 -0
- package/dist/src/rules/error-handling/MissingErrorHandlerRule.d.ts.map +1 -0
- package/dist/src/rules/error-handling/MissingErrorHandlerRule.js +51 -0
- package/dist/src/rules/error-handling/MissingErrorHandlerRule.js.map +1 -0
- package/dist/src/rules/experimental/ExperimentalRules.d.ts +43 -0
- package/dist/src/rules/experimental/ExperimentalRules.d.ts.map +1 -0
- package/dist/src/rules/experimental/ExperimentalRules.js +92 -0
- package/dist/src/rules/experimental/ExperimentalRules.js.map +1 -0
- package/dist/src/rules/http/HttpContentTypeRule.d.ts +17 -0
- package/dist/src/rules/http/HttpContentTypeRule.d.ts.map +1 -0
- package/dist/src/rules/http/HttpContentTypeRule.js +50 -0
- package/dist/src/rules/http/HttpContentTypeRule.js.map +1 -0
- package/dist/src/rules/http/HttpTimeoutRule.d.ts +16 -0
- package/dist/src/rules/http/HttpTimeoutRule.d.ts.map +1 -0
- package/dist/src/rules/http/HttpTimeoutRule.js +33 -0
- package/dist/src/rules/http/HttpTimeoutRule.js.map +1 -0
- package/dist/src/rules/http/HttpUserAgentRule.d.ts +17 -0
- package/dist/src/rules/http/HttpUserAgentRule.d.ts.map +1 -0
- package/dist/src/rules/http/HttpUserAgentRule.js +48 -0
- package/dist/src/rules/http/HttpUserAgentRule.js.map +1 -0
- package/dist/src/rules/index.d.ts +45 -0
- package/dist/src/rules/index.d.ts.map +1 -0
- package/dist/src/rules/index.js +205 -0
- package/dist/src/rules/index.js.map +1 -0
- package/dist/src/rules/logging/LoggerCategoryRule.d.ts +21 -0
- package/dist/src/rules/logging/LoggerCategoryRule.d.ts.map +1 -0
- package/dist/src/rules/logging/LoggerCategoryRule.js +61 -0
- package/dist/src/rules/logging/LoggerCategoryRule.js.map +1 -0
- package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.d.ts +16 -0
- package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.d.ts.map +1 -0
- package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.js +29 -0
- package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.js.map +1 -0
- package/dist/src/rules/logging/LoggerPayloadRule.d.ts +17 -0
- package/dist/src/rules/logging/LoggerPayloadRule.d.ts.map +1 -0
- package/dist/src/rules/logging/LoggerPayloadRule.js +39 -0
- package/dist/src/rules/logging/LoggerPayloadRule.js.map +1 -0
- package/dist/src/rules/naming/FlowCasingRule.d.ts +18 -0
- package/dist/src/rules/naming/FlowCasingRule.d.ts.map +1 -0
- package/dist/src/rules/naming/FlowCasingRule.js +40 -0
- package/dist/src/rules/naming/FlowCasingRule.js.map +1 -0
- package/dist/src/rules/naming/FlowNamingRule.d.ts +17 -0
- package/dist/src/rules/naming/FlowNamingRule.d.ts.map +1 -0
- package/dist/src/rules/naming/FlowNamingRule.js +60 -0
- package/dist/src/rules/naming/FlowNamingRule.js.map +1 -0
- package/dist/src/rules/naming/VariableNamingRule.d.ts +18 -0
- package/dist/src/rules/naming/VariableNamingRule.d.ts.map +1 -0
- package/dist/src/rules/naming/VariableNamingRule.js +39 -0
- package/dist/src/rules/naming/VariableNamingRule.js.map +1 -0
- package/dist/src/rules/performance/AsyncErrorHandlerRule.d.ts +16 -0
- package/dist/src/rules/performance/AsyncErrorHandlerRule.d.ts.map +1 -0
- package/dist/src/rules/performance/AsyncErrorHandlerRule.js +34 -0
- package/dist/src/rules/performance/AsyncErrorHandlerRule.js.map +1 -0
- package/dist/src/rules/performance/LargeChoiceBlockRule.d.ts +16 -0
- package/dist/src/rules/performance/LargeChoiceBlockRule.d.ts.map +1 -0
- package/dist/src/rules/performance/LargeChoiceBlockRule.js +32 -0
- package/dist/src/rules/performance/LargeChoiceBlockRule.js.map +1 -0
- package/dist/src/rules/performance/ScatterGatherRoutesRule.d.ts +16 -0
- package/dist/src/rules/performance/ScatterGatherRoutesRule.d.ts.map +1 -0
- package/dist/src/rules/performance/ScatterGatherRoutesRule.js +32 -0
- package/dist/src/rules/performance/ScatterGatherRoutesRule.js.map +1 -0
- package/dist/src/rules/security/HardcodedCredentialsRule.d.ts +19 -0
- package/dist/src/rules/security/HardcodedCredentialsRule.d.ts.map +1 -0
- package/dist/src/rules/security/HardcodedCredentialsRule.js +66 -0
- package/dist/src/rules/security/HardcodedCredentialsRule.js.map +1 -0
- package/dist/src/rules/security/HardcodedHttpRule.d.ts +33 -0
- package/dist/src/rules/security/HardcodedHttpRule.d.ts.map +1 -0
- package/dist/src/rules/security/HardcodedHttpRule.js +108 -0
- package/dist/src/rules/security/HardcodedHttpRule.js.map +1 -0
- package/dist/src/rules/security/InsecureTlsRule.d.ts +16 -0
- package/dist/src/rules/security/InsecureTlsRule.d.ts.map +1 -0
- package/dist/src/rules/security/InsecureTlsRule.js +36 -0
- package/dist/src/rules/security/InsecureTlsRule.js.map +1 -0
- package/dist/src/rules/standards/ChoiceAntiPatternRule.d.ts +17 -0
- package/dist/src/rules/standards/ChoiceAntiPatternRule.d.ts.map +1 -0
- package/dist/src/rules/standards/ChoiceAntiPatternRule.js +43 -0
- package/dist/src/rules/standards/ChoiceAntiPatternRule.js.map +1 -0
- package/dist/src/rules/standards/DeprecatedComponentRule.d.ts +17 -0
- package/dist/src/rules/standards/DeprecatedComponentRule.d.ts.map +1 -0
- package/dist/src/rules/standards/DeprecatedComponentRule.js +37 -0
- package/dist/src/rules/standards/DeprecatedComponentRule.js.map +1 -0
- package/dist/src/rules/standards/DwlStandardsRule.d.ts +22 -0
- package/dist/src/rules/standards/DwlStandardsRule.d.ts.map +1 -0
- package/dist/src/rules/standards/DwlStandardsRule.js +90 -0
- package/dist/src/rules/standards/DwlStandardsRule.js.map +1 -0
- package/dist/src/rules/structure/StructureRules.d.ts +45 -0
- package/dist/src/rules/structure/StructureRules.d.ts.map +1 -0
- package/dist/src/rules/structure/StructureRules.js +163 -0
- package/dist/src/rules/structure/StructureRules.js.map +1 -0
- package/dist/src/rules/yaml/YamlRules.d.ts +46 -0
- package/dist/src/rules/yaml/YamlRules.d.ts.map +1 -0
- package/dist/src/rules/yaml/YamlRules.js +226 -0
- package/dist/src/rules/yaml/YamlRules.js.map +1 -0
- package/dist/src/types/Config.d.ts +50 -0
- package/dist/src/types/Config.d.ts.map +1 -0
- package/dist/src/types/Config.js +18 -0
- package/dist/src/types/Config.js.map +1 -0
- package/dist/src/types/Report.d.ts +47 -0
- package/dist/src/types/Report.d.ts.map +1 -0
- package/dist/src/types/Report.js +3 -0
- package/dist/src/types/Report.js.map +1 -0
- package/dist/src/types/Rule.d.ts +76 -0
- package/dist/src/types/Rule.d.ts.map +1 -0
- package/dist/src/types/Rule.js +3 -0
- package/dist/src/types/Rule.js.map +1 -0
- package/dist/src/types/index.d.ts +4 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +21 -0
- package/dist/src/types/index.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.format = format;
|
|
18
|
+
__exportStar(require("./TableFormatter"), exports);
|
|
19
|
+
__exportStar(require("./JsonFormatter"), exports);
|
|
20
|
+
__exportStar(require("./SarifFormatter"), exports);
|
|
21
|
+
const rules_1 = require("../rules");
|
|
22
|
+
const TableFormatter_1 = require("./TableFormatter");
|
|
23
|
+
const JsonFormatter_1 = require("./JsonFormatter");
|
|
24
|
+
const SarifFormatter_1 = require("./SarifFormatter");
|
|
25
|
+
/**
|
|
26
|
+
* Format a lint report using the specified formatter
|
|
27
|
+
*/
|
|
28
|
+
function format(report, type) {
|
|
29
|
+
switch (type) {
|
|
30
|
+
case 'table':
|
|
31
|
+
return (0, TableFormatter_1.formatTable)(report);
|
|
32
|
+
case 'json':
|
|
33
|
+
return (0, JsonFormatter_1.formatJson)(report);
|
|
34
|
+
case 'sarif':
|
|
35
|
+
return (0, SarifFormatter_1.formatSarif)(report, rules_1.ALL_RULES);
|
|
36
|
+
default: {
|
|
37
|
+
const _exhaustiveCheck = type;
|
|
38
|
+
throw new Error(`Unknown formatter type: ${String(_exhaustiveCheck)}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/formatters/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAcA,wBAaC;AA3BD,mDAAiC;AACjC,kDAAgC;AAChC,mDAAiC;AAIjC,oCAAqC;AACrC,qDAA+C;AAC/C,mDAA6C;AAC7C,qDAA+C;AAE/C;;GAEG;AACH,SAAgB,MAAM,CAAC,MAAkB,EAAE,IAAmB;IAC1D,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,OAAO;YACR,OAAO,IAAA,4BAAW,EAAC,MAAM,CAAC,CAAC;QAC/B,KAAK,MAAM;YACP,OAAO,IAAA,0BAAU,EAAC,MAAM,CAAC,CAAC;QAC9B,KAAK,OAAO;YACR,OAAO,IAAA,4BAAW,EAAC,MAAM,EAAE,iBAAS,CAAC,CAAC;QAC1C,OAAO,CAAC,CAAC,CAAC;YACN,MAAM,gBAAgB,GAAU,IAAI,CAAC;YACrC,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC3E,CAAC;IACL,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,SAAS,CAAC;AAGxB,cAAc,QAAQ,CAAC;AAGvB,cAAc,UAAU,CAAC;AAGzB,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Main exports for mule-lint package
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
// Types
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
// Core utilities
|
|
21
|
+
__exportStar(require("./core"), exports);
|
|
22
|
+
// Engine
|
|
23
|
+
__exportStar(require("./engine"), exports);
|
|
24
|
+
// Rules
|
|
25
|
+
__exportStar(require("./rules"), exports);
|
|
26
|
+
// Formatters
|
|
27
|
+
__exportStar(require("./formatters"), exports);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,qCAAqC;;;;;;;;;;;;;;;;AAErC,QAAQ;AACR,0CAAwB;AAExB,iBAAiB;AACjB,yCAAuB;AAEvB,SAAS;AACT,2CAAyB;AAEzB,QAAQ;AACR,0CAAwB;AAExB,aAAa;AACb,+CAA6B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ValidationContext, Issue } from '../../types';
|
|
2
|
+
import { BaseRule } from '../base/BaseRule';
|
|
3
|
+
/**
|
|
4
|
+
* API-001: Experience Layer Pattern
|
|
5
|
+
*
|
|
6
|
+
* Experience layer APIs should follow naming conventions.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ExperienceLayerRule extends BaseRule {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
severity: "info";
|
|
13
|
+
category: "api-led";
|
|
14
|
+
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* API-002: Process Layer Pattern
|
|
18
|
+
*
|
|
19
|
+
* Process layer should orchestrate, not contain business logic.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ProcessLayerRule extends BaseRule {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
severity: "info";
|
|
26
|
+
category: "api-led";
|
|
27
|
+
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* API-003: System Layer Pattern
|
|
31
|
+
*
|
|
32
|
+
* System layer should connect to external systems.
|
|
33
|
+
*/
|
|
34
|
+
export declare class SystemLayerRule extends BaseRule {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description: string;
|
|
38
|
+
severity: "info";
|
|
39
|
+
category: "api-led";
|
|
40
|
+
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=ApiLedRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiLedRules.d.ts","sourceRoot":"","sources":["../../../../src/rules/api-led/ApiLedRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,QAAQ;IAC7C,EAAE,SAAa;IACf,IAAI,SAA8B;IAClC,WAAW,SAA4D;IACvE,QAAQ,EAAG,MAAM,CAAU;IAC3B,QAAQ,EAAG,SAAS,CAAU;IAE9B,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,GAAG,KAAK,EAAE;CA0BhE;AAED;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,QAAQ;IAC1C,EAAE,SAAa;IACf,IAAI,SAA2B;IAC/B,WAAW,SAAiD;IAC5D,QAAQ,EAAG,MAAM,CAAU;IAC3B,QAAQ,EAAG,SAAS,CAAU;IAE9B,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,GAAG,KAAK,EAAE;CA0BhE;AAED;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;IACzC,EAAE,SAAa;IACf,IAAI,SAA0B;IAC9B,WAAW,SAAqD;IAChE,QAAQ,EAAG,MAAM,CAAU;IAC3B,QAAQ,EAAG,SAAS,CAAU;IAE9B,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,GAAG,KAAK,EAAE;CA0BhE"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SystemLayerRule = exports.ProcessLayerRule = exports.ExperienceLayerRule = void 0;
|
|
4
|
+
const BaseRule_1 = require("../base/BaseRule");
|
|
5
|
+
/**
|
|
6
|
+
* API-001: Experience Layer Pattern
|
|
7
|
+
*
|
|
8
|
+
* Experience layer APIs should follow naming conventions.
|
|
9
|
+
*/
|
|
10
|
+
class ExperienceLayerRule extends BaseRule_1.BaseRule {
|
|
11
|
+
id = 'API-001';
|
|
12
|
+
name = 'Experience Layer Pattern';
|
|
13
|
+
description = 'Experience layer APIs should follow naming conventions';
|
|
14
|
+
severity = 'info';
|
|
15
|
+
category = 'api-led';
|
|
16
|
+
validate(doc, _context) {
|
|
17
|
+
const issues = [];
|
|
18
|
+
const flows = this.select('//mule:flow', doc);
|
|
19
|
+
for (const flow of flows) {
|
|
20
|
+
const name = this.getNameAttribute(flow) ?? '';
|
|
21
|
+
// Check if it looks like an experience API (has -exp- or -experience-)
|
|
22
|
+
if (name.includes('-exp-') || name.includes('-experience-')) {
|
|
23
|
+
// Experience APIs should have HTTP listener
|
|
24
|
+
const hasListener = this.select('.//http:listener', flow).length > 0 ||
|
|
25
|
+
this.select('.//*[local-name()="listener"]', flow).length > 0;
|
|
26
|
+
if (!hasListener) {
|
|
27
|
+
issues.push(this.createIssue(flow, `Experience API "${name}" should have HTTP listener`, { suggestion: 'Add HTTP listener for API entry point' }));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return issues;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ExperienceLayerRule = ExperienceLayerRule;
|
|
35
|
+
/**
|
|
36
|
+
* API-002: Process Layer Pattern
|
|
37
|
+
*
|
|
38
|
+
* Process layer should orchestrate, not contain business logic.
|
|
39
|
+
*/
|
|
40
|
+
class ProcessLayerRule extends BaseRule_1.BaseRule {
|
|
41
|
+
id = 'API-002';
|
|
42
|
+
name = 'Process Layer Pattern';
|
|
43
|
+
description = 'Process layer should orchestrate other APIs';
|
|
44
|
+
severity = 'info';
|
|
45
|
+
category = 'api-led';
|
|
46
|
+
validate(doc, _context) {
|
|
47
|
+
const issues = [];
|
|
48
|
+
const flows = this.select('//mule:flow', doc);
|
|
49
|
+
for (const flow of flows) {
|
|
50
|
+
const name = this.getNameAttribute(flow) ?? '';
|
|
51
|
+
// Check if it's a process layer API
|
|
52
|
+
if (name.includes('-proc-') || name.includes('-process-')) {
|
|
53
|
+
// Process layer should have flow-refs or HTTP requests
|
|
54
|
+
const hasFlowRef = this.select('.//mule:flow-ref', flow).length > 0;
|
|
55
|
+
const hasHttpRequest = this.select('.//*[local-name()="request"]', flow).length > 0;
|
|
56
|
+
if (!hasFlowRef && !hasHttpRequest) {
|
|
57
|
+
issues.push(this.createIssue(flow, `Process layer "${name}" should orchestrate other services`, { suggestion: 'Add flow-ref or HTTP request to system/experience APIs' }));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return issues;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.ProcessLayerRule = ProcessLayerRule;
|
|
65
|
+
/**
|
|
66
|
+
* API-003: System Layer Pattern
|
|
67
|
+
*
|
|
68
|
+
* System layer should connect to external systems.
|
|
69
|
+
*/
|
|
70
|
+
class SystemLayerRule extends BaseRule_1.BaseRule {
|
|
71
|
+
id = 'API-003';
|
|
72
|
+
name = 'System Layer Pattern';
|
|
73
|
+
description = 'System layer should connect to external systems';
|
|
74
|
+
severity = 'info';
|
|
75
|
+
category = 'api-led';
|
|
76
|
+
validate(doc, _context) {
|
|
77
|
+
const issues = [];
|
|
78
|
+
const flows = this.select('//mule:flow', doc);
|
|
79
|
+
for (const flow of flows) {
|
|
80
|
+
const name = this.getNameAttribute(flow) ?? '';
|
|
81
|
+
// Check if it's a system layer API
|
|
82
|
+
if (name.includes('-sys-') || name.includes('-system-')) {
|
|
83
|
+
// System layer should have database, HTTP, or other connectors
|
|
84
|
+
const hasDbOp = this.select('.//*[local-name()="select" or local-name()="insert" or local-name()="update" or local-name()="delete"]', flow).length > 0;
|
|
85
|
+
const hasHttpRequest = this.select('.//*[local-name()="request"]', flow).length > 0;
|
|
86
|
+
if (!hasDbOp && !hasHttpRequest) {
|
|
87
|
+
issues.push(this.createIssue(flow, `System layer "${name}" should connect to external systems`, { suggestion: 'Add database, HTTP, or other connector operations' }));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return issues;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.SystemLayerRule = SystemLayerRule;
|
|
95
|
+
//# sourceMappingURL=ApiLedRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiLedRules.js","sourceRoot":"","sources":["../../../../src/rules/api-led/ApiLedRules.ts"],"names":[],"mappings":";;;AACA,+CAA4C;AAE5C;;;;GAIG;AACH,MAAa,mBAAoB,SAAQ,mBAAQ;IAC7C,EAAE,GAAG,SAAS,CAAC;IACf,IAAI,GAAG,0BAA0B,CAAC;IAClC,WAAW,GAAG,wDAAwD,CAAC;IACvE,QAAQ,GAAG,MAAe,CAAC;IAC3B,QAAQ,GAAG,SAAkB,CAAC;IAE9B,QAAQ,CAAC,GAAa,EAAE,QAA2B;QAC/C,MAAM,MAAM,GAAY,EAAE,CAAC;QAE3B,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;QAE9C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YAE/C,uEAAuE;YACvE,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;gBAC1D,4CAA4C;gBAC5C,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,IAAgB,CAAC,CAAC,MAAM,GAAG,CAAC;oBAC5E,IAAI,CAAC,MAAM,CAAC,+BAA+B,EAAE,IAAgB,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;gBAE9E,IAAI,CAAC,WAAW,EAAE,CAAC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AAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAjCD,0CAiCC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Rule, Issue, Severity, RuleCategory, ValidationContext, RuleConfig } from '../../types';
|
|
2
|
+
import { XPathHelper } from '../../core/XPathHelper';
|
|
3
|
+
/**
|
|
4
|
+
* Abstract base class for all lint rules
|
|
5
|
+
* Provides common utilities for XPath queries and issue creation
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class BaseRule implements Rule {
|
|
8
|
+
abstract id: string;
|
|
9
|
+
abstract name: string;
|
|
10
|
+
abstract description: string;
|
|
11
|
+
abstract severity: Severity;
|
|
12
|
+
abstract category: RuleCategory;
|
|
13
|
+
docsUrl?: string;
|
|
14
|
+
protected xpath: XPathHelper;
|
|
15
|
+
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* Main validation method - must be implemented by each rule
|
|
18
|
+
*/
|
|
19
|
+
abstract validate(doc: Document, context: ValidationContext): Issue[];
|
|
20
|
+
/**
|
|
21
|
+
* Execute XPath query and return matching nodes
|
|
22
|
+
*/
|
|
23
|
+
protected select(expression: string, context: Document | Node): Node[];
|
|
24
|
+
/**
|
|
25
|
+
* Execute XPath query and return first matching node
|
|
26
|
+
*/
|
|
27
|
+
protected selectFirst(expression: string, context: Document | Node): Node | null;
|
|
28
|
+
/**
|
|
29
|
+
* Check if any nodes match the XPath expression
|
|
30
|
+
*/
|
|
31
|
+
protected exists(expression: string, context: Document | Node): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Count nodes matching the XPath expression
|
|
34
|
+
*/
|
|
35
|
+
protected count(expression: string, context: Document | Node): number;
|
|
36
|
+
/**
|
|
37
|
+
* Create an issue with consistent formatting
|
|
38
|
+
*/
|
|
39
|
+
protected createIssue(node: Node, message: string, options?: {
|
|
40
|
+
suggestion?: string;
|
|
41
|
+
severity?: Severity;
|
|
42
|
+
codeSnippet?: string;
|
|
43
|
+
}): Issue;
|
|
44
|
+
/**
|
|
45
|
+
* Create an issue without a node reference (e.g., for file-level checks)
|
|
46
|
+
*/
|
|
47
|
+
protected createFileIssue(message: string, options?: {
|
|
48
|
+
suggestion?: string;
|
|
49
|
+
severity?: Severity;
|
|
50
|
+
line?: number;
|
|
51
|
+
}): Issue;
|
|
52
|
+
/**
|
|
53
|
+
* Get line number from node
|
|
54
|
+
*/
|
|
55
|
+
protected getLineNumber(node: Node): number;
|
|
56
|
+
/**
|
|
57
|
+
* Get column number from node
|
|
58
|
+
*/
|
|
59
|
+
protected getColumnNumber(node: Node): number | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Get attribute value from node
|
|
62
|
+
*/
|
|
63
|
+
protected getAttribute(node: Node, attrName: string): string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Check if node has attribute
|
|
66
|
+
*/
|
|
67
|
+
protected hasAttribute(node: Node, attrName: string): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Get the name attribute (common in Mule elements)
|
|
70
|
+
*/
|
|
71
|
+
protected getNameAttribute(node: Node): string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Get doc:name attribute (Mule display name)
|
|
74
|
+
*/
|
|
75
|
+
protected getDocName(node: Node): string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Get an option from rule configuration
|
|
78
|
+
*/
|
|
79
|
+
protected getOption<T>(context: ValidationContext, key: string, defaultValue: T): T;
|
|
80
|
+
/**
|
|
81
|
+
* Check if a pattern should be excluded
|
|
82
|
+
*/
|
|
83
|
+
protected isExcluded(value: string, patterns: string[]): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Get default rule configuration
|
|
86
|
+
*/
|
|
87
|
+
getDefaultConfig(): RuleConfig;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=BaseRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseRule.d.ts","sourceRoot":"","sources":["../../../../src/rules/base/BaseRule.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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|
+
const XPathHelper_1 = require("../../core/XPathHelper");
|
|
5
|
+
/**
|
|
6
|
+
* Abstract base class for all lint rules
|
|
7
|
+
* Provides common utilities for XPath queries and issue creation
|
|
8
|
+
*/
|
|
9
|
+
class BaseRule {
|
|
10
|
+
docsUrl;
|
|
11
|
+
xpath;
|
|
12
|
+
constructor() {
|
|
13
|
+
this.xpath = XPathHelper_1.XPathHelper.getInstance();
|
|
14
|
+
}
|
|
15
|
+
// --- Protected Utility Methods ---
|
|
16
|
+
/**
|
|
17
|
+
* Execute XPath query and return matching nodes
|
|
18
|
+
*/
|
|
19
|
+
select(expression, context) {
|
|
20
|
+
return this.xpath.selectNodes(expression, context);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Execute XPath query and return first matching node
|
|
24
|
+
*/
|
|
25
|
+
selectFirst(expression, context) {
|
|
26
|
+
return this.xpath.selectNode(expression, context);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Check if any nodes match the XPath expression
|
|
30
|
+
*/
|
|
31
|
+
exists(expression, context) {
|
|
32
|
+
return this.xpath.exists(expression, context);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Count nodes matching the XPath expression
|
|
36
|
+
*/
|
|
37
|
+
count(expression, context) {
|
|
38
|
+
return this.xpath.count(expression, context);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Create an issue with consistent formatting
|
|
42
|
+
*/
|
|
43
|
+
createIssue(node, message, options) {
|
|
44
|
+
return {
|
|
45
|
+
line: this.getLineNumber(node),
|
|
46
|
+
column: this.getColumnNumber(node),
|
|
47
|
+
message,
|
|
48
|
+
ruleId: this.id,
|
|
49
|
+
severity: options?.severity ?? this.severity,
|
|
50
|
+
suggestion: options?.suggestion,
|
|
51
|
+
codeSnippet: options?.codeSnippet,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create an issue without a node reference (e.g., for file-level checks)
|
|
56
|
+
*/
|
|
57
|
+
createFileIssue(message, options) {
|
|
58
|
+
return {
|
|
59
|
+
line: options?.line ?? 1,
|
|
60
|
+
message,
|
|
61
|
+
ruleId: this.id,
|
|
62
|
+
severity: options?.severity ?? this.severity,
|
|
63
|
+
suggestion: options?.suggestion,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get line number from node
|
|
68
|
+
*/
|
|
69
|
+
getLineNumber(node) {
|
|
70
|
+
return (0, XPathHelper_1.getLineNumber)(node);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get column number from node
|
|
74
|
+
*/
|
|
75
|
+
getColumnNumber(node) {
|
|
76
|
+
return (0, XPathHelper_1.getColumnNumber)(node);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get attribute value from node
|
|
80
|
+
*/
|
|
81
|
+
getAttribute(node, attrName) {
|
|
82
|
+
return (0, XPathHelper_1.getAttribute)(node, attrName);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Check if node has attribute
|
|
86
|
+
*/
|
|
87
|
+
hasAttribute(node, attrName) {
|
|
88
|
+
return (0, XPathHelper_1.hasAttribute)(node, attrName);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Get the name attribute (common in Mule elements)
|
|
92
|
+
*/
|
|
93
|
+
getNameAttribute(node) {
|
|
94
|
+
return this.getAttribute(node, 'name');
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get doc:name attribute (Mule display name)
|
|
98
|
+
*/
|
|
99
|
+
getDocName(node) {
|
|
100
|
+
return this.getAttribute(node, 'doc:name');
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get an option from rule configuration
|
|
104
|
+
*/
|
|
105
|
+
getOption(context, key, defaultValue) {
|
|
106
|
+
const options = context.config.options;
|
|
107
|
+
if (options && key in options) {
|
|
108
|
+
return options[key];
|
|
109
|
+
}
|
|
110
|
+
return defaultValue;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Check if a pattern should be excluded
|
|
114
|
+
*/
|
|
115
|
+
isExcluded(value, patterns) {
|
|
116
|
+
return patterns.some(pattern => {
|
|
117
|
+
// Simple wildcard matching
|
|
118
|
+
if (pattern.includes('*')) {
|
|
119
|
+
const regex = new RegExp('^' + pattern.replace(/\*/g, '.*') + '$');
|
|
120
|
+
return regex.test(value);
|
|
121
|
+
}
|
|
122
|
+
return value === pattern;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get default rule configuration
|
|
127
|
+
*/
|
|
128
|
+
getDefaultConfig() {
|
|
129
|
+
return {
|
|
130
|
+
enabled: true,
|
|
131
|
+
severity: this.severity,
|
|
132
|
+
options: {},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.BaseRule = BaseRule;
|
|
137
|
+
//# sourceMappingURL=BaseRule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseRule.js","sourceRoot":"","sources":["../../../../src/rules/base/BaseRule.ts"],"names":[],"mappings":";;;AACA,wDAAiH;AAGjH;;;GAGG;AACH,MAAsB,QAAQ;IAO1B,OAAO,CAAU;IAEP,KAAK,CAAc;IAE7B;QACI,IAAI,CAAC,KAAK,GAAG,yBAAW,CAAC,WAAW,EAAE,CAAC;IAC3C,CAAC;IAOD,oCAAoC;IAEpC;;OAEG;IACO,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACO,WAAW,CAAC,UAAkB,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACO,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACzD,OAAO,IA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
+
import { ValidationContext, Issue } from '../../types';
|
|
2
|
+
import { BaseRule } from '../base/BaseRule';
|
|
3
|
+
/**
|
|
4
|
+
* MULE-801: Flow Complexity
|
|
5
|
+
*
|
|
6
|
+
* Warns if flow cyclomatic complexity exceeds threshold.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FlowComplexityRule extends BaseRule {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
severity: "warning";
|
|
13
|
+
category: "complexity";
|
|
14
|
+
validate(doc: Document, context: ValidationContext): Issue[];
|
|
15
|
+
private formatSuggestion;
|
|
16
|
+
private getLine;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=FlowComplexityRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowComplexityRule.d.ts","sourceRoot":"","sources":["../../../../src/rules/complexity/FlowComplexityRule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;IAC5C,EAAE,SAAc;IAChB,IAAI,SAAqB;IACzB,WAAW,SAA4D;IACvE,QAAQ,EAAG,SAAS,CAAU;IAC9B,QAAQ,EAAG,YAAY,CAAU;IAEjC,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,KAAK,EAAE;IAkC5D,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,OAAO;CAGlB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowComplexityRule = void 0;
|
|
4
|
+
const BaseRule_1 = require("../base/BaseRule");
|
|
5
|
+
const ComplexityCalculator_1 = require("../../core/ComplexityCalculator");
|
|
6
|
+
/**
|
|
7
|
+
* MULE-801: Flow Complexity
|
|
8
|
+
*
|
|
9
|
+
* Warns if flow cyclomatic complexity exceeds threshold.
|
|
10
|
+
*/
|
|
11
|
+
class FlowComplexityRule extends BaseRule_1.BaseRule {
|
|
12
|
+
id = 'MULE-801';
|
|
13
|
+
name = 'Flow Complexity';
|
|
14
|
+
description = 'Flow cyclomatic complexity should not exceed threshold';
|
|
15
|
+
severity = 'warning';
|
|
16
|
+
category = 'complexity';
|
|
17
|
+
validate(doc, context) {
|
|
18
|
+
const issues = [];
|
|
19
|
+
const warnThreshold = this.getOption(context, 'warnThreshold', 10);
|
|
20
|
+
const errorThreshold = this.getOption(context, 'errorThreshold', 20);
|
|
21
|
+
// Find all flows and sub-flows
|
|
22
|
+
const flows = this.select('//mule:flow | //mule:sub-flow', doc);
|
|
23
|
+
for (const flow of flows) {
|
|
24
|
+
const flowName = this.getNameAttribute(flow) ?? 'unnamed';
|
|
25
|
+
const result = ComplexityCalculator_1.ComplexityCalculator.calculateFlowComplexity(flow);
|
|
26
|
+
if (result.complexity > errorThreshold) {
|
|
27
|
+
issues.push({
|
|
28
|
+
line: this.getLine(flow),
|
|
29
|
+
message: `Flow "${flowName}" has high complexity (${result.complexity}) - refactor recommended`,
|
|
30
|
+
ruleId: this.id,
|
|
31
|
+
severity: 'error',
|
|
32
|
+
suggestion: this.formatSuggestion(result)
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
else if (result.complexity > warnThreshold) {
|
|
36
|
+
issues.push({
|
|
37
|
+
line: this.getLine(flow),
|
|
38
|
+
message: `Flow "${flowName}" has moderate complexity (${result.complexity})`,
|
|
39
|
+
ruleId: this.id,
|
|
40
|
+
severity: 'warning',
|
|
41
|
+
suggestion: this.formatSuggestion(result)
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return issues;
|
|
46
|
+
}
|
|
47
|
+
formatSuggestion(result) {
|
|
48
|
+
const breakdown = result.details
|
|
49
|
+
.map(d => `${d.type}: ${d.count}`)
|
|
50
|
+
.join(', ');
|
|
51
|
+
return `Complexity breakdown: ${breakdown}. Consider extracting to sub-flows.`;
|
|
52
|
+
}
|
|
53
|
+
getLine(node) {
|
|
54
|
+
return ComplexityCalculator_1.ComplexityCalculator.getNodeLine(node);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.FlowComplexityRule = FlowComplexityRule;
|
|
58
|
+
//# sourceMappingURL=FlowComplexityRule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowComplexityRule.js","sourceRoot":"","sources":["../../../../src/rules/complexity/FlowComplexityRule.ts"],"names":[],"mappings":";;;AACA,+CAA4C;AAC5C,0EAAuE;AAEvE;;;;GAIG;AACH,MAAa,kBAAmB,SAAQ,mBAAQ;IAC5C,EAAE,GAAG,UAAU,CAAC;IAChB,IAAI,GAAG,iBAAiB,CAAC;IACzB,WAAW,GAAG,wDAAwD,CAAC;IACvE,QAAQ,GAAG,SAAkB,CAAC;IAC9B,QAAQ,GAAG,YAAqB,CAAC;IAEjC,QAAQ,CAAC,GAAa,EAAE,OAA0B;QAC9C,MAAM,MAAM,GAAY,EAAE,CAAC;QAC3B,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC;QACnE,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAErE,+BAA+B;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC;QAEhE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;YAC1D,MAAM,MAAM,GAAG,2CAAoB,CAAC,uBAAuB,CAAC,IAAI,CAAC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seRule } from '../base/BaseRule';
|
|
3
|
+
/**
|
|
4
|
+
* DW-001: External DWL for Complex Transforms
|
|
5
|
+
*
|
|
6
|
+
* Complex DataWeave transforms should be in external .dwl files.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ExternalDwlRule extends BaseRule {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
severity: "warning";
|
|
13
|
+
category: "dataweave";
|
|
14
|
+
validate(doc: Document, context: ValidationContext): Issue[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* DW-002: DWL File Naming Convention
|
|
18
|
+
*
|
|
19
|
+
* DataWeave files should follow naming convention.
|
|
20
|
+
*/
|
|
21
|
+
export declare class DwlNamingRule extends BaseRule {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
severity: "info";
|
|
26
|
+
category: "dataweave";
|
|
27
|
+
validate(_doc: Document, context: ValidationContext): Issue[];
|
|
28
|
+
private isValidDwlName;
|
|
29
|
+
private findDwlFiles;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* DW-003: DWL Modules Usage
|
|
33
|
+
*
|
|
34
|
+
* Common DataWeave functions should be in reusable modules.
|
|
35
|
+
*/
|
|
36
|
+
export declare class DwlModulesRule extends BaseRule {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
severity: "info";
|
|
41
|
+
category: "dataweave";
|
|
42
|
+
validate(_doc: Document, context: ValidationContext): Issue[];
|
|
43
|
+
private hasFile;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=DataWeaveRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataWeaveRules.d.ts","sourceRoot":"","sources":["../../../../src/rules/dataweave/DataWeaveRules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;IACzC,EAAE,SAAY;IACd,IAAI,SAAyC;IAC7C,WAAW,SAA4D;IACvE,QAAQ,EAAG,SAAS,CAAU;IAC9B,QAAQ,EAAG,WAAW,CAAU;IAEhC,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,KAAK,EAAE;CA6B/D;AAED;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,QAAQ;IACvC,EAAE,SAAY;IACd,IAAI,SAAqB;IACzB,WAAW,SAAsD;IACjE,QAAQ,EAAG,MAAM,CAAU;IAC3B,QAAQ,EAAG,WAAW,CAAU;IAEhC,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,KAAK,EAAE;IAyB7D,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,YAAY;CAiBvB;AAED;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IACxC,EAAE,SAAY;IACd,IAAI,SAAiB;IACrB,WAAW,SAAkD;IAC7D,QAAQ,EAAG,MAAM,CAAU;IAC3B,QAAQ,EAAG,WAAW,CAAU;IAEhC,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,KAAK,EAAE;IAsB7D,OAAO,CAAC,OAAO;CAQlB"}
|