Renamed to fission-codes/webnative-elm. It is published under that name, and new versions come out there.
Versions published as fission-suite/webnative-elm still install under that name. 9 versions of 9 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/fission-codes/webnative-elm.
What we checked: The repo moved to github.com/fission-codes/webnative-elm. Rebuilt with git archive from commit db7e93f9be10 of https://github.com/fission-codes/webnative-elm (zip prefix fission-suite-webnative-elm-db7e93f/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 fea834566663f075cf2af19f2498a313cde4a11e.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details ยท package.elm-lang.org's zip: https://github.com/fission-suite/webnative-elm/zipball/6.1.0/
Interface for webnative, version 0.24 and up.
Initialise webnative, with options.
Options for initWithOptions.
Setting autoRemoveUrlParams to True causes webnative to automatically remove the query parameters from the lobby.
Setting loadFileSystem to False disables the automatic loading of the filesystem during init.
Default InitOptions.
Alias for init.
Alias for init.
Data flowing through the ports. See ๐ in the decodeResponse example on how to handle the result from init.
Decode the result, the Response, from our Request.
Connect this up with webnativeResponse subscription port.
subscriptions =
Ports.webnativeResponse GotWebnativeResponseAnd then in update use this function.
GotWebnativeResponse response ->
case Webnative.decodeResponse tagFromString response of
-----------------------------------------
-- ๐
-----------------------------------------
Webnative ( Initialisation state ) ->
if Webnative.isAuthenticated state then
loadUserData
else
welcome
-----------------------------------------
-- ๐พ
-----------------------------------------
Wnfs ReadHelloTxt ( Utf8Content helloContents ) ->
-- Do something with content from hello.txt
Wnfs Mutation _ ->
( model
, { tag = PointerUpdated }
|> Wnfs.publish
|> Ports.webnativeRequest
)
-----------------------------------------
-- ๐ฅต
-----------------------------------------
-- Do something with the errors,
-- here we cast them to strings
WebnativeError err -> Webnative.error err
WnfsError err -> Wnfs.error errSee the README for the full example.
Request, or response, context.
Artifact we receive in the response.
Not really artifacts, but kind of.
Part of the Artifact type.
Request from webnative.
Response from webnative.
Possible errors.
Request/Response context.
Redirect to the authorisation lobby.
Where the authorisation lobby should redirect to after authorisation.
Application permissions.
Filesystem permissions.
```elm
import Webnative.Path as Path
{ private =
{ directories = [ Path.directory [ "Audio", "Mixtapes" ] ]
, files = [ Path.file [ "Audio", "Playlists", "Jazz.json" ] ]
}
, public =
{ directories = []
, files = []
}
}
```Filesystem permissions for a branch.
This is reused for the private and public permissions.
Permissions to ask the user.
See AppPermissions and FileSystemPermissions on how to use these.
Are we authenticated?
Leave the app and go the lobby.
Removes all traces of the user.
Use signOut instead if you don't want the redirect.
Removes all traces of the user.
Use leave instead if you want to
go to the lobby immediately so the user
can sign out there as well, if needed.
Initialisation state, result from init.
State attributes when auth has succeeded.
State attributes when auth was cancelled.
State attributes when continueing a session.
Load in the filesystem manually.
๐ Start here
Check if we're authenticated, process any lobby query-parameters present in the URL, and initiate the user's filesystem if authenticated (can be disabled using
initWithOptions).See
loadFileSystemif you want to load the user's filesystem yourself. NOTE, this only works on the main/ui thread, as it useswindow.location.See the README for an example.