0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 12:16:11 -05:00

Change msg.proto package name.

This commit is contained in:
Ryan Dahl 2018-06-13 19:37:24 +02:00
parent 5c7ba22f22
commit 0888f2b2ae
9 changed files with 130 additions and 130 deletions

View file

@ -1,5 +1,5 @@
/// <reference path="deno.d.ts" /> /// <reference path="deno.d.ts" />
import { main as pb } from "./msg.pb"; import { deno as pb } from "./msg.pb";
import * as ts from "typescript"; import * as ts from "typescript";
const globalEval = eval; const globalEval = eval;

48
deno2/js/msg.pb.d.ts vendored
View file

@ -1,7 +1,7 @@
import * as $protobuf from "protobufjs"; import * as $protobuf from "protobufjs";
/** Namespace main. */ /** Namespace deno. */
export namespace main { export namespace deno {
/** Properties of a BaseMsg. */ /** Properties of a BaseMsg. */
interface IBaseMsg { interface IBaseMsg {
@ -20,7 +20,7 @@ export namespace main {
* Constructs a new BaseMsg. * Constructs a new BaseMsg.
* @param [properties] Properties to set * @param [properties] Properties to set
*/ */
constructor(properties?: main.IBaseMsg); constructor(properties?: deno.IBaseMsg);
/** BaseMsg channel. */ /** BaseMsg channel. */
public channel: string; public channel: string;
@ -33,23 +33,23 @@ export namespace main {
* @param [properties] Properties to set * @param [properties] Properties to set
* @returns BaseMsg instance * @returns BaseMsg instance
*/ */
public static create(properties?: main.IBaseMsg): main.BaseMsg; public static create(properties?: deno.IBaseMsg): deno.BaseMsg;
/** /**
* Encodes the specified BaseMsg message. Does not implicitly {@link main.BaseMsg.verify|verify} messages. * Encodes the specified BaseMsg message. Does not implicitly {@link deno.BaseMsg.verify|verify} messages.
* @param message BaseMsg message or plain object to encode * @param message BaseMsg message or plain object to encode
* @param [writer] Writer to encode to * @param [writer] Writer to encode to
* @returns Writer * @returns Writer
*/ */
public static encode(message: main.IBaseMsg, writer?: $protobuf.Writer): $protobuf.Writer; public static encode(message: deno.IBaseMsg, writer?: $protobuf.Writer): $protobuf.Writer;
/** /**
* Encodes the specified BaseMsg message, length delimited. Does not implicitly {@link main.BaseMsg.verify|verify} messages. * Encodes the specified BaseMsg message, length delimited. Does not implicitly {@link deno.BaseMsg.verify|verify} messages.
* @param message BaseMsg message or plain object to encode * @param message BaseMsg message or plain object to encode
* @param [writer] Writer to encode to * @param [writer] Writer to encode to
* @returns Writer * @returns Writer
*/ */
public static encodeDelimited(message: main.IBaseMsg, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: deno.IBaseMsg, writer?: $protobuf.Writer): $protobuf.Writer;
/** /**
* Decodes a BaseMsg message from the specified reader or buffer. * Decodes a BaseMsg message from the specified reader or buffer.
@ -59,7 +59,7 @@ export namespace main {
* @throws {Error} If the payload is not a reader or valid buffer * @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/ */
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): main.BaseMsg; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): deno.BaseMsg;
/** /**
* Decodes a BaseMsg message from the specified reader or buffer, length delimited. * Decodes a BaseMsg message from the specified reader or buffer, length delimited.
@ -68,7 +68,7 @@ export namespace main {
* @throws {Error} If the payload is not a reader or valid buffer * @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/ */
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): main.BaseMsg; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): deno.BaseMsg;
/** /**
* Verifies a BaseMsg message. * Verifies a BaseMsg message.
@ -82,7 +82,7 @@ export namespace main {
* @param object Plain object * @param object Plain object
* @returns BaseMsg * @returns BaseMsg
*/ */
public static fromObject(object: { [k: string]: any }): main.BaseMsg; public static fromObject(object: { [k: string]: any }): deno.BaseMsg;
/** /**
* Creates a plain object from a BaseMsg message. Also converts values to other types if specified. * Creates a plain object from a BaseMsg message. Also converts values to other types if specified.
@ -90,7 +90,7 @@ export namespace main {
* @param [options] Conversion options * @param [options] Conversion options
* @returns Plain object * @returns Plain object
*/ */
public static toObject(message: main.BaseMsg, options?: $protobuf.IConversionOptions): { [k: string]: any }; public static toObject(message: deno.BaseMsg, options?: $protobuf.IConversionOptions): { [k: string]: any };
/** /**
* Converts this BaseMsg to JSON. * Converts this BaseMsg to JSON.
@ -103,7 +103,7 @@ export namespace main {
interface IMsg { interface IMsg {
/** Msg command */ /** Msg command */
command?: (main.Msg.Command|null); command?: (deno.Msg.Command|null);
/** Msg error */ /** Msg error */
error?: (string|null); error?: (string|null);
@ -212,10 +212,10 @@ export namespace main {
* Constructs a new Msg. * Constructs a new Msg.
* @param [properties] Properties to set * @param [properties] Properties to set
*/ */
constructor(properties?: main.IMsg); constructor(properties?: deno.IMsg);
/** Msg command. */ /** Msg command. */
public command: main.Msg.Command; public command: deno.Msg.Command;
/** Msg error. */ /** Msg error. */
public error: string; public error: string;
@ -321,23 +321,23 @@ export namespace main {
* @param [properties] Properties to set * @param [properties] Properties to set
* @returns Msg instance * @returns Msg instance
*/ */
public static create(properties?: main.IMsg): main.Msg; public static create(properties?: deno.IMsg): deno.Msg;
/** /**
* Encodes the specified Msg message. Does not implicitly {@link main.Msg.verify|verify} messages. * Encodes the specified Msg message. Does not implicitly {@link deno.Msg.verify|verify} messages.
* @param message Msg message or plain object to encode * @param message Msg message or plain object to encode
* @param [writer] Writer to encode to * @param [writer] Writer to encode to
* @returns Writer * @returns Writer
*/ */
public static encode(message: main.IMsg, writer?: $protobuf.Writer): $protobuf.Writer; public static encode(message: deno.IMsg, writer?: $protobuf.Writer): $protobuf.Writer;
/** /**
* Encodes the specified Msg message, length delimited. Does not implicitly {@link main.Msg.verify|verify} messages. * Encodes the specified Msg message, length delimited. Does not implicitly {@link deno.Msg.verify|verify} messages.
* @param message Msg message or plain object to encode * @param message Msg message or plain object to encode
* @param [writer] Writer to encode to * @param [writer] Writer to encode to
* @returns Writer * @returns Writer
*/ */
public static encodeDelimited(message: main.IMsg, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: deno.IMsg, writer?: $protobuf.Writer): $protobuf.Writer;
/** /**
* Decodes a Msg message from the specified reader or buffer. * Decodes a Msg message from the specified reader or buffer.
@ -347,7 +347,7 @@ export namespace main {
* @throws {Error} If the payload is not a reader or valid buffer * @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/ */
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): main.Msg; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): deno.Msg;
/** /**
* Decodes a Msg message from the specified reader or buffer, length delimited. * Decodes a Msg message from the specified reader or buffer, length delimited.
@ -356,7 +356,7 @@ export namespace main {
* @throws {Error} If the payload is not a reader or valid buffer * @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/ */
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): main.Msg; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): deno.Msg;
/** /**
* Verifies a Msg message. * Verifies a Msg message.
@ -370,7 +370,7 @@ export namespace main {
* @param object Plain object * @param object Plain object
* @returns Msg * @returns Msg
*/ */
public static fromObject(object: { [k: string]: any }): main.Msg; public static fromObject(object: { [k: string]: any }): deno.Msg;
/** /**
* Creates a plain object from a Msg message. Also converts values to other types if specified. * Creates a plain object from a Msg message. Also converts values to other types if specified.
@ -378,7 +378,7 @@ export namespace main {
* @param [options] Conversion options * @param [options] Conversion options
* @returns Plain object * @returns Plain object
*/ */
public static toObject(message: main.Msg, options?: $protobuf.IConversionOptions): { [k: string]: any }; public static toObject(message: deno.Msg, options?: $protobuf.IConversionOptions): { [k: string]: any };
/** /**
* Converts this Msg to JSON. * Converts this Msg to JSON.

View file

@ -16,20 +16,20 @@
// Exported root namespace // Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
$root.main = (function() { $root.deno = (function() {
/** /**
* Namespace main. * Namespace deno.
* @exports main * @exports deno
* @namespace * @namespace
*/ */
var main = {}; var deno = {};
main.BaseMsg = (function() { deno.BaseMsg = (function() {
/** /**
* Properties of a BaseMsg. * Properties of a BaseMsg.
* @memberof main * @memberof deno
* @interface IBaseMsg * @interface IBaseMsg
* @property {string|null} [channel] BaseMsg channel * @property {string|null} [channel] BaseMsg channel
* @property {Uint8Array|null} [payload] BaseMsg payload * @property {Uint8Array|null} [payload] BaseMsg payload
@ -37,11 +37,11 @@
/** /**
* Constructs a new BaseMsg. * Constructs a new BaseMsg.
* @memberof main * @memberof deno
* @classdesc Represents a BaseMsg. * @classdesc Represents a BaseMsg.
* @implements IBaseMsg * @implements IBaseMsg
* @constructor * @constructor
* @param {main.IBaseMsg=} [properties] Properties to set * @param {deno.IBaseMsg=} [properties] Properties to set
*/ */
function BaseMsg(properties) { function BaseMsg(properties) {
if (properties) if (properties)
@ -53,7 +53,7 @@
/** /**
* BaseMsg channel. * BaseMsg channel.
* @member {string} channel * @member {string} channel
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @instance * @instance
*/ */
BaseMsg.prototype.channel = ""; BaseMsg.prototype.channel = "";
@ -61,7 +61,7 @@
/** /**
* BaseMsg payload. * BaseMsg payload.
* @member {Uint8Array} payload * @member {Uint8Array} payload
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @instance * @instance
*/ */
BaseMsg.prototype.payload = $util.newBuffer([]); BaseMsg.prototype.payload = $util.newBuffer([]);
@ -69,21 +69,21 @@
/** /**
* Creates a new BaseMsg instance using the specified properties. * Creates a new BaseMsg instance using the specified properties.
* @function create * @function create
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @static * @static
* @param {main.IBaseMsg=} [properties] Properties to set * @param {deno.IBaseMsg=} [properties] Properties to set
* @returns {main.BaseMsg} BaseMsg instance * @returns {deno.BaseMsg} BaseMsg instance
*/ */
BaseMsg.create = function create(properties) { BaseMsg.create = function create(properties) {
return new BaseMsg(properties); return new BaseMsg(properties);
}; };
/** /**
* Encodes the specified BaseMsg message. Does not implicitly {@link main.BaseMsg.verify|verify} messages. * Encodes the specified BaseMsg message. Does not implicitly {@link deno.BaseMsg.verify|verify} messages.
* @function encode * @function encode
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @static * @static
* @param {main.IBaseMsg} message BaseMsg message or plain object to encode * @param {deno.IBaseMsg} message BaseMsg message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to * @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer * @returns {$protobuf.Writer} Writer
*/ */
@ -98,11 +98,11 @@
}; };
/** /**
* Encodes the specified BaseMsg message, length delimited. Does not implicitly {@link main.BaseMsg.verify|verify} messages. * Encodes the specified BaseMsg message, length delimited. Does not implicitly {@link deno.BaseMsg.verify|verify} messages.
* @function encodeDelimited * @function encodeDelimited
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @static * @static
* @param {main.IBaseMsg} message BaseMsg message or plain object to encode * @param {deno.IBaseMsg} message BaseMsg message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to * @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer * @returns {$protobuf.Writer} Writer
*/ */
@ -113,18 +113,18 @@
/** /**
* Decodes a BaseMsg message from the specified reader or buffer. * Decodes a BaseMsg message from the specified reader or buffer.
* @function decode * @function decode
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @static * @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand * @param {number} [length] Message length if known beforehand
* @returns {main.BaseMsg} BaseMsg * @returns {deno.BaseMsg} BaseMsg
* @throws {Error} If the payload is not a reader or valid buffer * @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/ */
BaseMsg.decode = function decode(reader, length) { BaseMsg.decode = function decode(reader, length) {
if (!(reader instanceof $Reader)) if (!(reader instanceof $Reader))
reader = $Reader.create(reader); reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.main.BaseMsg(); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.deno.BaseMsg();
while (reader.pos < end) { while (reader.pos < end) {
var tag = reader.uint32(); var tag = reader.uint32();
switch (tag >>> 3) { switch (tag >>> 3) {
@ -145,10 +145,10 @@
/** /**
* Decodes a BaseMsg message from the specified reader or buffer, length delimited. * Decodes a BaseMsg message from the specified reader or buffer, length delimited.
* @function decodeDelimited * @function decodeDelimited
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @static * @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {main.BaseMsg} BaseMsg * @returns {deno.BaseMsg} BaseMsg
* @throws {Error} If the payload is not a reader or valid buffer * @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/ */
@ -161,7 +161,7 @@
/** /**
* Verifies a BaseMsg message. * Verifies a BaseMsg message.
* @function verify * @function verify
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @static * @static
* @param {Object.<string,*>} message Plain object to verify * @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not * @returns {string|null} `null` if valid, otherwise the reason why it is not
@ -181,15 +181,15 @@
/** /**
* Creates a BaseMsg message from a plain object. Also converts values to their respective internal types. * Creates a BaseMsg message from a plain object. Also converts values to their respective internal types.
* @function fromObject * @function fromObject
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @static * @static
* @param {Object.<string,*>} object Plain object * @param {Object.<string,*>} object Plain object
* @returns {main.BaseMsg} BaseMsg * @returns {deno.BaseMsg} BaseMsg
*/ */
BaseMsg.fromObject = function fromObject(object) { BaseMsg.fromObject = function fromObject(object) {
if (object instanceof $root.main.BaseMsg) if (object instanceof $root.deno.BaseMsg)
return object; return object;
var message = new $root.main.BaseMsg(); var message = new $root.deno.BaseMsg();
if (object.channel != null) if (object.channel != null)
message.channel = String(object.channel); message.channel = String(object.channel);
if (object.payload != null) if (object.payload != null)
@ -203,9 +203,9 @@
/** /**
* Creates a plain object from a BaseMsg message. Also converts values to other types if specified. * Creates a plain object from a BaseMsg message. Also converts values to other types if specified.
* @function toObject * @function toObject
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @static * @static
* @param {main.BaseMsg} message BaseMsg * @param {deno.BaseMsg} message BaseMsg
* @param {$protobuf.IConversionOptions} [options] Conversion options * @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object * @returns {Object.<string,*>} Plain object
*/ */
@ -227,7 +227,7 @@
/** /**
* Converts this BaseMsg to JSON. * Converts this BaseMsg to JSON.
* @function toJSON * @function toJSON
* @memberof main.BaseMsg * @memberof deno.BaseMsg
* @instance * @instance
* @returns {Object.<string,*>} JSON object * @returns {Object.<string,*>} JSON object
*/ */
@ -238,13 +238,13 @@
return BaseMsg; return BaseMsg;
})(); })();
main.Msg = (function() { deno.Msg = (function() {
/** /**
* Properties of a Msg. * Properties of a Msg.
* @memberof main * @memberof deno
* @interface IMsg * @interface IMsg
* @property {main.Msg.Command|null} [command] Msg command * @property {deno.Msg.Command|null} [command] Msg command
* @property {string|null} [error] Msg error * @property {string|null} [error] Msg error
* @property {string|null} [startCwd] Msg startCwd * @property {string|null} [startCwd] Msg startCwd
* @property {Array.<string>|null} [startArgv] Msg startArgv * @property {Array.<string>|null} [startArgv] Msg startArgv
@ -282,11 +282,11 @@
/** /**
* Constructs a new Msg. * Constructs a new Msg.
* @memberof main * @memberof deno
* @classdesc Represents a Msg. * @classdesc Represents a Msg.
* @implements IMsg * @implements IMsg
* @constructor * @constructor
* @param {main.IMsg=} [properties] Properties to set * @param {deno.IMsg=} [properties] Properties to set
*/ */
function Msg(properties) { function Msg(properties) {
this.startArgv = []; this.startArgv = [];
@ -299,8 +299,8 @@
/** /**
* Msg command. * Msg command.
* @member {main.Msg.Command} command * @member {deno.Msg.Command} command
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.command = 0; Msg.prototype.command = 0;
@ -308,7 +308,7 @@
/** /**
* Msg error. * Msg error.
* @member {string} error * @member {string} error
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.error = ""; Msg.prototype.error = "";
@ -316,7 +316,7 @@
/** /**
* Msg startCwd. * Msg startCwd.
* @member {string} startCwd * @member {string} startCwd
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.startCwd = ""; Msg.prototype.startCwd = "";
@ -324,7 +324,7 @@
/** /**
* Msg startArgv. * Msg startArgv.
* @member {Array.<string>} startArgv * @member {Array.<string>} startArgv
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.startArgv = $util.emptyArray; Msg.prototype.startArgv = $util.emptyArray;
@ -332,7 +332,7 @@
/** /**
* Msg startDebugFlag. * Msg startDebugFlag.
* @member {boolean} startDebugFlag * @member {boolean} startDebugFlag
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.startDebugFlag = false; Msg.prototype.startDebugFlag = false;
@ -340,7 +340,7 @@
/** /**
* Msg startMainJs. * Msg startMainJs.
* @member {string} startMainJs * @member {string} startMainJs
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.startMainJs = ""; Msg.prototype.startMainJs = "";
@ -348,7 +348,7 @@
/** /**
* Msg startMainMap. * Msg startMainMap.
* @member {string} startMainMap * @member {string} startMainMap
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.startMainMap = ""; Msg.prototype.startMainMap = "";
@ -356,7 +356,7 @@
/** /**
* Msg codeFetchModuleSpecifier. * Msg codeFetchModuleSpecifier.
* @member {string} codeFetchModuleSpecifier * @member {string} codeFetchModuleSpecifier
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.codeFetchModuleSpecifier = ""; Msg.prototype.codeFetchModuleSpecifier = "";
@ -364,7 +364,7 @@
/** /**
* Msg codeFetchContainingFile. * Msg codeFetchContainingFile.
* @member {string} codeFetchContainingFile * @member {string} codeFetchContainingFile
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.codeFetchContainingFile = ""; Msg.prototype.codeFetchContainingFile = "";
@ -372,7 +372,7 @@
/** /**
* Msg codeFetchResModuleName. * Msg codeFetchResModuleName.
* @member {string} codeFetchResModuleName * @member {string} codeFetchResModuleName
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.codeFetchResModuleName = ""; Msg.prototype.codeFetchResModuleName = "";
@ -380,7 +380,7 @@
/** /**
* Msg codeFetchResFilename. * Msg codeFetchResFilename.
* @member {string} codeFetchResFilename * @member {string} codeFetchResFilename
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.codeFetchResFilename = ""; Msg.prototype.codeFetchResFilename = "";
@ -388,7 +388,7 @@
/** /**
* Msg codeFetchResSourceCode. * Msg codeFetchResSourceCode.
* @member {string} codeFetchResSourceCode * @member {string} codeFetchResSourceCode
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.codeFetchResSourceCode = ""; Msg.prototype.codeFetchResSourceCode = "";
@ -396,7 +396,7 @@
/** /**
* Msg codeFetchResOutputCode. * Msg codeFetchResOutputCode.
* @member {string} codeFetchResOutputCode * @member {string} codeFetchResOutputCode
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.codeFetchResOutputCode = ""; Msg.prototype.codeFetchResOutputCode = "";
@ -404,7 +404,7 @@
/** /**
* Msg codeCacheFilename. * Msg codeCacheFilename.
* @member {string} codeCacheFilename * @member {string} codeCacheFilename
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.codeCacheFilename = ""; Msg.prototype.codeCacheFilename = "";
@ -412,7 +412,7 @@
/** /**
* Msg codeCacheSourceCode. * Msg codeCacheSourceCode.
* @member {string} codeCacheSourceCode * @member {string} codeCacheSourceCode
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.codeCacheSourceCode = ""; Msg.prototype.codeCacheSourceCode = "";
@ -420,7 +420,7 @@
/** /**
* Msg codeCacheOutputCode. * Msg codeCacheOutputCode.
* @member {string} codeCacheOutputCode * @member {string} codeCacheOutputCode
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.codeCacheOutputCode = ""; Msg.prototype.codeCacheOutputCode = "";
@ -428,7 +428,7 @@
/** /**
* Msg exitCode. * Msg exitCode.
* @member {number} exitCode * @member {number} exitCode
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.exitCode = 0; Msg.prototype.exitCode = 0;
@ -436,7 +436,7 @@
/** /**
* Msg timerStartId. * Msg timerStartId.
* @member {number} timerStartId * @member {number} timerStartId
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.timerStartId = 0; Msg.prototype.timerStartId = 0;
@ -444,7 +444,7 @@
/** /**
* Msg timerStartInterval. * Msg timerStartInterval.
* @member {boolean} timerStartInterval * @member {boolean} timerStartInterval
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.timerStartInterval = false; Msg.prototype.timerStartInterval = false;
@ -452,7 +452,7 @@
/** /**
* Msg timerStartDelay. * Msg timerStartDelay.
* @member {number} timerStartDelay * @member {number} timerStartDelay
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.timerStartDelay = 0; Msg.prototype.timerStartDelay = 0;
@ -460,7 +460,7 @@
/** /**
* Msg timerReadyId. * Msg timerReadyId.
* @member {number} timerReadyId * @member {number} timerReadyId
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.timerReadyId = 0; Msg.prototype.timerReadyId = 0;
@ -468,7 +468,7 @@
/** /**
* Msg timerReadyDone. * Msg timerReadyDone.
* @member {boolean} timerReadyDone * @member {boolean} timerReadyDone
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.timerReadyDone = false; Msg.prototype.timerReadyDone = false;
@ -476,7 +476,7 @@
/** /**
* Msg timerClearId. * Msg timerClearId.
* @member {number} timerClearId * @member {number} timerClearId
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.timerClearId = 0; Msg.prototype.timerClearId = 0;
@ -484,7 +484,7 @@
/** /**
* Msg fetchReqId. * Msg fetchReqId.
* @member {number} fetchReqId * @member {number} fetchReqId
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.fetchReqId = 0; Msg.prototype.fetchReqId = 0;
@ -492,7 +492,7 @@
/** /**
* Msg fetchReqUrl. * Msg fetchReqUrl.
* @member {string} fetchReqUrl * @member {string} fetchReqUrl
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.fetchReqUrl = ""; Msg.prototype.fetchReqUrl = "";
@ -500,7 +500,7 @@
/** /**
* Msg fetchResId. * Msg fetchResId.
* @member {number} fetchResId * @member {number} fetchResId
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.fetchResId = 0; Msg.prototype.fetchResId = 0;
@ -508,7 +508,7 @@
/** /**
* Msg fetchResStatus. * Msg fetchResStatus.
* @member {number} fetchResStatus * @member {number} fetchResStatus
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.fetchResStatus = 0; Msg.prototype.fetchResStatus = 0;
@ -516,7 +516,7 @@
/** /**
* Msg fetchResHeaderLine. * Msg fetchResHeaderLine.
* @member {Array.<string>} fetchResHeaderLine * @member {Array.<string>} fetchResHeaderLine
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.fetchResHeaderLine = $util.emptyArray; Msg.prototype.fetchResHeaderLine = $util.emptyArray;
@ -524,7 +524,7 @@
/** /**
* Msg fetchResBody. * Msg fetchResBody.
* @member {Uint8Array} fetchResBody * @member {Uint8Array} fetchResBody
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.fetchResBody = $util.newBuffer([]); Msg.prototype.fetchResBody = $util.newBuffer([]);
@ -532,7 +532,7 @@
/** /**
* Msg readFileSyncFilename. * Msg readFileSyncFilename.
* @member {string} readFileSyncFilename * @member {string} readFileSyncFilename
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.readFileSyncFilename = ""; Msg.prototype.readFileSyncFilename = "";
@ -540,7 +540,7 @@
/** /**
* Msg readFileSyncData. * Msg readFileSyncData.
* @member {Uint8Array} readFileSyncData * @member {Uint8Array} readFileSyncData
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.readFileSyncData = $util.newBuffer([]); Msg.prototype.readFileSyncData = $util.newBuffer([]);
@ -548,7 +548,7 @@
/** /**
* Msg writeFileSyncFilename. * Msg writeFileSyncFilename.
* @member {string} writeFileSyncFilename * @member {string} writeFileSyncFilename
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.writeFileSyncFilename = ""; Msg.prototype.writeFileSyncFilename = "";
@ -556,7 +556,7 @@
/** /**
* Msg writeFileSyncData. * Msg writeFileSyncData.
* @member {Uint8Array} writeFileSyncData * @member {Uint8Array} writeFileSyncData
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.writeFileSyncData = $util.newBuffer([]); Msg.prototype.writeFileSyncData = $util.newBuffer([]);
@ -564,7 +564,7 @@
/** /**
* Msg writeFileSyncPerm. * Msg writeFileSyncPerm.
* @member {number} writeFileSyncPerm * @member {number} writeFileSyncPerm
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
*/ */
Msg.prototype.writeFileSyncPerm = 0; Msg.prototype.writeFileSyncPerm = 0;
@ -572,21 +572,21 @@
/** /**
* Creates a new Msg instance using the specified properties. * Creates a new Msg instance using the specified properties.
* @function create * @function create
* @memberof main.Msg * @memberof deno.Msg
* @static * @static
* @param {main.IMsg=} [properties] Properties to set * @param {deno.IMsg=} [properties] Properties to set
* @returns {main.Msg} Msg instance * @returns {deno.Msg} Msg instance
*/ */
Msg.create = function create(properties) { Msg.create = function create(properties) {
return new Msg(properties); return new Msg(properties);
}; };
/** /**
* Encodes the specified Msg message. Does not implicitly {@link main.Msg.verify|verify} messages. * Encodes the specified Msg message. Does not implicitly {@link deno.Msg.verify|verify} messages.
* @function encode * @function encode
* @memberof main.Msg * @memberof deno.Msg
* @static * @static
* @param {main.IMsg} message Msg message or plain object to encode * @param {deno.IMsg} message Msg message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to * @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer * @returns {$protobuf.Writer} Writer
*/ */
@ -667,11 +667,11 @@
}; };
/** /**
* Encodes the specified Msg message, length delimited. Does not implicitly {@link main.Msg.verify|verify} messages. * Encodes the specified Msg message, length delimited. Does not implicitly {@link deno.Msg.verify|verify} messages.
* @function encodeDelimited * @function encodeDelimited
* @memberof main.Msg * @memberof deno.Msg
* @static * @static
* @param {main.IMsg} message Msg message or plain object to encode * @param {deno.IMsg} message Msg message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to * @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer * @returns {$protobuf.Writer} Writer
*/ */
@ -682,18 +682,18 @@
/** /**
* Decodes a Msg message from the specified reader or buffer. * Decodes a Msg message from the specified reader or buffer.
* @function decode * @function decode
* @memberof main.Msg * @memberof deno.Msg
* @static * @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand * @param {number} [length] Message length if known beforehand
* @returns {main.Msg} Msg * @returns {deno.Msg} Msg
* @throws {Error} If the payload is not a reader or valid buffer * @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/ */
Msg.decode = function decode(reader, length) { Msg.decode = function decode(reader, length) {
if (!(reader instanceof $Reader)) if (!(reader instanceof $Reader))
reader = $Reader.create(reader); reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.main.Msg(); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.deno.Msg();
while (reader.pos < end) { while (reader.pos < end) {
var tag = reader.uint32(); var tag = reader.uint32();
switch (tag >>> 3) { switch (tag >>> 3) {
@ -814,10 +814,10 @@
/** /**
* Decodes a Msg message from the specified reader or buffer, length delimited. * Decodes a Msg message from the specified reader or buffer, length delimited.
* @function decodeDelimited * @function decodeDelimited
* @memberof main.Msg * @memberof deno.Msg
* @static * @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {main.Msg} Msg * @returns {deno.Msg} Msg
* @throws {Error} If the payload is not a reader or valid buffer * @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/ */
@ -830,7 +830,7 @@
/** /**
* Verifies a Msg message. * Verifies a Msg message.
* @function verify * @function verify
* @memberof main.Msg * @memberof deno.Msg
* @static * @static
* @param {Object.<string,*>} message Plain object to verify * @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not * @returns {string|null} `null` if valid, otherwise the reason why it is not
@ -971,15 +971,15 @@
/** /**
* Creates a Msg message from a plain object. Also converts values to their respective internal types. * Creates a Msg message from a plain object. Also converts values to their respective internal types.
* @function fromObject * @function fromObject
* @memberof main.Msg * @memberof deno.Msg
* @static * @static
* @param {Object.<string,*>} object Plain object * @param {Object.<string,*>} object Plain object
* @returns {main.Msg} Msg * @returns {deno.Msg} Msg
*/ */
Msg.fromObject = function fromObject(object) { Msg.fromObject = function fromObject(object) {
if (object instanceof $root.main.Msg) if (object instanceof $root.deno.Msg)
return object; return object;
var message = new $root.main.Msg(); var message = new $root.deno.Msg();
switch (object.command) { switch (object.command) {
case "ERROR": case "ERROR":
case 0: case 0:
@ -1044,7 +1044,7 @@
message.startCwd = String(object.startCwd); message.startCwd = String(object.startCwd);
if (object.startArgv) { if (object.startArgv) {
if (!Array.isArray(object.startArgv)) if (!Array.isArray(object.startArgv))
throw TypeError(".main.Msg.startArgv: array expected"); throw TypeError(".deno.Msg.startArgv: array expected");
message.startArgv = []; message.startArgv = [];
for (var i = 0; i < object.startArgv.length; ++i) for (var i = 0; i < object.startArgv.length; ++i)
message.startArgv[i] = String(object.startArgv[i]); message.startArgv[i] = String(object.startArgv[i]);
@ -1097,7 +1097,7 @@
message.fetchResStatus = object.fetchResStatus | 0; message.fetchResStatus = object.fetchResStatus | 0;
if (object.fetchResHeaderLine) { if (object.fetchResHeaderLine) {
if (!Array.isArray(object.fetchResHeaderLine)) if (!Array.isArray(object.fetchResHeaderLine))
throw TypeError(".main.Msg.fetchResHeaderLine: array expected"); throw TypeError(".deno.Msg.fetchResHeaderLine: array expected");
message.fetchResHeaderLine = []; message.fetchResHeaderLine = [];
for (var i = 0; i < object.fetchResHeaderLine.length; ++i) for (var i = 0; i < object.fetchResHeaderLine.length; ++i)
message.fetchResHeaderLine[i] = String(object.fetchResHeaderLine[i]); message.fetchResHeaderLine[i] = String(object.fetchResHeaderLine[i]);
@ -1129,9 +1129,9 @@
/** /**
* Creates a plain object from a Msg message. Also converts values to other types if specified. * Creates a plain object from a Msg message. Also converts values to other types if specified.
* @function toObject * @function toObject
* @memberof main.Msg * @memberof deno.Msg
* @static * @static
* @param {main.Msg} message Msg * @param {deno.Msg} message Msg
* @param {$protobuf.IConversionOptions} [options] Conversion options * @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object * @returns {Object.<string,*>} Plain object
*/ */
@ -1178,7 +1178,7 @@
object.writeFileSyncPerm = 0; object.writeFileSyncPerm = 0;
} }
if (message.command != null && message.hasOwnProperty("command")) if (message.command != null && message.hasOwnProperty("command"))
object.command = options.enums === String ? $root.main.Msg.Command[message.command] : message.command; object.command = options.enums === String ? $root.deno.Msg.Command[message.command] : message.command;
if (message.error != null && message.hasOwnProperty("error")) if (message.error != null && message.hasOwnProperty("error"))
object.error = message.error; object.error = message.error;
if (message.startCwd != null && message.hasOwnProperty("startCwd")) if (message.startCwd != null && message.hasOwnProperty("startCwd"))
@ -1257,7 +1257,7 @@
/** /**
* Converts this Msg to JSON. * Converts this Msg to JSON.
* @function toJSON * @function toJSON
* @memberof main.Msg * @memberof deno.Msg
* @instance * @instance
* @returns {Object.<string,*>} JSON object * @returns {Object.<string,*>} JSON object
*/ */
@ -1267,7 +1267,7 @@
/** /**
* Command enum. * Command enum.
* @name main.Msg.Command * @name deno.Msg.Command
* @enum {string} * @enum {string}
* @property {number} ERROR=0 ERROR value * @property {number} ERROR=0 ERROR value
* @property {number} START=1 START value * @property {number} START=1 START value
@ -1306,7 +1306,7 @@
return Msg; return Msg;
})(); })();
return main; return deno;
})(); })();
return $root; return $root;

View file

@ -2,7 +2,7 @@
// All rights reserved. MIT License. // All rights reserved. MIT License.
import { typedArrayToArrayBuffer } from "./util"; import { typedArrayToArrayBuffer } from "./util";
import { _global } from "./globals"; import { _global } from "./globals";
import { main as pb } from "./msg.pb"; import { deno as pb } from "./msg.pb";
export type MessageCallback = (msg: Uint8Array) => void; export type MessageCallback = (msg: Uint8Array) => void;
//type MessageStructCallback = (msg: pb.IMsg) => void; //type MessageStructCallback = (msg: pb.IMsg) => void;

View file

@ -8,7 +8,7 @@ import {
typedArrayToArrayBuffer typedArrayToArrayBuffer
} from "./util"; } from "./util";
import { pubInternal, sub } from "./dispatch"; import { pubInternal, sub } from "./dispatch";
import { main as pb } from "./msg.pb"; import { deno as pb } from "./msg.pb";
export function initFetch() { export function initFetch() {
sub("fetch", (payload: Uint8Array) => { sub("fetch", (payload: Uint8Array) => {

View file

@ -4,7 +4,7 @@
import "babel-polyfill"; import "babel-polyfill";
import * as dispatch from "./dispatch"; import * as dispatch from "./dispatch";
import { main as pb } from "./msg.pb"; import { deno as pb } from "./msg.pb";
import * as runtime from "./runtime"; import * as runtime from "./runtime";
import * as util from "./util"; import * as util from "./util";

View file

@ -1,7 +1,7 @@
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org> // Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
// All rights reserved. MIT License. // All rights reserved. MIT License.
syntax = "proto3"; syntax = "proto3";
package main; package deno;
option go_package = "deno"; option go_package = "deno";
message BaseMsg { message BaseMsg {

2
os.ts
View file

@ -2,7 +2,7 @@
// All rights reserved. MIT License. // All rights reserved. MIT License.
import { ModuleInfo } from "./types"; import { ModuleInfo } from "./types";
import { pubInternal } from "./dispatch"; import { pubInternal } from "./dispatch";
import { main as pb } from "./msg.pb"; import { deno as pb } from "./msg.pb";
import { assert } from "./util"; import { assert } from "./util";
export function exit(exitCode = 0): void { export function exit(exitCode = 0): void {

View file

@ -1,6 +1,6 @@
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org> // Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
// All rights reserved. MIT License. // All rights reserved. MIT License.
import { main as pb } from "./msg.pb"; import { deno as pb } from "./msg.pb";
import { pubInternal, sub } from "./dispatch"; import { pubInternal, sub } from "./dispatch";
import { assert } from "./util"; import { assert } from "./util";