fission-suite/webnative-elm/6.1.0

NOTE: the latest version is 7.0.0

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/

Wnfs

Interact with your webnative filesystem.

Actions

publish : { tag : String } -> Request

Publish your changes to your filesystem. 📢 You should run this after doing mutations. See README examples for more info.

Mutations

mkdir : Base -> Attributes Directory -> Request

Create a directory.

mv :
-> { from : Path t
, to : Path t
, tag : String
}
-> Request

Move something from one location to another.

rm : Base -> Attributes a -> Request

Remove something from the filesystem.

write : Base -> Attributes File -> Bytes -> Request

Write to a file using Bytes.

writeUtf8 : Base -> Attributes File -> String -> Request

Write to a file using a String.

Queries

exists : Base -> Attributes a -> Request

Check if something exists.

ls : Base -> Attributes Directory -> Request

List a directory.

read : Base -> Attributes File -> Request

Read a file from the filesystem in the form of Bytes.

readUtf8 : Base -> Attributes File -> Request

Read a file from the filesystem in the form of a String.

Aliases

add : Base -> Attributes File -> Bytes -> Request

Alias for write.

cat : Base -> Attributes File -> Request

Alias for read.

Requests & Responses

type Base
= AppData AppPermissions
| Private
| Public

Base of the WNFS action.

type alias Attributes pathKind =
{ path : Path pathKind
, tag : String
}

WNFS action attributes.

= NoArtifact
| Boolean Bool
| CID String
| DirectoryContent (List Entry)
| FileContent Bytes
| Utf8Content String

Artifact we receive in the response.

type alias Entry =
{ cid : String
, name : String
, kind : Kind
, size : Int
}

Directory Entry.

context : String

Request/Response context.

Errors

type Error
= DecodingError String
| InvalidMethod String
| TagParsingError String
| JavascriptError String

Possible errors.

error : Error -> String

Error message.