@flow-scanner/lightning-flow-scanner-core 6.16.2 → 6.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +1 -0
- package/.husky/pre-push +1 -0
- package/.prettierignore +5 -0
- package/.swcrc +26 -0
- package/.turbo/turbo-build.log +17 -0
- package/.turbo/turbo-test.log +144 -0
- package/.turbo/turbo-vite$colon$dist.log +21 -0
- package/coverage/coverage-final.json +63 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +236 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/src/index.ts.html +238 -0
- package/coverage/lcov-report/src/main/adapters/RegexAdapter.ts.html +118 -0
- package/coverage/lcov-report/src/main/adapters/index.html +116 -0
- package/coverage/lcov-report/src/main/config/NodeIcons.ts.html +376 -0
- package/coverage/lcov-report/src/main/config/RuleRegistry.ts.html +646 -0
- package/coverage/lcov-report/src/main/config/VariableIcons.ts.html +253 -0
- package/coverage/lcov-report/src/main/config/index.html +146 -0
- package/coverage/lcov-report/src/main/enums/MetaType.ts.html +100 -0
- package/coverage/lcov-report/src/main/enums/MetadataType.ts.html +103 -0
- package/coverage/lcov-report/src/main/enums/MetadataTypes.ts.html +100 -0
- package/coverage/lcov-report/src/main/enums/index.html +116 -0
- package/coverage/lcov-report/src/main/interfaces/IRulesConfig.ts.html +133 -0
- package/coverage/lcov-report/src/main/interfaces/index.html +116 -0
- package/coverage/lcov-report/src/main/internals/index.html +116 -0
- package/coverage/lcov-report/src/main/internals/internals.ts.html +190 -0
- package/coverage/lcov-report/src/main/libs/BuildFlow.ts.html +127 -0
- package/coverage/lcov-report/src/main/libs/Compiler.ts.html +241 -0
- package/coverage/lcov-report/src/main/libs/ConvertFlowNodes.ts.html +97 -0
- package/coverage/lcov-report/src/main/libs/DynamicRule.ts.html +118 -0
- package/coverage/lcov-report/src/main/libs/ExportDetails.ts.html +256 -0
- package/coverage/lcov-report/src/main/libs/ExportDiagram.ts.html +331 -0
- package/coverage/lcov-report/src/main/libs/ExportSarif.ts.html +358 -0
- package/coverage/lcov-report/src/main/libs/FixFlows.ts.html +265 -0
- package/coverage/lcov-report/src/main/libs/GenerateMarkdown.ts.html +331 -0
- package/coverage/lcov-report/src/main/libs/GetRuleDefinitions.ts.html +274 -0
- package/coverage/lcov-report/src/main/libs/ParseFlows.ts.html +184 -0
- package/coverage/lcov-report/src/main/libs/RuleDocumentation.ts.html +190 -0
- package/coverage/lcov-report/src/main/libs/ScanFlows.ts.html +508 -0
- package/coverage/lcov-report/src/main/libs/exportAsDetails.ts.html +160 -0
- package/coverage/lcov-report/src/main/libs/exportAsSarif.ts.html +346 -0
- package/coverage/lcov-report/src/main/libs/index.html +251 -0
- package/coverage/lcov-report/src/main/models/FlatViolation.ts.html +106 -0
- package/coverage/lcov-report/src/main/models/Flow.ts.html +1057 -0
- package/coverage/lcov-report/src/main/models/FlowAttribute.ts.html +115 -0
- package/coverage/lcov-report/src/main/models/FlowElement.ts.html +133 -0
- package/coverage/lcov-report/src/main/models/FlowElementConnector.ts.html +169 -0
- package/coverage/lcov-report/src/main/models/FlowGraph.ts.html +1672 -0
- package/coverage/lcov-report/src/main/models/FlowMetadata.ts.html +106 -0
- package/coverage/lcov-report/src/main/models/FlowNode.ts.html +1252 -0
- package/coverage/lcov-report/src/main/models/FlowResource.ts.html +106 -0
- package/coverage/lcov-report/src/main/models/FlowType.ts.html +244 -0
- package/coverage/lcov-report/src/main/models/FlowVariable.ts.html +553 -0
- package/coverage/lcov-report/src/main/models/LoopRuleCommon.ts.html +235 -0
- package/coverage/lcov-report/src/main/models/ParsedFlow.ts.html +121 -0
- package/coverage/lcov-report/src/main/models/RuleCommon.ts.html +442 -0
- package/coverage/lcov-report/src/main/models/RuleResult.ts.html +172 -0
- package/coverage/lcov-report/src/main/models/ScanResult.ts.html +121 -0
- package/coverage/lcov-report/src/main/models/Violation.ts.html +316 -0
- package/coverage/lcov-report/src/main/models/index.html +341 -0
- package/coverage/lcov-report/src/main/rules/APIVersion.ts.html +361 -0
- package/coverage/lcov-report/src/main/rules/ActionCallsInLoop.ts.html +157 -0
- package/coverage/lcov-report/src/main/rules/AutoLayout.ts.html +220 -0
- package/coverage/lcov-report/src/main/rules/CopyAPIName.ts.html +175 -0
- package/coverage/lcov-report/src/main/rules/CyclomaticComplexity.ts.html +292 -0
- package/coverage/lcov-report/src/main/rules/DMLStatementInLoop.ts.html +163 -0
- package/coverage/lcov-report/src/main/rules/DuplicateDMLOperation.ts.html +334 -0
- package/coverage/lcov-report/src/main/rules/FlowDescription.ts.html +184 -0
- package/coverage/lcov-report/src/main/rules/FlowName.ts.html +229 -0
- package/coverage/lcov-report/src/main/rules/GetRecordAllFields.ts.html +280 -0
- package/coverage/lcov-report/src/main/rules/HardcodedId.ts.html +238 -0
- package/coverage/lcov-report/src/main/rules/HardcodedSecret.ts.html +238 -0
- package/coverage/lcov-report/src/main/rules/HardcodedUrl.ts.html +247 -0
- package/coverage/lcov-report/src/main/rules/InactiveFlow.ts.html +184 -0
- package/coverage/lcov-report/src/main/rules/MissingFaultPath.ts.html +397 -0
- package/coverage/lcov-report/src/main/rules/MissingFilterRecordTrigger.ts.html +229 -0
- package/coverage/lcov-report/src/main/rules/MissingMetadataDescription.ts.html +211 -0
- package/coverage/lcov-report/src/main/rules/MissingNullHandler.ts.html +460 -0
- package/coverage/lcov-report/src/main/rules/MissingRecordTriggerFilter.ts.html +235 -0
- package/coverage/lcov-report/src/main/rules/ProcessBuilder.ts.html +190 -0
- package/coverage/lcov-report/src/main/rules/RecordIdAsString.ts.html +274 -0
- package/coverage/lcov-report/src/main/rules/RecursiveAfterUpdate.ts.html +364 -0
- package/coverage/lcov-report/src/main/rules/SOQLQueryInLoop.ts.html +160 -0
- package/coverage/lcov-report/src/main/rules/SameRecordFieldUpdates.ts.html +283 -0
- package/coverage/lcov-report/src/main/rules/TransformInsteadOfLoop.ts.html +250 -0
- package/coverage/lcov-report/src/main/rules/TriggerOrder.ts.html +238 -0
- package/coverage/lcov-report/src/main/rules/UnconnectedElement.ts.html +178 -0
- package/coverage/lcov-report/src/main/rules/UnsafeRunningContext.ts.html +226 -0
- package/coverage/lcov-report/src/main/rules/UnusedVariable.ts.html +283 -0
- package/coverage/lcov-report/src/main/rules/index.html +521 -0
- package/coverage/lcov-report/src/main/store/DefaultRuleStore.ts.html +265 -0
- package/coverage/lcov-report/src/main/store/RuleRegistry.ts.html +118 -0
- package/coverage/lcov-report/src/main/store/index.html +116 -0
- package/coverage/lcov.info +6261 -0
- package/eslint.config.mjs +36 -0
- package/jest.config.cjs +32 -0
- package/jest.env-setup.js +101 -0
- package/lint-staged.config.mjs +8 -0
- package/out/main/config/RegexAdapter.d.ts +32 -0
- package/out/main/config/RegexAdapter.js +86 -0
- package/{main → out/main}/config/RuleRegistry.js +2 -0
- package/out/main/rules/FlowName.d.ts +15 -0
- package/{main → out/main}/rules/FlowName.js +24 -11
- package/out/main/rules/HardcodedId.d.ts +13 -0
- package/{main → out/main}/rules/HardcodedId.js +23 -4
- package/out/main/rules/HardcodedSecret.d.ts +13 -0
- package/out/main/rules/HardcodedSecret.js +101 -0
- package/{main → out/main}/rules/HardcodedUrl.d.ts +6 -0
- package/{main → out/main}/rules/HardcodedUrl.js +23 -5
- package/package.json +58 -8
- package/prettier.config.mjs +5 -0
- package/src/index.ts +52 -0
- package/src/main/config/NodeIcons.ts +98 -0
- package/src/main/config/RegexAdapter.ts +98 -0
- package/src/main/config/RuleRegistry.ts +188 -0
- package/src/main/config/VariableIcons.ts +57 -0
- package/src/main/enums/MetadataTypes.ts +6 -0
- package/src/main/interfaces/IExceptions.ts +6 -0
- package/src/main/interfaces/IRuleConfig.ts +6 -0
- package/src/main/interfaces/IRuleDefinition.ts +15 -0
- package/src/main/interfaces/IRuleOptions.ts +5 -0
- package/src/main/interfaces/IRulesConfig.ts +17 -0
- package/src/main/internals/internals.ts +35 -0
- package/src/main/libs/BuildFlow.ts +14 -0
- package/src/main/libs/Compiler.ts +53 -0
- package/src/main/libs/ExportDetails.ts +58 -0
- package/src/main/libs/ExportDiagram.ts +83 -0
- package/src/main/libs/ExportSarif.ts +92 -0
- package/src/main/libs/FixFlows.ts +61 -0
- package/src/main/libs/GetRuleDefinitions.ts +64 -0
- package/src/main/libs/ParseFlows.ts +34 -0
- package/src/main/libs/RuleDocumentation.ts +35 -0
- package/src/main/libs/ScanFlows.ts +142 -0
- package/src/main/models/FlatViolation.ts +16 -0
- package/src/main/models/Flow.ts +325 -0
- package/src/main/models/FlowAttribute.ts +11 -0
- package/src/main/models/FlowElement.ts +16 -0
- package/src/main/models/FlowElementConnector.ts +28 -0
- package/src/main/models/FlowGraph.ts +530 -0
- package/src/main/models/FlowMetadata.ts +8 -0
- package/src/main/models/FlowNode.ts +390 -0
- package/src/main/models/FlowResource.ts +8 -0
- package/src/main/models/FlowType.ts +53 -0
- package/src/main/models/FlowVariable.ts +157 -0
- package/src/main/models/LoopRuleCommon.ts +51 -0
- package/src/main/models/ParsedFlow.ts +13 -0
- package/src/main/models/RuleCommon.ts +120 -0
- package/src/main/models/RuleInfo.ts +54 -0
- package/src/main/models/RuleResult.ts +29 -0
- package/src/main/models/ScanResult.ts +12 -0
- package/src/main/models/Violation.ts +78 -0
- package/src/main/rules/APIVersion.ts +93 -0
- package/src/main/rules/ActionCallsInLoop.ts +25 -0
- package/src/main/rules/AutoLayout.ts +46 -0
- package/src/main/rules/CopyAPIName.ts +31 -0
- package/src/main/rules/CyclomaticComplexity.ts +70 -0
- package/src/main/rules/DMLStatementInLoop.ts +26 -0
- package/src/main/rules/DuplicateDMLOperation.ts +83 -0
- package/src/main/rules/FlowDescription.ts +34 -0
- package/src/main/rules/FlowName.ts +49 -0
- package/src/main/rules/GetRecordAllFields.ts +65 -0
- package/src/main/rules/HardcodedId.ts +51 -0
- package/src/main/rules/HardcodedSecret.ts +51 -0
- package/src/main/rules/HardcodedUrl.ts +54 -0
- package/src/main/rules/InactiveFlow.ts +33 -0
- package/src/main/rules/MissingFaultPath.ts +105 -0
- package/src/main/rules/MissingMetadataDescription.ts +42 -0
- package/src/main/rules/MissingNullHandler.ts +126 -0
- package/src/main/rules/MissingRecordTriggerFilter.ts +51 -0
- package/src/main/rules/ProcessBuilder.ts +35 -0
- package/src/main/rules/RecordIdAsString.ts +64 -0
- package/src/main/rules/RecursiveAfterUpdate.ts +94 -0
- package/src/main/rules/SOQLQueryInLoop.ts +26 -0
- package/src/main/rules/SameRecordFieldUpdates.ts +66 -0
- package/src/main/rules/TransformInsteadOfLoop.ts +56 -0
- package/src/main/rules/TriggerOrder.ts +51 -0
- package/src/main/rules/UnconnectedElement.ts +32 -0
- package/src/main/rules/UnsafeRunningContext.ts +47 -0
- package/src/main/rules/UnusedVariable.ts +66 -0
- package/stryker.config.mjs +23 -0
- package/tests/APIVersion.test.ts +87 -0
- package/tests/AutoLayout.test.ts +41 -0
- package/tests/Config.test.ts +122 -0
- package/tests/ConfigBetaMode.test.ts +26 -0
- package/tests/CopyAPIName.test.ts +45 -0
- package/tests/CyclomaticComplexity.test.ts +125 -0
- package/tests/DMLStatementInLoop.test.ts +32 -0
- package/tests/DuplicateDMLOperation.test.ts +43 -0
- package/tests/EnabledFalse.test.ts +63 -0
- package/tests/Exceptions.test.ts +815 -0
- package/tests/ExportSarif.test.ts +62 -0
- package/tests/FlowDescription.test.ts +44 -0
- package/tests/FlowDocumentation.test.ts +74 -0
- package/tests/FlowName.test.ts +61 -0
- package/tests/GetRecordElementAllFields.test.ts +182 -0
- package/tests/HardcodedId.test.ts +16 -0
- package/tests/HardcodedSecret.test.ts +32 -0
- package/tests/HardcodedUrl.test.ts +253 -0
- package/tests/InactiveFlow.test.ts +103 -0
- package/tests/MissingFaultPath.test.ts +52 -0
- package/tests/MissingMetadataDescription.test.ts +25 -0
- package/tests/MissingNullHandler.test.ts +45 -0
- package/tests/MissingRecordTriggerFilter.test.ts +54 -0
- package/tests/RecordIdAsString.test.ts +60 -0
- package/tests/RecursiveAfterUpdate.test.ts +183 -0
- package/tests/SOQLQueryInLoop.test.ts +33 -0
- package/tests/SameRecordFieldUpdates.test.ts +205 -0
- package/tests/SanityTest.test.ts +15 -0
- package/tests/TransformInsteadOfLoop.test.ts +33 -0
- package/tests/TriggerOrder.test.ts +112 -0
- package/tests/UnconnectedElement.test.ts +76 -0
- package/tests/UnsafeRunningContext.test.ts +46 -0
- package/tests/UnusedVariable.test.ts +59 -0
- package/tests/UnusedVariableExceptions.test.ts +87 -0
- package/tests/jsonfiles/MissingFaultPath_BeforeSave_Bypass.json +128 -0
- package/tests/jsonfiles/MissingFaultPath_WaitConditions.json +102 -0
- package/tests/jsonfiles/MissingFaultPath_WaitDate.json +88 -0
- package/tests/jsonfiles/MissingFaultPath_WaitDuration.json +90 -0
- package/tests/models/Flow.test.ts +107 -0
- package/tests/models/LoopRuleCommon.test.ts +246 -0
- package/tests/models/RuleCommon.test.ts +41 -0
- package/tsconfig.json +28 -0
- package/tsconfig.types.json +26 -0
- package/types/index.d.ts +27 -0
- package/types/index.d.ts.map +1 -0
- package/types/main/adapters/RegexAdapter.d.ts +33 -0
- package/types/main/adapters/RegexAdapter.d.ts.map +1 -0
- package/types/main/config/NodeIcons.d.ts +25 -0
- package/types/main/config/NodeIcons.d.ts.map +1 -0
- package/types/main/config/RegexAdapter.d.ts +33 -0
- package/types/main/config/RegexAdapter.d.ts.map +1 -0
- package/types/main/config/RuleRegistry.d.ts +23 -0
- package/types/main/config/RuleRegistry.d.ts.map +1 -0
- package/types/main/config/VariableIcons.d.ts +26 -0
- package/types/main/config/VariableIcons.d.ts.map +1 -0
- package/types/main/enums/MetadataTypes.d.ts +7 -0
- package/types/main/enums/MetadataTypes.d.ts.map +1 -0
- package/types/main/interfaces/IExceptions.d.ts +6 -0
- package/types/main/interfaces/IExceptions.d.ts.map +1 -0
- package/types/main/interfaces/IRuleConfig.d.ts +7 -0
- package/types/main/interfaces/IRuleConfig.d.ts.map +1 -0
- package/types/main/interfaces/IRuleDefinition.d.ts +18 -0
- package/types/main/interfaces/IRuleDefinition.d.ts.map +1 -0
- package/types/main/interfaces/IRuleOptions.d.ts +5 -0
- package/types/main/interfaces/IRuleOptions.d.ts.map +1 -0
- package/types/main/interfaces/IRulesConfig.d.ts +16 -0
- package/types/main/interfaces/IRulesConfig.d.ts.map +1 -0
- package/types/main/internals/internals.d.ts +19 -0
- package/types/main/internals/internals.d.ts.map +1 -0
- package/types/main/libs/BuildFlow.d.ts +2 -0
- package/types/main/libs/BuildFlow.d.ts.map +1 -0
- package/types/main/libs/Compiler.d.ts +8 -0
- package/types/main/libs/Compiler.d.ts.map +1 -0
- package/types/main/libs/ConvertFlowNodes.d.ts +2 -0
- package/types/main/libs/ConvertFlowNodes.d.ts.map +1 -0
- package/types/main/libs/DynamicRule.d.ts +5 -0
- package/types/main/libs/DynamicRule.d.ts.map +1 -0
- package/types/main/libs/ExportDetails.d.ts +4 -0
- package/types/main/libs/ExportDetails.d.ts.map +1 -0
- package/types/main/libs/ExportDiagram.d.ts +42 -0
- package/types/main/libs/ExportDiagram.d.ts.map +1 -0
- package/types/main/libs/ExportSarif.d.ts +3 -0
- package/types/main/libs/ExportSarif.d.ts.map +1 -0
- package/types/main/libs/FixFlows.d.ts +4 -0
- package/types/main/libs/FixFlows.d.ts.map +1 -0
- package/types/main/libs/GetRuleDefinitions.d.ts +5 -0
- package/types/main/libs/GetRuleDefinitions.d.ts.map +1 -0
- package/types/main/libs/ParseFlows.d.ts +3 -0
- package/types/main/libs/ParseFlows.d.ts.map +1 -0
- package/types/main/libs/RuleDocumentation.d.ts +21 -0
- package/types/main/libs/RuleDocumentation.d.ts.map +1 -0
- package/types/main/libs/ScanFlows.d.ts +5 -0
- package/types/main/libs/ScanFlows.d.ts.map +1 -0
- package/types/main/libs/exportAsDetails.d.ts +4 -0
- package/types/main/libs/exportAsDetails.d.ts.map +1 -0
- package/types/main/libs/exportAsSarif.d.ts +3 -0
- package/types/main/libs/exportAsSarif.d.ts.map +1 -0
- package/types/main/models/FlatViolation.d.ts +16 -0
- package/types/main/models/FlatViolation.d.ts.map +1 -0
- package/types/main/models/Flow.d.ts +70 -0
- package/types/main/models/Flow.d.ts.map +1 -0
- package/types/main/models/FlowAttribute.d.ts +6 -0
- package/types/main/models/FlowAttribute.d.ts.map +1 -0
- package/types/main/models/FlowElement.d.ts +11 -0
- package/types/main/models/FlowElement.d.ts.map +1 -0
- package/types/main/models/FlowElementConnector.d.ts +16 -0
- package/types/main/models/FlowElementConnector.d.ts.map +1 -0
- package/types/main/models/FlowGraph.d.ts +86 -0
- package/types/main/models/FlowGraph.d.ts.map +1 -0
- package/types/main/models/FlowMetadata.d.ts +5 -0
- package/types/main/models/FlowMetadata.d.ts.map +1 -0
- package/types/main/models/FlowNode.d.ts +66 -0
- package/types/main/models/FlowNode.d.ts.map +1 -0
- package/types/main/models/FlowResource.d.ts +5 -0
- package/types/main/models/FlowResource.d.ts.map +1 -0
- package/types/main/models/FlowType.d.ts +24 -0
- package/types/main/models/FlowType.d.ts.map +1 -0
- package/types/main/models/FlowVariable.d.ts +64 -0
- package/types/main/models/FlowVariable.d.ts.map +1 -0
- package/types/main/models/LoopRuleCommon.d.ts +15 -0
- package/types/main/models/LoopRuleCommon.d.ts.map +1 -0
- package/types/main/models/ParsedFlow.d.ts +8 -0
- package/types/main/models/ParsedFlow.d.ts.map +1 -0
- package/types/main/models/RuleCommon.d.ts +58 -0
- package/types/main/models/RuleCommon.d.ts.map +1 -0
- package/types/main/models/RuleInfo.d.ts +50 -0
- package/types/main/models/RuleInfo.d.ts.map +1 -0
- package/types/main/models/RuleResult.d.ts +15 -0
- package/types/main/models/RuleResult.d.ts.map +1 -0
- package/types/main/models/ScanResult.d.ts +8 -0
- package/types/main/models/ScanResult.d.ts.map +1 -0
- package/types/main/models/Violation.d.ts +12 -0
- package/types/main/models/Violation.d.ts.map +1 -0
- package/{main/rules/FlowName.d.ts → types/main/rules/APIVersion.d.ts} +2 -1
- package/types/main/rules/APIVersion.d.ts.map +1 -0
- package/types/main/rules/ActionCallsInLoop.d.ts +7 -0
- package/types/main/rules/ActionCallsInLoop.d.ts.map +1 -0
- package/types/main/rules/AutoLayout.d.ts +8 -0
- package/types/main/rules/AutoLayout.d.ts.map +1 -0
- package/types/main/rules/CopyAPIName.d.ts +8 -0
- package/types/main/rules/CopyAPIName.d.ts.map +1 -0
- package/types/main/rules/CyclomaticComplexity.d.ts +12 -0
- package/types/main/rules/CyclomaticComplexity.d.ts.map +1 -0
- package/types/main/rules/DMLStatementInLoop.d.ts +7 -0
- package/types/main/rules/DMLStatementInLoop.d.ts.map +1 -0
- package/types/main/rules/DuplicateDMLOperation.d.ts +9 -0
- package/types/main/rules/DuplicateDMLOperation.d.ts.map +1 -0
- package/{main/rules/HardcodedId.d.ts → types/main/rules/FlowDescription.d.ts} +2 -1
- package/types/main/rules/FlowDescription.d.ts.map +1 -0
- package/types/main/rules/FlowName.d.ts +16 -0
- package/types/main/rules/FlowName.d.ts.map +1 -0
- package/types/main/rules/GetRecordAllFields.d.ts +8 -0
- package/types/main/rules/GetRecordAllFields.d.ts.map +1 -0
- package/types/main/rules/HardcodedId.d.ts +14 -0
- package/types/main/rules/HardcodedId.d.ts.map +1 -0
- package/types/main/rules/HardcodedSecret.d.ts +14 -0
- package/types/main/rules/HardcodedSecret.d.ts.map +1 -0
- package/types/main/rules/HardcodedUrl.d.ts +14 -0
- package/types/main/rules/HardcodedUrl.d.ts.map +1 -0
- package/types/main/rules/InactiveFlow.d.ts +8 -0
- package/types/main/rules/InactiveFlow.d.ts.map +1 -0
- package/types/main/rules/MissingFaultPath.d.ts +15 -0
- package/types/main/rules/MissingFaultPath.d.ts.map +1 -0
- package/types/main/rules/MissingFilterRecordTrigger.d.ts +8 -0
- package/types/main/rules/MissingFilterRecordTrigger.d.ts.map +1 -0
- package/types/main/rules/MissingMetadataDescription.d.ts +8 -0
- package/types/main/rules/MissingMetadataDescription.d.ts.map +1 -0
- package/types/main/rules/MissingNullHandler.d.ts +8 -0
- package/types/main/rules/MissingNullHandler.d.ts.map +1 -0
- package/types/main/rules/MissingRecordTriggerFilter.d.ts +8 -0
- package/types/main/rules/MissingRecordTriggerFilter.d.ts.map +1 -0
- package/types/main/rules/ProcessBuilder.d.ts +8 -0
- package/types/main/rules/ProcessBuilder.d.ts.map +1 -0
- package/types/main/rules/RecordIdAsString.d.ts +8 -0
- package/types/main/rules/RecordIdAsString.d.ts.map +1 -0
- package/types/main/rules/RecursiveAfterUpdate.d.ts +9 -0
- package/types/main/rules/RecursiveAfterUpdate.d.ts.map +1 -0
- package/types/main/rules/SOQLQueryInLoop.d.ts +7 -0
- package/types/main/rules/SOQLQueryInLoop.d.ts.map +1 -0
- package/types/main/rules/SameRecordFieldUpdates.d.ts +9 -0
- package/types/main/rules/SameRecordFieldUpdates.d.ts.map +1 -0
- package/types/main/rules/TransformInsteadOfLoop.d.ts +8 -0
- package/types/main/rules/TransformInsteadOfLoop.d.ts.map +1 -0
- package/types/main/rules/TriggerOrder.d.ts +8 -0
- package/types/main/rules/TriggerOrder.d.ts.map +1 -0
- package/types/main/rules/UnconnectedElement.d.ts +8 -0
- package/types/main/rules/UnconnectedElement.d.ts.map +1 -0
- package/types/main/rules/UnsafeRunningContext.d.ts +8 -0
- package/types/main/rules/UnsafeRunningContext.d.ts.map +1 -0
- package/types/main/rules/UnusedVariable.d.ts +8 -0
- package/types/main/rules/UnusedVariable.d.ts.map +1 -0
- package/types/main/store/DefaultRuleStore.d.ts +3 -0
- package/types/main/store/DefaultRuleStore.d.ts.map +1 -0
- package/types/main/store/RuleRegistry.d.ts +23 -0
- package/types/main/store/RuleRegistry.d.ts.map +1 -0
- package/vite.config.ts +33 -0
- package/README.md +0 -635
- /package/{index.d.ts → out/index.d.ts} +0 -0
- /package/{index.js → out/index.js} +0 -0
- /package/{main → out/main}/config/NodeIcons.d.ts +0 -0
- /package/{main → out/main}/config/NodeIcons.js +0 -0
- /package/{main → out/main}/config/RuleRegistry.d.ts +0 -0
- /package/{main → out/main}/config/VariableIcons.d.ts +0 -0
- /package/{main → out/main}/config/VariableIcons.js +0 -0
- /package/{main → out/main}/enums/MetadataTypes.d.ts +0 -0
- /package/{main → out/main}/enums/MetadataTypes.js +0 -0
- /package/{main → out/main}/interfaces/IExceptions.d.ts +0 -0
- /package/{main → out/main}/interfaces/IExceptions.js +0 -0
- /package/{main → out/main}/interfaces/IRuleConfig.d.ts +0 -0
- /package/{main → out/main}/interfaces/IRuleConfig.js +0 -0
- /package/{main → out/main}/interfaces/IRuleDefinition.d.ts +0 -0
- /package/{main → out/main}/interfaces/IRuleDefinition.js +0 -0
- /package/{main → out/main}/interfaces/IRuleOptions.d.ts +0 -0
- /package/{main → out/main}/interfaces/IRuleOptions.js +0 -0
- /package/{main → out/main}/interfaces/IRulesConfig.d.ts +0 -0
- /package/{main → out/main}/interfaces/IRulesConfig.js +0 -0
- /package/{main → out/main}/internals/internals.d.ts +0 -0
- /package/{main → out/main}/internals/internals.js +0 -0
- /package/{main → out/main}/libs/BuildFlow.d.ts +0 -0
- /package/{main → out/main}/libs/BuildFlow.js +0 -0
- /package/{main → out/main}/libs/Compiler.d.ts +0 -0
- /package/{main → out/main}/libs/Compiler.js +0 -0
- /package/{main → out/main}/libs/ExportDetails.d.ts +0 -0
- /package/{main → out/main}/libs/ExportDetails.js +0 -0
- /package/{main → out/main}/libs/ExportDiagram.d.ts +0 -0
- /package/{main → out/main}/libs/ExportDiagram.js +0 -0
- /package/{main → out/main}/libs/ExportSarif.d.ts +0 -0
- /package/{main → out/main}/libs/ExportSarif.js +0 -0
- /package/{main → out/main}/libs/FixFlows.d.ts +0 -0
- /package/{main → out/main}/libs/FixFlows.js +0 -0
- /package/{main → out/main}/libs/GetRuleDefinitions.d.ts +0 -0
- /package/{main → out/main}/libs/GetRuleDefinitions.js +0 -0
- /package/{main → out/main}/libs/ParseFlows.d.ts +0 -0
- /package/{main → out/main}/libs/ParseFlows.js +0 -0
- /package/{main → out/main}/libs/RuleDocumentation.d.ts +0 -0
- /package/{main → out/main}/libs/RuleDocumentation.js +0 -0
- /package/{main → out/main}/libs/ScanFlows.d.ts +0 -0
- /package/{main → out/main}/libs/ScanFlows.js +0 -0
- /package/{main → out/main}/models/FlatViolation.d.ts +0 -0
- /package/{main → out/main}/models/FlatViolation.js +0 -0
- /package/{main → out/main}/models/Flow.d.ts +0 -0
- /package/{main → out/main}/models/Flow.js +0 -0
- /package/{main → out/main}/models/FlowAttribute.d.ts +0 -0
- /package/{main → out/main}/models/FlowAttribute.js +0 -0
- /package/{main → out/main}/models/FlowElement.d.ts +0 -0
- /package/{main → out/main}/models/FlowElement.js +0 -0
- /package/{main → out/main}/models/FlowElementConnector.d.ts +0 -0
- /package/{main → out/main}/models/FlowElementConnector.js +0 -0
- /package/{main → out/main}/models/FlowGraph.d.ts +0 -0
- /package/{main → out/main}/models/FlowGraph.js +0 -0
- /package/{main → out/main}/models/FlowMetadata.d.ts +0 -0
- /package/{main → out/main}/models/FlowMetadata.js +0 -0
- /package/{main → out/main}/models/FlowNode.d.ts +0 -0
- /package/{main → out/main}/models/FlowNode.js +0 -0
- /package/{main → out/main}/models/FlowResource.d.ts +0 -0
- /package/{main → out/main}/models/FlowResource.js +0 -0
- /package/{main → out/main}/models/FlowType.d.ts +0 -0
- /package/{main → out/main}/models/FlowType.js +0 -0
- /package/{main → out/main}/models/FlowVariable.d.ts +0 -0
- /package/{main → out/main}/models/FlowVariable.js +0 -0
- /package/{main → out/main}/models/LoopRuleCommon.d.ts +0 -0
- /package/{main → out/main}/models/LoopRuleCommon.js +0 -0
- /package/{main → out/main}/models/ParsedFlow.d.ts +0 -0
- /package/{main → out/main}/models/ParsedFlow.js +0 -0
- /package/{main → out/main}/models/RuleCommon.d.ts +0 -0
- /package/{main → out/main}/models/RuleCommon.js +0 -0
- /package/{main → out/main}/models/RuleInfo.d.ts +0 -0
- /package/{main → out/main}/models/RuleInfo.js +0 -0
- /package/{main → out/main}/models/RuleResult.d.ts +0 -0
- /package/{main → out/main}/models/RuleResult.js +0 -0
- /package/{main → out/main}/models/ScanResult.d.ts +0 -0
- /package/{main → out/main}/models/ScanResult.js +0 -0
- /package/{main → out/main}/models/Violation.d.ts +0 -0
- /package/{main → out/main}/models/Violation.js +0 -0
- /package/{main → out/main}/rules/APIVersion.d.ts +0 -0
- /package/{main → out/main}/rules/APIVersion.js +0 -0
- /package/{main → out/main}/rules/ActionCallsInLoop.d.ts +0 -0
- /package/{main → out/main}/rules/ActionCallsInLoop.js +0 -0
- /package/{main → out/main}/rules/AutoLayout.d.ts +0 -0
- /package/{main → out/main}/rules/AutoLayout.js +0 -0
- /package/{main → out/main}/rules/CopyAPIName.d.ts +0 -0
- /package/{main → out/main}/rules/CopyAPIName.js +0 -0
- /package/{main → out/main}/rules/CyclomaticComplexity.d.ts +0 -0
- /package/{main → out/main}/rules/CyclomaticComplexity.js +0 -0
- /package/{main → out/main}/rules/DMLStatementInLoop.d.ts +0 -0
- /package/{main → out/main}/rules/DMLStatementInLoop.js +0 -0
- /package/{main → out/main}/rules/DuplicateDMLOperation.d.ts +0 -0
- /package/{main → out/main}/rules/DuplicateDMLOperation.js +0 -0
- /package/{main → out/main}/rules/FlowDescription.d.ts +0 -0
- /package/{main → out/main}/rules/FlowDescription.js +0 -0
- /package/{main → out/main}/rules/GetRecordAllFields.d.ts +0 -0
- /package/{main → out/main}/rules/GetRecordAllFields.js +0 -0
- /package/{main → out/main}/rules/InactiveFlow.d.ts +0 -0
- /package/{main → out/main}/rules/InactiveFlow.js +0 -0
- /package/{main → out/main}/rules/MissingFaultPath.d.ts +0 -0
- /package/{main → out/main}/rules/MissingFaultPath.js +0 -0
- /package/{main → out/main}/rules/MissingMetadataDescription.d.ts +0 -0
- /package/{main → out/main}/rules/MissingMetadataDescription.js +0 -0
- /package/{main → out/main}/rules/MissingNullHandler.d.ts +0 -0
- /package/{main → out/main}/rules/MissingNullHandler.js +0 -0
- /package/{main → out/main}/rules/MissingRecordTriggerFilter.d.ts +0 -0
- /package/{main → out/main}/rules/MissingRecordTriggerFilter.js +0 -0
- /package/{main → out/main}/rules/ProcessBuilder.d.ts +0 -0
- /package/{main → out/main}/rules/ProcessBuilder.js +0 -0
- /package/{main → out/main}/rules/RecordIdAsString.d.ts +0 -0
- /package/{main → out/main}/rules/RecordIdAsString.js +0 -0
- /package/{main → out/main}/rules/RecursiveAfterUpdate.d.ts +0 -0
- /package/{main → out/main}/rules/RecursiveAfterUpdate.js +0 -0
- /package/{main → out/main}/rules/SOQLQueryInLoop.d.ts +0 -0
- /package/{main → out/main}/rules/SOQLQueryInLoop.js +0 -0
- /package/{main → out/main}/rules/SameRecordFieldUpdates.d.ts +0 -0
- /package/{main → out/main}/rules/SameRecordFieldUpdates.js +0 -0
- /package/{main → out/main}/rules/TransformInsteadOfLoop.d.ts +0 -0
- /package/{main → out/main}/rules/TransformInsteadOfLoop.js +0 -0
- /package/{main → out/main}/rules/TriggerOrder.d.ts +0 -0
- /package/{main → out/main}/rules/TriggerOrder.js +0 -0
- /package/{main → out/main}/rules/UnconnectedElement.d.ts +0 -0
- /package/{main → out/main}/rules/UnconnectedElement.js +0 -0
- /package/{main → out/main}/rules/UnsafeRunningContext.d.ts +0 -0
- /package/{main → out/main}/rules/UnsafeRunningContext.js +0 -0
- /package/{main → out/main}/rules/UnusedVariable.d.ts +0 -0
- /package/{main → out/main}/rules/UnusedVariable.js +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as core from "../src";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
|
|
4
|
+
import { parse } from "../src/main/libs/ParseFlows";
|
|
5
|
+
import { ParsedFlow } from "../src/main/models/ParsedFlow";
|
|
6
|
+
|
|
7
|
+
import { describe, it, expect } from "@jest/globals";
|
|
8
|
+
import { UnsafeRunningContext } from "../src/main/rules/UnsafeRunningContext";
|
|
9
|
+
|
|
10
|
+
describe("UnsafeRunningContext", () => {
|
|
11
|
+
const unsafeRunningContext: UnsafeRunningContext = new UnsafeRunningContext();
|
|
12
|
+
|
|
13
|
+
it("should have a scan result for without sharing system mode", async () => {
|
|
14
|
+
const unsafeContextTestFile = path.join(
|
|
15
|
+
__dirname,
|
|
16
|
+
"../../../example-flows/force-app/demo/Unsafe_Running_Context.flow-meta.xml"
|
|
17
|
+
);
|
|
18
|
+
const parsed: ParsedFlow = (await parse([unsafeContextTestFile])).pop() as ParsedFlow;
|
|
19
|
+
const ruleResult: core.RuleResult = unsafeRunningContext.execute(parsed.flow as core.Flow);
|
|
20
|
+
expect(ruleResult.occurs).toBe(true);
|
|
21
|
+
expect(ruleResult.details).not.toHaveLength(0);
|
|
22
|
+
expect(ruleResult.ruleDefinition.severity).toBe("error");
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it("should not have a scan result for with sharing system mode", async () => {
|
|
26
|
+
const unsafeContextTestFile = path.join(
|
|
27
|
+
__dirname,
|
|
28
|
+
"../../../example-flows/force-app/testing/Unsafe_Running_Context_WithSharing.flow-meta.xml"
|
|
29
|
+
);
|
|
30
|
+
const parsed: ParsedFlow = (await parse([unsafeContextTestFile])).pop() as ParsedFlow;
|
|
31
|
+
const ruleResult: core.RuleResult = unsafeRunningContext.execute(parsed.flow as core.Flow);
|
|
32
|
+
expect(ruleResult.occurs).toBe(false);
|
|
33
|
+
expect(ruleResult.details).toHaveLength(0);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("should not have a scan result for default mode", async () => {
|
|
37
|
+
const unsafeContextTestFile = path.join(
|
|
38
|
+
__dirname,
|
|
39
|
+
"../../../example-flows/force-app/testing/Unsafe_Running_Context_Default.flow-meta.xml"
|
|
40
|
+
);
|
|
41
|
+
const parsed: ParsedFlow = (await parse([unsafeContextTestFile])).pop() as ParsedFlow;
|
|
42
|
+
const ruleResult: core.RuleResult = unsafeRunningContext.execute(parsed.flow as core.Flow);
|
|
43
|
+
expect(ruleResult.occurs).toBe(false);
|
|
44
|
+
expect(ruleResult.details).toHaveLength(0);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as core from "../src";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { ParsedFlow } from "../src/main/models/ParsedFlow";
|
|
4
|
+
|
|
5
|
+
import { describe, it, expect } from "@jest/globals";
|
|
6
|
+
|
|
7
|
+
describe("UnusedVariable Rule", () => {
|
|
8
|
+
const example_uri = path.join(__dirname, "../../../example-flows/force-app/demo/Unused_Variable.flow-meta.xml");
|
|
9
|
+
const fixed_uri = path.join(__dirname, "../../../example-flows/force-app/testing/Unused_Variable_Fixed.flow-meta.xml");
|
|
10
|
+
|
|
11
|
+
it("there should be a result for unused variables", async () => {
|
|
12
|
+
const flows = await core.parse([example_uri]);
|
|
13
|
+
const ruleConfig = {
|
|
14
|
+
ruleMode: "isolated",
|
|
15
|
+
rules: {
|
|
16
|
+
UnusedVariable: {
|
|
17
|
+
severity: "error",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const results: core.ScanResult[] = core.scan(flows, ruleConfig);
|
|
22
|
+
const occurringResults = results[0].ruleResults.filter((rule) => rule.occurs);
|
|
23
|
+
expect(occurringResults).toHaveLength(1);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("there should be no result for variables used in text elements", async () => {
|
|
27
|
+
const flows = await core.parse([fixed_uri]);
|
|
28
|
+
const ruleConfig = {
|
|
29
|
+
ruleMode: "isolated",
|
|
30
|
+
rules: {
|
|
31
|
+
UnusedVariable: {
|
|
32
|
+
severity: "error",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const results: core.ScanResult[] = core.scan(flows, ruleConfig);
|
|
38
|
+
const occurringResults = results[0].ruleResults.filter((rule) => rule.occurs);
|
|
39
|
+
expect(occurringResults).toHaveLength(0);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("should fix the unused variable error", async () => {
|
|
43
|
+
const flows = await core.parse([example_uri]);
|
|
44
|
+
const ruleConfig = {
|
|
45
|
+
ruleMode: "isolated",
|
|
46
|
+
rules: {
|
|
47
|
+
UnusedVariable: {
|
|
48
|
+
severity: "error",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
const results: core.ScanResult[] = core.scan(flows, ruleConfig);
|
|
53
|
+
const fixedResults: core.ScanResult[] = core.fix(results);
|
|
54
|
+
const fixedFlow: ParsedFlow = new ParsedFlow(example_uri, fixedResults[0].flow);
|
|
55
|
+
const newResults: core.ScanResult[] = core.scan([fixedFlow], ruleConfig);
|
|
56
|
+
const fixedResultsOccurring = newResults[0].ruleResults.filter((rule) => rule.occurs);
|
|
57
|
+
expect(fixedResultsOccurring).toHaveLength(0);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as core from "../src";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
|
|
4
|
+
import { describe, it, expect } from "@jest/globals";
|
|
5
|
+
|
|
6
|
+
describe("UnusedVariable Exceptions", () => {
|
|
7
|
+
const example_uri = path.join(__dirname, "../../../example-flows/force-app/demo/Unused_Variable.flow-meta.xml");
|
|
8
|
+
|
|
9
|
+
it("should detect unused variable without exceptions", async () => {
|
|
10
|
+
const flows = await core.parse([example_uri]);
|
|
11
|
+
const ruleConfig = {
|
|
12
|
+
rules: {
|
|
13
|
+
"unused-variable": {
|
|
14
|
+
severity: "error",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
const results: core.ScanResult[] = core.scan(flows, ruleConfig);
|
|
19
|
+
const occurringResults = results[0].ruleResults.filter((rule) => rule.occurs);
|
|
20
|
+
expect(occurringResults).toHaveLength(1);
|
|
21
|
+
expect(occurringResults[0].details[0].name).toBe("anUnusedVariable");
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("should suppress unused variable with wildcard exception", async () => {
|
|
25
|
+
const flows = await core.parse([example_uri]);
|
|
26
|
+
const ruleConfig = {
|
|
27
|
+
rules: {
|
|
28
|
+
"unused-variable": {
|
|
29
|
+
severity: "error",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
exceptions: {
|
|
33
|
+
Unused_Variable: {
|
|
34
|
+
"unused-variable": ["*"],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const results: core.ScanResult[] = core.scan(flows, ruleConfig);
|
|
39
|
+
const occurringResults = results[0].ruleResults.filter((rule) => rule.occurs);
|
|
40
|
+
expect(occurringResults).toHaveLength(0);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("should suppress unused variable with specific variable name exception", async () => {
|
|
44
|
+
const flows = await core.parse([example_uri]);
|
|
45
|
+
const ruleConfig = {
|
|
46
|
+
rules: {
|
|
47
|
+
"unused-variable": {
|
|
48
|
+
severity: "error",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
exceptions: {
|
|
52
|
+
Unused_Variable: {
|
|
53
|
+
"unused-variable": ["anUnusedVariable"],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
const results: core.ScanResult[] = core.scan(flows, ruleConfig);
|
|
58
|
+
const occurringResults = results[0].ruleResults.filter((rule) => rule.occurs);
|
|
59
|
+
expect(occurringResults).toHaveLength(0);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("should NOT suppress unused variable with empty string exception - bug reproduction", async () => {
|
|
63
|
+
// This test reproduces the reported issue where users configure:
|
|
64
|
+
// exceptions:
|
|
65
|
+
// Test_Screen_Flow:
|
|
66
|
+
// unused-variable:
|
|
67
|
+
// - ""
|
|
68
|
+
// Expecting it to suppress all violations, but it doesn't work.
|
|
69
|
+
const flows = await core.parse([example_uri]);
|
|
70
|
+
const ruleConfig = {
|
|
71
|
+
rules: {
|
|
72
|
+
"unused-variable": {
|
|
73
|
+
severity: "error",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
exceptions: {
|
|
77
|
+
Unused_Variable: {
|
|
78
|
+
"unused-variable": [""],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
const results: core.ScanResult[] = core.scan(flows, ruleConfig);
|
|
83
|
+
const occurringResults = results[0].ruleResults.filter((rule) => rule.occurs);
|
|
84
|
+
// Current behavior: empty string does NOT suppress - violation still reported
|
|
85
|
+
expect(occurringResults).toHaveLength(1);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"flow": {
|
|
4
|
+
"name": "Test_Flow",
|
|
5
|
+
"xmldata": {
|
|
6
|
+
"@xmlns": "http://soap.sforce.com/2006/04/metadata",
|
|
7
|
+
"apiVersion": "62.0",
|
|
8
|
+
"environments": "Default",
|
|
9
|
+
"interviewLabel": "Test Flow {!$Flow.CurrentDateTime}",
|
|
10
|
+
"label": "Test Flow",
|
|
11
|
+
"processMetadataValues": [
|
|
12
|
+
{ "name": "BuilderType", "value": { "stringValue": "LightningFlowBuilder" } },
|
|
13
|
+
{ "name": "CanvasMode", "value": { "stringValue": "AUTO_LAYOUT_CANVAS" } },
|
|
14
|
+
{ "name": "OriginBuilderType", "value": { "stringValue": "LightningFlowBuilder" } }
|
|
15
|
+
],
|
|
16
|
+
"processType": "AutoLaunchedFlow",
|
|
17
|
+
"recordUpdates": {
|
|
18
|
+
"description": "test",
|
|
19
|
+
"name": "Update_triggering_records",
|
|
20
|
+
"label": "Update triggering records",
|
|
21
|
+
"locationX": "176",
|
|
22
|
+
"locationY": "287",
|
|
23
|
+
"inputAssignments": { "field": "Active__c", "value": { "stringValue": "Yes" } },
|
|
24
|
+
"inputReference": "$Record"
|
|
25
|
+
},
|
|
26
|
+
"start": {
|
|
27
|
+
"locationX": "50",
|
|
28
|
+
"locationY": "0",
|
|
29
|
+
"connector": { "targetReference": "Update_triggering_records" },
|
|
30
|
+
"object": "Account",
|
|
31
|
+
"recordTriggerType": "Create",
|
|
32
|
+
"triggerType": "RecordBeforeSave"
|
|
33
|
+
},
|
|
34
|
+
"status": "Draft"
|
|
35
|
+
},
|
|
36
|
+
"label": "Test Flow",
|
|
37
|
+
"interviewLabel": "Test Flow {!$Flow.CurrentDateTime}",
|
|
38
|
+
"processType": "AutoLaunchedFlow",
|
|
39
|
+
"processMetadataValues": [
|
|
40
|
+
{ "name": "BuilderType", "value": { "stringValue": "LightningFlowBuilder" } },
|
|
41
|
+
{ "name": "CanvasMode", "value": { "stringValue": "AUTO_LAYOUT_CANVAS" } },
|
|
42
|
+
{ "name": "OriginBuilderType", "value": { "stringValue": "LightningFlowBuilder" } }
|
|
43
|
+
],
|
|
44
|
+
"start": {
|
|
45
|
+
"locationX": "50",
|
|
46
|
+
"locationY": "0",
|
|
47
|
+
"connector": { "targetReference": "Update_triggering_records" },
|
|
48
|
+
"object": "Account",
|
|
49
|
+
"recordTriggerType": "Create",
|
|
50
|
+
"triggerType": "RecordBeforeSave"
|
|
51
|
+
},
|
|
52
|
+
"status": "Draft",
|
|
53
|
+
"type": "AutoLaunchedFlow",
|
|
54
|
+
"elements": [
|
|
55
|
+
{ "element": "62.0", "subtype": "apiVersion", "metaType": "attribute" },
|
|
56
|
+
{ "element": "Default", "subtype": "environments", "metaType": "attribute" },
|
|
57
|
+
{
|
|
58
|
+
"element": "Test Flow {!$Flow.CurrentDateTime}",
|
|
59
|
+
"subtype": "interviewLabel",
|
|
60
|
+
"metaType": "attribute"
|
|
61
|
+
},
|
|
62
|
+
{ "element": "Test Flow", "subtype": "label", "metaType": "attribute" },
|
|
63
|
+
{
|
|
64
|
+
"element": { "name": "BuilderType", "value": { "stringValue": "LightningFlowBuilder" } },
|
|
65
|
+
"subtype": "processMetadataValues",
|
|
66
|
+
"metaType": "attribute"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"element": { "name": "CanvasMode", "value": { "stringValue": "AUTO_LAYOUT_CANVAS" } },
|
|
70
|
+
"subtype": "processMetadataValues",
|
|
71
|
+
"metaType": "attribute"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"element": {
|
|
75
|
+
"name": "OriginBuilderType",
|
|
76
|
+
"value": { "stringValue": "LightningFlowBuilder" }
|
|
77
|
+
},
|
|
78
|
+
"subtype": "processMetadataValues",
|
|
79
|
+
"metaType": "attribute"
|
|
80
|
+
},
|
|
81
|
+
{ "element": "AutoLaunchedFlow", "subtype": "processType", "metaType": "attribute" },
|
|
82
|
+
{
|
|
83
|
+
"element": {
|
|
84
|
+
"description": "test",
|
|
85
|
+
"name": "Update_triggering_records",
|
|
86
|
+
"label": "Update triggering records",
|
|
87
|
+
"locationX": "176",
|
|
88
|
+
"locationY": "287",
|
|
89
|
+
"inputAssignments": { "field": "Active__c", "value": { "stringValue": "Yes" } },
|
|
90
|
+
"inputReference": "$Record"
|
|
91
|
+
},
|
|
92
|
+
"subtype": "recordUpdates",
|
|
93
|
+
"metaType": "node",
|
|
94
|
+
"connectors": [],
|
|
95
|
+
"name": "Update_triggering_records",
|
|
96
|
+
"locationX": "176",
|
|
97
|
+
"locationY": "287"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"element": {
|
|
101
|
+
"locationX": "50",
|
|
102
|
+
"locationY": "0",
|
|
103
|
+
"connector": { "targetReference": "Update_triggering_records" },
|
|
104
|
+
"object": "Account",
|
|
105
|
+
"recordTriggerType": "Create",
|
|
106
|
+
"triggerType": "RecordBeforeSave"
|
|
107
|
+
},
|
|
108
|
+
"subtype": "start",
|
|
109
|
+
"metaType": "node",
|
|
110
|
+
"connectors": [
|
|
111
|
+
{
|
|
112
|
+
"element": { "targetReference": "Update_triggering_records" },
|
|
113
|
+
"processed": false,
|
|
114
|
+
"type": "connector",
|
|
115
|
+
"reference": "Update_triggering_records"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"name": "flowstart",
|
|
119
|
+
"locationX": "50",
|
|
120
|
+
"locationY": "0"
|
|
121
|
+
},
|
|
122
|
+
{ "element": "Draft", "subtype": "status", "metaType": "attribute" }
|
|
123
|
+
],
|
|
124
|
+
"startReference": "Update_triggering_records",
|
|
125
|
+
"triggerOrder": 10
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"flow": {
|
|
4
|
+
"name": "Test_Flow_WaitConditions",
|
|
5
|
+
"xmldata": {
|
|
6
|
+
"@xmlns": "http://soap.sforce.com/2006/04/metadata",
|
|
7
|
+
"apiVersion": "62.0",
|
|
8
|
+
"label": "Test Flow Wait Conditions",
|
|
9
|
+
"processType": "AutoLaunchedFlow",
|
|
10
|
+
"waits": {
|
|
11
|
+
"name": "Wait_For_Conditions",
|
|
12
|
+
"label": "Wait For Conditions",
|
|
13
|
+
"locationX": "176",
|
|
14
|
+
"locationY": "287",
|
|
15
|
+
"waitEvents": {
|
|
16
|
+
"name": "myWaitEvent",
|
|
17
|
+
"conditionLogic": "and",
|
|
18
|
+
"conditions": {
|
|
19
|
+
"leftValueReference": "myVariable_current.Status",
|
|
20
|
+
"operator": "EqualTo",
|
|
21
|
+
"rightValue": { "stringValue": "Completed" }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"start": {
|
|
26
|
+
"locationX": "50",
|
|
27
|
+
"locationY": "0",
|
|
28
|
+
"connector": { "targetReference": "Wait_For_Conditions" },
|
|
29
|
+
"triggerType": "RecordAfterSave",
|
|
30
|
+
"object": "Account",
|
|
31
|
+
"recordTriggerType": "Create"
|
|
32
|
+
},
|
|
33
|
+
"status": "Draft"
|
|
34
|
+
},
|
|
35
|
+
"label": "Test Flow Wait Conditions",
|
|
36
|
+
"processType": "AutoLaunchedFlow",
|
|
37
|
+
"start": {
|
|
38
|
+
"locationX": "50",
|
|
39
|
+
"locationY": "0",
|
|
40
|
+
"connector": { "targetReference": "Wait_For_Conditions" },
|
|
41
|
+
"triggerType": "RecordAfterSave",
|
|
42
|
+
"object": "Account",
|
|
43
|
+
"recordTriggerType": "Create"
|
|
44
|
+
},
|
|
45
|
+
"status": "Draft",
|
|
46
|
+
"type": "AutoLaunchedFlow",
|
|
47
|
+
"elements": [
|
|
48
|
+
{ "element": "62.0", "subtype": "apiVersion", "metaType": "attribute" },
|
|
49
|
+
{ "element": "Test Flow Wait Conditions", "subtype": "label", "metaType": "attribute" },
|
|
50
|
+
{ "element": "AutoLaunchedFlow", "subtype": "processType", "metaType": "attribute" },
|
|
51
|
+
{
|
|
52
|
+
"element": {
|
|
53
|
+
"name": "Wait_For_Conditions",
|
|
54
|
+
"label": "Wait For Conditions",
|
|
55
|
+
"locationX": "176",
|
|
56
|
+
"locationY": "287",
|
|
57
|
+
"waitEvents": {
|
|
58
|
+
"name": "myWaitEvent",
|
|
59
|
+
"conditionLogic": "and",
|
|
60
|
+
"conditions": {
|
|
61
|
+
"leftValueReference": "myVariable_current.Status",
|
|
62
|
+
"operator": "EqualTo",
|
|
63
|
+
"rightValue": { "stringValue": "Completed" }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"subtype": "waits",
|
|
68
|
+
"metaType": "node",
|
|
69
|
+
"connectors": [],
|
|
70
|
+
"name": "Wait_For_Conditions",
|
|
71
|
+
"locationX": "176",
|
|
72
|
+
"locationY": "287"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"element": {
|
|
76
|
+
"locationX": "50",
|
|
77
|
+
"locationY": "0",
|
|
78
|
+
"connector": { "targetReference": "Wait_For_Conditions" },
|
|
79
|
+
"triggerType": "RecordAfterSave",
|
|
80
|
+
"object": "Account",
|
|
81
|
+
"recordTriggerType": "Create"
|
|
82
|
+
},
|
|
83
|
+
"subtype": "start",
|
|
84
|
+
"metaType": "node",
|
|
85
|
+
"connectors": [
|
|
86
|
+
{
|
|
87
|
+
"element": { "targetReference": "Wait_For_Conditions" },
|
|
88
|
+
"processed": false,
|
|
89
|
+
"type": "connector",
|
|
90
|
+
"reference": "Wait_For_Conditions"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"name": "flowstart",
|
|
94
|
+
"locationX": "50",
|
|
95
|
+
"locationY": "0"
|
|
96
|
+
},
|
|
97
|
+
{ "element": "Draft", "subtype": "status", "metaType": "attribute" }
|
|
98
|
+
],
|
|
99
|
+
"startReference": "Wait_For_Conditions"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"flow": {
|
|
4
|
+
"name": "Test_Flow_WaitDate",
|
|
5
|
+
"xmldata": {
|
|
6
|
+
"@xmlns": "http://soap.sforce.com/2006/04/metadata",
|
|
7
|
+
"apiVersion": "62.0",
|
|
8
|
+
"label": "Test Flow WaitDate",
|
|
9
|
+
"processType": "AutoLaunchedFlow",
|
|
10
|
+
"waits": {
|
|
11
|
+
"name": "Wait_Until_Date",
|
|
12
|
+
"label": "Wait Until Date",
|
|
13
|
+
"locationX": "176",
|
|
14
|
+
"locationY": "287",
|
|
15
|
+
"elementSubtype": "WaitDate",
|
|
16
|
+
"dateTimeValue": "2025-12-31T00:00:00.000Z"
|
|
17
|
+
},
|
|
18
|
+
"start": {
|
|
19
|
+
"locationX": "50",
|
|
20
|
+
"locationY": "0",
|
|
21
|
+
"connector": { "targetReference": "Wait_Until_Date" },
|
|
22
|
+
"triggerType": "RecordAfterSave",
|
|
23
|
+
"object": "Account",
|
|
24
|
+
"recordTriggerType": "Create"
|
|
25
|
+
},
|
|
26
|
+
"status": "Draft"
|
|
27
|
+
},
|
|
28
|
+
"label": "Test Flow WaitDate",
|
|
29
|
+
"processType": "AutoLaunchedFlow",
|
|
30
|
+
"start": {
|
|
31
|
+
"locationX": "50",
|
|
32
|
+
"locationY": "0",
|
|
33
|
+
"connector": { "targetReference": "Wait_Until_Date" },
|
|
34
|
+
"triggerType": "RecordAfterSave",
|
|
35
|
+
"object": "Account",
|
|
36
|
+
"recordTriggerType": "Create"
|
|
37
|
+
},
|
|
38
|
+
"status": "Draft",
|
|
39
|
+
"type": "AutoLaunchedFlow",
|
|
40
|
+
"elements": [
|
|
41
|
+
{ "element": "62.0", "subtype": "apiVersion", "metaType": "attribute" },
|
|
42
|
+
{ "element": "Test Flow WaitDate", "subtype": "label", "metaType": "attribute" },
|
|
43
|
+
{ "element": "AutoLaunchedFlow", "subtype": "processType", "metaType": "attribute" },
|
|
44
|
+
{
|
|
45
|
+
"element": {
|
|
46
|
+
"name": "Wait_Until_Date",
|
|
47
|
+
"label": "Wait Until Date",
|
|
48
|
+
"locationX": "176",
|
|
49
|
+
"locationY": "287",
|
|
50
|
+
"elementSubtype": "WaitDate",
|
|
51
|
+
"dateTimeValue": "2025-12-31T00:00:00.000Z"
|
|
52
|
+
},
|
|
53
|
+
"subtype": "waits",
|
|
54
|
+
"metaType": "node",
|
|
55
|
+
"connectors": [],
|
|
56
|
+
"name": "Wait_Until_Date",
|
|
57
|
+
"locationX": "176",
|
|
58
|
+
"locationY": "287"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"element": {
|
|
62
|
+
"locationX": "50",
|
|
63
|
+
"locationY": "0",
|
|
64
|
+
"connector": { "targetReference": "Wait_Until_Date" },
|
|
65
|
+
"triggerType": "RecordAfterSave",
|
|
66
|
+
"object": "Account",
|
|
67
|
+
"recordTriggerType": "Create"
|
|
68
|
+
},
|
|
69
|
+
"subtype": "start",
|
|
70
|
+
"metaType": "node",
|
|
71
|
+
"connectors": [
|
|
72
|
+
{
|
|
73
|
+
"element": { "targetReference": "Wait_Until_Date" },
|
|
74
|
+
"processed": false,
|
|
75
|
+
"type": "connector",
|
|
76
|
+
"reference": "Wait_Until_Date"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"name": "flowstart",
|
|
80
|
+
"locationX": "50",
|
|
81
|
+
"locationY": "0"
|
|
82
|
+
},
|
|
83
|
+
{ "element": "Draft", "subtype": "status", "metaType": "attribute" }
|
|
84
|
+
],
|
|
85
|
+
"startReference": "Wait_Until_Date"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
]
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"flow": {
|
|
4
|
+
"name": "Test_Flow_WaitDuration",
|
|
5
|
+
"xmldata": {
|
|
6
|
+
"@xmlns": "http://soap.sforce.com/2006/04/metadata",
|
|
7
|
+
"apiVersion": "62.0",
|
|
8
|
+
"label": "Test Flow WaitDuration",
|
|
9
|
+
"processType": "AutoLaunchedFlow",
|
|
10
|
+
"waits": {
|
|
11
|
+
"name": "Wait_5_Minutes",
|
|
12
|
+
"label": "Wait 5 Minutes",
|
|
13
|
+
"locationX": "176",
|
|
14
|
+
"locationY": "287",
|
|
15
|
+
"elementSubtype": "WaitDuration",
|
|
16
|
+
"timeOffset": 5,
|
|
17
|
+
"timeOffsetUnit": "Minutes"
|
|
18
|
+
},
|
|
19
|
+
"start": {
|
|
20
|
+
"locationX": "50",
|
|
21
|
+
"locationY": "0",
|
|
22
|
+
"connector": { "targetReference": "Wait_5_Minutes" },
|
|
23
|
+
"triggerType": "RecordAfterSave",
|
|
24
|
+
"object": "Account",
|
|
25
|
+
"recordTriggerType": "Create"
|
|
26
|
+
},
|
|
27
|
+
"status": "Draft"
|
|
28
|
+
},
|
|
29
|
+
"label": "Test Flow WaitDuration",
|
|
30
|
+
"processType": "AutoLaunchedFlow",
|
|
31
|
+
"start": {
|
|
32
|
+
"locationX": "50",
|
|
33
|
+
"locationY": "0",
|
|
34
|
+
"connector": { "targetReference": "Wait_5_Minutes" },
|
|
35
|
+
"triggerType": "RecordAfterSave",
|
|
36
|
+
"object": "Account",
|
|
37
|
+
"recordTriggerType": "Create"
|
|
38
|
+
},
|
|
39
|
+
"status": "Draft",
|
|
40
|
+
"type": "AutoLaunchedFlow",
|
|
41
|
+
"elements": [
|
|
42
|
+
{ "element": "62.0", "subtype": "apiVersion", "metaType": "attribute" },
|
|
43
|
+
{ "element": "Test Flow WaitDuration", "subtype": "label", "metaType": "attribute" },
|
|
44
|
+
{ "element": "AutoLaunchedFlow", "subtype": "processType", "metaType": "attribute" },
|
|
45
|
+
{
|
|
46
|
+
"element": {
|
|
47
|
+
"name": "Wait_5_Minutes",
|
|
48
|
+
"label": "Wait 5 Minutes",
|
|
49
|
+
"locationX": "176",
|
|
50
|
+
"locationY": "287",
|
|
51
|
+
"elementSubtype": "WaitDuration",
|
|
52
|
+
"timeOffset": 5,
|
|
53
|
+
"timeOffsetUnit": "Minutes"
|
|
54
|
+
},
|
|
55
|
+
"subtype": "waits",
|
|
56
|
+
"metaType": "node",
|
|
57
|
+
"connectors": [],
|
|
58
|
+
"name": "Wait_5_Minutes",
|
|
59
|
+
"locationX": "176",
|
|
60
|
+
"locationY": "287"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"element": {
|
|
64
|
+
"locationX": "50",
|
|
65
|
+
"locationY": "0",
|
|
66
|
+
"connector": { "targetReference": "Wait_5_Minutes" },
|
|
67
|
+
"triggerType": "RecordAfterSave",
|
|
68
|
+
"object": "Account",
|
|
69
|
+
"recordTriggerType": "Create"
|
|
70
|
+
},
|
|
71
|
+
"subtype": "start",
|
|
72
|
+
"metaType": "node",
|
|
73
|
+
"connectors": [
|
|
74
|
+
{
|
|
75
|
+
"element": { "targetReference": "Wait_5_Minutes" },
|
|
76
|
+
"processed": false,
|
|
77
|
+
"type": "connector",
|
|
78
|
+
"reference": "Wait_5_Minutes"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"name": "flowstart",
|
|
82
|
+
"locationX": "50",
|
|
83
|
+
"locationY": "0"
|
|
84
|
+
},
|
|
85
|
+
{ "element": "Draft", "subtype": "status", "metaType": "attribute" }
|
|
86
|
+
],
|
|
87
|
+
"startReference": "Wait_5_Minutes"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|