diff --git a/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.deps.json b/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.deps.json index f32ff56..fb75ab2 100644 --- a/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.deps.json +++ b/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.deps.json @@ -3187,7 +3187,7 @@ "Microsoft.NETCore.Platforms/2.1.0": { "type": "package", "serviceable": true, - "sha512": "sha512-TT+QCi9LcxGTjBssH7S7n5+8DVcwfG4DYgXX7Dk7+BfZ4oVHj8Q0CbYk9glzAlHLsSt3bYzol+fOdra2iu6GOw==", + "sha512": "sha512-aSTPL94NloSiQVL5Len8wbjFKOnoAX/vOh3s3DF6g3c7GUUMLCDvnBhmA72M2iN2AedyA8hpr7m89kzSAKUnJQ==", "path": "microsoft.netcore.platforms/2.1.0", "hashPath": "microsoft.netcore.platforms.2.1.0.nupkg.sha512" }, @@ -3208,7 +3208,7 @@ "Microsoft.AspNet.WebApi.Client/5.2.6": { "type": "package", "serviceable": true, - "sha512": "sha512-rMDlyePoxggkmN/qgha1+BR2Uy+dOr38xKCQOPfVNKGY07R2nYJGMTKJFE1XFgwD70RYUNazf2fqutjJF18XgQ==", + "sha512": "sha512-AIgEc1up4pvH8kXy+eG1x4Qfqd6piAq3yk11pveCQXWNkkYoiKdflSmcJZuWcerdMcAaoF0xC/mWGoTW4vF4Dg==", "path": "microsoft.aspnet.webapi.client/5.2.6", "hashPath": "microsoft.aspnet.webapi.client.5.2.6.nupkg.sha512" }, @@ -3684,7 +3684,7 @@ "Microsoft.AspNetCore.Razor.Design/2.1.1": { "type": "package", "serviceable": true, - "sha512": "sha512-f8PKGcxiezL1RVqmnmrazj24Mj4KCTSXqwdotl7Lc+82h8iLV7ItxEIShTJakG7M9iw0ZuCocM0J/IhYesdQrg==", + "sha512": "sha512-BOK5fckW9v7xWjpEI6bPGwkjw10OPVASZcAa8HoWJo/0Mmg4Azddj92v8noU+YgvD/6zNZ9o/RiRXXKxk5rYwQ==", "path": "microsoft.aspnetcore.razor.design/2.1.1", "hashPath": "microsoft.aspnetcore.razor.design.2.1.1.nupkg.sha512" }, @@ -3740,7 +3740,7 @@ "Microsoft.AspNetCore.Routing.Abstractions/2.1.1": { "type": "package", "serviceable": true, - "sha512": "sha512-+Yxsy/ZcCthcziktuhfC6WpQ/cZzgD/IsQ96xefNKrCzIm9jXjfNK3ONsoScvyFFihNohp7zAVPiic5J6CvUDw==", + "sha512": "sha512-9saJjHhST3JmFKuZ1mPU9FJcpgUyPNoJxRMSV2nkSjiEekQN4jxswtBBeIRVDonjq50KKqSWbcyyQtvV4tgKzw==", "path": "microsoft.aspnetcore.routing.abstractions/2.1.1", "hashPath": "microsoft.aspnetcore.routing.abstractions.2.1.1.nupkg.sha512" }, @@ -3845,7 +3845,7 @@ "Microsoft.AspNetCore.StaticFiles/2.1.1": { "type": "package", "serviceable": true, - "sha512": "sha512-3xumS58evfsC4cd8OXtYRafbwuVk5c37dsGQ1E1m0wZvRVUXScRWkTGdcPJcijoImlhoQK2pj6sY7NFMc5PfbQ==", + "sha512": "sha512-Jb4YKaDpPqrcSBxGChOCUmgkuqRKkwe3t5o6GWeoNUENf4hQDuobUvouXKHVw3KuEFIBVArZB984fuVGQW0eAw==", "path": "microsoft.aspnetcore.staticfiles/2.1.1", "hashPath": "microsoft.aspnetcore.staticfiles.2.1.1.nupkg.sha512" }, @@ -3873,14 +3873,14 @@ "Microsoft.CodeAnalysis.Common/2.8.0": { "type": "package", "serviceable": true, - "sha512": "sha512-lYUBqh3OD3iEQqxt9KB472VzgOnEKoUVG4Lx5Xw4oJe9dZtITkHFtct+T73jH3FOASFI1NSzzP5MBM0c9zZspA==", + "sha512": "sha512-A2a4NejNvWVz+8FPXkZK/cd2j4/P3laHwpz56UU3fDcOAVu4Xb98T6FXGAIgqE/LzSVpHnn9Cgg7rhT59qsO8w==", "path": "microsoft.codeanalysis.common/2.8.0", "hashPath": "microsoft.codeanalysis.common.2.8.0.nupkg.sha512" }, "Microsoft.CodeAnalysis.CSharp/2.8.0": { "type": "package", "serviceable": true, - "sha512": "sha512-+4CHAwHMwLO5GRqPJ7Khv2Ny//omhukPKP3Ny/d2XDpt11bX35zb9pTziwZN0eNvxj6a46joIdHEYQ1JsekI3w==", + "sha512": "sha512-+GGCTxkBjf9lFEZhVOG4iEO5YkuWCO5q+kUF787NJ8Twy3EOyLrjtZ8K7q+kH/PnSjSkN0AvWwL2NQCmT1H6mA==", "path": "microsoft.codeanalysis.csharp/2.8.0", "hashPath": "microsoft.codeanalysis.csharp.2.8.0.nupkg.sha512" }, @@ -4062,7 +4062,7 @@ "Microsoft.Extensions.DependencyInjection/2.1.1": { "type": "package", "serviceable": true, - "sha512": "sha512-2nshYaLTn73Ie+/yTkb7EZIXwQeFIXsYCBy/jSY9bMayYykGNjdWa25frayhuPAGVbZpEgfgp3d4JRVEuVyEqQ==", + "sha512": "sha512-ZPFcDUbSwaEVWMyef8+9GqiTAghHX+eLeIEW032i4LDFAdyM4J4brV0UzChlKtClT7cuip/Of6G+veDnO3/bCw==", "path": "microsoft.extensions.dependencyinjection/2.1.1", "hashPath": "microsoft.extensions.dependencyinjection.2.1.1.nupkg.sha512" }, @@ -4125,7 +4125,7 @@ "Microsoft.Extensions.Hosting/2.1.1": { "type": "package", "serviceable": true, - "sha512": "sha512-JCQMO9b49MO7b2e3myP6b0KsAJvRL9auv0A/Pn4w2Q1dt9D29tWvuji8b2jGfHVZcal9GRbtwwdnAD1mN4x3VQ==", + "sha512": "sha512-429Rqyy8tzVZq9UJCKqD+r/9XobPYn/xGxMPyQxmqOZJQPjXXzYAjjZhQ5onCWPFPWbfw430RKRyBTa341kCJA==", "path": "microsoft.extensions.hosting/2.1.1", "hashPath": "microsoft.extensions.hosting.2.1.1.nupkg.sha512" }, @@ -4258,49 +4258,49 @@ "Microsoft.IdentityModel.Logging/5.2.0": { "type": "package", "serviceable": true, - "sha512": "sha512-OgiaeDGsuTpXrx77a4gyN6Flp4y7jro4La92UtVEEVxnRb+TnRxawVYY3Z5EVme5fSwvE31vo2iNAwI/jBKjPg==", + "sha512": "sha512-D9uipmVVfJoNv1AzzLR4547+MiwrXElN6bVym3UqZm8/n2LUVdmbHUSQYwqC/gOjHK2vEzXP4NTwHnL+F54q5A==", "path": "microsoft.identitymodel.logging/5.2.0", "hashPath": "microsoft.identitymodel.logging.5.2.0.nupkg.sha512" }, "Microsoft.IdentityModel.Protocols/5.2.0": { "type": "package", "serviceable": true, - "sha512": "sha512-pakGqbE3FRort3vb0qqWI0Qfy84IOXs8sG7ygANUpoRT+544svQ62JfvCX4UPnqf5bCUpSxVc3rDh8yCQBtc7w==", + "sha512": "sha512-ZvW6FGD9M4JRJnU9GyCnK22vpWX4itIousHD7v9V/XWb6HUmzfKsb7S9QfzOfnNcNr2eK8nLV50S0v1QMR9ERg==", "path": "microsoft.identitymodel.protocols/5.2.0", "hashPath": "microsoft.identitymodel.protocols.5.2.0.nupkg.sha512" }, "Microsoft.IdentityModel.Protocols.OpenIdConnect/5.2.0": { "type": "package", "serviceable": true, - "sha512": "sha512-hMjsfdvgI/Gk/HWPgyVnju6fy3iULralgn1XU6eL17KkkFN2rJ1fDzJX3RKrjr888Y5S+hTSQAUcGzb4Fe3aBA==", + "sha512": "sha512-IbrtvKFSJLGoCTnDEldkWodt/U3x1OduaFuuVxo8RtvCwZkSp/08OtIlVzdLeJG8bCzQs6p7FV6Xh/a52B0jdw==", "path": "microsoft.identitymodel.protocols.openidconnect/5.2.0", "hashPath": "microsoft.identitymodel.protocols.openidconnect.5.2.0.nupkg.sha512" }, "Microsoft.IdentityModel.Protocols.WsFederation/5.2.0": { "type": "package", "serviceable": true, - "sha512": "sha512-7yohKgLzTObwy+Yq/WNshe2ar+9MZJischkn+L+IIQhpZCKWixr0QFR0V/1TzvGVeXBR/AJY/luZRLx84RlzJw==", + "sha512": "sha512-tZJI6PD4/QPBXfTNy/FlGYzi+ebV3pUikoYjmEFApuxJ+RXZ2yuqTDR/gpF6m8TuR4jmX3y+ILqYTy0bPuJK9w==", "path": "microsoft.identitymodel.protocols.wsfederation/5.2.0", "hashPath": "microsoft.identitymodel.protocols.wsfederation.5.2.0.nupkg.sha512" }, "Microsoft.IdentityModel.Tokens/5.2.0": { "type": "package", "serviceable": true, - "sha512": "sha512-Uz1Dk5Gw/jgIHEzac9cXhq7pH0Hf5P73vf23hR6QJn0IamLbPG4qoHnGyPMn9qQXc+jDb/j3fWOhvWGrteJXtA==", + "sha512": "sha512-ptAbeNOZ++Ioq6eGFhSzcC/oCYMkB/XSuWp9jkaQHz8S2Lxm4wrB2yvYNqlYd88+7L56Ywa9WMCgx94heQvtIw==", "path": "microsoft.identitymodel.tokens/5.2.0", "hashPath": "microsoft.identitymodel.tokens.5.2.0.nupkg.sha512" }, "Microsoft.IdentityModel.Tokens.Saml/5.2.0": { "type": "package", "serviceable": true, - "sha512": "sha512-db9y9zHTxeVwTi91mqBu4u1h5tlseQxhXMlGBd7bousED/FcEuhRiVK1maXjoHyQTnYbFDGPvYKXxznDI5jBGQ==", + "sha512": "sha512-3XCXxwPFOG7uJkDx2hD4vv/5UTKWPnDdmh69jRcXUbEgEC8HVdTbViIrQJien+5WefScalMGYIwA4lnLooxRYw==", "path": "microsoft.identitymodel.tokens.saml/5.2.0", "hashPath": "microsoft.identitymodel.tokens.saml.5.2.0.nupkg.sha512" }, "Microsoft.IdentityModel.Xml/5.2.0": { "type": "package", "serviceable": true, - "sha512": "sha512-0WB90AfR16LT0ANCQTb+183yWrusPt4QK1F3f9eL59ZiDKeZLx2AeXgrkDUO+7kG55nCPqmeOUDjHDVK4gsRgA==", + "sha512": "sha512-Z1ID4pp3VhPVR1JKDw5KRqO1WchJEFSrEasiaQRnxstzUrbos4sd3Faro8nlIOtZxS1Dxu5v5UksaoNxlW7BYw==", "path": "microsoft.identitymodel.xml/5.2.0", "hashPath": "microsoft.identitymodel.xml.5.2.0.nupkg.sha512" }, @@ -4321,21 +4321,21 @@ "Newtonsoft.Json/11.0.2": { "type": "package", "serviceable": true, - "sha512": "sha512-IvJe1pj7JHEsP8B8J8DwlMEx8UInrs/x+9oVY+oCD13jpLu4JbJU2WCIsMRn5C4yW9+DgkaO8uiVE5VHKjpmdQ==", + "sha512": "sha512-znZGbws7E4BA9jxNZ7FuiIRI3C9hrgatVQSTKhIYZYNOud4M5VfGlTYi6RdYO5sQrebFuF/g9UEV3hOxDMXF6Q==", "path": "newtonsoft.json/11.0.2", "hashPath": "newtonsoft.json.11.0.2.nupkg.sha512" }, "Newtonsoft.Json.Bson/1.0.1": { "type": "package", "serviceable": true, - "sha512": "sha512-5PYT/IqQ+UK31AmZiSS102R6EsTo+LGTSI8bp7WAUqDKaF4wHXD8U9u4WxTI1vc64tYi++8p3dk3WWNqPFgldw==", + "sha512": "sha512-W5Ke5xei9yS0ljQZuT75VgSp5M43eCPm5hHAelvKyGGU4dV7hYCmtwdsxoADb/exO6pYHeu/Iki43TdYPzfESQ==", "path": "newtonsoft.json.bson/1.0.1", "hashPath": "newtonsoft.json.bson.1.0.1.nupkg.sha512" }, "Remotion.Linq/2.2.0": { "type": "package", "serviceable": true, - "sha512": "sha512-fK/76UmpC0FXBlGDFVPLJHQlDLYnGC+XY3eoDgCgbtrhi0vzbXDQ3n/IYHhqSKqXQfGw/u04A1drWs7rFVkRjw==", + "sha512": "sha512-twDAH8dAXXCAf3sRv1Tf94u66eEHvgU75hfn1nn2v4fSWXD50XoDOAk8WpSrbViNuMkB4kN1ElnOGm1c519IHg==", "path": "remotion.linq/2.2.0", "hashPath": "remotion.linq.2.2.0.nupkg.sha512" }, @@ -4545,7 +4545,7 @@ "System.Data.SqlClient/4.5.1": { "type": "package", "serviceable": true, - "sha512": "sha512-qXTvTFkBds7bnN+ntBMHGvmH3pCAkfT4TE1z2Xvfqo4wKMQC77O4aXsYCc7dzCESC+/Gom6l0GLuebpFx7MDvg==", + "sha512": "sha512-cTPUCClr34EGBnyazUeciMD6sNm9aiE/li3uGvJ7z5dGup9QxKwysUeKXIrCO0E5KtQQAzGORFEYmowyEpcL2A==", "path": "system.data.sqlclient/4.5.1", "hashPath": "system.data.sqlclient.4.5.1.nupkg.sha512" }, @@ -4629,14 +4629,14 @@ "System.IdentityModel.Tokens.Jwt/5.2.0": { "type": "package", "serviceable": true, - "sha512": "sha512-E8tNMfMWPvlSF5fvmMIVZZHlGuIZzE5uktuR+GN2gFdngh0k6xoZquxfjKC02d0NqfsshNQVTCdSKXD5e9/lpA==", + "sha512": "sha512-2cY4A17XCEdohJ8BsyASM09ZYXVPJirdUudD5rETIuNhS7awKkncO1ifCAQHjb10PpdzLmebJgRI+NHEozSEwQ==", "path": "system.identitymodel.tokens.jwt/5.2.0", "hashPath": "system.identitymodel.tokens.jwt.5.2.0.nupkg.sha512" }, "System.Interactive.Async/3.1.1": { "type": "package", "serviceable": true, - "sha512": "sha512-hZccYiIE5RS1/J9Tb/BNtosAGVggdlsJm4Ojdu+gDV0p4AIi+LUfUogMKkRacljQEJd2AG6vYzvcjhQFkqoZmw==", + "sha512": "sha512-x9y2omkjEudKbIVuhUzeWw7ZlouEzpk4W98woCEq1lq9gJxERBKRKDTHF5JPEws9E0f4/Uei/2vLxEy1IrfmMg==", "path": "system.interactive.async/3.1.1", "hashPath": "system.interactive.async.3.1.1.nupkg.sha512" }, @@ -4671,7 +4671,7 @@ "System.IO.Pipelines/4.5.0": { "type": "package", "serviceable": true, - "sha512": "sha512-Kq9eZWVKN9khHhkatLWLLxYCs3j9qSNMZELqn2YG1YsCMv6bPmAtaN0CfA6l7vxFbiV02C996Dy7yHO8DkaJLg==", + "sha512": "sha512-kPBg1oHIqNgZzzIbAFVTfMLmqYid6juXFJv7VnQf7m9K6ooLD8sGZq9rsB+4wZLrgKm0t3TuhBXyPE1StpjqvQ==", "path": "system.io.pipelines/4.5.0", "hashPath": "system.io.pipelines.4.5.0.nupkg.sha512" }, @@ -4706,7 +4706,7 @@ "System.Net.Http/4.3.0": { "type": "package", "serviceable": true, - "sha512": "sha512-sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", + "sha512": "sha512-Z1UfSF6dlpCdZdxh6LeoGlYH+q6ptG/iiIWgUUeKhE3DbQACmZkU7Sz2nOX0qdHjz72MOdYRbkSJ5Qwl6sZgvg==", "path": "system.net.http/4.3.0", "hashPath": "system.net.http.4.3.0.nupkg.sha512" }, @@ -4818,7 +4818,7 @@ "System.Runtime.CompilerServices.Unsafe/4.5.1": { "type": "package", "serviceable": true, - "sha512": "sha512-qUJMNWhbm9oZ3XaMFiEMiYmRPszbnXIkRIi7+4b2Md2xZ6JUOepf0/kY3S85qistRohl9OdMe4PsO+RdG2kTIQ==", + "sha512": "sha512-x/3d5xb+mc9e4I2GOOT+HPRWMZLbYjNN/kYKsb0fyUKcWizn/t1CIrGRLIBhv7H0ptYEt+WTTztdPmwSUMyKig==", "path": "system.runtime.compilerservices.unsafe/4.5.1", "hashPath": "system.runtime.compilerservices.unsafe.4.5.1.nupkg.sha512" }, diff --git a/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.dll b/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.dll index 5d06f31..6fba4e0 100644 Binary files a/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.dll and b/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.dll differ diff --git a/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.pdb b/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.pdb index 7c4dc6c..e85d5a0 100644 Binary files a/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.pdb and b/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.pdb differ diff --git a/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.runtimeconfig.dev.json b/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.runtimeconfig.dev.json index 9bff1a4..210a1ae 100644 --- a/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.runtimeconfig.dev.json +++ b/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.runtimeconfig.dev.json @@ -1,9 +1,9 @@ { "runtimeOptions": { "additionalProbingPaths": [ - "C:\\Users\\Ben\\.dotnet\\store\\|arch|\\|tfm|", - "C:\\Users\\Ben\\.nuget\\packages", - "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + "/home/ben/.dotnet/store/|arch|/|tfm|", + "/home/ben/.nuget/packages", + "/usr/share/dotnet/sdk/NuGetFallbackFolder" ] } } \ No newline at end of file diff --git a/dev-portal/dotnet-install.sh b/dev-portal/dotnet-install.sh new file mode 100755 index 0000000..fe0a6c2 --- /dev/null +++ b/dev-portal/dotnet-install.sh @@ -0,0 +1,997 @@ +#!/usr/bin/env bash +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +# Stop script on NZEC +set -e +# Stop script if unbound variable found (use ${var:-} if intentional) +set -u +# By default cmd1 | cmd2 returns exit code of cmd2 regardless of cmd1 success +# This is causing it to fail +set -o pipefail + +# Use in the the functions: eval $invocation +invocation='say_verbose "Calling: ${yellow:-}${FUNCNAME[0]} ${green:-}$*${normal:-}"' + +# standard output may be used as a return value in the functions +# we need a way to write text on the screen in the functions so that +# it won't interfere with the return value. +# Exposing stream 3 as a pipe to standard output of the script itself +exec 3>&1 + +# Setup some colors to use. These need to work in fairly limited shells, like the Ubuntu Docker container where there are only 8 colors. +# See if stdout is a terminal +if [ -t 1 ] && command -v tput > /dev/null; then + # see if it supports colors + ncolors=$(tput colors) + if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then + bold="$(tput bold || echo)" + normal="$(tput sgr0 || echo)" + black="$(tput setaf 0 || echo)" + red="$(tput setaf 1 || echo)" + green="$(tput setaf 2 || echo)" + yellow="$(tput setaf 3 || echo)" + blue="$(tput setaf 4 || echo)" + magenta="$(tput setaf 5 || echo)" + cyan="$(tput setaf 6 || echo)" + white="$(tput setaf 7 || echo)" + fi +fi + +say_warning() { + printf "%b\n" "${yellow:-}dotnet_install: Warning: $1${normal:-}" +} + +say_err() { + printf "%b\n" "${red:-}dotnet_install: Error: $1${normal:-}" >&2 +} + +say() { + # using stream 3 (defined in the beginning) to not interfere with stdout of functions + # which may be used as return value + printf "%b\n" "${cyan:-}dotnet-install:${normal:-} $1" >&3 +} + +say_verbose() { + if [ "$verbose" = true ]; then + say "$1" + fi +} + +# This platform list is finite - if the SDK/Runtime has supported Linux distribution-specific assets, +# then and only then should the Linux distribution appear in this list. +# Adding a Linux distribution to this list does not imply distribution-specific support. +get_legacy_os_name_from_platform() { + eval $invocation + + platform="$1" + case "$platform" in + "centos.7") + echo "centos" + return 0 + ;; + "debian.8") + echo "debian" + return 0 + ;; + "debian.9") + echo "debian.9" + return 0 + ;; + "fedora.23") + echo "fedora.23" + return 0 + ;; + "fedora.24") + echo "fedora.24" + return 0 + ;; + "fedora.27") + echo "fedora.27" + return 0 + ;; + "fedora.28") + echo "fedora.28" + return 0 + ;; + "opensuse.13.2") + echo "opensuse.13.2" + return 0 + ;; + "opensuse.42.1") + echo "opensuse.42.1" + return 0 + ;; + "opensuse.42.3") + echo "opensuse.42.3" + return 0 + ;; + "rhel.7"*) + echo "rhel" + return 0 + ;; + "ubuntu.14.04") + echo "ubuntu" + return 0 + ;; + "ubuntu.16.04") + echo "ubuntu.16.04" + return 0 + ;; + "ubuntu.16.10") + echo "ubuntu.16.10" + return 0 + ;; + "ubuntu.18.04") + echo "ubuntu.18.04" + return 0 + ;; + "alpine.3.4.3") + echo "alpine" + return 0 + ;; + esac + return 1 +} + +get_linux_platform_name() { + eval $invocation + + if [ -n "$runtime_id" ]; then + echo "${runtime_id%-*}" + return 0 + else + if [ -e /etc/os-release ]; then + . /etc/os-release + echo "$ID.$VERSION_ID" + return 0 + elif [ -e /etc/redhat-release ]; then + local redhatRelease=$( /dev/null 2>&1 + return $? +} + + +check_min_reqs() { + local hasMinimum=false + if machine_has "curl"; then + hasMinimum=true + elif machine_has "wget"; then + hasMinimum=true + fi + + if [ "$hasMinimum" = "false" ]; then + say_err "curl (recommended) or wget are required to download dotnet. Install missing prerequisite to proceed." + return 1 + fi + return 0 +} + +check_pre_reqs() { + eval $invocation + + if [ "${DOTNET_INSTALL_SKIP_PREREQS:-}" = "1" ]; then + return 0 + fi + + if [ "$(uname)" = "Linux" ]; then + if [ ! -x "$(command -v ldconfig)" ]; then + echo "ldconfig is not in PATH, trying /sbin/ldconfig." + LDCONFIG_COMMAND="/sbin/ldconfig" + else + LDCONFIG_COMMAND="ldconfig" + fi + + local librarypath=${LD_LIBRARY_PATH:-} + LDCONFIG_COMMAND="$LDCONFIG_COMMAND -NXv ${librarypath//:/ }" + + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libunwind)" ] && say_warning "Unable to locate libunwind. Probable prerequisite missing; please install libunwind." + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libssl)" ] && say_warning "Unable to locate libssl. Probable prerequisite missing; please install libssl." + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libicu)" ] && say_warning "Unable to locate libicu. Probable prerequisite missing; please install libicu." + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep -F libcurl.so)" ] && say_warning "Unable to locate libcurl. Probable prerequisite missing; please install libcurl." + fi + + return 0 +} + +# args: +# input - $1 +to_lowercase() { + #eval $invocation + + echo "$1" | tr '[:upper:]' '[:lower:]' + return 0 +} + +# args: +# input - $1 +remove_trailing_slash() { + #eval $invocation + + local input="${1:-}" + echo "${input%/}" + return 0 +} + +# args: +# input - $1 +remove_beginning_slash() { + #eval $invocation + + local input="${1:-}" + echo "${input#/}" + return 0 +} + +# args: +# root_path - $1 +# child_path - $2 - this parameter can be empty +combine_paths() { + eval $invocation + + # TODO: Consider making it work with any number of paths. For now: + if [ ! -z "${3:-}" ]; then + say_err "combine_paths: Function takes two parameters." + return 1 + fi + + local root_path="$(remove_trailing_slash "$1")" + local child_path="$(remove_beginning_slash "${2:-}")" + say_verbose "combine_paths: root_path=$root_path" + say_verbose "combine_paths: child_path=$child_path" + echo "$root_path/$child_path" + return 0 +} + +get_machine_architecture() { + eval $invocation + + if command -v uname > /dev/null; then + CPUName=$(uname -m) + case $CPUName in + armv7l) + echo "arm" + return 0 + ;; + aarch64) + echo "arm64" + return 0 + ;; + esac + fi + + # Always default to 'x64' + echo "x64" + return 0 +} + +# args: +# architecture - $1 +get_normalized_architecture_from_architecture() { + eval $invocation + + local architecture="$(to_lowercase "$1")" + case "$architecture" in + \) + echo "$(get_normalized_architecture_from_architecture "$(get_machine_architecture)")" + return 0 + ;; + amd64|x64) + echo "x64" + return 0 + ;; + arm) + echo "arm" + return 0 + ;; + arm64) + echo "arm64" + return 0 + ;; + esac + + say_err "Architecture \`$architecture\` not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues" + return 1 +} + +# version_info is a conceptual two line string representing commit hash and 4-part version +# format: +# Line 1: # commit_hash +# Line 2: # 4-part version + +# args: +# version_text - stdin +get_version_from_version_info() { + eval $invocation + + cat | tail -n 1 | sed 's/\r$//' + return 0 +} + +# args: +# version_text - stdin +get_commit_hash_from_version_info() { + eval $invocation + + cat | head -n 1 | sed 's/\r$//' + return 0 +} + +# args: +# install_root - $1 +# relative_path_to_package - $2 +# specific_version - $3 +is_dotnet_package_installed() { + eval $invocation + + local install_root="$1" + local relative_path_to_package="$2" + local specific_version="${3//[$'\t\r\n']}" + + local dotnet_package_path="$(combine_paths "$(combine_paths "$install_root" "$relative_path_to_package")" "$specific_version")" + say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path" + + if [ -d "$dotnet_package_path" ]; then + return 0 + else + return 1 + fi +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# coherent - $4 +get_latest_version_info() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local coherent="$4" + + local version_file_url=null + if [[ "$runtime" == "dotnet" ]]; then + version_file_url="$uncached_feed/Runtime/$channel/latest.version" + elif [[ "$runtime" == "aspnetcore" ]]; then + version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version" + elif [ -z "$runtime" ]; then + if [ "$coherent" = true ]; then + version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version" + else + version_file_url="$uncached_feed/Sdk/$channel/latest.version" + fi + else + say_err "Invalid value for \$runtime" + return 1 + fi + say_verbose "get_latest_version_info: latest url: $version_file_url" + + download "$version_file_url" + return $? +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# version - $4 +get_specific_version_from_version() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local version="$(to_lowercase "$4")" + + case "$version" in + latest) + local version_info + version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1 + say_verbose "get_specific_version_from_version: version_info=$version_info" + echo "$version_info" | get_version_from_version_info + return 0 + ;; + coherent) + local version_info + version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" true)" || return 1 + say_verbose "get_specific_version_from_version: version_info=$version_info" + echo "$version_info" | get_version_from_version_info + return 0 + ;; + *) + echo "$version" + return 0 + ;; + esac +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# specific_version - $4 +construct_download_link() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local specific_version="${4//[$'\t\r\n']}" + + local osname + osname="$(get_current_os_name)" || return 1 + + local download_link=null + if [[ "$runtime" == "dotnet" ]]; then + download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" + elif [[ "$runtime" == "aspnetcore" ]]; then + download_link="$azure_feed/aspnetcore/Runtime/$specific_version/aspnetcore-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" + elif [ -z "$runtime" ]; then + download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_version-$osname-$normalized_architecture.tar.gz" + else + return 1 + fi + + echo "$download_link" + return 0 +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# specific_version - $4 +construct_legacy_download_link() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local specific_version="${4//[$'\t\r\n']}" + + local distro_specific_osname + distro_specific_osname="$(get_legacy_os_name)" || return 1 + + local legacy_download_link=null + if [[ "$runtime" == "dotnet" ]]; then + legacy_download_link="$azure_feed/Runtime/$specific_version/dotnet-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz" + elif [ -z "$runtime" ]; then + legacy_download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz" + else + return 1 + fi + + echo "$legacy_download_link" + return 0 +} + +get_user_install_path() { + eval $invocation + + if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then + echo "$DOTNET_INSTALL_DIR" + else + echo "$HOME/.dotnet" + fi + return 0 +} + +# args: +# install_dir - $1 +resolve_installation_path() { + eval $invocation + + local install_dir=$1 + if [ "$install_dir" = "" ]; then + local user_install_path="$(get_user_install_path)" + say_verbose "resolve_installation_path: user_install_path=$user_install_path" + echo "$user_install_path" + return 0 + fi + + echo "$install_dir" + return 0 +} + +# args: +# install_root - $1 +get_installed_version_info() { + eval $invocation + + local install_root="$1" + local version_file="$(combine_paths "$install_root" "$local_version_file_relative_path")" + say_verbose "Local version file: $version_file" + if [ ! -z "$version_file" ] | [ -r "$version_file" ]; then + local version_info="$(cat "$version_file")" + echo "$version_info" + return 0 + fi + + say_verbose "Local version file not found." + return 0 +} + +# args: +# relative_or_absolute_path - $1 +get_absolute_path() { + eval $invocation + + local relative_or_absolute_path=$1 + echo "$(cd "$(dirname "$1")" && pwd -P)/$(basename "$1")" + return 0 +} + +# args: +# input_files - stdin +# root_path - $1 +# out_path - $2 +# override - $3 +copy_files_or_dirs_from_list() { + eval $invocation + + local root_path="$(remove_trailing_slash "$1")" + local out_path="$(remove_trailing_slash "$2")" + local override="$3" + local osname="$(get_current_os_name)" + local override_switch=$( + if [ "$override" = false ]; then + if [[ "$osname" == "linux-musl" ]]; then + printf -- "-u"; + else + printf -- "-n"; + fi + fi) + + cat | uniq | while read -r file_path; do + local path="$(remove_beginning_slash "${file_path#$root_path}")" + local target="$out_path/$path" + if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then + mkdir -p "$out_path/$(dirname "$path")" + cp -R $override_switch "$root_path/$path" "$target" + fi + done +} + +# args: +# zip_path - $1 +# out_path - $2 +extract_dotnet_package() { + eval $invocation + + local zip_path="$1" + local out_path="$2" + + local temp_out_path="$(mktemp -d "$temporary_file_template")" + + local failed=false + tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true + + local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/' + find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false + find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files" + + rm -rf "$temp_out_path" + + if [ "$failed" = true ]; then + say_err "Extraction failed" + return 1 + fi +} + +# args: +# remote_path - $1 +# [out_path] - $2 - stdout if not provided +download() { + eval $invocation + + local remote_path="$1" + local out_path="${2:-}" + + if [[ "$remote_path" != "http"* ]]; then + cp "$remote_path" "$out_path" + return $? + fi + + local failed=false + if machine_has "curl"; then + downloadcurl "$remote_path" "$out_path" || failed=true + elif machine_has "wget"; then + downloadwget "$remote_path" "$out_path" || failed=true + else + failed=true + fi + if [ "$failed" = true ]; then + say_verbose "Download failed: $remote_path" + return 1 + fi + return 0 +} + +downloadcurl() { + eval $invocation + local remote_path="$1" + local out_path="${2:-}" + + # Append feed_credential as late as possible before calling curl to avoid logging feed_credential + remote_path="${remote_path}${feed_credential}" + + local failed=false + if [ -z "$out_path" ]; then + curl --retry 10 -sSL -f --create-dirs "$remote_path" || failed=true + else + curl --retry 10 -sSL -f --create-dirs -o "$out_path" "$remote_path" || failed=true + fi + if [ "$failed" = true ]; then + say_verbose "Curl download failed" + return 1 + fi + return 0 +} + +downloadwget() { + eval $invocation + local remote_path="$1" + local out_path="${2:-}" + + # Append feed_credential as late as possible before calling wget to avoid logging feed_credential + remote_path="${remote_path}${feed_credential}" + + local failed=false + if [ -z "$out_path" ]; then + wget -q --tries 10 -O - "$remote_path" || failed=true + else + wget --tries 10 -O "$out_path" "$remote_path" || failed=true + fi + if [ "$failed" = true ]; then + say_verbose "Wget download failed" + return 1 + fi + return 0 +} + +calculate_vars() { + eval $invocation + valid_legacy_download_link=true + + normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")" + say_verbose "normalized_architecture=$normalized_architecture" + + specific_version="$(get_specific_version_from_version "$azure_feed" "$channel" "$normalized_architecture" "$version")" + say_verbose "specific_version=$specific_version" + if [ -z "$specific_version" ]; then + say_err "Could not get version information." + return 1 + fi + + download_link="$(construct_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" + say_verbose "download_link=$download_link" + + legacy_download_link="$(construct_legacy_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false + + if [ "$valid_legacy_download_link" = true ]; then + say_verbose "legacy_download_link=$legacy_download_link" + else + say_verbose "Cound not construct a legacy_download_link; omitting..." + fi + + install_root="$(resolve_installation_path "$install_dir")" + say_verbose "install_root=$install_root" +} + +install_dotnet() { + eval $invocation + local download_failed=false + local asset_name='' + local asset_relative_path='' + + if [[ "$runtime" == "dotnet" ]]; then + asset_relative_path="shared/Microsoft.NETCore.App" + asset_name=".NET Core Runtime" + elif [[ "$runtime" == "aspnetcore" ]]; then + asset_relative_path="shared/Microsoft.AspNetCore.App" + asset_name="ASP.NET Core Runtime" + elif [ -z "$runtime" ]; then + asset_relative_path="sdk" + asset_name=".NET Core SDK" + else + say_err "Invalid value for \$runtime" + return 1 + fi + + # Check if the SDK version is already installed. + if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then + say "$asset_name version $specific_version is already installed." + return 0 + fi + + mkdir -p "$install_root" + zip_path="$(mktemp "$temporary_file_template")" + say_verbose "Zip path: $zip_path" + + say "Downloading link: $download_link" + + # Failures are normal in the non-legacy case for ultimately legacy downloads. + # Do not output to stderr, since output to stderr is considered an error. + download "$download_link" "$zip_path" 2>&1 || download_failed=true + + # if the download fails, download the legacy_download_link + if [ "$download_failed" = true ]; then + say "Cannot download: $download_link" + + if [ "$valid_legacy_download_link" = true ]; then + download_failed=false + download_link="$legacy_download_link" + zip_path="$(mktemp "$temporary_file_template")" + say_verbose "Legacy zip path: $zip_path" + say "Downloading legacy link: $download_link" + download "$download_link" "$zip_path" 2>&1 || download_failed=true + fi + fi + + if [ "$download_failed" = true ]; then + say_err "Could not download $asset_name version $specific_version" + return 1 + fi + + say "Extracting zip from $download_link" + extract_dotnet_package "$zip_path" "$install_root" + + # Check if the SDK version is now installed; if not, fail the installation. + if ! is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then + say_err "$asset_name version $specific_version failed to install with an unknown error." + return 1 + fi + + return 0 +} + +local_version_file_relative_path="/.version" +bin_folder_relative_path="" +temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX" + +channel="LTS" +version="Latest" +install_dir="" +architecture="" +dry_run=false +no_path=false +no_cdn=false +azure_feed="https://dotnetcli.azureedge.net/dotnet" +uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet" +feed_credential="" +verbose=false +runtime="" +runtime_id="" +override_non_versioned_files=true + +while [ $# -ne 0 ] +do + name="$1" + case "$name" in + -c|--channel|-[Cc]hannel) + shift + channel="$1" + ;; + -v|--version|-[Vv]ersion) + shift + version="$1" + ;; + -i|--install-dir|-[Ii]nstall[Dd]ir) + shift + install_dir="$1" + ;; + --arch|--architecture|-[Aa]rch|-[Aa]rchitecture) + shift + architecture="$1" + ;; + --shared-runtime|-[Ss]hared[Rr]untime) + say_warning "The --shared-runtime flag is obsolete and may be removed in a future version of this script. The recommended usage is to specify '--runtime dotnet'." + if [ -z "$runtime" ]; then + runtime="dotnet" + fi + ;; + --runtime|-[Rr]untime) + shift + runtime="$1" + if [[ "$runtime" != "dotnet" ]] && [[ "$runtime" != "aspnetcore" ]]; then + say_err "Unsupported value for --runtime: '$1'. Valid values are 'dotnet' and 'aspnetcore'." + exit 1 + fi + ;; + --dry-run|-[Dd]ry[Rr]un) + dry_run=true + ;; + --no-path|-[Nn]o[Pp]ath) + no_path=true + ;; + --verbose|-[Vv]erbose) + verbose=true + ;; + --no-cdn|-[Nn]o[Cc]dn) + no_cdn=true + ;; + --azure-feed|-[Aa]zure[Ff]eed) + shift + azure_feed="$1" + ;; + --uncached-feed|-[Uu]ncached[Ff]eed) + shift + uncached_feed="$1" + ;; + --feed-credential|-[Ff]eed[Cc]redential) + shift + feed_credential="$1" + ;; + --runtime-id|-[Rr]untime[Ii]d) + shift + runtime_id="$1" + ;; + --skip-non-versioned-files|-[Ss]kip[Nn]on[Vv]ersioned[Ff]iles) + override_non_versioned_files=false + ;; + -?|--?|-h|--help|-[Hh]elp) + script_name="$(basename "$0")" + echo ".NET Tools Installer" + echo "Usage: $script_name [-c|--channel ] [-v|--version ] [-p|--prefix ]" + echo " $script_name -h|-?|--help" + echo "" + echo "$script_name is a simple command line interface for obtaining dotnet cli." + echo "" + echo "Options:" + echo " -c,--channel Download from the channel specified, Defaults to \`$channel\`." + echo " -Channel" + echo " Possible values:" + echo " - Current - most current release" + echo " - LTS - most current supported release" + echo " - 2-part version in a format A.B - represents a specific release" + echo " examples: 2.0; 1.0" + echo " - Branch name" + echo " examples: release/2.0.0; Master" + echo " -v,--version Use specific VERSION, Defaults to \`$version\`." + echo " -Version" + echo " Possible values:" + echo " - latest - most latest build on specific channel" + echo " - coherent - most latest coherent build on specific channel" + echo " coherent applies only to SDK downloads" + echo " - 3-part version in a format A.B.C - represents specific version of build" + echo " examples: 2.0.0-preview2-006120; 1.1.0" + echo " -i,--install-dir Install under specified location (see Install Location below)" + echo " -InstallDir" + echo " --architecture Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`." + echo " --arch,-Architecture,-Arch" + echo " Possible values: x64, arm, and arm64" + echo " --runtime Installs a shared runtime only, without the SDK." + echo " -Runtime" + echo " Possible values:" + echo " - dotnet - the Microsoft.NETCore.App shared runtime" + echo " - aspnetcore - the Microsoft.AspNetCore.App shared runtime" + echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable." + echo " -SkipNonVersionedFiles" + echo " --dry-run,-DryRun Do not perform installation. Display download link." + echo " --no-path, -NoPath Do not set PATH for the current process." + echo " --verbose,-Verbose Display diagnostics information." + echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed, This parameter typically is not changed by the user." + echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user." + echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly." + echo " --feed-credential,-FeedCredential Azure feed shared access token. This parameter typically is not specified." + echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)." + echo " -RuntimeId" + echo " -?,--?,-h,--help,-Help Shows this help message" + echo "" + echo "Obsolete parameters:" + echo " --shared-runtime The recommended alternative is '--runtime dotnet'." + echo " -SharedRuntime Installs just the shared runtime bits, not the entire SDK." + echo "" + echo "Install Location:" + echo " Location is chosen in following order:" + echo " - --install-dir option" + echo " - Environmental variable DOTNET_INSTALL_DIR" + echo " - $HOME/.dotnet" + exit 0 + ;; + *) + say_err "Unknown argument \`$name\`" + exit 1 + ;; + esac + + shift +done + +if [ "$no_cdn" = true ]; then + azure_feed="$uncached_feed" +fi + +check_min_reqs +calculate_vars + +if [ "$dry_run" = true ]; then + say "Payload URL: $download_link" + if [ "$valid_legacy_download_link" = true ]; then + say "Legacy payload URL: $legacy_download_link" + fi + say "Repeatable invocation: ./$(basename "$0") --version $specific_version --channel $channel --install-dir $install_dir" + exit 0 +fi + +check_pre_reqs +install_dotnet + +bin_path="$(get_absolute_path "$(combine_paths "$install_root" "$bin_folder_relative_path")")" +if [ "$no_path" = false ]; then + say "Adding to current process PATH: \`$bin_path\`. Note: This change will be visible only when sourcing script." + export PATH="$bin_path":"$PATH" +else + say "Binaries of dotnet can be found in $bin_path" +fi + +say "Installation finished successfully." diff --git a/dev-portal/katoolin b/dev-portal/katoolin new file mode 160000 index 0000000..44202dc --- /dev/null +++ b/dev-portal/katoolin @@ -0,0 +1 @@ +Subproject commit 44202dc567ba45270c3de554485d0d5cb61ffb2c diff --git a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.assets.cache b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.assets.cache index b3ddc27..1d3a82b 100644 Binary files a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.assets.cache and b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.assets.cache differ diff --git a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.CoreCompileInputs.cache b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.CoreCompileInputs.cache index 41c3505..46cbd7c 100644 --- a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.CoreCompileInputs.cache +++ b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -82c94cbdf01f77aeeb78261d8a61650605c0a650 +ba205d03ee43f8c307fa6bd85a60fa0922636378 diff --git a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.FileListAbsolute.txt b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.FileListAbsolute.txt index 4d89755..8bcba73 100644 --- a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.FileListAbsolute.txt +++ b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.FileListAbsolute.txt @@ -1,14 +1,28 @@ -E:\Projects\nullptr-bot\dev-portal\bin\Debug\netcoreapp2.1\dev-portal.deps.json -E:\Projects\nullptr-bot\dev-portal\bin\Debug\netcoreapp2.1\dev-portal.runtimeconfig.json -E:\Projects\nullptr-bot\dev-portal\bin\Debug\netcoreapp2.1\dev-portal.runtimeconfig.dev.json -E:\Projects\nullptr-bot\dev-portal\bin\Debug\netcoreapp2.1\dev-portal.dll -E:\Projects\nullptr-bot\dev-portal\bin\Debug\netcoreapp2.1\dev-portal.pdb -E:\Projects\nullptr-bot\dev-portal\obj\Debug\netcoreapp2.1\dev-portal.csprojAssemblyReference.cache -E:\Projects\nullptr-bot\dev-portal\obj\Debug\netcoreapp2.1\dev-portal.csproj.CoreCompileInputs.cache -E:\Projects\nullptr-bot\dev-portal\obj\Debug\netcoreapp2.1\dev-portal.RazorAssemblyInfo.cache -E:\Projects\nullptr-bot\dev-portal\obj\Debug\netcoreapp2.1\dev-portal.RazorAssemblyInfo.cs -E:\Projects\nullptr-bot\dev-portal\obj\Debug\netcoreapp2.1\dev-portal.AssemblyInfoInputs.cache -E:\Projects\nullptr-bot\dev-portal\obj\Debug\netcoreapp2.1\dev-portal.AssemblyInfo.cs -E:\Projects\nullptr-bot\dev-portal\obj\Debug\netcoreapp2.1\dev-portal.RazorTargetAssemblyInfo.cache -E:\Projects\nullptr-bot\dev-portal\obj\Debug\netcoreapp2.1\dev-portal.dll -E:\Projects\nullptr-bot\dev-portal\obj\Debug\netcoreapp2.1\dev-portal.pdb +E:/Projects/nullptr-bot/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.deps.json +E:/Projects/nullptr-bot/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.runtimeconfig.json +E:/Projects/nullptr-bot/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.runtimeconfig.dev.json +E:/Projects/nullptr-bot/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.dll +E:/Projects/nullptr-bot/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.pdb +E:/Projects/nullptr-bot/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csprojAssemblyReference.cache +E:/Projects/nullptr-bot/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.CoreCompileInputs.cache +E:/Projects/nullptr-bot/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.RazorAssemblyInfo.cache +E:/Projects/nullptr-bot/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.RazorAssemblyInfo.cs +E:/Projects/nullptr-bot/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.AssemblyInfoInputs.cache +E:/Projects/nullptr-bot/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.AssemblyInfo.cs +E:/Projects/nullptr-bot/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.RazorTargetAssemblyInfo.cache +E:/Projects/nullptr-bot/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.dll +E:/Projects/nullptr-bot/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.pdb +/home/ben/Desktop/Programming/nullptr/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.deps.json +/home/ben/Desktop/Programming/nullptr/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.runtimeconfig.json +/home/ben/Desktop/Programming/nullptr/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.runtimeconfig.dev.json +/home/ben/Desktop/Programming/nullptr/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.dll +/home/ben/Desktop/Programming/nullptr/dev-portal/bin/Debug/netcoreapp2.1/dev-portal.pdb +/home/ben/Desktop/Programming/nullptr/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csprojAssemblyReference.cache +/home/ben/Desktop/Programming/nullptr/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csproj.CoreCompileInputs.cache +/home/ben/Desktop/Programming/nullptr/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.RazorAssemblyInfo.cache +/home/ben/Desktop/Programming/nullptr/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.RazorAssemblyInfo.cs +/home/ben/Desktop/Programming/nullptr/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.AssemblyInfoInputs.cache +/home/ben/Desktop/Programming/nullptr/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.AssemblyInfo.cs +/home/ben/Desktop/Programming/nullptr/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.RazorTargetAssemblyInfo.cache +/home/ben/Desktop/Programming/nullptr/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.dll +/home/ben/Desktop/Programming/nullptr/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.pdb diff --git a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csprojAssemblyReference.cache b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csprojAssemblyReference.cache index 450aa1a..6d222ad 100644 Binary files a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csprojAssemblyReference.cache and b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.csprojAssemblyReference.cache differ diff --git a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.dll b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.dll index 5d06f31..6fba4e0 100644 Binary files a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.dll and b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.dll differ diff --git a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.pdb b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.pdb index 7c4dc6c..e85d5a0 100644 Binary files a/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.pdb and b/dev-portal/obj/Debug/netcoreapp2.1/dev-portal.pdb differ diff --git a/dev-portal/obj/Debug/netcoreapp2.1/project.razor.json b/dev-portal/obj/Debug/netcoreapp2.1/project.razor.json new file mode 100644 index 0000000..7abdd4c --- /dev/null +++ b/dev-portal/obj/Debug/netcoreapp2.1/project.razor.json @@ -0,0 +1,14 @@ +{ + "ProjectFilePath": "/home/ben/Desktop/Programming/nullptr/dev-portal/dev-portal.csproj", + "TargetFramework": "netcoreapp2.1", + "TagHelpers": [], + "Configuration": { + "ConfigurationName": "MVC-2.1", + "LanguageVersion": "2.1", + "Extensions": [ + { + "ExtensionName": "MVC-2.1" + } + ] + } +} \ No newline at end of file diff --git a/dev-portal/obj/dev-portal.csproj.nuget.cache b/dev-portal/obj/dev-portal.csproj.nuget.cache index 90bccf3..4d9e5bf 100644 --- a/dev-portal/obj/dev-portal.csproj.nuget.cache +++ b/dev-portal/obj/dev-portal.csproj.nuget.cache @@ -1,5 +1,5 @@ { "version": 1, - "dgSpecHash": "wQdsbnHmGUMpJblL2M6rryzAM/pmB+c5MuIaoeSlSPMIloAaL67AwTixJTWrHWCmnzABCPctDBg6zAu5t/209A==", + "dgSpecHash": "6dEGqxNtZbG6ntsUt4zsxQTDm+Az56mjtpk7O++Z7qk0QH2f/PuoKS/iDWr/An++PNvfBn7CvoDlnXQzMwE0yw==", "success": true } \ No newline at end of file diff --git a/dev-portal/obj/dev-portal.csproj.nuget.g.props b/dev-portal/obj/dev-portal.csproj.nuget.g.props index c04651c..61715ca 100644 --- a/dev-portal/obj/dev-portal.csproj.nuget.g.props +++ b/dev-portal/obj/dev-portal.csproj.nuget.g.props @@ -3,22 +3,25 @@ True NuGet - E:\Projects\nullptr-bot\dev-portal\obj\project.assets.json - $(UserProfile)\.nuget\packages\ - C:\Users\Ben\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder + /home/ben/Desktop/Programming/nullptr/dev-portal/obj/project.assets.json + /home/ben/.nuget/packages/ + /home/ben/.nuget/packages/;/usr/share/dotnet/sdk/NuGetFallbackFolder PackageReference - 4.8.0 + 4.9.0 $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - - - + + + + + + + + + /home/ben/.nuget/packages/microsoft.aspnetcore.razor.design/2.1.1 + \ No newline at end of file diff --git a/dev-portal/obj/dev-portal.csproj.nuget.g.targets b/dev-portal/obj/dev-portal.csproj.nuget.g.targets index 2d7dd28..ce9dd6b 100644 --- a/dev-portal/obj/dev-portal.csproj.nuget.g.targets +++ b/dev-portal/obj/dev-portal.csproj.nuget.g.targets @@ -4,12 +4,12 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - - - + + + + + + + \ No newline at end of file diff --git a/dev-portal/obj/project.assets.json b/dev-portal/obj/project.assets.json index 968bb7d..56669ee 100644 --- a/dev-portal/obj/project.assets.json +++ b/dev-portal/obj/project.assets.json @@ -4338,10 +4338,11 @@ }, "libraries": { "Microsoft.AspNet.WebApi.Client/5.2.6": { - "sha512": "rMDlyePoxggkmN/qgha1+BR2Uy+dOr38xKCQOPfVNKGY07R2nYJGMTKJFE1XFgwD70RYUNazf2fqutjJF18XgQ==", + "sha512": "AIgEc1up4pvH8kXy+eG1x4Qfqd6piAq3yk11pveCQXWNkkYoiKdflSmcJZuWcerdMcAaoF0xC/mWGoTW4vF4Dg==", "type": "package", "path": "microsoft.aspnet.webapi.client/5.2.6", "files": [ + ".nupkg.metadata", ".signature.p7s", "lib/net45/System.Net.Http.Formatting.dll", "lib/net45/System.Net.Http.Formatting.xml", @@ -5170,10 +5171,12 @@ ] }, "Microsoft.AspNetCore.Razor.Design/2.1.1": { - "sha512": "f8PKGcxiezL1RVqmnmrazj24Mj4KCTSXqwdotl7Lc+82h8iLV7ItxEIShTJakG7M9iw0ZuCocM0J/IhYesdQrg==", + "sha512": "BOK5fckW9v7xWjpEI6bPGwkjw10OPVASZcAa8HoWJo/0Mmg4Azddj92v8noU+YgvD/6zNZ9o/RiRXXKxk5rYwQ==", "type": "package", "path": "microsoft.aspnetcore.razor.design/2.1.1", + "hasTools": true, "files": [ + ".nupkg.metadata", ".signature.p7s", "build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets", "build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.props", @@ -5283,10 +5286,11 @@ ] }, "Microsoft.AspNetCore.Routing.Abstractions/2.1.1": { - "sha512": "+Yxsy/ZcCthcziktuhfC6WpQ/cZzgD/IsQ96xefNKrCzIm9jXjfNK3ONsoScvyFFihNohp7zAVPiic5J6CvUDw==", + "sha512": "9saJjHhST3JmFKuZ1mPU9FJcpgUyPNoJxRMSV2nkSjiEekQN4jxswtBBeIRVDonjq50KKqSWbcyyQtvV4tgKzw==", "type": "package", "path": "microsoft.aspnetcore.routing.abstractions/2.1.1", "files": [ + ".nupkg.metadata", ".signature.p7s", "lib/netstandard2.0/Microsoft.AspNetCore.Routing.Abstractions.dll", "lib/netstandard2.0/Microsoft.AspNetCore.Routing.Abstractions.xml", @@ -5471,10 +5475,11 @@ ] }, "Microsoft.AspNetCore.StaticFiles/2.1.1": { - "sha512": "3xumS58evfsC4cd8OXtYRafbwuVk5c37dsGQ1E1m0wZvRVUXScRWkTGdcPJcijoImlhoQK2pj6sY7NFMc5PfbQ==", + "sha512": "Jb4YKaDpPqrcSBxGChOCUmgkuqRKkwe3t5o6GWeoNUENf4hQDuobUvouXKHVw3KuEFIBVArZB984fuVGQW0eAw==", "type": "package", "path": "microsoft.aspnetcore.staticfiles/2.1.1", "files": [ + ".nupkg.metadata", ".signature.p7s", "lib/netstandard2.0/Microsoft.AspNetCore.StaticFiles.dll", "lib/netstandard2.0/Microsoft.AspNetCore.StaticFiles.xml", @@ -5523,10 +5528,11 @@ ] }, "Microsoft.CodeAnalysis.Common/2.8.0": { - "sha512": "lYUBqh3OD3iEQqxt9KB472VzgOnEKoUVG4Lx5Xw4oJe9dZtITkHFtct+T73jH3FOASFI1NSzzP5MBM0c9zZspA==", + "sha512": "A2a4NejNvWVz+8FPXkZK/cd2j4/P3laHwpz56UU3fDcOAVu4Xb98T6FXGAIgqE/LzSVpHnn9Cgg7rhT59qsO8w==", "type": "package", "path": "microsoft.codeanalysis.common/2.8.0", "files": [ + ".nupkg.metadata", ".signature.p7s", "lib/netstandard1.3/Microsoft.CodeAnalysis.dll", "lib/netstandard1.3/Microsoft.CodeAnalysis.pdb", @@ -5536,10 +5542,11 @@ ] }, "Microsoft.CodeAnalysis.CSharp/2.8.0": { - "sha512": "+4CHAwHMwLO5GRqPJ7Khv2Ny//omhukPKP3Ny/d2XDpt11bX35zb9pTziwZN0eNvxj6a46joIdHEYQ1JsekI3w==", + "sha512": "+GGCTxkBjf9lFEZhVOG4iEO5YkuWCO5q+kUF787NJ8Twy3EOyLrjtZ8K7q+kH/PnSjSkN0AvWwL2NQCmT1H6mA==", "type": "package", "path": "microsoft.codeanalysis.csharp/2.8.0", "files": [ + ".nupkg.metadata", ".signature.p7s", "lib/netstandard1.3/Microsoft.CodeAnalysis.CSharp.dll", "lib/netstandard1.3/Microsoft.CodeAnalysis.CSharp.pdb", @@ -5923,10 +5930,11 @@ ] }, "Microsoft.Extensions.DependencyInjection/2.1.1": { - "sha512": "2nshYaLTn73Ie+/yTkb7EZIXwQeFIXsYCBy/jSY9bMayYykGNjdWa25frayhuPAGVbZpEgfgp3d4JRVEuVyEqQ==", + "sha512": "ZPFcDUbSwaEVWMyef8+9GqiTAghHX+eLeIEW032i4LDFAdyM4J4brV0UzChlKtClT7cuip/Of6G+veDnO3/bCw==", "type": "package", "path": "microsoft.extensions.dependencyinjection/2.1.1", "files": [ + ".nupkg.metadata", ".signature.p7s", "lib/net461/Microsoft.Extensions.DependencyInjection.dll", "lib/net461/Microsoft.Extensions.DependencyInjection.xml", @@ -6048,10 +6056,11 @@ ] }, "Microsoft.Extensions.Hosting/2.1.1": { - "sha512": "JCQMO9b49MO7b2e3myP6b0KsAJvRL9auv0A/Pn4w2Q1dt9D29tWvuji8b2jGfHVZcal9GRbtwwdnAD1mN4x3VQ==", + "sha512": "429Rqyy8tzVZq9UJCKqD+r/9XobPYn/xGxMPyQxmqOZJQPjXXzYAjjZhQ5onCWPFPWbfw430RKRyBTa341kCJA==", "type": "package", "path": "microsoft.extensions.hosting/2.1.1", "files": [ + ".nupkg.metadata", ".signature.p7s", "lib/netstandard2.0/Microsoft.Extensions.Hosting.dll", "lib/netstandard2.0/Microsoft.Extensions.Hosting.xml", @@ -6276,10 +6285,12 @@ ] }, "Microsoft.IdentityModel.Logging/5.2.0": { - "sha512": "OgiaeDGsuTpXrx77a4gyN6Flp4y7jro4La92UtVEEVxnRb+TnRxawVYY3Z5EVme5fSwvE31vo2iNAwI/jBKjPg==", + "sha512": "D9uipmVVfJoNv1AzzLR4547+MiwrXElN6bVym3UqZm8/n2LUVdmbHUSQYwqC/gOjHK2vEzXP4NTwHnL+F54q5A==", "type": "package", "path": "microsoft.identitymodel.logging/5.2.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/Microsoft.IdentityModel.Logging.dll", "lib/net45/Microsoft.IdentityModel.Logging.xml", "lib/net451/Microsoft.IdentityModel.Logging.dll", @@ -6291,10 +6302,12 @@ ] }, "Microsoft.IdentityModel.Protocols/5.2.0": { - "sha512": "pakGqbE3FRort3vb0qqWI0Qfy84IOXs8sG7ygANUpoRT+544svQ62JfvCX4UPnqf5bCUpSxVc3rDh8yCQBtc7w==", + "sha512": "ZvW6FGD9M4JRJnU9GyCnK22vpWX4itIousHD7v9V/XWb6HUmzfKsb7S9QfzOfnNcNr2eK8nLV50S0v1QMR9ERg==", "type": "package", "path": "microsoft.identitymodel.protocols/5.2.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/Microsoft.IdentityModel.Protocols.dll", "lib/net45/Microsoft.IdentityModel.Protocols.xml", "lib/net451/Microsoft.IdentityModel.Protocols.dll", @@ -6306,10 +6319,12 @@ ] }, "Microsoft.IdentityModel.Protocols.OpenIdConnect/5.2.0": { - "sha512": "hMjsfdvgI/Gk/HWPgyVnju6fy3iULralgn1XU6eL17KkkFN2rJ1fDzJX3RKrjr888Y5S+hTSQAUcGzb4Fe3aBA==", + "sha512": "IbrtvKFSJLGoCTnDEldkWodt/U3x1OduaFuuVxo8RtvCwZkSp/08OtIlVzdLeJG8bCzQs6p7FV6Xh/a52B0jdw==", "type": "package", "path": "microsoft.identitymodel.protocols.openidconnect/5.2.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll", "lib/net45/Microsoft.IdentityModel.Protocols.OpenIdConnect.xml", "lib/net451/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll", @@ -6321,10 +6336,12 @@ ] }, "Microsoft.IdentityModel.Protocols.WsFederation/5.2.0": { - "sha512": "7yohKgLzTObwy+Yq/WNshe2ar+9MZJischkn+L+IIQhpZCKWixr0QFR0V/1TzvGVeXBR/AJY/luZRLx84RlzJw==", + "sha512": "tZJI6PD4/QPBXfTNy/FlGYzi+ebV3pUikoYjmEFApuxJ+RXZ2yuqTDR/gpF6m8TuR4jmX3y+ILqYTy0bPuJK9w==", "type": "package", "path": "microsoft.identitymodel.protocols.wsfederation/5.2.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/Microsoft.IdentityModel.Protocols.WsFederation.dll", "lib/net45/Microsoft.IdentityModel.Protocols.WsFederation.xml", "lib/net451/Microsoft.IdentityModel.Protocols.WsFederation.dll", @@ -6336,10 +6353,12 @@ ] }, "Microsoft.IdentityModel.Tokens/5.2.0": { - "sha512": "Uz1Dk5Gw/jgIHEzac9cXhq7pH0Hf5P73vf23hR6QJn0IamLbPG4qoHnGyPMn9qQXc+jDb/j3fWOhvWGrteJXtA==", + "sha512": "ptAbeNOZ++Ioq6eGFhSzcC/oCYMkB/XSuWp9jkaQHz8S2Lxm4wrB2yvYNqlYd88+7L56Ywa9WMCgx94heQvtIw==", "type": "package", "path": "microsoft.identitymodel.tokens/5.2.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/Microsoft.IdentityModel.Tokens.dll", "lib/net45/Microsoft.IdentityModel.Tokens.xml", "lib/net451/Microsoft.IdentityModel.Tokens.dll", @@ -6351,10 +6370,12 @@ ] }, "Microsoft.IdentityModel.Tokens.Saml/5.2.0": { - "sha512": "db9y9zHTxeVwTi91mqBu4u1h5tlseQxhXMlGBd7bousED/FcEuhRiVK1maXjoHyQTnYbFDGPvYKXxznDI5jBGQ==", + "sha512": "3XCXxwPFOG7uJkDx2hD4vv/5UTKWPnDdmh69jRcXUbEgEC8HVdTbViIrQJien+5WefScalMGYIwA4lnLooxRYw==", "type": "package", "path": "microsoft.identitymodel.tokens.saml/5.2.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/Microsoft.IdentityModel.Tokens.Saml.dll", "lib/net45/Microsoft.IdentityModel.Tokens.Saml.xml", "lib/net451/Microsoft.IdentityModel.Tokens.Saml.dll", @@ -6366,10 +6387,12 @@ ] }, "Microsoft.IdentityModel.Xml/5.2.0": { - "sha512": "0WB90AfR16LT0ANCQTb+183yWrusPt4QK1F3f9eL59ZiDKeZLx2AeXgrkDUO+7kG55nCPqmeOUDjHDVK4gsRgA==", + "sha512": "Z1ID4pp3VhPVR1JKDw5KRqO1WchJEFSrEasiaQRnxstzUrbos4sd3Faro8nlIOtZxS1Dxu5v5UksaoNxlW7BYw==", "type": "package", "path": "microsoft.identitymodel.xml/5.2.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/Microsoft.IdentityModel.Xml.dll", "lib/net45/Microsoft.IdentityModel.Xml.xml", "lib/net451/Microsoft.IdentityModel.Xml.dll", @@ -6697,10 +6720,11 @@ ] }, "Microsoft.NETCore.Platforms/2.1.0": { - "sha512": "TT+QCi9LcxGTjBssH7S7n5+8DVcwfG4DYgXX7Dk7+BfZ4oVHj8Q0CbYk9glzAlHLsSt3bYzol+fOdra2iu6GOw==", + "sha512": "aSTPL94NloSiQVL5Len8wbjFKOnoAX/vOh3s3DF6g3c7GUUMLCDvnBhmA72M2iN2AedyA8hpr7m89kzSAKUnJQ==", "type": "package", "path": "microsoft.netcore.platforms/2.1.0", "files": [ + ".nupkg.metadata", ".signature.p7s", "LICENSE.TXT", "THIRD-PARTY-NOTICES.TXT", @@ -6895,10 +6919,12 @@ ] }, "Newtonsoft.Json/11.0.2": { - "sha512": "IvJe1pj7JHEsP8B8J8DwlMEx8UInrs/x+9oVY+oCD13jpLu4JbJU2WCIsMRn5C4yW9+DgkaO8uiVE5VHKjpmdQ==", + "sha512": "znZGbws7E4BA9jxNZ7FuiIRI3C9hrgatVQSTKhIYZYNOud4M5VfGlTYi6RdYO5sQrebFuF/g9UEV3hOxDMXF6Q==", "type": "package", "path": "newtonsoft.json/11.0.2", "files": [ + ".nupkg.metadata", + ".signature.p7s", "LICENSE.md", "lib/net20/Newtonsoft.Json.dll", "lib/net20/Newtonsoft.Json.xml", @@ -6923,10 +6949,12 @@ ] }, "Newtonsoft.Json.Bson/1.0.1": { - "sha512": "5PYT/IqQ+UK31AmZiSS102R6EsTo+LGTSI8bp7WAUqDKaF4wHXD8U9u4WxTI1vc64tYi++8p3dk3WWNqPFgldw==", + "sha512": "W5Ke5xei9yS0ljQZuT75VgSp5M43eCPm5hHAelvKyGGU4dV7hYCmtwdsxoADb/exO6pYHeu/Iki43TdYPzfESQ==", "type": "package", "path": "newtonsoft.json.bson/1.0.1", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/Newtonsoft.Json.Bson.dll", "lib/net45/Newtonsoft.Json.Bson.xml", "lib/netstandard1.3/Newtonsoft.Json.Bson.dll", @@ -6936,10 +6964,12 @@ ] }, "Remotion.Linq/2.2.0": { - "sha512": "fK/76UmpC0FXBlGDFVPLJHQlDLYnGC+XY3eoDgCgbtrhi0vzbXDQ3n/IYHhqSKqXQfGw/u04A1drWs7rFVkRjw==", + "sha512": "twDAH8dAXXCAf3sRv1Tf94u66eEHvgU75hfn1nn2v4fSWXD50XoDOAk8WpSrbViNuMkB4kN1ElnOGm1c519IHg==", "type": "package", "path": "remotion.linq/2.2.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net35/Remotion.Linq.XML", "lib/net35/Remotion.Linq.dll", "lib/net40/Remotion.Linq.XML", @@ -7635,10 +7665,11 @@ ] }, "System.Data.SqlClient/4.5.1": { - "sha512": "qXTvTFkBds7bnN+ntBMHGvmH3pCAkfT4TE1z2Xvfqo4wKMQC77O4aXsYCc7dzCESC+/Gom6l0GLuebpFx7MDvg==", + "sha512": "cTPUCClr34EGBnyazUeciMD6sNm9aiE/li3uGvJ7z5dGup9QxKwysUeKXIrCO0E5KtQQAzGORFEYmowyEpcL2A==", "type": "package", "path": "system.data.sqlclient/4.5.1", "files": [ + ".nupkg.metadata", ".signature.p7s", "LICENSE.TXT", "THIRD-PARTY-NOTICES.TXT", @@ -8287,10 +8318,12 @@ ] }, "System.IdentityModel.Tokens.Jwt/5.2.0": { - "sha512": "E8tNMfMWPvlSF5fvmMIVZZHlGuIZzE5uktuR+GN2gFdngh0k6xoZquxfjKC02d0NqfsshNQVTCdSKXD5e9/lpA==", + "sha512": "2cY4A17XCEdohJ8BsyASM09ZYXVPJirdUudD5rETIuNhS7awKkncO1ifCAQHjb10PpdzLmebJgRI+NHEozSEwQ==", "type": "package", "path": "system.identitymodel.tokens.jwt/5.2.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/System.IdentityModel.Tokens.Jwt.dll", "lib/net45/System.IdentityModel.Tokens.Jwt.xml", "lib/net451/System.IdentityModel.Tokens.Jwt.dll", @@ -8302,10 +8335,12 @@ ] }, "System.Interactive.Async/3.1.1": { - "sha512": "hZccYiIE5RS1/J9Tb/BNtosAGVggdlsJm4Ojdu+gDV0p4AIi+LUfUogMKkRacljQEJd2AG6vYzvcjhQFkqoZmw==", + "sha512": "x9y2omkjEudKbIVuhUzeWw7ZlouEzpk4W98woCEq1lq9gJxERBKRKDTHF5JPEws9E0f4/Uei/2vLxEy1IrfmMg==", "type": "package", "path": "system.interactive.async/3.1.1", "files": [ + ".nupkg.metadata", + ".signature.p7s", "lib/net45/System.Interactive.Async.dll", "lib/net45/System.Interactive.Async.xml", "lib/net46/System.Interactive.Async.dll", @@ -8540,10 +8575,11 @@ ] }, "System.IO.Pipelines/4.5.0": { - "sha512": "Kq9eZWVKN9khHhkatLWLLxYCs3j9qSNMZELqn2YG1YsCMv6bPmAtaN0CfA6l7vxFbiV02C996Dy7yHO8DkaJLg==", + "sha512": "kPBg1oHIqNgZzzIbAFVTfMLmqYid6juXFJv7VnQf7m9K6ooLD8sGZq9rsB+4wZLrgKm0t3TuhBXyPE1StpjqvQ==", "type": "package", "path": "system.io.pipelines/4.5.0", "files": [ + ".nupkg.metadata", ".signature.p7s", "LICENSE.TXT", "THIRD-PARTY-NOTICES.TXT", @@ -8794,10 +8830,12 @@ ] }, "System.Net.Http/4.3.0": { - "sha512": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", + "sha512": "Z1UfSF6dlpCdZdxh6LeoGlYH+q6ptG/iiIWgUUeKhE3DbQACmZkU7Sz2nOX0qdHjz72MOdYRbkSJ5Qwl6sZgvg==", "type": "package", "path": "system.net.http/4.3.0", "files": [ + ".nupkg.metadata", + ".signature.p7s", "ThirdPartyNotices.txt", "dotnet_library_license.txt", "lib/Xamarinmac20/_._", @@ -9622,10 +9660,11 @@ ] }, "System.Runtime.CompilerServices.Unsafe/4.5.1": { - "sha512": "qUJMNWhbm9oZ3XaMFiEMiYmRPszbnXIkRIi7+4b2Md2xZ6JUOepf0/kY3S85qistRohl9OdMe4PsO+RdG2kTIQ==", + "sha512": "x/3d5xb+mc9e4I2GOOT+HPRWMZLbYjNN/kYKsb0fyUKcWizn/t1CIrGRLIBhv7H0ptYEt+WTTztdPmwSUMyKig==", "type": "package", "path": "system.runtime.compilerservices.unsafe/4.5.1", "files": [ + ".nupkg.metadata", ".signature.p7s", "LICENSE.TXT", "THIRD-PARTY-NOTICES.TXT", @@ -11500,30 +11539,28 @@ ] }, "packageFolders": { - "C:\\Users\\Ben\\.nuget\\packages\\": {}, - "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {} + "/home/ben/.nuget/packages/": {}, + "/usr/share/dotnet/sdk/NuGetFallbackFolder": {} }, "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "E:\\Projects\\nullptr-bot\\dev-portal\\dev-portal.csproj", + "projectUniqueName": "/home/ben/Desktop/Programming/nullptr/dev-portal/dev-portal.csproj", "projectName": "dev-portal", - "projectPath": "E:\\Projects\\nullptr-bot\\dev-portal\\dev-portal.csproj", - "packagesPath": "C:\\Users\\Ben\\.nuget\\packages\\", - "outputPath": "E:\\Projects\\nullptr-bot\\dev-portal\\obj\\", + "projectPath": "/home/ben/Desktop/Programming/nullptr/dev-portal/dev-portal.csproj", + "packagesPath": "/home/ben/.nuget/packages/", + "outputPath": "/home/ben/Desktop/Programming/nullptr/dev-portal/obj/", "projectStyle": "PackageReference", "fallbackFolders": [ - "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + "/usr/share/dotnet/sdk/NuGetFallbackFolder" ], "configFilePaths": [ - "C:\\Users\\Ben\\AppData\\Roaming\\NuGet\\NuGet.Config", - "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + "/home/ben/.nuget/NuGet/NuGet.Config" ], "originalTargetFrameworks": [ "netcoreapp2.1" ], "sources": { - "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "https://api.nuget.org/v3/index.json": {} }, "frameworks": { diff --git a/dev-portal/wifresti b/dev-portal/wifresti new file mode 160000 index 0000000..f06a4fe --- /dev/null +++ b/dev-portal/wifresti @@ -0,0 +1 @@ +Subproject commit f06a4fe60d9514a64a270776ee0d68cbae988ceb diff --git a/src/commandmanager.js b/src/commandmanager.js new file mode 100644 index 0000000..7dec935 --- /dev/null +++ b/src/commandmanager.js @@ -0,0 +1,93 @@ +import fs from 'fs'; + +import {Logger} from './logger'; + +let modules = []; +let commands = []; + +export class CommandManager { + static get Modules() {return modules;} + static get Commands() {return commands;} + + static async load(log) { + if (log != 1) console.log(); + + Logger.info('Loading Commands and Modules'); + if (!fs.existsSync('./src/commands/')) { + Logger.panic('No commands folder at /src/commands'); + } + + const moduleFiles = fs.readdirSync('./src/commands'); + const moduleCount = moduleFiles.length; + let commandCount = 0; + + // Loops through all files and + for (let file of moduleFiles) { + let mod = require('./commands/' + file.split('.')[0]); + let modExports = Object.keys(mod); + + // TODO: This doesnt work, throws "Module is not defined" + // if (!modExports['Module']) { + // Logger.warn(`No module in file ${file}, is Module being exported?`); + // continue; + // } + if (!mod.Module.Name || !mod.Module.Author) { + Logger.panic(`Module ${file} has no Name field, make sure it has a getter for Name and Author`); + continue; + } + + modules[mod.Module.Name] = {name: mod.Module.Name, module: mod, exports: modExports, file: file}; + Logger.info(`Loaded ${mod.Module.Name} from ${file}`); + + for (let command of modExports) { + if (command == 'Module') continue; + let current = mod[command] + + if ( !current.Command + || !current.Alias + || !current.Usage + || !current.Description + || !current.Module + || !current.Init + || !current.Exec + || !current.Dispose) { + Logger.warn(`Exported class ${command} in ${file} and module ${mod.Module.Name} is not a valid command`); + continue; + } + + await current.Init(); + commands[current.Command] = current; // Doesnt give support for alias commands + + Logger.info(`Loaded ${current.Command} from module ${mod.Module.Name}`); + commandCount++; + } + } + + Logger.info(`Loaded ${commandCount} commands from ${moduleCount} modules`); + console.log(); + } + + + static async reload() { + console.log(); + Logger.info('Reloading Modules and Commands'); + + for (let command in commands) { + await commands[command].Dispose(); + } + Logger.info('Disposed registerd commands'); + + // This broke af lol ReeEEEEeeE + for (let mod in modules) { + // Logger.error(modules[mod].module); + // await modules[mod].module.Dispose(); + delete require.cache[require.resolve(modules[mod].mod)]; //file.split('.')[0])]; + } + Logger.info('Disposed registerd modules'); + + modules = []; + commands = []; + + CommandManager.load(1); + } +} diff --git a/src/commands/common.js b/src/commands/common.js new file mode 100644 index 0000000..1f2f8c3 --- /dev/null +++ b/src/commands/common.js @@ -0,0 +1,38 @@ +import {Logger} from "../logger"; + +export class Module { + static get Name() {return 'Generic module 1'} + static get Author() {return 'Ben (plane000)#8618'} + + static Init() { + + } +} + +export class Command1 { + static get Command() {return 'command1'} + static get Alias() {return ['alias1', 'alias2']} + static get Usage() {return 'command1 [args]'} + static get Description() {return 'Echos the users input'} + static get Module() {return Module;} + + static async Init() { + + } + + static async Exec(message, client, next) { + + } + + static async Dispose() { + Logger.error('command disposed') + } +} + +function HelperThatDoesntGetSeenByTheModuleLoader() { + +} + +export class Command2 { + +} diff --git a/src/database/basedatabase.js b/src/database/basedatabase.js index 6e4c65e..523905c 100644 --- a/src/database/basedatabase.js +++ b/src/database/basedatabase.js @@ -19,7 +19,7 @@ export class BaseDatabase { operatorsAliases: false, storage: './resources/database.sqlite', }); - + Guild = Connection.define('Guild', { id: { type: Sequelize.BIGINT, @@ -39,4 +39,3 @@ export class BaseDatabase { Logger.info('Connected to SQLite Database'); } } - diff --git a/src/database/database.js b/src/database/database.js index 063f959..7dd7966 100644 --- a/src/database/database.js +++ b/src/database/database.js @@ -1,6 +1,6 @@ import Sequelize from 'sequelize'; -import {BaseDatabase} from './baseDatabase'; +import {BaseDatabase} from './basedatabase'; import {Logger} from '../logger'; export class Database extends BaseDatabase { diff --git a/src/database/guild.js b/src/database/guild.js index 69a975a..e97025f 100644 --- a/src/database/guild.js +++ b/src/database/guild.js @@ -1,6 +1,6 @@ import Sequelize from 'sequelize'; -import {BaseDatabase} from './baseDatabase'; +import {BaseDatabase} from './basedatabase'; import {Logger} from '../logger'; export class GuildTools extends BaseDatabase { diff --git a/src/events.js b/src/events.js index 704a695..6a63438 100644 --- a/src/events.js +++ b/src/events.js @@ -1,45 +1,45 @@ import {Logger} from './logger'; import {Config} from './config'; import {RateLimits} from './ratelimits' +import {MessageManager} from './messagemanager'; -export class Events extends RateLimits { // extends rate limits +export class Events extends RateLimits { constructor() { super(); } async init(client) { - this.client = client; - this.client.login(Config.Token); + this._client = client; + this._client.login(Config.Token); } get Client() {return this.client;} async handleEvents() { - this.client.on('ready', async () => { + this._client.on('ready', async () => { this.handle(undefined, [this.handleReady], - this.client + this._client ); }); - this.client.on('error', async (err) => { + this._client.on('error', async (err) => { this.handle(err, [this.handleError], - this.client + this._client ); }); - this.client.on('message', async (message) => { + this._client.on('message', async (message) => { this.handle(message, - [super.request, this.handleMessage], - this.client + [super.request, MessageManager.handleMessage], + this._client ); }); } - async handle(obj = [null], callbacks = [undefined], client) { let doNext = false; if (callbacks.length == 0) { @@ -70,10 +70,4 @@ export class Events extends RateLimits { // extends rate limits Logger.error(`An error occured with the Discord API: ${err}`); next(); } - - async handleMessage(message, client, next) { - if (client.user.id == message.author.id) return; - if (message.limiting) message.channel.send(`${message.author} You are being rate limited`); - next(); - } } diff --git a/src/guildmanager.js b/src/guildmanager.js index 26f7846..dbea12f 100644 --- a/src/guildmanager.js +++ b/src/guildmanager.js @@ -4,6 +4,4 @@ export class GuildManager { constructor() { } - - } diff --git a/src/index.js b/src/index.js index ccb212f..912ec03 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,8 @@ import {Logger} from './logger'; import {Config} from './config'; import {Database} from './database/database'; import {Events} from './events'; +import {MessageManager} from './messagemanager'; +import {CommandManager} from './commandmanager'; let client; @@ -15,10 +17,15 @@ export async function init() { Config.load(); await Database.init(); - + + console.log(); + await MessageManager.init(); + client = new Discord.Client(); - + const eventHandler = new Events(); await eventHandler.init(client); eventHandler.handleEvents(); + + CommandManager.reload(); } diff --git a/src/logger.js b/src/logger.js index 4691f83..a11840a 100644 --- a/src/logger.js +++ b/src/logger.js @@ -5,7 +5,7 @@ import fs from 'fs'; let LogLevel = 1; let Dialect = 'SQLITE'; let logPath = 'logs.log'; -let dateFormat = 'DD-MM-YY HH:MM:ss' +let dateFormat = 'DD-MM-YY HH:mm:ss' export class Logger { static init(path) { @@ -46,25 +46,25 @@ export class Logger { static get WARN_LOGS() {return 3;} static database(message) { - if (LogLevel > 0) return; let d = moment().format(dateFormat); fs.appendFileSync(logPath, `[${d.toLocaleString()}] [${Dialect}] ${message} \n`); + if (LogLevel > 0) return; console.log('[' + d.toLocaleString() + '] [' + colours.magenta(Dialect) + '] ' + message); } static middleware(message) { - if (LogLevel > 0) return; let d = moment().format(dateFormat); fs.appendFileSync(logPath, `[${d.toLocaleString()}] [MIDDLEWARE] ${message} \n`); + if (LogLevel > 0) return; console.log('[' + d.toLocaleString() + '] [' + colours.blue('MIDDLEWARE') + '] ' + message); } static debug(message) { - if (LogLevel > 1) return; let d = moment().format(dateFormat); fs.appendFileSync(logPath, `[${d.toLocaleString()}] [DEBUG] ${message} \n`); + if (LogLevel > 1) return; console.log('[' + d.toLocaleString() + '] [' + colours.cyan('DEBUG') + '] ' + message); } @@ -77,17 +77,17 @@ export class Logger { } static info(message) { - if (LogLevel > 2) return; let d = moment().format(dateFormat); fs.appendFileSync(logPath, `[${d.toLocaleString()}] [INFO] ${message} \n`); + if (LogLevel > 2) return; console.log('[' + d.toLocaleString() + '] [' + colours.green('INFO') + '] ' + message); } static warn(message) { - if (LogLevel > 3) return; let d = moment().format(dateFormat); fs.appendFileSync(logPath, `[${d.toLocaleString()}] [WARN] ${message} \n`); + if (LogLevel > 3) return; console.log('[' + d.toLocaleString() + '] [' + colours.yellow('WARN') + '] ' + message); } diff --git a/src/messagemanager.js b/src/messagemanager.js index a5ae72f..2e19b34 100644 --- a/src/messagemanager.js +++ b/src/messagemanager.js @@ -1,5 +1,14 @@ import {Logger} from './logger'; +import {CommandManager} from './commandmanager'; export class MessageManager { - + static async init() { + CommandManager.load(); + } + + static async handleMessage(message, client, next) { + if (client.user.id == message.author.id) return; + if (message.limiting) message.channel.send(`${message.author} You are being rate limited`); + next(); + } }