diff --git a/.github/workflows/basket-api-deploy.yml b/.github/workflows/basket-api-deploy.yml new file mode 100644 index 000000000..3d51c6d24 --- /dev/null +++ b/.github/workflows/basket-api-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy basket-api + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["basket-api"] + branches: [dev] + types: [completed] + +env: + CHART: basket-api + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml index 9d2685382..b886d30b9 100644 --- a/.github/workflows/basket-api.yml +++ b/.github/workflows/basket-api.yml @@ -1,6 +1,7 @@ name: basket-api on: + workflow_dispatch: push: branches: - dev @@ -21,6 +22,7 @@ on: env: SERVICE: basket-api IMAGE: basket.api + DOTNET_VERSION: 5.0.x jobs: @@ -30,7 +32,23 @@ jobs: steps: - name: 'Checkout Github Action' uses: actions/checkout@master - + + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build and run unit tests + run: | + cd src + dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" + cd Services/Basket/Basket.API + dotnet build --no-restore + cd - + cd Services/Basket/Basket.UnitTests + dotnet build --no-restore + dotnet test --no-build -v=normal + - name: Compose build ${{ env.SERVICE }} run: sudo -E docker-compose build ${{ env.SERVICE }} working-directory: ./src @@ -46,6 +64,22 @@ jobs: - name: 'Checkout Github Action' uses: actions/checkout@master + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build and run unit tests + run: | + cd src + dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" + cd Services/Basket/Basket.API + dotnet build --no-restore + cd - + cd Services/Basket/Basket.UnitTests + dotnet build --no-restore + dotnet test --no-build -v=normal + - name: Enable experimental features for the Docker daemon and CLI run: | echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json diff --git a/.github/workflows/catalog-api-deploy.yml b/.github/workflows/catalog-api-deploy.yml new file mode 100644 index 000000000..7a5827b66 --- /dev/null +++ b/.github/workflows/catalog-api-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy catalog-api + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["catalog-api"] + branches: [dev] + types: [completed] + +env: + CHART: catalog-api + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/catalog-api.yml b/.github/workflows/catalog-api.yml index ca05a56ea..9170e7cc8 100644 --- a/.github/workflows/catalog-api.yml +++ b/.github/workflows/catalog-api.yml @@ -1,6 +1,7 @@ name: catalog-api on: + workflow_dispatch: push: branches: - dev @@ -21,6 +22,7 @@ on: env: SERVICE: catalog-api IMAGE: catalog.api + DOTNET_VERSION: 5.0.x jobs: @@ -30,6 +32,22 @@ jobs: steps: - name: 'Checkout Github Action' uses: actions/checkout@master + + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build and run unit tests + run: | + cd src + dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" + cd Services/Catalog/Catalog.API + dotnet build --no-restore + cd - + cd Services/Catalog/Catalog.UnitTests + dotnet build --no-restore + dotnet test --no-build -v=normal - name: Compose build ${{ env.SERVICE }} run: sudo -E docker-compose build ${{ env.SERVICE }} @@ -46,6 +64,22 @@ jobs: - name: 'Checkout Github Action' uses: actions/checkout@master + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build and run unit tests + run: | + cd src + dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" + cd Services/Catalog/Catalog.API + dotnet build --no-restore + cd - + cd Services/Catalog/Catalog.UnitTests + dotnet build --no-restore + dotnet test --no-build -v=normal + - name: Enable experimental features for the Docker daemon and CLI run: | echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json diff --git a/.github/workflows/identity-api-deploy.yml b/.github/workflows/identity-api-deploy.yml new file mode 100644 index 000000000..5b2626a3e --- /dev/null +++ b/.github/workflows/identity-api-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy identity-api + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["identity-api"] + branches: [dev] + types: [completed] + +env: + CHART: identity-api + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/mobileshoppingagg-deploy.yml b/.github/workflows/mobileshoppingagg-deploy.yml new file mode 100644 index 000000000..012d4957a --- /dev/null +++ b/.github/workflows/mobileshoppingagg-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy mobileshoppingagg + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["mobileshoppingagg"] + branches: [dev] + types: [completed] + +env: + CHART: mobileshoppingagg + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/ordering-api-deploy.yml b/.github/workflows/ordering-api-deploy.yml new file mode 100644 index 000000000..0ae9d28cb --- /dev/null +++ b/.github/workflows/ordering-api-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy ordering-api + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["ordering-api"] + branches: [dev] + types: [completed] + +env: + CHART: ordering-api + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/ordering-api.yml b/.github/workflows/ordering-api.yml index 5adec0760..10be98451 100644 --- a/.github/workflows/ordering-api.yml +++ b/.github/workflows/ordering-api.yml @@ -1,6 +1,7 @@ name: ordering-api on: + workflow_dispatch: push: branches: - dev @@ -21,6 +22,7 @@ on: env: SERVICE: ordering-api IMAGE: ordering.api + DOTNET_VERSION: 5.0.x jobs: @@ -30,6 +32,22 @@ jobs: steps: - name: 'Checkout Github Action' uses: actions/checkout@master + + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build and run unit tests + run: | + cd src + dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" + cd Services/Ordering/Ordering.API + dotnet build --no-restore + cd - + cd Services/Ordering/Ordering.UnitTests + dotnet build --no-restore + dotnet test --no-build -v=normal - name: Compose build ${{ env.SERVICE }} run: sudo -E docker-compose build ${{ env.SERVICE }} @@ -45,6 +63,22 @@ jobs: steps: - name: 'Checkout Github Action' uses: actions/checkout@master + + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build and run unit tests + run: | + cd src + dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" + cd Services/Ordering/Ordering.API + dotnet build --no-restore + cd - + cd Services/Ordering/Ordering.UnitTests + dotnet build --no-restore + dotnet test --no-build -v=normal - name: Enable experimental features for the Docker daemon and CLI run: | diff --git a/.github/workflows/ordering-backgroundtasks-deploy.yml b/.github/workflows/ordering-backgroundtasks-deploy.yml new file mode 100644 index 000000000..65eab8148 --- /dev/null +++ b/.github/workflows/ordering-backgroundtasks-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy ordering-backgroundtasks + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["ordering-backgroundtasks"] + branches: [dev] + types: [completed] + +env: + CHART: ordering-backgroundtasks + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/ordering-signalrhub-deploy.yml b/.github/workflows/ordering-signalrhub-deploy.yml new file mode 100644 index 000000000..d7842a30f --- /dev/null +++ b/.github/workflows/ordering-signalrhub-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy ordering-signalrhub + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["ordering-signalrhub"] + branches: [dev] + types: [completed] + +env: + CHART: ordering-signalrhub + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/payment-api-deploy.yml b/.github/workflows/payment-api-deploy.yml new file mode 100644 index 000000000..9592259b1 --- /dev/null +++ b/.github/workflows/payment-api-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy payment-api + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["payment-api"] + branches: [dev] + types: [completed] + +env: + CHART: payment-api + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webhooks-api-deploy.yml b/.github/workflows/webhooks-api-deploy.yml new file mode 100644 index 000000000..08955a3d4 --- /dev/null +++ b/.github/workflows/webhooks-api-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy webhooks-api + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["webhooks-api"] + branches: [dev] + types: [completed] + +env: + CHART: webhooks-api + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webmvc-deploy.yml b/.github/workflows/webmvc-deploy.yml new file mode 100644 index 000000000..3f1d9c4a1 --- /dev/null +++ b/.github/workflows/webmvc-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy webmvc + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["webmvc"] + branches: [dev] + types: [completed] + +env: + CHART: webmvc + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webshoppingagg-deploy.yml b/.github/workflows/webshoppingagg-deploy.yml new file mode 100644 index 000000000..7cff7ceac --- /dev/null +++ b/.github/workflows/webshoppingagg-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy webshoppingagg + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["webshoppingagg"] + branches: [dev] + types: [completed] + +env: + CHART: webshoppingagg + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webspa-deploy.yml b/.github/workflows/webspa-deploy.yml new file mode 100644 index 000000000..2700ee9cd --- /dev/null +++ b/.github/workflows/webspa-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy webspa + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["webspa"] + branches: [dev] + types: [completed] + +env: + CHART: webspa + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/.github/workflows/webstatus-deploy.yml b/.github/workflows/webstatus-deploy.yml new file mode 100644 index 000000000..dc5629ab9 --- /dev/null +++ b/.github/workflows/webstatus-deploy.yml @@ -0,0 +1,50 @@ +name: Deploy webstatus + +on: + workflow_dispatch: + repository_dispatch: + types: + - deploy + workflow_run: + workflows: ["webstatus"] + branches: [dev] + types: [completed] + +env: + CHART: webstatus + NAMESPACE: eshop + CHART_ROOT: deploy/k8s/helm + +jobs: + deploy-to-k8s: + #if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }} + if: false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: azure/aks-set-context@v1 + name: Set AKS context + with: + creds: '${{ secrets.AZURE_CREDENTIALS }}' + cluster-name: ${{ secrets.CLUSTER_NAME }} + resource-group: ${{ secrets.RESOURCE_GROUP }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Deploy Chart + run: | + ./deploy-chart.sh -c ${{ env.CHART }} --dns aks --aks-name ${{ secrets.CLUSTER_NAME }} --aks-rg ${{ secrets.RESOURCE_GROUP }} -r ${{ secrets.REGISTRY_HOST }} -t $TAG --namespace ${{ env.NAMESPACE }} --acr-connected + env: + TAG: ${{ env.BRANCH }} + working-directory: ${{ env.CHART_ROOT }} \ No newline at end of file diff --git a/deploy/k8s/helm/deploy-chart.sh b/deploy/k8s/helm/deploy-chart.sh new file mode 100755 index 000000000..4196d5cfe --- /dev/null +++ b/deploy/k8s/helm/deploy-chart.sh @@ -0,0 +1,199 @@ +#!/usr/bin/env bash + +# http://redsymbol.net/articles/unofficial-bash-strict-mode +set -euo pipefail + +usage() +{ + cat < + The name of the AKS cluster. Required when the registry (using the -r parameter) is set to "aks". + --aks-rg + The resource group for the AKS cluster. Required when the registry (using the -r parameter) is set to "aks". + -c | --chart + The name of the chart to upgrade (or install) + -d | --dns | --dns aks + Specifies the external DNS/ IP address of the Kubernetes cluster. + If 'aks' is set as value, the DNS value is retrieved from the AKS. --aks-name and --aks-rg are needed. + When --use-local-k8s is specified the external DNS is automatically set to localhost. + -h | --help + Displays this help text and exits the script. + -n | --app-name + Specifies the name of the application (default: eshop). + --namespace + Specifies the namespace name to deploy the app. If it doesn't exists it will be created (default: eshop). + -p | --docker-password + The Docker password used to logon to the custom registry, supplied using the -r parameter. + -r | --registry + Specifies the container registry to use (required), e.g. myregistry.azurecr.io. + --skip-clean + Do not clean the Kubernetes helm chart. Default is to clean the chart. + -t | --tag + The tag used for the newly created docker images. Default: latest. + -u | --docker-username + The Docker username used to logon to the custom registry, supplied using the -r parameter. + --use-local-k8s + Deploy to a locally installed Kubernetes (default: false). + +It is assumed that the Kubernetes cluster has been granted access to the container registry. +If using AKS and ACR see link for more info: +https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-aks + +WARNING! THE SCRIPT WILL COMPLETELY DESTROY ALL DEPLOYMENTS AND SERVICES VISIBLE +FROM THE CURRENT CONFIGURATION CONTEXT AND NAMESPACE. +It is recommended that you check your selected namespace, 'eshop' by default, is already in use. +Every deployment and service done in the namespace will be deleted. +For more information see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ + +END +} + +acr_connected='' +app_name='eshop' +aks_name='' +aks_rg='' +chart='' +clean='yes' +container_registry='' +docker_password='' +docker_username='' +dns='' +image_tag='latest' +skip_infrastructure='' +use_local_k8s='' +namespace='eshop' + +while [[ $# -gt 0 ]]; do + case "$1" in + --acr-connected ) + acr_connected='yes'; shift ;; + --aks-name ) + aks_name="$2"; shift 2;; + --aks-rg ) + aks_rg="$2"; shift 2;; + -c | --chart ) + chart="$2"; shift 2;; + -d | --dns ) + dns="$2"; shift 2;; + -h | --help ) + usage; exit 1 ;; + -n | --app-name ) + app_name="$2"; shift 2;; + -p | --docker-password ) + docker_password="$2"; shift 2;; + -r | --registry ) + container_registry="$2"; shift 2;; + --skip-clean ) + clean=''; shift ;; + --image-build ) + build_images='yes'; shift ;; + --image-push ) + push_images='yes'; shift ;; + --skip-infrastructure ) + skip_infrastructure='yes'; shift ;; + -t | --tag ) + image_tag="$2"; shift 2;; + -u | --docker-username ) + docker_username="$2"; shift 2;; + --use-local-k8s ) + use_local_k8s='yes'; shift ;; + --namespace ) + namespace="$2"; shift 2;; + *) + echo "Unknown option $1" + usage; exit 2 ;; + esac +done + +export TAG=$image_tag + +use_custom_registry='' + +if [[ -n $container_registry ]] && [[ -z $acr_connected ]]; then + echo "################ Log into custom registry $container_registry ##################" + use_custom_registry='yes' + if [[ -z $docker_username ]] || [[ -z $docker_password ]]; then + echo "Error: Must use -u (--docker-username) AND -p (--docker-password) if specifying custom registry" + exit 1 + fi + docker login -u $docker_username -p $docker_password $container_registry +fi + +ingress_values_file="ingress_values.yaml" + +if [[ $use_local_k8s ]]; then + ingress_values_file="ingress_values_dockerk8s.yaml" + dns="localhost" +fi + +if [[ $dns == "aks" ]]; then + echo "#################### Begin AKS discovery based on the --dns aks setting. ####################" + if [[ -z $aks_name ]] || [[ -z $aks_rg ]]; then + echo "Error: When using -dns aks, MUST set -aksName and -aksRg too." + echo '' + usage + exit 1 + fi + + echo "Getting AKS cluster $aks_name AKS (in resource group $aks_rg)" + # JMESPath queries are case sensitive and httpapplicationrouting can be lowercase sometimes + jmespath_dnsqueries=(\ + addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName \ + addonProfiles.httpapplicationrouting.config.HTTPApplicationRoutingZoneName \ + ) + for q in "${jmespath_dnsqueries[@]}" + do + dns="$(az aks show -n $aks_name -g $aks_rg --query $q -o tsv)" + if [[ -n $dns ]]; then break; fi + done + if [[ -z $dns ]]; then + echo "Error: when getting DNS of AKS $aks_name (in resource group $aks_rg). Please ensure AKS has httpRouting enabled AND Azure CLI is logged in and is of version 2.0.37 or higher." + exit 1 + fi + echo "DNS base found is $dns. Will use $aks_name.$dns for the app!" + dns="$aks_name.$dns" +fi + +# Initialization & check commands +if [[ -z $dns ]]; then + echo "No DNS specified. Ingress resources will be bound to public IP." +fi + +previous_install='' +if [[ -z $(helm ls -q --namespace $namespace | grep "$app_name-$chart") ]]; then + echo "No previous release found" +else + previous_install='yes' +fi + +if [[ $clean ]] && [[ $previous_install ]]; then + echo "Cleaning previous helm releases..." + helm uninstall "$app_name-$chart" --namespace $namespace + echo "Previous release deleted" + waitsecs=5; while [ $waitsecs -gt 0 ]; do echo -ne "$waitsecs\033[0K\r"; sleep 1; : $((waitsecs--)); done + previous_install='' +fi + +echo "#################### Begin $app_name $chart installation using Helm ####################" +if [[ $use_custom_registry ]] || [[ $acr_connected ]]; then + if [[ -z $acr_connected ]]; then + if [[ -z $previous_install ]]; then + helm upgrade --install "$app_name-$chart" --namespace $namespace --set "ingress.hosts={$dns}" --set inf.registry.server=$container_registry --set inf.registry.login=$docker_username --set inf.registry.pwd=$docker_password --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always $chart + else + helm upgrade --install "$app_name-$chart" --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always $chart + fi + elif [[ $chart != "eshop-common" ]]; then + # ACR is already connected, so we don't need username/password + if [[ -z $previous_install ]]; then + helm install "$app_name-$chart" --namespace $namespace --set "ingress.hosts={$dns}" --set inf.registry.server=$container_registry --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always $chart + else + # don't set the image repo since it's already set + helm upgrade "$app_name-$chart" --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always $chart + fi + fi +elif [[ $chart != "eshop-common" ]]; then # eshop-common is ignored when no secret must be deployed + helm upgrade --install "$app_name-$chart" --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always $chart +fi +echo "FINISHED: Helm chart installed." \ No newline at end of file diff --git a/src/ApiGateways/Envoy/config/mobileshopping/envoy.yaml b/src/ApiGateways/Envoy/config/mobileshopping/envoy.yaml index 1ae8c45a1..8f2162ad7 100644 --- a/src/ApiGateways/Envoy/config/mobileshopping/envoy.yaml +++ b/src/ApiGateways/Envoy/config/mobileshopping/envoy.yaml @@ -103,7 +103,7 @@ static_resources: lb_policy: round_robin hosts: - socket_address: - address: webshoppingagg + address: mobileshoppingagg port_value: 80 - name: catalog connect_timeout: 0.25s diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile index ee0370910..1bba584c2 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop index b2a61dc7d..c4988428d 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj index 4a982fc2d..a78977a76 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj @@ -24,7 +24,6 @@ - diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/OrderApiClient.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/OrderApiClient.cs index da39abbff..8c0b7c90e 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/OrderApiClient.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/OrderApiClient.cs @@ -2,9 +2,9 @@ using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Newtonsoft.Json; using System.Net.Http; using System.Threading.Tasks; +using System.Text.Json; namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services { @@ -24,14 +24,17 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services public async Task GetOrderDraftFromBasketAsync(BasketData basket) { var uri = _urls.Orders + UrlsConfig.OrdersOperations.GetOrderDraft(); - var content = new StringContent(JsonConvert.SerializeObject(basket), System.Text.Encoding.UTF8, "application/json"); + var content = new StringContent(JsonSerializer.Serialize(basket), System.Text.Encoding.UTF8, "application/json"); var response = await _apiClient.PostAsync(uri, content); response.EnsureSuccessStatusCode(); var ordersDraftResponse = await response.Content.ReadAsStringAsync(); - return JsonConvert.DeserializeObject(ordersDraftResponse); + return JsonSerializer.Deserialize(ordersDraftResponse, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); } } } diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs index 3e1ec3887..b8853aee7 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs @@ -107,7 +107,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator services.Configure(configuration.GetSection("urls")); services.AddControllers() - .AddNewtonsoftJson(); + .AddJsonOptions(options => options.JsonSerializerOptions.WriteIndented = true); services.AddSwaggerGen(options => { diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile index 5736c19f7..c7b1b87a6 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile.develop b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile.develop index 462afbcd9..5fbbdbffb 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile.develop +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderApiClient.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderApiClient.cs index a26028d69..fb7fa70e1 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderApiClient.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderApiClient.cs @@ -2,9 +2,9 @@ using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Newtonsoft.Json; using System.Net.Http; using System.Threading.Tasks; +using System.Text.Json; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services { @@ -24,14 +24,17 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services public async Task GetOrderDraftFromBasketAsync(BasketData basket) { var url = _urls.Orders + UrlsConfig.OrdersOperations.GetOrderDraft(); - var content = new StringContent(JsonConvert.SerializeObject(basket), System.Text.Encoding.UTF8, "application/json"); + var content = new StringContent(JsonSerializer.Serialize(basket), System.Text.Encoding.UTF8, "application/json"); var response = await _apiClient.PostAsync(url, content); response.EnsureSuccessStatusCode(); var ordersDraftResponse = await response.Content.ReadAsStringAsync(); - return JsonConvert.DeserializeObject(ordersDraftResponse); + return JsonSerializer.Deserialize(ordersDraftResponse, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); } } } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs index 99780f66f..96ba8d2eb 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs @@ -130,7 +130,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator services.Configure(configuration.GetSection("urls")); services.AddControllers() - .AddNewtonsoftJson(); + .AddJsonOptions(options => options.JsonSerializerOptions.WriteIndented = true); services.AddSwaggerGen(options => { diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj b/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj index 2bae6e150..830cdc7ab 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj @@ -25,7 +25,6 @@ - diff --git a/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj b/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj index a05d5157d..3ea8e4b20 100644 --- a/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj +++ b/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj @@ -1,13 +1,16 @@  - netstandard2.1 + net5.0 - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/BuildingBlocks/EventBus/EventBus.Tests/TestIntegrationEvent.cs b/src/BuildingBlocks/EventBus/EventBus.Tests/TestIntegrationEvent.cs index a77f3ef6f..4e85e7ae6 100644 --- a/src/BuildingBlocks/EventBus/EventBus.Tests/TestIntegrationEvent.cs +++ b/src/BuildingBlocks/EventBus/EventBus.Tests/TestIntegrationEvent.cs @@ -5,7 +5,7 @@ using System.Text; namespace EventBus.Tests { - public class TestIntegrationEvent : IntegrationEvent + public record TestIntegrationEvent : IntegrationEvent { } } diff --git a/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj b/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj index 8db6db3b5..a81e2b2c4 100644 --- a/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj +++ b/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj @@ -5,8 +5,7 @@ Microsoft.eShopOnContainers.BuildingBlocks.EventBus - - + \ No newline at end of file diff --git a/src/BuildingBlocks/EventBus/EventBus/Events/IntegrationEvent.cs b/src/BuildingBlocks/EventBus/EventBus/Events/IntegrationEvent.cs index 201dcf6b5..1f185a691 100644 --- a/src/BuildingBlocks/EventBus/EventBus/Events/IntegrationEvent.cs +++ b/src/BuildingBlocks/EventBus/EventBus/Events/IntegrationEvent.cs @@ -1,10 +1,10 @@ -using Newtonsoft.Json; -using System; +using System; +using System.Text.Json.Serialization; namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events { public record IntegrationEvent - { + { public IntegrationEvent() { Id = Guid.NewGuid(); @@ -18,10 +18,10 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events CreationDate = createDate; } - [JsonProperty] + [JsonInclude] public Guid Id { get; private init; } - [JsonProperty] + [JsonInclude] public DateTime CreationDate { get; private init; } } } diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs index 50bd97bc9..415da4283 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs @@ -4,8 +4,6 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using Polly; using Polly.Retry; using RabbitMQ.Client; @@ -15,6 +13,7 @@ using System; using System.Net.Sockets; using System.Text; using System.Threading.Tasks; +using System.Text.Json; namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ { @@ -89,9 +88,11 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ _logger.LogTrace("Declaring RabbitMQ exchange to publish event: {EventId}", @event.Id); channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct"); - - var message = JsonConvert.SerializeObject(@event); - var body = Encoding.UTF8.GetBytes(message); + + var body = JsonSerializer.SerializeToUtf8Bytes(@event, @event.GetType(), new JsonSerializerOptions + { + WriteIndented = true + }); policy.Execute(() => { @@ -272,8 +273,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ { var handler = scope.ResolveOptional(subscription.HandlerType) as IDynamicIntegrationEventHandler; if (handler == null) continue; - dynamic eventData = JObject.Parse(message); - + using dynamic eventData = JsonDocument.Parse(message); await Task.Yield(); await handler.Handle(eventData); } @@ -282,7 +282,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ var handler = scope.ResolveOptional(subscription.HandlerType); if (handler == null) continue; var eventType = _subsManager.GetEventTypeByName(eventName); - var integrationEvent = JsonConvert.DeserializeObject(message, eventType); + var integrationEvent = JsonSerializer.Deserialize(message, eventType, new JsonSerializerOptions() { PropertyNameCaseInsensitive= true}); var concreteType = typeof(IIntegrationEventHandler<>).MakeGenericType(eventType); await Task.Yield(); diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj index 6da6eda9d..f8dfc42e5 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj @@ -8,8 +8,7 @@ - - + diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs index 841c303f7..84229b238 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs @@ -5,11 +5,10 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; - using Microsoft.Extensions.Logging; - using Newtonsoft.Json; - using Newtonsoft.Json.Linq; + using Microsoft.Extensions.Logging; using System; using System.Text; + using System.Text.Json; using System.Threading.Tasks; public class EventBusServiceBus : IEventBus @@ -36,7 +35,7 @@ public void Publish(IntegrationEvent @event) { var eventName = @event.GetType().Name.Replace(INTEGRATION_EVENT_SUFFIX, ""); - var jsonMessage = JsonConvert.SerializeObject(@event); + var jsonMessage = JsonSerializer.Serialize(@event); var body = Encoding.UTF8.GetBytes(jsonMessage); var message = new Message @@ -165,7 +164,8 @@ { var handler = scope.ResolveOptional(subscription.HandlerType) as IDynamicIntegrationEventHandler; if (handler == null) continue; - dynamic eventData = JObject.Parse(message); + + using dynamic eventData = JsonDocument.Parse(message); await handler.Handle(eventData); } else @@ -173,7 +173,7 @@ var handler = scope.ResolveOptional(subscription.HandlerType); if (handler == null) continue; var eventType = _subsManager.GetEventTypeByName(eventName); - var integrationEvent = JsonConvert.DeserializeObject(message, eventType); + var integrationEvent = JsonSerializer.Deserialize(message, eventType); var concreteType = typeof(IIntegrationEventHandler<>).MakeGenericType(eventType); await (Task)concreteType.GetMethod("Handle").Invoke(handler, new object[] { integrationEvent }); } diff --git a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj index c9ed73500..b8e30e682 100644 --- a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj +++ b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj @@ -12,8 +12,7 @@ - - + diff --git a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEntry.cs b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEntry.cs index 977dd0547..b3109d214 100644 --- a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEntry.cs +++ b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEntry.cs @@ -1,6 +1,6 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using Newtonsoft.Json; using System; +using System.Text.Json; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; @@ -13,8 +13,11 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF { EventId = @event.Id; CreationTime = @event.CreationDate; - EventTypeName = @event.GetType().FullName; - Content = JsonConvert.SerializeObject(@event); + EventTypeName = @event.GetType().FullName; + Content = JsonSerializer.Serialize(@event, @event.GetType(), new JsonSerializerOptions + { + WriteIndented = true + }); State = EventStateEnum.NotPublished; TimesSent = 0; TransactionId = transactionId.ToString(); @@ -32,8 +35,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF public string TransactionId { get; private set; } public IntegrationEventLogEntry DeserializeJsonContent(Type type) - { - IntegrationEvent = JsonConvert.DeserializeObject(Content, type) as IntegrationEvent; + { + IntegrationEvent = JsonSerializer.Deserialize(Content, type, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true }) as IntegrationEvent; return this; } } diff --git a/src/Services/Basket/Basket.API/Basket.API.csproj b/src/Services/Basket/Basket.API/Basket.API.csproj index 741407c10..5fdc5259a 100644 --- a/src/Services/Basket/Basket.API/Basket.API.csproj +++ b/src/Services/Basket/Basket.API/Basket.API.csproj @@ -21,6 +21,8 @@ + + @@ -30,8 +32,6 @@ - - diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index de2718ad4..4650c19ea 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Services/Basket/Basket.API/Dockerfile.develop b/src/Services/Basket/Basket.API/Dockerfile.develop index 4ad633175..3e9aed06b 100644 --- a/src/Services/Basket/Basket.API/Dockerfile.develop +++ b/src/Services/Basket/Basket.API/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/Services/Basket/Basket.API/Infrastructure/Repositories/RedisBasketRepository.cs b/src/Services/Basket/Basket.API/Infrastructure/Repositories/RedisBasketRepository.cs index 93adcc023..6e724d7ca 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Repositories/RedisBasketRepository.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Repositories/RedisBasketRepository.cs @@ -1,10 +1,10 @@ using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using StackExchange.Redis; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using System.Text.Json; namespace Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories { @@ -43,12 +43,15 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Reposit return null; } - return JsonConvert.DeserializeObject(data); + return JsonSerializer.Deserialize(data, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); } public async Task UpdateBasketAsync(CustomerBasket basket) { - var created = await _database.StringSetAsync(basket.BuyerId, JsonConvert.SerializeObject(basket)); + var created = await _database.StringSetAsync(basket.BuyerId, JsonSerializer.Serialize(basket)); if (!created) { diff --git a/src/Services/Basket/Basket.API/Program.cs b/src/Services/Basket/Basket.API/Program.cs index 058735a07..79f796565 100644 --- a/src/Services/Basket/Basket.API/Program.cs +++ b/src/Services/Basket/Basket.API/Program.cs @@ -5,10 +5,12 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.eShopOnContainers.Services.Basket.API; using Microsoft.Extensions.Configuration; +using Azure.Identity; using Serilog; using System; using System.IO; using System.Net; +using Azure.Core; var configuration = GetConfiguration(); @@ -88,10 +90,11 @@ IConfiguration GetConfiguration() if (config.GetValue("UseVault", false)) { - builder.AddAzureKeyVault( - $"https://{config["Vault:Name"]}.vault.azure.net/", + TokenCredential credential = new ClientSecretCredential( + config["Vault:TenantId"], config["Vault:ClientId"], config["Vault:ClientSecret"]); + builder.AddAzureKeyVault(new Uri($"https://{config["Vault:Name"]}.vault.azure.net/"), credential); } return builder.Build(); @@ -109,4 +112,4 @@ public class Program public static string Namespace = typeof(Startup).Namespace; public static string AppName = Namespace.Substring(Namespace.LastIndexOf('.', Namespace.LastIndexOf('.') - 1) + 1); -} \ No newline at end of file +} diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index 2f53cbcb0..45adb5f66 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -62,7 +62,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API }) // Added for functional tests .AddApplicationPart(typeof(BasketController).Assembly) - .AddNewtonsoftJson(); + .AddJsonOptions(options => options.JsonSerializerOptions.WriteIndented = true); services.AddSwaggerGen(options => { diff --git a/src/Services/Basket/Basket.FunctionalTests/BasketScenarios.cs b/src/Services/Basket/Basket.FunctionalTests/BasketScenarios.cs index 6928d5cd2..9474ca461 100644 --- a/src/Services/Basket/Basket.FunctionalTests/BasketScenarios.cs +++ b/src/Services/Basket/Basket.FunctionalTests/BasketScenarios.cs @@ -1,9 +1,9 @@ using Basket.FunctionalTests.Base; using Microsoft.eShopOnContainers.Services.Basket.API.Model; -using Newtonsoft.Json; using System; using System.Net.Http; using System.Text; +using System.Text.Json; using System.Threading.Tasks; using Xunit; @@ -68,7 +68,7 @@ namespace Basket.FunctionalTests Quantity = 1 }); - return JsonConvert.SerializeObject(order); + return JsonSerializer.Serialize(order); } string BuildCheckout() @@ -89,7 +89,7 @@ namespace Basket.FunctionalTests RequestId = Guid.NewGuid() }; - return JsonConvert.SerializeObject(checkoutBasket); + return JsonSerializer.Serialize(checkoutBasket); } } } diff --git a/src/Services/Catalog/Catalog.API/Catalog.API.csproj b/src/Services/Catalog/Catalog.API/Catalog.API.csproj index 5ba3b6132..e49538fdb 100644 --- a/src/Services/Catalog/Catalog.API/Catalog.API.csproj +++ b/src/Services/Catalog/Catalog.API/Catalog.API.csproj @@ -48,6 +48,8 @@ + + @@ -55,8 +57,6 @@ - - diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index ec10cac79..e5d2de654 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -14,6 +14,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Services/Catalog/Catalog.API/Dockerfile.develop b/src/Services/Catalog/Catalog.API/Dockerfile.develop index 3df91b3df..12a4cdae4 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile.develop +++ b/src/Services/Catalog/Catalog.API/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/Services/Catalog/Catalog.API/Program.cs b/src/Services/Catalog/Catalog.API/Program.cs index 1507b1d8e..cb6c1e1a6 100644 --- a/src/Services/Catalog/Catalog.API/Program.cs +++ b/src/Services/Catalog/Catalog.API/Program.cs @@ -14,6 +14,8 @@ using Serilog; using System; using System.IO; using System.Net; +using Azure.Identity; +using Azure.Core; var configuration = GetConfiguration(); @@ -108,10 +110,11 @@ IConfiguration GetConfiguration() if (config.GetValue("UseVault", false)) { - builder.AddAzureKeyVault( - $"https://{config["Vault:Name"]}.vault.azure.net/", + TokenCredential credential = new ClientSecretCredential( + config["Vault:TenantId"], config["Vault:ClientId"], config["Vault:ClientSecret"]); + builder.AddAzureKeyVault(new Uri($"https://{config["Vault:Name"]}.vault.azure.net/"), credential); } return builder.Build(); diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 557183e38..4c17fb63f 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -140,7 +140,8 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API services.AddControllers(options => { options.Filters.Add(typeof(HttpGlobalExceptionFilter)); - }).AddNewtonsoftJson(); + }) + .AddJsonOptions(options => options.JsonSerializerOptions.WriteIndented = true); services.AddCors(options => { diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index 3608476bc..0d3f33ce7 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Services/Identity/Identity.API/Dockerfile.develop b/src/Services/Identity/Identity.API/Dockerfile.develop index 0d50b0388..11c5c6536 100644 --- a/src/Services/Identity/Identity.API/Dockerfile.develop +++ b/src/Services/Identity/Identity.API/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/Services/Identity/Identity.API/Identity.API.csproj b/src/Services/Identity/Identity.API/Identity.API.csproj index 7184410d2..55ad09a2d 100644 --- a/src/Services/Identity/Identity.API/Identity.API.csproj +++ b/src/Services/Identity/Identity.API/Identity.API.csproj @@ -19,6 +19,8 @@ + + @@ -38,7 +40,6 @@ - diff --git a/src/Services/Identity/Identity.API/Program.cs b/src/Services/Identity/Identity.API/Program.cs index 909680621..a6f7ec9ee 100644 --- a/src/Services/Identity/Identity.API/Program.cs +++ b/src/Services/Identity/Identity.API/Program.cs @@ -11,6 +11,8 @@ using Microsoft.Extensions.Options; using Serilog; using System; using System.IO; +using Azure.Identity; +using Azure.Core; string Namespace = typeof(Startup).Namespace; string AppName = Namespace.Substring(Namespace.LastIndexOf('.', Namespace.LastIndexOf('.') - 1) + 1); @@ -93,10 +95,11 @@ IConfiguration GetConfiguration() if (config.GetValue("UseVault", false)) { - builder.AddAzureKeyVault( - $"https://{config["Vault:Name"]}.vault.azure.net/", + TokenCredential credential = new ClientSecretCredential( + config["Vault:TenantId"], config["Vault:ClientId"], config["Vault:ClientSecret"]); + builder.AddAzureKeyVault(new Uri($"https://{config["Vault:Name"]}.vault.azure.net/"), credential); } return builder.Build(); diff --git a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderStartedIntegrationEvent.cs b/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderStartedIntegrationEvent.cs index 8f11e240f..2ff1460c7 100644 --- a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderStartedIntegrationEvent.cs +++ b/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderStartedIntegrationEvent.cs @@ -7,7 +7,7 @@ namespace Ordering.API.Application.IntegrationEvents.Events // An Integration Event is an event that can cause side effects to other microsrvices, Bounded-Contexts or external systems. public record OrderStartedIntegrationEvent : IntegrationEvent { - public string UserId { get; set; } + public string UserId { get; init; } public OrderStartedIntegrationEvent(string userId) => UserId = userId; diff --git a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs b/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs index 4cd74b16b..b5ecb1d6a 100644 --- a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs +++ b/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs @@ -5,15 +5,15 @@ using System; namespace Ordering.API.Application.IntegrationEvents.Events { public record UserCheckoutAcceptedIntegrationEvent : IntegrationEvent - { + { public string UserId { get; } - + public string UserName { get; } - + public string City { get; set; } - + public string Street { get; set; } - + public string State { get; set; } public string Country { get; set; } diff --git a/src/Services/Ordering/Ordering.API/Application/Models/CustomerBasket.cs b/src/Services/Ordering/Ordering.API/Application/Models/CustomerBasket.cs index e455f5d7d..251fa881c 100644 --- a/src/Services/Ordering/Ordering.API/Application/Models/CustomerBasket.cs +++ b/src/Services/Ordering/Ordering.API/Application/Models/CustomerBasket.cs @@ -7,10 +7,10 @@ namespace Ordering.API.Application.Models public string BuyerId { get; set; } public List Items { get; set; } - public CustomerBasket(string customerId) + public CustomerBasket(string buyerId, List items) { - BuyerId = customerId; - Items = new List(); + BuyerId = buyerId; + Items = items; } } } diff --git a/src/Services/Ordering/Ordering.API/Dockerfile b/src/Services/Ordering/Ordering.API/Dockerfile index 7659da4de..f1e2b7978 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile +++ b/src/Services/Ordering/Ordering.API/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Services/Ordering/Ordering.API/Dockerfile.develop b/src/Services/Ordering/Ordering.API/Dockerfile.develop index 5f7200c84..9bf101ad1 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile.develop +++ b/src/Services/Ordering/Ordering.API/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/Services/Ordering/Ordering.API/Ordering.API.csproj b/src/Services/Ordering/Ordering.API/Ordering.API.csproj index 46b07ca29..daa84fe0f 100644 --- a/src/Services/Ordering/Ordering.API/Ordering.API.csproj +++ b/src/Services/Ordering/Ordering.API/Ordering.API.csproj @@ -42,6 +42,8 @@ + + @@ -55,8 +57,6 @@ - - diff --git a/src/Services/Ordering/Ordering.API/Program.cs b/src/Services/Ordering/Ordering.API/Program.cs index 0a42cbba1..52eb1a38b 100644 --- a/src/Services/Ordering/Ordering.API/Program.cs +++ b/src/Services/Ordering/Ordering.API/Program.cs @@ -13,6 +13,8 @@ using Serilog; using System; using System.IO; using System.Net; +using Azure.Identity; +using Azure.Core; var configuration = GetConfiguration(); @@ -100,10 +102,11 @@ IConfiguration GetConfiguration() if (config.GetValue("UseVault", false)) { - builder.AddAzureKeyVault( - $"https://{config["Vault:Name"]}.vault.azure.net/", + TokenCredential credential = new ClientSecretCredential( + config["Vault:TenantId"], config["Vault:ClientId"], config["Vault:ClientSecret"]); + builder.AddAzureKeyVault(new Uri($"https://{config["Vault:Name"]}.vault.azure.net/"), credential); } return builder.Build(); diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index d55876203..5813a0578 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -172,9 +172,8 @@ }) // Added for functional tests .AddApplicationPart(typeof(OrdersController).Assembly) - .AddNewtonsoftJson() - .SetCompatibilityVersion(CompatibilityVersion.Version_3_0) - ; + .AddJsonOptions(options => options.JsonSerializerOptions.WriteIndented = true) + .SetCompatibilityVersion(CompatibilityVersion.Version_3_0); services.AddCors(options => { diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile index ea95935ab..c24f17ffd 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Services/Ordering/Ordering.Domain/AggregatesModel/BuyerAggregate/CardType.cs b/src/Services/Ordering/Ordering.Domain/AggregatesModel/BuyerAggregate/CardType.cs index 3053cb678..333aaec50 100644 --- a/src/Services/Ordering/Ordering.Domain/AggregatesModel/BuyerAggregate/CardType.cs +++ b/src/Services/Ordering/Ordering.Domain/AggregatesModel/BuyerAggregate/CardType.cs @@ -9,9 +9,9 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.B public class CardType : Enumeration { - public static CardType Amex = new CardType(1, "Amex"); - public static CardType Visa = new CardType(2, "Visa"); - public static CardType MasterCard = new CardType(3, "MasterCard"); + public static CardType Amex = new(1, nameof(Amex)); + public static CardType Visa = new(2, nameof(Visa)); + public static CardType MasterCard = new(3, nameof(MasterCard)); public CardType(int id, string name) : base(id, name) diff --git a/src/Services/Ordering/Ordering.Domain/SeedWork/Enumeration.cs b/src/Services/Ordering/Ordering.Domain/SeedWork/Enumeration.cs index d3e415df2..731dd8c86 100644 --- a/src/Services/Ordering/Ordering.Domain/SeedWork/Enumeration.cs +++ b/src/Services/Ordering/Ordering.Domain/SeedWork/Enumeration.cs @@ -11,27 +11,23 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork public int Id { get; private set; } - protected Enumeration(int id, string name) - { - Id = id; - Name = name; - } + protected Enumeration(int id, string name) => (Id, Name) = (id, name); public override string ToString() => Name; - - public static IEnumerable GetAll() where T : Enumeration - { - var fields = typeof(T).GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly); - - return fields.Select(f => f.GetValue(null)).Cast(); - } - + + public static IEnumerable GetAll() where T : Enumeration => + typeof(T).GetFields(BindingFlags.Public | + BindingFlags.Static | + BindingFlags.DeclaredOnly) + .Select(f => f.GetValue(null)) + .Cast(); + public override bool Equals(object obj) { - var otherValue = obj as Enumeration; - - if (otherValue == null) + if (obj is not Enumeration otherValue) + { return false; + } var typeMatches = GetType().Equals(obj.GetType()); var valueMatches = Id.Equals(otherValue.Id); diff --git a/src/Services/Ordering/Ordering.FunctionalTests/OrderingScenarios.cs b/src/Services/Ordering/Ordering.FunctionalTests/OrderingScenarios.cs index 9b46e1841..f6c96f28e 100644 --- a/src/Services/Ordering/Ordering.FunctionalTests/OrderingScenarios.cs +++ b/src/Services/Ordering/Ordering.FunctionalTests/OrderingScenarios.cs @@ -1,7 +1,7 @@ -using Newtonsoft.Json; -using System.Net; +using System.Net; using System.Net.Http; using System.Text; +using System.Text.Json; using System.Threading.Tasks; using WebMVC.Services.ModelDTOs; using Xunit; @@ -55,7 +55,7 @@ namespace Ordering.FunctionalTests { OrderNumber = "-1" }; - return JsonConvert.SerializeObject(order); + return JsonSerializer.Serialize(order); } } } diff --git a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile index bb80617ff..a32a7ee82 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile +++ b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile.develop b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile.develop index efe636e63..9acf557ac 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile.develop +++ b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/Services/Payment/Payment.API/Dockerfile b/src/Services/Payment/Payment.API/Dockerfile index d56f3d7c3..3cd9d95c1 100644 --- a/src/Services/Payment/Payment.API/Dockerfile +++ b/src/Services/Payment/Payment.API/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Services/Payment/Payment.API/Dockerfile.develop b/src/Services/Payment/Payment.API/Dockerfile.develop index bb6e353d2..3717c132e 100644 --- a/src/Services/Payment/Payment.API/Dockerfile.develop +++ b/src/Services/Payment/Payment.API/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/Services/Payment/Payment.API/Payment.API.csproj b/src/Services/Payment/Payment.API/Payment.API.csproj index e438f4e66..dbd64e9bf 100644 --- a/src/Services/Payment/Payment.API/Payment.API.csproj +++ b/src/Services/Payment/Payment.API/Payment.API.csproj @@ -14,11 +14,12 @@ + + - diff --git a/src/Services/Payment/Payment.API/Program.cs b/src/Services/Payment/Payment.API/Program.cs index 1e5dd1922..268099957 100644 --- a/src/Services/Payment/Payment.API/Program.cs +++ b/src/Services/Payment/Payment.API/Program.cs @@ -7,7 +7,8 @@ using Payment.API; using Serilog; using System; using System.IO; - +using Azure.Identity; +using Azure.Core; var configuration = GetConfiguration(); @@ -69,10 +70,11 @@ IConfiguration GetConfiguration() if (config.GetValue("UseVault", false)) { - builder.AddAzureKeyVault( - $"https://{config["Vault:Name"]}.vault.azure.net/", + TokenCredential credential = new ClientSecretCredential( + config["Vault:TenantId"], config["Vault:ClientId"], config["Vault:ClientSecret"]); + builder.AddAzureKeyVault(new Uri($"https://{config["Vault:Name"]}.vault.azure.net/"), credential); } return builder.Build(); diff --git a/src/Services/Webhooks/Webhooks.API/Dockerfile b/src/Services/Webhooks/Webhooks.API/Dockerfile index 263de13d6..0c8ca3457 100644 --- a/src/Services/Webhooks/Webhooks.API/Dockerfile +++ b/src/Services/Webhooks/Webhooks.API/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Services/Webhooks/Webhooks.API/Dockerfile.develop b/src/Services/Webhooks/Webhooks.API/Dockerfile.develop index eda18ae91..c1e4b880e 100644 --- a/src/Services/Webhooks/Webhooks.API/Dockerfile.develop +++ b/src/Services/Webhooks/Webhooks.API/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs b/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs index 40c2cf2f7..ad4455f99 100644 --- a/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs +++ b/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; -using System; +using System; +using System.Text.Json; namespace Webhooks.API.Model { @@ -15,9 +15,7 @@ namespace Webhooks.API.Model { When = DateTime.UtcNow; Type = hookType.ToString(); - Payload = JsonConvert.SerializeObject(data); + Payload = JsonSerializer.Serialize(data); } - - } } diff --git a/src/Services/Webhooks/Webhooks.API/Services/WebhooksSender.cs b/src/Services/Webhooks/Webhooks.API/Services/WebhooksSender.cs index 7ab7a0c67..9009cdcda 100644 --- a/src/Services/Webhooks/Webhooks.API/Services/WebhooksSender.cs +++ b/src/Services/Webhooks/Webhooks.API/Services/WebhooksSender.cs @@ -1,10 +1,10 @@ using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Text; +using System.Text.Json; using System.Threading.Tasks; using Webhooks.API.Model; @@ -23,7 +23,7 @@ namespace Webhooks.API.Services public async Task SendAll(IEnumerable receivers, WebhookData data) { var client = _httpClientFactory.CreateClient(); - var json = JsonConvert.SerializeObject(data); + var json = JsonSerializer.Serialize(data); var tasks = receivers.Select(r => OnSendData(r, json, client)); await Task.WhenAll(tasks.ToArray()); } diff --git a/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs b/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs index a8bdcd122..a8c281221 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs @@ -3,12 +3,12 @@ using FunctionalTests.Services.Catalog; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.eShopOnContainers.Services.Catalog.API.Model; using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Text; +using System.Text.Json; using System.Threading.Tasks; using Xunit; @@ -35,7 +35,7 @@ namespace FunctionalTests.Services var basket = ComposeBasket(userId, originalCatalogProducts.Data.Take(3)); var res = await basketClient.PostAsync( BasketScenariosBase.Post.CreateBasket, - new StringContent(JsonConvert.SerializeObject(basket), UTF8Encoding.UTF8, "application/json") + new StringContent(JsonSerializer.Serialize(basket), UTF8Encoding.UTF8, "application/json") ); // WHEN the price of one product is modified in the catalog @@ -74,7 +74,10 @@ namespace FunctionalTests.Services { //get the basket and verify that the price of the modified product is updated var basketGetResponse = await basketClient.GetAsync(BasketScenariosBase.Get.GetBasketByCustomer(userId)); - var basketUpdated = JsonConvert.DeserializeObject(await basketGetResponse.Content.ReadAsStringAsync()); + var basketUpdated = JsonSerializer.Deserialize(await basketGetResponse.Content.ReadAsStringAsync(), new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); itemUpdated = basketUpdated.Items.Single(pr => pr.ProductId == productId); @@ -96,14 +99,17 @@ namespace FunctionalTests.Services { var response = await catalogClient.GetAsync(CatalogScenariosBase.Get.Items); var items = await response.Content.ReadAsStringAsync(); - return JsonConvert.DeserializeObject>(items); + return JsonSerializer.Deserialize>(items, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); } private string ChangePrice(BasketItem itemToModify, decimal newPrice, PaginatedItemsViewModel catalogProducts) { var catalogProduct = catalogProducts.Data.Single(pr => pr.Id == itemToModify.ProductId); catalogProduct.Price = newPrice; - return JsonConvert.SerializeObject(catalogProduct); + return JsonSerializer.Serialize(catalogProduct); } private CustomerBasket ComposeBasket(string customerId, IEnumerable items) diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingScenarios.cs b/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingScenarios.cs index 3a6e1c04b..fe63a4613 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingScenarios.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingScenarios.cs @@ -2,8 +2,8 @@ using FunctionalTests.Services.Basket; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.eShopOnContainers.WebMVC.ViewModels; -using Newtonsoft.Json; using System; +using System.Text.Json; using System.Collections.Generic; using System.Linq; using System.Net.Http; @@ -53,7 +53,10 @@ namespace FunctionalTests.Services.Ordering async Task TryGetOrder(string orderNumber, HttpClient orderClient) { var ordersGetResponse = await orderClient.GetStringAsync(OrderingScenariosBase.Get.Orders); - var orders = JsonConvert.DeserializeObject>(ordersGetResponse); + var orders = JsonSerializer.Deserialize>(ordersGetResponse, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); return orders.Single(o => o.OrderNumber == orderNumber); } @@ -67,7 +70,10 @@ namespace FunctionalTests.Services.Ordering { //get the orders and verify that the new order has been created var ordersGetResponse = await orderClient.GetStringAsync(OrderingScenariosBase.Get.Orders); - var orders = JsonConvert.DeserializeObject>(ordersGetResponse); + var orders = JsonSerializer.Deserialize>(ordersGetResponse, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); if (orders == null || orders.Count == 0) { @@ -79,7 +85,11 @@ namespace FunctionalTests.Services.Ordering var lastOrder = orders.OrderByDescending(o => o.Date).First(); int.TryParse(lastOrder.OrderNumber, out int id); var orderDetails = await orderClient.GetStringAsync(OrderingScenariosBase.Get.OrderBy(id)); - order = JsonConvert.DeserializeObject(orderDetails); + order = JsonSerializer.Deserialize(orderDetails, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); + order.City = city; if (IsOrderCreated(order, city)) @@ -110,7 +120,7 @@ namespace FunctionalTests.Services.Ordering Quantity = 1 } }; - return JsonConvert.SerializeObject(order); + return JsonSerializer.Serialize(order); } string BuildCancelOrder(string orderId) @@ -119,7 +129,7 @@ namespace FunctionalTests.Services.Ordering { OrderNumber = orderId }; - return JsonConvert.SerializeObject(order); + return JsonSerializer.Serialize(order); } string BuildCheckout(string cityExpected) @@ -140,7 +150,7 @@ namespace FunctionalTests.Services.Ordering RequestId = Guid.NewGuid() }; - return JsonConvert.SerializeObject(checkoutBasket); + return JsonSerializer.Serialize(checkoutBasket); } } } diff --git a/src/Web/WebMVC/Controllers/TestController.cs b/src/Web/WebMVC/Controllers/TestController.cs index a80fe9ad8..6a90227c8 100644 --- a/src/Web/WebMVC/Controllers/TestController.cs +++ b/src/Web/WebMVC/Controllers/TestController.cs @@ -2,9 +2,9 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.WebMVC.Services; using Microsoft.eShopOnContainers.WebMVC.ViewModels; -using Newtonsoft.Json; using System.Net.Http; using System.Threading.Tasks; +using System.Text.Json; namespace WebMVC.Controllers { @@ -40,7 +40,7 @@ namespace WebMVC.Controllers BasketId = _appUserParser.Parse(User).Id }; - var content = new StringContent(JsonConvert.SerializeObject(payload), System.Text.Encoding.UTF8, "application/json"); + var content = new StringContent(JsonSerializer.Serialize(payload), System.Text.Encoding.UTF8, "application/json"); var response = await _client.CreateClient(nameof(IBasketService)) diff --git a/src/Web/WebMVC/Dockerfile b/src/Web/WebMVC/Dockerfile index bab4109b5..8fd0d1829 100644 --- a/src/Web/WebMVC/Dockerfile +++ b/src/Web/WebMVC/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Web/WebMVC/Dockerfile.develop b/src/Web/WebMVC/Dockerfile.develop index c22717a35..2a6115246 100644 --- a/src/Web/WebMVC/Dockerfile.develop +++ b/src/Web/WebMVC/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim +FROM mcr.microsoft.com/dotnet/sdk:5.0 ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/src/Web/WebMVC/Extensions/SessionExtensions.cs b/src/Web/WebMVC/Extensions/SessionExtensions.cs index 47b079158..29954bd8f 100644 --- a/src/Web/WebMVC/Extensions/SessionExtensions.cs +++ b/src/Web/WebMVC/Extensions/SessionExtensions.cs @@ -1,17 +1,20 @@ using Microsoft.AspNetCore.Http; -using Newtonsoft.Json; +using System.Text.Json; public static class SessionExtensions { public static void SetObject(this ISession session, string key, object value) => - session.SetString(key, JsonConvert.SerializeObject(value)); + session.SetString(key,JsonSerializer.Serialize(value)); public static T GetObject(this ISession session, string key) { var value = session.GetString(key); - return value == null ? default(T) : JsonConvert.DeserializeObject(value); + return value == null ? default(T) :JsonSerializer.Deserialize(value, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); } } diff --git a/src/Web/WebMVC/Services/BasketService.cs b/src/Web/WebMVC/Services/BasketService.cs index 26985a671..8a0be9e71 100644 --- a/src/Web/WebMVC/Services/BasketService.cs +++ b/src/Web/WebMVC/Services/BasketService.cs @@ -1,13 +1,13 @@ using Microsoft.eShopOnContainers.WebMVC.ViewModels; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Newtonsoft.Json; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using WebMVC.Infrastructure; using WebMVC.Services.ModelDTOs; +using System.Text.Json; namespace Microsoft.eShopOnContainers.WebMVC.Services { @@ -38,14 +38,17 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services var responseString = await response.Content.ReadAsStringAsync(); return string.IsNullOrEmpty(responseString) ? new Basket() { BuyerId = user.Id } : - JsonConvert.DeserializeObject(responseString); + JsonSerializer.Deserialize(responseString, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); } public async Task UpdateBasket(Basket basket) { var uri = API.Basket.UpdateBasket(_basketByPassUrl); - var basketContent = new StringContent(JsonConvert.SerializeObject(basket), System.Text.Encoding.UTF8, "application/json"); + var basketContent = new StringContent(JsonSerializer.Serialize(basket), System.Text.Encoding.UTF8, "application/json"); var response = await _apiClient.PostAsync(uri, basketContent); @@ -57,8 +60,8 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services public async Task Checkout(BasketDTO basket) { var uri = API.Basket.CheckoutBasket(_basketByPassUrl); - var basketContent = new StringContent(JsonConvert.SerializeObject(basket), System.Text.Encoding.UTF8, "application/json"); - + var basketContent = new StringContent(JsonSerializer.Serialize(basket), System.Text.Encoding.UTF8, "application/json"); + _logger.LogInformation("Uri chechout {uri}", uri); var response = await _apiClient.PostAsync(uri, basketContent); @@ -80,7 +83,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services }).ToArray() }; - var basketContent = new StringContent(JsonConvert.SerializeObject(basketUpdate), System.Text.Encoding.UTF8, "application/json"); + var basketContent = new StringContent(JsonSerializer.Serialize(basketUpdate), System.Text.Encoding.UTF8, "application/json"); var response = await _apiClient.PutAsync(uri, basketContent); @@ -88,7 +91,10 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services var jsonResponse = await response.Content.ReadAsStringAsync(); - return JsonConvert.DeserializeObject(jsonResponse); + return JsonSerializer.Deserialize(jsonResponse, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); } public async Task GetOrderDraft(string basketId) @@ -97,7 +103,10 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services var responseString = await _apiClient.GetStringAsync(uri); - var response = JsonConvert.DeserializeObject(responseString); + var response = JsonSerializer.Deserialize(responseString, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); return response; } @@ -113,7 +122,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services Quantity = 1 }; - var basketContent = new StringContent(JsonConvert.SerializeObject(newItem), System.Text.Encoding.UTF8, "application/json"); + var basketContent = new StringContent(JsonSerializer.Serialize(newItem), System.Text.Encoding.UTF8, "application/json"); var response = await _apiClient.PostAsync(uri, basketContent); } diff --git a/src/Web/WebMVC/Services/CatalogService.cs b/src/Web/WebMVC/Services/CatalogService.cs index 40d3644f4..e7806a738 100644 --- a/src/Web/WebMVC/Services/CatalogService.cs +++ b/src/Web/WebMVC/Services/CatalogService.cs @@ -2,12 +2,11 @@ using Microsoft.eShopOnContainers.WebMVC.ViewModels; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using System.Collections.Generic; using System.Net.Http; using System.Threading.Tasks; using WebMVC.Infrastructure; +using System.Text.Json; namespace Microsoft.eShopOnContainers.WebMVC.Services { @@ -34,7 +33,10 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services var responseString = await _httpClient.GetStringAsync(uri); - var catalog = JsonConvert.DeserializeObject(responseString); + var catalog = JsonSerializer.Deserialize(responseString, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); return catalog; } @@ -48,15 +50,15 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services var items = new List(); items.Add(new SelectListItem() { Value = null, Text = "All", Selected = true }); + + using var brands = JsonDocument.Parse(responseString); - var brands = JArray.Parse(responseString); - - foreach (var brand in brands.Children()) + foreach (JsonElement brand in brands.RootElement.EnumerateArray()) { items.Add(new SelectListItem() { - Value = brand.Value("id"), - Text = brand.Value("brand") + Value = brand.GetProperty("id").ToString(), + Text = brand.GetProperty("brand").ToString() }); } @@ -71,14 +73,15 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services var items = new List(); items.Add(new SelectListItem() { Value = null, Text = "All", Selected = true }); + + using var catalogTypes = JsonDocument.Parse(responseString); - var brands = JArray.Parse(responseString); - foreach (var brand in brands.Children()) + foreach (JsonElement catalogType in catalogTypes.RootElement.EnumerateArray()) { items.Add(new SelectListItem() { - Value = brand.Value("id"), - Text = brand.Value("type") + Value = catalogType.GetProperty("id").ToString(), + Text = catalogType.GetProperty("type").ToString() }); } diff --git a/src/Web/WebMVC/Services/OrderingService.cs b/src/Web/WebMVC/Services/OrderingService.cs index b5ad13386..8699e61f8 100644 --- a/src/Web/WebMVC/Services/OrderingService.cs +++ b/src/Web/WebMVC/Services/OrderingService.cs @@ -1,12 +1,12 @@ using Microsoft.eShopOnContainers.WebMVC.ViewModels; using Microsoft.Extensions.Options; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Net.Http; using System.Threading.Tasks; using WebMVC.Infrastructure; using WebMVC.Services.ModelDTOs; +using System.Text.Json; namespace Microsoft.eShopOnContainers.WebMVC.Services { @@ -31,7 +31,10 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services var responseString = await _httpClient.GetStringAsync(uri); - var response = JsonConvert.DeserializeObject(responseString); + var response = JsonSerializer.Deserialize(responseString, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); return response; } @@ -42,7 +45,10 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services var responseString = await _httpClient.GetStringAsync(uri); - var response = JsonConvert.DeserializeObject>(responseString); + var response = JsonSerializer.Deserialize>(responseString, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); return response; } @@ -57,7 +63,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services }; var uri = API.Order.CancelOrder(_remoteServiceBaseUrl); - var orderContent = new StringContent(JsonConvert.SerializeObject(order), System.Text.Encoding.UTF8, "application/json"); + var orderContent = new StringContent(JsonSerializer.Serialize(order), System.Text.Encoding.UTF8, "application/json"); var response = await _httpClient.PutAsync(uri, orderContent); @@ -77,7 +83,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services }; var uri = API.Order.ShipOrder(_remoteServiceBaseUrl); - var orderContent = new StringContent(JsonConvert.SerializeObject(order), System.Text.Encoding.UTF8, "application/json"); + var orderContent = new StringContent(JsonSerializer.Serialize(order), System.Text.Encoding.UTF8, "application/json"); var response = await _httpClient.PutAsync(uri, orderContent); diff --git a/src/Web/WebMVC/ViewModels/BasketItem.cs b/src/Web/WebMVC/ViewModels/BasketItem.cs index 115871f96..28d0752c6 100644 --- a/src/Web/WebMVC/ViewModels/BasketItem.cs +++ b/src/Web/WebMVC/ViewModels/BasketItem.cs @@ -3,7 +3,7 @@ public record BasketItem { public string Id { get; init; } - public string ProductId { get; init; } + public int ProductId { get; init; } public string ProductName { get; init; } public decimal UnitPrice { get; init; } public decimal OldUnitPrice { get; init; } diff --git a/src/Web/WebMVC/ViewModels/Converters/NumberToStringConverter.cs b/src/Web/WebMVC/ViewModels/Converters/NumberToStringConverter.cs new file mode 100644 index 000000000..cd5b8275a --- /dev/null +++ b/src/Web/WebMVC/ViewModels/Converters/NumberToStringConverter.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +namespace Microsoft.eShopOnContainers.WebMVC.ViewModels +{ + public class NumberToStringConverter : JsonConverter + { + public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Number) + { + var numberValue = reader.GetInt32(); + return numberValue.ToString(); + } + else if (reader.TokenType == JsonTokenType.String) + { + return reader.GetString(); + } + else + { + throw new JsonException(); + } + } + + public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options) + { + writer.WriteStringValue(value); + } + } +} diff --git a/src/Web/WebMVC/ViewModels/Order.cs b/src/Web/WebMVC/ViewModels/Order.cs index 4de37ca00..475f1cbe3 100644 --- a/src/Web/WebMVC/ViewModels/Order.cs +++ b/src/Web/WebMVC/ViewModels/Order.cs @@ -1,16 +1,17 @@ using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.eShopOnContainers.WebMVC.ViewModels.Annotations; -using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using System.Text.Json.Serialization; using WebMVC.Services.ModelDTOs; namespace Microsoft.eShopOnContainers.WebMVC.ViewModels { public class Order - { + { + [JsonConverter(typeof(NumberToStringConverter))] public string OrderNumber { get; set; } public DateTime Date { get; set; } @@ -53,11 +54,8 @@ namespace Microsoft.eShopOnContainers.WebMVC.ViewModels public List ActionCodeSelectList => GetActionCodesByCurrentState(); - - // See the property initializer syntax below. This - // initializes the compiler generated field for this - // auto-implemented property. - public List OrderItems { get; } = new List(); + + public List OrderItems { get; set; } [Required] public Guid RequestId { get; set; } diff --git a/src/Web/WebSPA/Client/modules/catalog/catalog.component.ts b/src/Web/WebSPA/Client/modules/catalog/catalog.component.ts index c4538b393..942f117d5 100644 --- a/src/Web/WebSPA/Client/modules/catalog/catalog.component.ts +++ b/src/Web/WebSPA/Client/modules/catalog/catalog.component.ts @@ -59,6 +59,7 @@ export class CatalogComponent implements OnInit { this.brandSelected = this.brandSelected && this.brandSelected.toString() != "null" ? this.brandSelected : null; this.typeSelected = this.typeSelected && this.typeSelected.toString() != "null" ? this.typeSelected : null; + this.paginationInfo.actualPage = 0; this.getCatalog(this.paginationInfo.itemsPage, this.paginationInfo.actualPage, this.brandSelected, this.typeSelected); } diff --git a/src/Web/WebSPA/Dockerfile b/src/Web/WebSPA/Dockerfile index 0dcac8433..86cd332fc 100644 --- a/src/Web/WebSPA/Dockerfile +++ b/src/Web/WebSPA/Dockerfile @@ -10,7 +10,7 @@ COPY Web/WebSPA/package-lock.json . COPY Web/WebSPA . RUN npm i npm@6.14.11 -g && npm update && npm install && npm run build:prod -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -21,6 +21,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Web/WebSPA/WebSPA.csproj b/src/Web/WebSPA/WebSPA.csproj index 7b9c9ee58..533b91db7 100644 --- a/src/Web/WebSPA/WebSPA.csproj +++ b/src/Web/WebSPA/WebSPA.csproj @@ -94,8 +94,7 @@ - - + diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index e0b8a607c..bc4b728e5 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -100,7 +100,7 @@ "parse5": "6.0.1", "parse5-htmlparser2-tree-adapter": "6.0.1", "pnp-webpack-plugin": "1.6.4", - "postcss": "7.0.32", + "postcss": "^8.2.10", "postcss-import": "12.0.1", "postcss-loader": "3.0.0", "raw-loader": "4.0.1", @@ -1319,7 +1319,7 @@ "anymatch": "~3.1.1", "braces": "~3.0.2", "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", @@ -1393,9 +1393,9 @@ "dev": true }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -3897,7 +3897,7 @@ "colorette": "^1.2.1", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.32", + "postcss": "^8.2.10", "postcss-value-parser": "^4.1.0" } }, @@ -4375,16 +4375,42 @@ } }, "browserslist": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.0.tgz", - "integrity": "sha512-/j6k8R0p3nxOC6kx5JGAxsnhc9ixaWJfYc+TNTzxg6+ARaESAvQGV7h0uNOB4t+pLQJZWzcrMxXOxjgsCj3dqQ==", + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001165", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.621", + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", "escalade": "^3.1.1", - "node-releases": "^1.1.67" + "node-releases": "^1.1.71" + }, + "dependencies": { + "caniuse-lite": { + "version": "1.0.30001228", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz", + "integrity": "sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A==", + "dev": true + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.736", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.736.tgz", + "integrity": "sha512-DY8dA7gR51MSo66DqitEQoUMQ0Z+A2DSXFi7tK304bdTVqczCAfUuyQw6Wdg8hIoo5zIxkU1L24RQtUce1Ioig==", + "dev": true + }, + "node-releases": { + "version": "1.1.72", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz", + "integrity": "sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==", + "dev": true + } } }, "browserstack": { @@ -4617,7 +4643,7 @@ "async-each": "^1.0.1", "braces": "^2.3.2", "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", + "glob-parent": "^5.1.2", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", "is-glob": "^4.0.0", @@ -5191,7 +5217,7 @@ "cacache": "^15.0.4", "fast-glob": "^3.2.4", "find-cache-dir": "^3.3.1", - "glob-parent": "^5.1.1", + "glob-parent": "^5.1.2", "globby": "^11.0.1", "loader-utils": "^2.0.0", "normalize-path": "^3.0.0", @@ -5208,9 +5234,9 @@ "dev": true }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -5442,7 +5468,7 @@ "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", "dev": true, "requires": { - "postcss": "^7.0.1", + "postcss": "^8.2.10", "timsort": "^0.3.0" } }, @@ -5456,7 +5482,7 @@ "cssesc": "^3.0.0", "icss-utils": "^4.1.1", "loader-utils": "^2.0.0", - "postcss": "^7.0.32", + "postcss": "^8.2.10", "postcss-modules-extract-imports": "^2.0.0", "postcss-modules-local-by-default": "^3.0.3", "postcss-modules-scope": "^2.2.0", @@ -5521,7 +5547,7 @@ "dev": true, "requires": { "boolbase": "^1.0.0", - "css-what": "^3.2.1", + "css-what": "^5.0.1", "domutils": "^1.7.0", "nth-check": "^1.0.2" } @@ -5561,9 +5587,9 @@ } }, "css-what": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", - "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", + "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", "dev": true }, "cssauron": { @@ -5590,7 +5616,7 @@ "cosmiconfig": "^5.0.0", "cssnano-preset-default": "^4.0.7", "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" + "postcss": "^8.2.10" } }, "cssnano-preset-default": { @@ -5601,7 +5627,7 @@ "requires": { "css-declaration-sorter": "^4.0.1", "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-calc": "^7.0.1", "postcss-colormin": "^4.0.3", "postcss-convert-values": "^4.0.1", @@ -5649,7 +5675,7 @@ "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", "dev": true, "requires": { - "postcss": "^7.0.0" + "postcss": "^8.2.10" } }, "cssnano-util-same-parent": { @@ -5970,9 +5996,9 @@ "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" }, "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.2.2.tgz", + "integrity": "sha512-sQN+vLwC3PvOXiCH/oHcdzML2opFeIdVh8gjjMZrM45n4dR80QF6o3AzInQy6F9Eoc0VJYog4JpQTilt4RFLYQ==", "requires": { "ip": "^1.1.0", "safe-buffer": "^5.0.1" @@ -6093,12 +6119,6 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, - "electron-to-chromium": { - "version": "1.3.627", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.627.tgz", - "integrity": "sha512-O5IVRS4sCxP2+vECAp7uHkaI8V+dKYpuCyBcLn+hqVAOy/RONd8zx+6eH7TuWSTBYs/oUrzBXkNMZuVsQd58kQ==", - "dev": true - }, "elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", @@ -6400,7 +6420,7 @@ "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", + "glob-parent": "^5.1.2", "globals": "^12.1.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", @@ -6486,9 +6506,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -6977,7 +6997,7 @@ "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", + "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.2", "picomatch": "^2.2.1" @@ -7002,9 +7022,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -7474,9 +7494,9 @@ } }, "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^3.1.0", "path-dirname": "^1.0.0" @@ -7584,9 +7604,9 @@ "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==" }, "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "requires": { "minimist": "^1.2.5", "neo-async": "^2.6.0", @@ -7760,9 +7780,9 @@ } }, "hosted-git-info": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz", - "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -7794,8 +7814,7 @@ "html-comment-regex": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", - "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", - "dev": true + "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==" }, "html-entities": { "version": "1.3.3", @@ -7928,7 +7947,7 @@ "integrity": "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==", "dev": true, "requires": { - "postcss": "^7.0.14" + "postcss": "^8.2.10" } }, "ieee754": { @@ -8474,12 +8493,11 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-svg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", - "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", - "dev": true, + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.2.2.tgz", + "integrity": "sha512-JlA7Mc7mfWjdxxTkJ094oUK9amGD7gQaj5xA/NCY0vlVvZ1stmj4VX+bRuwOMN93IHRZ2ctpPH/0FO6DqvQ5Rw==", "requires": { - "html-comment-regex": "^1.1.0" + "html-comment-regex": "^1.1.2" } }, "is-symbol": { @@ -8806,7 +8824,7 @@ "socket.io": "^2.3.0", "source-map": "^0.6.1", "tmp": "0.2.1", - "ua-parser-js": "0.7.21", + "ua-parser-js": "^0.7.24", "yargs": "^15.3.1" }, "dependencies": { @@ -8850,7 +8868,7 @@ "anymatch": "~3.1.1", "braces": "~3.0.2", "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", @@ -8913,9 +8931,9 @@ "dev": true }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -9314,9 +9332,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.capitalize": { "version": "4.2.1", @@ -9599,9 +9617,9 @@ } }, "merge": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", - "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz", + "integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==", "dev": true }, "merge-descriptors": { @@ -9758,7 +9776,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "dev": true, "requires": { "yallist": "^4.0.0" } @@ -9869,7 +9886,7 @@ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", "requires": { - "dns-packet": "^1.3.1", + "dns-packet": "^5.2.2", "thunky": "^1.0.2" } }, @@ -10011,12 +10028,6 @@ } } }, - "node-releases": { - "version": "1.1.67", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", - "integrity": "sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg==", - "dev": true - }, "nodemon": { "version": "1.19.4", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.4.tgz", @@ -10073,16 +10084,16 @@ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", + "hosted-git-info": "^3.0.8", "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" }, "dependencies": { "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", "dev": true }, "semver": { @@ -10145,7 +10156,7 @@ "integrity": "sha512-/h5Fm6a/exByzFSTm7jAyHbgOqErl9qSNJDQF32Si/ZzgwT2TERVxRxn3Jurw1wflgyVVAxnFR4fRHPM7y1ClQ==", "dev": true, "requires": { - "hosted-git-info": "^3.0.2", + "hosted-git-info": "^3.0.8", "semver": "^7.0.0", "validate-npm-package-name": "^3.0.0" } @@ -10188,9 +10199,9 @@ }, "dependencies": { "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", "dev": true }, "lru-cache": { @@ -10208,7 +10219,7 @@ "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", "dev": true, "requires": { - "hosted-git-info": "^2.7.1", + "hosted-git-info": "^3.0.8", "osenv": "^0.1.5", "semver": "^5.6.0", "validate-npm-package-name": "^3.0.0" @@ -10729,9 +10740,9 @@ } }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", "dev": true }, "lru-cache": { @@ -10768,7 +10779,7 @@ "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", "dev": true, "requires": { - "hosted-git-info": "^2.7.1", + "hosted-git-info": "^3.0.8", "osenv": "^0.1.5", "semver": "^5.6.0", "validate-npm-package-name": "^3.0.0" @@ -11038,9 +11049,9 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "7.0.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", - "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", + "version": "8.2.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.10.tgz", + "integrity": "sha512-b/h7CPV7QEdrqIxtAf2j31U5ef05uBDuvoXv6L51Q4rcS1jdlXAVKJv+atCFdUXYl9dyTHGyoMzIepwowRJjFw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -11123,7 +11134,7 @@ "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", "dev": true, "requires": { - "postcss": "^7.0.27", + "postcss": "^8.2.10", "postcss-selector-parser": "^6.0.2", "postcss-value-parser": "^4.0.2" } @@ -11137,7 +11148,7 @@ "browserslist": "^4.0.0", "color": "^3.0.0", "has": "^1.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11155,7 +11166,7 @@ "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", "dev": true, "requires": { - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11173,7 +11184,7 @@ "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", "dev": true, "requires": { - "postcss": "^7.0.0" + "postcss": "^8.2.10" } }, "postcss-discard-duplicates": { @@ -11182,7 +11193,7 @@ "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", "dev": true, "requires": { - "postcss": "^7.0.0" + "postcss": "^8.2.10" } }, "postcss-discard-empty": { @@ -11191,7 +11202,7 @@ "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", "dev": true, "requires": { - "postcss": "^7.0.0" + "postcss": "^8.2.10" } }, "postcss-discard-overridden": { @@ -11200,7 +11211,7 @@ "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", "dev": true, "requires": { - "postcss": "^7.0.0" + "postcss": "^8.2.10" } }, "postcss-import": { @@ -11209,7 +11220,7 @@ "integrity": "sha512-3Gti33dmCjyKBgimqGxL3vcV8w9+bsHwO5UrBawp796+jdardbcFl4RP5w/76BwNL7aGzpKstIfF9I+kdE8pTw==", "dev": true, "requires": { - "postcss": "^7.0.1", + "postcss": "^8.2.10", "postcss-value-parser": "^3.2.3", "read-cache": "^1.0.0", "resolve": "^1.1.7" @@ -11240,7 +11251,7 @@ "dev": true, "requires": { "loader-utils": "^1.1.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-load-config": "^2.0.0", "schema-utils": "^1.0.0" } @@ -11252,7 +11263,7 @@ "dev": true, "requires": { "css-color-names": "0.0.4", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0", "stylehacks": "^4.0.0" }, @@ -11274,7 +11285,7 @@ "browserslist": "^4.0.0", "caniuse-api": "^3.0.0", "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-selector-parser": "^3.0.0", "vendors": "^1.0.0" }, @@ -11298,7 +11309,7 @@ "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", "dev": true, "requires": { - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11318,7 +11329,7 @@ "requires": { "cssnano-util-get-arguments": "^4.0.0", "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11339,7 +11350,7 @@ "alphanum-sort": "^1.0.0", "browserslist": "^4.0.0", "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0", "uniqs": "^2.0.0" }, @@ -11360,7 +11371,7 @@ "requires": { "alphanum-sort": "^1.0.0", "has": "^1.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-selector-parser": "^3.0.0" }, "dependencies": { @@ -11383,7 +11394,7 @@ "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", "dev": true, "requires": { - "postcss": "^7.0.5" + "postcss": "^8.2.10" } }, "postcss-modules-local-by-default": { @@ -11393,7 +11404,7 @@ "dev": true, "requires": { "icss-utils": "^4.1.1", - "postcss": "^7.0.32", + "postcss": "^8.2.10", "postcss-selector-parser": "^6.0.2", "postcss-value-parser": "^4.1.0" } @@ -11404,7 +11415,7 @@ "integrity": "sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==", "dev": true, "requires": { - "postcss": "^7.0.6", + "postcss": "^8.2.10", "postcss-selector-parser": "^6.0.0" } }, @@ -11415,7 +11426,7 @@ "dev": true, "requires": { "icss-utils": "^4.0.0", - "postcss": "^7.0.6" + "postcss": "^8.2.10" } }, "postcss-normalize-charset": { @@ -11424,7 +11435,7 @@ "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", "dev": true, "requires": { - "postcss": "^7.0.0" + "postcss": "^8.2.10" } }, "postcss-normalize-display-values": { @@ -11434,7 +11445,7 @@ "dev": true, "requires": { "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11454,7 +11465,7 @@ "requires": { "cssnano-util-get-arguments": "^4.0.0", "has": "^1.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11474,7 +11485,7 @@ "requires": { "cssnano-util-get-arguments": "^4.0.0", "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11493,7 +11504,7 @@ "dev": true, "requires": { "has": "^1.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11512,7 +11523,7 @@ "dev": true, "requires": { "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11531,7 +11542,7 @@ "dev": true, "requires": { "browserslist": "^4.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11551,7 +11562,7 @@ "requires": { "is-absolute-url": "^2.0.0", "normalize-url": "^3.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11569,7 +11580,7 @@ "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", "dev": true, "requires": { - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11588,7 +11599,7 @@ "dev": true, "requires": { "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11609,7 +11620,7 @@ "browserslist": "^4.0.0", "caniuse-api": "^3.0.0", "has": "^1.0.0", - "postcss": "^7.0.0" + "postcss": "^8.2.10" } }, "postcss-reduce-transforms": { @@ -11620,7 +11631,7 @@ "requires": { "cssnano-util-get-match": "^4.0.0", "has": "^1.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0" }, "dependencies": { @@ -11651,11 +11662,20 @@ "dev": true, "requires": { "is-svg": "^3.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-value-parser": "^3.0.0", "svgo": "^1.0.0" }, "dependencies": { + "is-svg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", + "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.0" + } + }, "postcss-value-parser": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", @@ -11671,7 +11691,7 @@ "dev": true, "requires": { "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "uniqs": "^2.0.0" } }, @@ -12702,7 +12722,7 @@ "convert-source-map": "1.7.0", "es6-iterator": "2.0.3", "loader-utils": "1.2.3", - "postcss": "7.0.21", + "postcss": "^8.2.10", "rework": "1.0.1", "rework-visit": "1.0.0", "source-map": "0.6.1" @@ -12784,9 +12804,9 @@ } }, "postcss": { - "version": "7.0.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz", - "integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==", + "version": "8.2.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.10.tgz", + "integrity": "sha512-b/h7CPV7QEdrqIxtAf2j31U5ef05uBDuvoXv6L51Q4rcS1jdlXAVKJv+atCFdUXYl9dyTHGyoMzIepwowRJjFw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -13516,6 +13536,12 @@ "graceful-fs": "^4.1.6" } }, + "merge": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", + "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", + "dev": true + }, "onetime": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", @@ -14261,7 +14287,7 @@ "parseqs": "0.0.6", "parseuri": "0.0.6", "ws": "~7.4.2", - "xmlhttprequest-ssl": "~1.5.4", + "xmlhttprequest-ssl": "^1.6.2", "yeast": "0.1.2" }, "dependencies": { @@ -14354,9 +14380,9 @@ } }, "ws": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz", - "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "dev": true } } @@ -14408,18 +14434,29 @@ } }, "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.20.tgz", + "integrity": "sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA==", "requires": { "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" + "uuid": "^3.4.0", + "websocket-driver": "0.6.5" + }, + "dependencies": { + "websocket-driver": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", + "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", + "requires": { + "websocket-extensions": ">=0.1.1" + } + } } }, "sockjs-client": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz", - "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", + "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", "requires": { "debug": "^3.2.5", "eventsource": "^1.0.7", @@ -14429,6 +14466,14 @@ "url-parse": "^1.4.3" }, "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, "faye-websocket": { "version": "0.11.3", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", @@ -14436,6 +14481,11 @@ "requires": { "websocket-driver": ">=0.5.1" } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" } } }, @@ -14771,10 +14821,9 @@ } }, "ssri": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", - "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", - "dev": true, + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "requires": { "minipass": "^3.1.1" } @@ -15040,7 +15089,7 @@ "dev": true, "requires": { "browserslist": "^4.0.0", - "postcss": "^7.0.0", + "postcss": "^8.2.10", "postcss-selector-parser": "^3.0.0" }, "dependencies": { @@ -15783,15 +15832,15 @@ "dev": true }, "ua-parser-js": { - "version": "0.7.21", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", - "integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==", + "version": "0.7.24", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.24.tgz", + "integrity": "sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw==", "dev": true }, "uglify-js": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.1.tgz", - "integrity": "sha512-o8lHP20KjIiQe5b/67Rh68xEGRrc2SRsCuuoYclXXoC74AfSRGblU1HKzJWH3HxPZ+Ort85fWHpSX7KwBUC9CQ==", + "version": "3.13.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.5.tgz", + "integrity": "sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw==", "optional": true }, "undefsafe": { @@ -16102,9 +16151,9 @@ } }, "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", - "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz", + "integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==", "requires": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -16294,7 +16343,7 @@ "anymatch": "~3.1.1", "braces": "~3.0.2", "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", @@ -16319,9 +16368,9 @@ "optional": true }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "optional": true, "requires": { @@ -16765,8 +16814,8 @@ "selfsigned": "^1.9.1", "semver": "^5.6.0", "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", + "sockjs": "0.3.20", + "sockjs-client": "1.4.0", "spdy": "^4.0.0", "strip-ansi": "^3.0.0", "supports-color": "^5.1.0", @@ -17016,9 +17065,9 @@ } }, "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", "requires": { "async-limiter": "~1.0.0" } @@ -17051,9 +17100,9 @@ "dev": true }, "xmlhttprequest-ssl": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.2.tgz", + "integrity": "sha512-tYOaldF/0BLfKuoA39QMwD4j2m8lq4DIncqj1yuNELX4vz9+z/ieG/vwmctjJce+boFHXstqhWnHSxc4W8f4qg==", "dev": true }, "xregexp": { diff --git a/src/Web/WebSPA/package.json b/src/Web/WebSPA/package.json index d1f140331..665d33c0a 100644 --- a/src/Web/WebSPA/package.json +++ b/src/Web/WebSPA/package.json @@ -56,7 +56,9 @@ "tslib": "^2.0.0", "typedoc": "^0.19.2", "webpack-dev-server": "3.1.14", - "zone.js": "~0.10.2" + "zone.js": "~0.10.2", + "ssri": ">=8.0.1", + "is-svg": ">=4.2.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1002.0", @@ -71,7 +73,7 @@ "@types/selenium-webdriver": "3.0.10", "codelyzer": "^5.1.2", "eslint": "^6.8.0", - "handlebars": "^4.7.6", + "handlebars": "^4.7.7", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.0.0", @@ -79,8 +81,8 @@ "karma-cli": "^2.0.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", - "lodash": "^4.17.19", - "merge": "1.2.1", + "lodash": "^4.17.21", + "merge": "2.1.1", "npm-watch": "0.5.0", "protractor": "~7.0.0", "rxjs-tslint": "^0.1.7", diff --git a/src/Web/WebStatus/Dockerfile b/src/Web/WebStatus/Dockerfile index 7c1f74e7e..f55328926 100644 --- a/src/Web/WebStatus/Dockerfile +++ b/src/Web/WebStatus/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -13,6 +13,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Web/WebStatus/Program.cs b/src/Web/WebStatus/Program.cs index a06f0b142..fa298fa7f 100644 --- a/src/Web/WebStatus/Program.cs +++ b/src/Web/WebStatus/Program.cs @@ -8,6 +8,8 @@ using System.IO; using System.Linq; using System.Reflection; using WebStatus; +using Azure.Identity; +using Azure.Core; var configuration = GetConfiguration(); @@ -70,10 +72,11 @@ IConfiguration GetConfiguration() if (config.GetValue("UseVault", false)) { - builder.AddAzureKeyVault( - $"https://{config["Vault:Name"]}.vault.azure.net/", + TokenCredential credential = new ClientSecretCredential( + config["Vault:TenantId"], config["Vault:ClientId"], config["Vault:ClientSecret"]); + builder.AddAzureKeyVault(new Uri($"https://{config["Vault:Name"]}.vault.azure.net/"), credential); } return builder.Build(); diff --git a/src/Web/WebStatus/WebStatus.csproj b/src/Web/WebStatus/WebStatus.csproj index c3f22905b..e57e49252 100644 --- a/src/Web/WebStatus/WebStatus.csproj +++ b/src/Web/WebStatus/WebStatus.csproj @@ -12,11 +12,12 @@ + + - diff --git a/src/Web/WebhookClient/Dockerfile b/src/Web/WebhookClient/Dockerfile index 31c4c76eb..4cd8c5d26 100644 --- a/src/Web/WebhookClient/Dockerfile +++ b/src/Web/WebhookClient/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src # It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles @@ -14,6 +14,7 @@ COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator. COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" COPY "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" "BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj" COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" diff --git a/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs b/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs index 8ff384b41..7a0ad5fdc 100644 --- a/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs +++ b/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs @@ -2,12 +2,12 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.Options; -using Newtonsoft.Json; using System.Net; using System.Net.Http; using System.Net.Http.Formatting; using System.Threading.Tasks; using WebhookClient.Models; +using System.Text.Json; namespace WebhookClient.Pages { @@ -66,7 +66,7 @@ namespace WebhookClient.Pages } else { - RequestBodyJson = JsonConvert.SerializeObject(payload); + RequestBodyJson = JsonSerializer.Serialize(payload); ResponseCode = (int)response.StatusCode; ResponseMessage = response.ReasonPhrase; GrantUrl = granturl; diff --git a/src/Web/WebhookClient/Services/WebhooksClient.cs b/src/Web/WebhookClient/Services/WebhooksClient.cs index 3293f282d..dc12aaf37 100644 --- a/src/Web/WebhookClient/Services/WebhooksClient.cs +++ b/src/Web/WebhookClient/Services/WebhooksClient.cs @@ -1,9 +1,9 @@ using Microsoft.Extensions.Options; -using Newtonsoft.Json; using System.Collections.Generic; using System.Net.Http; using System.Threading.Tasks; using WebhookClient.Models; +using System.Text.Json; namespace WebhookClient.Services { @@ -22,7 +22,10 @@ namespace WebhookClient.Services var client = _httpClientFactory.CreateClient("GrantClient"); var response = await client.GetAsync(_settings.WebhooksUrl + "/api/v1/webhooks"); var json = await response.Content.ReadAsStringAsync(); - var subscriptions = JsonConvert.DeserializeObject>(json); + var subscriptions = JsonSerializer.Deserialize>(json, new JsonSerializerOptions + { + PropertyNameCaseInsensitive = true + }); return subscriptions; } } diff --git a/src/eShopOnContainers-ServicesAndWebApps.sln b/src/eShopOnContainers-ServicesAndWebApps.sln index f0d907d8b..446614fc0 100644 --- a/src/eShopOnContainers-ServicesAndWebApps.sln +++ b/src/eShopOnContainers-ServicesAndWebApps.sln @@ -120,6 +120,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile.Bff.Shopping", "Mobi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggregator", "ApiGateways\Mobile.Bff.Shopping\aggregator\Mobile.Shopping.HttpAggregator.csproj", "{B62E859F-825E-4C8B-93EC-5966EACFD026}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{373D8AA1-36BE-49EC-89F0-6CB736666285}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus.Tests", "BuildingBlocks\EventBus\EventBus.Tests\EventBus.Tests.csproj", "{95D735BE-2899-4495-BE3F-2600E93B4E3C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Ad-Hoc|Any CPU = Ad-Hoc|Any CPU @@ -1478,6 +1482,54 @@ Global {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x64.Build.0 = Release|Any CPU {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x86.ActiveCfg = Release|Any CPU {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x86.Build.0 = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|ARM.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|iPhone.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|x64.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|x64.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|x86.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.AppStore|x86.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|ARM.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|ARM.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|iPhone.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|x64.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|x64.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|x86.ActiveCfg = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Debug|x86.Build.0 = Debug|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|Any CPU.Build.0 = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|ARM.ActiveCfg = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|ARM.Build.0 = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|iPhone.ActiveCfg = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|iPhone.Build.0 = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|x64.ActiveCfg = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|x64.Build.0 = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|x86.ActiveCfg = Release|Any CPU + {95D735BE-2899-4495-BE3F-2600E93B4E3C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1534,6 +1586,8 @@ Global {966B1B0B-2AE0-4438-8741-1C5A05556095} = {3ABEEE8C-35E0-4185-9825-C44326151F5B} {798BFC44-2CCD-45FA-B37A-5173B03C2B30} = {77849D35-37D4-4802-81DC-9477B2775A40} {B62E859F-825E-4C8B-93EC-5966EACFD026} = {798BFC44-2CCD-45FA-B37A-5173B03C2B30} + {373D8AA1-36BE-49EC-89F0-6CB736666285} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F} + {95D735BE-2899-4495-BE3F-2600E93B4E3C} = {373D8AA1-36BE-49EC-89F0-6CB736666285} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}