Skip to content

Commit e2e52d7

Browse files
authored
Mt 5 (#14)
* rm env configuration attributes * add rimraf for developers * adds fix flows flow selection * improves configuration flow * remove legacy expression settings * replaces yaml dependency with cosmiconfig * preselect all if none exists * docs:improves usage section
1 parent faa9655 commit e2e52d7

24 files changed

+441
-794
lines changed
Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,57 @@
1-
---
2-
#
3-
# Documentation:
4-
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
5-
#
6-
7-
#######################################
8-
# Start the job on all push to master #
9-
#######################################
10-
name: 'Build & Deploy - RELEASE'
1+
name: "Build & Release"
2+
113
on:
124
release:
13-
# Want to run the automation when a release is created
14-
types: ['created']
5+
types: [created]
156

16-
permissions: read-all
7+
permissions:
8+
contents: read
9+
id-token: write # for future OpenID CI auth to avoid PATs
1710

1811
concurrency:
1912
group: ${{ github.ref_name }}-${{ github.workflow }}
2013
cancel-in-progress: true
2114

22-
###############
23-
# Set the Job #
24-
###############
2515
jobs:
26-
deploy:
16+
release:
2717
runs-on: ubuntu-latest
28-
permissions: read-all
29-
environment:
30-
name: release
18+
environment: release
19+
3120
steps:
32-
- uses: actions/checkout@v4
33-
# Setup .npmrc file to publish to npm
34-
- uses: actions/[email protected]
21+
- name: Checkout Repository
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
3528
with:
3629
node-version: 22.x
37-
- name: Setup Dependencies
30+
31+
- name: Install Dependencies
32+
run: npm ci
33+
34+
# Snyk security scan (currently advisory)
35+
- name: Snyk Security Scan (Advisory Mode)
36+
if: env.SNYK_TOKEN != ''
37+
env:
38+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
39+
run: |
40+
npm install -g snyk
41+
snyk test || echo "❗ SNYK findings detected (not failing pipeline yet)"
42+
43+
- name: Build Extension Artifacts
44+
run: npm run vscode:prepublish
45+
46+
- name: Run WDIO E2E Tests
47+
run: npm run test
48+
49+
- name: Package VSIX
50+
run: |
51+
npm install -g @vscode/vsce
52+
vsce package
53+
54+
- name: Publish to VS Code Marketplace
3855
run: |
39-
npm ci
40-
npm install -g @vscode/vsce ovsx
41-
- name: Compile VSIX
42-
run: npm run build
43-
- name: Publish VSCE Marketplace
44-
run: vsce publish --pat ${{ secrets.VSCE_PAT }} -i $(ls -all | grep "lightningflowscanner" | awk '{print $9}')
56+
vsce publish --pat "${{ secrets.VSCE_PAT }}" --packagePath *.vsix
57+
shell: bash

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ coverage
1313

1414
.config
1515

16-
src/generated
17-
1816
src/vscode.d.ts

.vscode/launch.json

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
"stopOnEntry": false,
1515
"sourceMaps": true,
1616
"outFiles": ["${workspaceRoot}/out/src/**/*.js"],
17-
"preLaunchTask": "npm: watch",
18-
"env": {
19-
"USE_NEW_CONFIG": "true"
20-
},
17+
"preLaunchTask": "npm: watch"
2118
},
2219
{
2320
"args": [
@@ -40,24 +37,7 @@
4037
],
4138
"outFiles": [
4239
"${workspaceFolder}/dist/**/*.js"
43-
],
44-
"env": {
45-
"USE_NEW_CONFIG": "true"
46-
},
47-
},
48-
{
49-
"name": "Extension Tests",
50-
"type": "extensionHost",
51-
"request": "launch",
52-
"runtimeExecutable": "${execPath}",
53-
"args": [
54-
"--disable-extensions",
55-
"--extensionDevelopmentPath=${workspaceFolder}",
56-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
57-
],
58-
"outFiles": [
59-
"${workspaceFolder}/out/test/**/*.js"
6040
]
61-
},
41+
}
6242
]
6343
}

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,4 @@
1111
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
1212
"typescript.tsc.autoDetect": "off",
1313
"typescript.tsdk": "node_modules/typescript/lib",
14-
"jest.jestCommandLine": "npm run v:test:reactive --",
15-
"jest.runMode": "on-demand",
16-
1714
}

