├── .vscode └── settings.json ├── .config └── dotnet-tools.json ├── LICENSE ├── src ├── Uuid.fs ├── Bytes.fs ├── Archive.fs ├── Fable.Deno.fsproj ├── Async.fs ├── Http.fs └── Deno.fs ├── README.md └── .gitignore /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "deno.enable": true 3 | } -------------------------------------------------------------------------------- /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "fantomas": { 6 | "version": "5.0.0-beta-001", 7 | "commands": [ 8 | "fantomas" 9 | ] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Angel D. Munoz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/Uuid.fs: -------------------------------------------------------------------------------- 1 | module Fable.Deno.Uuid 2 | 3 | open Fable.Core 4 | 5 | [] 6 | let NIL_UUID: string = jsNative 7 | 8 | [] 9 | let isNil (id: string) : bool = jsNative 10 | 11 | type V1Options = 12 | abstract clockseq: float option 13 | abstract msecs: float option 14 | abstract node: float[] option 15 | abstract nsecs: float option 16 | abstract random: float[] option 17 | abstract rng: (unit -> float[]) option 18 | 19 | 20 | [] 21 | type V1 = 22 | [] 23 | static member generate(?options: V1Options, ?buffer: int[], ?offset: int) : U2 = jsNative 24 | 25 | [] 26 | static member validate(id: string) : bool = jsNative 27 | 28 | [] 29 | type V4 = 30 | 31 | [] 32 | static member validate(id: string) : bool = jsNative 33 | 34 | [] 35 | type V5 = 36 | [] 37 | static member generate(nmspace: string, ?data: JS.Uint8Array) : JS.Promise = jsNative 38 | 39 | [] 40 | static member validate(id: string) : bool = jsNative 41 | -------------------------------------------------------------------------------- /src/Bytes.fs: -------------------------------------------------------------------------------- 1 | module Fable.Deno.Bytes 2 | 3 | open Fable.Core 4 | open System 5 | 6 | [] 7 | type Bytes = 8 | 9 | [] 10 | static member concat([] buffer: JS.Uint8Array[]) : JS.Uint8Array = jsNative 11 | 12 | [] 13 | static member copy(src: JS.Uint8Array, dist: JS.Uint8Array, ?offset: int) : int = jsNative 14 | 15 | [] 16 | static member startsWith(source: JS.Uint8Array, prefix: JS.Uint8Array) : bool = jsNative 17 | 18 | [] 19 | static member endsWith(source: JS.Uint8Array, suffix: JS.Uint8Array) : bool = jsNative 20 | 21 | [] 22 | static member equals(expected: JS.Uint8Array, actual: JS.Uint8Array) : bool = jsNative 23 | 24 | [] 25 | static member includesNeedle(source: JS.Uint8Array, needkle: JS.Uint8Array, ?start: int) : bool = jsNative 26 | 27 | [] 28 | static member indexOfNeedle(source: JS.Uint8Array, needkle: JS.Uint8Array, ?start: int) : int = jsNative 29 | 30 | [] 31 | static member lastIndexOfNeedle(source: JS.Uint8Array, needkle: JS.Uint8Array, ?start: int) : int = jsNative 32 | 33 | [] 34 | static member repeat(source: JS.Uint8Array, count: int) : JS.Uint8Array = jsNative 35 | -------------------------------------------------------------------------------- /src/Archive.fs: -------------------------------------------------------------------------------- 1 | module Fable.Deno.Archive 2 | 3 | open Fable.Core 4 | open Fable.Deno 5 | open System.Collections.Generic 6 | 7 | [] 8 | type TarData = 9 | abstract checksum: string option 10 | abstract fileMode: string option 11 | abstract fileName: string option 12 | abstract fileNamePrefix: string option 13 | abstract fileSize: string option 14 | abstract gid: string option 15 | abstract group: string option 16 | abstract mtime: string option 17 | abstract owner: string option 18 | abstract ``type``: string option 19 | abstract uid: string option 20 | abstract ustar: string option 21 | 22 | [] 23 | type TarDataWithSource = 24 | inherit TarData 25 | abstract filePath: string option 26 | abstract reader: Reader option 27 | 28 | [] 29 | type TarInfo = 30 | abstract fileMode: int option 31 | abstract gid: int option 32 | abstract group: string option 33 | abstract mtime: int option 34 | abstract owner: string option 35 | abstract ``type``: string option 36 | abstract uid: int option 37 | 38 | [] 39 | type TarMeta = 40 | inherit TarInfo 41 | abstract fileName: string 42 | abstract fileSize: float option 43 | 44 | [] 45 | type TarOptions = 46 | inherit TarInfo 47 | abstract contentSize: float option 48 | abstract filePath: string option 49 | abstract reader: Reader option 50 | 51 | [] 52 | type TarHeader = 53 | 54 | [] 55 | member _.Item(key: string) : JS.Uint8Array = jsNative 56 | 57 | [] 58 | type Tar() = 59 | member _.data: TarDataWithSource[] = jsNative 60 | member _.append(fn: string, opts: TarOptions) : JS.Promise = jsNative 61 | member _.getReader() : Reader = jsNative 62 | 63 | [] 64 | type TarEntry = 65 | inherit Reader 66 | 67 | abstract consumed: bool 68 | abstract discard: unit -> JS.Promise 69 | 70 | [] 71 | type Untar = 72 | inherit IAsyncEnumerable 73 | 74 | abstract block: JS.Uint8Array 75 | abstract reader: Reader 76 | 77 | abstract extract: unit -> JS.Promise 78 | -------------------------------------------------------------------------------- /src/Fable.Deno.fsproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | true 6 | 0.1.0 7 | https://github.com/AngelMunoz/fable-deno 8 | https://github.com/AngelMunoz/fable-deno.git 9 | LICENSE 10 | README.md 11 | fsharp;fable;javascript;f#;js;deno; 12 | Angel Daniel Munoz Gonzalez 13 | true 14 | 15 | 16 | true 17 | true 18 | true 19 | snupkg 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/Async.fs: -------------------------------------------------------------------------------- 1 | module Fable.Deno.Async 2 | 3 | open System.Collections.Generic 4 | open Fable.Core 5 | open Fetch 6 | open System 7 | 8 | 9 | type DelayOptions = 10 | abstract signal: AbortSignal option 11 | 12 | [] 13 | type DeferredState = 14 | | Pending 15 | | Fulfilled 16 | | Rejected 17 | 18 | type Deferred<'T> = 19 | inherit JS.Promise<'T> 20 | 21 | abstract member state: DeferredState 22 | 23 | [] 24 | exception DeadlineError 25 | 26 | [] 27 | type MuxAsyncIterator<'T> = 28 | inherit IAsyncEnumerable<'T> 29 | 30 | abstract member add: IAsyncEnumerable<'T> -> unit 31 | 32 | [] 33 | let ERROR_WHILE_MAPPING_MESSAGE: string = jsNative 34 | 35 | [] 36 | let abortable<'T> 37 | (p: U2, JS.Promise<'T>>) 38 | (signal: AbortSignal) 39 | : U2, IAsyncEnumerable<'T>> = 40 | jsNative 41 | 42 | [] 43 | let abortableAsyncIterable<'T> (p: IAsyncEnumerable<'T>) (signal: AbortSignal) : IAsyncEnumerable<'T> = jsNative 44 | 45 | [] 46 | let abortablePromise<'T> (p: JS.Promise<'T>) (signal: AbortSignal) : JS.Promise<'T> = jsNative 47 | 48 | [] 49 | let deadline<'T> (p: JS.Promise<'T>) (delay: float) : JS.Promise<'T> = jsNative 50 | 51 | [] 52 | let debounce (fn: Action) (delay: float) : Action = jsNative 53 | 54 | [] 55 | let deferred<'T> (fn: Action) (delay: float) : Deferred<'T> = jsNative 56 | 57 | [] 58 | let delay<'T> (ms: float) : JS.Promise<'T> = jsNative 59 | 60 | [] 61 | let delayWithOptions<'T> (ms: float) (options: DelayOptions) : JS.Promise<'T> = jsNative 62 | 63 | [] 64 | let pooledMapSeq<'T, 'R> (poolLimit: int) (iteratorFn: 'T -> JS.Promise<'R>) (items: 'T seq) : IAsyncEnumerable<'R> = 65 | jsNative 66 | 67 | [] 68 | let pooledMapAsyncSeq<'T, 'R> 69 | (poolLimit: int) 70 | (iteratorFn: 'T -> JS.Promise<'R>) 71 | (items: IAsyncEnumerable<'T>) 72 | : IAsyncEnumerable<'R> = 73 | jsNative 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [import map]: https://deno.land/manual/linking_to_external_code/import_maps 2 | 3 | # Fable.Deno 4 | 5 | This repository offers bindings for the Deno API and some bindings for the std lib. 6 | 7 | ## Import Maps 8 | 9 | It is recommended to use an [import map] as deno supports them and allow you to customize the way you import dependencies for deno, you can include one using the `deno.json` configuration file on your project's root or by using the CLI 10 | 11 | ```json 12 | { 13 | "tasks": { 14 | "start": "deno run -A --watch=dist/ ./dist/Program.js" 15 | }, 16 | "importMap": "./import_map.json" 17 | } 18 | ``` 19 | 20 | ### Standard Library 21 | 22 | Standard library bindings are imported with the following convention 23 | 24 | - `fable-deno-*` where `*` is the name of the standard library module being imported 25 | 26 | these are a few examples: 27 | 28 | - `fable-deno-http` 29 | - `fable-deno-fs` 30 | - `fable-deno-streams` 31 | - `fable-deno-io` 32 | 33 | This is to prevent potential collisions with third party bindings, and also means that you have to provide an import map that satisfies the import conditions, for example to be able to import those modules you'd need an import map like this 34 | 35 | ```json 36 | { 37 | "imports": { 38 | "fable-deno-http": "https://deno.land/std/http/mod.ts", 39 | "fable-deno-fs": "https://deno.land/std/fs/mod.ts", 40 | "fable-deno-streams": "https://deno.land/std/streams/mod.ts", 41 | "fable-deno-io": "https://deno.land/std/io/mod.ts" 42 | } 43 | } 44 | ``` 45 | 46 | if a binding is broken on a newer deno release you can pin the URL to the version the binding still works untill the bindings are updated. 47 | 48 | Example: `"fable-deno-http": "https://deno.land/std@0.148.0/http/mod.ts"` 49 | 50 | > **Note**: Please keep in mind that some imports don't provide a `mod.ts` file so you will have to change the imports to make it work 51 | 52 | ### Available Modules 53 | 54 | - [x] archive 55 | - [x] Tar 56 | - [x] UnTar 57 | - [x] TarEntry 58 | - [x] async 59 | - [x] DeadlineError 60 | - [x] MuxAsyncIterator 61 | - [x] ERROR_WHILE_MAPPING_MESSAGE 62 | - [x] abortable 63 | - [x] abortableAsyncIterable 64 | - [x] abortablePromise 65 | - [x] deadline 66 | - [x] debounce 67 | - [x] deferred 68 | - [x] delay 69 | - [x] pooledMap 70 | - [x] bytes 71 | - [x] concat 72 | - [x] copy 73 | - [x] startsWith 74 | - [x] endsWith 75 | - [x] equals 76 | - [x] includesNeedle 77 | - [x] indexOfNeedle 78 | - [x] lastIndexOfNeedle 79 | - [x] repeat 80 | - [ ] collections 81 | - [ ] crypto 82 | - [ ] datetime 83 | - [ ] dotenv 84 | - [ ] encoding 85 | - [ ] examples 86 | - [ ] flags 87 | - [ ] fmt 88 | - [ ] fs 89 | - [ ] hash 90 | - [x] http 91 | - [x] HttpError 92 | - [x] Server 93 | - [x] Status 94 | - [x] errors 95 | - [x] STATUS_TEXT 96 | - [x] accepts 97 | - [x] acceptsEncodings 98 | - [x] acceptsLanguages 99 | - [x] createHttpError 100 | - [x] deleteCookie 101 | - [x] getCookies 102 | - [x] isClientErrorStatus 103 | - [x] isErrorStatus 104 | - [x] isHttpError 105 | - [x] isInformationalStatus 106 | - [x] isRedirectStatus 107 | - [x] isServerErrorStatus 108 | - [x] isSuccessfulStatus 109 | - [x] serve 110 | - [x] serveListener 111 | - [x] serveTls 112 | - [x] setCookie 113 | - [x] ConnInfo 114 | - [x] Cookie 115 | - [x] HttpErrorOptions 116 | - [x] ServeInit 117 | - [x] ServerInit 118 | - [x] ServeTlsInit 119 | - [ ] io 120 | - [ ] log 121 | - [ ] media_types 122 | - [ ] node 123 | - [ ] path 124 | - [ ] permissions 125 | - [ ] signal 126 | - [ ] streams 127 | - [ ] textproto 128 | - [x] uuid 129 | - [x] NIL_UUID 130 | - [x] isNil 131 | - [x] V1Options 132 | - [x] v1.generate 133 | - [x] v1.validate 134 | - [x] v4.validate 135 | - [x] v5.generate 136 | - [x] v5.validate 137 | - [ ] wasi 138 | - [ ] version.ts 139 | -------------------------------------------------------------------------------- /src/Http.fs: -------------------------------------------------------------------------------- 1 | module Fable.Deno.Http 2 | 3 | open Fable.Deno 4 | open Fable.Core 5 | 6 | open Fetch 7 | 8 | open System 9 | 10 | type Status = 11 | | Continue = 100 12 | | SwitchingProtocols = 101 13 | | Processing = 102 14 | | EarlyHints = 103 15 | | OK = 200 16 | | Created = 201 17 | | Accepted = 202 18 | | NonAuthoritativeInfo = 203 19 | | NoContent = 204 20 | | ResetContent = 205 21 | | PartialContent = 206 22 | | MultiStatus = 207 23 | | AlreadyReported = 208 24 | | IMUsed = 226 25 | | MultipleChoices = 300 26 | | MovedPermanently = 301 27 | | Found = 302 28 | | SeeOther = 303 29 | | NotModified = 304 30 | | UseProxy = 305 31 | | TemporaryRedirect = 307 32 | | PermanentRedirect = 308 33 | | BadRequest = 400 34 | | Unauthorized = 401 35 | | PaymentRequired = 402 36 | | Forbidden = 403 37 | | NotFound = 404 38 | | MethodNotAllowed = 405 39 | | NotAcceptable = 406 40 | | ProxyAuthRequired = 407 41 | | RequestTimeout = 408 42 | | Conflict = 409 43 | | Gone = 410 44 | | LengthRequired = 411 45 | | PreconditionFailed = 412 46 | | RequestEntityTooLarge = 413 47 | | RequestURITooLong = 414 48 | | UnsupportedMediaType = 415 49 | | RequestedRangeNotSatisfiable = 416 50 | | ExpectationFailed = 417 51 | | Teapot = 418 52 | | MisdirectedRequest = 421 53 | | UnprocessableEntity = 422 54 | | Locked = 423 55 | | FailedDependency = 424 56 | | TooEarly = 425 57 | | UpgradeRequired = 426 58 | | PreconditionRequired = 428 59 | | TooManyRequests = 429 60 | | RequestHeaderFieldsTooLarge = 431 61 | | UnavailableForLegalReasons = 451 62 | | InternalServerError = 500 63 | | NotImplemented = 501 64 | | BadGateway = 502 65 | | ServiceUnavailable = 503 66 | | GatewayTimeout = 504 67 | | HTTPVersionNotSupported = 505 68 | | VariantAlsoNegotiates = 506 69 | | InsufficientStorage = 507 70 | | LoopDetected = 508 71 | | NotExtended = 510 72 | | NetworkAuthenticationRequired = 511 73 | 74 | type HttpErrorOptions = 75 | abstract expose: bool option 76 | 77 | type CookieAttributes = 78 | abstract path: string option 79 | abstract domain: string option 80 | 81 | [] 82 | type CookieSameSite = 83 | | [] Strict 84 | | [] Lax 85 | | [] None 86 | 87 | type Cookie = 88 | abstract domain: string option 89 | abstract expires: DateTime option 90 | abstract httpOnly: bool option 91 | abstract maxAge: int option 92 | abstract name: string 93 | abstract path: string option 94 | abstract sameSite: CookieSameSite option 95 | abstract secure: bool option 96 | abstract unparsed: string[] option 97 | abstract value: string 98 | 99 | [] 100 | type HttpError(msg) = 101 | inherit Exception(msg) 102 | 103 | [] 104 | member _.expose: bool = jsNative 105 | 106 | [] 107 | member _.status: Status = jsNative 108 | 109 | 110 | type ServeInit = 111 | abstract onError: (exn -> U2>) option 112 | abstract onListen: (OnListenParams -> unit) option 113 | abstract signal: AbortSignal option 114 | 115 | type ServeTlsInit = 116 | inherit ServeInit 117 | 118 | abstract member certFile: string 119 | abstract member keyFile: string 120 | 121 | [] 122 | type Server(options: ServerInit) = 123 | 124 | member _.closed: bool = jsNative 125 | member _.addrs: DenoAddr[] = jsNative 126 | 127 | member _.close() : unit = jsNative 128 | 129 | member _.listenAndServe() : JS.Promise = jsNative 130 | member _.listenAndServeTls(certFile: string, keyFile: string) : JS.Promise = jsNative 131 | 132 | member _.serve(listener: Listener) : JS.Promise = jsNative 133 | 134 | [] 135 | type ErrorMap = 136 | 137 | [] 138 | member _.Item(key: string) : HttpError = jsNative 139 | 140 | [] 141 | type StatusTextMap = 142 | 143 | [] 144 | member _.Item(key: Status) : string = jsNative 145 | 146 | [] 147 | let errors: ErrorMap = jsNative 148 | 149 | [] 150 | let STATUS_TEXT: StatusTextMap = jsNative 151 | 152 | [] 153 | type Http = 154 | 155 | [] 156 | static member accepts(req: Request, [] types: string[]) : string array = jsNative 157 | 158 | [] 159 | static member acceptsEncodings(req: Request, [] encodings: string[]) : string array = jsNative 160 | 161 | [] 162 | static member acceptsLanguages(req: Request, [] encodings: string[]) : string array = jsNative 163 | 164 | [] 165 | static member createHttpError(?status: Status, ?message: string, ?options: HttpErrorOptions) : HttpError = jsNative 166 | 167 | [] 168 | static member deleteCookie(headers: Headers, name: string, ?attributes: CookieAttributes) : unit = jsNative 169 | 170 | [] 171 | static member getCookies(headers: Headers) : StringMap = jsNative 172 | 173 | [] 174 | static member setCookie(headers: Headers, cookie: Cookie) : StringMap = jsNative 175 | 176 | [] 177 | static member isClientErrorStatus(status: Status) : bool = jsNative 178 | 179 | [] 180 | static member isErrorStatus(status: Status) : bool = jsNative 181 | 182 | [] 183 | static member isHttpError(error: exn) : bool = jsNative 184 | 185 | [] 186 | static member isInformationalStatus(status: Status) : bool = jsNative 187 | 188 | [] 189 | static member isRedirectStatus(status: Status) : bool = jsNative 190 | 191 | [] 192 | static member isServerErrorStatus(status: Status) : bool = jsNative 193 | 194 | [] 195 | static member isSuccessfulStatus(status: Status) : bool = jsNative 196 | 197 | [] 198 | static member serve 199 | ( 200 | handler: Request -> U2>, 201 | ?options: ServeInit 202 | ) : JS.Promise = 203 | jsNative 204 | 205 | [] 206 | static member serveListener 207 | ( 208 | listener: Listener, 209 | handler: Request -> U2>, 210 | ?options: ServeInit 211 | ) : JS.Promise = 212 | jsNative 213 | 214 | [] 215 | static member serveTls 216 | ( 217 | handler: Request -> U2>, 218 | ?options: ServeTlsInit 219 | ) : JS.Promise = 220 | jsNative 221 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # Tye 66 | .tye/ 67 | 68 | # ASP.NET Scaffolding 69 | ScaffoldingReadMe.txt 70 | 71 | # StyleCop 72 | StyleCopReport.xml 73 | 74 | # Files built by Visual Studio 75 | *_i.c 76 | *_p.c 77 | *_h.h 78 | *.ilk 79 | *.meta 80 | *.obj 81 | *.iobj 82 | *.pch 83 | *.pdb 84 | *.ipdb 85 | *.pgc 86 | *.pgd 87 | *.rsp 88 | *.sbr 89 | *.tlb 90 | *.tli 91 | *.tlh 92 | *.tmp 93 | *.tmp_proj 94 | *_wpftmp.csproj 95 | *.log 96 | *.vspscc 97 | *.vssscc 98 | .builds 99 | *.pidb 100 | *.svclog 101 | *.scc 102 | 103 | # Chutzpah Test files 104 | _Chutzpah* 105 | 106 | # Visual C++ cache files 107 | ipch/ 108 | *.aps 109 | *.ncb 110 | *.opendb 111 | *.opensdf 112 | *.sdf 113 | *.cachefile 114 | *.VC.db 115 | *.VC.VC.opendb 116 | 117 | # Visual Studio profiler 118 | *.psess 119 | *.vsp 120 | *.vspx 121 | *.sap 122 | 123 | # Visual Studio Trace Files 124 | *.e2e 125 | 126 | # TFS 2012 Local Workspace 127 | $tf/ 128 | 129 | # Guidance Automation Toolkit 130 | *.gpState 131 | 132 | # ReSharper is a .NET coding add-in 133 | _ReSharper*/ 134 | *.[Rr]e[Ss]harper 135 | *.DotSettings.user 136 | 137 | # TeamCity is a build add-in 138 | _TeamCity* 139 | 140 | # DotCover is a Code Coverage Tool 141 | *.dotCover 142 | 143 | # AxoCover is a Code Coverage Tool 144 | .axoCover/* 145 | !.axoCover/settings.json 146 | 147 | # Coverlet is a free, cross platform Code Coverage Tool 148 | coverage*.json 149 | coverage*.xml 150 | coverage*.info 151 | 152 | # Visual Studio code coverage results 153 | *.coverage 154 | *.coveragexml 155 | 156 | # NCrunch 157 | _NCrunch_* 158 | .*crunch*.local.xml 159 | nCrunchTemp_* 160 | 161 | # MightyMoose 162 | *.mm.* 163 | AutoTest.Net/ 164 | 165 | # Web workbench (sass) 166 | .sass-cache/ 167 | 168 | # Installshield output folder 169 | [Ee]xpress/ 170 | 171 | # DocProject is a documentation generator add-in 172 | DocProject/buildhelp/ 173 | DocProject/Help/*.HxT 174 | DocProject/Help/*.HxC 175 | DocProject/Help/*.hhc 176 | DocProject/Help/*.hhk 177 | DocProject/Help/*.hhp 178 | DocProject/Help/Html2 179 | DocProject/Help/html 180 | 181 | # Click-Once directory 182 | publish/ 183 | 184 | # Publish Web Output 185 | *.[Pp]ublish.xml 186 | *.azurePubxml 187 | # Note: Comment the next line if you want to checkin your web deploy settings, 188 | # but database connection strings (with potential passwords) will be unencrypted 189 | *.pubxml 190 | *.publishproj 191 | 192 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 193 | # checkin your Azure Web App publish settings, but sensitive information contained 194 | # in these scripts will be unencrypted 195 | PublishScripts/ 196 | 197 | # NuGet Packages 198 | *.nupkg 199 | # NuGet Symbol Packages 200 | *.snupkg 201 | # The packages folder can be ignored because of Package Restore 202 | **/[Pp]ackages/* 203 | # except build/, which is used as an MSBuild target. 204 | !**/[Pp]ackages/build/ 205 | # Uncomment if necessary however generally it will be regenerated when needed 206 | #!**/[Pp]ackages/repositories.config 207 | # NuGet v3's project.json files produces more ignorable files 208 | *.nuget.props 209 | *.nuget.targets 210 | 211 | # Microsoft Azure Build Output 212 | csx/ 213 | *.build.csdef 214 | 215 | # Microsoft Azure Emulator 216 | ecf/ 217 | rcf/ 218 | 219 | # Windows Store app package directories and files 220 | AppPackages/ 221 | BundleArtifacts/ 222 | Package.StoreAssociation.xml 223 | _pkginfo.txt 224 | *.appx 225 | *.appxbundle 226 | *.appxupload 227 | 228 | # Visual Studio cache files 229 | # files ending in .cache can be ignored 230 | *.[Cc]ache 231 | # but keep track of directories ending in .cache 232 | !?*.[Cc]ache/ 233 | 234 | # Others 235 | ClientBin/ 236 | ~$* 237 | *~ 238 | *.dbmdl 239 | *.dbproj.schemaview 240 | *.jfm 241 | *.pfx 242 | *.publishsettings 243 | orleans.codegen.cs 244 | 245 | # Including strong name files can present a security risk 246 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 247 | #*.snk 248 | 249 | # Since there are multiple workflows, uncomment next line to ignore bower_components 250 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 251 | #bower_components/ 252 | 253 | # RIA/Silverlight projects 254 | Generated_Code/ 255 | 256 | # Backup & report files from converting an old project file 257 | # to a newer Visual Studio version. Backup files are not needed, 258 | # because we have git ;-) 259 | _UpgradeReport_Files/ 260 | Backup*/ 261 | UpgradeLog*.XML 262 | UpgradeLog*.htm 263 | ServiceFabricBackup/ 264 | *.rptproj.bak 265 | 266 | # SQL Server files 267 | *.mdf 268 | *.ldf 269 | *.ndf 270 | 271 | # Business Intelligence projects 272 | *.rdl.data 273 | *.bim.layout 274 | *.bim_*.settings 275 | *.rptproj.rsuser 276 | *- [Bb]ackup.rdl 277 | *- [Bb]ackup ([0-9]).rdl 278 | *- [Bb]ackup ([0-9][0-9]).rdl 279 | 280 | # Microsoft Fakes 281 | FakesAssemblies/ 282 | 283 | # GhostDoc plugin setting file 284 | *.GhostDoc.xml 285 | 286 | # Node.js Tools for Visual Studio 287 | .ntvs_analysis.dat 288 | node_modules/ 289 | 290 | # Visual Studio 6 build log 291 | *.plg 292 | 293 | # Visual Studio 6 workspace options file 294 | *.opt 295 | 296 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 297 | *.vbw 298 | 299 | # Visual Studio LightSwitch build output 300 | **/*.HTMLClient/GeneratedArtifacts 301 | **/*.DesktopClient/GeneratedArtifacts 302 | **/*.DesktopClient/ModelManifest.xml 303 | **/*.Server/GeneratedArtifacts 304 | **/*.Server/ModelManifest.xml 305 | _Pvt_Extensions 306 | 307 | # Paket dependency manager 308 | .paket/paket.exe 309 | paket-files/ 310 | 311 | # FAKE - F# Make 312 | .fake/ 313 | 314 | # CodeRush personal settings 315 | .cr/personal 316 | 317 | # Python Tools for Visual Studio (PTVS) 318 | __pycache__/ 319 | *.pyc 320 | 321 | # Cake - Uncomment if you are using it 322 | # tools/** 323 | # !tools/packages.config 324 | 325 | # Tabs Studio 326 | *.tss 327 | 328 | # Telerik's JustMock configuration file 329 | *.jmconfig 330 | 331 | # BizTalk build output 332 | *.btp.cs 333 | *.btm.cs 334 | *.odx.cs 335 | *.xsd.cs 336 | 337 | # OpenCover UI analysis results 338 | OpenCover/ 339 | 340 | # Azure Stream Analytics local run output 341 | ASALocalRun/ 342 | 343 | # MSBuild Binary and Structured Log 344 | *.binlog 345 | 346 | # NVidia Nsight GPU debugger configuration file 347 | *.nvuser 348 | 349 | # MFractors (Xamarin productivity tool) working folder 350 | .mfractor/ 351 | 352 | # Local History for Visual Studio 353 | .localhistory/ 354 | 355 | # BeatPulse healthcheck temp database 356 | healthchecksdb 357 | 358 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 359 | MigrationBackup/ 360 | 361 | # Ionide (cross platform F# VS Code tools) working folder 362 | .ionide/ 363 | 364 | # Fody - auto-generated XML schema 365 | FodyWeavers.xsd 366 | 367 | ## 368 | ## Visual studio for Mac 369 | ## 370 | 371 | 372 | # globs 373 | Makefile.in 374 | *.userprefs 375 | *.usertasks 376 | config.make 377 | config.status 378 | aclocal.m4 379 | install-sh 380 | autom4te.cache/ 381 | *.tar.gz 382 | tarballs/ 383 | test-results/ 384 | 385 | # Mac bundle stuff 386 | *.dmg 387 | *.app 388 | 389 | # content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore 390 | # General 391 | .DS_Store 392 | .AppleDouble 393 | .LSOverride 394 | 395 | # Icon must end with two \r 396 | Icon 397 | 398 | 399 | # Thumbnails 400 | ._* 401 | 402 | # Files that might appear in the root of a volume 403 | .DocumentRevisions-V100 404 | .fseventsd 405 | .Spotlight-V100 406 | .TemporaryItems 407 | .Trashes 408 | .VolumeIcon.icns 409 | .com.apple.timemachine.donotpresent 410 | 411 | # Directories potentially created on remote AFP share 412 | .AppleDB 413 | .AppleDesktop 414 | Network Trash Folder 415 | Temporary Items 416 | .apdisk 417 | 418 | # content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore 419 | # Windows thumbnail cache files 420 | Thumbs.db 421 | ehthumbs.db 422 | ehthumbs_vista.db 423 | 424 | # Dump file 425 | *.stackdump 426 | 427 | # Folder config file 428 | [Dd]esktop.ini 429 | 430 | # Recycle Bin used on file shares 431 | $RECYCLE.BIN/ 432 | 433 | # Windows Installer files 434 | *.cab 435 | *.msi 436 | *.msix 437 | *.msm 438 | *.msp 439 | 440 | # Windows shortcuts 441 | *.lnk 442 | 443 | # JetBrains Rider 444 | .idea/ 445 | *.sln.iml 446 | 447 | ## 448 | ## Visual Studio Code 449 | ## 450 | .vscode/* 451 | !.vscode/settings.json 452 | !.vscode/tasks.json 453 | !.vscode/launch.json 454 | !.vscode/extensions.json 455 | 456 | dist/ 457 | nugets/ 458 | 459 | *.fs.js -------------------------------------------------------------------------------- /src/Deno.fs: -------------------------------------------------------------------------------- 1 | namespace Fable.Deno 2 | 3 | open System.Collections.Generic 4 | open Fable.Core 5 | 6 | open Fetch 7 | 8 | open Browser.Types 9 | open System 10 | 11 | [] 12 | type Indexable = 13 | 14 | [] 15 | member _.Item(key: string) : obj = jsNative 16 | 17 | [] 18 | type StringMap = 19 | 20 | [] 21 | member _.Item(string: string) : string = jsNative 22 | 23 | type NetAddr = 24 | abstract hostname: string 25 | abstract port: int 26 | abstract transport: string 27 | 28 | type UnixAddr = 29 | abstract path: string 30 | abstract transport: string 31 | 32 | type DenoAddr = U2 33 | 34 | type ReadableStream<'T> = 35 | interface 36 | end 37 | 38 | type WritableStreamDefaultWriter<'T> = 39 | abstract closed: bool 40 | abstract desiredSize: int option 41 | abstract ready: JS.Promise 42 | abstract abort: obj -> unit 43 | abstract close: unit -> JS.Promise 44 | abstract releaseLock: unit -> unit 45 | abstract write: 'T -> JS.Promise 46 | 47 | type WritableStream<'T> = 48 | abstract locked: bool 49 | abstract abort: obj -> unit 50 | abstract close: unit -> JS.Promise 51 | abstract getWriter: unit -> WritableStreamDefaultWriter<'T> 52 | 53 | 54 | type Conn = 55 | abstract localAddr: DenoAddr 56 | abstract readable: ReadableStream 57 | abstract remoteAddr: DenoAddr 58 | abstract rid: int 59 | abstract writable: WritableStream 60 | abstract closeWrite: unit -> JS.Promise 61 | 62 | type TlsHandshakeInfo = 63 | interface 64 | end 65 | 66 | type TlsConn = 67 | inherit Conn 68 | abstract handshake: unit -> JS.Promise 69 | 70 | type ListenOptions = 71 | abstract hostname: string option 72 | abstract port: int 73 | 74 | type Listener = 75 | inherit IAsyncEnumerable 76 | abstract addr: DenoAddr 77 | abstract rid: int 78 | abstract accept: unit -> JS.Promise 79 | abstract close: unit -> unit 80 | 81 | type TlsListener = 82 | inherit Listener 83 | inherit IAsyncEnumerable 84 | abstract accept: JS.Promise 85 | 86 | type RequestEvent = 87 | abstract request: Request 88 | abstract respondWith: U2> -> JS.Promise 89 | 90 | type HttpConn = 91 | inherit IAsyncEnumerable 92 | abstract rid: int 93 | abstract close: unit -> unit 94 | abstract nextRequest: unit -> JS.Promise 95 | 96 | type ServerInit = 97 | inherit ListenOptions 98 | 99 | abstract handler: Request -> U2> 100 | abstract onError: (exn -> U2>) option 101 | 102 | type OnListenParams = 103 | abstract hostname: string 104 | abstract port: int 105 | 106 | type ConnInfo = 107 | abstract localAddr: DenoAddr 108 | abstract remoteAddr: DenoAddr 109 | 110 | [] 111 | type Signal = 112 | | [] SIGABRT 113 | | [] SIGALRM 114 | | [] SIGBREAK 115 | | [] SIGBUS 116 | | [] SIGCHLD 117 | | [] SIGCONT 118 | | [] SIGEMT 119 | | [] SIGFPE 120 | | [] SIGHUP 121 | | [] SIGILL 122 | | [] SIGINFO 123 | | [] SIGINT 124 | | [] SIGIO 125 | | [] SIGKILL 126 | | [] SIGPIPE 127 | | [] SIGPROF 128 | | [] SIGPWR 129 | | [] SIGQUIT 130 | | [] SIGSEGV 131 | | [] SIGSTKFLT 132 | | [] SIGSTOP 133 | | [] SIGSYS 134 | | [] SIGTERM 135 | | [] SIGTRAP 136 | | [] SIGTSTP 137 | | [] SIGTTIN 138 | | [] SIGTTOU 139 | | [] SIGURG 140 | | [] SIGUSR1 141 | | [] SIGUSR2 142 | | [] SIGVTALRM 143 | | [] SIGWINCH 144 | | [] SIGXCPU 145 | | [] SIGXFSZ 146 | 147 | type ConnectOptions = 148 | abstract hostname: string option 149 | abstract port: int 150 | abstract transport: string 151 | 152 | type ConnectTlsOptions = 153 | abstract caCerts: string[] option 154 | abstract certFile: string option 155 | abstract hostname: string option 156 | abstract port: int option 157 | 158 | type TcpConn = 159 | inherit Conn 160 | abstract setKeepAlive: bool option -> unit 161 | abstract setNoDelay: bool option -> unit 162 | 163 | type SeekMode = 164 | | Start = 0 165 | | Current = 1 166 | | End = 2 167 | 168 | type Reader = 169 | abstract read: JS.Uint8Array -> JS.Promise 170 | 171 | type ReaderSync = 172 | abstract readSync: JS.Uint8Array -> int option 173 | 174 | type Writer = 175 | abstract write: JS.Uint8Array -> JS.Promise 176 | 177 | type WriterSync = 178 | abstract writeSync: JS.Uint8Array -> int 179 | 180 | type Seeker = 181 | abstract seek: (int * SeekMode) -> JS.Promise 182 | 183 | type SeekerSync = 184 | abstract seekSync: (int * SeekMode) -> int 185 | 186 | type Closer = 187 | abstract close: unit -> unit 188 | 189 | type FileInfo = 190 | abstract atime: DateTime option 191 | abstract birthtime: DateTime option 192 | abstract blksize: int option 193 | abstract blocks: int option 194 | abstract dev: int option 195 | abstract gid: int option 196 | abstract ino: int option 197 | abstract isDirectory: bool 198 | abstract isFile: bool 199 | abstract isSymlink: bool 200 | abstract mode: int option 201 | abstract mtime: DateTime option 202 | abstract nlink: int option 203 | abstract rdev: int option 204 | abstract size: int 205 | abstract uid: int option 206 | 207 | type FsFile = 208 | inherit Reader 209 | inherit ReaderSync 210 | inherit Writer 211 | inherit WriterSync 212 | inherit Seeker 213 | inherit SeekerSync 214 | inherit Closer 215 | 216 | abstract readable: ReadableStream 217 | abstract rid: int 218 | abstract writable: WritableStream 219 | 220 | 221 | abstract close: unit -> unit 222 | abstract read: JS.Uint8Array -> JS.Promise 223 | abstract readSync: JS.Uint8Array -> int option 224 | abstract seek: (int * SeekMode) -> JS.Promise 225 | abstract seek: (int * int * SeekMode) -> JS.Promise 226 | abstract seekSync: (int * SeekMode) -> int 227 | abstract seekSync: (int * int * SeekMode) -> int 228 | abstract stat: unit -> JS.Promise 229 | abstract statSync: unit -> FileInfo 230 | abstract truncate: int option -> JS.Promise 231 | abstract truncateSync: int option -> JS.Promise 232 | abstract write: JS.Uint8Array -> JS.Promise 233 | abstract writeSync: JS.Uint8Array -> int 234 | 235 | type InspectOptions = 236 | abstract colors: bool option 237 | abstract compact: bool option 238 | abstract depth: int option 239 | abstract getters: bool option 240 | abstract iterableLimit: int option 241 | abstract showHidden: bool option 242 | abstract showProxy: bool option 243 | abstract sorted: bool option 244 | abstract strAbbreviateSize: int option 245 | abstract trailingComma: bool option 246 | 247 | type ListenOptionsWithTransport = 248 | inherit ListenOptions 249 | abstract transport: string option 250 | 251 | type ListenTlsOptions = 252 | inherit ListenOptions 253 | 254 | abstract cert: string option 255 | abstract certFile: string option 256 | abstract key: string option 257 | abstract keyFile: string option 258 | abstract transport: string option 259 | 260 | type MakeTempOptions = 261 | abstract dir: string option 262 | abstract prefix: string option 263 | abstract suffix: string option 264 | 265 | type MemoryUsage = 266 | abstract external: float 267 | abstract heapTotal: float 268 | abstract heapUsed: float 269 | abstract rss: float 270 | 271 | type OpMetrics = 272 | abstract bytesReceived: float 273 | abstract bytesSentControl: float 274 | abstract bytesSentData: float 275 | abstract opsCompleted: float 276 | abstract opsCompletedAsync: float 277 | abstract opsCompletedAsyncUnref: float 278 | abstract opsCompletedSync: float 279 | abstract opsDispatched: float 280 | abstract opsDispatchedAsync: float 281 | abstract opsDispatchedAsyncUnref: float 282 | abstract opsDispatchedSync: float 283 | 284 | type Metrics = 285 | inherit OpMetrics 286 | abstract ops: obj 287 | 288 | type MkdirOptions = 289 | abstract mode: int option 290 | abstract recursive: bool option 291 | 292 | type OpenOptions = 293 | abstract append: bool option 294 | abstract create: bool option 295 | abstract createNew: bool option 296 | abstract mode: int option 297 | abstract read: bool option 298 | abstract truncate: bool option 299 | abstract write: bool option 300 | 301 | type DirEntry = 302 | abstract isDirectory: bool 303 | abstract isFile: bool 304 | abstract isSymlink: bool 305 | abstract name: string 306 | 307 | type ReadFileOptions = 308 | abstract signal: AbortSignal option 309 | 310 | type RemoveOptions = 311 | abstract recursive: bool option 312 | 313 | [] 314 | type DnsRecordType = 315 | | [] A 316 | | [] AAAA 317 | | [] ANAME 318 | | [] CNAME 319 | | [] NS 320 | | [] PTR 321 | 322 | type NameServer = 323 | abstract ipAddr: string 324 | abstract port: int option 325 | 326 | type ResolveDnsOptions = 327 | abstract nameServer: NameServer option 328 | 329 | type ResourceMap = 330 | interface 331 | end 332 | 333 | type ProcessStatus = 334 | abstract success: bool 335 | abstract code: int 336 | abstract signal: Signal option 337 | 338 | [] 339 | type StdioRun = 340 | | [] Inherit 341 | | [] Piped 342 | | [] Null 343 | | Number of int 344 | 345 | type RunOptions = 346 | abstract cmd: U2 347 | abstract cwd: string option 348 | abstract env: obj option 349 | abstract stderr: StdioRun option 350 | abstract stdin: StdioRun option 351 | abstract stdout: StdioRun option 352 | 353 | type Process<'T> = 354 | abstract pid: int 355 | abstract rid: int 356 | abstract stderr: ReadableStream option 357 | abstract stdin: ReadableStream option 358 | abstract stdout: ReadableStream option 359 | abstract close: unit -> unit 360 | abstract kill: Signal -> unit 361 | abstract output: unit -> JS.Promise 362 | abstract status: unit -> JS.Promise 363 | abstract stderrOutput: unit -> JS.Promise 364 | 365 | type StartTlsOptions = 366 | abstract caCerts: string[] option 367 | abstract hostname: string option 368 | 369 | [] 370 | type SymlinkType = 371 | | File 372 | | Dir 373 | 374 | type SymlinkOptions = 375 | abstract ``type``: SymlinkType 376 | 377 | type PermissionOptionsObject = 378 | abstract env: U3 option 379 | abstract ffi: U3[]> option 380 | abstract hrtime: U2 option 381 | abstract net: U3 option 382 | abstract read: U3[]> option 383 | abstract run: U3[]> option 384 | abstract write: U3[]> option 385 | 386 | 387 | type PermissionOptions = U2 388 | 389 | type TestFn = TestContext -> U2> 390 | 391 | and TestStepDefinition = 392 | abstract fn: TestFn 393 | abstract ignore: bool option 394 | abstract name: string 395 | abstract sanitizeExit: bool option 396 | abstract sanitizeOps: bool option 397 | abstract sanitizeResources: bool option 398 | 399 | and TestContext = 400 | abstract name: string 401 | abstract origin: string 402 | abstract parent: TestContext option 403 | abstract step: TestStepDefinition -> JS.Promise 404 | abstract step: (string * TestFn) -> JS.Promise 405 | 406 | type TestDefinition = 407 | abstract fn: TestFn 408 | abstract ignore: bool option 409 | abstract name: string 410 | abstract only: bool option 411 | abstract permissions: PermissionOptions option 412 | abstract sanitizeExit: bool option 413 | abstract sanitizeOps: bool option 414 | abstract sanitizeResources: bool option 415 | 416 | type UpgradeWebSocketOptions = 417 | abstract idleTimeout: float option 418 | abstract protocol: string option 419 | 420 | type WebSocketUpgrade = 421 | abstract response: Response 422 | abstract socket: WebSocket 423 | 424 | type WatchOptions = 425 | abstract recursive: bool 426 | 427 | 428 | [] 429 | type FsEventKind = 430 | | Any 431 | | Access 432 | | Create 433 | | Modify 434 | | Remove 435 | | Other 436 | 437 | type FsEvent = 438 | abstract flag: string option 439 | abstract kind: FsEventKind 440 | abstract paths: string[] 441 | 442 | type FsWatcher = 443 | inherit IAsyncEnumerable 444 | 445 | abstract rid: int 446 | abstract close: unit -> unit 447 | abstract ``return``: (obj option) -> JS.Promise 448 | 449 | type WriteFileOptions = 450 | abstract append: bool option 451 | abstract create: bool option 452 | abstract mode: int option 453 | abstract signal: AbortSignal option 454 | 455 | [] 456 | type Deno = 457 | static member addSignalListener(signal: Signal, handler: unit -> unit) : unit = jsNative 458 | static member chdir(directory: U2) : unit = jsNative 459 | static member chmod(directory: U2, mode: int) : JS.Promise = jsNative 460 | static member chmodSync(directory: U2, mode: int) : unit = jsNative 461 | static member chown(directory: U2, ?uid: int, ?gid: int) : JS.Promise = jsNative 462 | static member close(rid: int) : unit = jsNative 463 | static member connect(connectOptions: ConnectOptions) : JS.Promise = jsNative 464 | static member connectTls(connectOptions: ConnectTlsOptions) : JS.Promise = jsNative 465 | static member copyFile(from: U2, toPath: U2) : JS.Promise = jsNative 466 | static member copyFileSync(from: U2, toPath: U2) : unit = jsNative 467 | static member create(path: U2) : JS.Promise = jsNative 468 | static member createSync(path: U2) : FsFile = jsNative 469 | static member cwd() : string = jsNative 470 | static member execPath() : string = jsNative 471 | static member exit(?code: int) : unit = jsNative 472 | static member fdatasync(rid: int) : JS.Promise = jsNative 473 | static member fdatasyncSync(rid: int) : unit = jsNative 474 | static member fstat(rid: int) : JS.Promise = jsNative 475 | static member fstatSync(rid: int) : FileInfo = jsNative 476 | static member fsync(rid: int) : JS.Promise = jsNative 477 | static member fsyncSync(rid: int) : unit = jsNative 478 | static member ftruncate(rid: int, ?len: int) : JS.Promise = jsNative 479 | static member ftruncateSync(rid: int, ?len: int) : unit = jsNative 480 | static member inspect(value: obj, ?options: InspectOptions) : string = jsNative 481 | static member isatty(rid: int) : bool = jsNative 482 | static member kill(pid: int, signal: Signal) : unit = jsNative 483 | static member link(oldPath: string, newPath: string) : JS.Promise = jsNative 484 | static member linkSync(oldPath: string, newPath: string) : unit = jsNative 485 | static member listen(options: ListenOptionsWithTransport) : Listener = jsNative 486 | static member listenTls(options: ListenTlsOptions) : TlsListener = jsNative 487 | static member lstat(path: U2) : JS.Promise = jsNative 488 | static member lstatSync(path: U2) : FileInfo = jsNative 489 | static member makeTempDir(?options: MakeTempOptions) : JS.Promise = jsNative 490 | static member makeTempDirSync(?options: MakeTempOptions) : string = jsNative 491 | static member makeTempFile(?options: MakeTempOptions) : JS.Promise = jsNative 492 | static member makeTempFileSync(?options: MakeTempOptions) : string = jsNative 493 | static member memoryUsage() : MemoryUsage = jsNative 494 | static member metrics() : Metrics = jsNative 495 | static member mkdir(path: U2, ?options: MkdirOptions) : JS.Promise = jsNative 496 | static member mkdirSync(path: U2, ?options: MkdirOptions) : unit = jsNative 497 | 498 | [] 499 | static member Open(path: U2, ?options: OpenOptions) : JS.Promise = jsNative 500 | 501 | static member openSync(path: U2, ?options: OpenOptions) : FsFile = jsNative 502 | static member read(rid: int, buffer: JS.Uint8Array) : JS.Promise = jsNative 503 | static member readDir(path: U2) : IAsyncEnumerable = jsNative 504 | static member readDirSync(path: U2) : IEnumerable = jsNative 505 | static member readFile(path: U2, ?options: ReadFileOptions) : JS.Promise = jsNative 506 | static member readFileSync(path: U2, ?options: ReadFileOptions) : JS.Uint8Array = jsNative 507 | static member readLink(path: U2) : JS.Promise = jsNative 508 | static member readLinkSync(path: U2) : string = jsNative 509 | static member readSync(rid: int, buffer: JS.Uint8Array) : int option = jsNative 510 | static member readTextFile(path: U2, ?options: ReadFileOptions) : JS.Promise = jsNative 511 | static member readTextFileSync(path: U2, ?options: ReadFileOptions) : string = jsNative 512 | static member realPath(path: U2) : JS.Promise = jsNative 513 | static member realPathSync(path: U2) : string = jsNative 514 | static member remove(path: U2, ?options: RemoveOptions) : JS.Promise = jsNative 515 | static member removeSync(path: U2, ?options: RemoveOptions) : unit = jsNative 516 | static member removeSignalListener(signal: Signal, listener: unit -> unit) : unit = jsNative 517 | static member rename(oldPath: U2, newPath: U2) : JS.Promise = jsNative 518 | static member renameSync(oldPath: U2, newPath: U2) : unit = jsNative 519 | 520 | static member resolveDns 521 | ( 522 | query: string, 523 | recordType: DnsRecordType, 524 | ?options: ResolveDnsOptions 525 | ) : JS.Promise = 526 | jsNative 527 | 528 | static member resources() : ResourceMap = jsNative 529 | static member run<'T when 'T :> RunOptions>(options: 'T) : Process<'T> = jsNative 530 | static member serveHttp(conn: Conn) : HttpConn = jsNative 531 | static member shutdown(rid: int) : JS.Promise = jsNative 532 | static member startTls(conn: Conn, ?options: StartTlsOptions) : JS.Promise = jsNative 533 | static member stat(path: U2) : JS.Promise = jsNative 534 | static member statSync(path: U2) : FileInfo = jsNative 535 | 536 | static member symlink 537 | ( 538 | oldPath: U2, 539 | newPath: U2, 540 | ?options: SymlinkOptions 541 | ) : JS.Promise = 542 | jsNative 543 | 544 | static member symlinkSync(oldPath: U2, newPath: U2, ?options: SymlinkOptions) : unit = 545 | jsNative 546 | 547 | static member test(t: TestDefinition) : unit = jsNative 548 | static member test(name: string, fn: TestFn) : unit = jsNative 549 | static member test(fn: TestFn) : unit = jsNative 550 | static member test(name: string, options: TestDefinition, fn: TestFn) : unit = jsNative 551 | static member test(options: TestDefinition, fn: TestFn) : unit = jsNative 552 | static member truncate(name: string, ?len: int) : JS.Promise = jsNative 553 | static member truncateSync(name: string, ?len: int) : unit = jsNative 554 | static member upgradeWebSocket(request: Request, ?options: UpgradeWebSocketOptions) : WebSocketUpgrade = jsNative 555 | static member write(rid: int, data: JS.Uint8Array) : JS.Promise = jsNative 556 | static member writeSync(rid: int, data: JS.Uint8Array) : int = jsNative 557 | 558 | static member writeFile(path: U2, data: JS.Uint8Array, ?options: WriteFileOptions) : JS.Promise = 559 | jsNative 560 | 561 | static member writeFileSync(path: U2, data: JS.Uint8Array, ?options: WriteFileOptions) : unit = 562 | jsNative 563 | 564 | static member writeTextFile(path: U2, data: string, ?options: WriteFileOptions) : JS.Promise = 565 | jsNative 566 | 567 | static member writeTextFileSync(path: U2, data: string, ?options: WriteFileOptions) : unit = jsNative 568 | static member watchFs(paths: U2, ?options: WatchOptions) : FsWatcher = jsNative 569 | --------------------------------------------------------------------------------