mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
Replace protobufs with flatbuffers
This commit is contained in:
parent
72cd03a1c5
commit
06a28998ea
25 changed files with 871 additions and 1875 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -6,11 +6,10 @@ node_modules
|
|||
|
||||
# git deps
|
||||
/third_party/v8/
|
||||
/third_party/tools/protoc_wrapper/
|
||||
/third_party/cpplint/
|
||||
/third_party/protobuf/
|
||||
/third_party/zlib/
|
||||
/third_party/rust_crates/libc/
|
||||
/third_party/flatbuffers/src/
|
||||
|
||||
# gclient files
|
||||
/third_party/.gclient_entries
|
||||
|
|
54
BUILD.gn
54
BUILD.gn
|
@ -1,6 +1,7 @@
|
|||
import("//third_party/protobuf/proto_library.gni")
|
||||
import("//third_party/v8/gni/v8.gni")
|
||||
import("//third_party/v8/snapshot_toolchain.gni")
|
||||
import("//third_party/flatbuffers/flatbuffer.gni")
|
||||
import("//third_party/flatbuffers/ts_flatbuffer.gni")
|
||||
import("deno.gni")
|
||||
import("rust.gni")
|
||||
|
||||
|
@ -30,9 +31,9 @@ executable("mock_main") {
|
|||
"src/mock_main.cc",
|
||||
]
|
||||
deps = [
|
||||
":flatbufferjs",
|
||||
":libdeno",
|
||||
":msg_proto",
|
||||
"//third_party/protobuf:protoc_lib",
|
||||
":msg_cpp",
|
||||
]
|
||||
configs += [ ":deno_config" ]
|
||||
}
|
||||
|
@ -89,26 +90,24 @@ executable("snapshot_creator") {
|
|||
configs += [ ":deno_config" ]
|
||||
}
|
||||
|
||||
proto_library("msg_proto") {
|
||||
flatbuffer("msg_cpp") {
|
||||
sources = [
|
||||
"src/msg.proto",
|
||||
"src/msg.fbs",
|
||||
]
|
||||
generate_python = false
|
||||
}
|
||||
|
||||
run_node("bundle") {
|
||||
out_dir = "$target_gen_dir/bundle/"
|
||||
sources = [
|
||||
"js/main.ts",
|
||||
"js/msg.pb.d.ts",
|
||||
"js/msg.pb.js",
|
||||
"js/msg_generated.ts",
|
||||
"js/package.json", # The `browserslist` field controls Babel behavior.
|
||||
]
|
||||
outputs = [
|
||||
out_dir + "main.js",
|
||||
]
|
||||
deps = [
|
||||
":protobufjs",
|
||||
":flatbufferjs",
|
||||
":run_tsc",
|
||||
]
|
||||
args = [
|
||||
|
@ -128,8 +127,7 @@ run_node("run_tsc") {
|
|||
tsconfig = "tsconfig.json"
|
||||
out_dir = "$target_gen_dir/tsc_dist/"
|
||||
sources = [
|
||||
"js/msg.pb.d.ts",
|
||||
"js/msg.pb.js",
|
||||
"js/msg_generated.ts",
|
||||
main,
|
||||
tsconfig,
|
||||
]
|
||||
|
@ -137,7 +135,7 @@ run_node("run_tsc") {
|
|||
out_dir + "/main.js",
|
||||
]
|
||||
deps = [
|
||||
":protobufjs",
|
||||
":flatbufferjs",
|
||||
]
|
||||
args = [
|
||||
"./node_modules/typescript/bin/tsc",
|
||||
|
@ -148,26 +146,38 @@ run_node("run_tsc") {
|
|||
]
|
||||
}
|
||||
|
||||
# Generates protobufjs code.
|
||||
# TODO(ry) Ideally protobufjs output files should be written into
|
||||
# Generates flatbuffer TypeScript code.
|
||||
# TODO(ry) Ideally flatc output files should be written into
|
||||
# target_gen_dir, but its difficult to get this working in a way that the
|
||||
# bundler can resolve their location. (The bundler does not support NODE_PATH?)
|
||||
# Therefore this hack: write the generated msg.pb.js and msg.pb.d.ts outputs
|
||||
# into the js/ folder, and we check them into the repo. Hopefully this hack can
|
||||
# be removed at some point. If msg.proto is changed, commit changes to the
|
||||
# Therefore this hack: write the msg_generated.ts output
|
||||
# into the js/ folder, and we check it into the repo. Hopefully this hack can
|
||||
# be removed at some point. If msg.fps is changed, commit changes to the
|
||||
# generated JS files. The stamp file is just to make gn work.
|
||||
action("protobufjs") {
|
||||
script = "js/pbjs_hack.py"
|
||||
action("flatbufferjs") {
|
||||
script = "js/flatbufferjs_hack.py"
|
||||
sources = [
|
||||
"src/msg.proto",
|
||||
"src/msg.fbs",
|
||||
]
|
||||
outputs = [
|
||||
"$target_gen_dir/pbjs_hack.stamp",
|
||||
"$target_gen_dir/flatbufferjs_hack.stamp",
|
||||
]
|
||||
|
||||
args = [
|
||||
rebase_path(sources[0], root_build_dir),
|
||||
rebase_path("$target_gen_dir/msg_generated.ts", root_build_dir),
|
||||
rebase_path("js/msg_generated.ts", root_build_dir),
|
||||
rebase_path(outputs[0], root_build_dir),
|
||||
]
|
||||
|
||||
deps = [
|
||||
":msg_ts",
|
||||
]
|
||||
}
|
||||
|
||||
ts_flatbuffer("msg_ts") {
|
||||
sources = [
|
||||
"src/msg.fbs",
|
||||
]
|
||||
}
|
||||
|
||||
# Generates $target_gen_dir/snapshot_deno.cc
|
||||
|
|
|
@ -17,14 +17,6 @@ solutions = [{
|
|||
'v8/test/test262/harness': None,
|
||||
'v8/tools/luci-go': None
|
||||
}
|
||||
}, {
|
||||
'url': 'https://github.com/ry/protobuf_chromium.git',
|
||||
'name': 'protobuf',
|
||||
}, {
|
||||
'url':
|
||||
'https://chromium.googlesource.com/chromium/src/tools/protoc_wrapper@9af82fef8cb9ca3ccc13e2ed958f58f2c21f449b',
|
||||
'name':
|
||||
'tools/protoc_wrapper'
|
||||
}, {
|
||||
'url':
|
||||
'https://chromium.googlesource.com/chromium/src/third_party/zlib@39b4a6260702da4c089eca57136abf40a39667e9',
|
||||
|
@ -35,6 +27,13 @@ solutions = [{
|
|||
'https://github.com/cpplint/cpplint.git@a33992f68f36fcaa6d0f531a25012a4c474d3542',
|
||||
'name':
|
||||
'cpplint'
|
||||
}, {
|
||||
# Tracking a bleeding-edge branch that is nearing rust support.
|
||||
# https://github.com/google/flatbuffers/pull/3894
|
||||
'url':
|
||||
'https://github.com/rw/flatbuffers.git@2018-02--rust',
|
||||
'name':
|
||||
'flatbuffers/src'
|
||||
}, {
|
||||
'url':
|
||||
'https://github.com/rust-lang/libc.git@8a85d662b90c14d458bc4ae9521a05564e20d7ae',
|
||||
|
|
33
js/flatbufferjs_hack.py
Executable file
33
js/flatbufferjs_hack.py
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env python
|
||||
"""
|
||||
gn can only run python scripts.
|
||||
|
||||
Generates flatbuffer TypeScript code.
|
||||
"""
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
import shutil
|
||||
|
||||
# TODO(ry) Ideally flatc output files should be written into target_gen_dir, but
|
||||
# its difficult to get this working in a way that parcel can resolve their
|
||||
# location. (Parcel does not support NODE_PATH.) Therefore this hack: write the
|
||||
# generated msg_generated.ts outputs into the js/ folder, and we check them into
|
||||
# the repo. Hopefully this hack can be removed at some point. If msg.fps is
|
||||
# changed, commit changes to the generated JS file.
|
||||
|
||||
src = sys.argv[1]
|
||||
dst = sys.argv[2]
|
||||
stamp_file = sys.argv[3]
|
||||
|
||||
shutil.copyfile(src, dst)
|
||||
|
||||
|
||||
def touch(fname):
|
||||
if os.path.exists(fname):
|
||||
os.utime(fname, None)
|
||||
else:
|
||||
open(fname, 'a').close()
|
||||
|
||||
|
||||
touch(stamp_file)
|
28
js/main.ts
28
js/main.ts
|
@ -1,7 +1,9 @@
|
|||
// tslint:disable-next-line:no-reference
|
||||
/// <reference path="deno.d.ts" />
|
||||
import * as ts from "typescript";
|
||||
import { deno as pb } from "./msg.pb";
|
||||
|
||||
import { flatbuffers } from "flatbuffers";
|
||||
import { deno as fbs } from "./msg_generated";
|
||||
|
||||
const globalEval = eval;
|
||||
const window = globalEval("this");
|
||||
|
@ -11,22 +13,20 @@ window["denoMain"] = () => {
|
|||
const res = deno.send("startDeno2", emptyArrayBuffer());
|
||||
// deno.print(`after`);
|
||||
const resUi8 = new Uint8Array(res);
|
||||
deno.print(`before`);
|
||||
const msg = pb.Msg.decode(resUi8);
|
||||
deno.print(`after`);
|
||||
const {
|
||||
startCwd: cwd,
|
||||
startArgv: argv,
|
||||
startDebugFlag: debugFlag,
|
||||
startMainJs: mainJs,
|
||||
startMainMap: mainMap
|
||||
} = msg;
|
||||
|
||||
const bb = new flatbuffers.ByteBuffer(resUi8);
|
||||
const msg = fbs.Msg.getRootAsMsg(bb);
|
||||
|
||||
// startDebugFlag: debugFlag,
|
||||
// startMainJs: mainJs,
|
||||
// startMainMap: mainMap
|
||||
const cwd = msg.startCwd();
|
||||
deno.print(`cwd: ${cwd}`);
|
||||
deno.print(`debugFlag: ${debugFlag}`);
|
||||
|
||||
for (let i = 0; i < argv.length; i++) {
|
||||
deno.print(`argv[${i}] ${argv[i]}`);
|
||||
const argv: string[] = [];
|
||||
for (let i = 0; i < msg.startArgvLength(); i++) {
|
||||
const arg = msg.startArgv(i);
|
||||
deno.print(`argv[${i}] ${arg}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
314
js/msg.pb.d.ts
vendored
314
js/msg.pb.d.ts
vendored
|
@ -1,314 +0,0 @@
|
|||
import * as $protobuf from "protobufjs";
|
||||
|
||||
/** Namespace deno. */
|
||||
export namespace deno {
|
||||
|
||||
/** Properties of a Msg. */
|
||||
interface IMsg {
|
||||
|
||||
/** Msg command */
|
||||
command?: (deno.Msg.Command|null);
|
||||
|
||||
/** Msg error */
|
||||
error?: (string|null);
|
||||
|
||||
/** Msg startCwd */
|
||||
startCwd?: (string|null);
|
||||
|
||||
/** Msg startArgv */
|
||||
startArgv?: (string[]|null);
|
||||
|
||||
/** Msg startDebugFlag */
|
||||
startDebugFlag?: (boolean|null);
|
||||
|
||||
/** Msg startMainJs */
|
||||
startMainJs?: (string|null);
|
||||
|
||||
/** Msg startMainMap */
|
||||
startMainMap?: (string|null);
|
||||
|
||||
/** Msg codeFetchModuleSpecifier */
|
||||
codeFetchModuleSpecifier?: (string|null);
|
||||
|
||||
/** Msg codeFetchContainingFile */
|
||||
codeFetchContainingFile?: (string|null);
|
||||
|
||||
/** Msg codeFetchResModuleName */
|
||||
codeFetchResModuleName?: (string|null);
|
||||
|
||||
/** Msg codeFetchResFilename */
|
||||
codeFetchResFilename?: (string|null);
|
||||
|
||||
/** Msg codeFetchResSourceCode */
|
||||
codeFetchResSourceCode?: (string|null);
|
||||
|
||||
/** Msg codeFetchResOutputCode */
|
||||
codeFetchResOutputCode?: (string|null);
|
||||
|
||||
/** Msg codeCacheFilename */
|
||||
codeCacheFilename?: (string|null);
|
||||
|
||||
/** Msg codeCacheSourceCode */
|
||||
codeCacheSourceCode?: (string|null);
|
||||
|
||||
/** Msg codeCacheOutputCode */
|
||||
codeCacheOutputCode?: (string|null);
|
||||
|
||||
/** Msg exitCode */
|
||||
exitCode?: (number|null);
|
||||
|
||||
/** Msg timerStartId */
|
||||
timerStartId?: (number|null);
|
||||
|
||||
/** Msg timerStartInterval */
|
||||
timerStartInterval?: (boolean|null);
|
||||
|
||||
/** Msg timerStartDelay */
|
||||
timerStartDelay?: (number|null);
|
||||
|
||||
/** Msg timerReadyId */
|
||||
timerReadyId?: (number|null);
|
||||
|
||||
/** Msg timerReadyDone */
|
||||
timerReadyDone?: (boolean|null);
|
||||
|
||||
/** Msg timerClearId */
|
||||
timerClearId?: (number|null);
|
||||
|
||||
/** Msg fetchReqId */
|
||||
fetchReqId?: (number|null);
|
||||
|
||||
/** Msg fetchReqUrl */
|
||||
fetchReqUrl?: (string|null);
|
||||
|
||||
/** Msg fetchResId */
|
||||
fetchResId?: (number|null);
|
||||
|
||||
/** Msg fetchResStatus */
|
||||
fetchResStatus?: (number|null);
|
||||
|
||||
/** Msg fetchResHeaderLine */
|
||||
fetchResHeaderLine?: (string[]|null);
|
||||
|
||||
/** Msg fetchResBody */
|
||||
fetchResBody?: (Uint8Array|null);
|
||||
|
||||
/** Msg readFileSyncFilename */
|
||||
readFileSyncFilename?: (string|null);
|
||||
|
||||
/** Msg readFileSyncData */
|
||||
readFileSyncData?: (Uint8Array|null);
|
||||
|
||||
/** Msg writeFileSyncFilename */
|
||||
writeFileSyncFilename?: (string|null);
|
||||
|
||||
/** Msg writeFileSyncData */
|
||||
writeFileSyncData?: (Uint8Array|null);
|
||||
|
||||
/** Msg writeFileSyncPerm */
|
||||
writeFileSyncPerm?: (number|null);
|
||||
}
|
||||
|
||||
/** Represents a Msg. */
|
||||
class Msg implements IMsg {
|
||||
|
||||
/**
|
||||
* Constructs a new Msg.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: deno.IMsg);
|
||||
|
||||
/** Msg command. */
|
||||
public command: deno.Msg.Command;
|
||||
|
||||
/** Msg error. */
|
||||
public error: string;
|
||||
|
||||
/** Msg startCwd. */
|
||||
public startCwd: string;
|
||||
|
||||
/** Msg startArgv. */
|
||||
public startArgv: string[];
|
||||
|
||||
/** Msg startDebugFlag. */
|
||||
public startDebugFlag: boolean;
|
||||
|
||||
/** Msg startMainJs. */
|
||||
public startMainJs: string;
|
||||
|
||||
/** Msg startMainMap. */
|
||||
public startMainMap: string;
|
||||
|
||||
/** Msg codeFetchModuleSpecifier. */
|
||||
public codeFetchModuleSpecifier: string;
|
||||
|
||||
/** Msg codeFetchContainingFile. */
|
||||
public codeFetchContainingFile: string;
|
||||
|
||||
/** Msg codeFetchResModuleName. */
|
||||
public codeFetchResModuleName: string;
|
||||
|
||||
/** Msg codeFetchResFilename. */
|
||||
public codeFetchResFilename: string;
|
||||
|
||||
/** Msg codeFetchResSourceCode. */
|
||||
public codeFetchResSourceCode: string;
|
||||
|
||||
/** Msg codeFetchResOutputCode. */
|
||||
public codeFetchResOutputCode: string;
|
||||
|
||||
/** Msg codeCacheFilename. */
|
||||
public codeCacheFilename: string;
|
||||
|
||||
/** Msg codeCacheSourceCode. */
|
||||
public codeCacheSourceCode: string;
|
||||
|
||||
/** Msg codeCacheOutputCode. */
|
||||
public codeCacheOutputCode: string;
|
||||
|
||||
/** Msg exitCode. */
|
||||
public exitCode: number;
|
||||
|
||||
/** Msg timerStartId. */
|
||||
public timerStartId: number;
|
||||
|
||||
/** Msg timerStartInterval. */
|
||||
public timerStartInterval: boolean;
|
||||
|
||||
/** Msg timerStartDelay. */
|
||||
public timerStartDelay: number;
|
||||
|
||||
/** Msg timerReadyId. */
|
||||
public timerReadyId: number;
|
||||
|
||||
/** Msg timerReadyDone. */
|
||||
public timerReadyDone: boolean;
|
||||
|
||||
/** Msg timerClearId. */
|
||||
public timerClearId: number;
|
||||
|
||||
/** Msg fetchReqId. */
|
||||
public fetchReqId: number;
|
||||
|
||||
/** Msg fetchReqUrl. */
|
||||
public fetchReqUrl: string;
|
||||
|
||||
/** Msg fetchResId. */
|
||||
public fetchResId: number;
|
||||
|
||||
/** Msg fetchResStatus. */
|
||||
public fetchResStatus: number;
|
||||
|
||||
/** Msg fetchResHeaderLine. */
|
||||
public fetchResHeaderLine: string[];
|
||||
|
||||
/** Msg fetchResBody. */
|
||||
public fetchResBody: Uint8Array;
|
||||
|
||||
/** Msg readFileSyncFilename. */
|
||||
public readFileSyncFilename: string;
|
||||
|
||||
/** Msg readFileSyncData. */
|
||||
public readFileSyncData: Uint8Array;
|
||||
|
||||
/** Msg writeFileSyncFilename. */
|
||||
public writeFileSyncFilename: string;
|
||||
|
||||
/** Msg writeFileSyncData. */
|
||||
public writeFileSyncData: Uint8Array;
|
||||
|
||||
/** Msg writeFileSyncPerm. */
|
||||
public writeFileSyncPerm: number;
|
||||
|
||||
/**
|
||||
* Creates a new Msg instance using the specified properties.
|
||||
* @param [properties] Properties to set
|
||||
* @returns Msg instance
|
||||
*/
|
||||
public static create(properties?: deno.IMsg): deno.Msg;
|
||||
|
||||
/**
|
||||
* Encodes the specified Msg message. Does not implicitly {@link deno.Msg.verify|verify} messages.
|
||||
* @param message Msg message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: deno.IMsg, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* 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 [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: deno.IMsg, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a Msg message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns Msg
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): deno.Msg;
|
||||
|
||||
/**
|
||||
* Decodes a Msg message from the specified reader or buffer, length delimited.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @returns Msg
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): deno.Msg;
|
||||
|
||||
/**
|
||||
* Verifies a Msg message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a Msg message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns 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.
|
||||
* @param message Msg
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: deno.Msg, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this Msg to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
|
||||
namespace Msg {
|
||||
|
||||
/** Command enum. */
|
||||
enum Command {
|
||||
ERROR = 0,
|
||||
START = 1,
|
||||
CODE_FETCH = 2,
|
||||
CODE_FETCH_RES = 3,
|
||||
CODE_CACHE = 4,
|
||||
EXIT = 5,
|
||||
TIMER_START = 6,
|
||||
TIMER_READY = 7,
|
||||
TIMER_CLEAR = 8,
|
||||
FETCH_REQ = 9,
|
||||
FETCH_RES = 10,
|
||||
READ_FILE_SYNC = 11,
|
||||
READ_FILE_SYNC_RES = 12,
|
||||
WRITE_FILE_SYNC = 13
|
||||
}
|
||||
}
|
||||
}
|
1100
js/msg.pb.js
1100
js/msg.pb.js
File diff suppressed because it is too large
Load diff
161
js/msg_generated.ts
Normal file
161
js/msg_generated.ts
Normal file
|
@ -0,0 +1,161 @@
|
|||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
/**
|
||||
* @enum
|
||||
*/
|
||||
export namespace deno{
|
||||
export enum Command{
|
||||
START= 0
|
||||
}};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
export namespace deno{
|
||||
export class Msg {
|
||||
/**
|
||||
* @type {flatbuffers.ByteBuffer}
|
||||
*/
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
bb_pos:number = 0;
|
||||
/**
|
||||
* @param {number} i
|
||||
* @param {flatbuffers.ByteBuffer} bb
|
||||
* @returns {Msg}
|
||||
*/
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Msg {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.ByteBuffer} bb
|
||||
* @param {Msg=} obj
|
||||
* @returns {Msg}
|
||||
*/
|
||||
static getRootAsMsg(bb:flatbuffers.ByteBuffer, obj?:Msg):Msg {
|
||||
return (obj || new Msg).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {deno.Command}
|
||||
*/
|
||||
command():deno.Command {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
return offset ? /** @type {deno.Command} */ (this.bb!.readInt8(this.bb_pos + offset)) : deno.Command.START;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {deno.Command} value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
mutate_command(value:deno.Command):boolean {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeInt8(this.bb_pos + offset, value);
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Encoding=} optionalEncoding
|
||||
* @returns {string|Uint8Array|null}
|
||||
*/
|
||||
startCwd():string|null
|
||||
startCwd(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
startCwd(optionalEncoding?:any):string|Uint8Array|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 6);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {number} index
|
||||
* @param {flatbuffers.Encoding=} optionalEncoding
|
||||
* @returns {string|Uint8Array}
|
||||
*/
|
||||
startArgv(index: number):string
|
||||
startArgv(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
|
||||
startArgv(index: number,optionalEncoding?:any):string|Uint8Array|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
startArgvLength():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
*/
|
||||
static startMsg(builder:flatbuffers.Builder) {
|
||||
builder.startObject(3);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {deno.Command} command
|
||||
*/
|
||||
static addCommand(builder:flatbuffers.Builder, command:deno.Command) {
|
||||
builder.addFieldInt8(0, command, deno.Command.START);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Offset} startCwdOffset
|
||||
*/
|
||||
static addStartCwd(builder:flatbuffers.Builder, startCwdOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(1, startCwdOffset, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Offset} startArgvOffset
|
||||
*/
|
||||
static addStartArgv(builder:flatbuffers.Builder, startArgvOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(2, startArgvOffset, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {Array.<flatbuffers.Offset>} data
|
||||
* @returns {flatbuffers.Offset}
|
||||
*/
|
||||
static createStartArgvVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
|
||||
builder.startVector(4, data.length, 4);
|
||||
for (var i = data.length - 1; i >= 0; i--) {
|
||||
builder.addOffset(data[i]);
|
||||
}
|
||||
return builder.endVector();
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} numElems
|
||||
*/
|
||||
static startStartArgvVector(builder:flatbuffers.Builder, numElems:number) {
|
||||
builder.startVector(4, numElems, 4);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @returns {flatbuffers.Offset}
|
||||
*/
|
||||
static endMsg(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
var offset = builder.endObject();
|
||||
return offset;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
|
@ -1,18 +1,14 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"@types/base64-js": "^1.2.5",
|
||||
"@types/flatbuffers": "^1.9.0",
|
||||
"@types/source-map-support": "^0.4.1",
|
||||
"espree": "^3.5.3",
|
||||
"jsdoc": "^3.5.5",
|
||||
"minimist": "^1.2.0",
|
||||
"flatbuffers": "^1.9.0",
|
||||
"parcel-bundler": "^1.8.1",
|
||||
"protobufjs": "^6.8.6",
|
||||
"tmp": "0.0.33",
|
||||
"tslint": "^5.10.0",
|
||||
"tslint-eslint-rules": "^5.3.1",
|
||||
"tslint-no-circular-imports": "^0.5.0",
|
||||
"typescript": "^2.9.1",
|
||||
"uglify-js": "^2.8.29"
|
||||
"typescript": "^2.9.1"
|
||||
},
|
||||
"browserslist": [
|
||||
"chrome 69"
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
"""
|
||||
gn can only run python scripts.
|
||||
|
||||
Generates protobufjs code.
|
||||
"""
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
# TODO(ry) Ideally protobufjs output files should be written into
|
||||
# target_gen_dir, but its difficult to get this working in a way that parcel can
|
||||
# resolve their location. (Parcel does not support NODE_PATH.) Therefore this
|
||||
# hack: write the generated msg.pb.js and msg.pb.d.ts outputs into the js/
|
||||
# folder, and we check them into the repo. Hopefully this hack can be removed at
|
||||
# some point. If msg.proto is changed, commit changes to the generated JS
|
||||
# files.
|
||||
|
||||
js_path = os.path.dirname(os.path.realpath(__file__))
|
||||
pbjs_path = os.path.join(js_path, "node_modules", "protobufjs", "bin")
|
||||
pbjs_bin = os.path.join(pbjs_path, "pbjs")
|
||||
pbts_bin = os.path.join(pbjs_path, "pbts")
|
||||
msg_pbjs_out = os.path.join(js_path, "msg.pb.js")
|
||||
msg_pbts_out = os.path.join(js_path, "msg.pb.d.ts")
|
||||
assert os.path.exists(pbjs_bin)
|
||||
assert os.path.exists(pbts_bin)
|
||||
|
||||
proto_in = sys.argv[1]
|
||||
stamp_file = sys.argv[2]
|
||||
|
||||
|
||||
def touch(fname):
|
||||
if os.path.exists(fname):
|
||||
os.utime(fname, None)
|
||||
else:
|
||||
open(fname, 'a').close()
|
||||
|
||||
|
||||
subprocess.check_call([
|
||||
"node", pbjs_bin, "--target=static-module", "--wrapper=commonjs",
|
||||
"--out=" + msg_pbjs_out, proto_in
|
||||
])
|
||||
assert os.path.exists(msg_pbjs_out)
|
||||
|
||||
subprocess.check_call(
|
||||
["node", pbts_bin, "--out=" + msg_pbts_out, msg_pbjs_out])
|
||||
assert os.path.exists(msg_pbts_out)
|
||||
|
||||
touch(stamp_file)
|
|
@ -1,4 +1,5 @@
|
|||
extern crate libc;
|
||||
|
||||
use libc::c_char;
|
||||
use libc::c_int;
|
||||
use libc::c_void;
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
#include "include/deno.h"
|
||||
#include "src/msg.pb.h"
|
||||
#include "src/msg_generated.h"
|
||||
#include "third_party/v8/src/base/logging.h"
|
||||
|
||||
static char** global_argv;
|
||||
|
@ -20,24 +21,29 @@ static int global_argc;
|
|||
void MessagesFromJS(Deno* d, const char* channel, deno_buf buf) {
|
||||
printf("MessagesFromJS %s\n", channel);
|
||||
|
||||
deno::Msg response;
|
||||
response.set_command(deno::Msg_Command_START);
|
||||
flatbuffers::FlatBufferBuilder builder;
|
||||
|
||||
char cwdbuf[1024];
|
||||
// TODO(piscisaureus): support unicode on windows.
|
||||
std::string cwd(getcwd(cwdbuf, sizeof(cwdbuf)));
|
||||
response.set_start_cwd(cwd);
|
||||
getcwd(cwdbuf, sizeof(cwdbuf));
|
||||
auto start_cwd = builder.CreateString(cwdbuf);
|
||||
|
||||
std::vector<flatbuffers::Offset<flatbuffers::String>> args;
|
||||
for (int i = 0; i < global_argc; ++i) {
|
||||
printf("arg %d %s\n", i, global_argv[i]);
|
||||
response.add_start_argv(global_argv[i]);
|
||||
args.push_back(builder.CreateString(global_argv[i]));
|
||||
}
|
||||
printf("response.start_argv_size %d \n", response.start_argv_size());
|
||||
auto start_argv = builder.CreateVector(args);
|
||||
|
||||
std::string output;
|
||||
CHECK(response.SerializeToString(&output));
|
||||
deno::MsgBuilder msg_builder(builder);
|
||||
msg_builder.add_command(deno::Command_START);
|
||||
msg_builder.add_start_cwd(start_cwd);
|
||||
msg_builder.add_start_argv(start_argv);
|
||||
|
||||
deno_buf bufout{output.c_str(), output.length()};
|
||||
auto response = msg_builder.Finish();
|
||||
builder.Finish(response);
|
||||
|
||||
deno_buf bufout{reinterpret_cast<const char*>(builder.GetBufferPointer()),
|
||||
builder.GetSize()};
|
||||
deno_set_response(d, bufout);
|
||||
}
|
||||
|
||||
|
|
12
src/msg.fbs
Normal file
12
src/msg.fbs
Normal file
|
@ -0,0 +1,12 @@
|
|||
namespace deno;
|
||||
|
||||
enum Command: byte {
|
||||
START = 0,
|
||||
}
|
||||
|
||||
table Msg {
|
||||
command: Command;
|
||||
start_cwd: string;
|
||||
start_argv: [string];
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
|
||||
// All rights reserved. MIT License.
|
||||
syntax = "proto3";
|
||||
package deno;
|
||||
|
||||
message Msg {
|
||||
enum Command {
|
||||
ERROR = 0;
|
||||
START = 1;
|
||||
CODE_FETCH = 2;
|
||||
CODE_FETCH_RES = 3;
|
||||
CODE_CACHE = 4;
|
||||
EXIT = 5;
|
||||
TIMER_START = 6;
|
||||
TIMER_READY = 7;
|
||||
TIMER_CLEAR = 8;
|
||||
FETCH_REQ = 9;
|
||||
FETCH_RES = 10;
|
||||
READ_FILE_SYNC = 11;
|
||||
READ_FILE_SYNC_RES = 12;
|
||||
WRITE_FILE_SYNC = 13;
|
||||
}
|
||||
Command command = 1;
|
||||
|
||||
// We avoid creating a message for each command (and use oneof or any types)
|
||||
// In order to reduce code in the size of the generated javascript
|
||||
// "msg.pb.js". It seems that each new message adds 20k and we want to
|
||||
// potentially add many hundreds of commands. Therefore we just prefix command
|
||||
// arguments by their name.
|
||||
|
||||
// ERROR
|
||||
string error = 2;
|
||||
|
||||
// START
|
||||
string start_cwd = 10;
|
||||
repeated string start_argv = 11;
|
||||
bool start_debug_flag = 12;
|
||||
string start_main_js = 13; // The contents of dist/main.js
|
||||
string start_main_map = 14; // The contents of dist/main.map
|
||||
|
||||
// CODE_FETCH
|
||||
string code_fetch_module_specifier = 20;
|
||||
string code_fetch_containing_file = 21;
|
||||
|
||||
// CODE_FETCH_RES
|
||||
// If it's a non-http module, moduleName and filename will be the same.
|
||||
// For http modules, moduleName is its resolved http URL, and filename
|
||||
// is the location of the locally downloaded source code.
|
||||
string code_fetch_res_module_name = 30;
|
||||
string code_fetch_res_filename = 31;
|
||||
string code_fetch_res_source_code = 32;
|
||||
string code_fetch_res_output_code = 33; // Non-empty only if cached.
|
||||
|
||||
// CODE_CACHE
|
||||
string code_cache_filename = 41;
|
||||
string code_cache_source_code = 42;
|
||||
string code_cache_output_code = 43;
|
||||
|
||||
// EXIT
|
||||
int32 exit_code = 50;
|
||||
|
||||
// TIMER_START
|
||||
int32 timer_start_id = 60;
|
||||
bool timer_start_interval = 61;
|
||||
int32 timer_start_delay = 62; // In milliseconds.
|
||||
|
||||
// TIMER_READY
|
||||
int32 timer_ready_id = 70;
|
||||
bool timer_ready_done = 71;
|
||||
|
||||
// TIMER_CLEAR
|
||||
int32 timer_clear_id = 80;
|
||||
|
||||
// FETCH_REQ
|
||||
int32 fetch_req_id = 90;
|
||||
string fetch_req_url = 91;
|
||||
// repeated string fetch_req_header_line = 91
|
||||
|
||||
// FETCH_RES
|
||||
int32 fetch_res_id = 100;
|
||||
int32 fetch_res_status = 101;
|
||||
repeated string fetch_res_header_line = 102;
|
||||
bytes fetch_res_body = 103;
|
||||
|
||||
// READ_FILE_SYNC
|
||||
string read_file_sync_filename = 110;
|
||||
|
||||
// READ_FILE_SYNC_RES
|
||||
bytes read_file_sync_data = 120;
|
||||
|
||||
// WRITE_FILE_SYNC
|
||||
string write_file_sync_filename = 130;
|
||||
bytes write_file_sync_data = 131;
|
||||
uint32 write_file_sync_perm = 132;
|
||||
// write_file_sync_perm specified by https://godoc.org/os#FileMode
|
||||
}
|
|
@ -35,7 +35,7 @@ v8::StartupData MakeSnapshot(const char* js_filename, const char* js_source) {
|
|||
}
|
||||
|
||||
auto snapshot_blob =
|
||||
creator->CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kKeep);
|
||||
creator->CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kClear);
|
||||
|
||||
return snapshot_blob;
|
||||
}
|
||||
|
|
120
third_party/flatbuffers/BUILD.gn
vendored
Normal file
120
third_party/flatbuffers/BUILD.gn
vendored
Normal file
|
@ -0,0 +1,120 @@
|
|||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# import("//testing/test.gni")
|
||||
import("//third_party/flatbuffers/flatbuffer.gni")
|
||||
|
||||
config("flatbuffers_config") {
|
||||
include_dirs = [ "src/include" ]
|
||||
|
||||
if (is_clang) {
|
||||
cflags = [
|
||||
"-Wno-exit-time-destructors",
|
||||
"-Wno-header-hygiene",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# The part of FlatBuffers that Chrome is interested in.
|
||||
source_set("flatbuffers") {
|
||||
sources = [
|
||||
"src/include/flatbuffers/flatbuffers.h",
|
||||
]
|
||||
|
||||
configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
|
||||
public_configs = [ ":flatbuffers_config" ]
|
||||
}
|
||||
|
||||
# The complete FlatBuffers library, as required to build the flatc compiler and
|
||||
# some of the tests.
|
||||
source_set("compiler_files") {
|
||||
include_dirs = [ "src/grpc" ]
|
||||
sources = [
|
||||
"src/grpc/src/compiler/config.h",
|
||||
"src/grpc/src/compiler/config.h",
|
||||
"src/grpc/src/compiler/cpp_generator.cc",
|
||||
"src/grpc/src/compiler/cpp_generator.h",
|
||||
"src/grpc/src/compiler/go_generator.cc",
|
||||
"src/grpc/src/compiler/go_generator.h",
|
||||
"src/grpc/src/compiler/java_generator.cc",
|
||||
"src/grpc/src/compiler/java_generator.h",
|
||||
"src/grpc/src/compiler/schema_interface.h",
|
||||
"src/include/flatbuffers/code_generators.h",
|
||||
"src/include/flatbuffers/flatc.h",
|
||||
"src/include/flatbuffers/flexbuffers.h",
|
||||
"src/include/flatbuffers/grpc.h",
|
||||
"src/include/flatbuffers/hash.h",
|
||||
"src/include/flatbuffers/idl.h",
|
||||
"src/include/flatbuffers/reflection.h",
|
||||
"src/include/flatbuffers/reflection_generated.h",
|
||||
"src/include/flatbuffers/util.h",
|
||||
"src/src/code_generators.cpp",
|
||||
"src/src/flatc.cpp",
|
||||
"src/src/idl_gen_cpp.cpp",
|
||||
"src/src/idl_gen_fbs.cpp",
|
||||
"src/src/idl_gen_general.cpp",
|
||||
"src/src/idl_gen_go.cpp",
|
||||
"src/src/idl_gen_grpc.cpp",
|
||||
"src/src/idl_gen_js.cpp",
|
||||
"src/src/idl_gen_json_schema.cpp",
|
||||
"src/src/idl_gen_php.cpp",
|
||||
"src/src/idl_gen_python.cpp",
|
||||
"src/src/idl_gen_rust.cpp",
|
||||
"src/src/idl_gen_text.cpp",
|
||||
"src/src/idl_parser.cpp",
|
||||
"src/src/reflection.cpp",
|
||||
"src/src/util.cpp",
|
||||
]
|
||||
configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
visibility = [ ":*" ]
|
||||
deps = [
|
||||
":flatbuffers",
|
||||
]
|
||||
}
|
||||
|
||||
executable("flatc") {
|
||||
sources = [
|
||||
"src/src/flatc_main.cpp",
|
||||
]
|
||||
deps = [
|
||||
":compiler_files",
|
||||
":flatbuffers",
|
||||
]
|
||||
}
|
||||
|
||||
# The following is just for testing.
|
||||
|
||||
flatbuffer("flatbuffers_samplebuffer") {
|
||||
testonly = true
|
||||
sources = [
|
||||
"src/tests/include_test/include_test1.fbs",
|
||||
"src/tests/include_test/sub/include_test2.fbs",
|
||||
"src/tests/monster_test.fbs",
|
||||
"src/tests/namespace_test/namespace_test1.fbs",
|
||||
"src/tests/namespace_test/namespace_test2.fbs",
|
||||
]
|
||||
flatc_include_dirs = [ "src/tests/include_test" ]
|
||||
}
|
||||
# test("flatbuffers_unittest") {
|
||||
# sources = [
|
||||
# "src/tests/test.cpp",
|
||||
# ]
|
||||
# deps = [
|
||||
# ":compiler_files",
|
||||
# ":flatbuffers",
|
||||
# ":flatbuffers_samplebuffer",
|
||||
# ]
|
||||
# data = [
|
||||
# "src/tests/",
|
||||
# ]
|
||||
#
|
||||
# if (is_win) {
|
||||
# # Suppress "object allocated on the heap may not be aligned 16".
|
||||
# cflags = [ "/wd4316" ]
|
||||
# }
|
||||
# defines = [ "FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE" ]
|
||||
# }
|
202
third_party/flatbuffers/LICENSE
vendored
Normal file
202
third_party/flatbuffers/LICENSE
vendored
Normal file
|
@ -0,0 +1,202 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2014 Google Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
3
third_party/flatbuffers/OWNERS
vendored
Normal file
3
third_party/flatbuffers/OWNERS
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
battre@chromium.org
|
||||
csharrison@chromium.org
|
||||
engedy@chromium.org
|
14
third_party/flatbuffers/README.chromium
vendored
Normal file
14
third_party/flatbuffers/README.chromium
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
Name: FlatBuffers
|
||||
Short Name: flatbuffers
|
||||
URL: https://github.com/google/flatbuffers
|
||||
Version: 01c50d57a67a52ee3cddd81b54d4647e9123a290
|
||||
Date: 2017-06-05
|
||||
License: Apache 2.0
|
||||
License File: LICENSE
|
||||
Security Critical: yes
|
||||
|
||||
Description:
|
||||
FlatBuffers is an efficient cross platform serialization library for games and
|
||||
other memory constrained apps. It allows you to directly access serialized data
|
||||
without unpacking/parsing it first, while still having great forwards/backwards
|
||||
compatibility.
|
148
third_party/flatbuffers/flatbuffer.gni
vendored
Normal file
148
third_party/flatbuffers/flatbuffer.gni
vendored
Normal file
|
@ -0,0 +1,148 @@
|
|||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Compile a flatbuffer.
|
||||
#
|
||||
# flatc_out_dir (optional)
|
||||
# Specifies the path suffix that output files are generated under. This
|
||||
# path will be appended to root_gen_dir.
|
||||
#
|
||||
# Targets that depend on the flatbuffer target will be able to include
|
||||
# the resulting FlatBuffers header with an include like:
|
||||
# #include "dir/for/my_flatbuffer/buffer_generated.h"
|
||||
# If undefined, this defaults to matchign the input directory for each
|
||||
# .fbs file (you should almost always use the default mode).
|
||||
#
|
||||
# flatc_include_dirs (optional)
|
||||
# Specifies the directories which FlatBuffers compiler uses to find
|
||||
# included .fbs files in. Almost always should be empty.
|
||||
#
|
||||
# The list always has an implicit first item corresponding to the root of
|
||||
# the source tree. This enables including .fbs files by absolute path.
|
||||
#
|
||||
# The compiler will try the directories in the order given, and if all
|
||||
# fail it will try to load relative to the directory of the schema file
|
||||
# being parsed.
|
||||
#
|
||||
# deps (optional)
|
||||
# Additional dependencies.
|
||||
#
|
||||
# Parameters for compiling the generated code:
|
||||
#
|
||||
# defines (optional)
|
||||
# Defines to supply to the source set that compiles the generated source
|
||||
# code.
|
||||
#
|
||||
# extra_configs (optional)
|
||||
# A list of config labels that will be appended to the configs applying
|
||||
# to the source set.
|
||||
#
|
||||
# testonly (optional)
|
||||
# Boolean to indicate whether the generated source sets should be labeled
|
||||
# as testonly.
|
||||
#
|
||||
# Example:
|
||||
# flatbuffer("mylib") {
|
||||
# sources = [
|
||||
# "foo.fbs",
|
||||
# ]
|
||||
# }
|
||||
|
||||
import("//build/compiled_action.gni")
|
||||
|
||||
template("flatbuffer") {
|
||||
assert(defined(invoker.sources), "Need sources for flatbuffers_library")
|
||||
|
||||
# Don't apply OS-specific sources filtering to the assignments later on.
|
||||
# Platform files should have gotten filtered out in the sources assignment
|
||||
# when this template was invoked. If they weren't, it was on purpose and
|
||||
# this template shouldn't re-apply the filter.
|
||||
set_sources_assignment_filter([])
|
||||
|
||||
action_name = "${target_name}_gen"
|
||||
source_set_name = target_name
|
||||
compiled_action_foreach(action_name) {
|
||||
visibility = [ ":$source_set_name" ]
|
||||
|
||||
tool = "//third_party/flatbuffers:flatc"
|
||||
|
||||
sources = invoker.sources
|
||||
deps = []
|
||||
|
||||
if (defined(invoker.flatc_out_dir)) {
|
||||
out_dir = "$root_gen_dir/" + invoker.flatc_out_dir
|
||||
} else {
|
||||
out_dir = "{{source_gen_dir}}"
|
||||
}
|
||||
|
||||
outputs = [
|
||||
"$out_dir/{{source_name_part}}_generated.h",
|
||||
]
|
||||
|
||||
args = [
|
||||
"-c",
|
||||
"--keep-prefix",
|
||||
"-o",
|
||||
"$out_dir",
|
||||
"-I",
|
||||
rebase_path("//", root_build_dir),
|
||||
]
|
||||
|
||||
if (defined(invoker.flatc_include_dirs)) {
|
||||
foreach(include_dir, invoker.flatc_include_dirs) {
|
||||
args += [
|
||||
"-I",
|
||||
rebase_path(include_dir, root_build_dir),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
args += [ "{{source}}" ]
|
||||
|
||||
# The deps may have steps that have to run before running flatc.
|
||||
if (defined(invoker.deps)) {
|
||||
deps += invoker.deps
|
||||
}
|
||||
}
|
||||
|
||||
source_set(target_name) {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"visibility",
|
||||
"defines",
|
||||
])
|
||||
|
||||
sources = get_target_outputs(":$action_name")
|
||||
|
||||
if (defined(invoker.extra_configs)) {
|
||||
configs += invoker.extra_configs
|
||||
}
|
||||
|
||||
if (defined(invoker.testonly)) {
|
||||
testonly = invoker.testonly
|
||||
}
|
||||
|
||||
public_configs = [ "//third_party/flatbuffers:flatbuffers_config" ]
|
||||
|
||||
public_deps = [
|
||||
# The generated headers reference headers within FlatBuffers, so
|
||||
# dependencies must be able to find those headers too.
|
||||
"//third_party/flatbuffers",
|
||||
]
|
||||
deps = [
|
||||
":$action_name",
|
||||
]
|
||||
|
||||
# This will link any libraries in the deps (the use of invoker.deps in the
|
||||
# action won't link it).
|
||||
if (defined(invoker.deps)) {
|
||||
deps += invoker.deps
|
||||
}
|
||||
|
||||
# Same for public_deps.
|
||||
if (defined(invoker.public_deps)) {
|
||||
public_deps += invoker.public_deps
|
||||
}
|
||||
}
|
||||
}
|
84
third_party/flatbuffers/ts_flatbuffer.gni
vendored
Normal file
84
third_party/flatbuffers/ts_flatbuffer.gni
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Compile a flatbuffer to typescript.
|
||||
#
|
||||
# flatc_include_dirs (optional)
|
||||
# Specifies the directories which FlatBuffers compiler uses to find
|
||||
# included .fbs files in. Almost always should be empty.
|
||||
#
|
||||
# The list always has an implicit first item corresponding to the root of
|
||||
# the source tree. This enables including .fbs files by absolute path.
|
||||
#
|
||||
# The compiler will try the directories in the order given, and if all
|
||||
# fail it will try to load relative to the directory of the schema file
|
||||
# being parsed.
|
||||
#
|
||||
# deps (optional)
|
||||
# Additional dependencies.
|
||||
#
|
||||
# Example:
|
||||
# ts_flatbuffer("foo_ts") {
|
||||
# sources = [
|
||||
# "foo.fbs",
|
||||
# ]
|
||||
# }
|
||||
|
||||
import("//build/compiled_action.gni")
|
||||
|
||||
template("ts_flatbuffer") {
|
||||
assert(defined(invoker.sources), "Need sources for flatbuffers_library")
|
||||
|
||||
# Don't apply OS-specific sources filtering to the assignments later on.
|
||||
# Platform files should have gotten filtered out in the sources assignment
|
||||
# when this template was invoked. If they weren't, it was on purpose and
|
||||
# this template shouldn't re-apply the filter.
|
||||
set_sources_assignment_filter([])
|
||||
|
||||
copy_name = target_name + "_copy"
|
||||
|
||||
copy(copy_name) {
|
||||
sources = [ "//third_party/flatbuffers/src/js/flatbuffers.js" ]
|
||||
outputs = [ "$target_gen_dir/flatbuffers.js" ]
|
||||
}
|
||||
|
||||
compiled_action_foreach(target_name) {
|
||||
tool = "//third_party/flatbuffers:flatc"
|
||||
|
||||
sources = invoker.sources
|
||||
deps = [ ":" + copy_name ]
|
||||
|
||||
out_dir = target_gen_dir
|
||||
|
||||
outputs = [
|
||||
"$out_dir/{{source_name_part}}_generated.ts",
|
||||
]
|
||||
|
||||
args = [
|
||||
"--ts",
|
||||
"--no-fb-import",
|
||||
"--gen-mutable",
|
||||
"-o",
|
||||
rebase_path(out_dir, root_build_dir),
|
||||
"-I",
|
||||
rebase_path("//", root_build_dir),
|
||||
]
|
||||
|
||||
if (defined(invoker.flatc_include_dirs)) {
|
||||
foreach(include_dir, invoker.flatc_include_dirs) {
|
||||
args += [
|
||||
"-I",
|
||||
rebase_path(include_dir, root_build_dir),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
args += [ "{{source}}" ]
|
||||
|
||||
# The deps may have steps that have to run before running flatc.
|
||||
if (defined(invoker.deps)) {
|
||||
deps += invoker.deps
|
||||
}
|
||||
}
|
||||
}
|
262
third_party/yarn.lock
vendored
262
third_party/yarn.lock
vendored
|
@ -2,65 +2,18 @@
|
|||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf"
|
||||
|
||||
"@protobufjs/base64@^1.1.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735"
|
||||
|
||||
"@protobufjs/codegen@^2.0.4":
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb"
|
||||
|
||||
"@protobufjs/eventemitter@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70"
|
||||
|
||||
"@protobufjs/fetch@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45"
|
||||
dependencies:
|
||||
"@protobufjs/aspromise" "^1.1.1"
|
||||
"@protobufjs/inquire" "^1.1.0"
|
||||
|
||||
"@protobufjs/float@^1.0.2":
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1"
|
||||
|
||||
"@protobufjs/inquire@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089"
|
||||
|
||||
"@protobufjs/path@^1.1.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d"
|
||||
|
||||
"@protobufjs/pool@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54"
|
||||
|
||||
"@protobufjs/utf8@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
|
||||
|
||||
"@types/base64-js@^1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/base64-js/-/base64-js-1.2.5.tgz#582b2476169a6cba460a214d476c744441d873d5"
|
||||
|
||||
"@types/long@^3.0.32":
|
||||
version "3.0.32"
|
||||
resolved "https://registry.yarnpkg.com/@types/long/-/long-3.0.32.tgz#f4e5af31e9e9b196d8e5fca8a5e2e20aa3d60b69"
|
||||
"@types/flatbuffers@^1.9.0":
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/flatbuffers/-/flatbuffers-1.9.0.tgz#4c5cf3a9ce6af36f4c17f8ae2bfe1084d0e8c2ea"
|
||||
|
||||
"@types/node@*":
|
||||
version "10.3.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.3.3.tgz#8798d9e39af2fa604f715ee6a6b19796528e46c3"
|
||||
|
||||
"@types/node@^8.9.4":
|
||||
version "8.10.19"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.19.tgz#66b5b6325c048cbf4512b7a88b0e79c2ee99d3d2"
|
||||
|
||||
"@types/source-map-support@^0.4.1":
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/source-map-support/-/source-map-support-0.4.1.tgz#ad77158e8c6695a16629ef82b9fb9dfe7c610ac0"
|
||||
|
@ -71,32 +24,10 @@ abbrev@1:
|
|||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||
|
||||
acorn-jsx@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
|
||||
dependencies:
|
||||
acorn "^3.0.4"
|
||||
|
||||
acorn@^3.0.4:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
|
||||
|
||||
acorn@^5.0.0:
|
||||
version "5.6.2"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.6.2.tgz#b1da1d7be2ac1b4a327fb9eab851702c5045b4e7"
|
||||
|
||||
acorn@^5.5.0:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8"
|
||||
|
||||
align-text@^0.1.1, align-text@^0.1.3:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
|
||||
dependencies:
|
||||
kind-of "^3.0.2"
|
||||
longest "^1.0.1"
|
||||
repeat-string "^1.5.2"
|
||||
|
||||
alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
|
||||
|
@ -682,10 +613,6 @@ babylon-walk@^1.0.2:
|
|||
babel-types "^6.15.0"
|
||||
lodash.clone "^4.5.0"
|
||||
|
||||
babylon@7.0.0-beta.19:
|
||||
version "7.0.0-beta.19"
|
||||
resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.19.tgz#e928c7e807e970e0536b078ab3e0c48f9e052503"
|
||||
|
||||
babylon@^6.17.4, babylon@^6.18.0:
|
||||
version "6.18.0"
|
||||
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
|
||||
|
@ -722,7 +649,7 @@ bindings@~1.2.1:
|
|||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
||||
|
||||
bluebird@^3.0.5, bluebird@~3.5.0:
|
||||
bluebird@^3.0.5:
|
||||
version "3.5.1"
|
||||
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
|
||||
|
||||
|
@ -877,10 +804,6 @@ cache-base@^1.0.1:
|
|||
union-value "^1.0.0"
|
||||
unset-value "^1.0.0"
|
||||
|
||||
camelcase@^1.0.2:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
|
||||
|
||||
caniuse-api@^1.5.2:
|
||||
version "1.6.1"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c"
|
||||
|
@ -898,19 +821,6 @@ caniuse-lite@^1.0.30000844:
|
|||
version "1.0.30000853"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000853.tgz#505249fc78d60e20ad47af3c13706d6f9fd209fd"
|
||||
|
||||
catharsis@~0.8.9:
|
||||
version "0.8.9"
|
||||
resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.8.9.tgz#98cc890ca652dd2ef0e70b37925310ff9e90fc8b"
|
||||
dependencies:
|
||||
underscore-contrib "~0.3.0"
|
||||
|
||||
center-align@^0.1.1:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
|
||||
dependencies:
|
||||
align-text "^0.1.3"
|
||||
lazy-cache "^1.0.3"
|
||||
|
||||
chalk@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
|
||||
|
@ -973,14 +883,6 @@ class-utils@^0.3.5:
|
|||
isobject "^3.0.0"
|
||||
static-extend "^0.1.1"
|
||||
|
||||
cliui@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
|
||||
dependencies:
|
||||
center-align "^0.1.1"
|
||||
right-align "^0.1.1"
|
||||
wordwrap "0.0.2"
|
||||
|
||||
clone@^1.0.2:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
|
||||
|
@ -1282,7 +1184,7 @@ debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.
|
|||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
decamelize@^1.0.0, decamelize@^1.1.2:
|
||||
decamelize@^1.1.2:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
|
||||
|
||||
|
@ -1485,7 +1387,7 @@ escape-html@~1.0.3:
|
|||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
||||
|
||||
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5, escape-string-regexp@~1.0.5:
|
||||
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
|
||||
|
@ -1511,13 +1413,6 @@ escodegen@~1.9.0:
|
|||
optionalDependencies:
|
||||
source-map "~0.6.1"
|
||||
|
||||
espree@^3.5.3:
|
||||
version "3.5.4"
|
||||
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
|
||||
dependencies:
|
||||
acorn "^5.5.0"
|
||||
acorn-jsx "^3.0.0"
|
||||
|
||||
esprima@^2.6.0:
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
|
||||
|
@ -1621,6 +1516,10 @@ fill-range@^4.0.0:
|
|||
repeat-string "^1.6.1"
|
||||
to-regex-range "^2.1.0"
|
||||
|
||||
flatbuffers@^1.9.0:
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/flatbuffers/-/flatbuffers-1.9.0.tgz#e1ef5267deaab4872c08dbca56a936d6dbc27ecd"
|
||||
|
||||
flatten@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
|
||||
|
@ -1707,7 +1606,7 @@ globals@^9.18.0:
|
|||
version "9.18.0"
|
||||
resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
|
||||
|
||||
graceful-fs@^4.1.2, graceful-fs@^4.1.9:
|
||||
graceful-fs@^4.1.2:
|
||||
version "4.1.11"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
|
||||
|
||||
|
@ -2104,29 +2003,6 @@ js-yaml@~3.7.0:
|
|||
argparse "^1.0.7"
|
||||
esprima "^2.6.0"
|
||||
|
||||
js2xmlparser@~3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-3.0.0.tgz#3fb60eaa089c5440f9319f51760ccd07e2499733"
|
||||
dependencies:
|
||||
xmlcreate "^1.0.1"
|
||||
|
||||
jsdoc@^3.5.5:
|
||||
version "3.5.5"
|
||||
resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-3.5.5.tgz#484521b126e81904d632ff83ec9aaa096708fa4d"
|
||||
dependencies:
|
||||
babylon "7.0.0-beta.19"
|
||||
bluebird "~3.5.0"
|
||||
catharsis "~0.8.9"
|
||||
escape-string-regexp "~1.0.5"
|
||||
js2xmlparser "~3.0.0"
|
||||
klaw "~2.0.0"
|
||||
marked "~0.3.6"
|
||||
mkdirp "~0.5.1"
|
||||
requizzle "~0.2.1"
|
||||
strip-json-comments "~2.0.1"
|
||||
taffydb "2.6.2"
|
||||
underscore "~1.8.3"
|
||||
|
||||
jsesc@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
|
||||
|
@ -2165,16 +2041,6 @@ kind-of@^6.0.0, kind-of@^6.0.2:
|
|||
version "6.0.2"
|
||||
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
|
||||
|
||||
klaw@~2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/klaw/-/klaw-2.0.0.tgz#59c128e0dc5ce410201151194eeb9cbf858650f6"
|
||||
dependencies:
|
||||
graceful-fs "^4.1.9"
|
||||
|
||||
lazy-cache@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
|
||||
|
||||
levn@~0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
|
||||
|
@ -2198,14 +2064,6 @@ lodash@^4.17.4:
|
|||
version "4.17.10"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
|
||||
|
||||
long@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
|
||||
|
||||
longest@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
|
||||
|
||||
loose-envify@^1.0.0:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
|
||||
|
@ -2234,10 +2092,6 @@ map-visit@^1.0.0:
|
|||
dependencies:
|
||||
object-visit "^1.0.0"
|
||||
|
||||
marked@~0.3.6:
|
||||
version "0.3.19"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790"
|
||||
|
||||
math-expression-evaluator@^1.2.14:
|
||||
version "1.2.17"
|
||||
resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
|
||||
|
@ -2571,7 +2425,7 @@ os-homedir@^1.0.0:
|
|||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
|
||||
|
||||
os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2:
|
||||
os-tmpdir@^1.0.0, os-tmpdir@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
|
||||
|
||||
|
@ -2970,24 +2824,6 @@ proto-list@~1.2.1:
|
|||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
|
||||
|
||||
protobufjs@^6.8.6:
|
||||
version "6.8.6"
|
||||
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.6.tgz#ce3cf4fff9625b62966c455fc4c15e4331a11ca2"
|
||||
dependencies:
|
||||
"@protobufjs/aspromise" "^1.1.2"
|
||||
"@protobufjs/base64" "^1.1.2"
|
||||
"@protobufjs/codegen" "^2.0.4"
|
||||
"@protobufjs/eventemitter" "^1.1.0"
|
||||
"@protobufjs/fetch" "^1.1.0"
|
||||
"@protobufjs/float" "^1.0.2"
|
||||
"@protobufjs/inquire" "^1.1.0"
|
||||
"@protobufjs/path" "^1.1.2"
|
||||
"@protobufjs/pool" "^1.1.0"
|
||||
"@protobufjs/utf8" "^1.1.0"
|
||||
"@types/long" "^3.0.32"
|
||||
"@types/node" "^8.9.4"
|
||||
long "^4.0.0"
|
||||
|
||||
pseudomap@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
|
||||
|
@ -3147,7 +2983,7 @@ repeat-element@^1.1.2:
|
|||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
|
||||
|
||||
repeat-string@^1.5.2, repeat-string@^1.6.1:
|
||||
repeat-string@^1.6.1:
|
||||
version "1.6.1"
|
||||
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
|
||||
|
||||
|
@ -3157,12 +2993,6 @@ repeating@^2.0.0:
|
|||
dependencies:
|
||||
is-finite "^1.0.0"
|
||||
|
||||
requizzle@~0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/requizzle/-/requizzle-0.2.1.tgz#6943c3530c4d9a7e46f1cddd51c158fc670cdbde"
|
||||
dependencies:
|
||||
underscore "~1.6.0"
|
||||
|
||||
resolve-url@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
|
||||
|
@ -3183,12 +3013,6 @@ ret@~0.1.10:
|
|||
version "0.1.15"
|
||||
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
||||
|
||||
right-align@^0.1.1:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
|
||||
dependencies:
|
||||
align-text "^0.1.1"
|
||||
|
||||
rimraf@^2.6.1:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
|
||||
|
@ -3388,7 +3212,7 @@ source-map@0.6.1, source-map@^0.6.1, source-map@~0.6.1:
|
|||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
|
||||
source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
|
||||
source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7:
|
||||
version "0.5.7"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
||||
|
||||
|
@ -3551,10 +3375,6 @@ svgo@^1.0.5:
|
|||
unquote "~1.1.1"
|
||||
util.promisify "~1.0.0"
|
||||
|
||||
taffydb@2.6.2:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.6.2.tgz#7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268"
|
||||
|
||||
tar@^4:
|
||||
version "4.4.4"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd"
|
||||
|
@ -3584,12 +3404,6 @@ tiny-inflate@^1.0.0:
|
|||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.2.tgz#93d9decffc8805bd57eae4310f0b745e9b6fb3a7"
|
||||
|
||||
tmp@0.0.33:
|
||||
version "0.0.33"
|
||||
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
|
||||
dependencies:
|
||||
os-tmpdir "~1.0.2"
|
||||
|
||||
to-arraybuffer@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
|
||||
|
@ -3706,33 +3520,6 @@ uglify-es@^3.2.1, uglify-es@^3.3.9:
|
|||
commander "~2.13.0"
|
||||
source-map "~0.6.1"
|
||||
|
||||
uglify-js@^2.8.29:
|
||||
version "2.8.29"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
|
||||
dependencies:
|
||||
source-map "~0.5.1"
|
||||
yargs "~3.10.0"
|
||||
optionalDependencies:
|
||||
uglify-to-browserify "~1.0.0"
|
||||
|
||||
uglify-to-browserify@~1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
|
||||
|
||||
underscore-contrib@~0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/underscore-contrib/-/underscore-contrib-0.3.0.tgz#665b66c24783f8fa2b18c9f8cbb0e2c7d48c26c7"
|
||||
dependencies:
|
||||
underscore "1.6.0"
|
||||
|
||||
underscore@1.6.0, underscore@~1.6.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8"
|
||||
|
||||
underscore@~1.8.3:
|
||||
version "1.8.3"
|
||||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
|
||||
|
||||
unicode-trie@^0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/unicode-trie/-/unicode-trie-0.3.1.tgz#d671dddd89101a08bac37b6a5161010602052085"
|
||||
|
@ -3846,14 +3633,6 @@ wide-align@^1.1.0:
|
|||
dependencies:
|
||||
string-width "^1.0.2 || 2"
|
||||
|
||||
window-size@0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
|
||||
|
||||
wordwrap@0.0.2:
|
||||
version "0.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
|
||||
|
||||
wordwrap@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
||||
|
@ -3868,10 +3647,6 @@ ws@^5.1.1:
|
|||
dependencies:
|
||||
async-limiter "~1.0.0"
|
||||
|
||||
xmlcreate@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/xmlcreate/-/xmlcreate-1.0.2.tgz#fa6bf762a60a413fb3dd8f4b03c5b269238d308f"
|
||||
|
||||
xtend@^4.0.0, xtend@~4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
|
||||
|
@ -3879,12 +3654,3 @@ xtend@^4.0.0, xtend@~4.0.1:
|
|||
yallist@^3.0.0, yallist@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9"
|
||||
|
||||
yargs@~3.10.0:
|
||||
version "3.10.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
|
||||
dependencies:
|
||||
camelcase "^1.0.2"
|
||||
cliui "^2.1.0"
|
||||
decamelize "^1.0.0"
|
||||
window-size "0.1.0"
|
||||
|
|
|
@ -15,7 +15,7 @@ prettier --write \
|
|||
js/mock_runtime.js \
|
||||
tsconfig.json
|
||||
# Do not format these.
|
||||
# js/msg.pb.js
|
||||
# js/msg.pb.d.ts
|
||||
# js/msg_generated.ts
|
||||
# js/flatbuffers.js
|
||||
|
||||
rustfmt --write-mode overwrite src/*.rs
|
||||
|
|
|
@ -8,4 +8,5 @@ cd `dirname "$0"`/..
|
|||
src/*.cc \
|
||||
src/*.h \
|
||||
src/include/*.h
|
||||
node ./js/node_modules/.bin/tslint -p .
|
||||
node third_party/node_modules/.bin/tslint -p . \
|
||||
--exclude js/msg_generated.ts
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../third_party/tools/protoc_wrapper
|
Loading…
Reference in a new issue