Something went wrong. Try again.
Dagger 1.0.0 beta SDK experiments
dagger purescript gleam clojure
Something went wrong. Try again.
7.7 kB · 226 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227-- Generated by scripts/generate.mjs. Do not edit.module Dagger.File ( asEnvFile , asEnvFileWith , AsEnvFileOpts , defaultAsEnvFileOpts , asGitBundle , asJSON , chown , contents , contentsWith , ContentsOpts , defaultContentsOpts , digest , digestWith , DigestOpts , defaultDigestOpts , export , exportWith , ExportOpts , defaultExportOpts , id , name , search , searchWith , SearchOpts , defaultSearchOpts , size , stat , sync , withName , withReplaced , withReplacedWith , WithReplacedOpts , defaultWithReplacedOpts , withTimestamps ) where
import Data.Maybe (Maybe(..))import Effect.Aff (Aff)import Dagger.Internal.Runtime as Rimport Dagger.Types as T
type AsEnvFileOpts = { expand :: Maybe Boolean }
defaultAsEnvFileOpts :: AsEnvFileOptsdefaultAsEnvFileOpts = { expand: Nothing }
-- | Parse as an env fileasEnvFile :: T.File -> T.EnvFileasEnvFile = asEnvFileWith defaultAsEnvFileOpts
-- | Parse as an env fileasEnvFileWith :: AsEnvFileOpts -> T.File -> T.EnvFileasEnvFileWith opts = R.select "asEnvFile" [R.optional (R.argument "expand" "Boolean") opts.expand]
-- | Interpret this file as a Git bundle by lazily parsing its header.asGitBundle :: T.File -> T.GitBundleasGitBundle = R.select "asGitBundle" []
-- | Parse the file contents as JSON.asJSON :: T.File -> T.JSONValueasJSON = R.select "asJSON" []
-- | Change the owner of the file recursively.chown :: String -> T.File -> T.Filechown argOwner = R.select "chown" [R.argument "owner" "String!" argOwner]
type ContentsOpts = { offsetLines :: Maybe Int , limitLines :: Maybe Int }
defaultContentsOpts :: ContentsOptsdefaultContentsOpts = { offsetLines: Nothing , limitLines: Nothing }
-- | Retrieves the contents of the file.contents :: T.File -> Aff Stringcontents = contentsWith defaultContentsOpts
-- | Retrieves the contents of the file.contentsWith :: ContentsOpts -> T.File -> Aff StringcontentsWith opts = R.scalar "contents" [R.optional (R.argument "offsetLines" "Int") opts.offsetLines, R.optional (R.argument "limitLines" "Int") opts.limitLines]
type DigestOpts = { excludeMetadata :: Maybe Boolean }
defaultDigestOpts :: DigestOptsdefaultDigestOpts = { excludeMetadata: Nothing }
-- | Return the file's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.digest :: T.File -> Aff Stringdigest = digestWith defaultDigestOpts
-- | Return the file's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.digestWith :: DigestOpts -> T.File -> Aff StringdigestWith opts = R.scalar "digest" [R.optional (R.argument "excludeMetadata" "Boolean") opts.excludeMetadata]
type ExportOpts = { allowParentDirPath :: Maybe Boolean }
defaultExportOpts :: ExportOptsdefaultExportOpts = { allowParentDirPath: Nothing }
-- | Writes the file to a file path on the host.export :: String -> T.File -> Aff Stringexport argPath = exportWith argPath defaultExportOpts
-- | Writes the file to a file path on the host.exportWith :: String -> ExportOpts -> T.File -> Aff StringexportWith argPath opts = R.scalar "export" [R.argument "path" "String!" argPath, R.optional (R.argument "allowParentDirPath" "Boolean") opts.allowParentDirPath]
-- | A unique identifier for this File.id :: T.File -> Aff T.IDid = R.scalar "id" []
-- | Retrieves the name of the file.name :: T.File -> Aff Stringname = R.scalar "name" []
type SearchOpts = { literal :: Maybe Boolean , multiline :: Maybe Boolean , dotall :: Maybe Boolean , insensitive :: Maybe Boolean , skipIgnored :: Maybe Boolean , skipHidden :: Maybe Boolean , filesOnly :: Maybe Boolean , limit :: Maybe Int , paths :: Maybe (Array String) , globs :: Maybe (Array String) }
defaultSearchOpts :: SearchOptsdefaultSearchOpts = { literal: Nothing , multiline: Nothing , dotall: Nothing , insensitive: Nothing , skipIgnored: Nothing , skipHidden: Nothing , filesOnly: Nothing , limit: Nothing , paths: Nothing , globs: Nothing }
-- | Searches for content matching the given regular expression or literal string.-- |-- | Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.search :: String -> T.File -> Aff (Array T.SearchResult)search argPattern = searchWith argPattern defaultSearchOpts
-- | Searches for content matching the given regular expression or literal string.-- |-- | Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.searchWith :: String -> SearchOpts -> T.File -> Aff (Array T.SearchResult)searchWith argPattern opts = R.objectList "SearchResult" "search" [R.argument "pattern" "String!" argPattern, R.optional (R.argument "literal" "Boolean") opts.literal, R.optional (R.argument "multiline" "Boolean") opts.multiline, R.optional (R.argument "dotall" "Boolean") opts.dotall, R.optional (R.argument "insensitive" "Boolean") opts.insensitive, R.optional (R.argument "skipIgnored" "Boolean") opts.skipIgnored, R.optional (R.argument "skipHidden" "Boolean") opts.skipHidden, R.optional (R.argument "filesOnly" "Boolean") opts.filesOnly, R.optional (R.argument "limit" "Int") opts.limit, R.optional (R.argument "paths" "[String!]") opts.paths, R.optional (R.argument "globs" "[String!]") opts.globs]
-- | Retrieves the size of the file, in bytes.size :: T.File -> Aff Intsize = R.scalar "size" []
-- | Return file statusstat :: T.File -> Aff (Maybe T.Stat)stat = R.nullableObject "Stat" "stat" []
-- | Force evaluation in the engine.sync :: T.File -> Aff T.IDsync = R.scalar "sync" []
-- | Retrieves this file with its name set to the given name.withName :: String -> T.File -> T.FilewithName argName = R.select "withName" [R.argument "name" "String!" argName]
type WithReplacedOpts = { all :: Maybe Boolean , firstFrom :: Maybe Int }
defaultWithReplacedOpts :: WithReplacedOptsdefaultWithReplacedOpts = { all: Nothing , firstFrom: Nothing }
-- | Retrieves the file with content replaced with the given text.-- |-- | If 'all' is true, all occurrences of the pattern will be replaced.-- |-- | If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.-- |-- | If neither are specified, and there are multiple matches for the pattern, this will error.-- |-- | If there are no matches for the pattern, this will error.withReplaced :: String -> String -> T.File -> T.FilewithReplaced argSearch argReplacement = withReplacedWith argSearch argReplacement defaultWithReplacedOpts
-- | Retrieves the file with content replaced with the given text.-- |-- | If 'all' is true, all occurrences of the pattern will be replaced.-- |-- | If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.-- |-- | If neither are specified, and there are multiple matches for the pattern, this will error.-- |-- | If there are no matches for the pattern, this will error.withReplacedWith :: String -> String -> WithReplacedOpts -> T.File -> T.FilewithReplacedWith argSearch argReplacement opts = R.select "withReplaced" [R.argument "search" "String!" argSearch, R.argument "replacement" "String!" argReplacement, R.optional (R.argument "all" "Boolean") opts.all, R.optional (R.argument "firstFrom" "Int") opts.firstFrom]
-- | Retrieves this file with its created/modified timestamps set to the given time.withTimestamps :: Int -> T.File -> T.FilewithTimestamps argTimestamp = R.select "withTimestamps" [R.argument "timestamp" "Int!" argTimestamp]