1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/msg.proto

66 lines
1.6 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto2";
2018-05-14 00:31:48 -04:00
package main;
2018-05-21 22:07:40 -04:00
message BaseMsg {
optional string channel = 1;
optional bytes payload = 2;
2018-05-21 22:07:40 -04:00
}
2018-05-14 00:31:48 -04:00
message Msg {
optional string error = 1;
oneof payload {
2018-05-17 21:02:06 -04:00
StartMsg start = 10;
SourceCodeFetchMsg source_code_fetch = 11;
SourceCodeFetchResMsg source_code_fetch_res = 12;
SourceCodeCacheMsg source_code_cache = 13;
ExitMsg exit = 14;
2018-05-18 11:49:28 -04:00
TimerStartMsg timer_start = 15;
TimerReadyMsg timer_ready = 16;
TimerClearMsg timer_clear = 17;
}
2018-05-14 00:31:48 -04:00
}
message StartMsg {
optional string cwd = 1;
repeated string argv = 2;
optional bool debug_flag = 3;
optional string main_js = 4; // The contents of dist/main.js
optional string main_map = 5; // The contents of dist/main.map
}
2018-05-19 04:47:40 -04:00
message SourceCodeFetchMsg {
optional string module_specifier = 1;
optional string containing_file = 2;
2018-05-19 04:47:40 -04:00
}
message SourceCodeFetchResMsg {
2018-05-19 04:47:40 -04:00
// If it's a non-http module, moduleName and filename will be the same.
// For http modules, moduleName is its resolved http URL, and filename
// is the location of the locally downloaded source code.
optional string moduleName = 1;
optional string filename = 2;
optional string source_code = 3;
optional string output_code = 4; // Non-empty only if cached.
}
message SourceCodeCacheMsg {
optional string filename = 1;
optional string source_code = 2;
optional string output_code = 3;
}
2018-05-17 21:02:06 -04:00
message ExitMsg { optional int32 code = 1; }
2018-05-18 11:49:28 -04:00
message TimerStartMsg {
optional int32 id = 1;
optional bool interval = 2;
optional int32 duration = 3; // In milliseconds.
2018-05-18 11:49:28 -04:00
}
message TimerReadyMsg {
optional int32 id = 1;
optional bool done = 2;
2018-05-18 11:49:28 -04:00
}
message TimerClearMsg { optional int32 id = 1; }