diff --git a/README.md b/README.md index 1050a80..f8039fe 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. diff --git a/package-lock.json b/package-lock.json index bc8865f..feca4e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "lightningflowscanner", - "version": "3.63.0", + "version": "5.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "lightningflowscanner", - "version": "3.63.0", + "version": "5.0.0", "license": "AGPL-3.0", "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", @@ -16885,15 +16885,16 @@ "peer": true }, "node_modules/lightning-flow-scanner-core": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/lightning-flow-scanner-core/-/lightning-flow-scanner-core-4.51.0.tgz", - "integrity": "sha512-20zWNfbGXk0UKNmdaR7Gu1ldDuYkqZ8tTVIhVkL8nNA9HWwunPEReeO7QwdZIvLL48sBvzwjc4s0VWpRBy2IxQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/lightning-flow-scanner-core/-/lightning-flow-scanner-core-5.1.0.tgz", + "integrity": "sha512-Fw5poLq3CZlgDpMzc1cmGciwObqOZLiIhwhUyrlq2d8N6rtHeFTYSDVvaP4egzgxxmEXJ7xIilfH5XUKwH8hUA==", + "deprecated": "⚠️ This version is no longer supported. Please visit https://github.com/Lightning-Flow-Scanner for more information.", "license": "MIT", "dependencies": { "xmlbuilder2": "^3.1.1" }, "engines": { - "node": "^20 || ^22 || ^24" + "node": "^20 || ^22 || ^23" } }, "node_modules/lilconfig": { diff --git a/package.json b/package.json index d0f20a8..2a66a78 100644 --- a/package.json +++ b/package.json @@ -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" }, @@ -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", diff --git a/src/commands/handlers.ts b/src/commands/handlers.ts index d235537..dac4ff8 100644 --- a/src/commands/handlers.ts +++ b/src/commands/handlers.ts @@ -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 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 => { + 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("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); @@ -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: {} }; @@ -229,4 +257,4 @@ export default class Commands { } } } -} +} \ No newline at end of file diff --git a/src/providers/config-provider.ts b/src/providers/config-provider.ts index e10c438..be8348a 100644 --- a/src/providers/config-provider.ts +++ b/src/providers/config-provider.ts @@ -1,7 +1,6 @@ import { IRulesConfig, getRules, - getBetaRules, AdvancedRule, } from 'lightning-flow-scanner-core'; import * as vsce from 'vscode'; @@ -50,7 +49,6 @@ export class ConfigProvider { ): Promise { const allRules: Record = [ ...getRules(), - ...getBetaRules(), ].reduce( (acc, rule: AdvancedRule) => { acc[rule.name] = { severity: 'error' }; diff --git a/webviews/components/Sidebar.svelte b/webviews/components/Sidebar.svelte index 4411dd1..0ec6ecd 100644 --- a/webviews/components/Sidebar.svelte +++ b/webviews/components/Sidebar.svelte @@ -33,10 +33,19 @@ } -
+
+
+

+ Avoid unofficial extensions and disable auto-updates immediately(none). +

+
+

+ 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. +

+
-
-

Support our mission to champion Best Practices by starring ⭐ us on GitHub

-
-
- -