Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[![Lightning Flow Scanner Banner](media/bannerslim.png)](https://github.com/Lightning-Flow-Scanner)
__*Pinpoint deviations from Industry Best Practices in Salesforce Flows and ensure standards of business automation excellence.*__

[![Flow Overview](media/demo.gif)](https://github.com/Lightning-Flow-Scanner)
[![Flow Overview](media/demo.gif)](https://github.com/Lightning-Flow-Scanner)

**Also available as [Salesforce CLI Plugin](https://github.com/Lightning-Flow-Scanner/lightning-flow-scanner-sfdx)*
## [🚨 Deprecation Notice — August, 2025](https://github.com/Lightning-Flow-Scanner)

## Features/Commands

Expand All @@ -14,9 +13,9 @@ Use the `Scan Flows` command by choosing either a directory or a selection of fl

Use the `Configurate Flow Rules` command to configure the rules executed during scanning.

Use the `Fix Flows` command to apply available fixes automatically.
Use the `Fix Flows` command to apply available fixes automatically.

The `Default Flow Rules` command can be used to view more details on the rules that are applied to Flows in the scans.
The `Default Flow Rules` command can be used to view more details on the rules that are applied to Flows in the scans.

The `Calculate Flow Coverage` command calculates Flow Test coverage percentages by running the apex tests in your default connectedOrg.

Expand Down
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"icon": "media/lightningflow.png",
"description": "A VSCode Extension designed to pinpoint deviations from Industry Best Practices in Salesforce Flows, ensuring standards of business automation excellence.",
"version": "3.63.0",
"version": "5.0.0",
"engines": {
"vscode": "^1.99.1"
},
Expand Down Expand Up @@ -182,7 +182,7 @@
},
"dependencies": {
"convert-array-to-csv": "^2.0.0",
"lightning-flow-scanner-core": "4.51.0",
"lightning-flow-scanner-core": "^5.1.0",
"tabulator-tables": "^6.3.1",
"uuid": "^11.0.5",
"xml2js": "^0.6.2",
Expand Down
56 changes: 42 additions & 14 deletions src/commands/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,46 @@ export default class Commands {
constructor(private context: vscode.ExtensionContext) {}

get handlers() {
return Object.entries({
'lightningflowscanner.viewDefaulFlowRules': () =>
this.viewDefaulFlowRules(),
'lightningflowscanner.configRules': () => this.configRules(),
'lightningflowscanner.debugView': () => this.debugView(),
'lightningflowscanner.scanFlows': () => this.scanFlows(),
'lightningflowscanner.fixFlows': () => this.fixFlows(),
'lightningflowscanner.calculateFlowTestCoverage': () =>
this.calculateFlowTestCoverage(),
});
const rawHandlers: Record<string, (...args: any[]) => any> = {
'lightningflowscanner.viewDefaulFlowRules': () => this.viewDefaulFlowRules(),
'lightningflowscanner.configRules': () => this.configRules(),
'lightningflowscanner.debugView': () => this.debugView(),
'lightningflowscanner.scanFlows': () => this.scanFlows(),
'lightningflowscanner.fixFlows': () => this.fixFlows(),
'lightningflowscanner.calculateFlowTestCoverage': () => this.calculateFlowTestCoverage(),
};

return Object.entries(rawHandlers).map(([command, handler]) => {
return [
command,
async (...args: any[]): Promise<any> => {
this.checkExtensionAutoUpdate(); // nag before running command
return handler(...args);
}
] as const;
});
}

private async checkExtensionAutoUpdate() {
const autoUpdate = vscode.workspace
.getConfiguration(undefined, null) // null = global scope
.get<boolean>("extensions.autoUpdate", true);

if (autoUpdate) {
const selection = await vscode.window.showWarningMessage(
"⚠️ Extension auto-update is enabled. Please disable it.",
"Open Settings",
"Ignore"
);

if (selection === "Open Settings") {
vscode.commands.executeCommand(
"workbench.action.openSettings",
"extensions.autoUpdate"
);
}
}
}

private viewDefaulFlowRules() {
RuleOverview.createOrShow(this.context.extensionUri);
Expand All @@ -37,9 +66,8 @@ export default class Commands {
await this.ruleConfiguration();
return;
}
const allRules: core.AdvancedRule[] = [
...core.getBetaRules(),
...core.getRules(),
const allRules: core.IRuleDefinition[] = [
...core.getRules()
];
const ruleConfig = { rules: {} };

Expand Down Expand Up @@ -229,4 +257,4 @@ export default class Commands {
}
}
}
}
}
2 changes: 0 additions & 2 deletions src/providers/config-provider.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
IRulesConfig,
getRules,
getBetaRules,
AdvancedRule,
} from 'lightning-flow-scanner-core';
import * as vsce from 'vscode';
Expand Down Expand Up @@ -50,7 +49,6 @@ export class ConfigProvider {
): Promise<Configuration> {
const allRules: Record<string, { severity: string }> = [
...getRules(),
...getBetaRules(),
].reduce(
(acc, rule: AdvancedRule) => {
acc[rule.name] = { severity: 'error' };
Expand Down
17 changes: 10 additions & 7 deletions webviews/components/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,19 @@
}

</script>

<TailwindWrapper>
<div class="sb">
<Banner/>
<section class="mt-4 p-4 bg-yellow-100 border-l-4 border-yellow-500 rounded">
<div class="bg-red-50 border-l-4 border-red-500 p-2 rounded mb-3">
<p class="text-sm font-bold text-red-700 mb-0">
Avoid unofficial extensions and disable auto-updates immediately(none).
</p>
</div>
<p class="ml-5 mb-2 text-sm text-gray-800">
Extensions run with the same privileges as you. If compromised, they could access CLI tokens or secret keys, and read or modify code while Code Builder is in use.
</p>
</section>
<nav aria-label="Sidebar">
<button class="btn btn-blue" on:click={configRules}>
Configure Rules
Expand All @@ -54,14 +63,8 @@
Documentation
</button>
</nav>
<div>
<p>Support our mission to champion Best Practices by starring ⭐ us on <a href="https://github.com/Lightning-Flow-Scanner/lightning-flow-scanner-vsce">GitHub</a></p>
</div>
</div>

</TailwindWrapper>


<style>

.sb{
Expand Down
Loading