.vscode/tasks.json

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,51 +17,13 @@
1717
"isDefault": true
1818
}
1919
},
20-
{
21-
"type": "npm",
22-
"script": "watch-tests",
23-
"problemMatcher": "$tsc-watch",
24-
"isBackground": true,
25-
"presentation": {
26-
"reveal": "never",
27-
"group": "watchers"
28-
},
29-
"group": "build"
30-
},
31-
{
32-
"label": "tasks: watch-tests",
33-
"dependsOn": [
34-
"npm: watch",
35-
"npm: watch-tests"
36-
],
37-
"problemMatcher": []
38-
},
3920
{
4021
"type": "npm",
4122
"script": "compile",
4223
"group": "build",
4324
"problemMatcher": [],
4425
"label": "npm: compile",
4526
"detail": "npm run build"
46-
},
47-
{
48-
"type": "npm",
49-
"script": "v:dev",
50-
"isBackground": true,
51-
"presentation": {
52-
"reveal": "never"
53-
},
54-
"problemMatcher": [
55-
{
56-
"base": "$ts-webpack-watch",
57-
"background": {
58-
"activeOnStart": true,
59-
"beginsPattern": "Build start",
60-
"endsPattern": "Build success"
61-
}
62-
}
63-
],
64-
"group": "build"
65-
}
27+
}
6628
]
6729
}

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,21 @@
1111

1212
## Usage
1313

14-
Use our side bar or the **Command Palette** and type `Flow Scanner` to see the list of all available commands.
14+
Use our side bar or the **Command Palette** and type `flowscanner` to see the list of all available commands.
1515

16-
* `Configure Rules` Allows to define rules and expressions as per defined in the [core documentation](https://github.com/Flow-Scanner/lightning-flow-scanner-core).
17-
* `Scan Flows` allows choosing either a directory or a selection of flows to run the analysis against.
18-
* `Fix Flows` will apply available fixes automatically.
19-
* `Open Documentation` can be used to reference the documentation.
16+
* `Configure Flow Scanner` - Set up rules in `.flow-scanner.yml` (see [documentation](https://github.com/Flow-Scanner/lightning-flow-scanner-core))
17+
* `Scan Flows` - Analyze a directory or selected flow files
18+
* `Fix Flows` - Automatically apply available fixes
19+
* `Flow Scanner Documentation` - Open the rules reference guide
2020

2121
**Privacy:** Zero user data collected. All processing is client-side.
2222
→ See Data Handling in our [Security Policy](https://github.com/Flow-Scanner/lightning-flow-scanner-vsx?tab=security-ov-file).
2323

2424
## Configuration
2525

26-
| Key | Description | Default Value |
27-
| -------------------------------- | --------------------------------------------------------------------------------- | ----------------------------- |
28-
| `flowscanner.SpecifyFiles` | Specify flow file paths instead of a root directory. | `false` |
29-
| `flowscanner.NamingConvention` | Specify a REGEX expression to use as Flow Naming convention. | `[A-Za-z0-9]+_[A-Za-z0-9]+` |
30-
| `flowscanner.APIVersion` | Specify an expression to validate the API version, i.e. '===50'(use at least 50). | `>50` |
26+
| Key | Description | Default Value |
27+
| ---------------------------- | ---------------------------------------------------- | ------------- |
28+
| `flowscanner.SpecifyFiles` | Specify flow file paths instead of a root directory. | `false` |
3129

3230
## Development
3331

@@ -84,7 +82,7 @@ If you’re developing or testing updates to the core module, you can link it lo
8482

8583
## VSCE to VSX
8684

87-
The `lightning-flow-scanner-vsce` package was unpublished from the Visual Studio and Open VSX Marketplaces due to a vulnerability in `lightning-flow-scanner-core`, stemming from unsafe rule loading. This issue was addressed in [v5 of the core library](https://github.com/Flow-Scanner/lightning-flow-scanner-core/releases/tag/v5.1.0). This fork, created on 22/09/2025, emphasizes security and maintainability.
85+
The `lightning-flow-scanner-vsce` package was unpublished from the Visual Studio and Open VSX Marketplaces due to a vulnerability stemming from unsafe rule loading. The issue was addressed in [v5 of the core library](https://github.com/Flow-Scanner/lightning-flow-scanner-core/releases/tag/v5.1.0). This fork, created on 22/09/2025, emphasizes security and maintainability.
8886

8987
<p><strong>Want to help improve Lightning Flow Scanner? See our <a href="https://github.com/Flow-Scanner/lightning-flow-scanner-core?tab=contributing-ov-file">Contributing Guidelines</a></strong></p>
9088
<!-- force-contributors-render: 2025-10-28 22:10:01 -->

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ We actively track and maintain an up-to-date inventory of all third-party depend
2828
| `lightning-flow-scanner-core` | [MIT](https://github.com/Flow-Scanner/lightning-flow-scanner-core/blob/main/LICENSE.md) | Salesforce Flow scanning utilities |
2929
| `tabulator-tables` | [MIT](https://github.com/olifolkerd/tabulator/blob/master/LICENSE) | Interactive tables and data grids for web apps |
3030
| `uuid` | [MIT](https://github.com/uuidjs/uuid/blob/main/LICENSE.md) | Generates RFC-compliant UUIDs |
31-
| `yaml` | [ISC](https://github.com/eemeli/yaml/blob/main/LICENSE) | YAML parser and stringifier for JavaScript |
31+
| `cosmiconfig` | [MIT](https://github.com/davidtheclark/cosmiconfig/blob/main/LICENSE) | Config file loader for JavaScript/Node |

__mocks__/vscode.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)