From b452cf8f2cf384d6260db90ee83c91d1f8de8a76 Mon Sep 17 00:00:00 2001 From: Joost Kaptein Date: Fri, 11 Apr 2025 11:38:32 +0100 Subject: [PATCH 1/6] remove things that were moved to the Utils project --- .github/workflows/test.yaml | 23 - Build/Build.fs | 12 - SAFE.Meta.sln | 10 +- paket.dependencies | 3 +- paket.lock | 11 +- src/SAFE.Client/SAFE.fs | 188 ----- src/SAFE.Client/paket.references | 4 +- src/SAFE.Server/SAFE.Server.fsproj | 6 +- src/SAFE.Server/SAFE.fs | 52 -- src/SAFE.Server/paket.references | 3 +- test/SAFE.Client.Tests/Program.fs | 129 ---- test/SAFE.Client.Tests/package-lock.json | 910 ----------------------- test/SAFE.Client.Tests/package.json | 10 - test/SAFE.Client.Tests/paket.references | 1 - 14 files changed, 16 insertions(+), 1346 deletions(-) delete mode 100644 .github/workflows/test.yaml delete mode 100644 src/SAFE.Client/SAFE.fs delete mode 100644 src/SAFE.Server/SAFE.fs delete mode 100644 test/SAFE.Client.Tests/Program.fs delete mode 100644 test/SAFE.Client.Tests/package-lock.json delete mode 100644 test/SAFE.Client.Tests/package.json delete mode 100644 test/SAFE.Client.Tests/paket.references diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index d2715f2..0000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: SAFE meta automated tests - -on: push - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Tool Restore - run: dotnet tool restore - - - name: Test - working-directory: ./Build - run: dotnet run --project Build.fsproj -- Test \ No newline at end of file diff --git a/Build/Build.fs b/Build/Build.fs index 5f0d8cd..5d9169d 100644 --- a/Build/Build.fs +++ b/Build/Build.fs @@ -25,20 +25,8 @@ module Processes = let sourceFolder = Path.getFullName """../src""" let outputFolder = Path.getFullName """../nugetPackages""" -let clientTestFolder = Path.getFullName """../test/SAFE.Client.Tests""" - let projects = [ "SAFE.Client"; "SAFE.Server" ] -Target.create "Test" (fun _ -> - Npm.install (fun o -> { - o with - WorkingDirectory = clientTestFolder - }) - - Npm.run "test" (fun o -> { - o with - WorkingDirectory = clientTestFolder - })) Target.create "Bundle" (fun _ -> let version = Environment.environVarOrFail "VERSION" diff --git a/SAFE.Meta.sln b/SAFE.Meta.sln index 158638a..95dfe73 100644 --- a/SAFE.Meta.sln +++ b/SAFE.Meta.sln @@ -11,10 +11,6 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SAFE.Server", "src\SAFE.Ser EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Build", "Build\Build.fsproj", "{F49104E3-DBA9-4A2D-B839-B4E60BCAE698}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{387BFC82-96EA-4C10-A08E-C25588EE2223}" -EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SAFE.Client.Tests", "test\SAFE.Client.Tests\SAFE.Client.Tests.fsproj", "{ECC5C643-1340-4718-8381-E3D1E835C3E3}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -36,13 +32,9 @@ Global {F49104E3-DBA9-4A2D-B839-B4E60BCAE698}.Debug|Any CPU.Build.0 = Debug|Any CPU {F49104E3-DBA9-4A2D-B839-B4E60BCAE698}.Release|Any CPU.ActiveCfg = Release|Any CPU {F49104E3-DBA9-4A2D-B839-B4E60BCAE698}.Release|Any CPU.Build.0 = Release|Any CPU - {ECC5C643-1340-4718-8381-E3D1E835C3E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ECC5C643-1340-4718-8381-E3D1E835C3E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ECC5C643-1340-4718-8381-E3D1E835C3E3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ECC5C643-1340-4718-8381-E3D1E835C3E3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {5BCFE180-027E-40F9-847B-7B36F10BD5D7} = {59161B7D-F517-4F4B-B28D-33E34B8A930E} {0C8F62AC-D5D8-43E6-A4C7-159E530C3CE5} = {59161B7D-F517-4F4B-B28D-33E34B8A930E} EndGlobalSection -EndGlobal \ No newline at end of file +EndGlobal diff --git a/paket.dependencies b/paket.dependencies index 727fbb0..68f1ebd 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -7,13 +7,14 @@ nuget Fake.JavaScript.Npm nuget FSharp.Core ~> 8 nuget Fable.Remoting.Giraffe ~> 5 +nuget SAFE.Client.Utils +nuget SAFE.Server.Utils nuget Saturn ~> 0 nuget Fable.Core ~> 4 nuget Fable.Elmish ~> 4 nuget Fable.Elmish.React ~> 4 nuget Fable.Elmish.HMR ~> 7 -nuget Fable.Mocha ~> 2 nuget Fable.Remoting.Client ~> 7 nuget Fable.SimpleJson nuget Feliz ~> 2 \ No newline at end of file diff --git a/paket.lock b/paket.lock index a76f7cd..138966a 100644 --- a/paket.lock +++ b/paket.lock @@ -40,9 +40,6 @@ NUGET Fable.Elmish (>= 4.0) Fable.ReactDom.Types (>= 18.0) FSharp.Core (>= 4.7.2) - Fable.Mocha (2.17) - Fable.Core (>= 3.0) - FSharp.Core (>= 4.7) Fable.Parsimmon (4.1) Fable.Core (>= 3.0) FSharp.Core (>= 4.6.2) @@ -163,6 +160,13 @@ NUGET Microsoft.IdentityModel.Logging (>= 7.7.1) Microsoft.IO.RecyclableMemoryStream (3.0.1) Newtonsoft.Json (13.0.3) + SAFE.Client.Utils (0.0.1-alpha) + Fable.Browser.Dom (>= 2.18.1) + Fable.Remoting.Client (>= 7.32 < 8.0) + Fable.SimpleJson (>= 3.24) + FSharp.Core (>= 8.0.403 < 9.0) + SAFE.Server.Utils (0.0.1-alpha) + Fable.Remoting.Giraffe (>= 5.21) Saturn (0.17) FSharp.Control.Websockets (>= 0.2.2) Giraffe (>= 6.4) @@ -172,5 +176,4 @@ NUGET Microsoft.IdentityModel.JsonWebTokens (>= 7.7.1) Microsoft.IdentityModel.Tokens (>= 7.7.1) System.Reactive (5.0) - System.Text.Encodings.Web (8.0) System.Text.Json (8.0.5) diff --git a/src/SAFE.Client/SAFE.fs b/src/SAFE.Client/SAFE.fs deleted file mode 100644 index 6fdae2e..0000000 --- a/src/SAFE.Client/SAFE.fs +++ /dev/null @@ -1,188 +0,0 @@ -namespace SAFE - -open Fable.Remoting.Client -open Fable.SimpleJson -open System - -/// Contains functionality to interact with Fable Remoting APIs. -type Api = - /// Quickly creates a Fable Remoting API proxy. For more details, see https://zaid-ajaj.github.io/Fable.Remoting/. - /// An optional function which takes the name of the API and the method being called, and generates the route to the server API. Defaults to `/api/{api name}/{method name}` e.g. `/api/ITodoApi/GetTodos`. - /// An optional function which allows you to customize the API proxy such as Binary Serialization e.g. https://zaid-ajaj.github.io/Fable.Remoting/#/advanced/binary-serialization. - static member inline makeProxy<'TApi>(?routeBuilder, ?customOptions) = - let routeBuilder = defaultArg routeBuilder (sprintf "/api/%s/%s") - let customOptions = defaultArg customOptions id - - Remoting.createApi () - |> Remoting.withRouteBuilder routeBuilder - |> customOptions - |> Remoting.buildProxy<'TApi> - -[] -module Extensions = - type System.Exception with - - /// If propagating exceptions with Fable Remoting, this helper method deserializes any `ProxyRequestException` into a record that contains the exception details. - /// See https://zaid-ajaj.github.io/Fable.Remoting/#/advanced/error-handling for more details. - member this.GetPropagatedError() = - match this with - | :? ProxyRequestException as exn -> - let response = - exn.ResponseText - |> Json.parseAs< - {| - error: {| ClassName: string; Message: string |} - ignored: bool - handled: bool - |} - > - - response.error - | ex -> {| - ClassName = "Unknown" - Message = ex.Message - |} - -/// Used commonly to model asynchronous calls to the server (or any other external service) within an Elmish message instead of two separate messages e.g. `LoadData` and `DataLoaded`. `Start` represents the initial request (command); `Finished` contains the resultant data on the callback. -/// -/// For an example of how to use this type, see https://safe-stack.github.io/docs/recipes/client-server/mvu-roundtrip/. -/// -/// For reference documentation, see the AsyncOperation type in https://zaid-ajaj.github.io/the-elmish-book/#/chapters/commands/async-state. -type ApiCall<'TStart, 'TFinished> = - /// Represents an API call that should be initiated. - | Start of 'TStart - /// Represents the response of an API call. - | Finished of 'TFinished - -/// Typically used for data on a model that will be loaded from the server. This type represents some data which has either not yet started loading, is currently in the process of being loaded, or has been loaded and is available. -/// See the Deferred type in https://zaid-ajaj.github.io/the-elmish-book/#/chapters/commands/async-state#conclusion for more details. -type RemoteData<'T> = - /// The data has not yet started loading. - | NotStarted - /// The data is now being loaded. May already contain some data i.e. a refresh operation is in process. - | Loading of 'T option - /// The data is available. - | Loaded of 'T - - /// Unwraps the Loaded value, or returns the supplied default value. - member this.DefaultValue v = this.AsOption |> Option.defaultValue v - - /// Returns whether the `RemoteData<'T>` value has been loaded. - member this.HasLoaded = - match this with - | NotStarted - | Loading _ -> false - | Loaded _ -> true - - /// Returns whether the `RemoteData<'T>` value has started loading or not. - member this.HasStarted = - match this with - | NotStarted -> false - | Loading _ - | Loaded _ -> true - - /// Returns whether the `RemoteData<'T>` value has been loaded. - member this.HasData = Option.isSome this.AsOption - - /// Returns whether the `RemoteData<'T>` value is loading. This will return true for both first-time and refresh-style loads. - member this.IsStillLoading = - match this with - | Loading _ -> true - | NotStarted - | Loaded _ -> false - - /// Returns whether the `RemoteData<'T>` value is refreshing itself i.e. Loading (Some _) - member this.IsRefreshing = - match this with - | Loading(Some _) -> true - | _ -> false - - /// Returns whether the `RemoteData<'T>` value has not yet started. - member this.HasNotStarted = - match this with - | NotStarted -> true - | Loading _ - | Loaded _ -> false - - /// Maps the underlying value of the remote data, when it exists, into another shape. - member this.Map mapper = - match this with - | NotStarted -> NotStarted - | Loaded value -> Loaded(mapper value) - | Loading None -> Loading None - | Loading(Some value) -> Loading(Some(mapper value)) - - /// Verifies that a `RemoteData<'T>` value has some data loaded (may be Loading or Loaded), and that the data satisfies a given requirement. - member this.Exists predicate = - this.AsOption |> Option.exists predicate - - /// Like `map` but instead of mapping just the value into another type in the `Loading` or `Loaded` case, it will transform the value into potentially a different case of the `RemoteData<'T>` type. - member this.Bind binder = - match this.AsOption with - | Some v -> binder v - | None -> this - - /// Maps `Loaded` or `Loading Some` to `Some`, everything else to `None`. - [] - member this.ToOption() = this.AsOption - - /// Maps `Loaded` or `Loading Some` to `Some`, everything else to `None`. - member this.AsOption = - match this with - | Loaded value - | Loading(Some value) -> Some value - | NotStarted - | Loading None -> None - - /// Transitions to Loading, retaining existing data as needed. - /// - /// ``` - /// NotStarted | Loading None -> Loading None - /// Loaded x | Loading (Some x) -> Loading (Some x) - /// ``` - member this.StartLoading() = Loading this.AsOption - -/// Contains utility functions on the `Remote` type. -module RemoteData = - /// Maps `Loaded` to `Some`, everything else to `None`. - let asOption (remote: RemoteData<'T>) = remote.AsOption - - /// Maps `Loaded` to `Some`, everything else to `None`. - [] - let toOption = asOption - - /// Unwraps the Loaded value, or returns the default value. - let defaultValue defaultValue (remote: RemoteData<'T>) = remote.DefaultValue defaultValue - - /// Returns whether the `RemoteData<'T>` value has been loaded. - let hasLoaded (remote: RemoteData<'T>) = remote.HasLoaded - - /// Returns whether the `RemoteData<'T>` value has started loading or not. - let hasStarted (remote: RemoteData<'T>) = remote.HasStarted - - /// Returns whether the `RemoteData<'T>` value has started loading. - let hasNotStarted (remote: RemoteData<'T>) = remote.HasNotStarted - - /// Returns whether the `RemoteData<'T>` value is loading. - let isLoading (remote: RemoteData<_>) = remote.IsStillLoading - - /// Returns whether the `RemoteData<'T>` value is refreshing. - let isRefreshing (remote: RemoteData<_>) = remote.IsRefreshing - - /// Returns whether the `RemoteData<'T>` value has data. - let hasData (remote: RemoteData<_>) = remote.HasData - - /// Maps the underlying value of the remote data, when it exists, into another shape - let map mapper (remote: RemoteData<'T>) = remote.Map mapper - - /// Verifies that a `RemoteData<'T>` value is loaded, and that the data satisfies a given requirement. - let exists predicate (remote: RemoteData<'T>) = remote.Exists predicate - - /// Like `map` but instead of mapping just the value into another type in the `Loaded` case, it will transform the value into potentially a different case of the `RemoteData<'T>` type. - let bind binder (remote: RemoteData<'T>) = remote.Bind binder - - /// Transitions to Loading, retaining existing data as needed. - /// `Loaded x -> Loading x`; - /// `NotStarted -> Loading None`; - /// `Loading x -> Loading x`; - let startLoading (remote: RemoteData<'T>) = remote.StartLoading \ No newline at end of file diff --git a/src/SAFE.Client/paket.references b/src/SAFE.Client/paket.references index 999f7ca..cf35551 100644 --- a/src/SAFE.Client/paket.references +++ b/src/SAFE.Client/paket.references @@ -3,7 +3,7 @@ Fable.Core Fable.Elmish Fable.Elmish.React Fable.Elmish.HMR -Fable.Mocha Fable.Remoting.Client Feliz -Fable.SimpleJson \ No newline at end of file +Fable.SimpleJson +SAFE.Client.Utils \ No newline at end of file diff --git a/src/SAFE.Server/SAFE.Server.fsproj b/src/SAFE.Server/SAFE.Server.fsproj index 4fd8e31..d5cb625 100644 --- a/src/SAFE.Server/SAFE.Server.fsproj +++ b/src/SAFE.Server/SAFE.Server.fsproj @@ -1,4 +1,5 @@ - + + SAFE @@ -26,8 +27,5 @@ - - - diff --git a/src/SAFE.Server/SAFE.fs b/src/SAFE.Server/SAFE.fs deleted file mode 100644 index 3010d64..0000000 --- a/src/SAFE.Server/SAFE.fs +++ /dev/null @@ -1,52 +0,0 @@ -namespace SAFE - -open Giraffe -open Fable.Remoting.Server -open Fable.Remoting.Giraffe - -[] -module Constants = - open Microsoft.Extensions.Hosting - - /// Tests if the current environment is development based on the presence of the ASPNETCORE_ENVIRONMENT envionment variable. - let isDev = - System.Environment.GetEnvironmentVariable "ASPNETCORE_ENVIRONMENT" = Environments.Development - -/// Pipeline wrappers to add different kinds of dependencies into the DI container. -module DI = - open Microsoft.Extensions.DependencyInjection - /// Shortcut for services.AddSingleton<'T> - let singleton<'T when 'T: not struct> (services: IServiceCollection) = services.AddSingleton<'T>() - /// Shortcut for services.AddTransient<'T> - let transient<'T when 'T: not struct> (services: IServiceCollection) = services.AddTransient<'T>() - /// Shortcut for services.AddScoped<'T> - let scoped<'T when 'T: not struct> (services: IServiceCollection) = services.AddScoped<'T>() - -[] -module Extensions = - open Microsoft.AspNetCore.Http - open Microsoft.Extensions.Configuration - - type HttpContext with - - /// Gets the current IConfiguration service from the IOC container. - member this.Configuration = this.GetService() - -[] -type Api = - /// Quickly creates a Fable Remoting API as an HTTP Handler for Giraffe. For reference documentation, see https://zaid-ajaj.github.io/Fable.Remoting/#/server-setup/saturn. - /// The Fable Remoting API. It must take in an `HTTPContext` as the only argument. - /// A function which takes the name of the API and the name of the method and returns the route to the server. Defaults to `/api/{api name}/{method name}` e.g. `/api/ITodoApi/GetTodos`. - /// A function which takes an `Exception` and a `RouteInfo` and returns a Giraffe Handler. Defaults to `Ignore` the exception i.e. it will not be cascaded. - /// A function which takes the current Fable Remoting options and returns a new set of options. Useful for applying any custom options. - static member make(api, ?routeBuilder, ?errorHandler, ?customOptions) = - let routeBuilder = defaultArg routeBuilder (sprintf "/api/%s/%s") - let errorHandler = defaultArg errorHandler (fun _ _ -> Ignore) - let customOptions = defaultArg customOptions id - - Remoting.createApi () - |> Remoting.withRouteBuilder routeBuilder - |> Remoting.withErrorHandler errorHandler - |> customOptions - |> Remoting.fromContext api - |> Remoting.buildHttpHandler \ No newline at end of file diff --git a/src/SAFE.Server/paket.references b/src/SAFE.Server/paket.references index a402c76..db9ab92 100644 --- a/src/SAFE.Server/paket.references +++ b/src/SAFE.Server/paket.references @@ -1,3 +1,4 @@ FSharp.Core Saturn -Fable.Remoting.Giraffe \ No newline at end of file +Fable.Remoting.Giraffe +SAFE.Server.Utils \ No newline at end of file diff --git a/test/SAFE.Client.Tests/Program.fs b/test/SAFE.Client.Tests/Program.fs deleted file mode 100644 index 3d04034..0000000 --- a/test/SAFE.Client.Tests/Program.fs +++ /dev/null @@ -1,129 +0,0 @@ -module Client.Tests - -open Fable.Mocha -open SAFE - -[] -type RemoteDataCase = - | NotStarted - | LoadingEmpty - | LoadingPopulated - | Loaded - - member this.Label = - match this with - | NotStarted -> "Not started" - | LoadingEmpty -> "Loading empty" - | LoadingPopulated -> "Loading populated" - | Loaded -> "loaded" - - member this.Example = - match this with - | NotStarted -> RemoteData.NotStarted - | LoadingEmpty -> Loading None - | LoadingPopulated -> Loading(Some true) - | Loaded -> RemoteData.Loaded true - -module RemoteDataCase = - let all = [ - RemoteDataCase.NotStarted - RemoteDataCase.LoadingEmpty - RemoteDataCase.LoadingPopulated - RemoteDataCase.Loaded - ] - - - let inline testListForAll<'T when 'T: equality> - title - (transformation: RemoteData -> 'T) - (expectedMaker: RemoteDataCase -> 'T) - = - - testList - title - (all - |> List.map (fun case -> - let expected = expectedMaker case - - (fun _ -> Expect.equal (transformation case.Example) expected "") - |> testCase case.Label)) - -let remoteData = - testList "RemoteData" [ - RemoteDataCase.testListForAll "defaultValue" (fun case -> case.DefaultValue false) (function - | RemoteDataCase.NotStarted - | RemoteDataCase.LoadingEmpty -> false - | RemoteDataCase.LoadingPopulated - | RemoteDataCase.Loaded -> true) - - RemoteDataCase.testListForAll "HasLoaded" (_.HasLoaded) (function - | RemoteDataCase.NotStarted - | RemoteDataCase.LoadingEmpty - | RemoteDataCase.LoadingPopulated -> false - | RemoteDataCase.Loaded -> true) - - RemoteDataCase.testListForAll "AsOption" (_.AsOption) (function - | RemoteDataCase.NotStarted - | RemoteDataCase.LoadingEmpty -> None - | RemoteDataCase.LoadingPopulated - | RemoteDataCase.Loaded -> Some true) - - RemoteDataCase.testListForAll "hasStarted" (_.HasStarted) (function - | RemoteDataCase.NotStarted -> false - | RemoteDataCase.LoadingEmpty - | RemoteDataCase.LoadingPopulated - | RemoteDataCase.Loaded -> true) - - RemoteDataCase.testListForAll "hasData" (_.HasData) (function - | RemoteDataCase.NotStarted - | RemoteDataCase.LoadingEmpty -> false - | RemoteDataCase.LoadingPopulated - | RemoteDataCase.Loaded -> true) - - RemoteDataCase.testListForAll "isStillLoading" (_.IsStillLoading) (function - | RemoteDataCase.NotStarted -> false - | RemoteDataCase.LoadingEmpty - | RemoteDataCase.LoadingPopulated -> true - | RemoteDataCase.Loaded -> false) - - RemoteDataCase.testListForAll "isRefresing" (_.IsRefreshing) (function - | RemoteDataCase.NotStarted -> false - | RemoteDataCase.LoadingEmpty -> false - | RemoteDataCase.LoadingPopulated -> true - | RemoteDataCase.Loaded -> false) - - RemoteDataCase.testListForAll "hasNotStarted" (_.HasNotStarted) (function - | RemoteDataCase.NotStarted -> true - | RemoteDataCase.LoadingEmpty - | RemoteDataCase.LoadingPopulated - | RemoteDataCase.Loaded -> false) - - RemoteDataCase.testListForAll "map" (_.Map(not)) (function - | RemoteDataCase.NotStarted -> NotStarted - | RemoteDataCase.LoadingEmpty -> Loading None - | RemoteDataCase.LoadingPopulated -> Loading(Some false) - | RemoteDataCase.Loaded -> Loaded false) - - testList "bind" [ - RemoteDataCase.testListForAll "toLoaded" (_.Bind(Loaded)) (function - | RemoteDataCase.NotStarted -> NotStarted - | RemoteDataCase.LoadingEmpty -> Loading None - | RemoteDataCase.LoadingPopulated - | RemoteDataCase.Loaded -> Loaded true) - - RemoteDataCase.testListForAll "toNotStarted" (_.Bind(fun _ -> NotStarted)) (function - | RemoteDataCase.NotStarted -> NotStarted - | RemoteDataCase.LoadingEmpty -> Loading None - | RemoteDataCase.LoadingPopulated - | RemoteDataCase.Loaded -> NotStarted) - ] - - RemoteDataCase.testListForAll "startLoading" (_.StartLoading()) (function - | RemoteDataCase.NotStarted -> Loading None - | RemoteDataCase.LoadingEmpty -> Loading None - | RemoteDataCase.LoadingPopulated -> Loading (Some true) - | RemoteDataCase.Loaded -> Loading (Some true)) - ] - -[] -let main _ = Mocha.runTests remoteData \ No newline at end of file diff --git a/test/SAFE.Client.Tests/package-lock.json b/test/SAFE.Client.Tests/package-lock.json deleted file mode 100644 index ce2d6c5..0000000 --- a/test/SAFE.Client.Tests/package-lock.json +++ /dev/null @@ -1,910 +0,0 @@ -{ - "name": "SAFE.Client.Tests", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "devDependencies": { - "mocha": "^10.8.2" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true, - "license": "ISC" - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha": { - "version": "10.8.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", - "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.3", - "browser-stdout": "^1.3.1", - "chokidar": "^3.5.3", - "debug": "^4.3.5", - "diff": "^5.2.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^8.1.0", - "he": "^1.2.0", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", - "ms": "^2.1.3", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^6.5.1", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.9", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/workerpool": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", - "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/test/SAFE.Client.Tests/package.json b/test/SAFE.Client.Tests/package.json deleted file mode 100644 index 4719eb1..0000000 --- a/test/SAFE.Client.Tests/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ -"type" : "module", - "scripts": { - "pretest": "dotnet fable -o bld", - "test": "mocha bld" - }, - "devDependencies": { - "mocha": "^10.8.2" - } -} \ No newline at end of file diff --git a/test/SAFE.Client.Tests/paket.references b/test/SAFE.Client.Tests/paket.references deleted file mode 100644 index 176efd9..0000000 --- a/test/SAFE.Client.Tests/paket.references +++ /dev/null @@ -1 +0,0 @@ -Fable.Mocha \ No newline at end of file From 81eb5405460ea1ecbae76bac38c17cb8bef5bff7 Mon Sep 17 00:00:00 2001 From: Joost Kaptein Date: Fri, 11 Apr 2025 12:02:59 +0100 Subject: [PATCH 2/6] re-add mocha --- paket.dependencies | 1 + paket.lock | 3 +++ src/SAFE.Client/SAFE.Client.fsproj | 1 - src/SAFE.Client/paket.references | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/paket.dependencies b/paket.dependencies index 68f1ebd..9077448 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -15,6 +15,7 @@ nuget Fable.Core ~> 4 nuget Fable.Elmish ~> 4 nuget Fable.Elmish.React ~> 4 nuget Fable.Elmish.HMR ~> 7 +nuget Fable.Mocha ~> 2 nuget Fable.Remoting.Client ~> 7 nuget Fable.SimpleJson nuget Feliz ~> 2 \ No newline at end of file diff --git a/paket.lock b/paket.lock index 138966a..027af9a 100644 --- a/paket.lock +++ b/paket.lock @@ -40,6 +40,9 @@ NUGET Fable.Elmish (>= 4.0) Fable.ReactDom.Types (>= 18.0) FSharp.Core (>= 4.7.2) + Fable.Mocha (2.17) + Fable.Core (>= 3.0) + FSharp.Core (>= 4.7) Fable.Parsimmon (4.1) Fable.Core (>= 3.0) FSharp.Core (>= 4.6.2) diff --git a/src/SAFE.Client/SAFE.Client.fsproj b/src/SAFE.Client/SAFE.Client.fsproj index 67a8b5b..86a9da4 100644 --- a/src/SAFE.Client/SAFE.Client.fsproj +++ b/src/SAFE.Client/SAFE.Client.fsproj @@ -28,7 +28,6 @@ - diff --git a/src/SAFE.Client/paket.references b/src/SAFE.Client/paket.references index cf35551..56ac6a0 100644 --- a/src/SAFE.Client/paket.references +++ b/src/SAFE.Client/paket.references @@ -3,6 +3,7 @@ Fable.Core Fable.Elmish Fable.Elmish.React Fable.Elmish.HMR +Fable.Mocha Fable.Remoting.Client Feliz Fable.SimpleJson From 52482b6f2f1b09d73ddb82284503ae16a52bcc69 Mon Sep 17 00:00:00 2001 From: Joost Kaptein Date: Fri, 11 Apr 2025 12:12:06 +0100 Subject: [PATCH 3/6] remove mention of helper types in readmes --- paket.dependencies | 4 ++-- readme.md | 4 ++-- src/SAFE.Client/readme.md | 2 +- src/SAFE.Server/readme.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index 9077448..0f20546 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -7,8 +7,8 @@ nuget Fake.JavaScript.Npm nuget FSharp.Core ~> 8 nuget Fable.Remoting.Giraffe ~> 5 -nuget SAFE.Client.Utils -nuget SAFE.Server.Utils +nuget SAFE.Client.Utils ~> 5 +nuget SAFE.Server.Utils ~> 5 nuget Saturn ~> 0 nuget Fable.Core ~> 4 diff --git a/readme.md b/readme.md index 58f01c6..856d807 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ This repository contains the two metapackages used by the SAFE Template. ## SAFE.Server -Contains dependencies required for the SAFE Stack server component, as well as a set of helper types and utilities. +Contains dependencies required for the SAFE Stack server component ## SAFE.Client -Contains dependencies required for the SAFE Stack client component, as well as a set of helper types and utilities, including `AsyncMsg` and `Deferred` types. \ No newline at end of file +Contains dependencies required for the SAFE Stack client component \ No newline at end of file diff --git a/src/SAFE.Client/readme.md b/src/SAFE.Client/readme.md index 30faefb..d95ee8e 100644 --- a/src/SAFE.Client/readme.md +++ b/src/SAFE.Client/readme.md @@ -1 +1 @@ -Contains dependencies required for the SAFE Stack client component, as well as a set of helper types and utilities, including `AsyncMsg` and `Deferred` types. \ No newline at end of file +Contains dependencies required for the SAFE Stack client component \ No newline at end of file diff --git a/src/SAFE.Server/readme.md b/src/SAFE.Server/readme.md index 6d358b9..396f70e 100644 --- a/src/SAFE.Server/readme.md +++ b/src/SAFE.Server/readme.md @@ -1 +1 @@ -Contains dependencies required for the SAFE Stack server component, as well as a set of helper types and utilities. \ No newline at end of file +Contains dependencies required for the SAFE Stack server component \ No newline at end of file From b36a9202052673912cbb7bad724f88e48d652428 Mon Sep 17 00:00:00 2001 From: Joost Kaptein Date: Fri, 11 Apr 2025 12:16:56 +0100 Subject: [PATCH 4/6] recalculate paket lock --- paket.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paket.lock b/paket.lock index 027af9a..65c0d6e 100644 --- a/paket.lock +++ b/paket.lock @@ -163,12 +163,12 @@ NUGET Microsoft.IdentityModel.Logging (>= 7.7.1) Microsoft.IO.RecyclableMemoryStream (3.0.1) Newtonsoft.Json (13.0.3) - SAFE.Client.Utils (0.0.1-alpha) + SAFE.Client.Utils (5.0) Fable.Browser.Dom (>= 2.18.1) - Fable.Remoting.Client (>= 7.32 < 8.0) + Fable.Remoting.Client (>= 7.32) Fable.SimpleJson (>= 3.24) FSharp.Core (>= 8.0.403 < 9.0) - SAFE.Server.Utils (0.0.1-alpha) + SAFE.Server.Utils (5.0) Fable.Remoting.Giraffe (>= 5.21) Saturn (0.17) FSharp.Control.Websockets (>= 0.2.2) From 923acd5e035164a15908261f8227b48e85d40b31 Mon Sep 17 00:00:00 2001 From: Joost Kaptein Date: Mon, 14 Apr 2025 16:36:22 +0100 Subject: [PATCH 5/6] add tests back in --- .github/workflows/test.yaml | 23 + Build/Build.fs | 12 + SAFE.Meta.sln | 9 + test/SAFE.Client.Tests/Program.fs | 129 ++++ test/SAFE.Client.Tests/package-lock.json | 910 +++++++++++++++++++++++ test/SAFE.Client.Tests/package.json | 10 + test/SAFE.Client.Tests/paket.references | 1 + 7 files changed, 1094 insertions(+) create mode 100644 .github/workflows/test.yaml create mode 100644 test/SAFE.Client.Tests/Program.fs create mode 100644 test/SAFE.Client.Tests/package-lock.json create mode 100644 test/SAFE.Client.Tests/package.json create mode 100644 test/SAFE.Client.Tests/paket.references diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..d2715f2 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,23 @@ +name: SAFE meta automated tests + +on: push + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Tool Restore + run: dotnet tool restore + + - name: Test + working-directory: ./Build + run: dotnet run --project Build.fsproj -- Test \ No newline at end of file diff --git a/Build/Build.fs b/Build/Build.fs index 5d9169d..5f0d8cd 100644 --- a/Build/Build.fs +++ b/Build/Build.fs @@ -25,8 +25,20 @@ module Processes = let sourceFolder = Path.getFullName """../src""" let outputFolder = Path.getFullName """../nugetPackages""" +let clientTestFolder = Path.getFullName """../test/SAFE.Client.Tests""" + let projects = [ "SAFE.Client"; "SAFE.Server" ] +Target.create "Test" (fun _ -> + Npm.install (fun o -> { + o with + WorkingDirectory = clientTestFolder + }) + + Npm.run "test" (fun o -> { + o with + WorkingDirectory = clientTestFolder + })) Target.create "Bundle" (fun _ -> let version = Environment.environVarOrFail "VERSION" diff --git a/SAFE.Meta.sln b/SAFE.Meta.sln index 95dfe73..3041cec 100644 --- a/SAFE.Meta.sln +++ b/SAFE.Meta.sln @@ -11,6 +11,10 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SAFE.Server", "src\SAFE.Ser EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Build", "Build\Build.fsproj", "{F49104E3-DBA9-4A2D-B839-B4E60BCAE698}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{30BCECCE-E11D-4028-A9DE-6A83DF2E3EEC}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SAFE.Client.Tests", "test\SAFE.Client.Tests\SAFE.Client.Tests.fsproj", "{66BAE342-23E0-4904-B98E-B0679D9370D7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -32,9 +36,14 @@ Global {F49104E3-DBA9-4A2D-B839-B4E60BCAE698}.Debug|Any CPU.Build.0 = Debug|Any CPU {F49104E3-DBA9-4A2D-B839-B4E60BCAE698}.Release|Any CPU.ActiveCfg = Release|Any CPU {F49104E3-DBA9-4A2D-B839-B4E60BCAE698}.Release|Any CPU.Build.0 = Release|Any CPU + {66BAE342-23E0-4904-B98E-B0679D9370D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66BAE342-23E0-4904-B98E-B0679D9370D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66BAE342-23E0-4904-B98E-B0679D9370D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66BAE342-23E0-4904-B98E-B0679D9370D7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {5BCFE180-027E-40F9-847B-7B36F10BD5D7} = {59161B7D-F517-4F4B-B28D-33E34B8A930E} {0C8F62AC-D5D8-43E6-A4C7-159E530C3CE5} = {59161B7D-F517-4F4B-B28D-33E34B8A930E} + {66BAE342-23E0-4904-B98E-B0679D9370D7} = {30BCECCE-E11D-4028-A9DE-6A83DF2E3EEC} EndGlobalSection EndGlobal diff --git a/test/SAFE.Client.Tests/Program.fs b/test/SAFE.Client.Tests/Program.fs new file mode 100644 index 0000000..3d04034 --- /dev/null +++ b/test/SAFE.Client.Tests/Program.fs @@ -0,0 +1,129 @@ +module Client.Tests + +open Fable.Mocha +open SAFE + +[] +type RemoteDataCase = + | NotStarted + | LoadingEmpty + | LoadingPopulated + | Loaded + + member this.Label = + match this with + | NotStarted -> "Not started" + | LoadingEmpty -> "Loading empty" + | LoadingPopulated -> "Loading populated" + | Loaded -> "loaded" + + member this.Example = + match this with + | NotStarted -> RemoteData.NotStarted + | LoadingEmpty -> Loading None + | LoadingPopulated -> Loading(Some true) + | Loaded -> RemoteData.Loaded true + +module RemoteDataCase = + let all = [ + RemoteDataCase.NotStarted + RemoteDataCase.LoadingEmpty + RemoteDataCase.LoadingPopulated + RemoteDataCase.Loaded + ] + + + let inline testListForAll<'T when 'T: equality> + title + (transformation: RemoteData -> 'T) + (expectedMaker: RemoteDataCase -> 'T) + = + + testList + title + (all + |> List.map (fun case -> + let expected = expectedMaker case + + (fun _ -> Expect.equal (transformation case.Example) expected "") + |> testCase case.Label)) + +let remoteData = + testList "RemoteData" [ + RemoteDataCase.testListForAll "defaultValue" (fun case -> case.DefaultValue false) (function + | RemoteDataCase.NotStarted + | RemoteDataCase.LoadingEmpty -> false + | RemoteDataCase.LoadingPopulated + | RemoteDataCase.Loaded -> true) + + RemoteDataCase.testListForAll "HasLoaded" (_.HasLoaded) (function + | RemoteDataCase.NotStarted + | RemoteDataCase.LoadingEmpty + | RemoteDataCase.LoadingPopulated -> false + | RemoteDataCase.Loaded -> true) + + RemoteDataCase.testListForAll "AsOption" (_.AsOption) (function + | RemoteDataCase.NotStarted + | RemoteDataCase.LoadingEmpty -> None + | RemoteDataCase.LoadingPopulated + | RemoteDataCase.Loaded -> Some true) + + RemoteDataCase.testListForAll "hasStarted" (_.HasStarted) (function + | RemoteDataCase.NotStarted -> false + | RemoteDataCase.LoadingEmpty + | RemoteDataCase.LoadingPopulated + | RemoteDataCase.Loaded -> true) + + RemoteDataCase.testListForAll "hasData" (_.HasData) (function + | RemoteDataCase.NotStarted + | RemoteDataCase.LoadingEmpty -> false + | RemoteDataCase.LoadingPopulated + | RemoteDataCase.Loaded -> true) + + RemoteDataCase.testListForAll "isStillLoading" (_.IsStillLoading) (function + | RemoteDataCase.NotStarted -> false + | RemoteDataCase.LoadingEmpty + | RemoteDataCase.LoadingPopulated -> true + | RemoteDataCase.Loaded -> false) + + RemoteDataCase.testListForAll "isRefresing" (_.IsRefreshing) (function + | RemoteDataCase.NotStarted -> false + | RemoteDataCase.LoadingEmpty -> false + | RemoteDataCase.LoadingPopulated -> true + | RemoteDataCase.Loaded -> false) + + RemoteDataCase.testListForAll "hasNotStarted" (_.HasNotStarted) (function + | RemoteDataCase.NotStarted -> true + | RemoteDataCase.LoadingEmpty + | RemoteDataCase.LoadingPopulated + | RemoteDataCase.Loaded -> false) + + RemoteDataCase.testListForAll "map" (_.Map(not)) (function + | RemoteDataCase.NotStarted -> NotStarted + | RemoteDataCase.LoadingEmpty -> Loading None + | RemoteDataCase.LoadingPopulated -> Loading(Some false) + | RemoteDataCase.Loaded -> Loaded false) + + testList "bind" [ + RemoteDataCase.testListForAll "toLoaded" (_.Bind(Loaded)) (function + | RemoteDataCase.NotStarted -> NotStarted + | RemoteDataCase.LoadingEmpty -> Loading None + | RemoteDataCase.LoadingPopulated + | RemoteDataCase.Loaded -> Loaded true) + + RemoteDataCase.testListForAll "toNotStarted" (_.Bind(fun _ -> NotStarted)) (function + | RemoteDataCase.NotStarted -> NotStarted + | RemoteDataCase.LoadingEmpty -> Loading None + | RemoteDataCase.LoadingPopulated + | RemoteDataCase.Loaded -> NotStarted) + ] + + RemoteDataCase.testListForAll "startLoading" (_.StartLoading()) (function + | RemoteDataCase.NotStarted -> Loading None + | RemoteDataCase.LoadingEmpty -> Loading None + | RemoteDataCase.LoadingPopulated -> Loading (Some true) + | RemoteDataCase.Loaded -> Loading (Some true)) + ] + +[] +let main _ = Mocha.runTests remoteData \ No newline at end of file diff --git a/test/SAFE.Client.Tests/package-lock.json b/test/SAFE.Client.Tests/package-lock.json new file mode 100644 index 0000000..ce2d6c5 --- /dev/null +++ b/test/SAFE.Client.Tests/package-lock.json @@ -0,0 +1,910 @@ +{ + "name": "SAFE.Client.Tests", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "mocha": "^10.8.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/test/SAFE.Client.Tests/package.json b/test/SAFE.Client.Tests/package.json new file mode 100644 index 0000000..9044238 --- /dev/null +++ b/test/SAFE.Client.Tests/package.json @@ -0,0 +1,10 @@ +{ + "type": "module", + "scripts": { + "pretest": "dotnet fable -o bld --noCache", + "test": "mocha bld" + }, + "devDependencies": { + "mocha": "^10.8.2" + } +} \ No newline at end of file diff --git a/test/SAFE.Client.Tests/paket.references b/test/SAFE.Client.Tests/paket.references new file mode 100644 index 0000000..176efd9 --- /dev/null +++ b/test/SAFE.Client.Tests/paket.references @@ -0,0 +1 @@ +Fable.Mocha \ No newline at end of file From 003d90e0f8febefbdb4d5bbffe32dcc87a574ced Mon Sep 17 00:00:00 2001 From: Joost Kaptein Date: Mon, 14 Apr 2025 16:36:36 +0100 Subject: [PATCH 6/6] update to new version of SAFE.Utils.Client --- paket.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paket.lock b/paket.lock index 65c0d6e..232f3ef 100644 --- a/paket.lock +++ b/paket.lock @@ -163,7 +163,7 @@ NUGET Microsoft.IdentityModel.Logging (>= 7.7.1) Microsoft.IO.RecyclableMemoryStream (3.0.1) Newtonsoft.Json (13.0.3) - SAFE.Client.Utils (5.0) + SAFE.Client.Utils (5.0.1) Fable.Browser.Dom (>= 2.18.1) Fable.Remoting.Client (>= 7.32) Fable.SimpleJson (>= 3.24)