Archived
1
0

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:
Asher
2019-01-18 15:46:40 -06:00
committed by Kyle Carberry
parent 05899b5edf
commit 72bf4547d4
80 changed files with 5183 additions and 9697 deletions

View File

@ -1,6 +1,7 @@
syntax = "proto3";
import "command.proto";
import "node.proto";
import "vscode.proto";
message ClientMessage {
oneof msg {
@ -10,9 +11,14 @@ message ClientMessage {
WriteToSessionMessage write_to_session = 3;
CloseSessionInputMessage close_session_input = 4;
ResizeSessionTTYMessage resize_session_tty = 5;
NewConnectionMessage new_connection = 6;
ConnectionOutputMessage connection_output = 7;
ConnectionCloseMessage connection_close = 8;
// node.proto
NewEvalMessage new_eval = 6;
NewEvalMessage new_eval = 9;
SharedProcessInitMessage shared_process_init = 10;
}
}
@ -23,16 +29,20 @@ message ServerMessage {
SessionDoneMessage session_done = 2;
SessionOutputMessage session_output = 3;
IdentifySessionMessage identify_session = 4;
NewConnectionFailureMessage connection_failure = 5;
ConnectionOutputMessage connection_output = 6;
ConnectionCloseMessage connection_close = 7;
ConnectionEstablishedMessage connection_established = 8;
// node.proto
EvalFailedMessage eval_failed = 5;
EvalDoneMessage eval_done = 6;
EvalFailedMessage eval_failed = 9;
EvalDoneMessage eval_done = 10;
InitMessage init = 7;
WorkingInitMessage init = 11;
}
}
message InitMessage {
message WorkingInitMessage {
string home_directory = 1;
string tmp_directory = 2;
string data_directory = 3;
@ -43,4 +53,4 @@ message InitMessage {
Mac = 2;
}
OperatingSystem operating_system = 5;
}
}

View File

