Skip to content

Commit c8a05fc

Browse files
authored
Add RewritePlugin. Closes #150 (#151)
1 parent df79bbf commit c8a05fc

File tree

6 files changed

+43
-2
lines changed

6 files changed

+43
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.13.0] - Unreleased
9+
10+
### Added:
11+
12+
- Snippets: `devproxy-plugin-rewrite` - RewritePlugin instance
13+
- Snippets: `devproxy-plugin-rewrite-config` - RewritePlugin config section
14+
815
## [0.12.0] - 2024-10-31
916

1017
> **Note**: `0.11.x` pre-releases are not included in this changelog. They were used to test the new features and fixes before the final release.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ Shown when the active document is a Dev Proxy configuration file
131131
| `devproxy-plugin-rate-limiting-file` | Dev Proxy rate limiting file |
132132
| `devproxy-plugin-rate-limiting-file-schema` | Dev Proxy rate limiting file schema |
133133
| `devproxy-plugin-retry-after` | RetryAfterPlugin instance |
134+
| `devproxy-plugin-rewrite` | RewritePlugin instance |
135+
| `devproxy-plugin-rewrite-config` | RewritePlugin config section |
134136
| `devproxy-reporter-json` | JsonReporter instance |
135137
| `devproxy-reporter-markdown` | MarkdownReporter instance |
136138
| `devproxy-reporter-plain-text` | PlainTextReporter instance |

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dev-proxy-toolkit",
33
"displayName": "Dev Proxy Toolkit",
44
"description": "Makes it easy to create and update Dev Proxy configuration files.",
5-
"version": "0.12.0",
5+
"version": "0.13.0",
66
"publisher": "garrytrinder",
77
"engines": {
88
"vscode": "^1.89.0"

src/constants.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ export const pluginSnippets: PluginSnippets = {
160160
RetryAfterPlugin: {
161161
instance: 'devproxy-plugin-retry-after',
162162
},
163+
RewritePlugin: {
164+
instance: 'devproxy-plugin-rewrite',
165+
config: {
166+
name: 'devproxy-plugin-rewrite-config',
167+
required: true,
168+
}
169+
},
163170
JsonReporter: {
164171
instance: 'devproxy-reporter-json',
165172
},
@@ -288,6 +295,10 @@ export const pluginDocs: PluginDocs = {
288295
name: 'Retry After Plugin',
289296
url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/retryafterplugin',
290297
},
298+
RewritePlugin: {
299+
name: 'Rewrite Plugin',
300+
url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/rewriteplugin',
301+
},
291302
JsonReporter: {
292303
name: 'JSON Reporter',
293304
url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/jsonreporter',

src/snippets.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,27 @@
848848
],
849849
"description": "RetryAfterPlugin instance"
850850
},
851+
"RewritePlugin": {
852+
"prefix": "devproxy-plugin-rewrite",
853+
"body": [
854+
"{",
855+
"\t\"name\": \"RewritePlugin\",",
856+
"\t\"enabled\": true,",
857+
"\t\"pluginPath\": \"~appFolder/plugins/dev-proxy-plugins.dll\",",
858+
"\t\"configSection\": \"rewritePlugin\"",
859+
"}"
860+
],
861+
"description": "RewritePlugin instance"
862+
},
863+
"RewritePluginConfig":{
864+
"prefix": "devproxy-plugin-rewrite-config",
865+
"body": [
866+
"\"rewritePlugin\": {",
867+
"\t\"rewritesFile\": \"rewrites.json\"",
868+
"}"
869+
],
870+
"description": "RewritePlugin config section"
871+
},
851872
"JsonReporter": {
852873
"prefix": "devproxy-reporter-json",
853874
"body": [

0 commit comments

Comments
 (0)