2018-08-15 23:36:48 -04:00
|
|
|
union Any {
|
2019-08-16 11:05:24 -04:00
|
|
|
Read,
|
|
|
|
ReadRes,
|
2019-02-18 18:26:41 -05:00
|
|
|
Seek,
|
2019-08-16 11:05:24 -04:00
|
|
|
Write,
|
|
|
|
WriteRes,
|
2018-07-04 14:50:28 -04:00
|
|
|
}
|
|
|
|
|
2018-08-15 23:36:48 -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,
|
2018-11-15 23:07:40 -05:00
|
|
|
CommandFailed,
|
2018-09-27 00:56:39 -04:00
|
|
|
|
2018-08-15 23:36:48 -04:00
|
|
|
// url errors
|
|
|
|
|
|
|
|
EmptyHost,
|
|
|
|
IdnaError,
|
|
|
|
InvalidPort,
|
|
|
|
InvalidIpv4Address,
|
|
|
|
InvalidIpv6Address,
|
|
|
|
InvalidDomainCharacter,
|
|
|
|
RelativeUrlWithoutBase,
|
|
|
|
RelativeUrlWithCannotBeABaseBase,
|
|
|
|
SetHostOnCannotBeABaseUrl,
|
|
|
|
Overflow,
|
2018-08-14 16:50:53 -04:00
|
|
|
|
|
|
|
// hyper errors
|
|
|
|
|
|
|
|
HttpUser,
|
|
|
|
HttpClosed,
|
|
|
|
HttpCanceled,
|
|
|
|
HttpParse,
|
|
|
|
HttpOther,
|
2018-12-09 15:38:30 -05:00
|
|
|
TooLarge,
|
2018-12-21 04:47:09 -05:00
|
|
|
|
|
|
|
// custom errors
|
|
|
|
InvalidUri,
|
2019-02-18 18:26:41 -05:00
|
|
|
InvalidSeekMode,
|
2019-06-19 22:07:01 -04:00
|
|
|
OpNotAvailable,
|
2019-04-21 21:26:56 -04:00
|
|
|
WorkerInitFailed,
|
|
|
|
UnixError,
|
2019-06-17 21:02:08 -04:00
|
|
|
NoAsyncSupport,
|
|
|
|
NoSyncSupport,
|
2019-06-09 09:08:20 -04:00
|
|
|
ImportMapError,
|
2019-07-10 18:53:48 -04:00
|
|
|
InvalidPath,
|
core: clearly define when module lookup is path-based vs URL-based
The rules are now as follows:
* In `import` statements, as mandated by the WHATWG specification,
the import specifier is always treated as a URL.
If it is a relative URL, it must start with either / or ./ or ../
* A script name passed to deno as a command line argument may be either
an absolute URL or a local path.
- If the name starts with a valid URI scheme followed by a colon, e.g.
'http:', 'https:', 'file:', 'foo+bar:', it always interpreted as a
URL (even if Deno doesn't support the indicated protocol).
- Otherwise, the script name is interpreted as a local path. The local
path may be relative, and operating system semantics determine how
it is resolved. Prefixing a relative path with ./ is not required.
2019-07-08 03:55:24 -04:00
|
|
|
ImportPrefixMissing,
|
2019-07-10 18:53:48 -04:00
|
|
|
UnsupportedFetchScheme,
|
2019-07-22 18:52:40 -04:00
|
|
|
TooManyRedirects,
|
2019-06-19 22:07:01 -04:00
|
|
|
|
|
|
|
// other kinds
|
|
|
|
Diagnostic,
|
|
|
|
JSError,
|
2018-08-15 23:36:48 -04:00
|
|
|
}
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2018-07-06 11:27:36 -04:00
|
|
|
table Base {
|
2019-06-14 13:58:20 -04:00
|
|
|
cmd_id: uint32;
|
2018-12-12 08:24:36 -05:00
|
|
|
sync: bool = false;
|
2018-08-15 23:36:48 -04:00
|
|
|
error_kind: ErrorKind = NoError;
|
2018-07-06 11:27:36 -04:00
|
|
|
error: string;
|
2018-10-03 21:12:23 -04:00
|
|
|
inner: Any;
|
2018-07-04 14:50:28 -04:00
|
|
|
}
|
|
|
|
|
2019-02-09 16:55:40 -05:00
|
|
|
table FormatError {
|
|
|
|
error: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
table FormatErrorRes {
|
|
|
|
error: 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-31 07:51:12 -04:00
|
|
|
}
|
|
|
|
|
2019-08-16 11:05:24 -04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-02-18 18:26:41 -05:00
|
|
|
table Seek {
|
|
|
|
rid: uint32;
|
|
|
|
offset: int;
|
|
|
|
whence: uint;
|
|
|
|
}
|
|
|
|
|
2018-08-13 19:55:10 -04:00
|
|
|
root_type Base;
|