@ -4,6 +4,7 @@
import * as jspb from "google-protobuf";
import * as command_pb from "./command_pb";
import * as node_pb from "./node_pb";
import * as vscode_pb from "./vscode_pb";
export class ClientMessage extends jspb.Message {
hasNewSession(): boolean;
@ -31,11 +32,31 @@ export class ClientMessage extends jspb.Message {
getResizeSessionTty(): command_pb.ResizeSessionTTYMessage | undefined;
setResizeSessionTty(value?: command_pb.ResizeSessionTTYMessage): void;
hasNewConnection(): boolean;
clearNewConnection(): void;
getNewConnection(): command_pb.NewConnectionMessage | undefined;
setNewConnection(value?: command_pb.NewConnectionMessage): void;
hasConnectionOutput(): boolean;
clearConnectionOutput(): void;
getConnectionOutput(): command_pb.ConnectionOutputMessage | undefined;
setConnectionOutput(value?: command_pb.ConnectionOutputMessage): void;
hasConnectionClose(): boolean;
clearConnectionClose(): void;
getConnectionClose(): command_pb.ConnectionCloseMessage | undefined;
setConnectionClose(value?: command_pb.ConnectionCloseMessage): void;
hasNewEval(): boolean;
clearNewEval(): void;
getNewEval(): node_pb.NewEvalMessage | undefined;
setNewEval(value?: node_pb.NewEvalMessage): void;
hasSharedProcessInit(): boolean;
clearSharedProcessInit(): void;
getSharedProcessInit(): vscode_pb.SharedProcessInitMessage | undefined;
setSharedProcessInit(value?: vscode_pb.SharedProcessInitMessage): void;
getMsgCase(): ClientMessage.MsgCase;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ClientMessage.AsObject;
@ -54,7 +75,11 @@ export namespace ClientMessage {
writeToSession?: command_pb.WriteToSessionMessage.AsObject,
closeSessionInput?: command_pb.CloseSessionInputMessage.AsObject,
resizeSessionTty?: command_pb.ResizeSessionTTYMessage.AsObject,
newConnection?: command_pb.NewConnectionMessage.AsObject,
connectionOutput?: command_pb.ConnectionOutputMessage.AsObject,
connectionClose?: command_pb.ConnectionCloseMessage.AsObject,
newEval?: node_pb.NewEvalMessage.AsObject,
sharedProcessInit?: vscode_pb.SharedProcessInitMessage.AsObject,
}
export enum MsgCase {
@ -64,7 +89,11 @@ export namespace ClientMessage {
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,
}
}
@ -89,6 +118,26 @@ export class ServerMessage extends jspb.Message {
getIdentifySession(): command_pb.IdentifySessionMessage | undefined;
setIdentifySession(value?: command_pb.IdentifySessionMessage): void;
hasConnectionFailure(): boolean;
clearConnectionFailure(): void;
getConnectionFailure(): command_pb.NewConnectionFailureMessage | undefined;
setConnectionFailure(value?: command_pb.NewConnectionFailureMessage): void;
hasConnectionOutput(): boolean;
clearConnectionOutput(): void;
getConnectionOutput(): command_pb.ConnectionOutputMessage | undefined;
setConnectionOutput(value?: command_pb.ConnectionOutputMessage): void;
hasConnectionClose(): boolean;
clearConnectionClose(): void;
getConnectionClose(): command_pb.ConnectionCloseMessage | undefined;
setConnectionClose(value?: command_pb.ConnectionCloseMessage): void;
hasConnectionEstablished(): boolean;
clearConnectionEstablished(): void;
getConnectionEstablished(): command_pb.ConnectionEstablishedMessage | undefined;
setConnectionEstablished(value?: command_pb.ConnectionEstablishedMessage): void;
hasEvalFailed(): boolean;
clearEvalFailed(): void;
getEvalFailed(): node_pb.EvalFailedMessage | undefined;
@ -101,8 +150,8 @@ export class ServerMessage extends jspb.Message {
hasInit(): boolean;
clearInit(): void;
getInit(): InitMessage | undefined;
setInit(value?: InitMessage): void;
getInit(): WorkingInitMessage | undefined;
setInit(value?: WorkingInitMessage): void;
getMsgCase(): ServerMessage.MsgCase;
serializeBinary(): Uint8Array;
@ -121,9 +170,13 @@ export namespace ServerMessage {
sessionDone?: command_pb.SessionDoneMessage.AsObject,
sessionOutput?: command_pb.SessionOutputMessage.AsObject,
identifySession?: command_pb.IdentifySessionMessage.AsObject,
connectionFailure?: command_pb.NewConnectionFailureMessage.AsObject,
connectionOutput?: command_pb.ConnectionOutputMessage.AsObject,
connectionClose?: command_pb.ConnectionCloseMessage.AsObject,
connectionEstablished?: command_pb.ConnectionEstablishedMessage.AsObject,
evalFailed?: node_pb.EvalFailedMessage.AsObject,
evalDone?: node_pb.EvalDoneMessage.AsObject,
init?: InitMessage.AsObject,
init?: WorkingInitMessage.AsObject,
}
export enum MsgCase {
@ -132,13 +185,17 @@ export namespace ServerMessage {
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,
}
}
export class InitMessage extends jspb.Message {
export class WorkingInitMessage extends jspb.Message {
getHomeDirectory(): string;
setHomeDirectory(value: string): void;
@ -151,26 +208,26 @@ export class InitMessage extends jspb.Message {
getWorkingDirectory(): string;
setWorkingDirectory(value: string): void;
getOperatingSystem(): InitMessage.OperatingSystem;
setOperatingSystem(value: InitMessage.OperatingSystem): void;
getOperatingSystem(): WorkingInitMessage.OperatingSystem;
setOperatingSystem(value: WorkingInitMessage.OperatingSystem): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InitMessage.AsObject;
static toObject(includeInstance: boolean, msg: InitMessage): InitMessage.AsObject;
toObject(includeInstance?: boolean): WorkingInitMessage.AsObject;
static toObject(includeInstance: boolean, msg: WorkingInitMessage): WorkingInitMessage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: InitMessage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InitMessage;
static deserializeBinaryFromReader(message: InitMessage, reader: jspb.BinaryReader): InitMessage;
static serializeBinaryToWriter(message: WorkingInitMessage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): WorkingInitMessage;
static deserializeBinaryFromReader(message: WorkingInitMessage, reader: jspb.BinaryReader): WorkingInitMessage;
}
export namespace InitMessage {
export namespace WorkingInitMessage {
export type AsObject = {
homeDirectory: string,
tmpDirectory: string,
dataDirectory: string,
workingDirectory: string,
operatingSystem: InitMessage.OperatingSystem,
operatingSystem: WorkingInitMessage.OperatingSystem,
}
export enum OperatingSystem {

View File

@ -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

View File

@ -76,3 +76,32 @@ message TTYDimensions {
uint32 height = 1;
uint32 width = 2;
}
// Initializes a new connection to a port or path
message NewConnectionMessage {
uint64 id = 1;
uint64 port = 2;
string path = 3;
}
// Sent when a connection has successfully established
message ConnectionEstablishedMessage {
uint64 id = 1;
}
// Sent when a connection fails
message NewConnectionFailureMessage {
uint64 id = 1;
string message = 2;
}
// Sent for connection output
message ConnectionOutputMessage {
uint64 id = 1;
bytes data = 2;
}
// Sent to close a connection
message ConnectionCloseMessage {
uint64 id = 1;
}

View File

@ -286,3 +286,121 @@ export namespace TTYDimensions {
}
}
export class NewConnectionMessage extends jspb.Message {
getId(): number;
setId(value: number): void;
getPort(): number;
setPort(value: number): void;
getPath(): string;
setPath(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): NewConnectionMessage.AsObject;
static toObject(includeInstance: boolean, msg: NewConnectionMessage): NewConnectionMessage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: NewConnectionMessage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): NewConnectionMessage;
static deserializeBinaryFromReader(message: NewConnectionMessage, reader: jspb.BinaryReader): NewConnectionMessage;
}
export namespace NewConnectionMessage {
export type AsObject = {
id: number,
port: number,
path: string,
}
}
export class ConnectionEstablishedMessage extends jspb.Message {
getId(): number;
setId(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ConnectionEstablishedMessage.AsObject;
static toObject(includeInstance: boolean, msg: ConnectionEstablishedMessage): ConnectionEstablishedMessage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ConnectionEstablishedMessage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConnectionEstablishedMessage;
static deserializeBinaryFromReader(message: ConnectionEstablishedMessage, reader: jspb.BinaryReader): ConnectionEstablishedMessage;
}
export namespace ConnectionEstablishedMessage {
export type AsObject = {
id: number,
}
}
export class NewConnectionFailureMessage extends jspb.Message {
getId(): number;
setId(value: number): void;
getMessage(): string;
setMessage(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): NewConnectionFailureMessage.AsObject;
static toObject(includeInstance: boolean, msg: NewConnectionFailureMessage): NewConnectionFailureMessage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: NewConnectionFailureMessage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): NewConnectionFailureMessage;
static deserializeBinaryFromReader(message: NewConnectionFailureMessage, reader: jspb.BinaryReader): NewConnectionFailureMessage;
}
export namespace NewConnectionFailureMessage {
export type AsObject = {
id: number,
message: string,
}
}
export class ConnectionOutputMessage extends jspb.Message {
getId(): number;
setId(value: number): void;
getData(): Uint8Array | string;
getData_asU8(): Uint8Array;
getData_asB64(): string;
setData(value: Uint8Array | string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ConnectionOutputMessage.AsObject;
static toObject(includeInstance: boolean, msg: ConnectionOutputMessage): ConnectionOutputMessage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ConnectionOutputMessage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConnectionOutputMessage;
static deserializeBinaryFromReader(message: ConnectionOutputMessage, reader: jspb.BinaryReader): ConnectionOutputMessage;
}
export namespace ConnectionOutputMessage {
export type AsObject = {
id: number,
data: Uint8Array | string,
}
}
export class ConnectionCloseMessage extends jspb.Message {
getId(): number;
setId(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ConnectionCloseMessage.AsObject;
static toObject(includeInstance: boolean, msg: ConnectionCloseMessage): ConnectionCloseMessage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ConnectionCloseMessage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConnectionCloseMessage;
static deserializeBinaryFromReader(message: ConnectionCloseMessage, reader: jspb.BinaryReader): ConnectionCloseMessage;
}
export namespace ConnectionCloseMessage {
export type AsObject = {
id: number,
}
}

View File

@ -10,7 +10,12 @@ var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.CloseSessionInputMessage', null, global);
goog.exportSymbol('proto.ConnectionCloseMessage', null, global);
goog.exportSymbol('proto.ConnectionEstablishedMessage', null, global);
goog.exportSymbol('proto.ConnectionOutputMessage', null, global);
goog.exportSymbol('proto.IdentifySessionMessage', null, global);
goog.exportSymbol('proto.NewConnectionFailureMessage', null, global);
goog.exportSymbol('proto.NewConnectionMessage', null, global);
goog.exportSymbol('proto.NewSessionFailureMessage', null, global);
goog.exportSymbol('proto.NewSessionFailureMessage.Reason', null, global);
goog.exportSymbol('proto.NewSessionMessage', null, global);
@ -2155,4 +2160,931 @@ proto.TTYDimensions.prototype.setWidth = function(value) {
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.NewConnectionMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.NewConnectionMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.NewConnectionMessage.displayName = 'proto.NewConnectionMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.NewConnectionMessage.prototype.toObject = function(opt_includeInstance) {
return proto.NewConnectionMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.NewConnectionMessage} msg The msg instance to transform.
* @return {!Object}
*/
proto.NewConnectionMessage.toObject = function(includeInstance, msg) {
var f, obj = {
id: msg.getId(),
port: msg.getPort(),
path: msg.getPath()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.NewConnectionMessage}
*/
proto.NewConnectionMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.NewConnectionMessage;
return proto.NewConnectionMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.NewConnectionMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.NewConnectionMessage}
*/
proto.NewConnectionMessage.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setId(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setPort(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setPath(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.NewConnectionMessage} message
* @param {!jspb.BinaryWriter} writer
*/
proto.NewConnectionMessage.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.NewConnectionMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.NewConnectionMessage.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = this.getPort();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
f = this.getPath();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.NewConnectionMessage} The clone.
*/
proto.NewConnectionMessage.prototype.cloneMessage = function() {
return /** @type {!proto.NewConnectionMessage} */ (jspb.Message.cloneMessage(this));
};
/**
* optional uint64 id = 1;
* @return {number}
*/
proto.NewConnectionMessage.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
/** @param {number} value */
proto.NewConnectionMessage.prototype.setId = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional uint64 port = 2;
* @return {number}
*/
proto.NewConnectionMessage.prototype.getPort = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));
};
/** @param {number} value */
proto.NewConnectionMessage.prototype.setPort = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional string path = 3;
* @return {string}
*/
proto.NewConnectionMessage.prototype.getPath = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};
/** @param {string} value */
proto.NewConnectionMessage.prototype.setPath = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.ConnectionEstablishedMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ConnectionEstablishedMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.ConnectionEstablishedMessage.displayName = 'proto.ConnectionEstablishedMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.ConnectionEstablishedMessage.prototype.toObject = function(opt_includeInstance) {
return proto.ConnectionEstablishedMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.ConnectionEstablishedMessage} msg The msg instance to transform.
* @return {!Object}
*/
proto.ConnectionEstablishedMessage.toObject = function(includeInstance, msg) {
var f, obj = {
id: msg.getId()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.ConnectionEstablishedMessage}
*/
proto.ConnectionEstablishedMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ConnectionEstablishedMessage;
return proto.ConnectionEstablishedMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ConnectionEstablishedMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ConnectionEstablishedMessage}
*/
proto.ConnectionEstablishedMessage.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.ConnectionEstablishedMessage} message
* @param {!jspb.BinaryWriter} writer
*/
proto.ConnectionEstablishedMessage.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ConnectionEstablishedMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.ConnectionEstablishedMessage.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.ConnectionEstablishedMessage} The clone.
*/
proto.ConnectionEstablishedMessage.prototype.cloneMessage = function() {
return /** @type {!proto.ConnectionEstablishedMessage} */ (jspb.Message.cloneMessage(this));
};
/**
* optional uint64 id = 1;
* @return {number}
*/
proto.ConnectionEstablishedMessage.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
/** @param {number} value */
proto.ConnectionEstablishedMessage.prototype.setId = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.NewConnectionFailureMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.NewConnectionFailureMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.NewConnectionFailureMessage.displayName = 'proto.NewConnectionFailureMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.NewConnectionFailureMessage.prototype.toObject = function(opt_includeInstance) {
return proto.NewConnectionFailureMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.NewConnectionFailureMessage} msg The msg instance to transform.
* @return {!Object}
*/
proto.NewConnectionFailureMessage.toObject = function(includeInstance, msg) {
var f, obj = {
id: msg.getId(),
message: msg.getMessage()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.NewConnectionFailureMessage}
*/
proto.NewConnectionFailureMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.NewConnectionFailureMessage;
return proto.NewConnectionFailureMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.NewConnectionFailureMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.NewConnectionFailureMessage}
*/
proto.NewConnectionFailureMessage.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setMessage(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.NewConnectionFailureMessage} message
* @param {!jspb.BinaryWriter} writer
*/
proto.NewConnectionFailureMessage.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.NewConnectionFailureMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.NewConnectionFailureMessage.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = this.getMessage();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.NewConnectionFailureMessage} The clone.
*/
proto.NewConnectionFailureMessage.prototype.cloneMessage = function() {
return /** @type {!proto.NewConnectionFailureMessage} */ (jspb.Message.cloneMessage(this));
};
/**
* optional uint64 id = 1;
* @return {number}
*/
proto.NewConnectionFailureMessage.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
/** @param {number} value */
proto.NewConnectionFailureMessage.prototype.setId = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string message = 2;
* @return {string}
*/
proto.NewConnectionFailureMessage.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.NewConnectionFailureMessage.prototype.setMessage = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.ConnectionOutputMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ConnectionOutputMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.ConnectionOutputMessage.displayName = 'proto.ConnectionOutputMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.ConnectionOutputMessage.prototype.toObject = function(opt_includeInstance) {
return proto.ConnectionOutputMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.ConnectionOutputMessage} msg The msg instance to transform.
* @return {!Object}
*/
proto.ConnectionOutputMessage.toObject = function(includeInstance, msg) {
var f, obj = {
id: msg.getId(),
data: msg.getData_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.ConnectionOutputMessage}
*/
proto.ConnectionOutputMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ConnectionOutputMessage;
return proto.ConnectionOutputMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ConnectionOutputMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ConnectionOutputMessage}
*/
proto.ConnectionOutputMessage.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setId(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.ConnectionOutputMessage} message
* @param {!jspb.BinaryWriter} writer
*/
proto.ConnectionOutputMessage.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ConnectionOutputMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.ConnectionOutputMessage.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = this.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.ConnectionOutputMessage} The clone.
*/
proto.ConnectionOutputMessage.prototype.cloneMessage = function() {
return /** @type {!proto.ConnectionOutputMessage} */ (jspb.Message.cloneMessage(this));
};
/**
* optional uint64 id = 1;
* @return {number}
*/
proto.ConnectionOutputMessage.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
/** @param {number} value */
proto.ConnectionOutputMessage.prototype.setId = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional bytes data = 2;
* @return {!(string|Uint8Array)}
*/
proto.ConnectionOutputMessage.prototype.getData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/**
* optional bytes data = 2;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.ConnectionOutputMessage.prototype.getData_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getData()));
};
/**
* optional bytes data = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getData()`
* @return {!Uint8Array}
*/
proto.ConnectionOutputMessage.prototype.getData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getData()));
};
/** @param {!(string|Uint8Array)} value */
proto.ConnectionOutputMessage.prototype.setData = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.ConnectionCloseMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ConnectionCloseMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.ConnectionCloseMessage.displayName = 'proto.ConnectionCloseMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.ConnectionCloseMessage.prototype.toObject = function(opt_includeInstance) {
return proto.ConnectionCloseMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.ConnectionCloseMessage} msg The msg instance to transform.
* @return {!Object}
*/
proto.ConnectionCloseMessage.toObject = function(includeInstance, msg) {
var f, obj = {
id: msg.getId()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.ConnectionCloseMessage}
*/
proto.ConnectionCloseMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ConnectionCloseMessage;
return proto.ConnectionCloseMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ConnectionCloseMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ConnectionCloseMessage}
*/
proto.ConnectionCloseMessage.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.ConnectionCloseMessage} message
* @param {!jspb.BinaryWriter} writer
*/
proto.ConnectionCloseMessage.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ConnectionCloseMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.ConnectionCloseMessage.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.ConnectionCloseMessage} The clone.
*/
proto.ConnectionCloseMessage.prototype.cloneMessage = function() {
return /** @type {!proto.ConnectionCloseMessage} */ (jspb.Message.cloneMessage(this));
};
/**
* optional uint64 id = 1;
* @return {number}
*/
proto.ConnectionCloseMessage.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
/** @param {number} value */
proto.ConnectionCloseMessage.prototype.setId = function(value) {
jspb.Message.setField(this, 1, value);
};
goog.object.extend(exports, proto);

