0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-12 16:59:32 -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 18:58:58 -07:00
Chown,
2019-03-11 23:25:18 -04:00
CopyFile,
Cwd,
CwdRes,
Link,
2018-08-24 00:36:45 +02:00
MakeTempDir,
MakeTempDirRes,
2018-09-10 14:18:36 +04:30
Mkdir,
Read,
2018-10-04 06:56:56 +09:00
ReadDir,
ReadDirRes,
ReadRes,
2018-09-24 21:20:49 -07: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-11 00:15:47 +09: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-20 12:07:01 +10:00
OpNotAvailable,
WorkerInitFailed,
UnixError,
2019-06-17 21:02:08 -04:00
NoAsyncSupport,
NoSyncSupport,
2019-06-09 15:08:20 +02:00
ImportMapError,
InvalidPath,
ImportPrefixMissing,
UnsupportedFetchScheme,
TooManyRedirects,
2019-06-20 12:07:01 +10:00
// other kinds
Diagnostic,
JSError,
}
2018-10-14 01:33:27 +05:30
table Cwd {}
table CwdRes {
cwd: string;
}
2018-10-22 13:14:27 +11:00
enum MediaType: byte {
JavaScript = 0,
TypeScript,
Json,
Unknown
}
table Base {
cmd_id: uint32;
2018-12-12 22:24:36 +09: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-14 01:33:27 +05:30
table Chdir {
directory: string;
}
2018-11-02 20:09:10 -04:00
table KeyValue {
2018-09-08 07:59:02 +09:00
key: string;
value: string;
}
2018-08-24 00:36:45 +02:00
table MakeTempDir {
dir: string;
prefix: string;
suffix: string;
}
table MakeTempDirRes {
path: string;
}
2018-09-10 14:18:36 +04:30
table Mkdir {
2018-08-26 10:56:30 +04:30
path: string;
recursive: bool;
mode: uint; // Specified by https://godoc.org/os#FileMode
2018-08-26 10:56:30 +04:30
}
table Chmod {
path: string;
mode: uint; // Specified by https://godoc.org/os#FileMode
}
2019-05-07 18:58:58 -07:00
table Chown {
path: string;
uid: uint;
gid: uint; // Specified by https://godoc.org/os#Chown
}
table Remove {
path: string;
recursive: bool;
}
2018-10-04 06:56:56 +09:00
table ReadDir {
path: string;
}
table ReadDirRes {
entries: [StatRes];
}
2018-09-30 15:06:41 -07:00
table CopyFile {
from: string;
to: string;
}
2018-09-12 08:44:58 -07:00
table Rename {
2018-09-03 17:22:30 -07:00
oldpath: string;
newpath: string;
}
2018-09-24 21:20:49 -07:00
table Readlink {
name: string;
}
table ReadlinkRes {
path: string;
}
2018-09-18 21:38:24 -07:00
table Symlink {
oldname: string;
newname: string;
}
table Link {
oldname: string;
newname: string;
}
2018-09-12 00:08:53 +04:30
table Stat {
2018-08-29 14:22:25 +01:00
filename: string;
lstat: bool;
}
2018-09-12 00:08:53 +04:30
table StatRes {
2018-08-29 14:22:25 +01: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-04 06:56:56 +09:00
name: string;
2018-08-29 14:22:25 +01:00
}
2018-10-01 03:06:20 +08: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;