feat: initial commit
This commit is contained in:
73
.build/Build.fs
Normal file
73
.build/Build.fs
Normal file
@@ -0,0 +1,73 @@
|
||||
open Fake.Core
|
||||
open Fake.IO
|
||||
open Farmer
|
||||
open Farmer.Builders
|
||||
|
||||
open Helpers
|
||||
|
||||
initializeContext()
|
||||
|
||||
let srcPath = Path.getFullName "src"
|
||||
let testPath = Path.getFullName "test"
|
||||
let libPath = None
|
||||
|
||||
let distPath = Path.getFullName "dist"
|
||||
let packPath = Path.getFullName "packages"
|
||||
let versionFile = Path.getFullName ".version"
|
||||
|
||||
Target.create "Clean" (fun _ -> Shell.cleanDir distPath)
|
||||
|
||||
Target.create "InstallClient" (fun _ ->
|
||||
run npm "install" "."
|
||||
run dotnet "tool restore" "."
|
||||
)
|
||||
|
||||
Target.create "Bundle" (fun _ ->
|
||||
run dotnet $"publish -c Release -o {distPath}" srcPath
|
||||
)
|
||||
|
||||
Target.create "BundleDebug" (fun _ ->
|
||||
run dotnet $"publish -c Debug -o {distPath}" srcPath
|
||||
)
|
||||
|
||||
Target.create "Pack" (fun _ ->
|
||||
match libPath with
|
||||
| Some p -> run dotnet $"pack -c Release -o {packPath}" p
|
||||
| None -> ()
|
||||
)
|
||||
|
||||
Target.create "Run" (fun _ -> run dotnet "watch run" srcPath)
|
||||
|
||||
Target.create "Format" (fun _ ->
|
||||
run dotnet "fantomas . -r" "src"
|
||||
)
|
||||
|
||||
Target.create "Test" (fun _ ->
|
||||
if System.IO.Directory.Exists testPath then
|
||||
run dotnet "run" testPath
|
||||
else ()
|
||||
)
|
||||
|
||||
open Fake.Core.TargetOperators
|
||||
|
||||
let dependencies = [
|
||||
"Clean"
|
||||
==> "InstallClient"
|
||||
==> "Bundle"
|
||||
|
||||
"Clean"
|
||||
==> "BundleDebug"
|
||||
|
||||
"Clean"
|
||||
==> "Test"
|
||||
|
||||
"Clean"
|
||||
==> "InstallClient"
|
||||
==> "Run"
|
||||
|
||||
"Clean"
|
||||
==> "Pack"
|
||||
]
|
||||
|
||||
[<EntryPoint>]
|
||||
let main args = runOrDefault args
|
||||
105
.build/Helpers.fs
Normal file
105
.build/Helpers.fs
Normal file
@@ -0,0 +1,105 @@
|
||||
module Helpers
|
||||
|
||||
open Fake.Core
|
||||
|
||||
let initializeContext () =
|
||||
let execContext = Context.FakeExecutionContext.Create false "build.fsx" [ ]
|
||||
Context.setExecutionContext (Context.RuntimeContext.Fake execContext)
|
||||
|
||||
module Proc =
|
||||
module Parallel =
|
||||
open System
|
||||
|
||||
let locker = obj()
|
||||
|
||||
let colors =
|
||||
[| ConsoleColor.Blue
|
||||
ConsoleColor.Yellow
|
||||
ConsoleColor.Magenta
|
||||
ConsoleColor.Cyan
|
||||
ConsoleColor.DarkBlue
|
||||
ConsoleColor.DarkYellow
|
||||
ConsoleColor.DarkMagenta
|
||||
ConsoleColor.DarkCyan |]
|
||||
|
||||
let print color (colored: string) (line: string) =
|
||||
lock locker
|
||||
(fun () ->
|
||||
let currentColor = Console.ForegroundColor
|
||||
Console.ForegroundColor <- color
|
||||
Console.Write colored
|
||||
Console.ForegroundColor <- currentColor
|
||||
Console.WriteLine line)
|
||||
|
||||
let onStdout index name (line: string) =
|
||||
let color = colors.[index % colors.Length]
|
||||
if isNull line then
|
||||
print color $"{name}: --- END ---" ""
|
||||
else if String.isNotNullOrEmpty line then
|
||||
print color $"{name}: " line
|
||||
|
||||
let onStderr name (line: string) =
|
||||
let color = ConsoleColor.Red
|
||||
if isNull line |> not then
|
||||
print color $"{name}: " line
|
||||
|
||||
let redirect (index, (name, createProcess)) =
|
||||
createProcess
|
||||
|> CreateProcess.redirectOutputIfNotRedirected
|
||||
|> CreateProcess.withOutputEvents (onStdout index name) (onStderr name)
|
||||
|
||||
let printStarting indexed =
|
||||
for (index, (name, c: CreateProcess<_>)) in indexed do
|
||||
let color = colors.[index % colors.Length]
|
||||
let wd =
|
||||
c.WorkingDirectory
|
||||
|> Option.defaultValue ""
|
||||
let exe = c.Command.Executable
|
||||
let args = c.Command.Arguments.ToStartInfo
|
||||
print color $"{name}: {wd}> {exe} {args}" ""
|
||||
|
||||
let run cs =
|
||||
cs
|
||||
|> Seq.toArray
|
||||
|> Array.indexed
|
||||
|> fun x -> printStarting x; x
|
||||
|> Array.map redirect
|
||||
|> Array.Parallel.map Proc.run
|
||||
|
||||
let createProcess exe arg dir =
|
||||
CreateProcess.fromRawCommandLine exe arg
|
||||
|> CreateProcess.withWorkingDirectory dir
|
||||
|> CreateProcess.ensureExitCode
|
||||
|
||||
let dotnet = createProcess "dotnet"
|
||||
let npm =
|
||||
let npmPath =
|
||||
match ProcessUtils.tryFindFileOnPath "npm" with
|
||||
| Some path -> path
|
||||
| None ->
|
||||
"npm was not found in path. Please install it and make sure it's available from your path. " +
|
||||
"See https://safe-stack.github.io/docs/quickstart/#install-pre-requisites for more info"
|
||||
|> failwith
|
||||
|
||||
createProcess npmPath
|
||||
|
||||
let run proc arg dir =
|
||||
proc arg dir
|
||||
|> Proc.run
|
||||
|> ignore
|
||||
|
||||
let runParallel processes =
|
||||
processes
|
||||
|> Proc.Parallel.run
|
||||
|> ignore
|
||||
|
||||
let runOrDefault args =
|
||||
try
|
||||
match args with
|
||||
| [| target |] -> Target.runOrDefault target
|
||||
| _ ->
|
||||
Target.runOrDefault "Run"
|
||||
0
|
||||
with e ->
|
||||
printfn "%A" e
|
||||
1
|
||||
18
.config/dotnet-tools.json
Normal file
18
.config/dotnet-tools.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"fable": {
|
||||
"version": "3.7.0",
|
||||
"commands": [
|
||||
"fable"
|
||||
]
|
||||
},
|
||||
"fantomas-tool": {
|
||||
"version": "4.6.4",
|
||||
"commands": [
|
||||
"fantomas"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
29
.devcontainer/Dockerfile
Normal file
29
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0
|
||||
|
||||
# Add keys and sources lists
|
||||
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash
|
||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" \
|
||||
| tee /etc/apt/sources.list.d/yarn.list
|
||||
|
||||
# Install node, 7zip, yarn, git, process tools
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y nodejs p7zip-full git procps ssh-client
|
||||
|
||||
# Clean up
|
||||
RUN apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install dotnet tools
|
||||
RUN dotnet tool install fable -g
|
||||
|
||||
# Trouble brewing
|
||||
RUN rm /etc/ssl/openssl.cnf
|
||||
|
||||
# add dotnet tools to path to pick up fake and paket installation
|
||||
ENV PATH="/root/.dotnet/tools:${PATH}"
|
||||
|
||||
# Copy endpoint specific user settings into container to specify
|
||||
# .NET Core should be used as the runtime.
|
||||
COPY settings.vscode.json /root/.vscode-remote/data/Machine/settings.json
|
||||
11
.devcontainer/devcontainer.json
Normal file
11
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "SAFE",
|
||||
"dockerFile": "Dockerfile",
|
||||
"appPort": [8080, 8085],
|
||||
"extensions": [
|
||||
"ionide.ionide-fsharp",
|
||||
"ms-dotnettools.csharp",
|
||||
"editorconfig.editorconfig",
|
||||
"msjsdiag.debugger-for-chrome"
|
||||
]
|
||||
}
|
||||
3
.devcontainer/settings.vscode.json
Normal file
3
.devcontainer/settings.vscode.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"FSharp.fsacRuntime":"netcore"
|
||||
}
|
||||
32
.editorconfig
Normal file
32
.editorconfig
Normal file
@@ -0,0 +1,32 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = false
|
||||
|
||||
[*.fs]
|
||||
max_line_length=120
|
||||
# Feliz style
|
||||
fsharp_single_argument_web_mode=true
|
||||
fsharp_space_before_colon=false
|
||||
fsharp_max_if_then_else_short_width=60
|
||||
fsharp_max_infix_operator_expression=50
|
||||
fsharp_max_record_width=70
|
||||
fsharp_max_record_number_of_items=1
|
||||
fsharp_max_array_or_list_width=70
|
||||
fsharp_max_array_or_list_number_of_items=1
|
||||
fsharp_max_value_binding_width=70
|
||||
fsharp_max_function_binding_width=40
|
||||
fsharp_max_dot_get_expression_width=50
|
||||
fsharp_multiline_block_brackets_on_same_column=true
|
||||
fsharp_newline_between_type_definition_and_members=false
|
||||
fsharp_max_elmish_width=40
|
||||
fsharp_align_function_signature_to_indentation=false
|
||||
fsharp_alternative_long_member_definitions=false
|
||||
fsharp_multi_line_lambda_closing_newline=false
|
||||
fsharp_disable_elmish_syntax=false
|
||||
fsharp_keep_indent_in_branch=false
|
||||
fsharp_blank_lines_around_nested_multiline_expressions=false
|
||||
20
.gitignore
vendored
Normal file
20
.gitignore
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
.fable/
|
||||
.fake/
|
||||
.vs/
|
||||
.idea/
|
||||
.ionide/
|
||||
obj/
|
||||
bin/
|
||||
packages/
|
||||
node_modules/
|
||||
src/Client/public/js/
|
||||
release.cmd
|
||||
release.sh
|
||||
*.orig
|
||||
*.DotSettings.user
|
||||
deploy/
|
||||
dist/
|
||||
build/
|
||||
*.db
|
||||
build.fsx.lock
|
||||
_*.yaml
|
||||
8
.gitlab-ci.yml
Normal file
8
.gitlab-ci.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
variables:
|
||||
SKIP_TESTS: "true"
|
||||
|
||||
include:
|
||||
- project: oceanbox/gitlab-ci
|
||||
ref: v2
|
||||
file: Dotnet.gitlab-ci.yml
|
||||
|
||||
41
.releaserc.yaml
Normal file
41
.releaserc.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- name: develop
|
||||
prerelease: true
|
||||
|
||||
plugins:
|
||||
- '@semantic-release/commit-analyzer'
|
||||
- '@semantic-release/release-notes-generator'
|
||||
- - '@semantic-release/changelog'
|
||||
- changelogFile: RELEASE_NOTES.md
|
||||
changelogTitle: "# Changelog"
|
||||
- - 'semantic-release-dotnet'
|
||||
- paths: [ "src/*.fsproj", "src/*/*.fsproj" ]
|
||||
- - '@semantic-release/exec'
|
||||
- generateNotesCmd: "echo ${nextRelease.version} > .version"
|
||||
- - '@semantic-release/git'
|
||||
- message: "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
|
||||
assets: [ "RELEASE_NOTES.md", ".version", "src/*.fsproj", "src/*/*.fsproj" ]
|
||||
- - '@semantic-release/gitlab'
|
||||
- assets: []
|
||||
|
||||
analyzeCommits:
|
||||
- path: "@semantic-release/commit-analyzer"
|
||||
releaseRules:
|
||||
- type: "fix"
|
||||
release: "patch"
|
||||
- type: "patch"
|
||||
release: "patch"
|
||||
- type: "feat"
|
||||
release: "minor"
|
||||
- type: "feature"
|
||||
release: "minor"
|
||||
- type: "minor"
|
||||
release: "minor"
|
||||
- type: "breaking"
|
||||
release: "major"
|
||||
- type: "major"
|
||||
release: "major"
|
||||
|
||||
|
||||
16
Build.fsproj
Normal file
16
Build.fsproj
Normal file
@@ -0,0 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include=".build/Helpers.fs" />
|
||||
<Compile Include=".build/Build.fs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Fake.Core.Target" Version="5.20.4" />
|
||||
<PackageReference Include="Fake.DotNet.Cli" Version="5.20.4" />
|
||||
<PackageReference Include="Fake.IO.FileSystem" Version="5.20.4" />
|
||||
<PackageReference Include="Farmer" Version="1.6.26" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM mcr.microsoft.com/dotnet/runtime:7.0
|
||||
RUN rm /etc/ssl/openssl.cnf
|
||||
|
||||
COPY deploy/ /app
|
||||
|
||||
WORKDIR /app
|
||||
CMD /app/Excavator
|
||||
78
Excavator.sln
Normal file
78
Excavator.sln
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27004.2005
|
||||
MinimumVisualStudioVersion = 15.0.26124.0
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C3B6A214-CE4D-4ED1-9DCA-C689AA48ECF5}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
README.md = README.md
|
||||
LICENSE = LICENSE
|
||||
Dockerfile = Dockerfile
|
||||
.gitlab-ci.yml = .gitlab-ci.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Build", "Build.fsproj", "{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}"
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "src", "src/Excavator.fsproj", "{5599F868-EC40-4BEE-8295-7A2A41BEF741}"
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "test", "test\Tests.fsproj", "{0184583E-99DB-473B-BBCD-C07A1AC4FF65}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CBD855E6-8E30-4B99-B715-845F9CB5BA7F}.Release|x86.Build.0 = Release|Any CPU
|
||||
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Release|x64.Build.0 = Release|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5599F868-EC40-4BEE-8295-7A2A41BEF741}.Release|x86.Build.0 = Release|Any CPU
|
||||
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Release|x64.Build.0 = Release|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{0184583E-99DB-473B-BBCD-C07A1AC4FF65}.Release|x86.Build.0 = Release|Any CPU
|
||||
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {03BBFC03-A554-4604-A4F9-E9C1275410E2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Serit Tromsø AS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
9
README.md
Normal file
9
README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Excavator
|
||||
|
||||
## Run
|
||||
|
||||
`dotnet run`
|
||||
|
||||
## Build
|
||||
|
||||
`dotnet run Bundle`
|
||||
1
RELEASE_NOTES.md
Normal file
1
RELEASE_NOTES.md
Normal file
@@ -0,0 +1 @@
|
||||
# Changelog
|
||||
10009
package-lock.json
generated
Normal file
10009
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
11
package.json
Normal file
11
package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@semantic-release/changelog": "^6.0.1",
|
||||
"@semantic-release/exec": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/gitlab": "^7.0.4",
|
||||
"semantic-release-dotnet": "^1.0.0"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
21
src/Excavator.fsproj
Normal file
21
src/Excavator.fsproj
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Settings.fs" />
|
||||
<Compile Include="Main.fs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Argu" Version="6.1.1" />
|
||||
<PackageReference Include="FSharp.Data" Version="4.2.7" />
|
||||
<PackageReference Include="FSharpPlus" Version="1.2.2" />
|
||||
<PackageReference Include="Serilog" Version="2.10.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Seq" Version="5.1.1" />
|
||||
<PackageReference Include="Thoth.Json.Net" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
47
src/Main.fs
Normal file
47
src/Main.fs
Normal file
@@ -0,0 +1,47 @@
|
||||
module Main
|
||||
|
||||
open System
|
||||
open Serilog
|
||||
open Serilog.Events
|
||||
open Argu
|
||||
|
||||
open Settings
|
||||
|
||||
let configureSerilog level =
|
||||
let n =
|
||||
match level with
|
||||
| 0 -> LogEventLevel.Error
|
||||
| 1 -> LogEventLevel.Warning
|
||||
| 2 -> LogEventLevel.Information
|
||||
| 3 -> LogEventLevel.Debug
|
||||
| _ -> LogEventLevel.Verbose
|
||||
LoggerConfiguration()
|
||||
.MinimumLevel.Is(n)
|
||||
.WriteTo.Console()
|
||||
.CreateLogger()
|
||||
|
||||
type Arguments =
|
||||
| Log_Level of level: int
|
||||
| [<MainCommand; ExactlyOnce; Last>] File of file: string
|
||||
interface IArgParserTemplate with
|
||||
member this.Usage =
|
||||
match this with
|
||||
| Log_Level _ -> "0=Error, 1=Warning, 2=Info, 3=Debug, 4=Verbose"
|
||||
| File _ -> "file"
|
||||
|
||||
let colorizer =
|
||||
function
|
||||
| ErrorCode.HelpText -> None
|
||||
| _ -> Some ConsoleColor.Red
|
||||
|
||||
let errorHandler = ProcessExiter(colorizer = colorizer)
|
||||
|
||||
[<EntryPoint>]
|
||||
let main argv =
|
||||
let parser =
|
||||
ArgumentParser.Create<Arguments>(programName = "Excavator", errorHandler = errorHandler)
|
||||
let args = parser.Parse argv
|
||||
|
||||
Log.Logger <- configureSerilog (args.GetResult(Log_Level, defaultValue = 2))
|
||||
Log.Information $"File is {args.GetResult File}"
|
||||
0
|
||||
23
src/Settings.fs
Normal file
23
src/Settings.fs
Normal file
@@ -0,0 +1,23 @@
|
||||
module Settings
|
||||
|
||||
open System.IO
|
||||
open Thoth.Json.Net
|
||||
open Serilog
|
||||
|
||||
type Settings = { Setting: string }
|
||||
|
||||
let tryGetEnv =
|
||||
System.Environment.GetEnvironmentVariable
|
||||
>> function
|
||||
| null
|
||||
| "" -> None
|
||||
| x -> Some x
|
||||
|
||||
let appsettings =
|
||||
let settings = System.IO.File.ReadAllText "appsettings.json"
|
||||
|
||||
match Decode.Auto.fromString<Settings> settings with
|
||||
| Ok s -> s
|
||||
| Error e -> failwith e
|
||||
|
||||
sprintf "AppSettings: %A" appsettings |> Log.Debug
|
||||
3
src/appsettings.json
Normal file
3
src/appsettings.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"Setting" : "example setting"
|
||||
}
|
||||
366
src/packages.lock.json
Normal file
366
src/packages.lock.json
Normal file
@@ -0,0 +1,366 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net7.0": {
|
||||
"Argu": {
|
||||
"type": "Direct",
|
||||
"requested": "[6.1.1, )",
|
||||
"resolved": "6.1.1",
|
||||
"contentHash": "5SBLYihaZ6/YNpRU+0v0QLsCk7ABmOWNOUwkXVUql2w7kJ6Hi4AFhgIv5XLTtxTid5/xrJAL+PglQkNcjANCJg==",
|
||||
"dependencies": {
|
||||
"FSharp.Core": "4.3.2",
|
||||
"System.Configuration.ConfigurationManager": "4.4.0"
|
||||
}
|
||||
},
|
||||
"FSharp.Core": {
|
||||
"type": "Direct",
|
||||
"requested": "[7.0.200, )",
|
||||
"resolved": "7.0.200",
|
||||
"contentHash": "NmgUnpNH6Zu9B0SPIhojyo38gnPdkdYFYQfbd6zosEH32kbGY/g/Klk7PfOWe1NAe/O1YOMmK9KhwQ2OWsWEbg=="
|
||||
},
|
||||
"FSharp.Data": {
|
||||
"type": "Direct",
|
||||
"requested": "[4.2.7, )",
|
||||
"resolved": "4.2.7",
|
||||
"contentHash": "gQO0u0q1z9wXOkSmL7TVQLspAGR/S2Vm3CDPStEHCcTQyivkgoZie0IsB2Zyl2inC+hmQa/jcVQNQjo7XB7Ujg==",
|
||||
"dependencies": {
|
||||
"FSharp.Core": "4.7.2"
|
||||
}
|
||||
},
|
||||
"FSharpPlus": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.2.2, )",
|
||||
"resolved": "1.2.2",
|
||||
"contentHash": "YzWFuAua/OCevT05FoWSInP3i6DGAwRqyJd0DtFWSisPI6LAqCMTWaj5hT4BDLDabvricVZ5VD/FWfSNubL6Gg==",
|
||||
"dependencies": {
|
||||
"FSharp.Core": "4.6.2"
|
||||
}
|
||||
},
|
||||
"Serilog": {
|
||||
"type": "Direct",
|
||||
"requested": "[2.10.0, )",
|
||||
"resolved": "2.10.0",
|
||||
"contentHash": "+QX0hmf37a0/OZLxM3wL7V6/ADvC1XihXN4Kq/p6d8lCPfgkRdiuhbWlMaFjR9Av0dy5F0+MBeDmDdRZN/YwQA=="
|
||||
},
|
||||
"Serilog.Sinks.Console": {
|
||||
"type": "Direct",
|
||||
"requested": "[4.0.1, )",
|
||||
"resolved": "4.0.1",
|
||||
"contentHash": "apLOvSJQLlIbKlbx+Y2UDHSP05kJsV7mou+fvJoRGs/iR+jC22r8cuFVMjjfVxz/AD4B2UCltFhE1naRLXwKNw==",
|
||||
"dependencies": {
|
||||
"Serilog": "2.10.0"
|
||||
}
|
||||
},
|
||||
"Serilog.Sinks.Seq": {
|
||||
"type": "Direct",
|
||||
"requested": "[5.1.1, )",
|
||||
"resolved": "5.1.1",
|
||||
"contentHash": "+BsIoanNyZPEcWY5sVtx2nL/88UcCw9gr/l0nCfe4bjuSoFS2clDIUmKaH1UXA/hx9undHCgw4epVltOulGuxw==",
|
||||
"dependencies": {
|
||||
"Serilog": "2.10.0",
|
||||
"Serilog.Formatting.Compact": "1.1.0",
|
||||
"Serilog.Sinks.File": "4.0.0",
|
||||
"Serilog.Sinks.PeriodicBatching": "2.3.0"
|
||||
}
|
||||
},
|
||||
"Thoth.Json.Net": {
|
||||
"type": "Direct",
|
||||
"requested": "[8.0.0, )",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "C/b+8g/xUTJTn7pbKC4bMAOy2tyolXAuHTXguT5TNzDKQ6sjnUfFa9B81fTt9PuUOdWFLyRKlXASuFhSQciJGQ==",
|
||||
"dependencies": {
|
||||
"FSharp.Core": "4.7.2",
|
||||
"Fable.Core": "[3.0.0, 4.0.0)",
|
||||
"Newtonsoft.Json": "11.0.2"
|
||||
}
|
||||
},
|
||||
"Fable.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "3.0.0",
|
||||
"contentHash": "pkCOWJKAkCk36f5+q4F3XqlfsgCJL6i2lTLl4ZZVDswn8rjXo21EBG/gJ296a88LVBkI5LL2VwxQYqGZncomJw==",
|
||||
"dependencies": {
|
||||
"FSharp.Core": "4.5.2"
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.0.1",
|
||||
"contentHash": "2G6OjjJzwBfNOO8myRV/nFrbTw5iA+DEm0N+qUqhrOmaVtn4pC77h38I1jsXGw5VH55+dPfQsqHD0We9sCl9FQ=="
|
||||
},
|
||||
"Microsoft.NETCore.Targets": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.0.1",
|
||||
"contentHash": "rkn+fKobF/cbWfnnfBOQHKVKIOpxMZBvlSHkqDWgBpwGDcLRduvs3D9OLGeV6GWGvVwNlVi2CBbTjuPmtHvyNw=="
|
||||
},
|
||||
"Newtonsoft.Json": {
|
||||
"type": "Transitive",
|
||||
"resolved": "11.0.2",
|
||||
"contentHash": "IvJe1pj7JHEsP8B8J8DwlMEx8UInrs/x+9oVY+oCD13jpLu4JbJU2WCIsMRn5C4yW9+DgkaO8uiVE5VHKjpmdQ=="
|
||||
},
|
||||
"Serilog.Formatting.Compact": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.0",
|
||||
"contentHash": "pNroKVjo+rDqlxNG5PXkRLpfSCuDOBY0ri6jp9PLe505ljqwhwZz8ospy2vWhQlFu5GkIesh3FcDs4n7sWZODA==",
|
||||
"dependencies": {
|
||||
"Serilog": "2.8.0"
|
||||
}
|
||||
},
|
||||
"Serilog.Sinks.File": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.0",
|
||||
"contentHash": "vBj43RkAbeP1dzoPFR2+LfV5GevDRPDq6265JJBv223lMvT9rfdwe/S/I9ow7aZSLYKfw4qPDw6NW8YwjbDbvg==",
|
||||
"dependencies": {
|
||||
"Serilog": "2.5.0",
|
||||
"System.IO": "4.1.0",
|
||||
"System.IO.FileSystem": "4.0.1",
|
||||
"System.IO.FileSystem.Primitives": "4.0.1",
|
||||
"System.Runtime.InteropServices": "4.1.0",
|
||||
"System.Text.Encoding.Extensions": "4.0.11",
|
||||
"System.Threading": "4.0.11",
|
||||
"System.Threading.Timer": "4.0.1"
|
||||
}
|
||||
},
|
||||
"Serilog.Sinks.PeriodicBatching": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.3.0",
|
||||
"contentHash": "UYKSjTMTlUY9T3OgzMmLDLD+z0qPfgvq/RvG0rKfyz+O+Zrjw3X/Xpv14J4WMcGVsOjUaR+k8n2MdmqVpJtI6A==",
|
||||
"dependencies": {
|
||||
"Serilog": "2.0.0",
|
||||
"System.Collections.Concurrent": "4.0.12",
|
||||
"System.Threading.Timer": "4.0.1"
|
||||
}
|
||||
},
|
||||
"System.Collections": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.11",
|
||||
"contentHash": "YUJGz6eFKqS0V//mLt25vFGrrCvOnsXjlvFQs+KimpwNxug9x0Pzy4PlFMU3Q2IzqAa9G2L4LsK3+9vCBK7oTg==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Collections.Concurrent": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.12",
|
||||
"contentHash": "2gBcbb3drMLgxlI0fBfxMA31ec6AEyYCHygGse4vxceJan8mRIWeKJ24BFzN7+bi/NFTgdIgufzb94LWO5EERQ==",
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.11",
|
||||
"System.Diagnostics.Debug": "4.0.11",
|
||||
"System.Diagnostics.Tracing": "4.1.0",
|
||||
"System.Globalization": "4.0.11",
|
||||
"System.Reflection": "4.1.0",
|
||||
"System.Resources.ResourceManager": "4.0.1",
|
||||
"System.Runtime": "4.1.0",
|
||||
"System.Runtime.Extensions": "4.1.0",
|
||||
"System.Threading": "4.0.11",
|
||||
"System.Threading.Tasks": "4.0.11"
|
||||
}
|
||||
},
|
||||
"System.Configuration.ConfigurationManager": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.4.0",
|
||||
"contentHash": "gWwQv/Ug1qWJmHCmN17nAbxJYmQBM/E94QxKLksvUiiKB1Ld3Sc/eK1lgmbSjDFxkQhVuayI/cGFZhpBSodLrg==",
|
||||
"dependencies": {
|
||||
"System.Security.Cryptography.ProtectedData": "4.4.0"
|
||||
}
|
||||
},
|
||||
"System.Diagnostics.Debug": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.11",
|
||||
"contentHash": "w5U95fVKHY4G8ASs/K5iK3J5LY+/dLFd4vKejsnI/ZhBsWS9hQakfx3Zr7lRWKg4tAw9r4iktyvsTagWkqYCiw==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Diagnostics.Tracing": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.1.0",
|
||||
"contentHash": "vDN1PoMZCkkdNjvZLql592oYJZgS7URcJzJ7bxeBgGtx5UtR5leNm49VmfHGqIffX4FKacHbI3H6UyNSHQknBg==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Globalization": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.11",
|
||||
"contentHash": "B95h0YLEL2oSnwF/XjqSWKnwKOy/01VWkNlsCeMTFJLLabflpGV26nK164eRs5GiaRSBGpOxQ3pKoSnnyZN5pg==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.IO": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.1.0",
|
||||
"contentHash": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0",
|
||||
"System.Text.Encoding": "4.0.11",
|
||||
"System.Threading.Tasks": "4.0.11"
|
||||
}
|
||||
},
|
||||
"System.IO.FileSystem": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.1",
|
||||
"contentHash": "IBErlVq5jOggAD69bg1t0pJcHaDbJbWNUZTPI96fkYWzwYbN6D9wRHMULLDd9dHsl7C2YsxXL31LMfPI1SWt8w==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.IO": "4.1.0",
|
||||
"System.IO.FileSystem.Primitives": "4.0.1",
|
||||
"System.Runtime": "4.1.0",
|
||||
"System.Runtime.Handles": "4.0.1",
|
||||
"System.Text.Encoding": "4.0.11",
|
||||
"System.Threading.Tasks": "4.0.11"
|
||||
}
|
||||
},
|
||||
"System.IO.FileSystem.Primitives": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.1",
|
||||
"contentHash": "kWkKD203JJKxJeE74p8aF8y4Qc9r9WQx4C0cHzHPrY3fv/L/IhWnyCHaFJ3H1QPOH6A93whlQ2vG5nHlBDvzWQ==",
|
||||
"dependencies": {
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Reflection": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.1.0",
|
||||
"contentHash": "JCKANJ0TI7kzoQzuwB/OoJANy1Lg338B6+JVacPl4TpUwi3cReg3nMLplMq2uqYfHFQpKIlHAUVAJlImZz/4ng==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.IO": "4.1.0",
|
||||
"System.Reflection.Primitives": "4.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Reflection.Primitives": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.1",
|
||||
"contentHash": "4inTox4wTBaDhB7V3mPvp9XlCbeGYWVEM9/fXALd52vNEAVisc1BoVWQPuUuD0Ga//dNbA/WeMy9u9mzLxGTHQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Resources.ResourceManager": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.1",
|
||||
"contentHash": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Globalization": "4.0.11",
|
||||
"System.Reflection": "4.1.0",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Runtime": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.1.0",
|
||||
"contentHash": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1"
|
||||
}
|
||||
},
|
||||
"System.Runtime.Extensions": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.1.0",
|
||||
"contentHash": "CUOHjTT/vgP0qGW22U4/hDlOqXmcPq5YicBaXdUR2UiUoLwBT+olO6we4DVbq57jeX5uXH2uerVZhf0qGj+sVQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Runtime.Handles": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.1",
|
||||
"contentHash": "nCJvEKguXEvk2ymk1gqj625vVnlK3/xdGzx0vOKicQkoquaTBJTP13AIYkocSUwHCLNBwUbXTqTWGDxBTWpt7g==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Runtime.InteropServices": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.1.0",
|
||||
"contentHash": "16eu3kjHS633yYdkjwShDHZLRNMKVi/s0bY8ODiqJ2RfMhDMAwxZaUaWVnZ2P71kr/or+X9o/xFWtNqz8ivieQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Reflection": "4.1.0",
|
||||
"System.Reflection.Primitives": "4.0.1",
|
||||
"System.Runtime": "4.1.0",
|
||||
"System.Runtime.Handles": "4.0.1"
|
||||
}
|
||||
},
|
||||
"System.Security.Cryptography.ProtectedData": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.4.0",
|
||||
"contentHash": "cJV7ScGW7EhatRsjehfvvYVBvtiSMKgN8bOVI0bQhnF5bU7vnHVIsH49Kva7i7GWaWYvmEzkYVk1TC+gZYBEog=="
|
||||
},
|
||||
"System.Text.Encoding": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.11",
|
||||
"contentHash": "U3gGeMlDZXxCEiY4DwVLSacg+DFWCvoiX+JThA/rvw37Sqrku7sEFeVBBBMBnfB6FeZHsyDx85HlKL19x0HtZA==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Text.Encoding.Extensions": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.11",
|
||||
"contentHash": "jtbiTDtvfLYgXn8PTfWI+SiBs51rrmO4AAckx4KR6vFK9Wzf6tI8kcRdsYQNwriUeQ1+CtQbM1W4cMbLXnj/OQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0",
|
||||
"System.Text.Encoding": "4.0.11"
|
||||
}
|
||||
},
|
||||
"System.Threading": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.11",
|
||||
"contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==",
|
||||
"dependencies": {
|
||||
"System.Runtime": "4.1.0",
|
||||
"System.Threading.Tasks": "4.0.11"
|
||||
}
|
||||
},
|
||||
"System.Threading.Tasks": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.11",
|
||||
"contentHash": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
},
|
||||
"System.Threading.Timer": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.0.1",
|
||||
"contentHash": "saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.0.1",
|
||||
"Microsoft.NETCore.Targets": "1.0.1",
|
||||
"System.Runtime": "4.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
test/Tests.fs
Normal file
18
test/Tests.fs
Normal file
@@ -0,0 +1,18 @@
|
||||
module Tests
|
||||
|
||||
open Expecto
|
||||
|
||||
let server =
|
||||
testList
|
||||
"Server"
|
||||
[
|
||||
testCase "Adding valid Todo"
|
||||
<| fun _ ->
|
||||
let expectedResult = Ok()
|
||||
Expect.equal (Ok()) expectedResult "Result should be ok"
|
||||
]
|
||||
|
||||
let all = testList "All" [ server ]
|
||||
|
||||
[<EntryPoint>]
|
||||
let main _ = runTests defaultConfig all
|
||||
16
test/Tests.fsproj
Normal file
16
test/Tests.fsproj
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Tests.fs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\src\Excavator.fsproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Expecto" Version="9.0.4" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user