View File

@ -1,3 +1,4 @@
export * from "./client_pb";
export * from "./command_pb";
export * from "./node_pb";
export * from "./vscode_pb";

View File

@ -0,0 +1,9 @@
syntax = "proto3";
message SharedProcessInitMessage {
uint64 window_id = 1;
string log_directory = 2;
// Maps to `"vs/platform/log/common/log".LogLevel`
uint32 log_level = 3;
}

View File

@ -0,0 +1,33 @@
// package:
// file: vscode.proto
import * as jspb from "google-protobuf";
export class SharedProcessInitMessage extends jspb.Message {
getWindowId(): number;
setWindowId(value: number): void;
getLogDirectory(): string;
setLogDirectory(value: string): void;
getLogLevel(): number;
setLogLevel(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SharedProcessInitMessage.AsObject;
static toObject(includeInstance: boolean, msg: SharedProcessInitMessage): SharedProcessInitMessage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SharedProcessInitMessage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SharedProcessInitMessage;
static deserializeBinaryFromReader(message: SharedProcessInitMessage, reader: jspb.BinaryReader): SharedProcessInitMessage;
}
export namespace SharedProcessInitMessage {
export type AsObject = {
windowId: number,
logDirectory: string,
logLevel: number,
}
}

View File

@ -0,0 +1,226 @@
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.SharedProcessInitMessage', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.SharedProcessInitMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.SharedProcessInitMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.SharedProcessInitMessage.displayName = 'proto.SharedProcessInitMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.SharedProcessInitMessage.prototype.toObject = function(opt_includeInstance) {
return proto.SharedProcessInitMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.SharedProcessInitMessage} msg The msg instance to transform.
* @return {!Object}
*/
proto.SharedProcessInitMessage.toObject = function(includeInstance, msg) {
var f, obj = {
windowId: msg.getWindowId(),
logDirectory: msg.getLogDirectory(),
logLevel: msg.getLogLevel()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.SharedProcessInitMessage}
*/
proto.SharedProcessInitMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.SharedProcessInitMessage;
return proto.SharedProcessInitMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.SharedProcessInitMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.SharedProcessInitMessage}
*/
proto.SharedProcessInitMessage.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setWindowId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setLogDirectory(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint32());
msg.setLogLevel(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.SharedProcessInitMessage} message
* @param {!jspb.BinaryWriter} writer
*/
proto.SharedProcessInitMessage.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.SharedProcessInitMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.SharedProcessInitMessage.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getWindowId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = this.getLogDirectory();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getLogLevel();
if (f !== 0) {
writer.writeUint32(
3,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.SharedProcessInitMessage} The clone.
*/
proto.SharedProcessInitMessage.prototype.cloneMessage = function() {
return /** @type {!proto.SharedProcessInitMessage} */ (jspb.Message.cloneMessage(this));
};
/**
* optional uint64 window_id = 1;
* @return {number}
*/
proto.SharedProcessInitMessage.prototype.getWindowId = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
/** @param {number} value */
proto.SharedProcessInitMessage.prototype.setWindowId = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string log_directory = 2;
* @return {string}
*/
proto.SharedProcessInitMessage.prototype.getLogDirectory = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.SharedProcessInitMessage.prototype.setLogDirectory = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional uint32 log_level = 3;
* @return {number}
*/
proto.SharedProcessInitMessage.prototype.getLogLevel = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
};
/** @param {number} value */
proto.SharedProcessInitMessage.prototype.setLogLevel = function(value) {
jspb.Message.setField(this, 3, value);
};
goog.object.extend(exports, proto);