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
27 changes: 16 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,24 @@
"version": "0.2.0",
"configurations": [
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"name": "Launch Extension VSCE",
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: compile",
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"type": "extensionHost"
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/src/**/*.js"],
"preLaunchTask": "npm: watch",
"env": {
"USE_NEW_CONFIG": "true"
},
},
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"name": "Launch Extension",
"name": "Launch Extension xxxxx",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
Expand All @@ -38,7 +40,10 @@
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
]
],
"env": {
"USE_NEW_CONFIG": "true"
},
},
{
"name": "Extension Tests",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"group": "build",
"problemMatcher": [],
"label": "npm: compile",
"detail": "webpack --config ./build/node-extension.webpack.config.js"
"detail": "npm run build"
},
{
"type": "npm",
Expand Down
80 changes: 20 additions & 60 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "webpack --config ./build/node-extension.webpack.config.js",
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\"",
"watch": "npm run v:update && concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\"",
"build-webapp": "rollup -c",
"build": "npm run v:update && rollup -c && vsce package",
"build:beta": "npm run v:update && rollup -c && vsce package --pre-release",
Expand Down Expand Up @@ -182,10 +182,10 @@
},
"dependencies": {
"convert-array-to-csv": "^2.0.0",
"cosmiconfig": "^9.0.0",
"lightning-flow-scanner-core": "4.48.0",
"tabulator-tables": "^6.3.1",
"uuid": "^11.0.5",
"xml2js": "^0.6.2"
"xml2js": "^0.6.2",
"yaml": "^2.8.0"
}
}
19 changes: 16 additions & 3 deletions src/commands/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { findFlowCoverage } from '../libs/FindFlowCoverage';
import { CacheProvider } from '../providers/cache-provider';
import { testdata } from '../store/testdata';
import { OutputChannel } from '../providers/outputChannel';
import { ConfigProvider } from '../providers/config-provider';

const { USE_NEW_CONFIG: isUseNewConfig } = process.env;

Expand All @@ -32,7 +33,7 @@ export default class Commands {
}

private async configRules() {
if (isUseNewConfig) {
if (isUseNewConfig === 'true') {
await this.ruleConfiguration();
return;
}
Expand Down Expand Up @@ -100,7 +101,14 @@ export default class Commands {
);
}

private async ruleConfiguration() {}
private async ruleConfiguration() {
const configProvider = new ConfigProvider();
const config = await configProvider.discover(
vscode.workspace.workspaceFolders?.[0].uri.path
);
const document = await vscode.workspace.openTextDocument(config.fspath);
await vscode.window.showTextDocument(document);
}

private async debugView() {
let results = testdata as unknown as core.ScanResult[];
Expand Down Expand Up @@ -160,11 +168,16 @@ export default class Commands {
OutputChannel.getInstance().logChannel.trace('reset configurations');
await this.configRules();
}
const ruleConfig = CacheProvider.instance.get('ruleconfig');
let ruleConfig = CacheProvider.instance.get('ruleconfig');
OutputChannel.getInstance().logChannel.debug(
'load stored rule configurations',
ruleConfig
);
if (isUseNewConfig === 'true') {
// load and use config
const configProvider = new ConfigProvider();
ruleConfig = await configProvider.loadConfig(rootPath.fsPath);
}
results = core.scan(await core.parse(selectedUris), ruleConfig);
OutputChannel.getInstance().logChannel.debug('Scan Results', ...results);
await CacheProvider.instance.set('results', results);
Expand Down
Loading