Skip to content

Commit 59b1ae5

Browse files
committed
update command names
1 parent bf748e8 commit 59b1ae5

File tree

8 files changed

+39
-37
lines changed

8 files changed

+39
-37
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ Use our side bar or the **Command Palette** and type `Flow Scanner` to see the l
2323

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

3030
## Development
3131

package.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323
"configuration": {
2424
"title": "Lightning Flow Scanner",
2525
"properties": {
26-
"lightningFlowScanner.SpecifyFiles": {
26+
"flowscanner.SpecifyFiles": {
2727
"type": "boolean",
2828
"default": false,
2929
"description": "Specify flow file paths instead of a root directory."
3030
},
31-
"lightningFlowScanner.NamingConvention": {
31+
"flowscanner.NamingConvention": {
3232
"type": "string",
3333
"default": "[A-Za-z0-9]+_[A-Za-z0-9]+",
3434
"description": "Specify a REGEX expression to use as Flow Naming convention."
3535
},
36-
"lightningFlowScanner.APIVersion": {
36+
"flowscanner.APIVersion": {
3737
"type": "string",
3838
"default": ">50",
3939
"description": "Specify an expression to validate the API version, i.e. '===50'(use at least 50)."
@@ -42,28 +42,28 @@
4242
},
4343
"commands": [
4444
{
45-
"command": "lightningflowscanner.openDocumentation",
46-
"title": "Open Flow Scanner Documentation"
45+
"command": "flowscanner.openDocumentation",
46+
"title": "Open LFS Documentation"
4747
},
4848
{
49-
"command": "lightningflowscanner.scanFlows",
50-
"title": "Scan Flows with Flow Scanner"
49+
"command": "flowscanner.scanFlows",
50+
"title": "Scan Flows"
5151
},
5252
{
53-
"command": "lightningflowscanner.debugView",
54-
"title": "Debug Flow Scanner View"
53+
"command": "flowscanner.debugger",
54+
"title": "Debug Flow Scanner"
5555
},
5656
{
57-
"command": "lightningflowscanner.fixFlows",
58-
"title": "Fix Flows with Flow Scanner"
57+
"command": "flowscanner.fixFlows",
58+
"title": "Fix Flows"
5959
},
6060
{
61-
"command": "lightningflowscanner.calculateFlowTestCoverage",
62-
"title": "Calculate Flow Coverage with Flow Scanner"
61+
"command": "flowscanner.calculateFlowTestCoverage",
62+
"title": "Calculate Flow Coverage"
6363
},
6464
{
65-
"command": "lightningflowscanner.configRules",
66-
"title": "Configurate Flow Rules"
65+
"command": "flowscanner.configRules",
66+
"title": "Configure Flow Rules"
6767
}
6868
],
6969
"viewsContainers": {
@@ -103,8 +103,9 @@
103103
"package": "webpack --mode production --devtool hidden-source-map --config ./build/node-extension.webpack.config.js",
104104
"____MAIN____": "Developer Scripts",
105105
"build": "rollup -c",
106+
"build:vsx": "rollup -c && vsce package",
106107
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\"",
107-
"test": "vsce package && npm run build:wdio && npm run wdio"
108+
"test": "npm run build:wdio && npm run wdio"
108109
},
109110
"devDependencies": {
110111
"@rollup/plugin-commonjs": "^28.0.2",

src/commands/handlers.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ const { USE_NEW_CONFIG: isUseNewConfig } = process.env;
1616
export default class Commands {
1717
constructor(private context: vscode.ExtensionContext) { }
1818

19+
1920
get handlers() {
2021
const rawHandlers: Record<string, (...args: any[]) => any> = {
21-
'lightningflowscanner.openDocumentation': () => this.openDocumentation(),
22-
'lightningflowscanner.configRules': () => this.configRules(),
23-
'lightningflowscanner.debugView': () => this.debugView(),
24-
'lightningflowscanner.scanFlows': () => this.scanFlows(),
25-
'lightningflowscanner.fixFlows': () => this.fixFlows(),
26-
'lightningflowscanner.calculateFlowTestCoverage': () => this.calculateFlowTestCoverage(),
22+
'flowscanner.openDocumentation': () => this.openDocumentation(),
23+
'flowscanner.configRules': () => this.configRules(),
24+
'flowscanner.debugger': () => this.debugView(),
25+
'flowscanner.scanFlows': () => this.scanFlows(),
26+
'flowscanner.fixFlows': () => this.fixFlows(),
27+
'flowscanner.calculateFlowTestCoverage': () => this.calculateFlowTestCoverage(),
2728
};
2829

2930
return Object.entries(rawHandlers).map(([command, handler]) => {
@@ -140,7 +141,7 @@ private async configRules() {
140141
ruleConfig['FlowName'] = { severity: 'error', expression: naming };
141142
await vscode.workspace
142143
.getConfiguration()
143-
.update('lightningFlowScanner.NamingConvention', naming, true);
144+
.update('flowscanner.NamingConvention', naming, true);
144145
}
145146
}
146147

@@ -155,7 +156,7 @@ private async configRules() {
155156
ruleConfig['APIVersion'] = { severity: 'error', expression: apiVersion };
156157
await vscode.workspace
157158
.getConfiguration()
158-
.update('lightningFlowScanner.APIVersion', apiVersion, true);
159+
.update('flowscanner.APIVersion', apiVersion, true);
159160
}
160161
}
161162

@@ -235,7 +236,7 @@ private async configRules() {
235236
OutputChannel.getInstance().logChannel.trace('create panel');
236237
let configReset: vscode.WorkspaceConfiguration =
237238
vscode.workspace
238-
.getConfiguration('lightningFlowScanner')
239+
.getConfiguration('flowscanner')
239240
.get('Reset') ?? undefined;
240241
OutputChannel.getInstance().logChannel.trace(
241242
'load vscode stored configurations'

src/libs/SelectFlows.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class SelectFlows {
1111
public async execute(initialPath: vscode.Uri) {
1212
vscode.window.showInformationMessage(this.message);
1313
const specifyFiles: boolean = vscode.workspace
14-
.getConfiguration("lightningFlowScanner")
14+
.getConfiguration("flowscanner")
1515
.get("SpecifyFiles") as boolean;
1616

1717
let selectedFlows = await vscode.window.showOpenDialog({

src/providers/cache-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class CacheProvider {
1515
private context: ExtensionContext,
1616
defaultState?: DefaultState
1717
) {
18-
this.cacheName = 'lightningflowscanner';
18+
this.cacheName = 'flowscanner';
1919
this.cache =
2020
this.context.globalState.get(this.cacheName, defaultState) ?? {};
2121
}

src/providers/config-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class ConfigProvider {
2929
(await this.attemptToReadConfig(configPath, findInJson, JSON.parse)) ??
3030
(await this.attemptToReadConfig(configPath, findInYml, parse));
3131

32-
const vscodeConfig = vscode.workspace.getConfiguration('lightningFlowScanner');
32+
const vscodeConfig = vscode.workspace.getConfiguration('flowscanner');
3333

3434
if (!configFile) {
3535
// No file exists, create a new one with workspace settings applied

src/services/message-service.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ export default class MessageService {
2020
}
2121

2222
openDocumentation(query: any) {
23-
vscode.commands.executeCommand('lightningflowscanner.openDocumentation');
23+
vscode.commands.executeCommand('flowscanner.openDocumentation');
2424
}
2525

2626
scanFlows(query: any) {
27-
vscode.commands.executeCommand('lightningflowscanner.scanFlows');
27+
vscode.commands.executeCommand('flowscanner.scanFlows');
2828
}
2929

3030
fixFlows(query: any) {
31-
vscode.commands.executeCommand('lightningflowscanner.fixFlows');
31+
vscode.commands.executeCommand('flowscanner.fixFlows');
3232
}
3333

3434
runTests(query: any) {
3535
vscode.commands.executeCommand(
36-
'lightningflowscanner.calculateFlowTestCoverage'
36+
'flowscanner.calculateFlowTestCoverage'
3737
);
3838
}
3939

4040
configRules(query: any) {
41-
vscode.commands.executeCommand('lightningflowscanner.configRules');
41+
vscode.commands.executeCommand('flowscanner.configRules');
4242
}
4343

4444
// Todo implement Cache in Front end components

test/specs/test.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('LFS VSCE Side Bar Smoke Tests', () => {
4040
it('The Get Rules command results in opening the Flow Rules view', async () => {
4141
// Run the View Default Flow Rules via the Command Prompt
4242
const commandInput = await workbench.openCommandPrompt();
43-
await workbench.executeCommand('lightningflowscanner.viewDefaultFlowRules');
43+
await workbench.executeCommand('flowscanner.viewDefaultFlowRules');
4444
const editorView = workbench.getEditorView();
4545
const activeTab = await editorView.getActiveTab();
4646
const title = await activeTab?.getTitle();

0 commit comments

Comments
 (0)