Feedback on new core APIs for Streams, Shell Commands, Spinners, Continuation Style #470
dillonkearns
started this conversation in
General
Replies: 3 comments 3 replies
-
It's weird that |
Beta Was this translation helpful? Give feedback.
1 reply
-
The example in |
Beta Was this translation helpful? Give feedback.
1 reply
-
I still think |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would love any feedback before I wrap up the docs and release these new APIs!
Notable new features:
FileStats
for Glob matchesGlob.fromString
Script.command
andScript.exec
BackendTask.Stream
API for creating and running/reading a pipeline of Stream's (goes through NodeJS's native Stream APIs)BackendTask.Do
module for some helpers for using continuation-style in your scripts orBackendTask
definitionsI haven't written up the docs for some of these yet, but I'm moving into that phase to do the final wrapup. Any and all feedback is welcome and appreciated!
ADDED MODULES - MINOR
BackendTask.Do
BackendTask.Stream
Pages.Script.Spinner
BackendTask - MINOR
Added
do
:BackendTask.BackendTask error value
-> BackendTask.BackendTask error ()
doEach
:List.List (BackendTask.BackendTask error ())
-> BackendTask.BackendTask error ()
failIf
:Basics.Bool
-> FatalError.FatalError
-> BackendTask.BackendTask FatalError.FatalError ()
inDir
:String.String
-> BackendTask.BackendTask error value
-> BackendTask.BackendTask error value
quiet
:BackendTask.BackendTask error value
-> BackendTask.BackendTask error value
sequence
:List.List (BackendTask.BackendTask error value)
-> BackendTask.BackendTask error (List.List value)
withEnv
:String.String
-> String.String
-> BackendTask.BackendTask error value
-> BackendTask.BackendTask error value
BackendTask.Glob
- MINORAdded
type alias FileStats
={ fullPath : String.String
, sizeInBytes : Basics.Int
, lastContentChange : Time.Posix
, lastAccess : Time.Posix
, lastFileChange : Time.Posix
, createdAt : Time.Posix
, isDirectory : Basics.Bool
}
captureStats
:BackendTask.Glob.Glob (BackendTask.Glob.FileStats -> value)
-> BackendTask.Glob.Glob value
fromString
:String.String
-> BackendTask.BackendTask error (List.List String.String)
fromStringWithOptions
:BackendTask.Glob.Options
-> String.String
-> BackendTask.BackendTask error (List.List String.String)
Pages.Script
- MINORAdded
command
:String.String
-> List.List String.String
-> BackendTask.BackendTask FatalError.FatalError String.String
doThen
:BackendTask.BackendTask error value
-> BackendTask.BackendTask error ()
-> BackendTask.BackendTask error value
exec
:String.String
-> List.List String.String
-> BackendTask.BackendTask FatalError.FatalError ()
expectWhich
:String.String
-> BackendTask.BackendTask FatalError.FatalError String.String
question
: String.String -> BackendTask.BackendTask error String.Stringsleep
: Basics.Int -> BackendTask.BackendTask error ()which
:String.String
-> BackendTask.BackendTask error (Maybe.Maybe String.String)
Beta Was this translation helpful? Give feedback.
All reactions