]
-module internal State =
- let mkState visited unvisited args value =
- { visited = visited
- unvisited = unvisited
- args = args
- value = value }
-
- let map f { visited = visited; unvisited = unvisited; args = args; value = value } =
- { visited = visited
- unvisited = unvisited
- args = args
- value = f value }
-
-
-/// Turn URLs like `/blog/42/cat-herding-techniques` into nice data.
-type Parser<'a,'b> = State<'a> -> State<'b> list
-
-
-(**
-#### Parse segements
-Create a custom path segment parser. You can use it to define something like “only CSS files” like this:
-```
- let css =
- custom "CSS_FILE" <| fun segment ->
- if String.EndsWith ".css" then
- Ok segment
- else
- Error "Does not end with .css"
-```
-*)
-let custom tipe stringToSomething : Parser<_,_> =
- let inner { visited = visited; unvisited = unvisited; args = args; value = value } =
- match unvisited with
- | [] -> []
- | next :: rest ->
- match stringToSomething next with
- | Ok nextValue ->
- [ State.mkState (next :: visited) rest args (value nextValue) ]
-
- | Error msg ->
- []
- inner
-
-
-(** Parse a segment of the path as a `string`.
-```
- parse str location
-```
-
- /alice/ ==> Some "alice"
- /bob ==> Some "bob"
- /42/ ==> Some "42"
-
-*)
-let str state =
- custom "string" Ok state
-
-
-(** Parse a segment of the path as an `int`.
-```
- parse i32 location
-```
-
- /alice/ ==> None
- /bob ==> None
- /42/ ==> Some 42
-
-*)
-let i32 state =
- custom "i32" (System.Int32.TryParse >> function true, value -> Ok value | _ -> Error "Can't parse int" ) state
-
-
-(** Parse a segment of the path if it matches a given string.
-```
- s "blog" // can parse /blog/
- // but not /glob/ or /42/ or anything else
-```
-*)
-let s str : Parser<_,_> =
- let inner { visited = visited; unvisited = unvisited; args = args; value = value } =
- match unvisited with
- | [] -> []
- | next :: rest ->
- if next = str then
- [ State.mkState (next :: visited) rest args value ]
- else
- []
- inner
-
-
-
-(**
-#### Combining parsers
-Parse a path with multiple segments.
-
-```
- parse (s "blog" > i32) location
-```
-
- /blog/35/ ==> Some 35
- /blog/42 ==> Some 42
- /blog/ ==> None
- /42/ ==> None
-
-```
- parse (s "search" > str) location
-```
-
- /search/cats/ ==> Some "cats"
- /search/frog ==> Some "frog"
- /search/ ==> None
- /cats/ ==> None
-
-*)
-let inline (>) (parseBefore:Parser<_,_>) (parseAfter:Parser<_,_>) =
- fun state ->
- List.collect parseAfter (parseBefore state)
-
-
-(** Transform a path parser.
-```
- type Comment = { author : string; id : int }
- rawComment =
- s "user" > str > s "comments" > i32
- comment =
- map (fun a id -> { author = a; id = id }) rawComment
- parse comment location
-```
-
- /user/bob/comments/42 ==> Some { author = "bob"; id = 42 }
- /user/tom/comments/35 ==> Some { author = "tom"; id = 35 }
- /user/sam/ ==> None
-
-*)
-let map (subValue:'a) (parse:Parser<'a,'b>) : Parser<'b->'c,'c> =
- let inner { visited = visited; unvisited = unvisited; args = args; value = value } =
- List.map (State.map value)
- <| parse { visited = visited
- unvisited = unvisited
- args = args
- value = subValue }
- inner
-
-
-
-(** Try a bunch of different path parsers.
-```
- type Route
- = Search of string
- | Blog of int
- | User of string
- | Comment of string*int
- route =
- oneOf
- [ map Search (s "search" > str)
- map Blog (s "blog" > i32)
- map User (s "user" > str)
- map Comment (s "user" > str > "comments" > i32) ]
- parse route location
-```
-
- /search/cats ==> Some (Search "cats")
- /search/ ==> None
- /blog/42 ==> Some (Blog 42)
- /blog/cats ==> None
- /user/sam/ ==> Some (User "sam")
- /user/bob/comments/42 ==> Some (Comment "bob" 42)
- /user/tom/comments/35 ==> Some (Comment "tom" 35)
- /user/ ==> None
-
-*)
-let oneOf parsers state =
- List.collect (fun parser -> parser state) parsers
-
-
-(** A parser that does not consume any path segments.
-```
- type BlogRoute = Overview | Post of int
- blogRoute =
- oneOf
- [ map Overview top
- map Post (s "post" > i32) ]
- parse (s "blog" > blogRoute) location
-```
-
- /blog/ ==> Some Overview
- /blog/post/42 ==> Some (Post 42)
-
-*)
-let top state=
- [state]
-
-
-
-(**
-#### Query parameters
-Turn query parameters like `?name=tom&age=42` into nice data.
-
-*)
-
-type QueryParser<'a,'b> = State<'a> -> State<'b> list
-
-
-(** Parse some query parameters.
-```
- type Route = BlogList (Option string) | BlogPost Int
- route =
- oneOf
- [ map BlogList (s "blog" > stringParam "search")
- map BlogPost (s "blog" > i32) ]
- parse route location
-```
-
- /blog/ ==> Some (BlogList None)
- /blog/?search=cats ==> Some (BlogList (Some "cats"))
- /blog/42 ==> Some (BlogPost 42)
-
-*)
-let inline (>) (parser:Parser<_,_>) (queryParser:QueryParser<_,_>) : Parser<_,_> =
- fun state ->
- List.collect queryParser (parser state)
-
-(** Create a custom query parser. You could create parsers like these:
-```
- val jsonParam : string -> Decoder a -> QueryParser (Option a -> b) b
- val enumParam : string -> Map -> QueryParser (Option a -> b) b
-```
-*)
-let customParam (key: string) (func:string option -> _) : QueryParser<_,_> =
- let inner { visited = visited; unvisited = unvisited; args = args; value = value } =
- [ State.mkState visited unvisited args (value (func (Map.tryFind key args))) ]
- inner
-
-
-(** Parse a query parameter as a `string`.
-```
- parse (s "blog" > stringParam "search") location
-```
-
- /blog/ ==> Some (Overview None)
- /blog/?search=cats ==> Some (Overview (Some "cats"))
-
-*)
-let stringParam name =
- customParam name id
-
-let internal intParamHelp =
- Option.bind
- (fun value ->
- match System.Int32.TryParse value with
- | (true,x) -> Some x
- | _ -> None)
-
-(** Parse a query parameter as an `int`. Option you want to show paginated
-search results. You could have a `start` query parameter to say which result
-should appear first.
-```
- parse (s "results" > intParam "start") location
-```
-
- /results ==> Some None
- /results?start=10 ==> Some (Some 10)
-
-*)
-let intParam name =
- customParam name intParamHelp
-
-
-// PARSER HELPERS
-
-let rec internal parseHelp states =
- match states with
- | [] ->
- None
- | state :: rest ->
- match state.unvisited with
- | [] ->
- Some state.value
- | [""] ->
- Some state.value
- | _ ->
- parseHelp rest
-
-let internal splitUrl (url:string) =
- match List.ofArray <| url.Split([|'/'|]) with
- | "" :: segments ->
- segments
- | segments ->
- segments
-
-/// parse a given part of the location
-let parse (parser:Parser<'a->'a,'a>) url args =
- { visited = []
- unvisited = splitUrl url
- args = args
- value = id }
- |> parser
- |> parseHelp
-
-open Fable.Import
-
-let internal toKeyValuePair (segment:string) =
- match segment.Split('=') with
- | [| key; value |] ->
- Option.tuple (Option.ofFunc JS.decodeURI key) (Option.ofFunc JS.decodeURI value)
- | _ -> None
-
-
-let internal parseParams (querystring:string) =
- querystring.Substring(1).Split('&')
- |> Seq.map toKeyValuePair
- |> Seq.choose id
- |> Map.ofSeq
-
-open Fable.Import.Browser
-
-(**
-#### Parsers
-Parse based on `location.pathname` and `location.search`. This parser
-ignores the hash entirely.
-*)
-let parsePath (parser:Parser<_,_>) (location:Location) =
- parse parser location.pathname (parseParams location.search)
-
-(** Parse based on `location.hash`. This parser ignores the normal
-path entirely.
-*)
-let parseHash (parser:Parser<_,_>) (location:Location) =
- let hash, search =
- let hash = location.hash.Substring 1
- if hash.Contains("?") then
- let h = hash.Substring(0, hash.IndexOf("?"))
- h, hash.Substring(h.Length)
- else
- hash, "?"
-
- parse parser (hash) (parseParams search)
diff --git a/nuget/packages/fable.elmish.browser/1.0.0/fable/prelude.fs b/nuget/packages/fable.elmish.browser/1.0.0/fable/prelude.fs
deleted file mode 100755
index 9f0ac4648..000000000
--- a/nuget/packages/fable.elmish.browser/1.0.0/fable/prelude.fs
+++ /dev/null
@@ -1,17 +0,0 @@
-namespace Elmish.Browser
-
-
-[]
-[]
-module Option =
-
- let tuple a b =
- match (a,b) with
- | Some a, Some b -> Some (a,b)
- | _ -> None
-
- let ofFunc f arg =
- try
- Some (f arg)
- with _ ->
- None
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.browser/1.0.0/lib/netstandard1.6/Fable.Elmish.Browser.dll b/nuget/packages/fable.elmish.browser/1.0.0/lib/netstandard1.6/Fable.Elmish.Browser.dll
deleted file mode 100755
index 1dfd6dcc1..000000000
Binary files a/nuget/packages/fable.elmish.browser/1.0.0/lib/netstandard1.6/Fable.Elmish.Browser.dll and /dev/null differ
diff --git a/nuget/packages/fable.elmish.debugger/1.0.1/.nupkg.metadata b/nuget/packages/fable.elmish.debugger/1.0.1/.nupkg.metadata
deleted file mode 100644
index 81e41f810..000000000
--- a/nuget/packages/fable.elmish.debugger/1.0.1/.nupkg.metadata
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "version": 1,
- "contentHash": "uinemTtBEefma9DXxwELgV39MqMcHkhZYGwWgxGGeB3fG1273MSQASfUHpQm+0hRjMfwraVPAr560dr8poWQzQ=="
-}
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.debugger/1.0.1/.signature.p7s b/nuget/packages/fable.elmish.debugger/1.0.1/.signature.p7s
deleted file mode 100755
index f51035588..000000000
Binary files a/nuget/packages/fable.elmish.debugger/1.0.1/.signature.p7s and /dev/null differ
diff --git a/nuget/packages/fable.elmish.debugger/1.0.1/fable.elmish.debugger.1.0.1.nupkg b/nuget/packages/fable.elmish.debugger/1.0.1/fable.elmish.debugger.1.0.1.nupkg
deleted file mode 100644
index 5c75d5dcb..000000000
Binary files a/nuget/packages/fable.elmish.debugger/1.0.1/fable.elmish.debugger.1.0.1.nupkg and /dev/null differ
diff --git a/nuget/packages/fable.elmish.debugger/1.0.1/fable.elmish.debugger.1.0.1.nupkg.sha512 b/nuget/packages/fable.elmish.debugger/1.0.1/fable.elmish.debugger.1.0.1.nupkg.sha512
deleted file mode 100644
index 8c3a93094..000000000
--- a/nuget/packages/fable.elmish.debugger/1.0.1/fable.elmish.debugger.1.0.1.nupkg.sha512
+++ /dev/null
@@ -1 +0,0 @@
-WL53TGF880FRf3ZvoWr9hOE7tKU3ns6M1Ark332QKptJilLYId6gjGseVCcZCAd6JWuGCENdrLQQY4wjiOmq/g==
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.debugger/1.0.1/fable.elmish.debugger.nuspec b/nuget/packages/fable.elmish.debugger/1.0.1/fable.elmish.debugger.nuspec
deleted file mode 100755
index 4ec6dddf4..000000000
--- a/nuget/packages/fable.elmish.debugger/1.0.1/fable.elmish.debugger.nuspec
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- Fable.Elmish.Debugger
- 1.0.1
- Eugene Tolmachev
- Eugene Tolmachev
- false
- https://raw.githubusercontent.com/fable-elmish/debugger/master/LICENSE.md
- https://github.com/fable-elmish/debugger
- https://raw.githubusercontent.com/fable-elmish/debugger/master/docs/files/img/logo.png
- Debugger for Elmish apps
- fable elmish fsharp debugger
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.debugger/1.0.1/fable/Fable.Elmish.Debugger.fsproj b/nuget/packages/fable.elmish.debugger/1.0.1/fable/Fable.Elmish.Debugger.fsproj
deleted file mode 100755
index 76541b32e..000000000
--- a/nuget/packages/fable.elmish.debugger/1.0.1/fable/Fable.Elmish.Debugger.fsproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- netstandard1.6
-
-
-
-
-
-
-
-
-
-
diff --git a/nuget/packages/fable.elmish.debugger/1.0.1/fable/Fable.Import.RemoteDev.fs b/nuget/packages/fable.elmish.debugger/1.0.1/fable/Fable.Import.RemoteDev.fs
deleted file mode 100755
index 75b570846..000000000
--- a/nuget/packages/fable.elmish.debugger/1.0.1/fable/Fable.Import.RemoteDev.fs
+++ /dev/null
@@ -1,71 +0,0 @@
-namespace Fable.Import
-
-open System
-open Fable.Core
-open Fable.Import.JS
-open Fable.Import.Browser
-
-module RemoteDev =
- module MsgTypes =
- []
- let Start = "START"
- []
- let Action = "ACTION"
- []
- let Dispatch = "DISPATCH"
-
- module PayloadTypes =
- []
- let ImportState = "IMPORT_STATE"
- []
- let JumpToState = "JUMP_TO_STATE"
- []
- let JumpToAction = "JUMP_TO_ACTION"
-
- type Options =
- { remote : bool
- port : int
- hostname : string
- secure : bool
- getActionType : (obj->obj) option
- serialize : obj }
-
- type Action =
- { ``type``: string
- fields : obj array }
-
- type LiftedState =
- { actionsById : Action array
- computedStates : obj array
- currentStateIndex : int
- nextActionId : int }
-
- type Payload =
- { nextLiftedState : LiftedState
- ``type``: string }
-
- type Msg =
- { state : string
- action : obj
- ``type`` : string
- payload : Payload }
-
- type Listener = Msg -> unit
-
- type Unsubscribe = unit -> unit
-
- type Connection =
- abstract init: obj * obj Option -> unit
- abstract subscribe: Listener -> Unsubscribe
- abstract unsubscribe: Unsubscribe
- abstract send: obj * obj -> unit
- abstract error: obj -> unit
-
- []
- let connect : Options -> Connection = jsNative
-
- []
- let connectViaExtension : Options -> Connection = jsNative
-
- []
- let extractState : obj -> obj = jsNative
diff --git a/nuget/packages/fable.elmish.debugger/1.0.1/fable/debugger.fs b/nuget/packages/fable.elmish.debugger/1.0.1/fable/debugger.fs
deleted file mode 100755
index d865dd4ed..000000000
--- a/nuget/packages/fable.elmish.debugger/1.0.1/fable/debugger.fs
+++ /dev/null
@@ -1,139 +0,0 @@
-namespace Elmish.Debug
-open Fable.Import.RemoteDev
-open Fable.Core.JsInterop
-open Fable.Core
-
-[]
-module Debugger =
- open FSharp.Reflection
-
- let inline private duName (x:'a) =
- match FSharpValue.GetUnionFields(x, typeof<'a>) with
- | case, _ -> case.Name
-
- let inline private getCase cmd : obj =
- createObj ["type" ==> duName cmd
- "msg" ==> cmd]
-
- type ConnectionOptions =
- | ViaExtension
- | Remote of address:string * port:int
- | Secure of address:string * port:int
-
- let connect =
- let serialize = createObj ["replacer" ==> fun _ v -> deflate v]
-
- let fallback = { Options.remote = true; hostname = "remotedev.io"; port = 443; secure = true; getActionType = Some getCase; serialize = serialize }
-
- function
- | ViaExtension -> { fallback with remote = false; hostname = "localhost"; port = 8000; secure = false }
- | Remote (address,port) -> { fallback with hostname = address; port = port; secure = false; getActionType = None }
- | Secure (address,port) -> { fallback with hostname = address; port = port; getActionType = None }
- >> connectViaExtension
-
-[]
-module Program =
- open Elmish
- open Fable.Import
-
- let [] private setTimeout(f: unit->unit, ms: int): unit = jsNative
-
- []
- let private withDebuggerUsing' (debounce: int option) (connection:Connection) (program : Program<'a,'model,'msg,'view>) : Program<'a,'model,'msg,'view> =
- let init a =
- let (model,cmd) = program.init a
- // simple looking one liner to do a recursive deflate
- // needed otherwise extension gets F# obj
- let deflated = model |> toJson |> JS.JSON.parse
- connection.init (deflated, None)
- model,cmd
-
- let mutable timeoutActive = false
- let mutable store = Unchecked.defaultof<'msg * 'model>
-
- let update msg model : 'model * Cmd<'msg> =
- let (model',cmd) = program.update msg model
- match debounce with
- | Some debounce ->
- store <- msg, model'
- if not timeoutActive then
- timeoutActive <- true
- setTimeout((fun () ->
- let msg, model' = store
- connection.send (msg, model')
- timeoutActive <- false), debounce)
- | None ->
- connection.send (msg, model')
- (model',cmd)
-
- let subscribe model =
- let sub dispatch =
- function
- | (msg:Msg) when msg.``type`` = MsgTypes.Dispatch ->
- try
- match msg.payload.``type`` with
- | PayloadTypes.JumpToAction
- | PayloadTypes.JumpToState ->
- let state = inflate<'model> (extractState msg)
- program.setState state dispatch
- | PayloadTypes.ImportState ->
- let state = msg.payload.nextLiftedState.computedStates |> Array.last
- program.setState (inflate<'model> state?state) dispatch
- connection.send(null, msg.payload.nextLiftedState)
- | _ -> ()
- with ex ->
- Fable.Import.Browser.console.error ("Unable to process monitor command", msg, ex)
- | _ -> ()
- |> connection.subscribe
- |> ignore
-
- Cmd.batch
- [ [sub]
- program.subscribe model ]
-
- let onError (text,ex: exn) =
- program.onError (text, ex)
- connection.error (text + ex.Message)
-
- { program with
- init = init
- update = update
- subscribe = subscribe
- onError = onError }
-
-
- []
- let withDebuggerUsing connection program : Program<'a,'model,'msg,'view> =
- withDebuggerUsing' None connection program
-
-
- []
- let withDebuggerAt options program : Program<'a,'model,'msg,'view> =
- try
- (Debugger.connect options, program)
- ||> withDebuggerUsing
- with ex ->
- Fable.Import.Browser.console.error ("Unable to connect to the monitor, continuing w/o debugger", ex)
- program
-
-
- []
- let withDebugger (program : Program<'a,'model,'msg,'view>) : Program<'a,'model,'msg,'view> =
- try
- ((Debugger.connect Debugger.ViaExtension),program)
- ||> withDebuggerUsing
- with ex ->
- Fable.Import.Browser.console.error ("Unable to connect to the monitor, continuing w/o debugger", ex)
- program
-
- []
- /// It will connect to the debugger only once
- /// within the space of a given time (in milliseconds).
- /// Intended for apps with many state updates per second, like games.
- let withDebuggerDebounce (debounce: int) (program : Program<'a,'model,'msg,'view>) : Program<'a,'model,'msg,'view> =
- try
- ((Debugger.connect Debugger.ViaExtension),program)
- ||> withDebuggerUsing' (Some debounce)
- with ex ->
- Fable.Import.Browser.console.error ("Unable to connect to the monitor, continuing w/o debugger", ex)
- program
diff --git a/nuget/packages/fable.elmish.debugger/1.0.1/lib/netstandard1.6/Fable.Elmish.Debugger.dll b/nuget/packages/fable.elmish.debugger/1.0.1/lib/netstandard1.6/Fable.Elmish.Debugger.dll
deleted file mode 100755
index 71cf75a24..000000000
Binary files a/nuget/packages/fable.elmish.debugger/1.0.1/lib/netstandard1.6/Fable.Elmish.Debugger.dll and /dev/null differ
diff --git a/nuget/packages/fable.elmish.hmr/1.0.0/.nupkg.metadata b/nuget/packages/fable.elmish.hmr/1.0.0/.nupkg.metadata
deleted file mode 100644
index 3363c3cc7..000000000
--- a/nuget/packages/fable.elmish.hmr/1.0.0/.nupkg.metadata
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "version": 1,
- "contentHash": "0PonZgMlQAtiKsK8A6UGhdUFGCjBtYQJBqi8ZRCWQLNA19yA5yN9y5BxyggAiaTa49YFF7qrFO4xk1PzVqoSLw=="
-}
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.hmr/1.0.0/.signature.p7s b/nuget/packages/fable.elmish.hmr/1.0.0/.signature.p7s
deleted file mode 100755
index 7f0899027..000000000
Binary files a/nuget/packages/fable.elmish.hmr/1.0.0/.signature.p7s and /dev/null differ
diff --git a/nuget/packages/fable.elmish.hmr/1.0.0/fable.elmish.hmr.1.0.0.nupkg b/nuget/packages/fable.elmish.hmr/1.0.0/fable.elmish.hmr.1.0.0.nupkg
deleted file mode 100644
index c7eebf065..000000000
Binary files a/nuget/packages/fable.elmish.hmr/1.0.0/fable.elmish.hmr.1.0.0.nupkg and /dev/null differ
diff --git a/nuget/packages/fable.elmish.hmr/1.0.0/fable.elmish.hmr.1.0.0.nupkg.sha512 b/nuget/packages/fable.elmish.hmr/1.0.0/fable.elmish.hmr.1.0.0.nupkg.sha512
deleted file mode 100644
index 2cb8c589c..000000000
--- a/nuget/packages/fable.elmish.hmr/1.0.0/fable.elmish.hmr.1.0.0.nupkg.sha512
+++ /dev/null
@@ -1 +0,0 @@
-cGh6O8L2dEujqaofv5tFgoWSu/uBlSal4QaECXKdhBbvy63VjUC2CSjhWj/Rjygs1jTWN3LAovgAYrMpovo/Gw==
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.hmr/1.0.0/fable.elmish.hmr.nuspec b/nuget/packages/fable.elmish.hmr/1.0.0/fable.elmish.hmr.nuspec
deleted file mode 100755
index 0163570ab..000000000
--- a/nuget/packages/fable.elmish.hmr/1.0.0/fable.elmish.hmr.nuspec
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- Fable.Elmish.HMR
- 1.0.0
- Maxime Mangel
- Maxime Mangel
- false
- https://raw.githubusercontent.com/fable-elmish/hmr/master/LICENSE.md
- https://github.com/fable-elmish/hmr
- https://raw.githubusercontent.com/fable-elmish/hmr/master/docs/files/img/logo.png
- Hot Module Replacement for Elmish apps
- fable elmish fsharp hmr
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.hmr/1.0.0/fable/Fable.Elmish.HMR.fsproj b/nuget/packages/fable.elmish.hmr/1.0.0/fable/Fable.Elmish.HMR.fsproj
deleted file mode 100755
index f45330d06..000000000
--- a/nuget/packages/fable.elmish.hmr/1.0.0/fable/Fable.Elmish.HMR.fsproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- netstandard1.6
-
-
-
-
-
-
-
-
-
diff --git a/nuget/packages/fable.elmish.hmr/1.0.0/fable/hmr.fs b/nuget/packages/fable.elmish.hmr/1.0.0/fable/hmr.fs
deleted file mode 100755
index 8129583b5..000000000
--- a/nuget/packages/fable.elmish.hmr/1.0.0/fable/hmr.fs
+++ /dev/null
@@ -1,65 +0,0 @@
-namespace Elmish.HMR
-
-open Elmish
-open Fable.Core
-open Fable.Core.JsInterop
-
-[]
-module Program =
-
- type IModule =
- abstract hot: obj with get, set
-
- let [] [] ``module`` : IModule = jsNative
-
- type HMRMsg<'msg> =
- | UserMsg of 'msg
- | Reload
-
- type HMRModel<'model> =
- { HMRCount : int
- UserModel : 'model }
-
- let mutable hmrState : obj = null
-
- let inline withHMR (program:Elmish.Program<'arg, 'model, 'msg, 'view>) =
-
- if not (isNull ``module``.hot) then
- ``module``.hot?accept() |> ignore
-
- let map (model, cmd) =
- model, cmd |> Cmd.map UserMsg
-
- let update msg model =
- let newModel,cmd =
- match msg with
- | UserMsg msg ->
- let newModel, cmd = program.update msg model.UserModel
- { model with UserModel = newModel }, cmd
- | Reload ->
- { model with HMRCount = model.HMRCount + 1 }, Cmd.none
- |> map
-
- hmrState <- newModel
- // Store the state
- newModel, cmd
-
- let createModel (model, cmd) =
- { HMRCount = 0
- UserModel = model }, cmd
-
- let init =
- if isNull hmrState then
- program.init >> map >> createModel
- else
- (fun _ -> unbox> hmrState, Cmd.ofMsg Reload )
-
- let subs model =
- Cmd.batch [ program.subscribe model.UserModel |> Cmd.map UserMsg ]
-
- { init = init
- update = update
- subscribe = subs
- onError = program.onError
- setState = fun model dispatch -> program.setState model.UserModel (UserMsg >> dispatch)
- view = fun model dispatch -> program.view model.UserModel (UserMsg >> dispatch) }
diff --git a/nuget/packages/fable.elmish.hmr/1.0.0/lib/netstandard1.6/Fable.Elmish.HMR.dll b/nuget/packages/fable.elmish.hmr/1.0.0/lib/netstandard1.6/Fable.Elmish.HMR.dll
deleted file mode 100755
index f9b31e655..000000000
Binary files a/nuget/packages/fable.elmish.hmr/1.0.0/lib/netstandard1.6/Fable.Elmish.HMR.dll and /dev/null differ
diff --git a/nuget/packages/fable.elmish.react/1.0.3/.nupkg.metadata b/nuget/packages/fable.elmish.react/1.0.3/.nupkg.metadata
deleted file mode 100644
index d3e339e97..000000000
--- a/nuget/packages/fable.elmish.react/1.0.3/.nupkg.metadata
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "version": 1,
- "contentHash": "iv5hAfA4Mq4wpTQEO9NNVj6h/MeKTcRp9XARsJ7Bn/ktP1smMt4E4zOPL0hRY0WPs4XDzejfWfhtQ5uA9cztSg=="
-}
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.react/1.0.3/.signature.p7s b/nuget/packages/fable.elmish.react/1.0.3/.signature.p7s
deleted file mode 100755
index 12da01f90..000000000
Binary files a/nuget/packages/fable.elmish.react/1.0.3/.signature.p7s and /dev/null differ
diff --git a/nuget/packages/fable.elmish.react/1.0.3/fable.elmish.react.1.0.3.nupkg b/nuget/packages/fable.elmish.react/1.0.3/fable.elmish.react.1.0.3.nupkg
deleted file mode 100644
index bbeddc35c..000000000
Binary files a/nuget/packages/fable.elmish.react/1.0.3/fable.elmish.react.1.0.3.nupkg and /dev/null differ
diff --git a/nuget/packages/fable.elmish.react/1.0.3/fable.elmish.react.1.0.3.nupkg.sha512 b/nuget/packages/fable.elmish.react/1.0.3/fable.elmish.react.1.0.3.nupkg.sha512
deleted file mode 100644
index cae36149d..000000000
--- a/nuget/packages/fable.elmish.react/1.0.3/fable.elmish.react.1.0.3.nupkg.sha512
+++ /dev/null
@@ -1 +0,0 @@
-SxeSTZ5i0b1LEa4f+NW1EkA23W6CljIPkJcc9+/xcnw/JFVi38Ckxwaxg3ZXmsRCkuuWbkIb+lJ9SpbiGQg5Qw==
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.react/1.0.3/fable.elmish.react.nuspec b/nuget/packages/fable.elmish.react/1.0.3/fable.elmish.react.nuspec
deleted file mode 100755
index 8f60277e5..000000000
--- a/nuget/packages/fable.elmish.react/1.0.3/fable.elmish.react.nuspec
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- Fable.Elmish.React
- 1.0.3
- Eugene Tolmachev
- Eugene Tolmachev
- false
- https://raw.githubusercontent.com/fable-elmish/react/master/LICENSE.md
- http://fable-elmish.github.io/react
- https://raw.githubusercontent.com/fable-elmish/elmish/master/docs/files/img/logo.png
- Elmish extensions for writing Fable apps with React and ReactNative
- Adding `.hydrate` to support SSR
- fable elmish fsharp React React-Native
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.react/1.0.3/fable/Fable.Elmish.React.fsproj b/nuget/packages/fable.elmish.react/1.0.3/fable/Fable.Elmish.React.fsproj
deleted file mode 100755
index 04f14e45c..000000000
--- a/nuget/packages/fable.elmish.react/1.0.3/fable/Fable.Elmish.React.fsproj
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- netstandard1.6
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish.react/1.0.3/fable/common.fs b/nuget/packages/fable.elmish.react/1.0.3/fable/common.fs
deleted file mode 100755
index 01555e1df..000000000
--- a/nuget/packages/fable.elmish.react/1.0.3/fable/common.fs
+++ /dev/null
@@ -1,83 +0,0 @@
-namespace Elmish.React
-
-open System
-open Fable.Import.React
-open Fable.Helpers.React
-open Fable.Core
-open Elmish
-
-type [] LazyProps<'model> = {
- model:'model
- render:unit->ReactElement
- equal:'model->'model->bool
-}
-
-module Components =
- type LazyView<'model>(props) =
- inherit Component,obj>(props)
-
- override this.shouldComponentUpdate(nextProps, _nextState) =
- not <| this.props.equal this.props.model nextProps.model
-
- override this.render () =
- this.props.render ()
-
-[]
-module Common =
- /// Avoid rendering the view unless the model has changed.
- /// equal: function to compare the previous and the new states
- /// view: function to render the model
- /// state: new state to render
- let lazyViewWith (equal:'model->'model->bool)
- (view:'model->ReactElement)
- (state:'model) =
- ofType,_,_>
- { render = fun () -> view state
- equal = equal
- model = state }
- []
-
- /// Avoid rendering the view unless the model has changed.
- /// equal: function to compare the previous and the new states
- /// view: function to render the model using the dispatch
- /// state: new state to render
- /// dispatch: dispatch function
- let lazyView2With (equal:'model->'model->bool)
- (view:'model->'msg Dispatch->ReactElement)
- (state:'model)
- (dispatch:'msg Dispatch) =
- ofType,_,_>
- { render = fun () -> view state dispatch
- equal = equal
- model = state }
- []
-
- /// Avoid rendering the view unless the model has changed.
- /// equal: function to compare the previous and the new model (a tuple of two states)
- /// view: function to render the model using the dispatch
- /// state1: new state to render
- /// state2: new state to render
- /// dispatch: dispatch function
- let lazyView3With (equal:_->_->bool) (view:_->_->_->ReactElement) state1 state2 (dispatch:'msg Dispatch) =
- ofType,_,_>
- { render = fun () -> view state1 state2 dispatch
- equal = equal
- model = (state1,state2) }
- []
-
- /// Avoid rendering the view unless the model has changed.
- /// view: function of model to render the view
- let lazyView (view:'model->ReactElement) =
- lazyViewWith (=) view
-
- /// Avoid rendering the view unless the model has changed.
- /// view: function of two arguments to render the model using the dispatch
- let lazyView2 (view:'model->'msg Dispatch->ReactElement) =
- lazyView2With (=) view
-
- /// Avoid rendering the view unless the model has changed.
- /// view: function of three arguments to render the model using the dispatch
- let lazyView3 (view:_->_->_->ReactElement) =
- lazyView3With (=) view
-
-
diff --git a/nuget/packages/fable.elmish.react/1.0.3/fable/react-native.fs b/nuget/packages/fable.elmish.react/1.0.3/fable/react-native.fs
deleted file mode 100755
index 1342a4836..000000000
--- a/nuget/packages/fable.elmish.react/1.0.3/fable/react-native.fs
+++ /dev/null
@@ -1,55 +0,0 @@
-namespace Elmish.ReactNative
-
-open System
-open Fable.Import.React
-open Fable.Core
-open Elmish
-
-module Components =
- type [] AppState = {
- render : unit -> ReactElement
- setState : AppState -> unit
- }
-
- let mutable appState = None
-
- type App(props) as this =
- inherit Component(props)
- do
- match appState with
- | Some state ->
- appState <- Some { state with AppState.setState = this.setInitState }
- this.setInitState state
- | _ -> failwith "was Elmish.ReactNative.Program.withReactNative called?"
-
- override this.componentDidMount() =
- appState <- Some { appState.Value with setState = this.setState }
-
- override this.componentWillUnmount() =
- appState <- Some { appState.Value with setState = ignore; render = this.state.render }
-
- override this.render () =
- this.state.render()
-
-[]
-type AppRegistry =
- static member registerComponent(appKey:string, getComponentFunc:unit->ComponentClass<_>) : unit =
- failwith "JS only"
-
-[]
-module Program =
- open Fable.Core.JsInterop
- open Elmish.React
- open Components
-
- /// Setup rendering of root ReactNative component
- let withReactNative appKey (program:Program<_,_,_,_>) =
- AppRegistry.registerComponent(appKey, fun () -> unbox typeof)
- let render m d =
- match appState with
- | Some state ->
- state.setState { state with render = fun () -> program.view m d }
- | _ ->
- appState <- Some { render = fun () -> program.view m d
- setState = ignore }
- { program with setState = render }
diff --git a/nuget/packages/fable.elmish.react/1.0.3/fable/react.fs b/nuget/packages/fable.elmish.react/1.0.3/fable/react.fs
deleted file mode 100755
index e18e24516..000000000
--- a/nuget/packages/fable.elmish.react/1.0.3/fable/react.fs
+++ /dev/null
@@ -1,57 +0,0 @@
-namespace Elmish.React
-
-open System
-open Fable.Import.React
-open Fable.Core
-open Fable.Helpers.React
-
-[]
-module Helpers =
- open Fable.Helpers.React.Props
- open Fable.Core.JsInterop
-
- /// `Ref` callback that sets the value of an input textbox after DOM element is created.
- /// Can be used override input box value.
- let inline valueOrDefault value =
- Ref <| (fun e -> if e |> isNull |> not && !!e?value <> !!value then e?value <- !!value)
-
-[]
-module Program =
- open Fable.Import.Browser
-
- /// Setup rendering of root React component inside html element identified by placeholderId
- let withReact placeholderId (program:Elmish.Program<_,_,_,_>) =
- let mutable lastRequest = None
- let setState model dispatch =
- match lastRequest with
- | Some r -> window.cancelAnimationFrame r
- | _ -> ()
-
- lastRequest <- Some (window.requestAnimationFrame (fun _ ->
- Fable.Import.ReactDom.render(
- lazyView2With (fun x y -> obj.ReferenceEquals(x,y)) program.view model dispatch,
- document.getElementById(placeholderId)
- )))
-
- { program with setState = setState }
-
- /// `withReact` uses `requestAnimationFrame` to optimize rendering in scenarios with updates at a higher rate than 60FPS, but this makes the cursor jump to the end in `input` elements.
- /// This function works around the glitch if you don't need the optimization (see https://github.com/fable-elmish/react/issues/12).
- let withReactUnoptimized placeholderId (program:Elmish.Program<_,_,_,_>) =
- let setState model dispatch =
- Fable.Import.ReactDom.render(
- lazyView2With (fun x y -> obj.ReferenceEquals(x,y)) program.view model dispatch,
- document.getElementById(placeholderId)
- )
-
- { program with setState = setState }
-
- /// Setup rendering of root React component inside html element identified by placeholderId using React.hydrate
- let withReactHydrate placeholderId (program:Elmish.Program<_,_,_,_>) =
- let setState model dispatch =
- Fable.Import.ReactDom.hydrate(
- lazyView2With (fun x y -> obj.ReferenceEquals(x,y)) program.view model dispatch,
- document.getElementById(placeholderId)
- )
-
- { program with setState = setState }
diff --git a/nuget/packages/fable.elmish.react/1.0.3/lib/netstandard1.6/Fable.Elmish.React.dll b/nuget/packages/fable.elmish.react/1.0.3/lib/netstandard1.6/Fable.Elmish.React.dll
deleted file mode 100755
index 655a2cd3b..000000000
Binary files a/nuget/packages/fable.elmish.react/1.0.3/lib/netstandard1.6/Fable.Elmish.React.dll and /dev/null differ
diff --git a/nuget/packages/fable.elmish/1.0.2/.nupkg.metadata b/nuget/packages/fable.elmish/1.0.2/.nupkg.metadata
deleted file mode 100644
index 3e06a656d..000000000
--- a/nuget/packages/fable.elmish/1.0.2/.nupkg.metadata
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "version": 1,
- "contentHash": "7FQh0I5jbiI3dryi5//tVoy2/0mV1AXyjiBLr2b0PcIu7k4o5GdS55HcjC+wRY1KQKRGRTq4bZWDREAhQuFvsQ=="
-}
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish/1.0.2/.signature.p7s b/nuget/packages/fable.elmish/1.0.2/.signature.p7s
deleted file mode 100755
index 676a32a0e..000000000
Binary files a/nuget/packages/fable.elmish/1.0.2/.signature.p7s and /dev/null differ
diff --git a/nuget/packages/fable.elmish/1.0.2/fable.elmish.1.0.2.nupkg b/nuget/packages/fable.elmish/1.0.2/fable.elmish.1.0.2.nupkg
deleted file mode 100644
index 5dae5f43f..000000000
Binary files a/nuget/packages/fable.elmish/1.0.2/fable.elmish.1.0.2.nupkg and /dev/null differ
diff --git a/nuget/packages/fable.elmish/1.0.2/fable.elmish.1.0.2.nupkg.sha512 b/nuget/packages/fable.elmish/1.0.2/fable.elmish.1.0.2.nupkg.sha512
deleted file mode 100644
index 07069e0c7..000000000
--- a/nuget/packages/fable.elmish/1.0.2/fable.elmish.1.0.2.nupkg.sha512
+++ /dev/null
@@ -1 +0,0 @@
-FdbjCKSg+K6bUa1x90N/K2Hu7Whx6r2GTarclr28v6DDPRWZ54Sy4s/ZBVnV8fm7Rj70NJLcWAiD1pdWfWK3Xg==
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish/1.0.2/fable.elmish.nuspec b/nuget/packages/fable.elmish/1.0.2/fable.elmish.nuspec
deleted file mode 100755
index 82f0961d8..000000000
--- a/nuget/packages/fable.elmish/1.0.2/fable.elmish.nuspec
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- Fable.Elmish
- 1.0.2
- Eugene Tolmachev
- Eugene Tolmachev
- false
- https://raw.githubusercontent.com/elmish/elmish/master/LICENSE.md
- https://github.com/elmish/elmish
- https://raw.githubusercontent.com/elmish/elmish/master/docs/files/img/logo.png
- Package Description
- backporting CLR (platform) support
- fable elm fsharp
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish/1.0.2/fable/Fable.Elmish.fsproj b/nuget/packages/fable.elmish/1.0.2/fable/Fable.Elmish.fsproj
deleted file mode 100755
index 194455a9c..000000000
--- a/nuget/packages/fable.elmish/1.0.2/fable/Fable.Elmish.fsproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- netstandard1.6
- true
- $(DefineConstants);FABLE_COMPILER
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish/1.0.2/fable/cmd.fs b/nuget/packages/fable.elmish/1.0.2/fable/cmd.fs
deleted file mode 100755
index 8d5b6a900..000000000
--- a/nuget/packages/fable.elmish/1.0.2/fable/cmd.fs
+++ /dev/null
@@ -1,104 +0,0 @@
-(**
-Cmd
----------
-Core abstractions for dispatching messages in Elmish.
-
-*)
-
-namespace Elmish
-
-open System
-
-/// Dispatch - feed new message into the processing loop
-type Dispatch<'msg> = 'msg -> unit
-
-/// Subscription - return immediately, but may schedule dispatch of a message at any time
-type Sub<'msg> = Dispatch<'msg> -> unit
-
-/// Cmd - container for subscriptions that may produce messages
-type Cmd<'msg> = Sub<'msg> list
-
-/// Cmd module for creating and manipulating commands
-[]
-module Cmd =
- /// None - no commands, also known as `[]`
- let none : Cmd<'msg> =
- []
-
- /// Command to issue a specific message
- let ofMsg (msg:'msg) : Cmd<'msg> =
- [fun dispatch -> dispatch msg]
-
- /// When emitting the message, map to another type
- let map (f: 'a -> 'msg) (cmd: Cmd<'a>) : Cmd<'msg> =
- cmd |> List.map (fun g -> (fun dispatch -> f >> dispatch) >> g)
-
- /// Aggregate multiple commands
- let batch (cmds: #seq>) : Cmd<'msg> =
- cmds |> List.concat
-
- /// Command that will evaluate an async block and map the result
- /// into success or error (of exception)
- let ofAsync (task: 'a -> Async<_>)
- (arg: 'a)
- (ofSuccess: _ -> 'msg)
- (ofError: _ -> 'msg) : Cmd<'msg> =
- let bind dispatch =
- async {
- let! r = task arg |> Async.Catch
- dispatch (match r with
- | Choice1Of2 x -> ofSuccess x
- | Choice2Of2 x -> ofError x)
- }
- [bind >> Async.StartImmediate]
-
- /// Command to evaluate a simple function and map the result
- /// into success or error (of exception)
- let ofFunc (task: 'a -> _) (arg: 'a) (ofSuccess: _ -> 'msg) (ofError: _ -> 'msg) : Cmd<'msg> =
- let bind dispatch =
- try
- task arg
- |> (ofSuccess >> dispatch)
- with x ->
- x |> (ofError >> dispatch)
- [bind]
-
- /// Command to evaluate a simple function and map the success to a message
- /// discarding any possible error
- let performFunc (task: 'a -> _) (arg: 'a) (ofSuccess: _ -> 'msg) : Cmd<'msg> =
- let bind dispatch =
- try
- task arg
- |> (ofSuccess >> dispatch)
- with x ->
- ()
- [bind]
-
- /// Command to evaluate a simple function and map the error (in case of exception)
- let attemptFunc (task: 'a -> unit) (arg: 'a) (ofError: _ -> 'msg) : Cmd<'msg> =
- let bind dispatch =
- try
- task arg
- with x ->
- x |> (ofError >> dispatch)
- [bind]
-
- /// Command to call the subscriber
- let ofSub (sub: Sub<'msg>) : Cmd<'msg> =
- [sub]
-
-#if FABLE_COMPILER
- open Fable.PowerPack
-
- /// Command to call `promise` block and map the results
- let ofPromise (task: 'a -> Fable.Import.JS.Promise<_>)
- (arg:'a)
- (ofSuccess: _ -> 'msg)
- (ofError: _ -> 'msg) : Cmd<'msg> =
- let bind dispatch =
- task arg
- |> Promise.map (ofSuccess >> dispatch)
- |> Promise.catch (ofError >> dispatch)
- |> ignore
- [bind]
-#endif
\ No newline at end of file
diff --git a/nuget/packages/fable.elmish/1.0.2/fable/prelude.fs b/nuget/packages/fable.elmish/1.0.2/fable/prelude.fs
deleted file mode 100755
index 2ae9f43e6..000000000
--- a/nuget/packages/fable.elmish/1.0.2/fable/prelude.fs
+++ /dev/null
@@ -1,26 +0,0 @@
-namespace Elmish
-
-(**
-Log
----------
-Basic cross-platform logging API.
-
-*)
-module internal Log =
-
-#if FABLE_COMPILER
- open Fable.Core.JsInterop
- open Fable.Import.JS
-
- let onError (text: string, ex: exn) = console.error (text,ex)
- let toConsole(text: string, o: obj) = console.log(text, toJson o |> JSON.parse)
-
-#else
-#if NETSTANDARD2_0
- let onError (text: string, ex: exn) = System.Diagnostics.Trace.TraceError("{0}: {1}", text, ex)
- let toConsole(text: string, o: obj) = printfn "%s: %A" text o
-#else
- let onError (text: string, ex: exn) = System.Console.Error.WriteLine("{0}: {1}", text, ex)
- let toConsole(text: string, o: obj) = printfn "%s: %A" text o
-#endif
-#endif
diff --git a/nuget/packages/fable.elmish/1.0.2/fable/program.fs b/nuget/packages/fable.elmish/1.0.2/fable/program.fs
deleted file mode 100755
index 00099acf5..000000000
--- a/nuget/packages/fable.elmish/1.0.2/fable/program.fs
+++ /dev/null
@@ -1,118 +0,0 @@
-(**
-Program
----------
-Core abstractions for creating and running the dispatch loop.
-
-*)
-
-namespace Elmish
-
-open System
-
-/// Program type captures various aspects of program behavior
-type Program<'arg, 'model, 'msg, 'view> = {
- init : 'arg -> 'model * Cmd<'msg>
- update : 'msg -> 'model -> 'model * Cmd<'msg>
- subscribe : 'model -> Cmd<'msg>
- view : 'model -> Dispatch<'msg> -> 'view
- setState : 'model -> Dispatch<'msg> -> unit
- onError : (string*exn) -> unit
-}
-
-/// Program module - functions to manipulate program instances
-[]
-[]
-module Program =
- /// Typical program, new commands are produced by `init` and `update` along with the new state.
- let mkProgram
- (init : 'arg -> 'model * Cmd<'msg>)
- (update : 'msg -> 'model -> 'model * Cmd<'msg>)
- (view : 'model -> Dispatch<'msg> -> 'view) =
- { init = init
- update = update
- view = view
- setState = fun model -> view model >> ignore
- subscribe = fun _ -> Cmd.none
- onError = Log.onError }
-
- /// Simple program that produces only new state with `init` and `update`.
- let mkSimple
- (init : 'arg -> 'model)
- (update : 'msg -> 'model -> 'model)
- (view : 'model -> Dispatch<'msg> -> 'view) =
- { init = init >> fun state -> state,Cmd.none
- update = fun msg -> update msg >> fun state -> state,Cmd.none
- view = view
- setState = fun model -> view model >> ignore
- subscribe = fun _ -> Cmd.none
- onError = Log.onError }
-
- /// Subscribe to external source of events.
- /// The subscription is called once - with the initial model, but can dispatch new messages at any time.
- let withSubscription (subscribe : 'model -> Cmd<'msg>) (program: Program<'arg, 'model, 'msg, 'view>) =
- let sub model =
- Cmd.batch [ program.subscribe model
- subscribe model ]
- { program with subscribe = sub }
-
- /// Trace all the updates to the console
- let withConsoleTrace (program: Program<'arg, 'model, 'msg, 'view>) =
- let traceInit (arg:'arg) =
- let initModel,cmd = program.init arg
- Log.toConsole ("Initial state:", initModel)
- initModel,cmd
-
- let traceUpdate msg model =
- Log.toConsole ("New message:", msg)
- let newModel,cmd = program.update msg model
- Log.toConsole ("Updated state:", newModel)
- newModel,cmd
-
- { program with
- init = traceInit
- update = traceUpdate }
-
- /// Trace all the messages as they update the model
- let withTrace trace (program: Program<'arg, 'model, 'msg, 'view>) =
- { program
- with update = fun msg model -> trace msg model; program.update msg model}
-
- /// Handle dispatch loop exceptions
- let withErrorHandler onError (program: Program<'arg, 'model, 'msg, 'view>) =
- { program
- with onError = onError }
-
- /// Start the program loop.
- /// arg: argument to pass to the init() function.
- /// program: program created with 'mkSimple' or 'mkProgram'.
- let runWith (arg: 'arg) (program: Program<'arg, 'model, 'msg, 'view>) =
- let (model,cmd) = program.init arg
- let inbox = MailboxProcessor.Start(fun (mb:MailboxProcessor<'msg>) ->
- let rec loop (state:'model) =
- async {
- let! msg = mb.Receive()
- let newState =
- try
- let (model',cmd') = program.update msg state
- program.setState model' mb.Post
- cmd' |> List.iter (fun sub -> sub mb.Post)
- model'
- with ex ->
- program.onError ("Unable to process a message:", ex)
- state
- return! loop newState
- }
- loop model
- )
- program.setState model inbox.Post
- let sub =
- try
- program.subscribe model
- with ex ->
- program.onError ("Unable to subscribe:", ex)
- Cmd.none
- sub @ cmd |> List.iter (fun sub -> sub inbox.Post)
-
- /// Start the dispatch loop with `unit` for the init() function.
- let run (program: Program) = runWith () program
-
diff --git a/nuget/packages/fable.elmish/1.0.2/lib/netstandard1.6/Fable.Elmish.dll b/nuget/packages/fable.elmish/1.0.2/lib/netstandard1.6/Fable.Elmish.dll
deleted file mode 100755
index c12996956..000000000
Binary files a/nuget/packages/fable.elmish/1.0.2/lib/netstandard1.6/Fable.Elmish.dll and /dev/null differ
diff --git a/nuget/packages/fable.import.browser/1.1.2/.nupkg.metadata b/nuget/packages/fable.import.browser/1.1.2/.nupkg.metadata
deleted file mode 100644
index 481be424c..000000000
--- a/nuget/packages/fable.import.browser/1.1.2/.nupkg.metadata
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "version": 1,
- "contentHash": "RykaSFbbrGv1xiicAoy1BF71RM7T5bjmhH8lSad5PszBRhLEwKT2NuA8+jityEOkFxAtivgkp15eSzl44q1WZA=="
-}
\ No newline at end of file
diff --git a/nuget/packages/fable.import.browser/1.1.2/.signature.p7s b/nuget/packages/fable.import.browser/1.1.2/.signature.p7s
deleted file mode 100755
index 102403af1..000000000
Binary files a/nuget/packages/fable.import.browser/1.1.2/.signature.p7s and /dev/null differ
diff --git a/nuget/packages/fable.import.browser/1.1.2/fable.import.browser.1.1.2.nupkg b/nuget/packages/fable.import.browser/1.1.2/fable.import.browser.1.1.2.nupkg
deleted file mode 100644
index 7ca6b8e6b..000000000
Binary files a/nuget/packages/fable.import.browser/1.1.2/fable.import.browser.1.1.2.nupkg and /dev/null differ
diff --git a/nuget/packages/fable.import.browser/1.1.2/fable.import.browser.1.1.2.nupkg.sha512 b/nuget/packages/fable.import.browser/1.1.2/fable.import.browser.1.1.2.nupkg.sha512
deleted file mode 100644
index 86175b872..000000000
--- a/nuget/packages/fable.import.browser/1.1.2/fable.import.browser.1.1.2.nupkg.sha512
+++ /dev/null
@@ -1 +0,0 @@
-zD1BKt5QfTDoQxImYlNMELtEmcO5E1UAtgMw6M4tK/bKI796G+ur4BxgbLC5w3oCUPWhPdw5c9xRGsj6ez9w+Q==
\ No newline at end of file
diff --git a/nuget/packages/fable.import.browser/1.1.2/fable.import.browser.nuspec b/nuget/packages/fable.import.browser/1.1.2/fable.import.browser.nuspec
deleted file mode 100755
index 7ba39b722..000000000
--- a/nuget/packages/fable.import.browser/1.1.2/fable.import.browser.nuspec
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- Fable.Import.Browser
- 1.1.2
- Fable.Import.Browser
- Fable.Import.Browser
- false
- Package Description
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nuget/packages/fable.import.browser/1.1.2/lib/netstandard1.6/Fable.Import.Browser.dll b/nuget/packages/fable.import.browser/1.1.2/lib/netstandard1.6/Fable.Import.Browser.dll
deleted file mode 100755
index db5e3db91..000000000
Binary files a/nuget/packages/fable.import.browser/1.1.2/lib/netstandard1.6/Fable.Import.Browser.dll and /dev/null differ
diff --git a/nuget/packages/fable.powerpack/1.4.0/.nupkg.metadata b/nuget/packages/fable.powerpack/1.4.0/.nupkg.metadata
deleted file mode 100644
index 64eb11b8b..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/.nupkg.metadata
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "version": 1,
- "contentHash": "BwWvWTpbgXda0g7Z+xLJcvJP5rdo6cdCEX2M9yFckVh+z9l2YezVF0voD/tLpPoU7+fvyM574KLbxFQxoMXp3A=="
-}
\ No newline at end of file
diff --git a/nuget/packages/fable.powerpack/1.4.0/.signature.p7s b/nuget/packages/fable.powerpack/1.4.0/.signature.p7s
deleted file mode 100755
index d6525a6c8..000000000
Binary files a/nuget/packages/fable.powerpack/1.4.0/.signature.p7s and /dev/null differ
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable.powerpack.1.4.0.nupkg b/nuget/packages/fable.powerpack/1.4.0/fable.powerpack.1.4.0.nupkg
deleted file mode 100644
index b92fa1953..000000000
Binary files a/nuget/packages/fable.powerpack/1.4.0/fable.powerpack.1.4.0.nupkg and /dev/null differ
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable.powerpack.1.4.0.nupkg.sha512 b/nuget/packages/fable.powerpack/1.4.0/fable.powerpack.1.4.0.nupkg.sha512
deleted file mode 100644
index 5b13f6973..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable.powerpack.1.4.0.nupkg.sha512
+++ /dev/null
@@ -1 +0,0 @@
-wrFI3wOnJLWqroxGa/tveoSNWmgn9vymXVjVofVbdmNjRouCuOl7ZAEv0jvml56APBvQSDYCx2mxrNcSl3X+5w==
\ No newline at end of file
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable.powerpack.nuspec b/nuget/packages/fable.powerpack/1.4.0/fable.powerpack.nuspec
deleted file mode 100755
index c7e4a9691..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable.powerpack.nuspec
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- Fable.PowerPack
- 1.4.0
- Fable.PowerPack
- Fable.PowerPack
- false
- Package Description
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable/Fable.PowerPack.fsproj b/nuget/packages/fable.powerpack/1.4.0/fable/Fable.PowerPack.fsproj
deleted file mode 100755
index 77446b011..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable/Fable.PowerPack.fsproj
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
- 1.4.0
- netstandard1.6
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable/src/BrowserLocalStorage.fs b/nuget/packages/fable.powerpack/1.4.0/fable/src/BrowserLocalStorage.fs
deleted file mode 100755
index 67126a1a7..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable/src/BrowserLocalStorage.fs
+++ /dev/null
@@ -1,14 +0,0 @@
-module Fable.PowerPack.BrowserLocalStorage
-
-open Fable.Import
-open Fable.Core.JsInterop
-
-let inline load<'T> key =
- Browser.localStorage.getItem(key) |> unbox
- |> Option.map ofJson<'T>
-
-let inline delete key =
- Browser.localStorage.removeItem(key)
-
-let inline save<'T> key (data: 'T) =
- Browser.localStorage.setItem(key, toJson data)
\ No newline at end of file
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable/src/Date/Format.fs b/nuget/packages/fable.powerpack/1.4.0/fable/src/Date/Format.fs
deleted file mode 100755
index cc3f67b8d..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable/src/Date/Format.fs
+++ /dev/null
@@ -1,95 +0,0 @@
-namespace Fable.PowerPack.Date
-
-module Format =
-
- open Fable.PowerPack.Date.Local
- open System
- open System.Text.RegularExpressions
-
- let internal fromDayOfWeek local day =
- match day with
- | DayOfWeek.Monday -> local.Monday
- | DayOfWeek.Tuesday -> local.Tuesday
- | DayOfWeek.Wednesday -> local.Wednesday
- | DayOfWeek.Thursday -> local.Thursday
- | DayOfWeek.Friday -> local.Friday
- | DayOfWeek.Saturday -> local.Saturday
- | DayOfWeek.Sunday -> local.Sunday
- | x -> failwithf "Not a valid day of week: %A" x
-
- let internal mod12 x = x % 12
-
- let internal fromMonth local month =
- match month with
- | 1 -> local.January
- | 2 -> local.February
- | 3 -> local.March
- | 4 -> local.April
- | 5 -> local.May
- | 6 -> local.June
- | 7 -> local.July
- | 8 -> local.August
- | 9 -> local.September
- | 10 -> local.October
- | 11 -> local.November
- | 12 -> local.December
- | x -> failwithf "Not a valid month rank: %i" x
-
- let internal toString x = string x
-
- let inline internal padWithN n c = (fun (x: string) -> x.PadLeft(n, c)) << string
-
- let internal padWith = padWithN 2
-
- let internal takeLastChars count (str : string) =
- str.Substring(Math.Max(0, str.Length - count))
-
- let localFormat (local : Localization) formatString (date : DateTime) =
- Regex.Replace(
- formatString,
- "(d{1,4})|(h{1,2})|(H{1,2})|(m{1,2})|(M{1,4})|(s{1,2})|(t{1,2})|(y{1,5})|(\\\.?)",
- MatchEvaluator((fun token ->
- let symbol = token.Groups.[0]
- // If we escape the next character
- if symbol.Value.StartsWith("\\") && symbol.Value.Length = 2 then
- symbol.Value.Substring(1)
- else
- match symbol.Value with
- | "d" -> date.Day |> toString
- | "dd" -> date.Day |> toString |> padWith '0'
- | "ddd" -> date.DayOfWeek |> fromDayOfWeek local.Date.AbbreviatedDays
- | "dddd" -> date.DayOfWeek |> fromDayOfWeek local.Date.Days
- | "h" -> date.Hour |> mod12 |> toString
- | "hh" -> date.Hour |> mod12 |> toString |> padWith '0'
- | "H" -> date.Hour |> toString
- | "HH" -> date.Hour |> toString |> padWith '0'
- | "m" -> date.Minute |> toString
- | "mm" -> date.Minute |> toString |> padWith '0'
- | "M" -> date.Month |> toString
- | "MM" -> date.Month |> toString |> padWith '0'
- | "MMM" -> date.Month |> fromMonth local.Date.AbbreviatedMonths
- | "MMMM" -> date.Month |> fromMonth local.Date.Months
- | "s" -> date.Second |> toString
- | "ss" -> date.Second |> toString |> padWith '0'
- | "t" ->
- try
- if date.Hour < 12 then
- local.Time.AM.Substring(0, 1)
- else
- local.Time.PM.Substring(0, 1)
- with
- | _ -> ""
- | "tt" -> if date.Hour < 12 then local.Time.AM else local.Time.PM
- | "y" ->
- let year = date.Year |> toString |> takeLastChars 2
- if year.Chars(0) = '0' then
- year.Substring(1)
- else
- year
- | "yy" -> date.Year |> toString |> takeLastChars 2 |> padWith '0'
- | "yyy" -> date.Year |> toString |> padWithN 3 '0'
- | "yyyy" -> date.Year |> toString |> padWithN 4 '0'
- | "yyyyy" -> date.Year |> toString |> padWithN 5 '0'
- | t -> failwithf "The token %s is not implemented. Please report it" t
- ))
- )
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable/src/Date/Local.fs b/nuget/packages/fable.powerpack/1.4.0/fable/src/Date/Local.fs
deleted file mode 100755
index a90e30c31..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable/src/Date/Local.fs
+++ /dev/null
@@ -1,293 +0,0 @@
-namespace Fable.PowerPack.Date
-open System
-
-module Local =
-
- type Months =
- { January : string
- February : string
- March : string
- April : string
- May : string
- June : string
- July : string
- August : string
- September : string
- October : string
- November : string
- December : string }
-
- type DaysOfWeek =
- { Monday : string
- Tuesday : string
- Wednesday : string
- Thursday : string
- Friday : string
- Saturday : string
- Sunday : string }
-
- type Date =
- { Months : Months
- AbbreviatedMonths : Months
- Days : DaysOfWeek
- AbbreviatedDays : DaysOfWeek
- DefaultFormat : string
- FirstDayOfTheWeek : DayOfWeek }
-
- type Time =
- { AM : string
- PM : string }
-
- type Localization =
- { Date : Date
- Time : Time }
-
- let englishUK<'T> =
- { Date =
- { Months =
- { January = "January"
- February = "February"
- March = "March"
- April = "April"
- May = "May"
- June = "June"
- July = "July"
- August = "August"
- September = "September"
- October = "October"
- November = "November"
- December = "December" }
- AbbreviatedMonths =
- { January = "Jan"
- February = "Feb"
- March = "Mar"
- April = "Apr"
- May = "May"
- June = "Jun"
- July = "Jul"
- August = "Aug"
- September = "Sep"
- October = "Oct"
- November = "Nov"
- December = "Dec" }
- Days =
- { Monday = "Monday"
- Tuesday = "Tuesday"
- Wednesday = "Wednesday"
- Thursday = "Thursday"
- Friday = "Friday"
- Saturday = "Saturday"
- Sunday = "Sunday" }
- AbbreviatedDays =
- { Monday = "Mon"
- Tuesday = "Tue"
- Wednesday = "Wed"
- Thursday = "Thu"
- Friday = "Fri"
- Saturday = "Sat"
- Sunday = "Sun" }
- DefaultFormat = "d/M/yyyy"
- FirstDayOfTheWeek = DayOfWeek.Monday }
- Time =
- { AM = "AM"
- PM = "PM" } }
-
- let englishUS<'T> =
- { Date =
- { Months =
- { January = "January"
- February = "February"
- March = "March"
- April = "April"
- May = "May"
- June = "June"
- July = "July"
- August = "August"
- September = "September"
- October = "October"
- November = "November"
- December = "December" }
- AbbreviatedMonths =
- { January = "Jan"
- February = "Feb"
- March = "Mar"
- April = "Apr"
- May = "May"
- June = "Jun"
- July = "Jul"
- August = "Aug"
- September = "Sep"
- October = "Oct"
- November = "Nov"
- December = "Dec" }
- Days =
- { Monday = "Monday"
- Tuesday = "Tuesday"
- Wednesday = "Wednesday"
- Thursday = "Thursday"
- Friday = "Friday"
- Saturday = "Saturday"
- Sunday = "Sunday" }
- AbbreviatedDays =
- { Monday = "Mon"
- Tuesday = "Tue"
- Wednesday = "Wed"
- Thursday = "Thu"
- Friday = "Fri"
- Saturday = "Sat"
- Sunday = "Sun" }
- DefaultFormat = "M/d/yyyy"
- FirstDayOfTheWeek = DayOfWeek.Sunday }
- Time =
- { AM = "AM"
- PM = "PM" } }
-
- let french<'T> =
- { Date =
- { Months =
- { January = "Janvier"
- February = "Février"
- March = "Mars"
- April = "Avril"
- May = "Mai"
- June = "Juin"
- July = "Juillet"
- August = "Août"
- September = "Septembre"
- October = "Octobre"
- November = "Novembre"
- December = "Décembre" }
- AbbreviatedMonths =
- { January = "Jan"
- February = "Fév"
- March = "Mars"
- April = "Avr"
- May = "Mai"
- June = "Jui"
- July = "Juil"
- August = "Août"
- September = "Sep"
- October = "Oct"
- November = "Nov"
- December = "Dec" }
- Days =
- { Monday = "Lundi"
- Tuesday = "Mardi"
- Wednesday = "Mercredi"
- Thursday = "Jeudi"
- Friday = "Vendredi"
- Saturday = "Samedi"
- Sunday = "Dimanche" }
- AbbreviatedDays =
- { Monday = "Lun"
- Tuesday = "Mar"
- Wednesday = "Mer"
- Thursday = "Jeu"
- Friday = "Ven"
- Saturday = "Sam"
- Sunday = "Dim" }
- DefaultFormat = "d/M/yyyy"
- FirstDayOfTheWeek = DayOfWeek.Monday }
- Time =
- { AM = ""
- PM = "" } }
-
- let russian<'T> =
- { Date =
- { Months =
- { January = "Январь"
- February = "Февраль"
- March = "Март"
- April = "Апрель"
- May = "Май"
- June = "Июнь"
- July = "Июль"
- August = "Август"
- September = "Сентябрь"
- October = "Октябрь"
- November = "Ноябрь"
- December = "Декабрь" }
- AbbreviatedMonths =
- { January = "Янв"
- February = "Фев"
- March = "Мар"
- April = "Апр"
- May = "Май"
- June = "Июн"
- July = "Июл"
- August = "Авг"
- September = "Сен"
- October = "Окт"
- November = "Ноя"
- December = "Дек" }
- Days =
- { Monday = "Понедельник"
- Tuesday = "Вторник"
- Wednesday = "Среда"
- Thursday = "Четверг"
- Friday = "Пятница"
- Saturday = "Суббота"
- Sunday = "Воскресенье" }
- AbbreviatedDays =
- { Monday = "Пон"
- Tuesday = "Втр"
- Wednesday = "Срд"
- Thursday = "Чтв"
- Friday = "Птн"
- Saturday = "Сбт"
- Sunday = "Вск" }
- DefaultFormat = "d.M.yyyy"
- FirstDayOfTheWeek = DayOfWeek.Monday }
- Time =
- { AM = ""
- PM = "" } }
-
- let hungarian<'T> =
- { Date =
- { Months =
- { January = "Január"
- February = "Február"
- March = "Március"
- April = "Április"
- May = "Május"
- June = "Június"
- July = "Július"
- August = "Augusztus"
- September = "Szeptember"
- October = "Október"
- November = "November"
- December = "December" }
- AbbreviatedMonths =
- { January = "Jan"
- February = "Feb"
- March = "Márc"
- April = "Ápr"
- May = "Máj"
- June = "Jún"
- July = "Júl"
- August = "Aug"
- September = "Szept"
- October = "Okt"
- November = "Nov"
- December = "Dec" }
- Days =
- { Monday = "Hétfő"
- Tuesday = "Kedd"
- Wednesday = "Szerda"
- Thursday = "Csütörtök"
- Friday = "Péntek"
- Saturday = "Szombat"
- Sunday = "Vasárnap" }
- AbbreviatedDays =
- { Monday = "Hét"
- Tuesday = "Kedd"
- Wednesday = "Sze"
- Thursday = "Csüt"
- Friday = "Pén"
- Saturday = "Szo"
- Sunday = "Vas" }
- DefaultFormat = "yyyy.MM.dd."
- FirstDayOfTheWeek = DayOfWeek.Monday }
- Time =
- { AM = "de"
- PM = "du" } }
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable/src/Fetch.fs b/nuget/packages/fable.powerpack/1.4.0/fable/src/Fetch.fs
deleted file mode 100755
index 2e0542bba..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable/src/Fetch.fs
+++ /dev/null
@@ -1,409 +0,0 @@
-/// The Fetch API provides a JavaScript interface for accessing and manipulating parts of the HTTP pipeline, such as requests and responses.
-/// It also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.
-module Fable.PowerPack.Fetch
-
-#nowarn "1182" // Unused values
-
-open System
-open Fable.Core
-open Fable.Core.JsInterop
-open Fable.Import
-
-[]
-module Fetch_types =
-
- type Body =
- abstract bodyUsed: bool with get, set
- abstract arrayBuffer: unit -> JS.Promise
- abstract blob: unit -> JS.Promise;
- abstract formData: unit -> JS.Promise
- abstract json : unit -> JS.Promise;
- abstract json<'T> : unit -> JS.Promise<'T>
- abstract text : unit -> JS.Promise
-
- and Request = //(input: U2, ?init: RequestInit) =
- inherit Body
- abstract ``method`` : string with get
- abstract url: string with get
- abstract headers: Headers with get
- abstract referrer: string with get
- abstract mode: U2 with get
- abstract credentials: U2 with get
- abstract cache: U2 with get
- abstract clone: unit -> unit
-
- and RequestInit =
- abstract ``method``: string option with get, set
- abstract headers: HeaderInit option with get, set
- abstract body: BodyInit option with get, set
- abstract mode: RequestMode option with get, set
- abstract credentials: RequestCredentials option with get, set
- abstract cache: RequestCache option with get, set
-
- and [] RequestContext =
- | Audio | Beacon | Cspreport | Download | Embed | Eventsource | Favicon | Fetch | Font
- | Form | Frame | Hyperlink | Iframe | Image | Imageset | Import | Internal | Location
- | Manifest | Object | Ping | Plugin | Prefetch | Script | Serviceworker | Sharedworker
- | Subresource | Style | Track | Video | Worker | Xmlhttprequest | Xslt
-
- and [] RequestMode =
- | []Sameorigin | []Nocors | Cors
-
- and [] RequestCredentials =
- Omit | []Sameorigin | Include
-
- and [] RequestCache =
- | Default
- | []Nostore
- | Reload
- | []Nocache
- | []Forcecache
- | []Onlyifcached
-
- and Headers =
- abstract append : string * string -> unit
- abstract delete : string -> unit
- abstract get : string -> string
- abstract getAll : string -> string[]
- abstract has : string -> bool
- abstract set : string * string -> unit
-
- /// Specifying which web sites can participate in cross-origin resource sharing
- [] abstract AccessControlAllowOrigin: string option
-
- /// Specifies which patch document formats this server supports
- [] abstract AcceptPatch: string option
-
- /// What partial content range types this server supports via byte serving
- [] abstract AcceptRanges: string option
-
- /// The age the object has been in a proxy cache in seconds
- [] abstract Age: string option
-
- /// Valid actions for a specified resource. To be used for a 405 Method not allowed
- [] abstract Allow: string option
-
- /// A server uses "Alt-Svc" header (meaning Alternative Services) to indicate that its resources can also be accessed at a different network location (host or port) or using a different protocol
- [] abstract AltSvc: string option
-
- /// Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds
- [] abstract CacheControl: string option
-
- /// Control options for the current connection and list of hop-by-hop response fields
- [] abstract Connection: string option
-
- /// An opportunity to raise a "File Download" dialogue box for a known MIME type with binary format or suggest a filename for dynamic content. Quotes are necessary with special characters.
- [] abstract ContentDisposition: string option
-
- /// The type of encoding used on the data
- [] abstract ContentEncoding: string option
-
- /// The natural language or languages of the intended audience for the enclosed content
- [] abstract ContentLanguage: string option
-
- /// The length of the response body in octets (8-bit bytes)
- [] abstract ContentLength: string option
-
- /// An alternate location for the returned data
- [] abstract ContentLocation: string option
-
- /// A Base64-encoded binary MD5 sum of the content of the response
- [] abstract ContentMD5: string option
-
- /// Where in a full body message this partial message belongs
- [] abstract ContentRange: string option
-
- /// The MIME type of this content
- [] abstract ContentType: string option
-
- /// The date and time that the message was sent (in "HTTP-date" format as defined by RFC 7231)
- [] abstract Date: string option
-
- /// An identifier for a specific version of a resource, often a message digest
- [] abstract ETag: string option
-
- /// Gives the date/time after which the response is considered stale (in "HTTP-date" format as defined by RFC 7231)
- [] abstract Expires: string option
-
- /// The last modified date for the requested object (in "HTTP-date" format as defined by RFC 7231)
- [] abstract LastModified: string option
-
- /// Used to express a typed relationship with another resource, where the relation type is defined by RFC 5988
- [] abstract Link: string option
-
- /// Used in redirection, or when a new resource has been created.
- [] abstract Location: string option
-
- /// This field is supposed to set P3P policy, in the form of P3P:CP="your_compact_policy".
- [] abstract P3P: string option
-
- /// Implementation-specific fields that may have various effects anywhere along the request-response chain.
- [] abstract Pragma: string option
-
- /// Request authentication to access the proxy.
- [] abstract ProxyAuthenticate: string option
-
- /// HTTP Public Key Pinning, announces hash of website's authentic TLS certificate
- [] abstract PublicKeyPins: string option
-
- /// Used in redirection, or when a new resource has been created. This refresh redirects after 5 seconds.
- [] abstract Refresh: string option
-
- /// If an entity is temporarily unavailable, this instructs the client to try again later. Value could be a specified period of time (in seconds) or a HTTP-date.
- [] abstract RetryAfter: string option
-
- /// A name for the server
- [] abstract Server: string option
-
- /// An HTTP cookie
- [] abstract SetCookie: string option
-
- /// CGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate "Status-Line" instead, defined by RFC 7230
- [] abstract Status: string option
-
- /// A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains.
- [] abstract StrictTransportSecurity: string option
-
- /// The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding.
- [] abstract Trailer: string option
-
- /// The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
- [] abstract TransferEncoding: string option
-
- /// Tracking Status Value, value suggested to be sent in response to a DNT(do-not-track)
- [] abstract TSV: string option
-
- /// Ask the client to upgrade to another protocol.
- [] abstract Upgrade: string option
-
- /// Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server.
- [] abstract Vary: string option
-
- /// Informs the client of proxies through which the response was sent.
- [] abstract Via: string option
-
- /// A general warning about possible problems with the entity body.
- [] abstract Warning: string option
-
- /// Indicates the authentication scheme that should be used to access the requested entity.
- [] abstract WWWAuthenticate: string option
-
- /// Clickjacking protection: deny - no rendering within a frame, sameorigin - no rendering if origin mismatch, allow-from - allow from specified location, allowall - non-standard, allow from any location
- [] abstract XFrameOptions: string option
-
- /// Cross-site scripting (XSS) filter
- [] abstract XXSSProtection: string option
-
- /// Content Security Policy definition.
- [] abstract ContentSecurityPolicy: string option
-
- /// The only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome, when downloading extensions
- [] abstract XContentTypeOptions: string option
-
- /// Specifies the technology (e.g. ASP.NET, PHP, JBoss) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)
- [] abstract XPoweredBy: string option
-
- /// Recommends the preferred rendering engine (often a backward-compatibility mode) to use to display the content. Also used to activate Chrome Frame in Internet Explorer.
- [] abstract XUACompatible: string option
-
- /// Provide the duration of the audio or video in seconds; only supported by Gecko browsers
- [] abstract XContentDuration: string option
-
- /// Tells a server which (presumably in the middle of a HTTP -> HTTPS migration) hosts mixed content that the client would prefer redirection to HTTPS and can handle Content-Security-Policy: upgrade-insecure-requests
- [] abstract UpgradeInsecureRequests: string option
-
- /// Correlates HTTP requests between a client and server.
- [] abstract XRequestID: string option
-
- /// Correlates HTTP requests between a client and server.
- [] abstract XCorrelationID: string option
-
-
- and Response = //(?body: BodyInit, ?init: ResponseInit) =
- inherit Body
-
- /// Verifies that the fetch was successful
- [] abstract Ok: bool
-
- /// Returns the HTTP status code
- [] abstract Status: int
-
- /// Returns the HTTP status message
- [] abstract StatusText: string
-
- /// Returns the response URL
- [] abstract Url: string
-
- /// Returns the headers objct
- [] abstract Headers : Headers
-
- and [] ResponseType =
- | Basic | Cors | Default | Error | Opaque
-
- and ResponseInit =
- abstract status: float with get, set
- abstract statusText: string option with get, set
- abstract headers: HeaderInit option with get, set
-
- and HeaderInit =
- U2>
-
- and BodyInit =
- U3
-
- []
- type RequestInfo =
- /// Uses a simple Url as string to create the request info
- | Url of string
- /// Uses a Request object as request info
- | Req of Request
-
- type [] GlobalFetch =
- []static member fetch (req: RequestInfo, ?init: RequestInit) = jsNative :JS.Promise
-
- []
- type HttpMethod =
- | [] GET
- | [] HEAD
- | [] POST
- | [] PUT
- | [] DELETE
- | [] TRACE
- | [] CONNECT
- | [] PATCH
-
- type IHttpRequestHeaders =
- interface end
-
- type HttpRequestHeaders =
- | Accept of string
- | [] AcceptCharset of string
- | [] AcceptEncoding of string
- | [] AcceptLanguage of string
- | [] AcceptDatetime of string
- | Authorization of string
- | [] CacheControl of string
- | Connection of string
- | Cookie of string
- | [] ContentLength of string
- | [] ContentMD5 of string
- | [] ContentType of string
- | Date of string
- | Expect of string
- | Forwarded of string
- | From of string
- | Host of string
- | [] IfMatch of string
- | [] IfModifiedSince of string
- | [] IfNoneMatch of string
- | [] IfRange of string
- | [] IfUnmodifiedSince of string
- | [] MaxForwards of int
- | Origin of string
- | Pragma of string
- | [] ProxyAuthorization of string
- | Range of string
- | Referer of string
- | [] SOAPAction of string
- | [] TE of string
- | [] UserAgent of string
- | Upgrade of string
- | Via of string
- | Warning of string
- | [] XRequestedWith of string
- | [] DNT of string
- | [] XForwardedFor of string
- | [] XForwardedHost of string
- | [] XForwardedProto of string
- | [] FrontEndHttps of string
- | [] XHttpMethodOverride of string
- | [] XATTDeviceId of string
- | [] XWapProfile of string
- | [] ProxyConnection of string
- | [] XUIDH of string
- | [] XCsrfToken of string
- | [] Custom of key:string * value:obj
-
- []
- type RequestProperties =
- | Method of HttpMethod
- | Headers of IHttpRequestHeaders
- | Body of BodyInit
- | Mode of RequestMode
- | Credentials of RequestCredentials
- | Cache of RequestCache
-
-
-let inline requestHeaders (headers: HttpRequestHeaders list) =
- RequestProperties.Headers(keyValueList CaseRules.None headers :?> IHttpRequestHeaders)
-
-let inline requestProps (props: RequestProperties list) =
- keyValueList CaseRules.LowerFirst props :?> RequestInit
-
-/// Retrieves data from the specified resource.
-let fetch (url: string) (init: RequestProperties list) : JS.Promise =
- GlobalFetch.fetch(RequestInfo.Url url, requestProps init)
- |> Promise.map (fun response ->
- if response.Ok then
- response
- else
- // TODO maybe this should use the input URL rather than the response URL ?
- // TODO this should probably throw a custom error type
- failwith (string response.Status + " " + response.StatusText + " for URL " + response.Url))
-
-
-let tryFetch (url: string) (init: RequestProperties list) : JS.Promise> =
- fetch url init |> Promise.result
-
-
-/// Retrieves data from the specified resource, parses the json and returns the data as an object of type 'T.
-let [] fetchAs<'T> (url: string) (init: RequestProperties list) : JS.Promise<'T> =
- fetch url init
- |> Promise.bind (fun fetched -> fetched.text())
- |> Promise.map ofJson<'T>
-
-
-let [] tryFetchAs<'T> (url: string) (init: RequestProperties list) : JS.Promise> =
- fetchAs url init |> Promise.result
-
-
-/// Sends a HTTP post with the record serialized as JSON.
-/// This function already sets the HTTP Method to POST sets the json into the body.
-let postRecord<'T> (url: string) (record:'T) (properties: RequestProperties list) : JS.Promise =
- let defaultProps =
- [ RequestProperties.Method HttpMethod.POST
- ; requestHeaders [ContentType "application/json"]
- ; RequestProperties.Body !^(toJson record)]
- // Append properties after defaultProps to make sure user-defined values
- // override the default ones if necessary
- List.append defaultProps properties
- |> fetch url
-
-let tryPostRecord<'T> (url: string) (record:'T) (properties: RequestProperties list) : JS.Promise> =
- postRecord url record properties |> Promise.result
-
-/// Sends a HTTP put with the record serialized as JSON.
-/// This function already sets the HTTP Method to PUT, sets the json into the body.
-let putRecord<'T> (url: string) (record:'T) (properties: RequestProperties list): JS.Promise =
- let defaultProps =
- [ RequestProperties.Method HttpMethod.PUT
- ; requestHeaders [ContentType "application/json"]
- ; RequestProperties.Body !^(toJson record)]
- // Same as with postRecord, append the properties to make sure users override the defaults
- List.append defaultProps properties
- |> fetch url
-
-let tryPutRecord<'T> (url: string) (record:'T) (properties: RequestProperties list): JS.Promise> =
- putRecord url record properties |> Promise.result
-
-/// Sends a HTTP patch with the record serialized as JSON.
-/// This function already sets the HTTP Method to PATCH sets the json into the body.
-let patchRecord<'T> (url: string) (record:'T) (properties: RequestProperties list) : JS.Promise =
- let defaultProps =
- [ RequestProperties.Method HttpMethod.PATCH
- ; requestHeaders [ContentType "application/json"]
- ; RequestProperties.Body !^(toJson record)]
- // Append properties after defaultProps to make sure user-defined values
- // override the default ones if necessary
- List.append defaultProps properties
- |> fetch url
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable/src/IndexedDB.fs b/nuget/packages/fable.powerpack/1.4.0/fable/src/IndexedDB.fs
deleted file mode 100755
index 2b74192da..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable/src/IndexedDB.fs
+++ /dev/null
@@ -1,356 +0,0 @@
-module Fable.PowerPack.Experimental.IndexedDB
-
-open Fable.Core
-open Fable.Core.JsInterop
-open Fable.Import
-open Fable.PowerPack
-
-type DBKeyMethod<'T,'TKey> =
- | KeyPath of string
- | AutoIncrement
-
-type DBCursorDirection =
- /// This direction causes the cursor to be opened at the start of the source.
- /// When iterated, the cursor should yield all records, including duplicates, in monotonically increasing order of keys.
- | Next
- /// This direction causes the cursor to be opened at the start of the source.
- /// When iterated, the cursor should not yield records with the same key, but otherwise yield all records, in monotonically increasing order of keys.
- /// For every key with duplicate values, only the first record is yielded.
- /// When the source is an object store or a unique index, this direction has the exact same behavior as Next.
- | NextUnique
- /// This direction causes the cursor to be opened at the end of the source.
- /// When iterated, the cursor should yield all records, including duplicates, in monotonically decreasing order of keys.
- | Prev
- /// This direction causes the cursor to be opened at the end of the source.
- /// When iterated, the cursor should not yield records with the same key, but otherwise yield all records, in monotonically decreasing order of keys.
- /// For every key with duplicate values, only the first record is yielded.
- /// When the source is an object store or a unique index, this direction has the exact same behavior as Prev.
- | PrevUnique
- static member Default with get() = Next
- override dir.ToString() =
- match dir with
- | Next -> "next"
- | NextUnique -> "nextunique"
- | Prev -> "prev"
- | PrevUnique -> "prevunique"
-
-[]
-let createStore<'T,'TKey>(keyMethod: DBKeyMethod<'T,'TKey>) (db: Browser.IDBDatabase) =
- let args = createEmpty
- match keyMethod with
- | KeyPath path -> args.keyPath <- Some(U2.Case1 path)
- | AutoIncrement -> args.autoIncrement <- Some true
- let storeName = typeof<'T>.Name
- db.createObjectStore(storeName, args)
-
-[]
-let deleteStore<'T>(db: Browser.IDBDatabase) =
- let storeName = typeof<'T>.Name
- db.deleteObjectStore(storeName)
-
-type IDBImplementation =
- abstract member Version: uint32
- abstract member Upgrade: Browser.IDBDatabase -> unit
-
-let openCursor(index: Browser.IDBIndex, keyCursor: bool, range: Browser.IDBKeyRange option, direction: DBCursorDirection option, step: uint32 option) =
- let direction = (defaultArg direction DBCursorDirection.Default).ToString()
- let step = defaultArg step 1u
- let request =
- match keyCursor with
- | false ->
- match range with
- | Some range -> index.openCursor(range, direction=direction)
- | None -> index.openCursor(?range=None, direction=direction)
- | true ->
- match range with
- | Some range -> index.openKeyCursor(range, direction=direction)
- | None -> index.openKeyCursor(?range=None, direction=direction)
- let rec cursorSeq() = promiseSeq {
- let! result = Promise.create(fun cont _ ->
- request.onsuccess <- fun _ ->
- request.onsuccess <- !!null
- if unbox request.result then
- let cursor = unbox request.result
- cont(Some(unbox<'T> cursor.value))
- cursor.advance(float step)
- else
- cont(None)
- null)
- match result with
- | None -> ()
- | Some r ->
- yield r
- yield! cursorSeq()
- }
- cursorSeq()
-
-let countAllAsync(x: Browser.IDBIndex) =
- Promise.create(fun cont econt ->
- let request = x.count()
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(unbox request.result))
- )
-
-/// The parameter should not target the object primary key, but the property used by the index.
-let countKeyAsync(indexKey: 'TIndex) (x: Browser.IDBIndex) =
- Promise.create(fun cont econt ->
- let request = x.count(indexKey)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(unbox request.result))
- )
-
-/// The parameter should not target the object primary key, but the property used by the index.
-let countRangeAsync(indexKeyRange: Browser.IDBKeyRange) (x: Browser.IDBIndex) =
- Promise.create(fun cont econt ->
- let request = x.count(indexKeyRange)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(unbox request.result))
- )
-
-/// The parameter should not target the object primary key, but the property used by the index.
-let getAsync(indexKey: 'TIndex) (x: Browser.IDBIndex) =
- Promise.create(fun cont econt ->
- let request = x.get(indexKey)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(unbox<'T> request.result))
- )
-
-/// The parameter should not target the object primary key, but the property used by the index.
-let getFirstAsync(indexKeyRange: Browser.IDBKeyRange) (x: Browser.IDBIndex) =
- Promise.create(fun cont econt ->
- let request = x.get(indexKeyRange)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(unbox<'T> request.result))
- )
-
-/// The parameter should not target the object primary key, but the property used by the index.
-/// The return value is the object actual primary key.
-let getKeyAsync(indexKey: obj) (x: Browser.IDBIndex) =
- Promise.create(fun cont econt ->
- let request = x.getKey(indexKey)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(request.result))
- )
-
-/// The parameter should not target the object primary key, but the property used by the index.
-/// The return value is the object actual primary key.
-let getKeyFirstAsync(indexKeyRange: Browser.IDBKeyRange) (x: Browser.IDBIndex) =
- Promise.create(fun cont econt ->
- let request = x.getKey(indexKeyRange)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(request.result))
- )
-
-// /// If no range is passed, then the range includes all records.
-// /// If no direction is passed, it will default to "next".
-// member x.openCursor(?range: Browser.IDBKeyRange, ?direction: DBCursorDirection, ?step: uint32) =
-// DBSeqCursor<'T>.openCursor(unbox x, keyCursor=false, range=range, direction=direction, step=step)
-
-// /// If no range is passed, then the range includes all keys.
-// /// If no direction is passed, it will default to "next".
-// member x.openKeyCursor(?range: Browser.IDBKeyRange, ?direction: DBCursorDirection, ?step: uint32) =
-// DBSeqCursor.openCursor(unbox x, keyCursor=true, range=range, direction=direction, step=step)
-
-type Browser.IDBObjectStore with
- member x.getAsync<'T>(key: obj) =
- Promise.create(fun cont econt ->
- let request = x.get(key)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(unbox<'T> request.result))
- )
-
- /// If no range is passed, it will default to a key range that selects all the records in this object store.
- /// If no direction is passed, it will default to "next".
- member x.openCursorAsync(?range: Browser.IDBKeyRange, ?direction: DBCursorDirection, ?step: uint32) =
- openCursor(unbox x, false, range, direction, step)
-
- // /// Insert only method. The operation is asynchronous but request is being ignored.
- // member x.add(item: 'T) =
- // ignore(x.add(item))
-
- /// Insert only method. It can be used in promise workflows. The return value is key set for the stored record.
- /// Note the continuation is called when the operation is added to the queue, but you still need to wait for the transaction to complete.
- member x.addAsync(item: 'T) =
- Promise.create(fun cont econt ->
- let request = x.add(item)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(request.result))
- )
-
- // /// Delete the item specified by the key. The operation is asynchronous but request is being ignored.
- // member x.delete(key: obj) =
- // ignore(x.delete(key))
-
- /// Delete the item specified by the key. It can be used in promise workflows.
- /// Note the continuation is called when the operation is added to the queue, but you still need to wait for the transaction to complete.
- member x.deleteAsync(key: obj) =
- Promise.create(fun cont econt ->
- let request = x.delete(key)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont())
- )
-
- // /// Delete all items in the store. The operation is asynchronous but request is being ignored.
- // member x.clear() =
- // ignore(x.clear())
-
- /// Delete all items in the store. It can be used in promise workflows.
- /// Note the continuation is called when the operation is added to the queue, but you still need to wait for the transaction to complete.
- member x.clearAsync() =
- Promise.create(fun cont econt ->
- let request = x.clear()
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont())
- )
-
- // /// Update or Insert method. The operation is asynchronous but request is being ignored.
- // member x.put(item: 'T) =
- // ignore(x.put(item))
-
- /// Update or insert method. It can be used in promise workflows. The return value is key set for the stored record.
- /// Note the continuation is called when the operation is added to the queue, but you still need to wait for the transaction to complete.
- member x.putAsync(item: 'T) =
- Promise.create(fun cont econt ->
- let request = x.put(item)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont(request.result))
- )
-
-type IndexedDB<'T when 'T :> IDBImplementation and 'T : (new: unit->'T)>() =
- []
- member x.DeleteDatabase() =
- Promise.create(fun cont econt ->
- let name = typeof<'T>.Name
- let request = Browser.indexedDB.deleteDatabase(name)
- request.onerror <- fun _ -> box(econt(exn request.error.name))
- request.onsuccess <- fun _ -> box(cont())
- )
- []
- member private x.Use(mkTransaction: Browser.IDBDatabase->Browser.IDBTransaction) (execTransaction: Browser.IDBTransaction->JS.Promise<'Result>) =
- Promise.create(fun cont econt ->
- let impl = new 'T() :> IDBImplementation
- let name = typeof<'T>.Name
- let request = Browser.indexedDB.``open``(name, float impl.Version)
- request.onerror <- fun _ ->
- econt(exn request.error.name)
- null
- request.onupgradeneeded <- fun ev ->
- try
- let db = unbox request.result
- impl.Upgrade(db)
- with
- | e -> econt(e)
- null
- request.onsuccess <- fun _ ->
- try
- let db = unbox request.result
- let trans = mkTransaction db
- execTransaction trans
- |> Promise.map (fun res ->
- trans.oncomplete <- fun _ -> db.close(); box(cont(res))
- trans.onerror <- fun _ -> db.close(); box(econt(exn trans.error.name)))
- |> Promise.catch econt
- |> ignore
- with
- | e -> econt(e)
- null
- )
- []
- member x.UseStore<'S1,'Result>(transaction: Browser.IDBObjectStore->JS.Promise<'Result>) =
- let storeName1 = typeof<'S1>.Name
- let mkTransaction = fun (db: Browser.IDBDatabase) ->
- db.transaction(U2.Case1 storeName1, "readonly")
- let execTransaction = fun (trans: Browser.IDBTransaction) ->
- let store1 = trans.objectStore(storeName1)
- transaction store1
- x.Use mkTransaction execTransaction
- []
- member x.UseStore<'S1,'S2,'Result>(transaction: Browser.IDBObjectStore->Browser.IDBObjectStore->JS.Promise<'Result>) =
- let storeName1 = typeof<'S1>.Name
- let storeName2 = typeof<'S2>.Name
- let mkTransaction = fun (db: Browser.IDBDatabase) ->
- db.transaction(U2.Case2(ResizeArray[|storeName1;storeName2|]), "readonly")
- let execTransaction = fun (trans: Browser.IDBTransaction) ->
- let store1 = trans.objectStore(storeName1)
- let store2 = trans.objectStore(storeName2)
- transaction store1 store2
- x.Use mkTransaction execTransaction
- []
- member x.UseStore<'S1,'S2,'S3,'Result>(transaction: Browser.IDBObjectStore->Browser.IDBObjectStore->Browser.IDBObjectStore->JS.Promise<'Result>) =
- let storeName1 = typeof<'S1>.Name
- let storeName2 = typeof<'S2>.Name
- let storeName3 = typeof<'S3>.Name
- let mkTransaction = fun (db: Browser.IDBDatabase) ->
- db.transaction(U2.Case2(ResizeArray[|storeName1;storeName2;storeName3|]), "readonly")
- let execTransaction = fun (trans: Browser.IDBTransaction) ->
- let store1 = trans.objectStore(storeName1)
- let store2 = trans.objectStore(storeName2)
- let store3 = trans.objectStore(storeName3)
- transaction store1 store2 store3
- x.Use mkTransaction execTransaction
- []
- member x.UseStore<'S1,'S2,'S3,'S4,'Result>(transaction: Browser.IDBObjectStore->Browser.IDBObjectStore->Browser.IDBObjectStore->Browser.IDBObjectStore->JS.Promise<'Result>) =
- let storeName1 = typeof<'S1>.Name
- let storeName2 = typeof<'S2>.Name
- let storeName3 = typeof<'S3>.Name
- let storeName4 = typeof<'S4>.Name
- let mkTransaction = fun (db: Browser.IDBDatabase) ->
- db.transaction(U2.Case2(ResizeArray[|storeName1;storeName2;storeName3;storeName4|]), "readonly")
- let execTransaction = fun (trans: Browser.IDBTransaction) ->
- let store1 = trans.objectStore(storeName1)
- let store2 = trans.objectStore(storeName2)
- let store3 = trans.objectStore(storeName3)
- let store4 = trans.objectStore(storeName4)
- transaction store1 store2 store3 store4
- x.Use mkTransaction execTransaction
-
- []
- member x.UseStoreRW<'S1,'Result>(transaction: Browser.IDBObjectStore->JS.Promise<'Result>) =
- let storeName1 = typeof<'S1>.Name
- let mkTransaction = fun (db: Browser.IDBDatabase) ->
- db.transaction(U2.Case1 storeName1, "readwrite")
- let execTransaction = fun (trans: Browser.IDBTransaction) ->
- let store1 = trans.objectStore(storeName1)
- transaction store1
- x.Use mkTransaction execTransaction
-
- []
- member x.UseStoreRW<'S1,'S2,'Result>(transaction: Browser.IDBObjectStore->Browser.IDBObjectStore->JS.Promise<'Result>) =
- let storeName1 = typeof<'S1>.Name
- let storeName2 = typeof<'S2>.Name
- let mkTransaction = fun (db: Browser.IDBDatabase) ->
- db.transaction(U2.Case2(ResizeArray[|storeName1; storeName2|]), "readwrite")
- let execTransaction = fun (trans: Browser.IDBTransaction) ->
- let store1 = trans.objectStore(storeName1)
- let store2 = trans.objectStore(storeName2)
- transaction store1 store2
- x.Use mkTransaction execTransaction
-
- []
- member x.UseStoreRW<'S1,'S2,'S3,'Result>(transaction: Browser.IDBObjectStore->Browser.IDBObjectStore->Browser.IDBObjectStore->JS.Promise<'Result>) =
- let storeName1 = typeof<'S1>.Name
- let storeName2 = typeof<'S2>.Name
- let storeName3 = typeof<'S3>.Name
- let mkTransaction = fun (db: Browser.IDBDatabase) ->
- db.transaction(U2.Case2(ResizeArray[|storeName1;storeName2;storeName3|]), "readwrite")
- let execTransaction = fun (trans: Browser.IDBTransaction) ->
- let store1 = trans.objectStore(storeName1)
- let store2 = trans.objectStore(storeName2)
- let store3 = trans.objectStore(storeName3)
- transaction store1 store2 store3
- x.Use mkTransaction execTransaction
- []
- member x.UseStoreRW<'S1,'S2,'S3,'S4,'Result>(transaction: Browser.IDBObjectStore->Browser.IDBObjectStore->Browser.IDBObjectStore->Browser.IDBObjectStore->JS.Promise<'Result>) =
- let storeName1 = typeof<'S1>.Name
- let storeName2 = typeof<'S2>.Name
- let storeName3 = typeof<'S3>.Name
- let storeName4 = typeof<'S4>.Name
- let mkTransaction = fun (db: Browser.IDBDatabase) ->
- db.transaction(U2.Case2(ResizeArray[|storeName1;storeName2;storeName3;storeName4|]), "readwrite")
- let execTransaction = fun (trans: Browser.IDBTransaction) ->
- let store1 = trans.objectStore(storeName1)
- let store2 = trans.objectStore(storeName2)
- let store3 = trans.objectStore(storeName3)
- let store4 = trans.objectStore(storeName4)
- transaction store1 store2 store3 store4
- x.Use mkTransaction execTransaction
\ No newline at end of file
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable/src/Json.fs b/nuget/packages/fable.powerpack/1.4.0/fable/src/Json.fs
deleted file mode 100755
index 52ee04196..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable/src/Json.fs
+++ /dev/null
@@ -1,26 +0,0 @@
-module Fable.PowerPack.Json
-
-open Fable.Core
-
-type Json =
- | String of string
- | Number of float
- | Object of array
- | Array of array
- | Boolean of bool
- | Null
-
-// TODO implement this in F# rather than the FFI
-[]
-let private _ofString:
- System.Func Json,
- float -> Json,
- array -> Json,
- array -> Json,
- bool -> Json,
- Json,
- Json -> Result,
- System.Exception -> Result,
- string -> Result> = jsNative
-
-let ofString: string -> Result = _ofString.Invoke(String, Number, Object, Array, Boolean, Null, Ok, Error)
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable/src/Json.js b/nuget/packages/fable.powerpack/1.4.0/fable/src/Json.js
deleted file mode 100755
index 960ec4849..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable/src/Json.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const getType = (a) =>
- ({}).toString.call(a);
-
-const mapObject = (a, f) =>
- Object.keys(a).map((key) => f(key, a[key]));
-
-export const ofString = (String, Number, Object, Array, Boolean, Null, Ok, Err) => {
- const mapper = (key, value) => [key, makeJson(value)];
-
- const makeJson = (a) => {
- const type = getType(a);
-
- switch (type) {
- case "[object Object]":
- return Object(mapObject(a, mapper));
- case "[object Array]":
- return Array(a.map(makeJson));
- case "[object Number]":
- return Number(a);
- case "[object String]":
- return String(a);
- case "[object Boolean]":
- return Boolean(a);
- case "[object Null]":
- return Null;
- default:
- throw new Error("Unknown type: " + type);
- }
- };
-
- return (input) => {
- try {
- return Ok(makeJson(JSON.parse(input)));
-
- } catch (e) {
- return Err(e);
- }
- };
-};
diff --git a/nuget/packages/fable.powerpack/1.4.0/fable/src/Keyboard.fs b/nuget/packages/fable.powerpack/1.4.0/fable/src/Keyboard.fs
deleted file mode 100755
index 82644d8df..000000000
--- a/nuget/packages/fable.powerpack/1.4.0/fable/src/Keyboard.fs
+++ /dev/null
@@ -1,102 +0,0 @@
-module Fable.PowerPack.Keyboard
-
-[]
-module Codes =
- let [] backspace = 8.
- let [] tab = 9.
- let [] enter = 13.
- let [] shift = 16.
- let [] ctrl = 17.
- let [] alt = 18.
- let [] pause_break = 19.
- let [