From 7f3b08b953e1493e38bf8c72eadcd549d422f714 Mon Sep 17 00:00:00 2001 From: Garry Trinder Date: Wed, 29 May 2024 13:08:00 +0100 Subject: [PATCH] Add support for Reporters. Closes #89 --- CHANGELOG.md | 9 +++++++++ README.md | 3 +++ src/constants.ts | 21 +++++++++++++++++++++ src/snippets.json | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fce2833..bc4c325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.4.0] - 2024-05-30 +### Added: + +- Snippet: `devproxy-reporter-json` - JsonReporter instance +- Snippet: `devproxy-reporter-markdown` - MarkdownReporter instance +- Snippet: `devproxy-reporter-plain-text` - PlainTextReporter instance +- CodeLens: `JsonReporter` +- CodeLens: `MarkdownReporter` +- CodeLens: `PlainTextReporter` + ### Changed: - Notification: Support for installing Dev Proxy via package manager when not installed diff --git a/README.md b/README.md index 9d6b097..dad0b30 100644 --- a/README.md +++ b/README.md @@ -104,3 +104,6 @@ The following sections describe the features that the extension contributes to V | `devproxy-plugin-rate-limiting-file` | Dev Proxy rate limiting file | | `devproxy-plugin-rate-limiting-file-schema` | Dev Proxy rate limiting file schema | | `devproxy-plugin-retry-after` | RetryAfterPlugin instance | +| `devproxy-reporter-json` | JsonReporter instance | +| `devproxy-reporter-markdown` | MarkdownReporter instance | +| `devproxy-reporter-plain-text` | PlainTextReporter instance | diff --git a/src/constants.ts b/src/constants.ts index 889f238..e114909 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -136,6 +136,15 @@ export const pluginSnippets: PluginSnippets = { RetryAfterPlugin: { instance: 'devproxy-plugin-retry-after', }, + JsonReporter: { + instance: 'devproxy-reporter-json', + }, + MarkdownReporter: { + instance: 'devproxy-reporter-markdown' + }, + PlainTextReporter: { + instance: 'devproxy-reporter-plain-text' + }, }; export const pluginDocs: PluginDocs = { @@ -238,5 +247,17 @@ export const pluginDocs: PluginDocs = { RetryAfterPlugin: { name: 'Retry After Plugin', url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/retryafterplugin', + }, + JsonReporter: { + name: 'JSON Reporter', + url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/jsonreporter', + }, + MarkdownReporter: { + name: 'Markdown Reporter', + url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/markdownreporter', + }, + PlainTextReporter: { + name: 'Plain Text Reporter', + url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/plaintextreporter', } }; \ No newline at end of file diff --git a/src/snippets.json b/src/snippets.json index d87998e..dc0929b 100644 --- a/src/snippets.json +++ b/src/snippets.json @@ -676,5 +676,38 @@ "}" ], "description": "RetryAfterPlugin instance" + }, + "JsonReporter": { + "prefix": "devproxy-reporter-json", + "body": [ + "{", + "\t\"name\": \"JsonReporter\",", + "\t\"enabled\": true,", + "\t\"pluginPath\": \"~appFolder/plugins/dev-proxy-plugins.dll\"", + "}" + ], + "description": "JsonReporter instance" + }, + "MarkdownReporter": { + "prefix": "devproxy-reporter-markdown", + "body": [ + "{", + "\t\"name\": \"MarkdownReporter\",", + "\t\"enabled\": true,", + "\t\"pluginPath\": \"~appFolder/plugins/dev-proxy-plugins.dll\"", + "}" + ], + "description": "MarkdownReporter instance" + }, + "PlainTextReporter": { + "prefix": "devproxy-reporter-plain-text", + "body": [ + "{", + "\t\"name\": \"PlainTextReporter\",", + "\t\"enabled\": true,", + "\t\"pluginPath\": \"~appFolder/plugins/dev-proxy-plugins.dll\"", + "}" + ], + "description": "PlainTextReporter instance" } } \ No newline at end of file