Skip to content

Commit

Permalink
Renames plugins folder. Closes #314
Browse files Browse the repository at this point in the history
  • Loading branch information
waldekmastykarz authored and garrytrinder committed Aug 10, 2023
1 parent 94a4f2b commit e016550
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Build plugins
run: dotnet build ./m365-developer-proxy-plugins/m365-developer-proxy-plugins.csproj -c Release -r ${{ matrix.architecture }} --no-self-contained
- name: Add plugins to output
run: cp ./m365-developer-proxy/bin/Release/net7.0/${{ matrix.architecture }}/GraphProxyPlugins ./${{ env.release }} -r
run: cp ./m365-developer-proxy/bin/Release/net7.0/${{ matrix.architecture }}/plugins ./${{ env.release }} -r
- name: Remove unnecessary files
run: |
pushd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private async Task UpdateOpenAPIGraphFilesIfNecessary(string proxyFolder)
{
try
{
var file = new FileInfo(Path.Combine(proxyFolder, "GraphProxyPlugins", $"graph-{version.Replace(".", "_")}-openapi.yaml"));
var file = new FileInfo(Path.Combine(proxyFolder, "plugins", $"graph-{version.Replace(".", "_")}-openapi.yaml"));
if (file.LastWriteTime.Date == DateTime.Now.Date)
{
// file already updated today
Expand Down Expand Up @@ -70,7 +70,7 @@ private async void LoadOpenAPIFiles(string proxyFolder)
var versions = new[] { "v1.0", "beta" };
foreach (var version in versions)
{
var file = new FileInfo(Path.Combine(proxyFolder, "GraphProxyPlugins", $"graph-{version.Replace(".", "_")}-openapi.yaml"));
var file = new FileInfo(Path.Combine(proxyFolder, "plugins", $"graph-{version.Replace(".", "_")}-openapi.yaml"));
if (!file.Exists)
{
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
the build starts, which may miss files created during the build. -->
<MySourceFiles Include="$(OutDir)\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(MySourceFiles)" DestinationFiles="$(ProjectDir)..\m365-developer-proxy\$(OutDir)\GraphProxyPlugins\%(RecursiveDir)%(Filename)%(Extension)" />
<Copy SourceFiles="@(MySourceFiles)" DestinationFiles="$(ProjectDir)..\m365-developer-proxy\$(OutDir)\plugins\%(RecursiveDir)%(Filename)%(Extension)" />
</Target>

</Project>
26 changes: 13 additions & 13 deletions m365-developer-proxy/m365proxyrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
{
"name": "RetryAfterPlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll"
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll"
},
{
"name": "GraphSelectGuidancePlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"urlsToWatch": [
"https://graph.microsoft.com/v1.0/*",
"https://graph.microsoft.com/beta/*",
Expand All @@ -23,7 +23,7 @@
{
"name": "GraphBetaSupportGuidancePlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"urlsToWatch": [
"https://graph.microsoft.com/beta/*",
"https://graph.microsoft.us/beta/*",
Expand All @@ -34,7 +34,7 @@
{
"name": "GraphSdkGuidancePlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"urlsToWatch": [
"https://graph.microsoft.com/v1.0/*",
"https://graph.microsoft.com/beta/*",
Expand All @@ -49,12 +49,12 @@
{
"name": "ODataPagingGuidancePlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll"
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll"
},
{
"name": "GraphClientRequestIdGuidancePlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"urlsToWatch": [
"https://graph.microsoft.com/v1.0/*",
"https://graph.microsoft.com/beta/*",
Expand All @@ -69,43 +69,43 @@
{
"name": "CachingGuidancePlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"configSection": "cachingGuidance"
},
{
"name": "RateLimitingPlugin",
"enabled": false,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"configSection": "rateLimiting"
},
{
"name": "MockResponsePlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"configSection": "mocksPlugin"
},
{
"name": "GraphRandomErrorPlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"configSection": "graphRandomErrorsPlugin"
},
{
"name": "ExecutionSummaryPlugin",
"enabled": false,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"configSection": "executionSummaryPlugin"
},
{
"name": "MinimalPermissionsPlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"configSection": "minimalPermissionsPlugin"
},
{
"name": "MinimalPermissionsGuidancePlugin",
"enabled": false,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll"
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll"
}
],
"urlsToWatch": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "RateLimitingPlugin",
"enabled": true,
"pluginPath": "~appFolder\\GraphProxyPlugins\\m365-developer-proxy-plugins.dll"
"pluginPath": "~appFolder\\plugins\\m365-developer-proxy-plugins.dll"
}
],
"urlsToWatch": [
Expand Down
14 changes: 7 additions & 7 deletions m365-developer-proxy/presets/microsoft-graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
{
"name": "GraphSelectGuidancePlugin",
"enabled": true,
"pluginPath": "~appFolder\\GraphProxyPlugins\\m365-developer-proxy-plugins.dll"
"pluginPath": "~appFolder\\plugins\\m365-developer-proxy-plugins.dll"
},
{
"name": "GraphBetaSupportGuidancePlugin",
"enabled": true,
"pluginPath": "~appFolder\\GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "~appFolder\\plugins\\m365-developer-proxy-plugins.dll",
"urlsToWatch": [
"https://graph.microsoft.com/beta/*",
"https://graph.microsoft.us/beta/*",
Expand All @@ -19,28 +19,28 @@
{
"name": "GraphSdkGuidancePlugin",
"enabled": true,
"pluginPath": "~appFolder\\GraphProxyPlugins\\m365-developer-proxy-plugins.dll"
"pluginPath": "~appFolder\\plugins\\m365-developer-proxy-plugins.dll"
},
{
"name": "ODataPagingGuidancePlugin",
"enabled": true,
"pluginPath": "~appFolder\\GraphProxyPlugins\\m365-developer-proxy-plugins.dll"
"pluginPath": "~appFolder\\plugins\\m365-developer-proxy-plugins.dll"
},
{
"name": "GraphClientRequestIdGuidancePlugin",
"enabled": true,
"pluginPath": "~appFolder\\GraphProxyPlugins\\m365-developer-proxy-plugins.dll"
"pluginPath": "~appFolder\\plugins\\m365-developer-proxy-plugins.dll"
},
{
"name": "GraphRandomErrorPlugin",
"enabled": true,
"pluginPath": "~appFolder\\GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "~appFolder\\plugins\\m365-developer-proxy-plugins.dll",
"configSection": "graphRandomErrorsPlugin"
},
{
"name": "ExecutionSummaryPlugin",
"enabled": true,
"pluginPath": "~appFolder\\GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "~appFolder\\plugins\\m365-developer-proxy-plugins.dll",
"configSection": "executionSummaryPlugin"
}
],
Expand Down
2 changes: 1 addition & 1 deletion specs/metered-guidance-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ The plugin will have its own preset file. This configuration file is where meter
{
"name": "GraphMeteredGuidancePlugin",
"enabled": true,
"pluginPath": "GraphProxyPlugins\\m365-developer-proxy-plugins.dll",
"pluginPath": "plugins\\m365-developer-proxy-plugins.dll",
"configSection": "graphMeteredGuidancePlugin"
}
],
Expand Down

0 comments on commit e016550

Please sign in to comment.