Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
timheuer committed Apr 20, 2023
2 parents 294ed57 + 431dc83 commit cf0b393
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 75 deletions.
70 changes: 19 additions & 51 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,30 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/dotnet
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"name": "C# (.NET)",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
// Append -bullseye or -focal to pin to an OS version.
"VARIANT": "7.0-bullseye",
// Options
"NODE_VERSION": "none"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"testExplorer.useNativeTesting": true
},
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:0-7.0",
"features": {
"ghcr.io/devcontainers/features/powershell:1": {}
}

// Add the IDs of extensions you want installed when the container is created.
// "extensions": [
// "ms-dotnettools.csharp",
// "samirat.csharp-test-adapter",
// "ms-vscode.test-adapter-converter"
// ],
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],

// [Optional] To reuse of your local HTTPS dev cert:
//
// 1. Export it locally using this command:
// * Windows PowerShell:
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
// * macOS/Linux terminal:
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
//
// 2. Uncomment these 'remoteEnv' lines:
// "remoteEnv": {
// "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere",
// "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx",
// },
//
// 3. Do one of the following depending on your scenario:
// * When using GitHub Codespaces and/or Remote - Containers:
// 1. Start the container
// 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer
// 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https"
//
// * If only using Remote - Containers with a local container, uncomment this line instead:
// "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "dotnet restore",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"powershell": "latest"
}
// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
24 changes: 4 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- '**/*.gitignore'
- '**/*.gitattributes'
- '**/*.all-contributorsrc'
- '**/devcontainer.json'
- '**/build.yml'
workflow_dispatch:
branches:
- master
Expand All @@ -17,6 +19,7 @@ on:
- '**/*.gitignore'
- '**/*.gitattributes'
- '**/*.all-contributorsrc'
- '**/devcontainer.json'

jobs:
build:
Expand Down Expand Up @@ -95,7 +98,7 @@ jobs:

- name: Get certificate
id: cert_file
uses: timheuer/base64-to-file@master
uses: timheuer/base64-to-file@v1
with:
fileName: 'certfile.pfx'
encodedString: ${{ secrets.SIGNING_CERT }}
Expand Down Expand Up @@ -130,22 +133,3 @@ jobs:
with:
name: signednupkg
path: .

announce:
needs: [build,deploy]
environment:
name: announcement
url: ${{ steps.send_tweet.outputs.tweeturl }}
if: ${{ contains(toJson(github.event.commits),'[skip announce]') == false }}
name: Tweet release
runs-on: ubuntu-latest
steps:
- name: Tweet release detail
id: send_tweet
uses: timheuer/send-tweet-action@master
with:
status: "Alexa.NET ${{ needs.build.outputs.version }} was just released! https://github.com/timheuer/alexa-skills-dotnet/ Thanks to all the contributors!"
consumer-key: ${{ secrets.TWITTER_API_KEY }}
consumer-secret: ${{ secrets.TWITTER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_SECRET }}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"dotnet-test-explorer.testProjectPath":"**//Alexa.NET.Tests.csproj"
"dotnet-test-explorer.testProjectPath": "**//Alexa.NET.Tests.csproj",
"dotnet.defaultSolution": "Alexa.NET.sln"
}
4 changes: 2 additions & 2 deletions Alexa.NET/Alexa.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<PropertyGroup>
<Description>A simple .NET Core library for handling Alexa Skill request/responses.</Description>
<AssemblyTitle>Alexa.NET</AssemblyTitle>
<VersionPrefix>1.21.0</VersionPrefix>
<VersionPrefix>1.22.0</VersionPrefix>
<Authors>Tim Heuer, Steven Pears</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Alexa.NET</AssemblyName>
<PackageId>Alexa.NET</PackageId>
<PackageTags>amazon;alexa;echo;dot;echo dot;skills</PackageTags>
<PackageReleaseNotes>Fixes bug in EmphasisLevel. Thanks @stoiveyp, @FelipeBergmann</PackageReleaseNotes>
<PackageReleaseNotes>Adding more support for known error types</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/timheuer/alexa-skills-dotnet</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/timheuer/alexa-skills-dotnet</RepositoryUrl>
Expand Down
52 changes: 51 additions & 1 deletion Alexa.NET/Request/Type/ErrorType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,56 @@ public enum ErrorType
[EnumMember(Value = "MEDIA_ERROR_INTERNAL_SERVER_ERROR")]
InternalServerError,
[EnumMember(Value = "MEDIA_ERROR_INTERNAL_DEVICE_ERROR")]
InternalDeviceError
InternalDeviceError,
[EnumMember(Value = "ALREADY_IN_OPERATION")]
AlreadyInOperation,
[EnumMember(Value = "BRIDGE_UNREACHABLE")]
BridgeUnreachable,
[EnumMember(Value = "ENDPOINT_BUSY")]
EndpointBusy,
[EnumMember(Value = "ENDPOINT_LOW_POWER")]
EndpointLowPower,
[EnumMember(Value = "ENDPOINT_UNREACHABLE")]
EndpointUnreachable,
[EnumMember(Value = "ENDPOINT_CONTROL_UNAVAILABLE")]
EndpointControlUnavailable,
[EnumMember(Value = "EXPIRED_AUTHORIZATION_CREDENTIAL")]
ExpiredAuthorizationCredential,
[EnumMember(Value = "FIRMWARE_OUT_OF_DATE")]
FirmwareOutOfDate,
[EnumMember(Value = "HARDWARE_MALFUNCTION")]
HardwareMalfunction,
[EnumMember(Value = "INSUFFICIENT_PERMISSIONS")]
InsufficientPermissions,
[EnumMember(Value = "INTERNAL_SERVICE_ERROR")]
InternalServiceError,
[EnumMember(Value = "INVALID_AUTHORIZATION_CREDENTIAL")]
InvalidAuthorizationCredential,
[EnumMember(Value = "INVALID_DIRECTIVE")]
InvalidDirective,
[EnumMember(Value = "INVALID_VALUE")]
InvalidValue,
[EnumMember(Value = "NO_SUCH_ENDPOINT")]
NoSuchEndpoint,
[EnumMember(Value = "NOT_CALIBRATED")]
NotCalibrated,
[EnumMember(Value = "NOT_IN_OPERATION")]
NotInOperation,
[EnumMember(Value = "NOT_SUPPORTED_IN_CURRENT_MODE")]
NotSupportedInCurrentMode,
[EnumMember(Value = "NOT_SUPPORTED_WITH_CURRENT_BATTERY_CHARGE_STATE")]
NotSupportedWithCurrentBatteryChargeState,
[EnumMember(Value = "PARTNER_APPLICATION_REDIRECTION")]
PartnerApplicationRedirection,
[EnumMember(Value = "POWER_LEVEL_NOT_SUPPORTED")]
PowerLevelNotSupported,
[EnumMember(Value = "RATE_LIMIT_EXCEEDED")]
RateLimitExceeded,
[EnumMember(Value = "TEMPERATURE_VALUE_OUT_OF_RANGE")]
TemperatureValueOutOfRange,
[EnumMember(Value = "TOO_MANY_FAILED_ATTEMPTS")]
TooManyFailedAttempts,
[EnumMember(Value = "VALUE_OUT_OF_RANGE")]
ValueOutOfRange
}
}

0 comments on commit cf0b393

Please sign in to comment.