Skip to content

Commit f7a9e1e

Browse files
committed
Fix start command. Closes #248
1 parent 6a55d37 commit f7a9e1e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
> **Note**: odd version numbers, for example, `0.13.0`, are not included in this changelog. They are used to test the new features and fixes before the final release.
99
10-
## [0.22.0] - 2025-05-01
10+
## [0.22.1] - 2025-05-02
1111

1212
### Added:
1313

@@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020

2121
- Snippets: Updated all snippets to use `v0.27.0` schema
2222

23+
### Fixed:
24+
25+
- Command: Using `dev-proxy-toolkit.start` would throw an error when active file is not a Dev Proxy config file
26+
2327
## [0.20.0] - 2025-04-01
2428

2529
### Added:

src/helpers.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ export const getStartPositionFromASTNode = (
4747
export const isConfigFile = (document: vscode.TextDocument) => {
4848
let isConfigFile = false;
4949

50+
const fileName = document.fileName.toLowerCase();
51+
if (!(fileName.endsWith('.json') || fileName.endsWith('.jsonc'))) {
52+
return false;
53+
}
54+
5055
const documentNode = parse(document.getText()) as parse.ObjectNode;
5156

5257
// we know that its a config file if

0 commit comments

Comments
 (0)