@flow-scanner/lightning-flow-scanner-core 6.17.1 → 6.17.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.
- package/README.md +642 -0
- package/package.json +9 -58
- package/.husky/pre-commit +0 -1
- package/.husky/pre-push +0 -1
- package/.prettierignore +0 -5
- package/.swcrc +0 -26
- package/.turbo/turbo-build.log +0 -17
- package/.turbo/turbo-test.log +0 -144
- package/.turbo/turbo-vite$colon$dist.log +0 -21
- package/coverage/coverage-final.json +0 -63
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -236
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/index.ts.html +0 -238
- package/coverage/lcov-report/src/main/adapters/RegexAdapter.ts.html +0 -118
- package/coverage/lcov-report/src/main/adapters/index.html +0 -116
- package/coverage/lcov-report/src/main/config/NodeIcons.ts.html +0 -376
- package/coverage/lcov-report/src/main/config/RuleRegistry.ts.html +0 -646
- package/coverage/lcov-report/src/main/config/VariableIcons.ts.html +0 -253
- package/coverage/lcov-report/src/main/config/index.html +0 -146
- package/coverage/lcov-report/src/main/enums/MetaType.ts.html +0 -100
- package/coverage/lcov-report/src/main/enums/MetadataType.ts.html +0 -103
- package/coverage/lcov-report/src/main/enums/MetadataTypes.ts.html +0 -100
- package/coverage/lcov-report/src/main/enums/index.html +0 -116
- package/coverage/lcov-report/src/main/interfaces/IRulesConfig.ts.html +0 -133
- package/coverage/lcov-report/src/main/interfaces/index.html +0 -116
- package/coverage/lcov-report/src/main/internals/index.html +0 -116
- package/coverage/lcov-report/src/main/internals/internals.ts.html +0 -190
- package/coverage/lcov-report/src/main/libs/BuildFlow.ts.html +0 -127
- package/coverage/lcov-report/src/main/libs/Compiler.ts.html +0 -241
- package/coverage/lcov-report/src/main/libs/ConvertFlowNodes.ts.html +0 -97
- package/coverage/lcov-report/src/main/libs/DynamicRule.ts.html +0 -118
- package/coverage/lcov-report/src/main/libs/ExportDetails.ts.html +0 -256
- package/coverage/lcov-report/src/main/libs/ExportDiagram.ts.html +0 -331
- package/coverage/lcov-report/src/main/libs/ExportSarif.ts.html +0 -358
- package/coverage/lcov-report/src/main/libs/FixFlows.ts.html +0 -265
- package/coverage/lcov-report/src/main/libs/GenerateMarkdown.ts.html +0 -331
- package/coverage/lcov-report/src/main/libs/GetRuleDefinitions.ts.html +0 -274
- package/coverage/lcov-report/src/main/libs/ParseFlows.ts.html +0 -184
- package/coverage/lcov-report/src/main/libs/RuleDocumentation.ts.html +0 -190
- package/coverage/lcov-report/src/main/libs/ScanFlows.ts.html +0 -508
- package/coverage/lcov-report/src/main/libs/exportAsDetails.ts.html +0 -160
- package/coverage/lcov-report/src/main/libs/exportAsSarif.ts.html +0 -346
- package/coverage/lcov-report/src/main/libs/index.html +0 -251
- package/coverage/lcov-report/src/main/models/FlatViolation.ts.html +0 -106
- package/coverage/lcov-report/src/main/models/Flow.ts.html +0 -1057
- package/coverage/lcov-report/src/main/models/FlowAttribute.ts.html +0 -115
- package/coverage/lcov-report/src/main/models/FlowElement.ts.html +0 -133
- package/coverage/lcov-report/src/main/models/FlowElementConnector.ts.html +0 -169
- package/coverage/lcov-report/src/main/models/FlowGraph.ts.html +0 -1672
- package/coverage/lcov-report/src/main/models/FlowMetadata.ts.html +0 -106
- package/coverage/lcov-report/src/main/models/FlowNode.ts.html +0 -1252
- package/coverage/lcov-report/src/main/models/FlowResource.ts.html +0 -106
- package/coverage/lcov-report/src/main/models/FlowType.ts.html +0 -244
- package/coverage/lcov-report/src/main/models/FlowVariable.ts.html +0 -553
- package/coverage/lcov-report/src/main/models/LoopRuleCommon.ts.html +0 -235
- package/coverage/lcov-report/src/main/models/ParsedFlow.ts.html +0 -121
- package/coverage/lcov-report/src/main/models/RuleCommon.ts.html +0 -442
- package/coverage/lcov-report/src/main/models/RuleResult.ts.html +0 -172
- package/coverage/lcov-report/src/main/models/ScanResult.ts.html +0 -121
- package/coverage/lcov-report/src/main/models/Violation.ts.html +0 -316
- package/coverage/lcov-report/src/main/models/index.html +0 -341
- package/coverage/lcov-report/src/main/rules/APIVersion.ts.html +0 -361
- package/coverage/lcov-report/src/main/rules/ActionCallsInLoop.ts.html +0 -157
- package/coverage/lcov-report/src/main/rules/AutoLayout.ts.html +0 -220
- package/coverage/lcov-report/src/main/rules/CopyAPIName.ts.html +0 -175
- package/coverage/lcov-report/src/main/rules/CyclomaticComplexity.ts.html +0 -292
- package/coverage/lcov-report/src/main/rules/DMLStatementInLoop.ts.html +0 -163
- package/coverage/lcov-report/src/main/rules/DuplicateDMLOperation.ts.html +0 -334
- package/coverage/lcov-report/src/main/rules/FlowDescription.ts.html +0 -184
- package/coverage/lcov-report/src/main/rules/FlowName.ts.html +0 -229
- package/coverage/lcov-report/src/main/rules/GetRecordAllFields.ts.html +0 -280
- package/coverage/lcov-report/src/main/rules/HardcodedId.ts.html +0 -238
- package/coverage/lcov-report/src/main/rules/HardcodedSecret.ts.html +0 -238
- package/coverage/lcov-report/src/main/rules/HardcodedUrl.ts.html +0 -247
- package/coverage/lcov-report/src/main/rules/InactiveFlow.ts.html +0 -184
- package/coverage/lcov-report/src/main/rules/MissingFaultPath.ts.html +0 -397
- package/coverage/lcov-report/src/main/rules/MissingFilterRecordTrigger.ts.html +0 -229
- package/coverage/lcov-report/src/main/rules/MissingMetadataDescription.ts.html +0 -211
- package/coverage/lcov-report/src/main/rules/MissingNullHandler.ts.html +0 -460
- package/coverage/lcov-report/src/main/rules/MissingRecordTriggerFilter.ts.html +0 -235
- package/coverage/lcov-report/src/main/rules/ProcessBuilder.ts.html +0 -190
- package/coverage/lcov-report/src/main/rules/RecordIdAsString.ts.html +0 -274
- package/coverage/lcov-report/src/main/rules/RecursiveAfterUpdate.ts.html +0 -364
- package/coverage/lcov-report/src/main/rules/SOQLQueryInLoop.ts.html +0 -160
- package/coverage/lcov-report/src/main/rules/SameRecordFieldUpdates.ts.html +0 -283
- package/coverage/lcov-report/src/main/rules/TransformInsteadOfLoop.ts.html +0 -250
- package/coverage/lcov-report/src/main/rules/TriggerOrder.ts.html +0 -238
- package/coverage/lcov-report/src/main/rules/UnconnectedElement.ts.html +0 -178
- package/coverage/lcov-report/src/main/rules/UnsafeRunningContext.ts.html +0 -226
- package/coverage/lcov-report/src/main/rules/UnusedVariable.ts.html +0 -283
- package/coverage/lcov-report/src/main/rules/index.html +0 -521
- package/coverage/lcov-report/src/main/store/DefaultRuleStore.ts.html +0 -265
- package/coverage/lcov-report/src/main/store/RuleRegistry.ts.html +0 -118
- package/coverage/lcov-report/src/main/store/index.html +0 -116
- package/coverage/lcov.info +0 -6261
- package/eslint.config.mjs +0 -36
- package/jest.config.cjs +0 -32
- package/jest.env-setup.js +0 -101
- package/lint-staged.config.mjs +0 -8
- package/prettier.config.mjs +0 -5
- package/src/index.ts +0 -52
- package/src/main/config/NodeIcons.ts +0 -98
- package/src/main/config/RegexAdapter.ts +0 -98
- package/src/main/config/RuleRegistry.ts +0 -188
- package/src/main/config/VariableIcons.ts +0 -57
- package/src/main/enums/MetadataTypes.ts +0 -6
- package/src/main/interfaces/IExceptions.ts +0 -6
- package/src/main/interfaces/IRuleConfig.ts +0 -6
- package/src/main/interfaces/IRuleDefinition.ts +0 -15
- package/src/main/interfaces/IRuleOptions.ts +0 -5
- package/src/main/interfaces/IRulesConfig.ts +0 -17
- package/src/main/internals/internals.ts +0 -35
- package/src/main/libs/BuildFlow.ts +0 -14
- package/src/main/libs/Compiler.ts +0 -53
- package/src/main/libs/ExportDetails.ts +0 -58
- package/src/main/libs/ExportDiagram.ts +0 -83
- package/src/main/libs/ExportSarif.ts +0 -92
- package/src/main/libs/FixFlows.ts +0 -61
- package/src/main/libs/GetRuleDefinitions.ts +0 -64
- package/src/main/libs/ParseFlows.ts +0 -34
- package/src/main/libs/RuleDocumentation.ts +0 -35
- package/src/main/libs/ScanFlows.ts +0 -142
- package/src/main/models/FlatViolation.ts +0 -16
- package/src/main/models/Flow.ts +0 -325
- package/src/main/models/FlowAttribute.ts +0 -11
- package/src/main/models/FlowElement.ts +0 -16
- package/src/main/models/FlowElementConnector.ts +0 -28
- package/src/main/models/FlowGraph.ts +0 -530
- package/src/main/models/FlowMetadata.ts +0 -8
- package/src/main/models/FlowNode.ts +0 -390
- package/src/main/models/FlowResource.ts +0 -8
- package/src/main/models/FlowType.ts +0 -53
- package/src/main/models/FlowVariable.ts +0 -157
- package/src/main/models/LoopRuleCommon.ts +0 -51
- package/src/main/models/ParsedFlow.ts +0 -13
- package/src/main/models/RuleCommon.ts +0 -120
- package/src/main/models/RuleInfo.ts +0 -54
- package/src/main/models/RuleResult.ts +0 -29
- package/src/main/models/ScanResult.ts +0 -12
- package/src/main/models/Violation.ts +0 -78
- package/src/main/rules/APIVersion.ts +0 -93
- package/src/main/rules/ActionCallsInLoop.ts +0 -25
- package/src/main/rules/AutoLayout.ts +0 -46
- package/src/main/rules/CopyAPIName.ts +0 -31
- package/src/main/rules/CyclomaticComplexity.ts +0 -70
- package/src/main/rules/DMLStatementInLoop.ts +0 -26
- package/src/main/rules/DuplicateDMLOperation.ts +0 -83
- package/src/main/rules/FlowDescription.ts +0 -34
- package/src/main/rules/FlowName.ts +0 -49
- package/src/main/rules/GetRecordAllFields.ts +0 -65
- package/src/main/rules/HardcodedId.ts +0 -51
- package/src/main/rules/HardcodedSecret.ts +0 -51
- package/src/main/rules/HardcodedUrl.ts +0 -54
- package/src/main/rules/InactiveFlow.ts +0 -33
- package/src/main/rules/MissingFaultPath.ts +0 -105
- package/src/main/rules/MissingMetadataDescription.ts +0 -42
- package/src/main/rules/MissingNullHandler.ts +0 -126
- package/src/main/rules/MissingRecordTriggerFilter.ts +0 -51
- package/src/main/rules/ProcessBuilder.ts +0 -35
- package/src/main/rules/RecordIdAsString.ts +0 -64
- package/src/main/rules/RecursiveAfterUpdate.ts +0 -94
- package/src/main/rules/SOQLQueryInLoop.ts +0 -26
- package/src/main/rules/SameRecordFieldUpdates.ts +0 -66
- package/src/main/rules/TransformInsteadOfLoop.ts +0 -56
- package/src/main/rules/TriggerOrder.ts +0 -51
- package/src/main/rules/UnconnectedElement.ts +0 -32
- package/src/main/rules/UnsafeRunningContext.ts +0 -47
- package/src/main/rules/UnusedVariable.ts +0 -66
- package/stryker.config.mjs +0 -23
- package/tests/APIVersion.test.ts +0 -87
- package/tests/AutoLayout.test.ts +0 -41
- package/tests/Config.test.ts +0 -122
- package/tests/ConfigBetaMode.test.ts +0 -26
- package/tests/CopyAPIName.test.ts +0 -45
- package/tests/CyclomaticComplexity.test.ts +0 -125
- package/tests/DMLStatementInLoop.test.ts +0 -32
- package/tests/DuplicateDMLOperation.test.ts +0 -43
- package/tests/EnabledFalse.test.ts +0 -63
- package/tests/Exceptions.test.ts +0 -815
- package/tests/ExportSarif.test.ts +0 -62
- package/tests/FlowDescription.test.ts +0 -44
- package/tests/FlowDocumentation.test.ts +0 -74
- package/tests/FlowName.test.ts +0 -61
- package/tests/GetRecordElementAllFields.test.ts +0 -182
- package/tests/HardcodedId.test.ts +0 -16
- package/tests/HardcodedSecret.test.ts +0 -32
- package/tests/HardcodedUrl.test.ts +0 -253
- package/tests/InactiveFlow.test.ts +0 -103
- package/tests/MissingFaultPath.test.ts +0 -52
- package/tests/MissingMetadataDescription.test.ts +0 -25
- package/tests/MissingNullHandler.test.ts +0 -45
- package/tests/MissingRecordTriggerFilter.test.ts +0 -54
- package/tests/RecordIdAsString.test.ts +0 -60
- package/tests/RecursiveAfterUpdate.test.ts +0 -183
- package/tests/SOQLQueryInLoop.test.ts +0 -33
- package/tests/SameRecordFieldUpdates.test.ts +0 -205
- package/tests/SanityTest.test.ts +0 -15
- package/tests/TransformInsteadOfLoop.test.ts +0 -33
- package/tests/TriggerOrder.test.ts +0 -112
- package/tests/UnconnectedElement.test.ts +0 -76
- package/tests/UnsafeRunningContext.test.ts +0 -46
- package/tests/UnusedVariable.test.ts +0 -59
- package/tests/UnusedVariableExceptions.test.ts +0 -87
- package/tests/jsonfiles/MissingFaultPath_BeforeSave_Bypass.json +0 -128
- package/tests/jsonfiles/MissingFaultPath_WaitConditions.json +0 -102
- package/tests/jsonfiles/MissingFaultPath_WaitDate.json +0 -88
- package/tests/jsonfiles/MissingFaultPath_WaitDuration.json +0 -90
- package/tests/models/Flow.test.ts +0 -107
- package/tests/models/LoopRuleCommon.test.ts +0 -246
- package/tests/models/RuleCommon.test.ts +0 -41
- package/tsconfig.json +0 -28
- package/tsconfig.types.json +0 -26
- package/types/index.d.ts +0 -27
- package/types/index.d.ts.map +0 -1
- package/types/main/adapters/RegexAdapter.d.ts +0 -33
- package/types/main/adapters/RegexAdapter.d.ts.map +0 -1
- package/types/main/config/NodeIcons.d.ts +0 -25
- package/types/main/config/NodeIcons.d.ts.map +0 -1
- package/types/main/config/RegexAdapter.d.ts +0 -33
- package/types/main/config/RegexAdapter.d.ts.map +0 -1
- package/types/main/config/RuleRegistry.d.ts +0 -23
- package/types/main/config/RuleRegistry.d.ts.map +0 -1
- package/types/main/config/VariableIcons.d.ts +0 -26
- package/types/main/config/VariableIcons.d.ts.map +0 -1
- package/types/main/enums/MetadataTypes.d.ts +0 -7
- package/types/main/enums/MetadataTypes.d.ts.map +0 -1
- package/types/main/interfaces/IExceptions.d.ts +0 -6
- package/types/main/interfaces/IExceptions.d.ts.map +0 -1
- package/types/main/interfaces/IRuleConfig.d.ts +0 -7
- package/types/main/interfaces/IRuleConfig.d.ts.map +0 -1
- package/types/main/interfaces/IRuleDefinition.d.ts +0 -18
- package/types/main/interfaces/IRuleDefinition.d.ts.map +0 -1
- package/types/main/interfaces/IRuleOptions.d.ts +0 -5
- package/types/main/interfaces/IRuleOptions.d.ts.map +0 -1
- package/types/main/interfaces/IRulesConfig.d.ts +0 -16
- package/types/main/interfaces/IRulesConfig.d.ts.map +0 -1
- package/types/main/internals/internals.d.ts +0 -19
- package/types/main/internals/internals.d.ts.map +0 -1
- package/types/main/libs/BuildFlow.d.ts +0 -2
- package/types/main/libs/BuildFlow.d.ts.map +0 -1
- package/types/main/libs/Compiler.d.ts +0 -8
- package/types/main/libs/Compiler.d.ts.map +0 -1
- package/types/main/libs/ConvertFlowNodes.d.ts +0 -2
- package/types/main/libs/ConvertFlowNodes.d.ts.map +0 -1
- package/types/main/libs/DynamicRule.d.ts +0 -5
- package/types/main/libs/DynamicRule.d.ts.map +0 -1
- package/types/main/libs/ExportDetails.d.ts +0 -4
- package/types/main/libs/ExportDetails.d.ts.map +0 -1
- package/types/main/libs/ExportDiagram.d.ts +0 -42
- package/types/main/libs/ExportDiagram.d.ts.map +0 -1
- package/types/main/libs/ExportSarif.d.ts +0 -3
- package/types/main/libs/ExportSarif.d.ts.map +0 -1
- package/types/main/libs/FixFlows.d.ts +0 -4
- package/types/main/libs/FixFlows.d.ts.map +0 -1
- package/types/main/libs/GetRuleDefinitions.d.ts +0 -5
- package/types/main/libs/GetRuleDefinitions.d.ts.map +0 -1
- package/types/main/libs/ParseFlows.d.ts +0 -3
- package/types/main/libs/ParseFlows.d.ts.map +0 -1
- package/types/main/libs/RuleDocumentation.d.ts +0 -21
- package/types/main/libs/RuleDocumentation.d.ts.map +0 -1
- package/types/main/libs/ScanFlows.d.ts +0 -5
- package/types/main/libs/ScanFlows.d.ts.map +0 -1
- package/types/main/libs/exportAsDetails.d.ts +0 -4
- package/types/main/libs/exportAsDetails.d.ts.map +0 -1
- package/types/main/libs/exportAsSarif.d.ts +0 -3
- package/types/main/libs/exportAsSarif.d.ts.map +0 -1
- package/types/main/models/FlatViolation.d.ts +0 -16
- package/types/main/models/FlatViolation.d.ts.map +0 -1
- package/types/main/models/Flow.d.ts +0 -70
- package/types/main/models/Flow.d.ts.map +0 -1
- package/types/main/models/FlowAttribute.d.ts +0 -6
- package/types/main/models/FlowAttribute.d.ts.map +0 -1
- package/types/main/models/FlowElement.d.ts +0 -11
- package/types/main/models/FlowElement.d.ts.map +0 -1
- package/types/main/models/FlowElementConnector.d.ts +0 -16
- package/types/main/models/FlowElementConnector.d.ts.map +0 -1
- package/types/main/models/FlowGraph.d.ts +0 -86
- package/types/main/models/FlowGraph.d.ts.map +0 -1
- package/types/main/models/FlowMetadata.d.ts +0 -5
- package/types/main/models/FlowMetadata.d.ts.map +0 -1
- package/types/main/models/FlowNode.d.ts +0 -66
- package/types/main/models/FlowNode.d.ts.map +0 -1
- package/types/main/models/FlowResource.d.ts +0 -5
- package/types/main/models/FlowResource.d.ts.map +0 -1
- package/types/main/models/FlowType.d.ts +0 -24
- package/types/main/models/FlowType.d.ts.map +0 -1
- package/types/main/models/FlowVariable.d.ts +0 -64
- package/types/main/models/FlowVariable.d.ts.map +0 -1
- package/types/main/models/LoopRuleCommon.d.ts +0 -15
- package/types/main/models/LoopRuleCommon.d.ts.map +0 -1
- package/types/main/models/ParsedFlow.d.ts +0 -8
- package/types/main/models/ParsedFlow.d.ts.map +0 -1
- package/types/main/models/RuleCommon.d.ts +0 -58
- package/types/main/models/RuleCommon.d.ts.map +0 -1
- package/types/main/models/RuleInfo.d.ts +0 -50
- package/types/main/models/RuleInfo.d.ts.map +0 -1
- package/types/main/models/RuleResult.d.ts +0 -15
- package/types/main/models/RuleResult.d.ts.map +0 -1
- package/types/main/models/ScanResult.d.ts +0 -8
- package/types/main/models/ScanResult.d.ts.map +0 -1
- package/types/main/models/Violation.d.ts +0 -12
- package/types/main/models/Violation.d.ts.map +0 -1
- package/types/main/rules/APIVersion.d.ts +0 -10
- package/types/main/rules/APIVersion.d.ts.map +0 -1
- package/types/main/rules/ActionCallsInLoop.d.ts +0 -7
- package/types/main/rules/ActionCallsInLoop.d.ts.map +0 -1
- package/types/main/rules/AutoLayout.d.ts +0 -8
- package/types/main/rules/AutoLayout.d.ts.map +0 -1
- package/types/main/rules/CopyAPIName.d.ts +0 -8
- package/types/main/rules/CopyAPIName.d.ts.map +0 -1
- package/types/main/rules/CyclomaticComplexity.d.ts +0 -12
- package/types/main/rules/CyclomaticComplexity.d.ts.map +0 -1
- package/types/main/rules/DMLStatementInLoop.d.ts +0 -7
- package/types/main/rules/DMLStatementInLoop.d.ts.map +0 -1
- package/types/main/rules/DuplicateDMLOperation.d.ts +0 -9
- package/types/main/rules/DuplicateDMLOperation.d.ts.map +0 -1
- package/types/main/rules/FlowDescription.d.ts +0 -8
- package/types/main/rules/FlowDescription.d.ts.map +0 -1
- package/types/main/rules/FlowName.d.ts +0 -16
- package/types/main/rules/FlowName.d.ts.map +0 -1
- package/types/main/rules/GetRecordAllFields.d.ts +0 -8
- package/types/main/rules/GetRecordAllFields.d.ts.map +0 -1
- package/types/main/rules/HardcodedId.d.ts +0 -14
- package/types/main/rules/HardcodedId.d.ts.map +0 -1
- package/types/main/rules/HardcodedSecret.d.ts +0 -14
- package/types/main/rules/HardcodedSecret.d.ts.map +0 -1
- package/types/main/rules/HardcodedUrl.d.ts +0 -14
- package/types/main/rules/HardcodedUrl.d.ts.map +0 -1
- package/types/main/rules/InactiveFlow.d.ts +0 -8
- package/types/main/rules/InactiveFlow.d.ts.map +0 -1
- package/types/main/rules/MissingFaultPath.d.ts +0 -15
- package/types/main/rules/MissingFaultPath.d.ts.map +0 -1
- package/types/main/rules/MissingFilterRecordTrigger.d.ts +0 -8
- package/types/main/rules/MissingFilterRecordTrigger.d.ts.map +0 -1
- package/types/main/rules/MissingMetadataDescription.d.ts +0 -8
- package/types/main/rules/MissingMetadataDescription.d.ts.map +0 -1
- package/types/main/rules/MissingNullHandler.d.ts +0 -8
- package/types/main/rules/MissingNullHandler.d.ts.map +0 -1
- package/types/main/rules/MissingRecordTriggerFilter.d.ts +0 -8
- package/types/main/rules/MissingRecordTriggerFilter.d.ts.map +0 -1
- package/types/main/rules/ProcessBuilder.d.ts +0 -8
- package/types/main/rules/ProcessBuilder.d.ts.map +0 -1
- package/types/main/rules/RecordIdAsString.d.ts +0 -8
- package/types/main/rules/RecordIdAsString.d.ts.map +0 -1
- package/types/main/rules/RecursiveAfterUpdate.d.ts +0 -9
- package/types/main/rules/RecursiveAfterUpdate.d.ts.map +0 -1
- package/types/main/rules/SOQLQueryInLoop.d.ts +0 -7
- package/types/main/rules/SOQLQueryInLoop.d.ts.map +0 -1
- package/types/main/rules/SameRecordFieldUpdates.d.ts +0 -9
- package/types/main/rules/SameRecordFieldUpdates.d.ts.map +0 -1
- package/types/main/rules/TransformInsteadOfLoop.d.ts +0 -8
- package/types/main/rules/TransformInsteadOfLoop.d.ts.map +0 -1
- package/types/main/rules/TriggerOrder.d.ts +0 -8
- package/types/main/rules/TriggerOrder.d.ts.map +0 -1
- package/types/main/rules/UnconnectedElement.d.ts +0 -8
- package/types/main/rules/UnconnectedElement.d.ts.map +0 -1
- package/types/main/rules/UnsafeRunningContext.d.ts +0 -8
- package/types/main/rules/UnsafeRunningContext.d.ts.map +0 -1
- package/types/main/rules/UnusedVariable.d.ts +0 -8
- package/types/main/rules/UnusedVariable.d.ts.map +0 -1
- package/types/main/store/DefaultRuleStore.d.ts +0 -3
- package/types/main/store/DefaultRuleStore.d.ts.map +0 -1
- package/types/main/store/RuleRegistry.d.ts +0 -23
- package/types/main/store/RuleRegistry.d.ts.map +0 -1
- package/vite.config.ts +0 -33
- /package/{out/index.d.ts → index.d.ts} +0 -0
- /package/{out/index.js → index.js} +0 -0
- /package/{out/main → main}/config/NodeIcons.d.ts +0 -0
- /package/{out/main → main}/config/NodeIcons.js +0 -0
- /package/{out/main → main}/config/RegexAdapter.d.ts +0 -0
- /package/{out/main → main}/config/RegexAdapter.js +0 -0
- /package/{out/main → main}/config/RuleRegistry.d.ts +0 -0
- /package/{out/main → main}/config/RuleRegistry.js +0 -0
- /package/{out/main → main}/config/VariableIcons.d.ts +0 -0
- /package/{out/main → main}/config/VariableIcons.js +0 -0
- /package/{out/main → main}/enums/MetadataTypes.d.ts +0 -0
- /package/{out/main → main}/enums/MetadataTypes.js +0 -0
- /package/{out/main → main}/interfaces/IExceptions.d.ts +0 -0
- /package/{out/main → main}/interfaces/IExceptions.js +0 -0
- /package/{out/main → main}/interfaces/IRuleConfig.d.ts +0 -0
- /package/{out/main → main}/interfaces/IRuleConfig.js +0 -0
- /package/{out/main → main}/interfaces/IRuleDefinition.d.ts +0 -0
- /package/{out/main → main}/interfaces/IRuleDefinition.js +0 -0
- /package/{out/main → main}/interfaces/IRuleOptions.d.ts +0 -0
- /package/{out/main → main}/interfaces/IRuleOptions.js +0 -0
- /package/{out/main → main}/interfaces/IRulesConfig.d.ts +0 -0
- /package/{out/main → main}/interfaces/IRulesConfig.js +0 -0
- /package/{out/main → main}/internals/internals.d.ts +0 -0
- /package/{out/main → main}/internals/internals.js +0 -0
- /package/{out/main → main}/libs/BuildFlow.d.ts +0 -0
- /package/{out/main → main}/libs/BuildFlow.js +0 -0
- /package/{out/main → main}/libs/Compiler.d.ts +0 -0
- /package/{out/main → main}/libs/Compiler.js +0 -0
- /package/{out/main → main}/libs/ExportDetails.d.ts +0 -0
- /package/{out/main → main}/libs/ExportDetails.js +0 -0
- /package/{out/main → main}/libs/ExportDiagram.d.ts +0 -0
- /package/{out/main → main}/libs/ExportDiagram.js +0 -0
- /package/{out/main → main}/libs/ExportSarif.d.ts +0 -0
- /package/{out/main → main}/libs/ExportSarif.js +0 -0
- /package/{out/main → main}/libs/FixFlows.d.ts +0 -0
- /package/{out/main → main}/libs/FixFlows.js +0 -0
- /package/{out/main → main}/libs/GetRuleDefinitions.d.ts +0 -0
- /package/{out/main → main}/libs/GetRuleDefinitions.js +0 -0
- /package/{out/main → main}/libs/ParseFlows.d.ts +0 -0
- /package/{out/main → main}/libs/ParseFlows.js +0 -0
- /package/{out/main → main}/libs/RuleDocumentation.d.ts +0 -0
- /package/{out/main → main}/libs/RuleDocumentation.js +0 -0
- /package/{out/main → main}/libs/ScanFlows.d.ts +0 -0
- /package/{out/main → main}/libs/ScanFlows.js +0 -0
- /package/{out/main → main}/models/FlatViolation.d.ts +0 -0
- /package/{out/main → main}/models/FlatViolation.js +0 -0
- /package/{out/main → main}/models/Flow.d.ts +0 -0
- /package/{out/main → main}/models/Flow.js +0 -0
- /package/{out/main → main}/models/FlowAttribute.d.ts +0 -0
- /package/{out/main → main}/models/FlowAttribute.js +0 -0
- /package/{out/main → main}/models/FlowElement.d.ts +0 -0
- /package/{out/main → main}/models/FlowElement.js +0 -0
- /package/{out/main → main}/models/FlowElementConnector.d.ts +0 -0
- /package/{out/main → main}/models/FlowElementConnector.js +0 -0
- /package/{out/main → main}/models/FlowGraph.d.ts +0 -0
- /package/{out/main → main}/models/FlowGraph.js +0 -0
- /package/{out/main → main}/models/FlowMetadata.d.ts +0 -0
- /package/{out/main → main}/models/FlowMetadata.js +0 -0
- /package/{out/main → main}/models/FlowNode.d.ts +0 -0
- /package/{out/main → main}/models/FlowNode.js +0 -0
- /package/{out/main → main}/models/FlowResource.d.ts +0 -0
- /package/{out/main → main}/models/FlowResource.js +0 -0
- /package/{out/main → main}/models/FlowType.d.ts +0 -0
- /package/{out/main → main}/models/FlowType.js +0 -0
- /package/{out/main → main}/models/FlowVariable.d.ts +0 -0
- /package/{out/main → main}/models/FlowVariable.js +0 -0
- /package/{out/main → main}/models/LoopRuleCommon.d.ts +0 -0
- /package/{out/main → main}/models/LoopRuleCommon.js +0 -0
- /package/{out/main → main}/models/ParsedFlow.d.ts +0 -0
- /package/{out/main → main}/models/ParsedFlow.js +0 -0
- /package/{out/main → main}/models/RuleCommon.d.ts +0 -0
- /package/{out/main → main}/models/RuleCommon.js +0 -0
- /package/{out/main → main}/models/RuleInfo.d.ts +0 -0
- /package/{out/main → main}/models/RuleInfo.js +0 -0
- /package/{out/main → main}/models/RuleResult.d.ts +0 -0
- /package/{out/main → main}/models/RuleResult.js +0 -0
- /package/{out/main → main}/models/ScanResult.d.ts +0 -0
- /package/{out/main → main}/models/ScanResult.js +0 -0
- /package/{out/main → main}/models/Violation.d.ts +0 -0
- /package/{out/main → main}/models/Violation.js +0 -0
- /package/{out/main → main}/rules/APIVersion.d.ts +0 -0
- /package/{out/main → main}/rules/APIVersion.js +0 -0
- /package/{out/main → main}/rules/ActionCallsInLoop.d.ts +0 -0
- /package/{out/main → main}/rules/ActionCallsInLoop.js +0 -0
- /package/{out/main → main}/rules/AutoLayout.d.ts +0 -0
- /package/{out/main → main}/rules/AutoLayout.js +0 -0
- /package/{out/main → main}/rules/CopyAPIName.d.ts +0 -0
- /package/{out/main → main}/rules/CopyAPIName.js +0 -0
- /package/{out/main → main}/rules/CyclomaticComplexity.d.ts +0 -0
- /package/{out/main → main}/rules/CyclomaticComplexity.js +0 -0
- /package/{out/main → main}/rules/DMLStatementInLoop.d.ts +0 -0
- /package/{out/main → main}/rules/DMLStatementInLoop.js +0 -0
- /package/{out/main → main}/rules/DuplicateDMLOperation.d.ts +0 -0
- /package/{out/main → main}/rules/DuplicateDMLOperation.js +0 -0
- /package/{out/main → main}/rules/FlowDescription.d.ts +0 -0
- /package/{out/main → main}/rules/FlowDescription.js +0 -0
- /package/{out/main → main}/rules/FlowName.d.ts +0 -0
- /package/{out/main → main}/rules/FlowName.js +0 -0
- /package/{out/main → main}/rules/GetRecordAllFields.d.ts +0 -0
- /package/{out/main → main}/rules/GetRecordAllFields.js +0 -0
- /package/{out/main → main}/rules/HardcodedId.d.ts +0 -0
- /package/{out/main → main}/rules/HardcodedId.js +0 -0
- /package/{out/main → main}/rules/HardcodedSecret.d.ts +0 -0
- /package/{out/main → main}/rules/HardcodedSecret.js +0 -0
- /package/{out/main → main}/rules/HardcodedUrl.d.ts +0 -0
- /package/{out/main → main}/rules/HardcodedUrl.js +0 -0
- /package/{out/main → main}/rules/InactiveFlow.d.ts +0 -0
- /package/{out/main → main}/rules/InactiveFlow.js +0 -0
- /package/{out/main → main}/rules/MissingFaultPath.d.ts +0 -0
- /package/{out/main → main}/rules/MissingFaultPath.js +0 -0
- /package/{out/main → main}/rules/MissingMetadataDescription.d.ts +0 -0
- /package/{out/main → main}/rules/MissingMetadataDescription.js +0 -0
- /package/{out/main → main}/rules/MissingNullHandler.d.ts +0 -0
- /package/{out/main → main}/rules/MissingNullHandler.js +0 -0
- /package/{out/main → main}/rules/MissingRecordTriggerFilter.d.ts +0 -0
- /package/{out/main → main}/rules/MissingRecordTriggerFilter.js +0 -0
- /package/{out/main → main}/rules/ProcessBuilder.d.ts +0 -0
- /package/{out/main → main}/rules/ProcessBuilder.js +0 -0
- /package/{out/main → main}/rules/RecordIdAsString.d.ts +0 -0
- /package/{out/main → main}/rules/RecordIdAsString.js +0 -0
- /package/{out/main → main}/rules/RecursiveAfterUpdate.d.ts +0 -0
- /package/{out/main → main}/rules/RecursiveAfterUpdate.js +0 -0
- /package/{out/main → main}/rules/SOQLQueryInLoop.d.ts +0 -0
- /package/{out/main → main}/rules/SOQLQueryInLoop.js +0 -0
- /package/{out/main → main}/rules/SameRecordFieldUpdates.d.ts +0 -0
- /package/{out/main → main}/rules/SameRecordFieldUpdates.js +0 -0
- /package/{out/main → main}/rules/TransformInsteadOfLoop.d.ts +0 -0
- /package/{out/main → main}/rules/TransformInsteadOfLoop.js +0 -0
- /package/{out/main → main}/rules/TriggerOrder.d.ts +0 -0
- /package/{out/main → main}/rules/TriggerOrder.js +0 -0
- /package/{out/main → main}/rules/UnconnectedElement.d.ts +0 -0
- /package/{out/main → main}/rules/UnconnectedElement.js +0 -0
- /package/{out/main → main}/rules/UnsafeRunningContext.d.ts +0 -0
- /package/{out/main → main}/rules/UnsafeRunningContext.js +0 -0
- /package/{out/main → main}/rules/UnusedVariable.d.ts +0 -0
- /package/{out/main → main}/rules/UnusedVariable.js +0 -0
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, jest } from "@jest/globals";
|
|
2
|
-
|
|
3
|
-
import { Flow } from "../../src/main/models/Flow";
|
|
4
|
-
|
|
5
|
-
describe("Flow Model", () => {
|
|
6
|
-
beforeAll(() => {
|
|
7
|
-
jest.spyOn(console, "warn").mockImplementation(() => jest.fn());
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
it("should print as xml when correct parameters", () => {
|
|
11
|
-
const sut: Flow = new Flow();
|
|
12
|
-
sut.xmldata = {
|
|
13
|
-
"@_xmlns": "http://soap.sforce.com/2006/04/metadata",
|
|
14
|
-
"@_xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
|
|
15
|
-
dynamicChoiceSets: {
|
|
16
|
-
name: "Priority",
|
|
17
|
-
dataType: "Picklist",
|
|
18
|
-
displayField: {
|
|
19
|
-
"@_xsi:nil": "true", // String "true" (boolean true also works, but string matches parsed output)
|
|
20
|
-
},
|
|
21
|
-
object: {
|
|
22
|
-
"@_xsi:nil": "true",
|
|
23
|
-
},
|
|
24
|
-
picklistField: "Priority",
|
|
25
|
-
picklistObject: "Task",
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
const out = sut.toXMLString();
|
|
29
|
-
expect(out).toBeTruthy();
|
|
30
|
-
expect(out).toMatch('<displayField xsi:nil="true"></displayField>'); // UPDATED: Expanded form
|
|
31
|
-
expect(out).toMatch('<object xsi:nil="true"></object>'); // UPDATED: Expanded form
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
class NoErrorThrownError extends Error {}
|
|
35
|
-
const getError = (call: () => unknown): Error => {
|
|
36
|
-
try {
|
|
37
|
-
call();
|
|
38
|
-
throw new NoErrorThrownError();
|
|
39
|
-
} catch (error: unknown) {
|
|
40
|
-
return error as Error;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
it("should throw an exception for bad document", async () => {
|
|
45
|
-
const sut: Flow = new Flow();
|
|
46
|
-
const errors = getError(sut["generateDoc"]);
|
|
47
|
-
expect(errors).toBeTruthy();
|
|
48
|
-
expect(errors).not.toBeInstanceOf(NoErrorThrownError);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it("should identify transformElement as a FlowNode", () => {
|
|
52
|
-
const sut: Flow = new Flow();
|
|
53
|
-
sut.xmldata = {
|
|
54
|
-
transforms: [
|
|
55
|
-
{
|
|
56
|
-
name: "OCR_Mapping",
|
|
57
|
-
description: "OCR Mapping",
|
|
58
|
-
label: "OCR Mapping",
|
|
59
|
-
locationX: "176",
|
|
60
|
-
locationY: "323",
|
|
61
|
-
connector: {
|
|
62
|
-
targetReference: "OCR",
|
|
63
|
-
},
|
|
64
|
-
dataType: "SObject",
|
|
65
|
-
isCollection: "false",
|
|
66
|
-
objectType: "OpportunityContactRole",
|
|
67
|
-
scale: "0",
|
|
68
|
-
transformValues: {
|
|
69
|
-
transformValueActions: [
|
|
70
|
-
{
|
|
71
|
-
outputFieldApiName: "OpportunityId",
|
|
72
|
-
transformType: "Map",
|
|
73
|
-
value: {
|
|
74
|
-
elementReference: "$Record.Id",
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
outputFieldApiName: "ContactId",
|
|
79
|
-
transformType: "Map",
|
|
80
|
-
value: {
|
|
81
|
-
elementReference: "$Record.ContactId",
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
outputFieldApiName: "Role",
|
|
86
|
-
transformType: "Map",
|
|
87
|
-
value: {
|
|
88
|
-
stringValue: "Decision Maker",
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
sut["preProcessNodes"]();
|
|
98
|
-
|
|
99
|
-
expect(sut.elements).toBeDefined();
|
|
100
|
-
expect(sut.elements).toHaveLength(1);
|
|
101
|
-
const element = sut.elements?.pop();
|
|
102
|
-
expect(element).toBeDefined();
|
|
103
|
-
expect(element).toHaveProperty("name", "OCR_Mapping");
|
|
104
|
-
expect(element?.metaType).toBe("node");
|
|
105
|
-
expect(element?.subtype).toBe("transforms");
|
|
106
|
-
});
|
|
107
|
-
});
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "@jest/globals";
|
|
2
|
-
|
|
3
|
-
import { Flow, FlowNode } from "../../src/main/internals/internals";
|
|
4
|
-
import { LoopRuleCommon } from "../../src/main/models/LoopRuleCommon";
|
|
5
|
-
|
|
6
|
-
class TestLoopRule extends LoopRuleCommon {
|
|
7
|
-
constructor() {
|
|
8
|
-
super({
|
|
9
|
-
description: "Test Rule Description",
|
|
10
|
-
docRefs: [],
|
|
11
|
-
label: "Test Rule",
|
|
12
|
-
name: "TestRule",
|
|
13
|
-
supportedTypes: [],
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
protected getStatementTypes(): string[] {
|
|
18
|
-
return ["actionCalls"];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
describe("LoopRuleCommon", () => {
|
|
23
|
-
let rule: TestLoopRule;
|
|
24
|
-
|
|
25
|
-
beforeEach(() => {
|
|
26
|
-
rule = new TestLoopRule();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
describe("execute", () => {
|
|
30
|
-
it("should return empty when no loop elements exists", () => {
|
|
31
|
-
const actionCalls: FlowNode[] = [
|
|
32
|
-
new FlowNode("create_case_manually", "actionCalls", {
|
|
33
|
-
connector: { targetReference: "create_case_manually_2" },
|
|
34
|
-
description: "create case manually",
|
|
35
|
-
label: "create case manually",
|
|
36
|
-
locationX: "0",
|
|
37
|
-
locationY: "0",
|
|
38
|
-
name: "create_case_manually",
|
|
39
|
-
}),
|
|
40
|
-
new FlowNode("create_case_manually_2", "actionCalls", {
|
|
41
|
-
description: "create case manually 2",
|
|
42
|
-
label: "create case manually 2",
|
|
43
|
-
locationX: "0",
|
|
44
|
-
locationY: "0",
|
|
45
|
-
name: "create_case_manually_2",
|
|
46
|
-
}),
|
|
47
|
-
];
|
|
48
|
-
const flow = new Flow();
|
|
49
|
-
flow.elements = [...actionCalls];
|
|
50
|
-
|
|
51
|
-
const result = rule.execute(flow);
|
|
52
|
-
|
|
53
|
-
expect(result.occurs).toBe(false);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it("should return empty when no statements in loops exists", () => {
|
|
57
|
-
const flow = new Flow();
|
|
58
|
-
flow.elements = [
|
|
59
|
-
new FlowNode("loop1", "loops", {
|
|
60
|
-
description: "loop 1",
|
|
61
|
-
label: "loop",
|
|
62
|
-
locationX: "0",
|
|
63
|
-
locationY: "0",
|
|
64
|
-
name: "loop1",
|
|
65
|
-
nextValueConnector: { targetReference: "assign1" },
|
|
66
|
-
noMoreValuesConnector: { targetReference: "End" },
|
|
67
|
-
}),
|
|
68
|
-
new FlowNode("assign1", "assignments", {
|
|
69
|
-
connector: { targetReference: "End" },
|
|
70
|
-
name: "assign1",
|
|
71
|
-
}),
|
|
72
|
-
];
|
|
73
|
-
|
|
74
|
-
const result = rule.execute(flow);
|
|
75
|
-
|
|
76
|
-
expect(result.occurs).toBe(false);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
it("should return when loop elements with statements exists", () => {
|
|
80
|
-
const actionCalls: FlowNode[] = [
|
|
81
|
-
new FlowNode("create_case_manually", "actionCalls", {
|
|
82
|
-
connector: { targetReference: "create_case_manually_2" },
|
|
83
|
-
description: "create case manually",
|
|
84
|
-
label: "create case manually",
|
|
85
|
-
locationX: "0",
|
|
86
|
-
locationY: "0",
|
|
87
|
-
name: "create_case_manually",
|
|
88
|
-
}),
|
|
89
|
-
new FlowNode("create_case_manually_2", "actionCalls", {
|
|
90
|
-
description: "create case manually 2",
|
|
91
|
-
label: "create case manually 2",
|
|
92
|
-
locationX: "0",
|
|
93
|
-
locationY: "0",
|
|
94
|
-
name: "create_case_manually_2",
|
|
95
|
-
}),
|
|
96
|
-
];
|
|
97
|
-
|
|
98
|
-
const loopElements: FlowNode[] = [
|
|
99
|
-
new FlowNode("loop1", "loops", {
|
|
100
|
-
description: "loop 1",
|
|
101
|
-
label: "loop",
|
|
102
|
-
locationX: "0",
|
|
103
|
-
locationY: "0",
|
|
104
|
-
name: "loop1",
|
|
105
|
-
nextValueConnector: { targetReference: "create_case_manually" },
|
|
106
|
-
noMoreValuesConnector: { targetReference: "End" },
|
|
107
|
-
}),
|
|
108
|
-
];
|
|
109
|
-
|
|
110
|
-
const flow = new Flow();
|
|
111
|
-
flow.elements = [...loopElements, ...actionCalls];
|
|
112
|
-
|
|
113
|
-
const result = rule.execute(flow);
|
|
114
|
-
|
|
115
|
-
expect(result.occurs).toBe(true);
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
describe("findLoopElements", () => {
|
|
120
|
-
it("should return empty when all elements are not loops", () => {
|
|
121
|
-
const actionCalls: FlowNode[] = [
|
|
122
|
-
new FlowNode("create_case_manually", "actionCalls", {
|
|
123
|
-
connector: { targetReference: "create_case_manually_2" },
|
|
124
|
-
description: "create case manually",
|
|
125
|
-
label: "create case manually",
|
|
126
|
-
locationX: "0",
|
|
127
|
-
locationY: "0",
|
|
128
|
-
name: "create_case_manually",
|
|
129
|
-
}),
|
|
130
|
-
new FlowNode("create_case_manually_2", "actionCalls", {
|
|
131
|
-
description: "create case manually 2",
|
|
132
|
-
label: "create case manually 2",
|
|
133
|
-
locationX: "0",
|
|
134
|
-
locationY: "0",
|
|
135
|
-
name: "create_case_manually_2",
|
|
136
|
-
}),
|
|
137
|
-
];
|
|
138
|
-
const flow = new Flow();
|
|
139
|
-
flow.elements = [...actionCalls];
|
|
140
|
-
|
|
141
|
-
const result = rule["findLoopElements"](flow);
|
|
142
|
-
|
|
143
|
-
expect(result).toHaveLength(0);
|
|
144
|
-
expect(result).toEqual([]);
|
|
145
|
-
});
|
|
146
|
-
it("should return empty when no loop elements exists", () => {
|
|
147
|
-
const flow = new Flow();
|
|
148
|
-
flow.elements = [];
|
|
149
|
-
|
|
150
|
-
const result = rule["findLoopElements"](flow);
|
|
151
|
-
|
|
152
|
-
expect(result).toHaveLength(0);
|
|
153
|
-
expect(result).toEqual([]);
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
describe("findLoopEnd", () => {
|
|
158
|
-
it("should return current element when noMoreValuesConnector is not defined", () => {
|
|
159
|
-
const element = new FlowNode("loop1", "loops", {
|
|
160
|
-
name: "loop1",
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
const result = rule["findLoopEnd"](element);
|
|
164
|
-
|
|
165
|
-
expect(result).toBe("loop1");
|
|
166
|
-
});
|
|
167
|
-
it("should return the targetReference of noMoreValuesConnector", () => {
|
|
168
|
-
const element = new FlowNode("loop1", "loops", {
|
|
169
|
-
noMoreValuesConnector: { targetReference: "End" },
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
const result = rule["findLoopEnd"](element);
|
|
173
|
-
|
|
174
|
-
expect(result).toBe("End");
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
describe("findStatementsInLoops", () => {
|
|
179
|
-
it("should return empty when no statements in loops exists", () => {
|
|
180
|
-
const actionCalls: FlowNode[] = [
|
|
181
|
-
new FlowNode("create_case_manually", "actionCalls", {
|
|
182
|
-
connector: { targetReference: "create_case_manually_2" },
|
|
183
|
-
description: "create case manually",
|
|
184
|
-
label: "create case manually",
|
|
185
|
-
locationX: "0",
|
|
186
|
-
locationY: "0",
|
|
187
|
-
name: "create_case_manually",
|
|
188
|
-
}),
|
|
189
|
-
new FlowNode("create_case_manually_2", "actionCalls", {
|
|
190
|
-
description: "create case manually 2",
|
|
191
|
-
label: "create case manually 2",
|
|
192
|
-
locationX: "0",
|
|
193
|
-
locationY: "0",
|
|
194
|
-
name: "create_case_manually_2",
|
|
195
|
-
}),
|
|
196
|
-
];
|
|
197
|
-
|
|
198
|
-
const flow = new Flow();
|
|
199
|
-
flow.elements = [...actionCalls];
|
|
200
|
-
|
|
201
|
-
const result = rule["findStatementsInLoops"](flow, []);
|
|
202
|
-
|
|
203
|
-
expect(result).toHaveLength(0);
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
it("should find statements in loop", () => {
|
|
207
|
-
const actionCalls: FlowNode[] = [
|
|
208
|
-
new FlowNode("create_case_manually", "actionCalls", {
|
|
209
|
-
connector: { targetReference: "create_case_manually_2" },
|
|
210
|
-
description: "create case manually",
|
|
211
|
-
label: "create case manually",
|
|
212
|
-
locationX: "0",
|
|
213
|
-
locationY: "0",
|
|
214
|
-
name: "create_case_manually",
|
|
215
|
-
}),
|
|
216
|
-
new FlowNode("create_case_manually_2", "actionCalls", {
|
|
217
|
-
description: "create case manually 2",
|
|
218
|
-
label: "create case manually 2",
|
|
219
|
-
locationX: "0",
|
|
220
|
-
locationY: "0",
|
|
221
|
-
name: "create_case_manually_2",
|
|
222
|
-
}),
|
|
223
|
-
];
|
|
224
|
-
|
|
225
|
-
const loopElements: FlowNode[] = [
|
|
226
|
-
new FlowNode("loop1", "loops", {
|
|
227
|
-
description: "loop 1",
|
|
228
|
-
label: "loop",
|
|
229
|
-
locationX: "0",
|
|
230
|
-
locationY: "0",
|
|
231
|
-
name: "loop1",
|
|
232
|
-
nextValueConnector: { targetReference: "create_case_manually" },
|
|
233
|
-
noMoreValuesConnector: { targetReference: "End" },
|
|
234
|
-
}),
|
|
235
|
-
];
|
|
236
|
-
|
|
237
|
-
const flow = new Flow();
|
|
238
|
-
flow.elements = [...loopElements, ...actionCalls];
|
|
239
|
-
|
|
240
|
-
const result = rule["findStatementsInLoops"](flow, loopElements);
|
|
241
|
-
|
|
242
|
-
expect(result).toHaveLength(2);
|
|
243
|
-
expect(result).toEqual(actionCalls);
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "@jest/globals";
|
|
2
|
-
import { ruleRegistry } from "../../src/main/config/RuleRegistry";
|
|
3
|
-
|
|
4
|
-
describe("RuleCommon automatically sets isConfigurable correctly", () => {
|
|
5
|
-
it("isConfigurable=true only when check() actually uses options", () => {
|
|
6
|
-
// Get all rule classes (including beta, since the test should cover everything)
|
|
7
|
-
const allRuleIds = ruleRegistry.getAllRuleIds(true);
|
|
8
|
-
|
|
9
|
-
for (const ruleId of allRuleIds) {
|
|
10
|
-
const ruleInstance = ruleRegistry.createInstance(ruleId);
|
|
11
|
-
|
|
12
|
-
const checkSource = (ruleInstance as any).check.toString();
|
|
13
|
-
const usesOptions = /options[.\?]/.test(checkSource);
|
|
14
|
-
|
|
15
|
-
expect(ruleInstance.isConfigurable).toBe(usesOptions);
|
|
16
|
-
|
|
17
|
-
if (ruleInstance.isConfigurable !== usesOptions) {
|
|
18
|
-
console.log(`\nMISMATCH on rule: ${ruleInstance.name} (${ruleId})`);
|
|
19
|
-
console.log(` isConfigurable = ${ruleInstance.isConfigurable}`);
|
|
20
|
-
console.log(` source ${usesOptions ? "DOES" : "does NOT"} use options`);
|
|
21
|
-
console.log(` check() source:\n${checkSource}\n`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it("known configurable rules have isConfigurable=true", () => {
|
|
27
|
-
const cyclomatic = ruleRegistry.createInstance("excessive-cyclomatic-complexity");
|
|
28
|
-
const flowName = ruleRegistry.createInstance("invalid-naming-convention");
|
|
29
|
-
|
|
30
|
-
expect(cyclomatic.isConfigurable).toBe(true);
|
|
31
|
-
expect(flowName.isConfigurable).toBe(true);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it("known non-configurable rules have isConfigurable=false", () => {
|
|
35
|
-
const duplicateDml = ruleRegistry.createInstance("duplicate-dml");
|
|
36
|
-
const autoLayout = ruleRegistry.createInstance("missing-auto-layout");
|
|
37
|
-
|
|
38
|
-
expect(duplicateDml.isConfigurable).toBe(false);
|
|
39
|
-
expect(autoLayout.isConfigurable).toBe(false);
|
|
40
|
-
});
|
|
41
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"incremental": true,
|
|
5
|
-
"tsBuildInfoFile": "../../.tsbuildinfo/core.tsbuildinfo",
|
|
6
|
-
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"emitDeclarationOnly": true,
|
|
9
|
-
"outDir": "types",
|
|
10
|
-
"target": "ES2020",
|
|
11
|
-
"module": "Node16",
|
|
12
|
-
"lib": ["ES2020"],
|
|
13
|
-
"downlevelIteration": true,
|
|
14
|
-
"rootDir": "src",
|
|
15
|
-
"declarationMap": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"baseUrl": ".",
|
|
18
|
-
"paths": {
|
|
19
|
-
"@flow-scanner/regex-scanner": ["../regex-scanner/out"],
|
|
20
|
-
"@flow-scanner/regex-scanner/*": ["../regex-scanner/out/*"]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"include": ["src/**/*.ts"],
|
|
24
|
-
"exclude": ["node_modules", "out"],
|
|
25
|
-
"references": [
|
|
26
|
-
{ "path": "../regex-scanner" }
|
|
27
|
-
]
|
|
28
|
-
}
|
package/tsconfig.types.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "ES6",
|
|
4
|
-
"target": "es6",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"outDir": "out",
|
|
7
|
-
"lib": ["es2020.string", "es6"],
|
|
8
|
-
"experimentalDecorators": true,
|
|
9
|
-
"sourceMap": false,
|
|
10
|
-
"rootDir": "src",
|
|
11
|
-
"strict": false,
|
|
12
|
-
"strictNullChecks": true,
|
|
13
|
-
"baseUrl": ".",
|
|
14
|
-
"declaration": true,
|
|
15
|
-
"esModuleInterop": true
|
|
16
|
-
},
|
|
17
|
-
"exclude": [
|
|
18
|
-
"node_modules",
|
|
19
|
-
"node_modules/**",
|
|
20
|
-
"example-flows/**",
|
|
21
|
-
"tests/**/*.ts",
|
|
22
|
-
"jest.config.ts",
|
|
23
|
-
"vite.config.ts",
|
|
24
|
-
"jest.setup.ts"
|
|
25
|
-
]
|
|
26
|
-
}
|
package/types/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { IRuleDefinition } from "./main/interfaces/IRuleDefinition";
|
|
2
|
-
import type { IRulesConfig } from "./main/interfaces/IRulesConfig";
|
|
3
|
-
import type { FlatViolation } from "./main/models/FlatViolation";
|
|
4
|
-
import { Compiler } from "./main/libs/Compiler";
|
|
5
|
-
import { exportDetails } from "./main/libs/ExportDetails";
|
|
6
|
-
import { exportSarif } from "./main/libs/ExportSarif";
|
|
7
|
-
import { fix } from "./main/libs/FixFlows";
|
|
8
|
-
import { getRules } from "./main/libs/GetRuleDefinitions";
|
|
9
|
-
import { parse } from "./main/libs/ParseFlows";
|
|
10
|
-
import { scan } from "./main/libs/ScanFlows";
|
|
11
|
-
import { Flow } from "./main/models/Flow";
|
|
12
|
-
import { FlowAttribute } from "./main/models/FlowAttribute";
|
|
13
|
-
import { FlowElement } from "./main/models/FlowElement";
|
|
14
|
-
import { FlowNode } from "./main/models/FlowNode";
|
|
15
|
-
import { FlowResource } from "./main/models/FlowResource";
|
|
16
|
-
import { FlowType } from "./main/models/FlowType";
|
|
17
|
-
import { FlowVariable } from "./main/models/FlowVariable";
|
|
18
|
-
import { ParsedFlow } from "./main/models/ParsedFlow";
|
|
19
|
-
import { RuleResult } from "./main/models/RuleResult";
|
|
20
|
-
import { ScanResult } from "./main/models/ScanResult";
|
|
21
|
-
import { Violation } from "./main/models/Violation";
|
|
22
|
-
import { DEFAULT_ICONS, ASCII_ICONS, type NodeIconConfig } from "./main/config/NodeIcons";
|
|
23
|
-
import { DEFAULT_VARIABLE_ICONS, ASCII_VARIABLE_ICONS, type VariableIconConfig } from "./main/config/VariableIcons";
|
|
24
|
-
import { exportDiagram, type DiagramOptions } from "./main/libs/ExportDiagram";
|
|
25
|
-
export { Compiler, exportDetails, exportDiagram, exportSarif, fix, Flow, FlowAttribute, FlowElement, FlowNode, FlowResource, FlowType, FlowVariable, getRules, parse, ParsedFlow, Violation, RuleResult, scan, ScanResult, DEFAULT_ICONS, ASCII_ICONS, DEFAULT_VARIABLE_ICONS, ASCII_VARIABLE_ICONS, };
|
|
26
|
-
export type { FlatViolation, IRuleDefinition, IRulesConfig, NodeIconConfig, DiagramOptions, VariableIconConfig };
|
|
27
|
-
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACpH,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE/E,OAAO,EACL,QAAQ,EACR,aAAa,EACb,aAAa,EACb,WAAW,EACX,GAAG,EACH,IAAI,EACJ,aAAa,EACb,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,IAAI,EACJ,UAAU,EACV,aAAa,EACb,WAAW,EACX,sBAAsB,EACtB,oBAAoB,GACrB,CAAC;AACF,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter functions to convert between core models (Flow, Violation)
|
|
3
|
-
* and regex-scanner models (MetadataFile, RegexViolation).
|
|
4
|
-
*
|
|
5
|
-
* This allows core rules to delegate to regex-scanner while maintaining
|
|
6
|
-
* backward compatibility with existing consumers.
|
|
7
|
-
*/
|
|
8
|
-
import type { MetadataFile, MetadataElement, RegexViolation } from "@flow-scanner/regex-scanner";
|
|
9
|
-
import { Flow } from "../models/Flow";
|
|
10
|
-
import { FlowElement } from "../models/FlowElement";
|
|
11
|
-
import { Violation } from "../models/Violation";
|
|
12
|
-
/**
|
|
13
|
-
* Convert a Flow object to a MetadataFile for regex-scanner.
|
|
14
|
-
*/
|
|
15
|
-
export declare function toMetadataFile(flow: Flow): MetadataFile;
|
|
16
|
-
/**
|
|
17
|
-
* Convert Flow elements to MetadataElements for element-level scanning.
|
|
18
|
-
*/
|
|
19
|
-
export declare function toMetadataElements(flow: Flow): MetadataElement[];
|
|
20
|
-
/**
|
|
21
|
-
* Convert a RegexViolation to a core Violation.
|
|
22
|
-
* Creates the appropriate FlowElement subclass based on metaType.
|
|
23
|
-
*/
|
|
24
|
-
export declare function toViolation(rv: RegexViolation): Violation;
|
|
25
|
-
/**
|
|
26
|
-
* Convert a core FlowElement to a regex-scanner MetadataElement.
|
|
27
|
-
*/
|
|
28
|
-
export declare function flowElementToMetadataElement(element: FlowElement): MetadataElement;
|
|
29
|
-
/**
|
|
30
|
-
* Convert multiple RegexViolations to core Violations.
|
|
31
|
-
*/
|
|
32
|
-
export declare function toViolations(violations: RegexViolation[]): Violation[];
|
|
33
|
-
//# sourceMappingURL=RegexAdapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RegexAdapter.d.ts","sourceRoot":"","sources":["../../../src/main/adapters/RegexAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,cAAc,EACf,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CAiBvD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,EAAE,CAUhE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,cAAc,GAAG,SAAS,CAgBzD;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,GACnB,eAAe,CAMjB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,SAAS,EAAE,CAEtE"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Icon configuration for flow node types.
|
|
3
|
-
* Emoji are safe in UTF-8 encoded source files and will work in all modern builds.
|
|
4
|
-
* If you need ASCII fallback, use FlowNode.setIconConfig(ASCII_ICONS)
|
|
5
|
-
*/
|
|
6
|
-
export interface NodeIconConfig {
|
|
7
|
-
[nodeType: string]: {
|
|
8
|
-
[subtype: string]: string;
|
|
9
|
-
} | {
|
|
10
|
-
default: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Default icons using emoji (recommended for modern environments)
|
|
15
|
-
*/
|
|
16
|
-
export declare const DEFAULT_ICONS: NodeIconConfig;
|
|
17
|
-
/**
|
|
18
|
-
* ASCII fallback icons (for environments without emoji support)
|
|
19
|
-
*/
|
|
20
|
-
export declare const ASCII_ICONS: NodeIconConfig;
|
|
21
|
-
/**
|
|
22
|
-
* Get default icon config (can be overridden at runtime)
|
|
23
|
-
*/
|
|
24
|
-
export declare function getDefaultIconConfig(): NodeIconConfig;
|
|
25
|
-
//# sourceMappingURL=NodeIcons.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeIcons.d.ts","sourceRoot":"","sources":["../../../src/main/config/NodeIcons.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,cAAc;IAC7B,CAAC,QAAQ,EAAE,MAAM,GAAG;QAClB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;KAC3B,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,cA8C3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,cAwBzB,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,CAErD"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter functions to convert between core models (Flow, Violation)
|
|
3
|
-
* and regex-scanner models (MetadataFile, RegexViolation).
|
|
4
|
-
*
|
|
5
|
-
* This allows core rules to delegate to regex-scanner while maintaining
|
|
6
|
-
* backward compatibility with existing consumers.
|
|
7
|
-
*/
|
|
8
|
-
import type { MetadataFile, MetadataElement, RegexViolation } from "@flow-scanner/regex-scanner";
|
|
9
|
-
import { Flow } from "../models/Flow";
|
|
10
|
-
import { FlowElement } from "../models/FlowElement";
|
|
11
|
-
import { Violation } from "../models/Violation";
|
|
12
|
-
/**
|
|
13
|
-
* Convert a Flow object to a MetadataFile for regex-scanner.
|
|
14
|
-
*/
|
|
15
|
-
export declare function toMetadataFile(flow: Flow): MetadataFile;
|
|
16
|
-
/**
|
|
17
|
-
* Convert Flow elements to MetadataElements for element-level scanning.
|
|
18
|
-
*/
|
|
19
|
-
export declare function toMetadataElements(flow: Flow): MetadataElement[];
|
|
20
|
-
/**
|
|
21
|
-
* Convert a RegexViolation to a core Violation.
|
|
22
|
-
* Creates the appropriate FlowElement subclass based on metaType.
|
|
23
|
-
*/
|
|
24
|
-
export declare function toViolation(rv: RegexViolation): Violation;
|
|
25
|
-
/**
|
|
26
|
-
* Convert a core FlowElement to a regex-scanner MetadataElement.
|
|
27
|
-
*/
|
|
28
|
-
export declare function flowElementToMetadataElement(element: FlowElement): MetadataElement;
|
|
29
|
-
/**
|
|
30
|
-
* Convert multiple RegexViolations to core Violations.
|
|
31
|
-
*/
|
|
32
|
-
export declare function toViolations(violations: RegexViolation[]): Violation[];
|
|
33
|
-
//# sourceMappingURL=RegexAdapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RegexAdapter.d.ts","sourceRoot":"","sources":["../../../src/main/config/RegexAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,cAAc,EACf,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CAiBvD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,EAAE,CAUhE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,cAAc,GAAG,SAAS,CAgBzD;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,GACnB,eAAe,CAMjB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,SAAS,EAAE,CAEtE"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IRuleDefinition } from "../interfaces/IRuleDefinition";
|
|
2
|
-
import { IRulesConfig } from "../interfaces/IRulesConfig";
|
|
3
|
-
type RuleConstructor = new () => IRuleDefinition;
|
|
4
|
-
interface RuleRegistryEntry {
|
|
5
|
-
ruleId: string;
|
|
6
|
-
ruleClass: RuleConstructor;
|
|
7
|
-
legacyName: string;
|
|
8
|
-
isBeta: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare class RuleRegistry {
|
|
11
|
-
private rules;
|
|
12
|
-
private legacyNameMap;
|
|
13
|
-
register(ruleId: string, ruleClass: RuleConstructor, legacyName: string, isBeta?: boolean): void;
|
|
14
|
-
get(idOrLegacyName: string): RuleRegistryEntry | undefined;
|
|
15
|
-
getAllRuleIds(includeBeta?: boolean): string[];
|
|
16
|
-
has(idOrLegacyName: string): boolean;
|
|
17
|
-
createInstance(idOrLegacyName: string): IRuleDefinition;
|
|
18
|
-
getRules(ruleConfig?: Map<string, unknown>, options?: IRulesConfig): IRuleDefinition[];
|
|
19
|
-
getRulesByNames(ruleNames?: string[], options?: IRulesConfig): IRuleDefinition[];
|
|
20
|
-
}
|
|
21
|
-
export declare const ruleRegistry: RuleRegistry;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=RuleRegistry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RuleRegistry.d.ts","sourceRoot":"","sources":["../../../src/main/config/RuleRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AA+B1D,KAAK,eAAe,GAAG,UAAU,eAAe,CAAC;AAEjD,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,eAAe,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,cAAM,YAAY;IAChB,OAAO,CAAC,KAAK,CAA6C;IAC1D,OAAO,CAAC,aAAa,CAAkC;IAEvD,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,OAAe,GACtB,IAAI;IAWP,GAAG,CAAC,cAAc,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAW1D,aAAa,CAAC,WAAW,GAAE,OAAe,GAAG,MAAM,EAAE;IAMrD,GAAG,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO;IAIpC,cAAc,CAAC,cAAc,EAAE,MAAM,GAAG,eAAe;IAQvD,QAAQ,CACN,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,CAAC,EAAE,YAAY,GACrB,eAAe,EAAE;IA4CpB,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,eAAe,EAAE;CAejF;AAkCD,eAAO,MAAM,YAAY,cAAW,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Icon configuration for flow variable types.
|
|
3
|
-
* Includes icons for variable subtypes and boolean states.
|
|
4
|
-
*/
|
|
5
|
-
export interface VariableIconConfig {
|
|
6
|
-
subtypes: {
|
|
7
|
-
[subtype: string]: string;
|
|
8
|
-
};
|
|
9
|
-
boolean: {
|
|
10
|
-
true: string;
|
|
11
|
-
false: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Default icons using emoji (recommended for modern environments)
|
|
16
|
-
*/
|
|
17
|
-
export declare const DEFAULT_VARIABLE_ICONS: VariableIconConfig;
|
|
18
|
-
/**
|
|
19
|
-
* ASCII fallback icons (for environments without emoji support)
|
|
20
|
-
*/
|
|
21
|
-
export declare const ASCII_VARIABLE_ICONS: VariableIconConfig;
|
|
22
|
-
/**
|
|
23
|
-
* Get default variable icon config
|
|
24
|
-
*/
|
|
25
|
-
export declare function getDefaultVariableIconConfig(): VariableIconConfig;
|
|
26
|
-
//# sourceMappingURL=VariableIcons.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VariableIcons.d.ts","sourceRoot":"","sources":["../../../src/main/config/VariableIcons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,kBAAkB;IAEjC,QAAQ,EAAE;QACR,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;KAC3B,CAAC;IAEF,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,kBAYpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,kBAYlC,CAAC;AAEF;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,kBAAkB,CAEjE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MetadataTypes.d.ts","sourceRoot":"","sources":["../../../src/main/enums/MetadataTypes.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd"}
|