1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00
denoland-deno/cli/msg.fbs

249 lines
3 KiB
Text
Raw Normal View History

union Any {
2019-03-11 23:25:18 -04:00
Chdir,
Chmod,
2019-05-07 21:58:58 -04:00
Chown,
2019-03-11 23:25:18 -04:00
CopyFile,
Cwd,
CwdRes,
Link,
2018-08-23 18:36:45 -04:00
MakeTempDir,
MakeTempDirRes,
2018-09-10 05:48:36 -04:00
Mkdir,
Read,
2018-10-03 17:56:56 -04:00
ReadDir,
ReadDirRes,
ReadRes,
2018-09-25 00:20:49 -04:00
Readlink,
ReadlinkRes,
2019-03-11 23:25:18 -04:00
Remove,
Rename,
Seek,
2019-03-11 23:25:18 -04:00
Stat,
StatRes,
Symlink,
Truncate,
Write,
WriteRes,
2018-07-04 14:50:28 -04:00
}
enum ErrorKind: byte {
NoError = 0,
// io errors
NotFound,
PermissionDenied,
ConnectionRefused,
ConnectionReset,
ConnectionAborted,
NotConnected,
AddrInUse,
AddrNotAvailable,
BrokenPipe,
AlreadyExists,
WouldBlock,
InvalidInput,
InvalidData,
TimedOut,
Interrupted,
WriteZero,
Other,
UnexpectedEof,
2018-10-10 11:15:47 -04:00
BadResource,
CommandFailed,
// url errors
EmptyHost,
IdnaError,
InvalidPort,
InvalidIpv4Address,
InvalidIpv6Address,
InvalidDomainCharacter,
RelativeUrlWithoutBase,
RelativeUrlWithCannotBeABaseBase,
SetHostOnCannotBeABaseUrl,
Overflow,
// hyper errors
HttpUser,
HttpClosed,
HttpCanceled,
HttpParse,
HttpOther,
TooLarge,
// custom errors
InvalidUri,
InvalidSeekMode,
2019-06-19 22:07:01 -04:00
OpNotAvailable,
WorkerInitFailed,
UnixError,
2019-06-17 21:02:08 -04:00
NoAsyncSupport,
NoSyncSupport,
2019-06-09 09:08:20 -04:00
ImportMapError,
InvalidPath,
ImportPrefixMissing,
UnsupportedFetchScheme,
TooManyRedirects,
2019-06-19 22:07:01 -04:00
// other kinds
Diagnostic,
JSError,
}
2018-10-13 16:03:27 -04:00
table Cwd {}
table CwdRes {
cwd: string;
}
2018-10-21 22:14:27 -04:00
enum MediaType: byte {
JavaScript = 0,
TypeScript,
Json,
Unknown
}
table Base {
cmd_id: uint32;
2018-12-12 08:24:36 -05:00
sync: bool = false;
error_kind: ErrorKind = NoError;
error: string;
inner: Any;
2018-07-04 14:50:28 -04:00
}
table FormatError {
error: string;
}
table FormatErrorRes {
error: string;
}
2018-10-13 16:03:27 -04:00
table Chdir {
directory: string;
}
2018-11-02 20:09:10 -04:00
table KeyValue {
2018-09-07 18:59:02 -04:00
key: string;
value: string;
}
2018-08-23 18:36:45 -04:00
table MakeTempDir {
dir: string;
prefix: string;
suffix: string;
}
table MakeTempDirRes {
path: string;
}
2018-09-10 05:48:36 -04:00
table Mkdir {
2018-08-26 02:26:30 -04:00
path: string;
recursive: bool;
mode: uint; // Specified by https://godoc.org/os#FileMode
2018-08-26 02:26:30 -04:00
}
table Chmod {
path: string;
mode: uint; // Specified by https://godoc.org/os#FileMode
}
2019-05-07 21:58:58 -04:00
table Chown {
path: string;
uid: uint;
gid: uint; // Specified by https://godoc.org/os#Chown
}
table Remove {
path: string;
recursive: bool;
}
2018-10-03 17:56:56 -04:00
table ReadDir {
path: string;
}
table ReadDirRes {
entries: [StatRes];
}
2018-09-30 18:06:41 -04:00
table CopyFile {
from: string;
to: string;
}
2018-09-12 11:44:58 -04:00
table Rename {
2018-09-03 20:22:30 -04:00
oldpath: string;
newpath: string;
}
2018-09-25 00:20:49 -04:00
table Readlink {
name: string;
}
table ReadlinkRes {
path: string;
}
2018-09-19 00:38:24 -04:00
table Symlink {
oldname: string;
newname: string;
}
table Link {
oldname: string;
newname: string;
}
2018-09-11 15:38:53 -04:00
table Stat {
2018-08-29 09:22:25 -04:00
filename: string;
lstat: bool;
}
2018-09-11 15:38:53 -04:00
table StatRes {
2018-08-29 09:22:25 -04:00
is_file: bool;
is_symlink: bool;
len: ulong;
modified:ulong;
accessed:ulong;
created:ulong;
mode: uint;
has_mode: bool; // false on windows
2018-10-03 17:56:56 -04:00
name: string;
2018-08-29 09:22:25 -04:00
}
2018-09-30 15:06:20 -04:00
table Truncate {
name: string;
len: uint;
}
table Read {
rid: uint32;
// (ptr, len) is passed as second parameter to Deno.core.send().
}
table ReadRes {
nread: uint;
eof: bool;
}
table Write {
rid: uint32;
}
table WriteRes {
nbyte: uint;
}
table Seek {
rid: uint32;
offset: int;
whence: uint;
}
root_type Base;