Getting the client to run (#12)
* Clean up workbench and integrate initialization data * Uncomment Electron fill * Run server & client together * Clean up Electron fill & patch * Bind fs methods This makes them usable with the promise form: `promisify(access)(...)`. * Add space between tag and title to browser logger * Add typescript dep to server and default __dirname for path * Serve web files from server * Adjust some dev options * Rework workbench a bit to use a class and catch unexpected errors * No mkdirs for now, fix util fill, use bash with exec * More fills, make general client abstract * More fills * Fix cp.exec * Fix require calls in fs fill being aliased * Create data and storage dir * Implement fs.watch Using exec for now. * Implement storage database fill * Fix os export and homedir * Add comment to use navigator.sendBeacon * Fix fs callbacks (some args are optional) * Make sure data directory exists when passing it back * Update patch * Target es5 * More fills * Add APIs required for bootstrap-fork to function (#15) * Add bootstrap-fork execution * Add createConnection * Bundle bootstrap-fork into cli * Remove .node directory created from spdlog * Fix npm start * Remove unnecessary comment * Add webpack-hot-middleware if CLI env is not set * Add restarting to shared process * Fix starting with yarn
This commit is contained in:
@@ -11,10 +11,11 @@ var global = Function('return this')();
|
||||
|
||||
var command_pb = require('./command_pb.js');
|
||||
var node_pb = require('./node_pb.js');
|
||||
var vscode_pb = require('./vscode_pb.js');
|
||||
goog.exportSymbol('proto.ClientMessage', null, global);
|
||||
goog.exportSymbol('proto.InitMessage', null, global);
|
||||
goog.exportSymbol('proto.InitMessage.OperatingSystem', null, global);
|
||||
goog.exportSymbol('proto.ServerMessage', null, global);
|
||||
goog.exportSymbol('proto.WorkingInitMessage', null, global);
|
||||
goog.exportSymbol('proto.WorkingInitMessage.OperatingSystem', null, global);
|
||||
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
@@ -41,7 +42,7 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @private {!Array<!Array<number>>}
|
||||
* @const
|
||||
*/
|
||||
proto.ClientMessage.oneofGroups_ = [[1,2,3,4,5,6]];
|
||||
proto.ClientMessage.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10]];
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
@@ -53,7 +54,11 @@ proto.ClientMessage.MsgCase = {
|
||||
WRITE_TO_SESSION: 3,
|
||||
CLOSE_SESSION_INPUT: 4,
|
||||
RESIZE_SESSION_TTY: 5,
|
||||
NEW_EVAL: 6
|
||||
NEW_CONNECTION: 6,
|
||||
CONNECTION_OUTPUT: 7,
|
||||
CONNECTION_CLOSE: 8,
|
||||
NEW_EVAL: 9,
|
||||
SHARED_PROCESS_INIT: 10
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -96,7 +101,11 @@ proto.ClientMessage.toObject = function(includeInstance, msg) {
|
||||
writeToSession: (f = msg.getWriteToSession()) && command_pb.WriteToSessionMessage.toObject(includeInstance, f),
|
||||
closeSessionInput: (f = msg.getCloseSessionInput()) && command_pb.CloseSessionInputMessage.toObject(includeInstance, f),
|
||||
resizeSessionTty: (f = msg.getResizeSessionTty()) && command_pb.ResizeSessionTTYMessage.toObject(includeInstance, f),
|
||||
newEval: (f = msg.getNewEval()) && node_pb.NewEvalMessage.toObject(includeInstance, f)
|
||||
newConnection: (f = msg.getNewConnection()) && command_pb.NewConnectionMessage.toObject(includeInstance, f),
|
||||
connectionOutput: (f = msg.getConnectionOutput()) && command_pb.ConnectionOutputMessage.toObject(includeInstance, f),
|
||||
connectionClose: (f = msg.getConnectionClose()) && command_pb.ConnectionCloseMessage.toObject(includeInstance, f),
|
||||
newEval: (f = msg.getNewEval()) && node_pb.NewEvalMessage.toObject(includeInstance, f),
|
||||
sharedProcessInit: (f = msg.getSharedProcessInit()) && vscode_pb.SharedProcessInitMessage.toObject(includeInstance, f)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -159,10 +168,30 @@ proto.ClientMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||
msg.setResizeSessionTty(value);
|
||||
break;
|
||||
case 6:
|
||||
var value = new command_pb.NewConnectionMessage;
|
||||
reader.readMessage(value,command_pb.NewConnectionMessage.deserializeBinaryFromReader);
|
||||
msg.setNewConnection(value);
|
||||
break;
|
||||
case 7:
|
||||
var value = new command_pb.ConnectionOutputMessage;
|
||||
reader.readMessage(value,command_pb.ConnectionOutputMessage.deserializeBinaryFromReader);
|
||||
msg.setConnectionOutput(value);
|
||||
break;
|
||||
case 8:
|
||||
var value = new command_pb.ConnectionCloseMessage;
|
||||
reader.readMessage(value,command_pb.ConnectionCloseMessage.deserializeBinaryFromReader);
|
||||
msg.setConnectionClose(value);
|
||||
break;
|
||||
case 9:
|
||||
var value = new node_pb.NewEvalMessage;
|
||||
reader.readMessage(value,node_pb.NewEvalMessage.deserializeBinaryFromReader);
|
||||
msg.setNewEval(value);
|
||||
break;
|
||||
case 10:
|
||||
var value = new vscode_pb.SharedProcessInitMessage;
|
||||
reader.readMessage(value,vscode_pb.SharedProcessInitMessage.deserializeBinaryFromReader);
|
||||
msg.setSharedProcessInit(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
@@ -241,14 +270,46 @@ proto.ClientMessage.prototype.serializeBinaryToWriter = function (writer) {
|
||||
command_pb.ResizeSessionTTYMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getNewEval();
|
||||
f = this.getNewConnection();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
6,
|
||||
f,
|
||||
command_pb.NewConnectionMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getConnectionOutput();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
7,
|
||||
f,
|
||||
command_pb.ConnectionOutputMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getConnectionClose();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
8,
|
||||
f,
|
||||
command_pb.ConnectionCloseMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getNewEval();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
9,
|
||||
f,
|
||||
node_pb.NewEvalMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getSharedProcessInit();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
10,
|
||||
f,
|
||||
vscode_pb.SharedProcessInitMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -412,18 +473,108 @@ proto.ClientMessage.prototype.hasResizeSessionTty = function() {
|
||||
|
||||
|
||||
/**
|
||||
* optional NewEvalMessage new_eval = 6;
|
||||
* optional NewConnectionMessage new_connection = 6;
|
||||
* @return {proto.NewConnectionMessage}
|
||||
*/
|
||||
proto.ClientMessage.prototype.getNewConnection = function() {
|
||||
return /** @type{proto.NewConnectionMessage} */ (
|
||||
jspb.Message.getWrapperField(this, command_pb.NewConnectionMessage, 6));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.NewConnectionMessage|undefined} value */
|
||||
proto.ClientMessage.prototype.setNewConnection = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 6, proto.ClientMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
proto.ClientMessage.prototype.clearNewConnection = function() {
|
||||
this.setNewConnection(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ClientMessage.prototype.hasNewConnection = function() {
|
||||
return jspb.Message.getField(this, 6) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional ConnectionOutputMessage connection_output = 7;
|
||||
* @return {proto.ConnectionOutputMessage}
|
||||
*/
|
||||
proto.ClientMessage.prototype.getConnectionOutput = function() {
|
||||
return /** @type{proto.ConnectionOutputMessage} */ (
|
||||
jspb.Message.getWrapperField(this, command_pb.ConnectionOutputMessage, 7));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.ConnectionOutputMessage|undefined} value */
|
||||
proto.ClientMessage.prototype.setConnectionOutput = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 7, proto.ClientMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
proto.ClientMessage.prototype.clearConnectionOutput = function() {
|
||||
this.setConnectionOutput(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ClientMessage.prototype.hasConnectionOutput = function() {
|
||||
return jspb.Message.getField(this, 7) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional ConnectionCloseMessage connection_close = 8;
|
||||
* @return {proto.ConnectionCloseMessage}
|
||||
*/
|
||||
proto.ClientMessage.prototype.getConnectionClose = function() {
|
||||
return /** @type{proto.ConnectionCloseMessage} */ (
|
||||
jspb.Message.getWrapperField(this, command_pb.ConnectionCloseMessage, 8));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.ConnectionCloseMessage|undefined} value */
|
||||
proto.ClientMessage.prototype.setConnectionClose = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 8, proto.ClientMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
proto.ClientMessage.prototype.clearConnectionClose = function() {
|
||||
this.setConnectionClose(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ClientMessage.prototype.hasConnectionClose = function() {
|
||||
return jspb.Message.getField(this, 8) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional NewEvalMessage new_eval = 9;
|
||||
* @return {proto.NewEvalMessage}
|
||||
*/
|
||||
proto.ClientMessage.prototype.getNewEval = function() {
|
||||
return /** @type{proto.NewEvalMessage} */ (
|
||||
jspb.Message.getWrapperField(this, node_pb.NewEvalMessage, 6));
|
||||
jspb.Message.getWrapperField(this, node_pb.NewEvalMessage, 9));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.NewEvalMessage|undefined} value */
|
||||
proto.ClientMessage.prototype.setNewEval = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 6, proto.ClientMessage.oneofGroups_[0], value);
|
||||
jspb.Message.setOneofWrapperField(this, 9, proto.ClientMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
@@ -437,7 +588,37 @@ proto.ClientMessage.prototype.clearNewEval = function() {
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ClientMessage.prototype.hasNewEval = function() {
|
||||
return jspb.Message.getField(this, 6) != null;
|
||||
return jspb.Message.getField(this, 9) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional SharedProcessInitMessage shared_process_init = 10;
|
||||
* @return {proto.SharedProcessInitMessage}
|
||||
*/
|
||||
proto.ClientMessage.prototype.getSharedProcessInit = function() {
|
||||
return /** @type{proto.SharedProcessInitMessage} */ (
|
||||
jspb.Message.getWrapperField(this, vscode_pb.SharedProcessInitMessage, 10));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.SharedProcessInitMessage|undefined} value */
|
||||
proto.ClientMessage.prototype.setSharedProcessInit = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 10, proto.ClientMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
proto.ClientMessage.prototype.clearSharedProcessInit = function() {
|
||||
this.setSharedProcessInit(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ClientMessage.prototype.hasSharedProcessInit = function() {
|
||||
return jspb.Message.getField(this, 10) != null;
|
||||
};
|
||||
|
||||
|
||||
@@ -467,7 +648,7 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @private {!Array<!Array<number>>}
|
||||
* @const
|
||||
*/
|
||||
proto.ServerMessage.oneofGroups_ = [[1,2,3,4,5,6,7]];
|
||||
proto.ServerMessage.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11]];
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
@@ -478,9 +659,13 @@ proto.ServerMessage.MsgCase = {
|
||||
SESSION_DONE: 2,
|
||||
SESSION_OUTPUT: 3,
|
||||
IDENTIFY_SESSION: 4,
|
||||
EVAL_FAILED: 5,
|
||||
EVAL_DONE: 6,
|
||||
INIT: 7
|
||||
CONNECTION_FAILURE: 5,
|
||||
CONNECTION_OUTPUT: 6,
|
||||
CONNECTION_CLOSE: 7,
|
||||
CONNECTION_ESTABLISHED: 8,
|
||||
EVAL_FAILED: 9,
|
||||
EVAL_DONE: 10,
|
||||
INIT: 11
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -522,9 +707,13 @@ proto.ServerMessage.toObject = function(includeInstance, msg) {
|
||||
sessionDone: (f = msg.getSessionDone()) && command_pb.SessionDoneMessage.toObject(includeInstance, f),
|
||||
sessionOutput: (f = msg.getSessionOutput()) && command_pb.SessionOutputMessage.toObject(includeInstance, f),
|
||||
identifySession: (f = msg.getIdentifySession()) && command_pb.IdentifySessionMessage.toObject(includeInstance, f),
|
||||
connectionFailure: (f = msg.getConnectionFailure()) && command_pb.NewConnectionFailureMessage.toObject(includeInstance, f),
|
||||
connectionOutput: (f = msg.getConnectionOutput()) && command_pb.ConnectionOutputMessage.toObject(includeInstance, f),
|
||||
connectionClose: (f = msg.getConnectionClose()) && command_pb.ConnectionCloseMessage.toObject(includeInstance, f),
|
||||
connectionEstablished: (f = msg.getConnectionEstablished()) && command_pb.ConnectionEstablishedMessage.toObject(includeInstance, f),
|
||||
evalFailed: (f = msg.getEvalFailed()) && node_pb.EvalFailedMessage.toObject(includeInstance, f),
|
||||
evalDone: (f = msg.getEvalDone()) && node_pb.EvalDoneMessage.toObject(includeInstance, f),
|
||||
init: (f = msg.getInit()) && proto.InitMessage.toObject(includeInstance, f)
|
||||
init: (f = msg.getInit()) && proto.WorkingInitMessage.toObject(includeInstance, f)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -582,18 +771,38 @@ proto.ServerMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||
msg.setIdentifySession(value);
|
||||
break;
|
||||
case 5:
|
||||
var value = new command_pb.NewConnectionFailureMessage;
|
||||
reader.readMessage(value,command_pb.NewConnectionFailureMessage.deserializeBinaryFromReader);
|
||||
msg.setConnectionFailure(value);
|
||||
break;
|
||||
case 6:
|
||||
var value = new command_pb.ConnectionOutputMessage;
|
||||
reader.readMessage(value,command_pb.ConnectionOutputMessage.deserializeBinaryFromReader);
|
||||
msg.setConnectionOutput(value);
|
||||
break;
|
||||
case 7:
|
||||
var value = new command_pb.ConnectionCloseMessage;
|
||||
reader.readMessage(value,command_pb.ConnectionCloseMessage.deserializeBinaryFromReader);
|
||||
msg.setConnectionClose(value);
|
||||
break;
|
||||
case 8:
|
||||
var value = new command_pb.ConnectionEstablishedMessage;
|
||||
reader.readMessage(value,command_pb.ConnectionEstablishedMessage.deserializeBinaryFromReader);
|
||||
msg.setConnectionEstablished(value);
|
||||
break;
|
||||
case 9:
|
||||
var value = new node_pb.EvalFailedMessage;
|
||||
reader.readMessage(value,node_pb.EvalFailedMessage.deserializeBinaryFromReader);
|
||||
msg.setEvalFailed(value);
|
||||
break;
|
||||
case 6:
|
||||
case 10:
|
||||
var value = new node_pb.EvalDoneMessage;
|
||||
reader.readMessage(value,node_pb.EvalDoneMessage.deserializeBinaryFromReader);
|
||||
msg.setEvalDone(value);
|
||||
break;
|
||||
case 7:
|
||||
var value = new proto.InitMessage;
|
||||
reader.readMessage(value,proto.InitMessage.deserializeBinaryFromReader);
|
||||
case 11:
|
||||
var value = new proto.WorkingInitMessage;
|
||||
reader.readMessage(value,proto.WorkingInitMessage.deserializeBinaryFromReader);
|
||||
msg.setInit(value);
|
||||
break;
|
||||
default:
|
||||
@@ -666,18 +875,50 @@ proto.ServerMessage.prototype.serializeBinaryToWriter = function (writer) {
|
||||
command_pb.IdentifySessionMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getEvalFailed();
|
||||
f = this.getConnectionFailure();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
5,
|
||||
f,
|
||||
command_pb.NewConnectionFailureMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getConnectionOutput();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
6,
|
||||
f,
|
||||
command_pb.ConnectionOutputMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getConnectionClose();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
7,
|
||||
f,
|
||||
command_pb.ConnectionCloseMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getConnectionEstablished();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
8,
|
||||
f,
|
||||
command_pb.ConnectionEstablishedMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getEvalFailed();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
9,
|
||||
f,
|
||||
node_pb.EvalFailedMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = this.getEvalDone();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
6,
|
||||
10,
|
||||
f,
|
||||
node_pb.EvalDoneMessage.serializeBinaryToWriter
|
||||
);
|
||||
@@ -685,9 +926,9 @@ proto.ServerMessage.prototype.serializeBinaryToWriter = function (writer) {
|
||||
f = this.getInit();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
7,
|
||||
11,
|
||||
f,
|
||||
proto.InitMessage.serializeBinaryToWriter
|
||||
proto.WorkingInitMessage.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -823,18 +1064,138 @@ proto.ServerMessage.prototype.hasIdentifySession = function() {
|
||||
|
||||
|
||||
/**
|
||||
* optional EvalFailedMessage eval_failed = 5;
|
||||
* optional NewConnectionFailureMessage connection_failure = 5;
|
||||
* @return {proto.NewConnectionFailureMessage}
|
||||
*/
|
||||
proto.ServerMessage.prototype.getConnectionFailure = function() {
|
||||
return /** @type{proto.NewConnectionFailureMessage} */ (
|
||||
jspb.Message.getWrapperField(this, command_pb.NewConnectionFailureMessage, 5));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.NewConnectionFailureMessage|undefined} value */
|
||||
proto.ServerMessage.prototype.setConnectionFailure = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 5, proto.ServerMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
proto.ServerMessage.prototype.clearConnectionFailure = function() {
|
||||
this.setConnectionFailure(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ServerMessage.prototype.hasConnectionFailure = function() {
|
||||
return jspb.Message.getField(this, 5) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional ConnectionOutputMessage connection_output = 6;
|
||||
* @return {proto.ConnectionOutputMessage}
|
||||
*/
|
||||
proto.ServerMessage.prototype.getConnectionOutput = function() {
|
||||
return /** @type{proto.ConnectionOutputMessage} */ (
|
||||
jspb.Message.getWrapperField(this, command_pb.ConnectionOutputMessage, 6));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.ConnectionOutputMessage|undefined} value */
|
||||
proto.ServerMessage.prototype.setConnectionOutput = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 6, proto.ServerMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
proto.ServerMessage.prototype.clearConnectionOutput = function() {
|
||||
this.setConnectionOutput(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ServerMessage.prototype.hasConnectionOutput = function() {
|
||||
return jspb.Message.getField(this, 6) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional ConnectionCloseMessage connection_close = 7;
|
||||
* @return {proto.ConnectionCloseMessage}
|
||||
*/
|
||||
proto.ServerMessage.prototype.getConnectionClose = function() {
|
||||
return /** @type{proto.ConnectionCloseMessage} */ (
|
||||
jspb.Message.getWrapperField(this, command_pb.ConnectionCloseMessage, 7));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.ConnectionCloseMessage|undefined} value */
|
||||
proto.ServerMessage.prototype.setConnectionClose = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 7, proto.ServerMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
proto.ServerMessage.prototype.clearConnectionClose = function() {
|
||||
this.setConnectionClose(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ServerMessage.prototype.hasConnectionClose = function() {
|
||||
return jspb.Message.getField(this, 7) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional ConnectionEstablishedMessage connection_established = 8;
|
||||
* @return {proto.ConnectionEstablishedMessage}
|
||||
*/
|
||||
proto.ServerMessage.prototype.getConnectionEstablished = function() {
|
||||
return /** @type{proto.ConnectionEstablishedMessage} */ (
|
||||
jspb.Message.getWrapperField(this, command_pb.ConnectionEstablishedMessage, 8));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.ConnectionEstablishedMessage|undefined} value */
|
||||
proto.ServerMessage.prototype.setConnectionEstablished = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 8, proto.ServerMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
proto.ServerMessage.prototype.clearConnectionEstablished = function() {
|
||||
this.setConnectionEstablished(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ServerMessage.prototype.hasConnectionEstablished = function() {
|
||||
return jspb.Message.getField(this, 8) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional EvalFailedMessage eval_failed = 9;
|
||||
* @return {proto.EvalFailedMessage}
|
||||
*/
|
||||
proto.ServerMessage.prototype.getEvalFailed = function() {
|
||||
return /** @type{proto.EvalFailedMessage} */ (
|
||||
jspb.Message.getWrapperField(this, node_pb.EvalFailedMessage, 5));
|
||||
jspb.Message.getWrapperField(this, node_pb.EvalFailedMessage, 9));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.EvalFailedMessage|undefined} value */
|
||||
proto.ServerMessage.prototype.setEvalFailed = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 5, proto.ServerMessage.oneofGroups_[0], value);
|
||||
jspb.Message.setOneofWrapperField(this, 9, proto.ServerMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
@@ -848,23 +1209,23 @@ proto.ServerMessage.prototype.clearEvalFailed = function() {
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ServerMessage.prototype.hasEvalFailed = function() {
|
||||
return jspb.Message.getField(this, 5) != null;
|
||||
return jspb.Message.getField(this, 9) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional EvalDoneMessage eval_done = 6;
|
||||
* optional EvalDoneMessage eval_done = 10;
|
||||
* @return {proto.EvalDoneMessage}
|
||||
*/
|
||||
proto.ServerMessage.prototype.getEvalDone = function() {
|
||||
return /** @type{proto.EvalDoneMessage} */ (
|
||||
jspb.Message.getWrapperField(this, node_pb.EvalDoneMessage, 6));
|
||||
jspb.Message.getWrapperField(this, node_pb.EvalDoneMessage, 10));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.EvalDoneMessage|undefined} value */
|
||||
proto.ServerMessage.prototype.setEvalDone = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 6, proto.ServerMessage.oneofGroups_[0], value);
|
||||
jspb.Message.setOneofWrapperField(this, 10, proto.ServerMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
@@ -878,23 +1239,23 @@ proto.ServerMessage.prototype.clearEvalDone = function() {
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ServerMessage.prototype.hasEvalDone = function() {
|
||||
return jspb.Message.getField(this, 6) != null;
|
||||
return jspb.Message.getField(this, 10) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional InitMessage init = 7;
|
||||
* @return {proto.InitMessage}
|
||||
* optional WorkingInitMessage init = 11;
|
||||
* @return {proto.WorkingInitMessage}
|
||||
*/
|
||||
proto.ServerMessage.prototype.getInit = function() {
|
||||
return /** @type{proto.InitMessage} */ (
|
||||
jspb.Message.getWrapperField(this, proto.InitMessage, 7));
|
||||
return /** @type{proto.WorkingInitMessage} */ (
|
||||
jspb.Message.getWrapperField(this, proto.WorkingInitMessage, 11));
|
||||
};
|
||||
|
||||
|
||||
/** @param {proto.InitMessage|undefined} value */
|
||||
/** @param {proto.WorkingInitMessage|undefined} value */
|
||||
proto.ServerMessage.prototype.setInit = function(value) {
|
||||
jspb.Message.setOneofWrapperField(this, 7, proto.ServerMessage.oneofGroups_[0], value);
|
||||
jspb.Message.setOneofWrapperField(this, 11, proto.ServerMessage.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
@@ -908,7 +1269,7 @@ proto.ServerMessage.prototype.clearInit = function() {
|
||||
* @return{!boolean}
|
||||
*/
|
||||
proto.ServerMessage.prototype.hasInit = function() {
|
||||
return jspb.Message.getField(this, 7) != null;
|
||||
return jspb.Message.getField(this, 11) != null;
|
||||
};
|
||||
|
||||
|
||||
@@ -923,12 +1284,12 @@ proto.ServerMessage.prototype.hasInit = function() {
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.InitMessage = function(opt_data) {
|
||||
proto.WorkingInitMessage = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.InitMessage, jspb.Message);
|
||||
goog.inherits(proto.WorkingInitMessage, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
proto.InitMessage.displayName = 'proto.InitMessage';
|
||||
proto.WorkingInitMessage.displayName = 'proto.WorkingInitMessage';
|
||||
}
|
||||
|
||||
|
||||
@@ -943,8 +1304,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
* for transitional soy proto support: http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.InitMessage.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.InitMessage.toObject(opt_includeInstance, this);
|
||||
proto.WorkingInitMessage.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.WorkingInitMessage.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
@@ -953,10 +1314,10 @@ proto.InitMessage.prototype.toObject = function(opt_includeInstance) {
|
||||
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
||||
* instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.InitMessage} msg The msg instance to transform.
|
||||
* @param {!proto.WorkingInitMessage} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.InitMessage.toObject = function(includeInstance, msg) {
|
||||
proto.WorkingInitMessage.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
homeDirectory: msg.getHomeDirectory(),
|
||||
tmpDirectory: msg.getTmpDirectory(),
|
||||
@@ -976,23 +1337,23 @@ proto.InitMessage.toObject = function(includeInstance, msg) {
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.InitMessage}
|
||||
* @return {!proto.WorkingInitMessage}
|
||||
*/
|
||||
proto.InitMessage.deserializeBinary = function(bytes) {
|
||||
proto.WorkingInitMessage.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.InitMessage;
|
||||
return proto.InitMessage.deserializeBinaryFromReader(msg, reader);
|
||||
var msg = new proto.WorkingInitMessage;
|
||||
return proto.WorkingInitMessage.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.InitMessage} msg The message object to deserialize into.
|
||||
* @param {!proto.WorkingInitMessage} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.InitMessage}
|
||||
* @return {!proto.WorkingInitMessage}
|
||||
*/
|
||||
proto.InitMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||
proto.WorkingInitMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
@@ -1016,7 +1377,7 @@ proto.InitMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||
msg.setWorkingDirectory(value);
|
||||
break;
|
||||
case 5:
|
||||
var value = /** @type {!proto.InitMessage.OperatingSystem} */ (reader.readEnum());
|
||||
var value = /** @type {!proto.WorkingInitMessage.OperatingSystem} */ (reader.readEnum());
|
||||
msg.setOperatingSystem(value);
|
||||
break;
|
||||
default:
|
||||
@@ -1031,10 +1392,10 @@ proto.InitMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||
/**
|
||||
* Class method variant: serializes the given message to binary data
|
||||
* (in protobuf wire format), writing to the given BinaryWriter.
|
||||
* @param {!proto.InitMessage} message
|
||||
* @param {!proto.WorkingInitMessage} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
*/
|
||||
proto.InitMessage.serializeBinaryToWriter = function(message, writer) {
|
||||
proto.WorkingInitMessage.serializeBinaryToWriter = function(message, writer) {
|
||||
message.serializeBinaryToWriter(writer);
|
||||
};
|
||||
|
||||
@@ -1043,7 +1404,7 @@ proto.InitMessage.serializeBinaryToWriter = function(message, writer) {
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.InitMessage.prototype.serializeBinary = function() {
|
||||
proto.WorkingInitMessage.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
this.serializeBinaryToWriter(writer);
|
||||
return writer.getResultBuffer();
|
||||
@@ -1055,7 +1416,7 @@ proto.InitMessage.prototype.serializeBinary = function() {
|
||||
* writing to the given BinaryWriter.
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
*/
|
||||
proto.InitMessage.prototype.serializeBinaryToWriter = function (writer) {
|
||||
proto.WorkingInitMessage.prototype.serializeBinaryToWriter = function (writer) {
|
||||
var f = undefined;
|
||||
f = this.getHomeDirectory();
|
||||
if (f.length > 0) {
|
||||
@@ -1097,10 +1458,10 @@ proto.InitMessage.prototype.serializeBinaryToWriter = function (writer) {
|
||||
|
||||
/**
|
||||
* Creates a deep clone of this proto. No data is shared with the original.
|
||||
* @return {!proto.InitMessage} The clone.
|
||||
* @return {!proto.WorkingInitMessage} The clone.
|
||||
*/
|
||||
proto.InitMessage.prototype.cloneMessage = function() {
|
||||
return /** @type {!proto.InitMessage} */ (jspb.Message.cloneMessage(this));
|
||||
proto.WorkingInitMessage.prototype.cloneMessage = function() {
|
||||
return /** @type {!proto.WorkingInitMessage} */ (jspb.Message.cloneMessage(this));
|
||||
};
|
||||
|
||||
|
||||
@@ -1108,13 +1469,13 @@ proto.InitMessage.prototype.cloneMessage = function() {
|
||||
* optional string home_directory = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.InitMessage.prototype.getHomeDirectory = function() {
|
||||
proto.WorkingInitMessage.prototype.getHomeDirectory = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/** @param {string} value */
|
||||
proto.InitMessage.prototype.setHomeDirectory = function(value) {
|
||||
proto.WorkingInitMessage.prototype.setHomeDirectory = function(value) {
|
||||
jspb.Message.setField(this, 1, value);
|
||||
};
|
||||
|
||||
@@ -1123,13 +1484,13 @@ proto.InitMessage.prototype.setHomeDirectory = function(value) {
|
||||
* optional string tmp_directory = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.InitMessage.prototype.getTmpDirectory = function() {
|
||||
proto.WorkingInitMessage.prototype.getTmpDirectory = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/** @param {string} value */
|
||||
proto.InitMessage.prototype.setTmpDirectory = function(value) {
|
||||
proto.WorkingInitMessage.prototype.setTmpDirectory = function(value) {
|
||||
jspb.Message.setField(this, 2, value);
|
||||
};
|
||||
|
||||
@@ -1138,13 +1499,13 @@ proto.InitMessage.prototype.setTmpDirectory = function(value) {
|
||||
* optional string data_directory = 3;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.InitMessage.prototype.getDataDirectory = function() {
|
||||
proto.WorkingInitMessage.prototype.getDataDirectory = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
|
||||
};
|
||||
|
||||
|
||||
/** @param {string} value */
|
||||
proto.InitMessage.prototype.setDataDirectory = function(value) {
|
||||
proto.WorkingInitMessage.prototype.setDataDirectory = function(value) {
|
||||
jspb.Message.setField(this, 3, value);
|
||||
};
|
||||
|
||||
@@ -1153,28 +1514,28 @@ proto.InitMessage.prototype.setDataDirectory = function(value) {
|
||||
* optional string working_directory = 4;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.InitMessage.prototype.getWorkingDirectory = function() {
|
||||
proto.WorkingInitMessage.prototype.getWorkingDirectory = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, ""));
|
||||
};
|
||||
|
||||
|
||||
/** @param {string} value */
|
||||
proto.InitMessage.prototype.setWorkingDirectory = function(value) {
|
||||
proto.WorkingInitMessage.prototype.setWorkingDirectory = function(value) {
|
||||
jspb.Message.setField(this, 4, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional OperatingSystem operating_system = 5;
|
||||
* @return {!proto.InitMessage.OperatingSystem}
|
||||
* @return {!proto.WorkingInitMessage.OperatingSystem}
|
||||
*/
|
||||
proto.InitMessage.prototype.getOperatingSystem = function() {
|
||||
return /** @type {!proto.InitMessage.OperatingSystem} */ (jspb.Message.getFieldProto3(this, 5, 0));
|
||||
proto.WorkingInitMessage.prototype.getOperatingSystem = function() {
|
||||
return /** @type {!proto.WorkingInitMessage.OperatingSystem} */ (jspb.Message.getFieldProto3(this, 5, 0));
|
||||
};
|
||||
|
||||
|
||||
/** @param {!proto.InitMessage.OperatingSystem} value */
|
||||
proto.InitMessage.prototype.setOperatingSystem = function(value) {
|
||||
/** @param {!proto.WorkingInitMessage.OperatingSystem} value */
|
||||
proto.WorkingInitMessage.prototype.setOperatingSystem = function(value) {
|
||||
jspb.Message.setField(this, 5, value);
|
||||
};
|
||||
|
||||
@@ -1182,7 +1543,7 @@ proto.InitMessage.prototype.setOperatingSystem = function(value) {
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
proto.InitMessage.OperatingSystem = {
|
||||
proto.WorkingInitMessage.OperatingSystem = {
|
||||
WINDOWS: 0,
|
||||
LINUX: 1,
|
||||
MAC: 2
|
||||
|
||||
Reference in New Issue
Block a user