Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames to Dev Proxy #382

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @microsoft/m365-developer-proxy-write
* @microsoft/dev-proxy-write
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -38,13 +38,13 @@ body:
validations:
required: true
- type: input
id: m365proxyversion
id: devproxyversion
attributes:
label: Microsoft 365 Developer Proxy Version
label: Dev Proxy Version
description: |
Provide the version of the proxy you are using.

Execute `m365proxy --version` in your terminal to identify your version
Execute `devproxy --version` in your terminal to identify your version
validations:
required: true
- type: dropdown
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
updates:
- package-ecosystem: nuget
directory: "/m365-developer-proxy"
directory: "/dev-proxy"
schedule:
interval: daily
open-pull-requests-limit: 5
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@

# File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1.

name: m365-developer-proxy-branch-protection
description: Branch protection policy for the m365-developer-proxy repository
name: dev-proxy-branch-protection
description: Branch protection policy for the dev-proxy repository
resource: repository
configuration:
branchProtectionRules:
8 changes: 4 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -15,19 +15,19 @@ jobs:
- linux-x64
- osx-x64
env:
release: 'm365-developer-proxy-${{ matrix.architecture }}-${{ github.ref_name }}'
release: 'dev-proxy-${{ matrix.architecture }}-${{ github.ref_name }}'
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Publish ${{ matrix.architecture }}
run: dotnet publish ./m365-developer-proxy/m365-developer-proxy.csproj -c Release -p:PublishSingleFile=true -r ${{ matrix.architecture }} --self-contained -o ./${{ env.release }}
run: dotnet publish ./dev-proxy/dev-proxy.csproj -c Release -p:PublishSingleFile=true -r ${{ matrix.architecture }} --self-contained -o ./${{ env.release }}
- name: Build plugins
run: dotnet build ./m365-developer-proxy-plugins/m365-developer-proxy-plugins.csproj -c Release -r ${{ matrix.architecture }} --no-self-contained
run: dotnet build ./dev-proxy-plugins/dev-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 }}/plugins ./${{ env.release }} -r
run: cp ./dev-proxy/bin/Release/net7.0/${{ matrix.architecture }}/plugins ./${{ env.release }} -r
- name: Remove unnecessary files
run: |
pushd
6 changes: 3 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -23,12 +23,12 @@ jobs:
- name: Restore workloads
run: dotnet workload restore
- name: Restore dependencies
run: dotnet restore m365-developer-proxy.sln
run: dotnet restore dev-proxy.sln
- name: Build
run: dotnet build m365-developer-proxy.sln --no-restore
run: dotnet build dev-proxy.sln --no-restore
# We really should have tests, putting these steps here for when we have a build process
# - name: Test
# run: dotnet test m365-developer-proxy.sln --no-build --verbosity normal --collect:"XPlat Code Coverage"
# run: dotnet test dev-proxy.sln --no-build --verbosity normal --collect:"XPlat Code Coverage"
# - name: Install report generator
# run: dotnet tool install --global dotnet-reportgenerator-globaltool
# - name: Generate coverage report
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/m365-developer-proxy/bin/Debug/net7.0/m365proxy.dll",
"program": "${workspaceFolder}/dev-proxy/bin/Debug/net7.0/devproxy.dll",
"args": [],
"cwd": "${workspaceFolder}/m365-developer-proxy/bin/Debug/net7.0",
"cwd": "${workspaceFolder}/dev-proxy/bin/Debug/net7.0",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "integratedTerminal",
"stopAtEntry": false,
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/m365-developer-proxy.sln",
"${workspaceFolder}/dev-proxy.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
@@ -19,7 +19,7 @@
"type": "process",
"args": [
"publish",
"${workspaceFolder}/m365-developer-proxy.sln",
"${workspaceFolder}/dev-proxy.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
@@ -33,7 +33,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/m365-developer-proxy.sln"
"${workspaceFolder}/dev-proxy.sln"
],
"problemMatcher": "$msCompile"
}
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Contributing to the Microsoft 365 Developer Proxy
# Contributing to Dev Proxy

The best way to contribute initially is to download and try the Microsoft 365 Developer Proxy and then give us your feedback, both positive and negative, this will help us shape the future direction of this tool. At present we are not accepting community code contributions but will be opening up to accept pull requests in the future.
The best way to contribute initially is to download and try Dev Proxy and then give us your feedback, both positive and negative, this will help us shape the future direction of this tool. At present we are not accepting community code contributions but will be opening up to accept pull requests in the future.

## Our foundation

The Microsoft 365 Developer Proxy is built with .NET 6 and uses the [Titanium.Web.Proxy](https://github.com/justcoding121/titanium-web-proxy).
The Dev Proxy is built with .NET 6 and uses the [Titanium.Web.Proxy](https://github.com/justcoding121/titanium-web-proxy).

## Reporting issues and suggesting new features

Please use [GitHub Issues](https://github.com/microsoft/m365-developer-proxy/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) for bug reports and feature request.
Please use [GitHub Issues](https://github.com/microsoft/dev-proxy/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) for bug reports and feature request.

We highly recommend you browse existing issues first.

18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<h1 align="center">
<img alt="Microsoft 365 Developer Proxy" src="./samples/img/microsoft.png" height="78" />
<br>Microsoft 365 Developer Proxy<br>
<img alt="Dev Proxy" src="./samples/img/microsoft.png" height="78" />
<br>Dev Proxy<br>
</h1>

<h4 align="center">
Build reliable Microsoft 365 apps
</h4>

<p align="center">
<a href="https://github.com/microsoft/m365-developer-proxy/releases/latest">
<a href="https://github.com/microsoft/dev-proxy/releases/latest">
<img alt="Download Now" src="https://img.shields.io/badge/download-now-green?style=for-the-badge">
</a>
</p>
@@ -20,7 +20,7 @@

<p align="center">
<a href="#get-started">Get started</a> |
<a href="https://github.com/microsoft/m365-developer-proxy/wiki/">Documentation</a>
<a href="https://github.com/microsoft/dev-proxy/wiki/">Documentation</a>
</p>

<p align="center">
@@ -36,7 +36,7 @@
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-camera-video">
<path d="M16 3.75v8.5a.75.75 0 0 1-1.136.643L11 10.575v.675A1.75 1.75 0 0 1 9.25 13h-7.5A1.75 1.75 0 0 1 0 11.25v-6.5C0 3.784.784 3 1.75 3h7.5c.966 0 1.75.784 1.75 1.75v.675l3.864-2.318A.75.75 0 0 1 16 3.75Zm-6.5 1a.25.25 0 0 0-.25-.25h-7.5a.25.25 0 0 0-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-6.5ZM11 8.825l3.5 2.1v-5.85l-3.5 2.1Z"></path>
</svg>
<span aria-label="" class="m-1">📽️ Simulate throttling using Microsoft 365 Developer Proxy</span>
<span aria-label="" class="m-1">📽️ Simulate throttling using Dev Proxy</span>
<span class="dropdown-caret"></span>
</summary>

@@ -46,7 +46,7 @@
</details>
</p>

Microsoft 365 Developer Proxy is a command line tool for testing Microsoft Graph, SharePoint Online and any other HTTP APIs.
Dev Proxy is a command line tool for testing Microsoft Graph, SharePoint Online and any other HTTP APIs.

It aims to provide a better way to test applications.

@@ -60,14 +60,14 @@ Identify and fix issues in your code before they reach production.

## Get started

Begin with our [tutorial](https://github.com/microsoft/m365-developer-proxy/wiki/Get-started). It will guide you through the installation process and running the proxy for the first time.
Begin with our [tutorial](https://github.com/microsoft/dev-proxy/wiki/Get-started). It will guide you through the installation process and running the proxy for the first time.

## Example

Fail requests (with a 50% chance) and respond with `429 Too Many Requests` or `503 Service Unavailable`:

```
m365proxy --failure-rate 50 --no-mocks --allowed-errors 429 503
devproxy --failure-rate 50 --no-mocks --allowed-errors 429 503
```

## Features
@@ -105,7 +105,7 @@ This project may contain trademarks or logos for projects, products, or services

## Community Preview

We are working on getting the General Availability (GA) version published within the calendar year 2023. The current state of the Microsoft 365 Developer Proxy enables our team to be transparent and provide more insights on the upcoming features and to provide our worldwide ecosystem an option to directly influence the future of our capabilities. [Your feedback is more than welcome](https://github.com/microsoft/m365-developer-proxy/issues)! You can expect many more new features within the upcoming months before a version that is officially ready for production use and fully supported.
We are working on getting the General Availability (GA) version published within the calendar year 2023. The current state of Dev Proxy enables our team to be transparent and provide more insights on the upcoming features and to provide our worldwide ecosystem an option to directly influence the future of our capabilities. [Your feedback is more than welcome](https://github.com/microsoft/dev-proxy/issues)! You can expect many more new features within the upcoming months before a version that is officially ready for production use and fully supported.

## A Microsoft Hackathon 2022 Project

Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

using Microsoft.Extensions.Configuration;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public abstract class BaseProxyPlugin: IProxyPlugin {
protected ISet<UrlToWatch>? _urlsToWatch;
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
using Titanium.Web.Proxy;
using Titanium.Web.Proxy.EventArguments;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public static class FuncExtensions
{
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

using System.Text.Json.Serialization;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public class GraphBatchRequestPayload {
[JsonPropertyName("requests")]
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

using System.Text.Json.Serialization;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public class GraphBatchResponsePayload {
[JsonPropertyName("responses")]
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
using System.Runtime.Serialization;
using Titanium.Web.Proxy.EventArguments;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public enum MessageType {
Normal,
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

using System.Runtime.Serialization;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public enum LabelMode {
[EnumMember(Value = "text")]
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

using Microsoft.Extensions.Configuration;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public interface IProxyPlugin {
string Name { get; }
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
using Titanium.Web.Proxy.EventArguments;
using Titanium.Web.Proxy.Http;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public interface IProxyContext {
IProxyConfiguration Configuration { get; }
@@ -187,15 +187,15 @@
}

public async Task RaiseProxyBeforeRequest(ProxyRequestArgs args) {
await BeforeRequest?.InvokeAsync(this, args, null);

Check warning on line 190 in dev-proxy-abstractions/PluginEvents.cs

GitHub Actions / build

Dereference of a possibly null reference.

Check warning on line 190 in dev-proxy-abstractions/PluginEvents.cs

GitHub Actions / Analyze (csharp)

Dereference of a possibly null reference.
}

public async Task RaiseProxyBeforeResponse(ProxyResponseArgs args) {
await BeforeResponse?.InvokeAsync(this, args, null);

Check warning on line 194 in dev-proxy-abstractions/PluginEvents.cs

GitHub Actions / build

Dereference of a possibly null reference.

Check warning on line 194 in dev-proxy-abstractions/PluginEvents.cs

GitHub Actions / Analyze (csharp)

Dereference of a possibly null reference.
}

public async Task RaiseProxyAfterResponse(ProxyResponseArgs args) {
await AfterResponse?.Invoke(this, args);

Check warning on line 198 in dev-proxy-abstractions/PluginEvents.cs

GitHub Actions / build

Dereference of a possibly null reference.

Check warning on line 198 in dev-proxy-abstractions/PluginEvents.cs

GitHub Actions / Analyze (csharp)

Dereference of a possibly null reference.
}

public void RaiseRequestLogged(RequestLogArgs args) {
@@ -203,6 +203,6 @@
}

public async Task RaiseRecordingStopped(RecordingArgs args) {
await AfterRecordingStop?.Invoke(this, args);

Check warning on line 206 in dev-proxy-abstractions/PluginEvents.cs

GitHub Actions / build

Dereference of a possibly null reference.

Check warning on line 206 in dev-proxy-abstractions/PluginEvents.cs

GitHub Actions / Analyze (csharp)

Dereference of a possibly null reference.
}
}
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Models;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

class ParsedSample {
public string QueryVersion { get; set; } = string.Empty;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public class ResponseState {
/// <summary>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text.RegularExpressions;

namespace Microsoft365.DeveloperProxy.Abstractions;
namespace Microsoft.DevProxy.Abstractions;

public class UrlToWatch {
public bool Exclude { get; }
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>Microsoft365.DeveloperProxy.Abstractions</RootNamespace>
<RootNamespace>Microsoft.DevProxy.Abstractions</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.13.0</Version>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Microsoft365.DeveloperProxy.Abstractions;
using Microsoft365.DeveloperProxy.Plugins.MockResponses;
using Microsoft.DevProxy.Abstractions;
using Microsoft.DevProxy.Plugins.MockResponses;
using System.Text.Json;

namespace Microsoft365.DeveloperProxy.Plugins.Behavior;
namespace Microsoft.DevProxy.Plugins.Behavior;

internal class RateLimitingCustomResponseLoader : IDisposable
{
Original file line number Diff line number Diff line change
@@ -2,15 +2,15 @@
// Licensed under the MIT License.

using Microsoft.Extensions.Configuration;
using Microsoft365.DeveloperProxy.Abstractions;
using Microsoft365.DeveloperProxy.Plugins.MockResponses;
using Microsoft.DevProxy.Abstractions;
using Microsoft.DevProxy.Plugins.MockResponses;
using System.Net;
using System.Text.Json;
using System.Text.RegularExpressions;
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Models;

namespace Microsoft365.DeveloperProxy.Plugins.Behavior;
namespace Microsoft.DevProxy.Plugins.Behavior;

public enum RateLimitResponseWhenLimitExceeded
{
Original file line number Diff line number Diff line change
@@ -2,14 +2,14 @@
// Licensed under the MIT License.

using Microsoft.Extensions.Configuration;
using Microsoft365.DeveloperProxy.Abstractions;
using Microsoft.DevProxy.Abstractions;
using System.Net;
using System.Text.Json;
using System.Text.RegularExpressions;
using Titanium.Web.Proxy.Http;
using Titanium.Web.Proxy.Models;

namespace Microsoft365.DeveloperProxy.Plugins.Behavior;
namespace Microsoft.DevProxy.Plugins.Behavior;

public class RetryAfterPlugin : BaseProxyPlugin
{
@@ -25,7 +25,7 @@
pluginEvents.BeforeRequest += OnRequest;
}

private async Task OnRequest(object? sender, ProxyRequestArgs e)

Check warning on line 28 in dev-proxy-plugins/Behavior/RetryAfterPlugin.cs

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 28 in dev-proxy-plugins/Behavior/RetryAfterPlugin.cs

GitHub Actions / Analyze (csharp)

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
if (e.ResponseState.HasBeenSet ||
_urlsToWatch is null ||
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

using System.Text.Json.Serialization;

namespace Microsoft365.DeveloperProxy.Plugins;
namespace Microsoft.DevProxy.Plugins;

public class GenericErrorResponse {
[JsonPropertyName("statusCode")]
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

using System.Text.Json.Serialization;

namespace Microsoft365.DeveloperProxy.Plugins;
namespace Microsoft.DevProxy.Plugins;

public class GraphErrorResponseBody {
[JsonPropertyName("error")]
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

using Titanium.Web.Proxy.Http;

namespace Microsoft365.DeveloperProxy.Plugins;
namespace Microsoft.DevProxy.Plugins;

public class GraphUtils
{
Loading