mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 14:15:17 +00:00
[TS/JS] New gen TS code gen (#6302)
* TS/ES6 modules spike iteration 1 * Initial modularized dasherized output * Remove obsoleted parts and namespace wrapping * Use _flatbuffers_ prefix * First part of imports logic * Second part of imports logic * Fix TS/JS code removal mixup * Alias imported symbols if same name from different namespaces and some fixes * Use star import for bare imports * Fix messed up string concat * var to const and remove not needed semi * Remove some cases of ns prefixing * Add missing space * Cleanups * Completed initial import tracking logic * Compilable output * Adjust TypeScriptTest and dependents to work * Use local flatbuffers package for tests * Refactor away use of any * Remove obsolete imported_fileset and reexport_map * Still need any and fix JavaScriptTest.sh * Fix test runs out of the box * Temp add generated files * TypeScriptTest replaces JavaScriptTest and cleanups * Also remove reference to JavaScriptTest in TestAll.sh * Remove old generated ts/js files * Remove use of --js in generate_code scripts * idl_gen_js_ts to idl_gen_ts and removal of js gen * Remove obsoleted options * Fix obsolete ts test detection * Tweak ts compilation be as strict as possible * Remove jsdoc type annotation generation * Generated test ts files * Fix search and replace messup * Regenerated ts test output * Use CharToLower * Use normal for loop * Rework namespacedir * Revert "Rework namespacedir" This reverts commit 6f4eb0104ceeb86011bb076ebca901138c48e068. * Revert "Use normal for loop" This reverts commit 676b2135bfaa1853dfbb06c92b5c16a0d81bb13a. * Revert "Use CharToLower" This reverts commit 2d08648d0d72d0af201fad80d54cdc76412b35e9. * Again do rework but correct * Avoid runtime cast * Fix test runs * Also add npm install to get tsc * Bump node test versions * for range to std for loop * Clang format * Missed one clang format * Move accessor to later * Attempt to make windows version of TypeScriptTest * Want to see the output * Try to get newer node at appveyor * Style changes
This commit is contained in:
@@ -3,6 +3,7 @@ branches:
|
||||
- master
|
||||
|
||||
environment:
|
||||
nodejs_version: "14"
|
||||
|
||||
global:
|
||||
# Workaround for https://github.com/conda/conda-build/issues/636
|
||||
@@ -50,6 +51,7 @@ after_build:
|
||||
|
||||
install:
|
||||
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
|
||||
- ps: Install-Product node $env:nodejs_version
|
||||
|
||||
test_script:
|
||||
- call .appveyor\check-generate-code.bat -b %CONFIGURATION%
|
||||
@@ -60,13 +62,12 @@ test_script:
|
||||
- rem "---------------- C++ -----------------"
|
||||
- "cd .."
|
||||
- "%CONFIGURATION%\\flattests.exe"
|
||||
- "cd tests"
|
||||
- rem "---------------- JS -----------------"
|
||||
- "node --version"
|
||||
- "..\\%CONFIGURATION%\\flatc -b -I include_test monster_test.fbs unicode_test.json"
|
||||
- "npm install"
|
||||
- "npm run pretest"
|
||||
- "node JavaScriptTest ./monster_test_generated"
|
||||
- "npm run compile"
|
||||
- "cd tests"
|
||||
- "TypeScriptTest.bat"
|
||||
- rem "---------------- C# -----------------"
|
||||
# Have to compile this here rather than in "build" above because AppVeyor only
|
||||
# supports building one project??
|
||||
|
||||
@@ -150,16 +150,6 @@ Additional options:
|
||||
|
||||
- `--object-suffix` : Customise class suffix for C++ object-based API.
|
||||
|
||||
- `--no-js-exports` : Removes Node.js style export lines (useful for JS)
|
||||
|
||||
- `--goog-js-export` : Uses goog.exportsSymbol and goog.exportsProperty
|
||||
instead of Node.js style exporting. Needed for compatibility with the
|
||||
Google closure compiler (useful for JS).
|
||||
|
||||
- `--es6-js-export` : Generates ECMAScript v6 style export definitions
|
||||
instead of Node.js style exporting. Useful when integrating flatbuffers
|
||||
with modern Javascript projects.
|
||||
|
||||
- `--go-namespace` : Generate the overrided namespace in Golang.
|
||||
|
||||
- `--go-import` : Generate the overrided import for flatbuffers in Golang.
|
||||
@@ -207,12 +197,6 @@ Additional options:
|
||||
|
||||
- `--keep-prefix` : Keep original prefix of schema include statement.
|
||||
|
||||
- `--no-fb-import` : Don't include flatbuffers import statement for TypeScript.
|
||||
|
||||
- `--no-ts-reexport` : Don't re-export imported dependencies for TypeScript.
|
||||
|
||||
- `--short-names` : Use short function names for JS and TypeScript.
|
||||
|
||||
- `--reflect-types` : Add minimal type reflection to code generation.
|
||||
|
||||
- `--reflect-names` : Add minimal type/name reflection.
|
||||
|
||||
@@ -70,8 +70,6 @@ For times when efficiency is less important a more convenient object based API
|
||||
can be used (through `--gen-object-api`) that is able to unpack & pack a
|
||||
FlatBuffer into objects and standard TS types.
|
||||
|
||||
**When using the obj based API, the flatbuffers import need to be in the global namespace if you don't have `--no-fb-import` enabled** since creating default values require accessing the `flatbuffers.js` file.
|
||||
|
||||
To use:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.ts}
|
||||
|
||||
@@ -94,7 +94,10 @@ class BaseGenerator {
|
||||
virtual bool generate() = 0;
|
||||
|
||||
static std::string NamespaceDir(const Parser &parser, const std::string &path,
|
||||
const Namespace &ns);
|
||||
const Namespace &ns,
|
||||
const bool dasherize = false);
|
||||
|
||||
static std::string ToDasherizedCase(const std::string pascal_case);
|
||||
|
||||
std::string GeneratedFileName(const std::string &path,
|
||||
const std::string &file_name,
|
||||
@@ -116,7 +119,8 @@ class BaseGenerator {
|
||||
BaseGenerator &operator=(const BaseGenerator &);
|
||||
BaseGenerator(const BaseGenerator &);
|
||||
|
||||
std::string NamespaceDir(const Namespace &ns) const;
|
||||
std::string NamespaceDir(const Namespace &ns,
|
||||
const bool dasherize = false) const;
|
||||
|
||||
static const char *FlatBuffersGeneratedWarning();
|
||||
|
||||
|
||||
@@ -521,9 +521,6 @@ struct IDLOptions {
|
||||
// Use flexbuffers instead for binary and text generation
|
||||
bool use_flexbuffers;
|
||||
bool strict_json;
|
||||
bool skip_js_exports;
|
||||
bool use_goog_js_export_format;
|
||||
bool use_ES6_js_export_format;
|
||||
bool output_default_scalars_in_json;
|
||||
int indent_step;
|
||||
bool output_enum_identifiers;
|
||||
@@ -556,11 +553,8 @@ struct IDLOptions {
|
||||
bool binary_schema_comments;
|
||||
bool binary_schema_builtins;
|
||||
bool binary_schema_gen_embed;
|
||||
bool skip_flatbuffers_import;
|
||||
std::string go_import;
|
||||
std::string go_namespace;
|
||||
bool reexport_ts_modules;
|
||||
bool js_ts_short_names;
|
||||
bool protobuf_ascii_alike;
|
||||
bool size_prefixed;
|
||||
std::string root_type;
|
||||
@@ -580,7 +574,6 @@ struct IDLOptions {
|
||||
kCSharp = 1 << 1,
|
||||
kGo = 1 << 2,
|
||||
kCpp = 1 << 3,
|
||||
kJs = 1 << 4,
|
||||
kPython = 1 << 5,
|
||||
kPhp = 1 << 6,
|
||||
kJson = 1 << 7,
|
||||
@@ -621,9 +614,6 @@ struct IDLOptions {
|
||||
: gen_jvmstatic(false),
|
||||
use_flexbuffers(false),
|
||||
strict_json(false),
|
||||
skip_js_exports(false),
|
||||
use_goog_js_export_format(false),
|
||||
use_ES6_js_export_format(false),
|
||||
output_default_scalars_in_json(false),
|
||||
indent_step(2),
|
||||
output_enum_identifiers(true),
|
||||
@@ -653,9 +643,6 @@ struct IDLOptions {
|
||||
binary_schema_comments(false),
|
||||
binary_schema_builtins(false),
|
||||
binary_schema_gen_embed(false),
|
||||
skip_flatbuffers_import(false),
|
||||
reexport_ts_modules(true),
|
||||
js_ts_short_names(false),
|
||||
protobuf_ascii_alike(false),
|
||||
size_prefixed(false),
|
||||
force_defaults(false),
|
||||
@@ -1054,8 +1041,8 @@ extern bool GenerateJava(const Parser &parser, const std::string &path,
|
||||
|
||||
// Generate JavaScript or TypeScript code from the definitions in the Parser
|
||||
// object. See idl_gen_js.
|
||||
extern bool GenerateJSTS(const Parser &parser, const std::string &path,
|
||||
const std::string &file_name);
|
||||
extern bool GenerateTS(const Parser &parser, const std::string &path,
|
||||
const std::string &file_name);
|
||||
|
||||
// Generate Go files from the definitions in the Parser object.
|
||||
// See idl_gen_go.cpp.
|
||||
@@ -1107,10 +1094,10 @@ extern std::string GenerateFBS(const Parser &parser,
|
||||
extern bool GenerateFBS(const Parser &parser, const std::string &path,
|
||||
const std::string &file_name);
|
||||
|
||||
// Generate a make rule for the generated JavaScript or TypeScript code.
|
||||
// See idl_gen_js.cpp.
|
||||
extern std::string JSTSMakeRule(const Parser &parser, const std::string &path,
|
||||
const std::string &file_name);
|
||||
// Generate a make rule for the generated TypeScript code.
|
||||
// See idl_gen_ts.cpp.
|
||||
extern std::string TSMakeRule(const Parser &parser, const std::string &path,
|
||||
const std::string &file_name);
|
||||
|
||||
// Generate a make rule for the generated C++ header.
|
||||
// See idl_gen_cpp.cpp.
|
||||
@@ -1169,7 +1156,7 @@ extern bool GenerateSwiftGRPC(const Parser &parser, const std::string &path,
|
||||
const std::string &file_name);
|
||||
|
||||
extern bool GenerateTSGRPC(const Parser &parser, const std::string &path,
|
||||
const std::string &file_name);
|
||||
const std::string &file_name);
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_IDL_H_
|
||||
|
||||
@@ -51,6 +51,9 @@ inline bool is_alpha(char c) {
|
||||
return check_ascii_range(c & 0xDF, 'a' & 0xDF, 'z' & 0xDF);
|
||||
}
|
||||
|
||||
// Check for uppercase alpha
|
||||
inline bool is_alpha_upper(char c) { return check_ascii_range(c, 'A', 'Z'); }
|
||||
|
||||
// Check (case-insensitive) that `c` is equal to alpha.
|
||||
inline bool is_alpha_char(char c, char alpha) {
|
||||
FLATBUFFERS_ASSERT(is_alpha(alpha));
|
||||
|
||||
16
package.json
16
package.json
@@ -16,11 +16,9 @@
|
||||
"test": "tests"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "cd tests && ./JavaScriptTest.sh",
|
||||
"compile-ts": "tsc && tsc -p tsconfig.mjs.json",
|
||||
"pretest": "npm run compile-ts",
|
||||
"append-esm-export": "sed \"s/this.flatbuffers = flatbuffers;/export { flatbuffers };/\" js/flatbuffers.js > js/flatbuffers.mjs",
|
||||
"prepublishOnly": "npm run compile-ts && npm run append-esm-export"
|
||||
"test": "npm run compile && cd tests && ./TypeScriptTest.sh",
|
||||
"compile": "tsc && tsc -p tsconfig.mjs.json",
|
||||
"prepublishOnly": "npm run compile"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -37,9 +35,9 @@
|
||||
"homepage": "https://google.github.io/flatbuffers/",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^4.1.0",
|
||||
"@typescript-eslint/parser": "^4.1.0",
|
||||
"eslint": "^7.8.1",
|
||||
"typescript": "^4.0.2"
|
||||
"@typescript-eslint/eslint-plugin": "^4.12.0",
|
||||
"@typescript-eslint/parser": "^4.12.0",
|
||||
"eslint": "^7.17.0",
|
||||
"typescript": "^4.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,20 +84,39 @@ const char *BaseGenerator::FlatBuffersGeneratedWarning() {
|
||||
|
||||
std::string BaseGenerator::NamespaceDir(const Parser &parser,
|
||||
const std::string &path,
|
||||
const Namespace &ns) {
|
||||
const Namespace &ns,
|
||||
const bool dasherize) {
|
||||
EnsureDirExists(path);
|
||||
if (parser.opts.one_file) return path;
|
||||
std::string namespace_dir = path; // Either empty or ends in separator.
|
||||
auto &namespaces = ns.components;
|
||||
for (auto it = namespaces.begin(); it != namespaces.end(); ++it) {
|
||||
namespace_dir += *it + kPathSeparator;
|
||||
namespace_dir += !dasherize ? *it : ToDasherizedCase(*it);
|
||||
namespace_dir += kPathSeparator;
|
||||
EnsureDirExists(namespace_dir);
|
||||
}
|
||||
return namespace_dir;
|
||||
}
|
||||
|
||||
std::string BaseGenerator::NamespaceDir(const Namespace &ns) const {
|
||||
return BaseGenerator::NamespaceDir(parser_, path_, ns);
|
||||
std::string BaseGenerator::NamespaceDir(const Namespace &ns,
|
||||
const bool dasherize) const {
|
||||
return BaseGenerator::NamespaceDir(parser_, path_, ns, dasherize);
|
||||
}
|
||||
|
||||
std::string BaseGenerator::ToDasherizedCase(const std::string pascal_case) {
|
||||
std::string dasherized_case;
|
||||
char p = 0;
|
||||
for (size_t i = 0; i < pascal_case.length(); i++) {
|
||||
char const &c = pascal_case[i];
|
||||
if (is_alpha_upper(c)) {
|
||||
if (i > 0 && p != kPathSeparator) dasherized_case += "-";
|
||||
dasherized_case += CharToLower(c);
|
||||
} else {
|
||||
dasherized_case += c;
|
||||
}
|
||||
p = c;
|
||||
}
|
||||
return dasherized_case;
|
||||
}
|
||||
|
||||
std::string BaseGenerator::FullNamespace(const char *separator,
|
||||
|
||||
@@ -129,9 +129,6 @@ std::string FlatCompiler::GetUsageString(const char *program_name) const {
|
||||
" --object-prefix Customise class prefix for C++ object-based API.\n"
|
||||
" --object-suffix Customise class suffix for C++ object-based API.\n"
|
||||
" Default value is \"T\".\n"
|
||||
" --no-js-exports Removes Node.js style export lines in JS.\n"
|
||||
" --goog-js-export Uses goog.exports* for closure compiler exporting in JS.\n"
|
||||
" --es6-js-export Uses ECMAScript 6 export style lines in JS.\n"
|
||||
" --go-namespace Generate the overriding namespace in Golang.\n"
|
||||
" --go-import Generate the overriding import for flatbuffers in Golang\n"
|
||||
" (default is \"github.com/google/flatbuffers/go\").\n"
|
||||
@@ -157,9 +154,6 @@ std::string FlatCompiler::GetUsageString(const char *program_name) const {
|
||||
" --include-prefix Prefix this path to any generated include statements.\n"
|
||||
" PATH\n"
|
||||
" --keep-prefix Keep original prefix of schema include statement.\n"
|
||||
" --no-fb-import Don't include flatbuffers import statement for TypeScript.\n"
|
||||
" --no-ts-reexport Don't re-export imported dependencies for TypeScript.\n"
|
||||
" --short-names Use short function names for JS and TypeScript.\n"
|
||||
" --reflect-types Add minimal type reflection to code generation.\n"
|
||||
" --reflect-names Add minimal type/name reflection.\n"
|
||||
" --root-type T Select or override the default root_type\n"
|
||||
@@ -240,14 +234,6 @@ int FlatCompiler::Compile(int argc, const char **argv) {
|
||||
opts.allow_non_utf8 = true;
|
||||
} else if (arg == "--natural-utf8") {
|
||||
opts.natural_utf8 = true;
|
||||
} else if (arg == "--no-js-exports") {
|
||||
opts.skip_js_exports = true;
|
||||
} else if (arg == "--goog-js-export") {
|
||||
opts.use_goog_js_export_format = true;
|
||||
opts.use_ES6_js_export_format = false;
|
||||
} else if (arg == "--es6-js-export") {
|
||||
opts.use_goog_js_export_format = false;
|
||||
opts.use_ES6_js_export_format = true;
|
||||
} else if (arg == "--go-namespace") {
|
||||
if (++argi >= argc) Error("missing golang namespace" + arg, true);
|
||||
opts.go_namespace = argv[argi];
|
||||
@@ -301,7 +287,6 @@ int FlatCompiler::Compile(int argc, const char **argv) {
|
||||
} else if (arg == "--gen-all") {
|
||||
opts.generate_all = true;
|
||||
opts.include_dependence_headers = false;
|
||||
opts.reexport_ts_modules = false;
|
||||
} else if (arg == "--gen-includes") {
|
||||
// Deprecated, remove this option some time in the future.
|
||||
Warn("warning: --gen-includes is deprecated (it is now default)\n");
|
||||
@@ -337,12 +322,6 @@ int FlatCompiler::Compile(int argc, const char **argv) {
|
||||
opts.binary_schema_builtins = true;
|
||||
} else if (arg == "--bfbs-gen-embed") {
|
||||
opts.binary_schema_gen_embed = true;
|
||||
} else if (arg == "--no-fb-import") {
|
||||
opts.skip_flatbuffers_import = true;
|
||||
} else if (arg == "--no-ts-reexport") {
|
||||
opts.reexport_ts_modules = false;
|
||||
} else if (arg == "--short-names") {
|
||||
opts.js_ts_short_names = true;
|
||||
} else if (arg == "--reflect-types") {
|
||||
opts.mini_reflect = IDLOptions::kTypes;
|
||||
} else if (arg == "--reflect-names") {
|
||||
|
||||
@@ -71,17 +71,12 @@ int main(int argc, const char *argv[]) {
|
||||
flatbuffers::GenerateJavaGRPC, flatbuffers::IDLOptions::kJava,
|
||||
"Generate Java classes for tables/structs",
|
||||
flatbuffers::JavaCSharpMakeRule },
|
||||
{ flatbuffers::GenerateJSTS, "-s", "--js", "JavaScript", true, nullptr,
|
||||
flatbuffers::IDLOptions::kJs,
|
||||
"Generate JavaScript code for tables/structs",
|
||||
flatbuffers::JSTSMakeRule },
|
||||
{ flatbuffers::GenerateDart, "-d", "--dart", "Dart", true, nullptr,
|
||||
flatbuffers::IDLOptions::kDart,
|
||||
"Generate Dart classes for tables/structs", flatbuffers::DartMakeRule },
|
||||
{ flatbuffers::GenerateJSTS, "-T", "--ts", "TypeScript", true,
|
||||
{ flatbuffers::GenerateTS, "-T", "--ts", "TypeScript", true,
|
||||
flatbuffers::GenerateTSGRPC, flatbuffers::IDLOptions::kTs,
|
||||
"Generate TypeScript code for tables/structs",
|
||||
flatbuffers::JSTSMakeRule },
|
||||
"Generate TypeScript code for tables/structs", flatbuffers::TSMakeRule },
|
||||
{ flatbuffers::GenerateCSharp, "-n", "--csharp", "C#", true, nullptr,
|
||||
flatbuffers::IDLOptions::kCSharp,
|
||||
"Generate C# classes for tables/structs",
|
||||
|
||||
1486
src/idl_gen_ts.cpp
1486
src/idl_gen_ts.cpp
File diff suppressed because it is too large
Load Diff
@@ -2388,8 +2388,7 @@ bool Parser::SupportsOptionalScalars(const flatbuffers::IDLOptions &opts) {
|
||||
static FLATBUFFERS_CONSTEXPR unsigned long supported_langs =
|
||||
IDLOptions::kRust | IDLOptions::kSwift | IDLOptions::kLobster |
|
||||
IDLOptions::kKotlin | IDLOptions::kCpp | IDLOptions::kJava |
|
||||
IDLOptions::kCSharp | IDLOptions::kTs | IDLOptions::kJs |
|
||||
IDLOptions::kBinary;
|
||||
IDLOptions::kCSharp | IDLOptions::kTs | IDLOptions::kBinary;
|
||||
unsigned long langs = opts.lang_to_generate;
|
||||
return (langs > 0 && langs < IDLOptions::kMAX) && !(langs & ~supported_langs);
|
||||
}
|
||||
@@ -2402,10 +2401,9 @@ bool Parser::SupportsOptionalScalars() const {
|
||||
bool Parser::SupportsAdvancedUnionFeatures() const {
|
||||
return opts.lang_to_generate != 0 &&
|
||||
(opts.lang_to_generate &
|
||||
~(IDLOptions::kCpp | IDLOptions::kJs | IDLOptions::kTs |
|
||||
IDLOptions::kPhp | IDLOptions::kJava | IDLOptions::kCSharp |
|
||||
IDLOptions::kKotlin | IDLOptions::kBinary | IDLOptions::kSwift)) ==
|
||||
0;
|
||||
~(IDLOptions::kCpp | IDLOptions::kTs | IDLOptions::kPhp |
|
||||
IDLOptions::kJava | IDLOptions::kCSharp | IDLOptions::kKotlin |
|
||||
IDLOptions::kBinary | IDLOptions::kSwift)) == 0;
|
||||
}
|
||||
|
||||
bool Parser::SupportsAdvancedArrayFeatures() const {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
// Run this using JavaScriptTest.sh
|
||||
var assert = require('assert');
|
||||
var fs = require('fs');
|
||||
|
||||
var flexbuffers = require('../js/flexbuffers').flexbuffers;
|
||||
global.flexbuffers = flexbuffers;
|
||||
import assert from 'assert'
|
||||
import fs from 'fs'
|
||||
import * as flexbuffers from 'flatbuffers/js/flexbuffers'
|
||||
|
||||
function main() {
|
||||
testSingleValueBuffers();
|
||||
@@ -16,10 +14,12 @@ function main() {
|
||||
testRoundTripWithBuilder();
|
||||
testDeduplicationOff();
|
||||
testBugWhereOffestWereStoredAsIntInsteadOfUInt();
|
||||
|
||||
console.log('FlexBuffers test: completed successfully');
|
||||
}
|
||||
|
||||
function testSingleValueBuffers() {
|
||||
{ // null
|
||||
{
|
||||
const ref = flexbuffers.toReference(new Uint8Array([0, 0, 1]).buffer);
|
||||
assert.strictEqual(true, ref.isNull());
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
// Run this using JavaScriptTest.sh
|
||||
var assert = require('assert');
|
||||
var fs = require('fs');
|
||||
import assert from 'assert'
|
||||
import fs from 'fs'
|
||||
import * as flatbuffers from 'flatbuffers'
|
||||
|
||||
var flatbuffers = require('../js/flatbuffers').flatbuffers;
|
||||
global.flatbuffers = flatbuffers;
|
||||
|
||||
var MyGame = require(process.argv[2]).MyGame;
|
||||
|
||||
var isTsTest = !!process.env.FB_TS_TEST;
|
||||
import { Monster, MonsterT } from './ts/my-game/example/monster'
|
||||
import { Test } from './ts/my-game/example/test'
|
||||
import { Stat } from './ts/my-game/example/stat'
|
||||
import { Vec3 } from './ts/my-game/example/vec3'
|
||||
import { Color } from './ts/my-game/example/color';
|
||||
import { Any } from './ts/my-game/example/any';
|
||||
|
||||
function main() {
|
||||
|
||||
@@ -27,11 +28,8 @@ function main() {
|
||||
var fbb = new flatbuffers.Builder(1);
|
||||
createMonster(fbb);
|
||||
serializeAndTest(fbb);
|
||||
testObjApiPack(fbb);
|
||||
|
||||
if(isTsTest) {
|
||||
testObjApiPack(fbb);
|
||||
}
|
||||
|
||||
// clear the builder, repeat tests
|
||||
var clearIterations = 100;
|
||||
var startingCapacity = fbb.bb.capacity();
|
||||
@@ -39,10 +37,7 @@ function main() {
|
||||
fbb.clear();
|
||||
createMonster(fbb);
|
||||
serializeAndTest(fbb);
|
||||
|
||||
if(isTsTest) {
|
||||
testObjApiPack(fbb);
|
||||
}
|
||||
testObjApiPack(fbb);
|
||||
}
|
||||
// the capacity of our buffer shouldn't increase with the same size payload
|
||||
assert.strictEqual(fbb.bb.capacity(), startingCapacity);
|
||||
@@ -52,7 +47,7 @@ function main() {
|
||||
fuzzTest1();
|
||||
testNullStrings();
|
||||
testSharedStrings();
|
||||
|
||||
|
||||
console.log('FlatBuffers test: completed successfully');
|
||||
}
|
||||
|
||||
@@ -61,36 +56,36 @@ function createMonster(fbb) {
|
||||
|
||||
var str = fbb.createString('MyMonster');
|
||||
|
||||
var inv = MyGame.Example.Monster.createInventoryVector(fbb, [0, 1, 2, 3, 4]);
|
||||
var inv = Monster.createInventoryVector(fbb, [0, 1, 2, 3, 4]);
|
||||
|
||||
var fred = fbb.createString('Fred');
|
||||
MyGame.Example.Monster.startMonster(fbb);
|
||||
MyGame.Example.Monster.addName(fbb, fred);
|
||||
var mon2 = MyGame.Example.Monster.endMonster(fbb);
|
||||
Monster.startMonster(fbb);
|
||||
Monster.addName(fbb, fred);
|
||||
var mon2 = Monster.endMonster(fbb);
|
||||
|
||||
MyGame.Example.Monster.startTest4Vector(fbb, 2);
|
||||
MyGame.Example.Test.createTest(fbb, 10, 20);
|
||||
MyGame.Example.Test.createTest(fbb, 30, 40);
|
||||
Monster.startTest4Vector(fbb, 2);
|
||||
Test.createTest(fbb, 10, 20);
|
||||
Test.createTest(fbb, 30, 40);
|
||||
var test4 = fbb.endVector();
|
||||
|
||||
var testArrayOfString = MyGame.Example.Monster.createTestarrayofstringVector(fbb, [
|
||||
var testArrayOfString = Monster.createTestarrayofstringVector(fbb, [
|
||||
fbb.createString('test1'),
|
||||
fbb.createString('test2')
|
||||
]);
|
||||
|
||||
MyGame.Example.Monster.startMonster(fbb);
|
||||
MyGame.Example.Monster.addPos(fbb, MyGame.Example.Vec3.createVec3(fbb, 1, 2, 3, 3, MyGame.Example.Color.Green, 5, 6));
|
||||
MyGame.Example.Monster.addHp(fbb, 80);
|
||||
MyGame.Example.Monster.addName(fbb, str);
|
||||
MyGame.Example.Monster.addInventory(fbb, inv);
|
||||
MyGame.Example.Monster.addTestType(fbb, MyGame.Example.Any.Monster);
|
||||
MyGame.Example.Monster.addTest(fbb, mon2);
|
||||
MyGame.Example.Monster.addTest4(fbb, test4);
|
||||
MyGame.Example.Monster.addTestarrayofstring(fbb, testArrayOfString);
|
||||
MyGame.Example.Monster.addTestbool(fbb, true);
|
||||
var mon = MyGame.Example.Monster.endMonster(fbb);
|
||||
Monster.startMonster(fbb);
|
||||
Monster.addPos(fbb, Vec3.createVec3(fbb, 1, 2, 3, 3, Color.Green, 5, 6));
|
||||
Monster.addHp(fbb, 80);
|
||||
Monster.addName(fbb, str);
|
||||
Monster.addInventory(fbb, inv);
|
||||
Monster.addTestType(fbb, Any.Monster);
|
||||
Monster.addTest(fbb, mon2);
|
||||
Monster.addTest4(fbb, test4);
|
||||
Monster.addTestarrayofstring(fbb, testArrayOfString);
|
||||
Monster.addTestbool(fbb, true);
|
||||
var mon = Monster.endMonster(fbb);
|
||||
|
||||
MyGame.Example.Monster.finishMonsterBuffer(fbb, mon);
|
||||
Monster.finishMonsterBuffer(fbb, mon);
|
||||
}
|
||||
|
||||
function serializeAndTest(fbb) {
|
||||
@@ -109,7 +104,7 @@ function serializeAndTest(fbb) {
|
||||
}
|
||||
|
||||
function testMutation(bb) {
|
||||
var monster = MyGame.Example.Monster.getRootAsMonster(bb);
|
||||
var monster = Monster.getRootAsMonster(bb);
|
||||
|
||||
monster.mutate_hp(120);
|
||||
assert.strictEqual(monster.hp(), 120);
|
||||
@@ -126,9 +121,9 @@ function testMutation(bb) {
|
||||
function testObjApiPack(fbb) {
|
||||
fbb.clear();
|
||||
createMonster(fbb);
|
||||
let monster_t = MyGame.Example.Monster.getRootAsMonster(fbb.dataBuffer()).unpack();
|
||||
let monster_t = Monster.getRootAsMonster(fbb.dataBuffer()).unpack();
|
||||
fbb.clear();
|
||||
MyGame.Example.Monster.finishMonsterBuffer(fbb, monster_t.pack(fbb));
|
||||
Monster.finishMonsterBuffer(fbb, monster_t.pack(fbb));
|
||||
serializeAndTest(fbb);
|
||||
}
|
||||
|
||||
@@ -143,15 +138,15 @@ function testObjApiUnpack(monster) {
|
||||
assert.strictEqual(pos.y, 2);
|
||||
assert.strictEqual(pos.z, 3);
|
||||
assert.strictEqual(pos.test1, 3);
|
||||
assert.strictEqual(pos.test2, MyGame.Example.Color.Green);
|
||||
assert.strictEqual(pos.test2, Color.Green);
|
||||
let test3 = pos.test3;
|
||||
assert.strictEqual(test3.a, 5);
|
||||
assert.strictEqual(test3.b, 6);
|
||||
|
||||
assert.strictEqual(monster.testType, MyGame.Example.Any.Monster);
|
||||
assert.strictEqual(monster.testType, Any.Monster);
|
||||
let monster2 = monster.test;
|
||||
assert.strictEqual(monster2 != null, true);
|
||||
assert.strictEqual(monster2 instanceof MyGame.Example.MonsterT, true);
|
||||
assert.strictEqual(monster2 instanceof MonsterT, true);
|
||||
assert.strictEqual(monster2.name, 'Fred');
|
||||
|
||||
assert.strictEqual(monster.inventory.length, 5);
|
||||
@@ -174,9 +169,9 @@ function testObjApiUnpack(monster) {
|
||||
}
|
||||
|
||||
function testBuffer(bb) {
|
||||
assert.ok(MyGame.Example.Monster.bufferHasIdentifier(bb));
|
||||
assert.ok(Monster.bufferHasIdentifier(bb));
|
||||
|
||||
var monster = MyGame.Example.Monster.getRootAsMonster(bb);
|
||||
var monster = Monster.getRootAsMonster(bb);
|
||||
|
||||
assert.strictEqual(monster.hp(), 80);
|
||||
assert.strictEqual(monster.mana(), 150); // default
|
||||
@@ -188,13 +183,13 @@ function testBuffer(bb) {
|
||||
assert.strictEqual(pos.y(), 2);
|
||||
assert.strictEqual(pos.z(), 3);
|
||||
assert.strictEqual(pos.test1(), 3);
|
||||
assert.strictEqual(pos.test2(), MyGame.Example.Color.Green);
|
||||
assert.strictEqual(pos.test2(), Color.Green);
|
||||
var t = pos.test3();
|
||||
assert.strictEqual(t.a(), 5);
|
||||
assert.strictEqual(t.b(), 6);
|
||||
|
||||
assert.strictEqual(monster.testType(), MyGame.Example.Any.Monster);
|
||||
var monster2 = new MyGame.Example.Monster();
|
||||
assert.strictEqual(monster.testType(), Any.Monster);
|
||||
var monster2 = new Monster();
|
||||
assert.strictEqual(monster.test(monster2) != null, true);
|
||||
assert.strictEqual(monster2.name(), 'Fred');
|
||||
|
||||
@@ -223,47 +218,45 @@ function testBuffer(bb) {
|
||||
|
||||
assert.strictEqual(monster.testbool(), true);
|
||||
|
||||
if(isTsTest) {
|
||||
let monster_t = monster.unpack();
|
||||
testObjApiUnpack(monster_t);
|
||||
let monster_t = monster.unpack();
|
||||
testObjApiUnpack(monster_t);
|
||||
|
||||
let monster2_t = new MyGame.Example.MonsterT();
|
||||
monster.unpackTo(monster2_t);
|
||||
testObjApiUnpack(monster2_t);
|
||||
}
|
||||
let monster2_t = new MonsterT();
|
||||
monster.unpackTo(monster2_t);
|
||||
testObjApiUnpack(monster2_t);
|
||||
}
|
||||
|
||||
function test64bit() {
|
||||
var fbb = new flatbuffers.Builder();
|
||||
var required = fbb.createString('required');
|
||||
|
||||
MyGame.Example.Stat.startStat(fbb);
|
||||
var stat2 = MyGame.Example.Stat.endStat(fbb);
|
||||
Stat.startStat(fbb);
|
||||
var stat2 = Stat.endStat(fbb);
|
||||
|
||||
MyGame.Example.Monster.startMonster(fbb);
|
||||
MyGame.Example.Monster.addName(fbb, required);
|
||||
MyGame.Example.Monster.addTestempty(fbb, stat2);
|
||||
var mon2 = MyGame.Example.Monster.endMonster(fbb);
|
||||
Monster.startMonster(fbb);
|
||||
Monster.addName(fbb, required);
|
||||
Monster.addTestempty(fbb, stat2);
|
||||
var mon2 = Monster.endMonster(fbb);
|
||||
|
||||
MyGame.Example.Stat.startStat(fbb);
|
||||
Stat.startStat(fbb);
|
||||
// 2541551405100253985 = 0x87654321(low part) + 0x23456789 * 0x100000000(high part);
|
||||
MyGame.Example.Stat.addVal(fbb, new flatbuffers.Long(0x87654321, 0x23456789)); // the low part is Uint32
|
||||
var stat = MyGame.Example.Stat.endStat(fbb);
|
||||
Stat.addVal(fbb, new flatbuffers.Long(0x87654321, 0x23456789)); // the low part is Uint32
|
||||
var stat = Stat.endStat(fbb);
|
||||
|
||||
MyGame.Example.Monster.startMonster(fbb);
|
||||
MyGame.Example.Monster.addName(fbb, required);
|
||||
MyGame.Example.Monster.addEnemy(fbb, mon2);
|
||||
MyGame.Example.Monster.addTestempty(fbb, stat);
|
||||
var mon = MyGame.Example.Monster.endMonster(fbb);
|
||||
Monster.startMonster(fbb);
|
||||
Monster.addName(fbb, required);
|
||||
Monster.addEnemy(fbb, mon2);
|
||||
Monster.addTestempty(fbb, stat);
|
||||
var mon = Monster.endMonster(fbb);
|
||||
|
||||
MyGame.Example.Monster.finishMonsterBuffer(fbb, mon);
|
||||
Monster.finishMonsterBuffer(fbb, mon);
|
||||
var bytes = fbb.asUint8Array();
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
var bb = new flatbuffers.ByteBuffer(bytes);
|
||||
assert.ok(MyGame.Example.Monster.bufferHasIdentifier(bb));
|
||||
var mon = MyGame.Example.Monster.getRootAsMonster(bb);
|
||||
assert.ok(Monster.bufferHasIdentifier(bb));
|
||||
var mon = Monster.getRootAsMonster(bb);
|
||||
|
||||
var stat = mon.testempty();
|
||||
assert.strictEqual(stat != null, true);
|
||||
@@ -285,7 +278,7 @@ function testUnicode() {
|
||||
|
||||
// Test reading
|
||||
function testReadingUnicode(bb) {
|
||||
var monster = MyGame.Example.Monster.getRootAsMonster(bb);
|
||||
var monster = Monster.getRootAsMonster(bb);
|
||||
assert.strictEqual(monster.name(), json.name);
|
||||
assert.deepEqual(new Buffer(monster.name(flatbuffers.Encoding.UTF8_BYTES)), new Buffer(json.name));
|
||||
assert.strictEqual(monster.testarrayoftablesLength(), json.testarrayoftables.length);
|
||||
@@ -307,19 +300,19 @@ function testUnicode() {
|
||||
var name = fbb.createString(json.name);
|
||||
var testarrayoftablesOffsets = json.testarrayoftables.map(function(table) {
|
||||
var name = fbb.createString(new Uint8Array(new Buffer(table.name)));
|
||||
MyGame.Example.Monster.startMonster(fbb);
|
||||
MyGame.Example.Monster.addName(fbb, name);
|
||||
return MyGame.Example.Monster.endMonster(fbb);
|
||||
Monster.startMonster(fbb);
|
||||
Monster.addName(fbb, name);
|
||||
return Monster.endMonster(fbb);
|
||||
});
|
||||
var testarrayoftablesOffset = MyGame.Example.Monster.createTestarrayoftablesVector(fbb,
|
||||
var testarrayoftablesOffset = Monster.createTestarrayoftablesVector(fbb,
|
||||
testarrayoftablesOffsets);
|
||||
var testarrayofstringOffset = MyGame.Example.Monster.createTestarrayofstringVector(fbb,
|
||||
var testarrayofstringOffset = Monster.createTestarrayofstringVector(fbb,
|
||||
json.testarrayofstring.map(function(string) { return fbb.createString(string); }));
|
||||
MyGame.Example.Monster.startMonster(fbb);
|
||||
MyGame.Example.Monster.addTestarrayofstring(fbb, testarrayofstringOffset);
|
||||
MyGame.Example.Monster.addTestarrayoftables(fbb, testarrayoftablesOffset);
|
||||
MyGame.Example.Monster.addName(fbb, name);
|
||||
MyGame.Example.Monster.finishSizePrefixedMonsterBuffer(fbb, MyGame.Example.Monster.endMonster(fbb));
|
||||
Monster.startMonster(fbb);
|
||||
Monster.addTestarrayofstring(fbb, testarrayofstringOffset);
|
||||
Monster.addTestarrayoftables(fbb, testarrayoftablesOffset);
|
||||
Monster.addName(fbb, name);
|
||||
Monster.finishSizePrefixedMonsterBuffer(fbb, Monster.endMonster(fbb));
|
||||
var bb = new flatbuffers.ByteBuffer(fbb.asUint8Array())
|
||||
bb.setPosition(4);
|
||||
testReadingUnicode(bb);
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2016 Google Inc. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
|
||||
pushd "$(dirname $0)" >/dev/null
|
||||
../flatc -b -I include_test monster_test.fbs unicode_test.json
|
||||
../flatc --js -o js --gen-name-strings --gen-mutable --no-fb-import -I include_test monster_test.fbs
|
||||
node JavaScriptTest ./js/monster_test_generated
|
||||
|
||||
../flatc --js --gen-name-strings -o js --no-fb-import union_vector/union_vector.fbs
|
||||
node JavaScriptUnionVectorTest ./js/union_vector_generated
|
||||
node JavaScriptFlexBuffersTest
|
||||
@@ -1,16 +1,17 @@
|
||||
var assert = require('assert');
|
||||
import assert from 'assert'
|
||||
import * as flatbuffers from 'flatbuffers'
|
||||
|
||||
var flatbuffers = require('../js/flatbuffers').flatbuffers;
|
||||
var Test = require(process.argv[2]);
|
||||
|
||||
var isTsTest = !!process.env.FB_TS_TEST;
|
||||
import { Character } from './ts/character'
|
||||
import { BookReader, BookReaderT } from './ts/book-reader'
|
||||
import { Attacker, AttackerT } from './ts/attacker'
|
||||
import { Movie, MovieT } from './ts/movie'
|
||||
|
||||
var charTypes = [
|
||||
Test.Character.Belle,
|
||||
Test.Character.MuLan,
|
||||
Test.Character.BookFan,
|
||||
Character.Belle,
|
||||
Character.MuLan,
|
||||
Character.BookFan,
|
||||
Character.Other
|
||||
];
|
||||
if(isTsTest) { charTypes.push(Test.Character.Other); }
|
||||
|
||||
function testMovieBuf(movie) {
|
||||
assert.strictEqual(movie.charactersTypeLength(), charTypes.length);
|
||||
@@ -20,19 +21,17 @@ function testMovieBuf(movie) {
|
||||
assert.strictEqual(movie.charactersType(i), charTypes[i]);
|
||||
}
|
||||
|
||||
var bookReader7 = movie.characters(0, new Test.BookReader());
|
||||
var bookReader7 = movie.characters(0, new BookReader());
|
||||
assert.strictEqual(bookReader7.booksRead(), 7);
|
||||
|
||||
var attacker = movie.characters(1, new Test.Attacker());
|
||||
var attacker = movie.characters(1, new Attacker());
|
||||
assert.strictEqual(attacker.swordAttackDamage(), 5);
|
||||
|
||||
var bookReader2 = movie.characters(2, new Test.BookReader());
|
||||
var bookReader2 = movie.characters(2, new BookReader());
|
||||
assert.strictEqual(bookReader2.booksRead(), 2);
|
||||
|
||||
if(isTsTest) {
|
||||
var other = movie.characters(3, '');
|
||||
assert.strictEqual(other, "I am other");
|
||||
}
|
||||
var other = movie.characters(3, '');
|
||||
assert.strictEqual(other, "I am other");
|
||||
}
|
||||
|
||||
function testMovieUnpack(movie) {
|
||||
@@ -44,58 +43,45 @@ function testMovieUnpack(movie) {
|
||||
}
|
||||
|
||||
var bookReader7 = movie.characters[0];
|
||||
assert.strictEqual(bookReader7 instanceof Test.BookReaderT, true);
|
||||
assert.strictEqual(bookReader7 instanceof BookReaderT, true);
|
||||
assert.strictEqual(bookReader7.booksRead, 7);
|
||||
|
||||
|
||||
var attacker = movie.characters[1];
|
||||
assert.strictEqual(attacker instanceof Test.AttackerT, true);
|
||||
assert.strictEqual(attacker instanceof AttackerT, true);
|
||||
assert.strictEqual(attacker.swordAttackDamage, 5);
|
||||
|
||||
|
||||
var bookReader2 = movie.characters[2];
|
||||
assert.strictEqual(bookReader2 instanceof Test.BookReaderT, true);
|
||||
assert.strictEqual(bookReader2 instanceof BookReaderT, true);
|
||||
assert.strictEqual(bookReader2.booksRead, 2);
|
||||
|
||||
if(isTsTest) {
|
||||
var other = movie.characters[3];
|
||||
assert.strictEqual(other, "I am other");
|
||||
}
|
||||
var other = movie.characters[3];
|
||||
assert.strictEqual(other, "I am other");
|
||||
}
|
||||
|
||||
function createMovie(fbb) {
|
||||
Test.Attacker.startAttacker(fbb);
|
||||
Test.Attacker.addSwordAttackDamage(fbb, 5);
|
||||
var attackerOffset = Test.Attacker.endAttacker(fbb);
|
||||
Attacker.startAttacker(fbb);
|
||||
Attacker.addSwordAttackDamage(fbb, 5);
|
||||
var attackerOffset = Attacker.endAttacker(fbb);
|
||||
|
||||
var charTypesOffset = Test.Movie.createCharactersTypeVector(fbb, charTypes);
|
||||
var charTypesOffset = Movie.createCharactersTypeVector(fbb, charTypes);
|
||||
var charsOffset = 0;
|
||||
|
||||
if(isTsTest) {
|
||||
let otherOffset = fbb.createString("I am other");
|
||||
let otherOffset = fbb.createString("I am other");
|
||||
|
||||
charsOffset = Test.Movie.createCharactersVector(
|
||||
fbb,
|
||||
[
|
||||
Test.BookReader.createBookReader(fbb, 7),
|
||||
attackerOffset,
|
||||
Test.BookReader.createBookReader(fbb, 2),
|
||||
otherOffset
|
||||
]
|
||||
);
|
||||
} else {
|
||||
charsOffset = Test.Movie.createCharactersVector(
|
||||
fbb,
|
||||
[
|
||||
Test.BookReader.createBookReader(fbb, 7),
|
||||
attackerOffset,
|
||||
Test.BookReader.createBookReader(fbb, 2)
|
||||
]
|
||||
);
|
||||
}
|
||||
charsOffset = Movie.createCharactersVector(
|
||||
fbb,
|
||||
[
|
||||
BookReader.createBookReader(fbb, 7),
|
||||
attackerOffset,
|
||||
BookReader.createBookReader(fbb, 2),
|
||||
otherOffset
|
||||
]
|
||||
);
|
||||
|
||||
Test.Movie.startMovie(fbb);
|
||||
Test.Movie.addCharactersType(fbb, charTypesOffset);
|
||||
Test.Movie.addCharacters(fbb, charsOffset);
|
||||
Test.Movie.finishMovieBuffer(fbb, Test.Movie.endMovie(fbb))
|
||||
Movie.startMovie(fbb);
|
||||
Movie.addCharactersType(fbb, charTypesOffset);
|
||||
Movie.addCharacters(fbb, charsOffset);
|
||||
Movie.finishMovieBuffer(fbb, Movie.endMovie(fbb))
|
||||
}
|
||||
|
||||
function main() {
|
||||
@@ -105,22 +91,20 @@ function main() {
|
||||
|
||||
var buf = new flatbuffers.ByteBuffer(fbb.asUint8Array());
|
||||
|
||||
var movie = Test.Movie.getRootAsMovie(buf);
|
||||
var movie = Movie.getRootAsMovie(buf);
|
||||
testMovieBuf(movie);
|
||||
|
||||
if(isTsTest) {
|
||||
testMovieUnpack(movie.unpack());
|
||||
testMovieUnpack(movie.unpack());
|
||||
|
||||
var movie_to = new Test.MovieT();
|
||||
movie.unpackTo(movie_to);
|
||||
testMovieUnpack(movie_to);
|
||||
|
||||
fbb.clear();
|
||||
Test.Movie.finishMovieBuffer(fbb, movie_to.pack(fbb));
|
||||
var unpackBuf = new flatbuffers.ByteBuffer(fbb.asUint8Array());
|
||||
testMovieBuf(Test.Movie.getRootAsMovie(unpackBuf));
|
||||
}
|
||||
var movie_to = new MovieT();
|
||||
movie.unpackTo(movie_to);
|
||||
testMovieUnpack(movie_to);
|
||||
|
||||
fbb.clear();
|
||||
Movie.finishMovieBuffer(fbb, movie_to.pack(fbb));
|
||||
var unpackBuf = new flatbuffers.ByteBuffer(fbb.asUint8Array());
|
||||
testMovieBuf(Movie.getRootAsMovie(unpackBuf));
|
||||
|
||||
console.log('FlatBuffers union vector test: completed successfully');
|
||||
}
|
||||
|
||||
|
||||
@@ -14,12 +14,6 @@ echo "************************ Python:"
|
||||
|
||||
sh PythonTest.sh
|
||||
|
||||
echo "************************ JavaScript:"
|
||||
|
||||
sh JavaScriptTest.sh
|
||||
# FIXME does not exist:
|
||||
# sh JavaScriptUnionVectorTest.sh
|
||||
|
||||
echo "************************ TypeScript:"
|
||||
|
||||
sh TypeScriptTest.sh
|
||||
|
||||
8
tests/TypeScriptTest.bat
Executable file
8
tests/TypeScriptTest.bat
Executable file
@@ -0,0 +1,8 @@
|
||||
npm install
|
||||
../flatc.exe --ts --gen-name-strings --gen-mutable --gen-object-api -o ts -I include_test monster_test.fbs
|
||||
../flatc.exe --gen-object-api -b -I include_test monster_test.fbs unicode_test.json
|
||||
../flatc.exe --ts --gen-name-strings --gen-object-api -o ts union_vector/union_vector.fbs
|
||||
tsc
|
||||
node -r esm JavaScriptTest
|
||||
node -r esm JavaScriptUnionVectorTest
|
||||
node -r esm JavaScriptFlexBuffersTest
|
||||
@@ -16,20 +16,14 @@
|
||||
|
||||
pushd "$(dirname $0)" >/dev/null
|
||||
|
||||
npm install @types/flatbuffers
|
||||
npm run pretest
|
||||
# clean node_modules to make sure we depend on latest local flatbuffers at ../
|
||||
rm -rf node_modules
|
||||
npm install
|
||||
|
||||
export FB_TS_TEST="TRUE"
|
||||
|
||||
../flatc --ts --no-fb-import --gen-name-strings --gen-mutable --gen-object-api -o ts -I include_test monster_test.fbs
|
||||
../flatc --ts --gen-name-strings --gen-mutable --gen-object-api -o ts -I include_test monster_test.fbs
|
||||
../flatc --gen-object-api -b -I include_test monster_test.fbs unicode_test.json
|
||||
tsc --strict --noUnusedParameters --noUnusedLocals --noImplicitReturns --strictNullChecks ts/monster_test_generated.ts
|
||||
node JavaScriptTest ./ts/monster_test_generated
|
||||
|
||||
../flatc --ts --gen-name-strings --no-fb-import --gen-object-api -o ts union_vector/union_vector.fbs
|
||||
tsc --strict --noUnusedParameters --noUnusedLocals --noImplicitReturns --strictNullChecks ts/union_vector_generated.ts
|
||||
node JavaScriptUnionVectorTest ./ts/union_vector_generated
|
||||
|
||||
unset FB_TS_TEST
|
||||
|
||||
npm uninstall @types/flatbuffers
|
||||
../flatc --ts --gen-name-strings --gen-object-api -o ts union_vector/union_vector.fbs
|
||||
tsc
|
||||
node -r esm JavaScriptTest
|
||||
node -r esm JavaScriptUnionVectorTest
|
||||
node -r esm JavaScriptFlexBuffersTest
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
FROM node:10.13.0-stretch as base
|
||||
WORKDIR /code
|
||||
ADD . .
|
||||
RUN cp flatc_debian_stretch flatc
|
||||
WORKDIR /code/tests
|
||||
RUN node --version
|
||||
RUN ../flatc -b -I include_test monster_test.fbs unicode_test.json
|
||||
RUN npm install
|
||||
RUN npm run pretest
|
||||
RUN node JavaScriptTest ./monster_test_generated
|
||||
@@ -1,10 +0,0 @@
|
||||
FROM node:11.2.0-stretch as base
|
||||
WORKDIR /code
|
||||
ADD . .
|
||||
RUN cp flatc_debian_stretch flatc
|
||||
WORKDIR /code/tests
|
||||
RUN node --version
|
||||
RUN ../flatc -b -I include_test monster_test.fbs unicode_test.json
|
||||
RUN npm install
|
||||
RUN npm run pretest
|
||||
RUN node JavaScriptTest ./monster_test_generated
|
||||
6
tests/docker/languages/Dockerfile.testing.node.12_20_1
Normal file
6
tests/docker/languages/Dockerfile.testing.node.12_20_1
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM node:12.20.1-stretch as base
|
||||
WORKDIR /code
|
||||
ADD . .
|
||||
RUN cp flatc_debian_stretch flatc
|
||||
RUN npm install
|
||||
RUN npm test
|
||||
6
tests/docker/languages/Dockerfile.testing.node.14_15_4
Normal file
6
tests/docker/languages/Dockerfile.testing.node.14_15_4
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM node:14.15.4-stretch as base
|
||||
WORKDIR /code
|
||||
ADD . .
|
||||
RUN cp flatc_debian_stretch flatc
|
||||
RUN npm install
|
||||
RUN npm test
|
||||
@@ -32,18 +32,18 @@ set TEST_CS_FLAGS=--cs-gen-json-serializer
|
||||
set TEST_JS_TS_FLAGS=--gen-name-strings
|
||||
set TEST_RUST_FLAGS=--gen-name-strings
|
||||
set TEST_BASE_FLAGS=--reflect-names --gen-mutable --gen-object-api
|
||||
set TEST_NOINCL_FLAGS=%TEST_BASE_FLAGS% --no-includes --no-fb-import
|
||||
set TEST_NOINCL_FLAGS=%TEST_BASE_FLAGS% --no-includes
|
||||
|
||||
..\%buildtype%\flatc.exe --binary --cpp --java --kotlin --csharp --dart --go --lobster --lua --js --ts --php --grpc ^
|
||||
..\%buildtype%\flatc.exe --binary --cpp --java --kotlin --csharp --dart --go --lobster --lua --ts --php --grpc ^
|
||||
%TEST_NOINCL_FLAGS% %TEST_CPP_FLAGS% %TEST_CS_FLAGS% -I include_test monster_test.fbs monsterdata_test.json || goto FAIL
|
||||
..\%buildtype%\flatc.exe --rust %TEST_NOINCL_FLAGS% %TEST_RUST_FLAGS% -I include_test monster_test.fbs monsterdata_test.json || goto FAIL
|
||||
|
||||
..\%buildtype%\flatc.exe --python %TEST_BASE_FLAGS% --no-fb-import -I include_test monster_test.fbs monsterdata_test.json || goto FAIL
|
||||
..\%buildtype%\flatc.exe --python %TEST_BASE_FLAGS% -I include_test monster_test.fbs monsterdata_test.json || goto FAIL
|
||||
|
||||
..\%buildtype%\flatc.exe --binary --cpp --java --csharp --dart --go --lobster --lua --js --ts --php --python --rust ^
|
||||
..\%buildtype%\flatc.exe --binary --cpp --java --csharp --dart --go --lobster --lua --ts --php --python --rust ^
|
||||
%TEST_NOINCL_FLAGS% %TEST_CPP_FLAGS% %TEST_CS_FLAGS% %TEST_JS_TS_FLAGS% -o namespace_test namespace_test/namespace_test1.fbs namespace_test/namespace_test2.fbs || goto FAIL
|
||||
|
||||
..\%buildtype%\flatc.exe --cpp --java --csharp --js --ts --php %TEST_BASE_FLAGS% %TEST_CPP_FLAGS% %TEST_CS_FLAGS% %TEST_JS_TS_FLAGS% -o union_vector ./union_vector/union_vector.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe --cpp --java --csharp --ts --php %TEST_BASE_FLAGS% %TEST_CPP_FLAGS% %TEST_CS_FLAGS% %TEST_JS_TS_FLAGS% -o union_vector ./union_vector/union_vector.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe --rust -I include_test -o include_test include_test/include_test1.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe --rust -I include_test -o include_test/sub include_test/sub/include_test2.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe -b --schema --bfbs-comments --bfbs-builtins -I include_test monster_test.fbs || goto FAIL
|
||||
@@ -55,7 +55,7 @@ set TEST_NOINCL_FLAGS=%TEST_BASE_FLAGS% --no-includes --no-fb-import
|
||||
..\%buildtype%\flatc.exe --cpp %TEST_BASE_FLAGS% --cpp-ptr-type flatbuffers::unique_ptr native_type_test.fbs || goto FAIL
|
||||
|
||||
@rem Generate the optional scalar code for tests.
|
||||
..\%buildtype%\flatc.exe --java --kotlin --rust --lobster --ts --js optional_scalars.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe --java --kotlin --rust --lobster --ts optional_scalars.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe --csharp --gen-object-api optional_scalars.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe %TEST_NOINCL_FLAGS% %TEST_CPP_FLAGS% --cpp optional_scalars.fbs || goto FAIL
|
||||
|
||||
|
||||
@@ -29,18 +29,18 @@ TEST_CS_FLAGS="--cs-gen-json-serializer"
|
||||
TEST_JS_TS_FLAGS="--gen-name-strings"
|
||||
TEST_BASE_FLAGS="--reflect-names --gen-mutable --gen-object-api"
|
||||
TEST_RUST_FLAGS="$TEST_BASE_FLAGS --gen-name-strings"
|
||||
TEST_NOINCL_FLAGS="$TEST_BASE_FLAGS --no-includes --no-fb-import"
|
||||
TEST_NOINCL_FLAGS="$TEST_BASE_FLAGS --no-includes"
|
||||
|
||||
../flatc --binary --cpp --java --kotlin --csharp --dart --go --lobster --lua --js --ts --php --grpc \
|
||||
../flatc --binary --cpp --java --kotlin --csharp --dart --go --lobster --lua --ts --php --grpc \
|
||||
$TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS -I include_test monster_test.fbs monsterdata_test.json
|
||||
../flatc --rust $TEST_RUST_FLAGS -I include_test monster_test.fbs monsterdata_test.json
|
||||
|
||||
../flatc --python $TEST_BASE_FLAGS -I include_test monster_test.fbs monsterdata_test.json
|
||||
|
||||
../flatc --cpp --java --kotlin --csharp --dart --go --binary --lobster --lua --js --ts --php --python --rust \
|
||||
../flatc --cpp --java --kotlin --csharp --dart --go --binary --lobster --lua --ts --php --python --rust \
|
||||
$TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_JS_TS_FLAGS -o namespace_test namespace_test/namespace_test1.fbs namespace_test/namespace_test2.fbs
|
||||
|
||||
../flatc --cpp --java --kotlin --csharp --js --ts --php $TEST_BASE_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_JS_TS_FLAGS -o union_vector ./union_vector/union_vector.fbs
|
||||
../flatc --cpp --java --kotlin --csharp --ts --php $TEST_BASE_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_JS_TS_FLAGS -o union_vector ./union_vector/union_vector.fbs
|
||||
../flatc --rust -I include_test -o include_test include_test/include_test1.fbs
|
||||
../flatc --rust -I include_test -o include_test/sub include_test/sub/include_test2.fbs
|
||||
../flatc -b --schema --bfbs-comments --bfbs-builtins -I include_test monster_test.fbs
|
||||
@@ -53,7 +53,7 @@ $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_JS_TS_FLAGS -o namespace
|
||||
../flatc --dart monster_extra.fbs
|
||||
|
||||
# Generate optional scalar code for tests.
|
||||
../flatc --java --kotlin --rust --lobster --ts --js optional_scalars.fbs
|
||||
../flatc --java --kotlin --rust --lobster --ts optional_scalars.fbs
|
||||
../flatc --csharp --gen-object-api optional_scalars.fbs
|
||||
../flatc $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS --cpp optional_scalars.fbs
|
||||
|
||||
|
||||
92
tests/monster_test_grpc.d.ts
vendored
92
tests/monster_test_grpc.d.ts
vendored
@@ -1,92 +0,0 @@
|
||||
// Generated GRPC code for FlatBuffers TS *** DO NOT EDIT ***
|
||||
import { flatbuffers } from 'flatbuffers';
|
||||
import * as MonsterStorage_fbs from './monster_test_generated';
|
||||
|
||||
import * as grpc from 'grpc';
|
||||
|
||||
interface IMonsterStorageService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
||||
Store: IMonsterStorageService_IStore;
|
||||
Retrieve: IMonsterStorageService_IRetrieve;
|
||||
GetMaxHitPoint: IMonsterStorageService_IGetMaxHitPoint;
|
||||
GetMinMaxHitPoints: IMonsterStorageService_IGetMinMaxHitPoints;
|
||||
}
|
||||
interface IMonsterStorageService_IStore extends grpc.MethodDefinition<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat> {
|
||||
path: string; // /MyGame.Example.MonsterStorage/Store
|
||||
requestStream: boolean; // false
|
||||
responseStream: boolean; // false
|
||||
requestSerialize: grpc.serialize<MonsterStorage_fbs.Monster>;
|
||||
requestDeserialize: grpc.deserialize<MonsterStorage_fbs.Monster>;
|
||||
responseSerialize: grpc.serialize<MonsterStorage_fbs.Stat>;
|
||||
responseDeserialize: grpc.deserialize<MonsterStorage_fbs.Stat>;
|
||||
}
|
||||
|
||||
interface IMonsterStorageService_IRetrieve extends grpc.MethodDefinition<MonsterStorage_fbs.Stat, MonsterStorage_fbs.Monster> {
|
||||
path: string; // /MyGame.Example.MonsterStorage/Retrieve
|
||||
requestStream: boolean; // false
|
||||
responseStream: boolean; // true
|
||||
requestSerialize: grpc.serialize<MonsterStorage_fbs.Stat>;
|
||||
requestDeserialize: grpc.deserialize<MonsterStorage_fbs.Stat>;
|
||||
responseSerialize: grpc.serialize<MonsterStorage_fbs.Monster>;
|
||||
responseDeserialize: grpc.deserialize<MonsterStorage_fbs.Monster>;
|
||||
}
|
||||
|
||||
interface IMonsterStorageService_IGetMaxHitPoint extends grpc.MethodDefinition<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat> {
|
||||
path: string; // /MyGame.Example.MonsterStorage/GetMaxHitPoint
|
||||
requestStream: boolean; // true
|
||||
responseStream: boolean; // false
|
||||
requestSerialize: grpc.serialize<MonsterStorage_fbs.Monster>;
|
||||
requestDeserialize: grpc.deserialize<MonsterStorage_fbs.Monster>;
|
||||
responseSerialize: grpc.serialize<MonsterStorage_fbs.Stat>;
|
||||
responseDeserialize: grpc.deserialize<MonsterStorage_fbs.Stat>;
|
||||
}
|
||||
|
||||
interface IMonsterStorageService_IGetMinMaxHitPoints extends grpc.MethodDefinition<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat> {
|
||||
path: string; // /MyGame.Example.MonsterStorage/GetMinMaxHitPoints
|
||||
requestStream: boolean; // true
|
||||
responseStream: boolean; // true
|
||||
requestSerialize: grpc.serialize<MonsterStorage_fbs.Monster>;
|
||||
requestDeserialize: grpc.deserialize<MonsterStorage_fbs.Monster>;
|
||||
responseSerialize: grpc.serialize<MonsterStorage_fbs.Stat>;
|
||||
responseDeserialize: grpc.deserialize<MonsterStorage_fbs.Stat>;
|
||||
}
|
||||
|
||||
|
||||
export const MonsterStorageService: IMonsterStorageService;
|
||||
|
||||
export interface IMonsterStorageServer {
|
||||
Store: grpc.handleUnaryCall<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat>;
|
||||
Retrieve: grpc.handleServerStreamingCall<MonsterStorage_fbs.Stat, MonsterStorage_fbs.Monster>;
|
||||
GetMaxHitPoint: grpc.handleClientStreamingCall<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat>;
|
||||
GetMinMaxHitPoints: grpc.handleBidiStreamingCall<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat>;
|
||||
}
|
||||
|
||||
export interface IMonsterStorageClient {
|
||||
Store(request: MonsterStorage_fbs.Monster, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Stat) => void): grpc.ClientUnaryCall;
|
||||
Store(request: MonsterStorage_fbs.Monster, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Stat) => void): grpc.ClientUnaryCall;
|
||||
Store(request: MonsterStorage_fbs.Monster, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Stat) => void): grpc.ClientUnaryCall;
|
||||
Retrieve(request: MonsterStorage_fbs.Stat, metadata: grpc.Metadata): grpc.ClientReadableStream<MonsterStorage_fbs.Monster>;
|
||||
Retrieve(request: MonsterStorage_fbs.Stat, options: Partial<grpc.CallOptions>): grpc.ClientReadableStream<MonsterStorage_fbs.Monster>;
|
||||
GetMaxHitPoint(callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Monster) => void): grpc.ClientWritableStream<MonsterStorage_fbs.Stat>;
|
||||
GetMaxHitPoint(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Monster) => void): grpc.ClientWritableStream<MonsterStorage_fbs.Stat>;
|
||||
GetMaxHitPoint(options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Monster) => void): grpc.ClientWritableStream<MonsterStorage_fbs.Stat>;
|
||||
GetMaxHitPoint(metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Monster) => void): grpc.ClientWritableStream<MonsterStorage_fbs.Stat>;
|
||||
GetMinMaxHitPoints(): grpc.ClientDuplexStream<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat>;
|
||||
GetMinMaxHitPoints(options: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat>;
|
||||
GetMinMaxHitPoints(metadata: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat>;
|
||||
}
|
||||
|
||||
export class MonsterStorageClient extends grpc.Client implements IMonsterStorageClient {
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); public Store(request: MonsterStorage_fbs.Monster, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Stat) => void): grpc.ClientUnaryCall;
|
||||
public Store(request: MonsterStorage_fbs.Monster, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Stat) => void): grpc.ClientUnaryCall;
|
||||
public Store(request: MonsterStorage_fbs.Monster, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Stat) => void): grpc.ClientUnaryCall;
|
||||
public Retrieve(request: MonsterStorage_fbs.Stat, metadata: grpc.Metadata): grpc.ClientReadableStream<MonsterStorage_fbs.Monster>;
|
||||
public Retrieve(request: MonsterStorage_fbs.Stat, options: Partial<grpc.CallOptions>): grpc.ClientReadableStream<MonsterStorage_fbs.Monster>;
|
||||
public GetMaxHitPoint(callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Monster) => void): grpc.ClientWritableStream<MonsterStorage_fbs.Stat>;
|
||||
public GetMaxHitPoint(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Monster) => void): grpc.ClientWritableStream<MonsterStorage_fbs.Stat>;
|
||||
public GetMaxHitPoint(options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Monster) => void): grpc.ClientWritableStream<MonsterStorage_fbs.Stat>;
|
||||
public GetMaxHitPoint(metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MonsterStorage_fbs.Monster) => void): grpc.ClientWritableStream<MonsterStorage_fbs.Stat>;
|
||||
public GetMinMaxHitPoints(): grpc.ClientDuplexStream<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat>;
|
||||
public GetMinMaxHitPoints(options: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat>;
|
||||
public GetMinMaxHitPoints(metadata: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<MonsterStorage_fbs.Monster, MonsterStorage_fbs.Stat>;
|
||||
}
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
// Generated GRPC code for FlatBuffers TS *** DO NOT EDIT ***
|
||||
import { flatbuffers } from 'flatbuffers';
|
||||
import * as MonsterStorage_fbs from './monster_test_generated';
|
||||
|
||||
var grpc = require('grpc');
|
||||
|
||||
function serialize_Stat(buffer_args) {
|
||||
if (!(buffer_args instanceof MonsterStorage_fbs.Stat)) {
|
||||
throw new Error('Expected argument of type MonsterStorage_fbs.Stat');
|
||||
}
|
||||
return buffer_args.serialize();
|
||||
}
|
||||
|
||||
function deserialize_Stat(buffer) {
|
||||
return MonsterStorage_fbs.Stat.getRootAsStat(new flatbuffers.ByteBuffer(buffer))
|
||||
}
|
||||
|
||||
|
||||
function serialize_Monster(buffer_args) {
|
||||
if (!(buffer_args instanceof MonsterStorage_fbs.Monster)) {
|
||||
throw new Error('Expected argument of type MonsterStorage_fbs.Monster');
|
||||
}
|
||||
return buffer_args.serialize();
|
||||
}
|
||||
|
||||
function deserialize_Monster(buffer) {
|
||||
return MonsterStorage_fbs.Monster.getRootAsMonster(new flatbuffers.ByteBuffer(buffer))
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var MonsterStorageService = exports.MonsterStorageService = {
|
||||
Store: {
|
||||
path: '/MyGame.Example.MonsterStorage/Store',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: flatbuffers.ByteBuffer,
|
||||
responseType: MonsterStorage_fbs.Stat,
|
||||
requestSerialize: serialize_Monster,
|
||||
requestDeserialize: deserialize_Monster,
|
||||
responseSerialize: serialize_Stat,
|
||||
responseDeserialize: deserialize_Stat,
|
||||
},
|
||||
Retrieve: {
|
||||
path: '/MyGame.Example.MonsterStorage/Retrieve',
|
||||
requestStream: false,
|
||||
responseStream: true,
|
||||
requestType: flatbuffers.ByteBuffer,
|
||||
responseType: MonsterStorage_fbs.Monster,
|
||||
requestSerialize: serialize_Stat,
|
||||
requestDeserialize: deserialize_Stat,
|
||||
responseSerialize: serialize_Monster,
|
||||
responseDeserialize: deserialize_Monster,
|
||||
},
|
||||
GetMaxHitPoint: {
|
||||
path: '/MyGame.Example.MonsterStorage/GetMaxHitPoint',
|
||||
requestStream: true,
|
||||
responseStream: false,
|
||||
requestType: flatbuffers.ByteBuffer,
|
||||
responseType: MonsterStorage_fbs.Stat,
|
||||
requestSerialize: serialize_Monster,
|
||||
requestDeserialize: deserialize_Monster,
|
||||
responseSerialize: serialize_Stat,
|
||||
responseDeserialize: deserialize_Stat,
|
||||
},
|
||||
GetMinMaxHitPoints: {
|
||||
path: '/MyGame.Example.MonsterStorage/GetMinMaxHitPoints',
|
||||
requestStream: true,
|
||||
responseStream: true,
|
||||
requestType: flatbuffers.ByteBuffer,
|
||||
responseType: MonsterStorage_fbs.Stat,
|
||||
requestSerialize: serialize_Monster,
|
||||
requestDeserialize: deserialize_Monster,
|
||||
responseSerialize: serialize_Stat,
|
||||
responseDeserialize: deserialize_Stat,
|
||||
},
|
||||
};
|
||||
exports.MonsterStorageClient = grpc.makeGenericClientConstructor(MonsterStorageService);
|
||||
@@ -1,782 +0,0 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @namespace
|
||||
*/
|
||||
var optional_scalars = optional_scalars || {};
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
optional_scalars.OptionalByte = {
|
||||
None: 0,
|
||||
One: 1,
|
||||
Two: 2
|
||||
};
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
optional_scalars.OptionalByteName = {
|
||||
'0': 'None',
|
||||
'1': 'One',
|
||||
'2': 'Two'
|
||||
};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
optional_scalars.ScalarStuff = function() {
|
||||
/**
|
||||
* @type {flatbuffers.ByteBuffer}
|
||||
*/
|
||||
this.bb = null;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.bb_pos = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {number} i
|
||||
* @param {flatbuffers.ByteBuffer} bb
|
||||
* @returns {optional_scalars.ScalarStuff}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.__init = function(i, bb) {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.ByteBuffer} bb
|
||||
* @param {optional_scalars.ScalarStuff=} obj
|
||||
* @returns {optional_scalars.ScalarStuff}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.getRootAsScalarStuff = function(bb, obj) {
|
||||
return (obj || new optional_scalars.ScalarStuff).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.ByteBuffer} bb
|
||||
* @param {optional_scalars.ScalarStuff=} obj
|
||||
* @returns {optional_scalars.ScalarStuff}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.getSizePrefixedRootAsScalarStuff = function(bb, obj) {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new optional_scalars.ScalarStuff).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.ByteBuffer} bb
|
||||
* @returns {boolean}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.bufferHasIdentifier = function(bb) {
|
||||
return bb.__has_identifier('NULL');
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justI8 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb.readInt8(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeI8 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 6);
|
||||
return offset ? this.bb.readInt8(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultI8 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb.readInt8(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justU8 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 10);
|
||||
return offset ? this.bb.readUint8(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeU8 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 12);
|
||||
return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultU8 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 14);
|
||||
return offset ? this.bb.readUint8(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justI16 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 16);
|
||||
return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeI16 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 18);
|
||||
return offset ? this.bb.readInt16(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultI16 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 20);
|
||||
return offset ? this.bb.readInt16(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justU16 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 22);
|
||||
return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeU16 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 24);
|
||||
return offset ? this.bb.readUint16(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultU16 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 26);
|
||||
return offset ? this.bb.readUint16(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justI32 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 28);
|
||||
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeI32 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 30);
|
||||
return offset ? this.bb.readInt32(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultI32 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 32);
|
||||
return offset ? this.bb.readInt32(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justU32 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 34);
|
||||
return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeU32 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 36);
|
||||
return offset ? this.bb.readUint32(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultU32 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 38);
|
||||
return offset ? this.bb.readUint32(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {flatbuffers.Long}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justI64 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 40);
|
||||
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {flatbuffers.Long|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeI64 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 42);
|
||||
return offset ? this.bb.readInt64(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {flatbuffers.Long}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultI64 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 44);
|
||||
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(42, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {flatbuffers.Long}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justU64 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 46);
|
||||
return offset ? this.bb.readUint64(this.bb_pos + offset) : this.bb.createLong(0, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {flatbuffers.Long|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeU64 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 48);
|
||||
return offset ? this.bb.readUint64(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {flatbuffers.Long}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultU64 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 50);
|
||||
return offset ? this.bb.readUint64(this.bb_pos + offset) : this.bb.createLong(42, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justF32 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 52);
|
||||
return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeF32 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 54);
|
||||
return offset ? this.bb.readFloat32(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultF32 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 56);
|
||||
return offset ? this.bb.readFloat32(this.bb_pos + offset) : 42.0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justF64 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 58);
|
||||
return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeF64 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 60);
|
||||
return offset ? this.bb.readFloat64(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {number}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultF64 = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 62);
|
||||
return offset ? this.bb.readFloat64(this.bb_pos + offset) : 42.0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {boolean}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justBool = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 64);
|
||||
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {boolean|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeBool = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 66);
|
||||
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {boolean}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultBool = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 68);
|
||||
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {optional_scalars.OptionalByte}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.justEnum = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 70);
|
||||
return offset ? /** @type {optional_scalars.OptionalByte} */ (this.bb.readInt8(this.bb_pos + offset)) : optional_scalars.OptionalByte.None;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {optional_scalars.OptionalByte|null}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.maybeEnum = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 72);
|
||||
return offset ? /** @type {optional_scalars.OptionalByte} */ (this.bb.readInt8(this.bb_pos + offset)) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {optional_scalars.OptionalByte}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.prototype.defaultEnum = function() {
|
||||
var offset = this.bb.__offset(this.bb_pos, 74);
|
||||
return offset ? /** @type {optional_scalars.OptionalByte} */ (this.bb.readInt8(this.bb_pos + offset)) : optional_scalars.OptionalByte.One;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
*/
|
||||
optional_scalars.ScalarStuff.startScalarStuff = function(builder) {
|
||||
builder.startObject(36);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} justI8
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustI8 = function(builder, justI8) {
|
||||
builder.addFieldInt8(0, justI8, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} maybeI8
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeI8 = function(builder, maybeI8) {
|
||||
builder.addFieldInt8(1, maybeI8, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} defaultI8
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultI8 = function(builder, defaultI8) {
|
||||
builder.addFieldInt8(2, defaultI8, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} justU8
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustU8 = function(builder, justU8) {
|
||||
builder.addFieldInt8(3, justU8, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} maybeU8
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeU8 = function(builder, maybeU8) {
|
||||
builder.addFieldInt8(4, maybeU8, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} defaultU8
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultU8 = function(builder, defaultU8) {
|
||||
builder.addFieldInt8(5, defaultU8, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} justI16
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustI16 = function(builder, justI16) {
|
||||
builder.addFieldInt16(6, justI16, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} maybeI16
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeI16 = function(builder, maybeI16) {
|
||||
builder.addFieldInt16(7, maybeI16, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} defaultI16
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultI16 = function(builder, defaultI16) {
|
||||
builder.addFieldInt16(8, defaultI16, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} justU16
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustU16 = function(builder, justU16) {
|
||||
builder.addFieldInt16(9, justU16, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} maybeU16
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeU16 = function(builder, maybeU16) {
|
||||
builder.addFieldInt16(10, maybeU16, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} defaultU16
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultU16 = function(builder, defaultU16) {
|
||||
builder.addFieldInt16(11, defaultU16, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} justI32
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustI32 = function(builder, justI32) {
|
||||
builder.addFieldInt32(12, justI32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} maybeI32
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeI32 = function(builder, maybeI32) {
|
||||
builder.addFieldInt32(13, maybeI32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} defaultI32
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultI32 = function(builder, defaultI32) {
|
||||
builder.addFieldInt32(14, defaultI32, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} justU32
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustU32 = function(builder, justU32) {
|
||||
builder.addFieldInt32(15, justU32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} maybeU32
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeU32 = function(builder, maybeU32) {
|
||||
builder.addFieldInt32(16, maybeU32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} defaultU32
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultU32 = function(builder, defaultU32) {
|
||||
builder.addFieldInt32(17, defaultU32, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Long} justI64
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustI64 = function(builder, justI64) {
|
||||
builder.addFieldInt64(18, justI64, builder.createLong(0, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Long} maybeI64
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeI64 = function(builder, maybeI64) {
|
||||
builder.addFieldInt64(19, maybeI64, builder.createLong(0, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Long} defaultI64
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultI64 = function(builder, defaultI64) {
|
||||
builder.addFieldInt64(20, defaultI64, builder.createLong(42, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Long} justU64
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustU64 = function(builder, justU64) {
|
||||
builder.addFieldInt64(21, justU64, builder.createLong(0, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Long} maybeU64
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeU64 = function(builder, maybeU64) {
|
||||
builder.addFieldInt64(22, maybeU64, builder.createLong(0, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Long} defaultU64
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultU64 = function(builder, defaultU64) {
|
||||
builder.addFieldInt64(23, defaultU64, builder.createLong(42, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} justF32
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustF32 = function(builder, justF32) {
|
||||
builder.addFieldFloat32(24, justF32, 0.0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} maybeF32
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeF32 = function(builder, maybeF32) {
|
||||
builder.addFieldFloat32(25, maybeF32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} defaultF32
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultF32 = function(builder, defaultF32) {
|
||||
builder.addFieldFloat32(26, defaultF32, 42.0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} justF64
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustF64 = function(builder, justF64) {
|
||||
builder.addFieldFloat64(27, justF64, 0.0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} maybeF64
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeF64 = function(builder, maybeF64) {
|
||||
builder.addFieldFloat64(28, maybeF64, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} defaultF64
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultF64 = function(builder, defaultF64) {
|
||||
builder.addFieldFloat64(29, defaultF64, 42.0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {boolean} justBool
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustBool = function(builder, justBool) {
|
||||
builder.addFieldInt8(30, +justBool, +false);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {boolean} maybeBool
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeBool = function(builder, maybeBool) {
|
||||
builder.addFieldInt8(31, +maybeBool, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {boolean} defaultBool
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultBool = function(builder, defaultBool) {
|
||||
builder.addFieldInt8(32, +defaultBool, +true);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {optional_scalars.OptionalByte} justEnum
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addJustEnum = function(builder, justEnum) {
|
||||
builder.addFieldInt8(33, justEnum, optional_scalars.OptionalByte.None);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {optional_scalars.OptionalByte} maybeEnum
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addMaybeEnum = function(builder, maybeEnum) {
|
||||
builder.addFieldInt8(34, maybeEnum, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {optional_scalars.OptionalByte} defaultEnum
|
||||
*/
|
||||
optional_scalars.ScalarStuff.addDefaultEnum = function(builder, defaultEnum) {
|
||||
builder.addFieldInt8(35, defaultEnum, optional_scalars.OptionalByte.One);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @returns {flatbuffers.Offset}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.endScalarStuff = function(builder) {
|
||||
var offset = builder.endObject();
|
||||
return offset;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Offset} offset
|
||||
*/
|
||||
optional_scalars.ScalarStuff.finishScalarStuffBuffer = function(builder, offset) {
|
||||
builder.finish(offset, 'NULL');
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {flatbuffers.Offset} offset
|
||||
*/
|
||||
optional_scalars.ScalarStuff.finishSizePrefixedScalarStuffBuffer = function(builder, offset) {
|
||||
builder.finish(offset, 'NULL', true);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Builder} builder
|
||||
* @param {number} justI8
|
||||
* @param {number|null} maybeI8
|
||||
* @param {number} defaultI8
|
||||
* @param {number} justU8
|
||||
* @param {number|null} maybeU8
|
||||
* @param {number} defaultU8
|
||||
* @param {number} justI16
|
||||
* @param {number|null} maybeI16
|
||||
* @param {number} defaultI16
|
||||
* @param {number} justU16
|
||||
* @param {number|null} maybeU16
|
||||
* @param {number} defaultU16
|
||||
* @param {number} justI32
|
||||
* @param {number|null} maybeI32
|
||||
* @param {number} defaultI32
|
||||
* @param {number} justU32
|
||||
* @param {number|null} maybeU32
|
||||
* @param {number} defaultU32
|
||||
* @param {flatbuffers.Long} justI64
|
||||
* @param {flatbuffers.Long|null} maybeI64
|
||||
* @param {flatbuffers.Long} defaultI64
|
||||
* @param {flatbuffers.Long} justU64
|
||||
* @param {flatbuffers.Long|null} maybeU64
|
||||
* @param {flatbuffers.Long} defaultU64
|
||||
* @param {number} justF32
|
||||
* @param {number|null} maybeF32
|
||||
* @param {number} defaultF32
|
||||
* @param {number} justF64
|
||||
* @param {number|null} maybeF64
|
||||
* @param {number} defaultF64
|
||||
* @param {boolean} justBool
|
||||
* @param {boolean|null} maybeBool
|
||||
* @param {boolean} defaultBool
|
||||
* @param {optional_scalars.OptionalByte} justEnum
|
||||
* @param {optional_scalars.OptionalByte|null} maybeEnum
|
||||
* @param {optional_scalars.OptionalByte} defaultEnum
|
||||
* @returns {flatbuffers.Offset}
|
||||
*/
|
||||
optional_scalars.ScalarStuff.createScalarStuff = function(builder, justI8, maybeI8, defaultI8, justU8, maybeU8, defaultU8, justI16, maybeI16, defaultI16, justU16, maybeU16, defaultU16, justI32, maybeI32, defaultI32, justU32, maybeU32, defaultU32, justI64, maybeI64, defaultI64, justU64, maybeU64, defaultU64, justF32, maybeF32, defaultF32, justF64, maybeF64, defaultF64, justBool, maybeBool, defaultBool, justEnum, maybeEnum, defaultEnum) {
|
||||
optional_scalars.ScalarStuff.startScalarStuff(builder);
|
||||
optional_scalars.ScalarStuff.addJustI8(builder, justI8);
|
||||
if (maybeI8 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeI8(builder, maybeI8);
|
||||
optional_scalars.ScalarStuff.addDefaultI8(builder, defaultI8);
|
||||
optional_scalars.ScalarStuff.addJustU8(builder, justU8);
|
||||
if (maybeU8 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeU8(builder, maybeU8);
|
||||
optional_scalars.ScalarStuff.addDefaultU8(builder, defaultU8);
|
||||
optional_scalars.ScalarStuff.addJustI16(builder, justI16);
|
||||
if (maybeI16 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeI16(builder, maybeI16);
|
||||
optional_scalars.ScalarStuff.addDefaultI16(builder, defaultI16);
|
||||
optional_scalars.ScalarStuff.addJustU16(builder, justU16);
|
||||
if (maybeU16 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeU16(builder, maybeU16);
|
||||
optional_scalars.ScalarStuff.addDefaultU16(builder, defaultU16);
|
||||
optional_scalars.ScalarStuff.addJustI32(builder, justI32);
|
||||
if (maybeI32 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeI32(builder, maybeI32);
|
||||
optional_scalars.ScalarStuff.addDefaultI32(builder, defaultI32);
|
||||
optional_scalars.ScalarStuff.addJustU32(builder, justU32);
|
||||
if (maybeU32 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeU32(builder, maybeU32);
|
||||
optional_scalars.ScalarStuff.addDefaultU32(builder, defaultU32);
|
||||
optional_scalars.ScalarStuff.addJustI64(builder, justI64);
|
||||
if (maybeI64 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeI64(builder, maybeI64);
|
||||
optional_scalars.ScalarStuff.addDefaultI64(builder, defaultI64);
|
||||
optional_scalars.ScalarStuff.addJustU64(builder, justU64);
|
||||
if (maybeU64 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeU64(builder, maybeU64);
|
||||
optional_scalars.ScalarStuff.addDefaultU64(builder, defaultU64);
|
||||
optional_scalars.ScalarStuff.addJustF32(builder, justF32);
|
||||
if (maybeF32 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeF32(builder, maybeF32);
|
||||
optional_scalars.ScalarStuff.addDefaultF32(builder, defaultF32);
|
||||
optional_scalars.ScalarStuff.addJustF64(builder, justF64);
|
||||
if (maybeF64 !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeF64(builder, maybeF64);
|
||||
optional_scalars.ScalarStuff.addDefaultF64(builder, defaultF64);
|
||||
optional_scalars.ScalarStuff.addJustBool(builder, justBool);
|
||||
if (maybeBool !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeBool(builder, maybeBool);
|
||||
optional_scalars.ScalarStuff.addDefaultBool(builder, defaultBool);
|
||||
optional_scalars.ScalarStuff.addJustEnum(builder, justEnum);
|
||||
if (maybeEnum !== null)
|
||||
optional_scalars.ScalarStuff.addMaybeEnum(builder, maybeEnum);
|
||||
optional_scalars.ScalarStuff.addDefaultEnum(builder, defaultEnum);
|
||||
return optional_scalars.ScalarStuff.endScalarStuff(builder);
|
||||
}
|
||||
|
||||
// Exports for Node.js and RequireJS
|
||||
this.optional_scalars = optional_scalars;
|
||||
@@ -1,722 +0,0 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
export namespace optional_scalars{
|
||||
export enum OptionalByte{
|
||||
None= 0,
|
||||
One= 1,
|
||||
Two= 2
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
export namespace optional_scalars{
|
||||
export class ScalarStuff {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
|
||||
bb_pos:number = 0;
|
||||
/**
|
||||
* @param number i
|
||||
* @param flatbuffers.ByteBuffer bb
|
||||
* @returns ScalarStuff
|
||||
*/
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):ScalarStuff {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.ByteBuffer bb
|
||||
* @param ScalarStuff= obj
|
||||
* @returns ScalarStuff
|
||||
*/
|
||||
static getRootAsScalarStuff(bb:flatbuffers.ByteBuffer, obj?:ScalarStuff):ScalarStuff {
|
||||
return (obj || new ScalarStuff()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.ByteBuffer bb
|
||||
* @param ScalarStuff= obj
|
||||
* @returns ScalarStuff
|
||||
*/
|
||||
static getSizePrefixedRootAsScalarStuff(bb:flatbuffers.ByteBuffer, obj?:ScalarStuff):ScalarStuff {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new ScalarStuff()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.ByteBuffer bb
|
||||
* @returns boolean
|
||||
*/
|
||||
static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean {
|
||||
return bb.__has_identifier('NULL');
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
justI8():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb!.readInt8(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number|null
|
||||
*/
|
||||
maybeI8():number|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 6);
|
||||
return offset ? this.bb!.readInt8(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
defaultI8():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.readInt8(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
justU8():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 10);
|
||||
return offset ? this.bb!.readUint8(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number|null
|
||||
*/
|
||||
maybeU8():number|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 12);
|
||||
return offset ? this.bb!.readUint8(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
defaultU8():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 14);
|
||||
return offset ? this.bb!.readUint8(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
justI16():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 16);
|
||||
return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number|null
|
||||
*/
|
||||
maybeI16():number|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 18);
|
||||
return offset ? this.bb!.readInt16(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
defaultI16():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 20);
|
||||
return offset ? this.bb!.readInt16(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
justU16():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 22);
|
||||
return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number|null
|
||||
*/
|
||||
maybeU16():number|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 24);
|
||||
return offset ? this.bb!.readUint16(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
defaultU16():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 26);
|
||||
return offset ? this.bb!.readUint16(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
justI32():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 28);
|
||||
return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number|null
|
||||
*/
|
||||
maybeI32():number|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 30);
|
||||
return offset ? this.bb!.readInt32(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
defaultI32():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 32);
|
||||
return offset ? this.bb!.readInt32(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
justU32():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 34);
|
||||
return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number|null
|
||||
*/
|
||||
maybeU32():number|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 36);
|
||||
return offset ? this.bb!.readUint32(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
defaultU32():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 38);
|
||||
return offset ? this.bb!.readUint32(this.bb_pos + offset) : 42;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns flatbuffers.Long
|
||||
*/
|
||||
justI64():flatbuffers.Long {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 40);
|
||||
return offset ? this.bb!.readInt64(this.bb_pos + offset) : this.bb!.createLong(0, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns flatbuffers.Long|null
|
||||
*/
|
||||
maybeI64():flatbuffers.Long|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 42);
|
||||
return offset ? this.bb!.readInt64(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns flatbuffers.Long
|
||||
*/
|
||||
defaultI64():flatbuffers.Long {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 44);
|
||||
return offset ? this.bb!.readInt64(this.bb_pos + offset) : this.bb!.createLong(42, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns flatbuffers.Long
|
||||
*/
|
||||
justU64():flatbuffers.Long {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 46);
|
||||
return offset ? this.bb!.readUint64(this.bb_pos + offset) : this.bb!.createLong(0, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns flatbuffers.Long|null
|
||||
*/
|
||||
maybeU64():flatbuffers.Long|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 48);
|
||||
return offset ? this.bb!.readUint64(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns flatbuffers.Long
|
||||
*/
|
||||
defaultU64():flatbuffers.Long {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 50);
|
||||
return offset ? this.bb!.readUint64(this.bb_pos + offset) : this.bb!.createLong(42, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
justF32():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 52);
|
||||
return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number|null
|
||||
*/
|
||||
maybeF32():number|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 54);
|
||||
return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
defaultF32():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 56);
|
||||
return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 42.0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
justF64():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 58);
|
||||
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number|null
|
||||
*/
|
||||
maybeF64():number|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 60);
|
||||
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns number
|
||||
*/
|
||||
defaultF64():number {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 62);
|
||||
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 42.0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns boolean
|
||||
*/
|
||||
justBool():boolean {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 64);
|
||||
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns boolean|null
|
||||
*/
|
||||
maybeBool():boolean|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 66);
|
||||
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns boolean
|
||||
*/
|
||||
defaultBool():boolean {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 68);
|
||||
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns optional_scalars.OptionalByte
|
||||
*/
|
||||
justEnum():optional_scalars.OptionalByte {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 70);
|
||||
return offset ? /** */ (this.bb!.readInt8(this.bb_pos + offset)) : optional_scalars.OptionalByte.None;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns optional_scalars.OptionalByte|null
|
||||
*/
|
||||
maybeEnum():optional_scalars.OptionalByte|null {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 72);
|
||||
return offset ? /** */ (this.bb!.readInt8(this.bb_pos + offset)) : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns optional_scalars.OptionalByte
|
||||
*/
|
||||
defaultEnum():optional_scalars.OptionalByte {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 74);
|
||||
return offset ? /** */ (this.bb!.readInt8(this.bb_pos + offset)) : optional_scalars.OptionalByte.One;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
*/
|
||||
static startScalarStuff(builder:flatbuffers.Builder) {
|
||||
builder.startObject(36);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number justI8
|
||||
*/
|
||||
static addJustI8(builder:flatbuffers.Builder, justI8:number) {
|
||||
builder.addFieldInt8(0, justI8, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number maybeI8
|
||||
*/
|
||||
static addMaybeI8(builder:flatbuffers.Builder, maybeI8:number) {
|
||||
builder.addFieldInt8(1, maybeI8, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number defaultI8
|
||||
*/
|
||||
static addDefaultI8(builder:flatbuffers.Builder, defaultI8:number) {
|
||||
builder.addFieldInt8(2, defaultI8, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number justU8
|
||||
*/
|
||||
static addJustU8(builder:flatbuffers.Builder, justU8:number) {
|
||||
builder.addFieldInt8(3, justU8, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number maybeU8
|
||||
*/
|
||||
static addMaybeU8(builder:flatbuffers.Builder, maybeU8:number) {
|
||||
builder.addFieldInt8(4, maybeU8, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number defaultU8
|
||||
*/
|
||||
static addDefaultU8(builder:flatbuffers.Builder, defaultU8:number) {
|
||||
builder.addFieldInt8(5, defaultU8, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number justI16
|
||||
*/
|
||||
static addJustI16(builder:flatbuffers.Builder, justI16:number) {
|
||||
builder.addFieldInt16(6, justI16, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number maybeI16
|
||||
*/
|
||||
static addMaybeI16(builder:flatbuffers.Builder, maybeI16:number) {
|
||||
builder.addFieldInt16(7, maybeI16, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number defaultI16
|
||||
*/
|
||||
static addDefaultI16(builder:flatbuffers.Builder, defaultI16:number) {
|
||||
builder.addFieldInt16(8, defaultI16, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number justU16
|
||||
*/
|
||||
static addJustU16(builder:flatbuffers.Builder, justU16:number) {
|
||||
builder.addFieldInt16(9, justU16, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number maybeU16
|
||||
*/
|
||||
static addMaybeU16(builder:flatbuffers.Builder, maybeU16:number) {
|
||||
builder.addFieldInt16(10, maybeU16, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number defaultU16
|
||||
*/
|
||||
static addDefaultU16(builder:flatbuffers.Builder, defaultU16:number) {
|
||||
builder.addFieldInt16(11, defaultU16, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number justI32
|
||||
*/
|
||||
static addJustI32(builder:flatbuffers.Builder, justI32:number) {
|
||||
builder.addFieldInt32(12, justI32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number maybeI32
|
||||
*/
|
||||
static addMaybeI32(builder:flatbuffers.Builder, maybeI32:number) {
|
||||
builder.addFieldInt32(13, maybeI32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number defaultI32
|
||||
*/
|
||||
static addDefaultI32(builder:flatbuffers.Builder, defaultI32:number) {
|
||||
builder.addFieldInt32(14, defaultI32, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number justU32
|
||||
*/
|
||||
static addJustU32(builder:flatbuffers.Builder, justU32:number) {
|
||||
builder.addFieldInt32(15, justU32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number maybeU32
|
||||
*/
|
||||
static addMaybeU32(builder:flatbuffers.Builder, maybeU32:number) {
|
||||
builder.addFieldInt32(16, maybeU32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number defaultU32
|
||||
*/
|
||||
static addDefaultU32(builder:flatbuffers.Builder, defaultU32:number) {
|
||||
builder.addFieldInt32(17, defaultU32, 42);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param flatbuffers.Long justI64
|
||||
*/
|
||||
static addJustI64(builder:flatbuffers.Builder, justI64:flatbuffers.Long) {
|
||||
builder.addFieldInt64(18, justI64, builder.createLong(0, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param flatbuffers.Long maybeI64
|
||||
*/
|
||||
static addMaybeI64(builder:flatbuffers.Builder, maybeI64:flatbuffers.Long) {
|
||||
builder.addFieldInt64(19, maybeI64, builder.createLong(0, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param flatbuffers.Long defaultI64
|
||||
*/
|
||||
static addDefaultI64(builder:flatbuffers.Builder, defaultI64:flatbuffers.Long) {
|
||||
builder.addFieldInt64(20, defaultI64, builder.createLong(42, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param flatbuffers.Long justU64
|
||||
*/
|
||||
static addJustU64(builder:flatbuffers.Builder, justU64:flatbuffers.Long) {
|
||||
builder.addFieldInt64(21, justU64, builder.createLong(0, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param flatbuffers.Long maybeU64
|
||||
*/
|
||||
static addMaybeU64(builder:flatbuffers.Builder, maybeU64:flatbuffers.Long) {
|
||||
builder.addFieldInt64(22, maybeU64, builder.createLong(0, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param flatbuffers.Long defaultU64
|
||||
*/
|
||||
static addDefaultU64(builder:flatbuffers.Builder, defaultU64:flatbuffers.Long) {
|
||||
builder.addFieldInt64(23, defaultU64, builder.createLong(42, 0));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number justF32
|
||||
*/
|
||||
static addJustF32(builder:flatbuffers.Builder, justF32:number) {
|
||||
builder.addFieldFloat32(24, justF32, 0.0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number maybeF32
|
||||
*/
|
||||
static addMaybeF32(builder:flatbuffers.Builder, maybeF32:number) {
|
||||
builder.addFieldFloat32(25, maybeF32, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number defaultF32
|
||||
*/
|
||||
static addDefaultF32(builder:flatbuffers.Builder, defaultF32:number) {
|
||||
builder.addFieldFloat32(26, defaultF32, 42.0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number justF64
|
||||
*/
|
||||
static addJustF64(builder:flatbuffers.Builder, justF64:number) {
|
||||
builder.addFieldFloat64(27, justF64, 0.0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number maybeF64
|
||||
*/
|
||||
static addMaybeF64(builder:flatbuffers.Builder, maybeF64:number) {
|
||||
builder.addFieldFloat64(28, maybeF64, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param number defaultF64
|
||||
*/
|
||||
static addDefaultF64(builder:flatbuffers.Builder, defaultF64:number) {
|
||||
builder.addFieldFloat64(29, defaultF64, 42.0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param boolean justBool
|
||||
*/
|
||||
static addJustBool(builder:flatbuffers.Builder, justBool:boolean) {
|
||||
builder.addFieldInt8(30, +justBool, +false);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param boolean maybeBool
|
||||
*/
|
||||
static addMaybeBool(builder:flatbuffers.Builder, maybeBool:boolean) {
|
||||
builder.addFieldInt8(31, +maybeBool, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param boolean defaultBool
|
||||
*/
|
||||
static addDefaultBool(builder:flatbuffers.Builder, defaultBool:boolean) {
|
||||
builder.addFieldInt8(32, +defaultBool, +true);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param optional_scalars.OptionalByte justEnum
|
||||
*/
|
||||
static addJustEnum(builder:flatbuffers.Builder, justEnum:optional_scalars.OptionalByte) {
|
||||
builder.addFieldInt8(33, justEnum, optional_scalars.OptionalByte.None);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param optional_scalars.OptionalByte maybeEnum
|
||||
*/
|
||||
static addMaybeEnum(builder:flatbuffers.Builder, maybeEnum:optional_scalars.OptionalByte) {
|
||||
builder.addFieldInt8(34, maybeEnum, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param optional_scalars.OptionalByte defaultEnum
|
||||
*/
|
||||
static addDefaultEnum(builder:flatbuffers.Builder, defaultEnum:optional_scalars.OptionalByte) {
|
||||
builder.addFieldInt8(35, defaultEnum, optional_scalars.OptionalByte.One);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @returns flatbuffers.Offset
|
||||
*/
|
||||
static endScalarStuff(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
var offset = builder.endObject();
|
||||
return offset;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param flatbuffers.Offset offset
|
||||
*/
|
||||
static finishScalarStuffBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
||||
builder.finish(offset, 'NULL');
|
||||
};
|
||||
|
||||
/**
|
||||
* @param flatbuffers.Builder builder
|
||||
* @param flatbuffers.Offset offset
|
||||
*/
|
||||
static finishSizePrefixedScalarStuffBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
||||
builder.finish(offset, 'NULL', true);
|
||||
};
|
||||
|
||||
static createScalarStuff(builder:flatbuffers.Builder, justI8:number, maybeI8:number|null, defaultI8:number, justU8:number, maybeU8:number|null, defaultU8:number, justI16:number, maybeI16:number|null, defaultI16:number, justU16:number, maybeU16:number|null, defaultU16:number, justI32:number, maybeI32:number|null, defaultI32:number, justU32:number, maybeU32:number|null, defaultU32:number, justI64:flatbuffers.Long, maybeI64:flatbuffers.Long|null, defaultI64:flatbuffers.Long, justU64:flatbuffers.Long, maybeU64:flatbuffers.Long|null, defaultU64:flatbuffers.Long, justF32:number, maybeF32:number|null, defaultF32:number, justF64:number, maybeF64:number|null, defaultF64:number, justBool:boolean, maybeBool:boolean|null, defaultBool:boolean, justEnum:optional_scalars.OptionalByte, maybeEnum:optional_scalars.OptionalByte|null, defaultEnum:optional_scalars.OptionalByte):flatbuffers.Offset {
|
||||
ScalarStuff.startScalarStuff(builder);
|
||||
ScalarStuff.addJustI8(builder, justI8);
|
||||
if (maybeI8 !== null)
|
||||
ScalarStuff.addMaybeI8(builder, maybeI8);
|
||||
ScalarStuff.addDefaultI8(builder, defaultI8);
|
||||
ScalarStuff.addJustU8(builder, justU8);
|
||||
if (maybeU8 !== null)
|
||||
ScalarStuff.addMaybeU8(builder, maybeU8);
|
||||
ScalarStuff.addDefaultU8(builder, defaultU8);
|
||||
ScalarStuff.addJustI16(builder, justI16);
|
||||
if (maybeI16 !== null)
|
||||
ScalarStuff.addMaybeI16(builder, maybeI16);
|
||||
ScalarStuff.addDefaultI16(builder, defaultI16);
|
||||
ScalarStuff.addJustU16(builder, justU16);
|
||||
if (maybeU16 !== null)
|
||||
ScalarStuff.addMaybeU16(builder, maybeU16);
|
||||
ScalarStuff.addDefaultU16(builder, defaultU16);
|
||||
ScalarStuff.addJustI32(builder, justI32);
|
||||
if (maybeI32 !== null)
|
||||
ScalarStuff.addMaybeI32(builder, maybeI32);
|
||||
ScalarStuff.addDefaultI32(builder, defaultI32);
|
||||
ScalarStuff.addJustU32(builder, justU32);
|
||||
if (maybeU32 !== null)
|
||||
ScalarStuff.addMaybeU32(builder, maybeU32);
|
||||
ScalarStuff.addDefaultU32(builder, defaultU32);
|
||||
ScalarStuff.addJustI64(builder, justI64);
|
||||
if (maybeI64 !== null)
|
||||
ScalarStuff.addMaybeI64(builder, maybeI64);
|
||||
ScalarStuff.addDefaultI64(builder, defaultI64);
|
||||
ScalarStuff.addJustU64(builder, justU64);
|
||||
if (maybeU64 !== null)
|
||||
ScalarStuff.addMaybeU64(builder, maybeU64);
|
||||
ScalarStuff.addDefaultU64(builder, defaultU64);
|
||||
ScalarStuff.addJustF32(builder, justF32);
|
||||
if (maybeF32 !== null)
|
||||
ScalarStuff.addMaybeF32(builder, maybeF32);
|
||||
ScalarStuff.addDefaultF32(builder, defaultF32);
|
||||
ScalarStuff.addJustF64(builder, justF64);
|
||||
if (maybeF64 !== null)
|
||||
ScalarStuff.addMaybeF64(builder, maybeF64);
|
||||
ScalarStuff.addDefaultF64(builder, defaultF64);
|
||||
ScalarStuff.addJustBool(builder, justBool);
|
||||
if (maybeBool !== null)
|
||||
ScalarStuff.addMaybeBool(builder, maybeBool);
|
||||
ScalarStuff.addDefaultBool(builder, defaultBool);
|
||||
ScalarStuff.addJustEnum(builder, justEnum);
|
||||
if (maybeEnum !== null)
|
||||
ScalarStuff.addMaybeEnum(builder, maybeEnum);
|
||||
ScalarStuff.addDefaultEnum(builder, defaultEnum);
|
||||
return ScalarStuff.endScalarStuff(builder);
|
||||
}
|
||||
}
|
||||
}
|
||||
6
tests/package.json
Normal file
6
tests/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"esm": "^3.2.25",
|
||||
"flatbuffers": "../"
|
||||
}
|
||||
}
|
||||
76
tests/ts/attacker.ts
Normal file
76
tests/ts/attacker.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class Attacker {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Attacker {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
static getRootAsAttacker(bb:flatbuffers.ByteBuffer, obj?:Attacker):Attacker {
|
||||
return (obj || new Attacker()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getSizePrefixedRootAsAttacker(bb:flatbuffers.ByteBuffer, obj?:Attacker):Attacker {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new Attacker()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
swordAttackDamage():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'Attacker';
|
||||
}
|
||||
|
||||
static startAttacker(builder:flatbuffers.Builder) {
|
||||
builder.startObject(1);
|
||||
}
|
||||
|
||||
static addSwordAttackDamage(builder:flatbuffers.Builder, swordAttackDamage:number) {
|
||||
builder.addFieldInt32(0, swordAttackDamage, 0);
|
||||
}
|
||||
|
||||
static endAttacker(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createAttacker(builder:flatbuffers.Builder, swordAttackDamage:number):flatbuffers.Offset {
|
||||
Attacker.startAttacker(builder);
|
||||
Attacker.addSwordAttackDamage(builder, swordAttackDamage);
|
||||
return Attacker.endAttacker(builder);
|
||||
}
|
||||
|
||||
unpack(): AttackerT {
|
||||
return new AttackerT(
|
||||
this.swordAttackDamage()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: AttackerT): void {
|
||||
_o.swordAttackDamage = this.swordAttackDamage();
|
||||
}
|
||||
}
|
||||
|
||||
export class AttackerT {
|
||||
constructor(
|
||||
public swordAttackDamage: number = 0
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return Attacker.createAttacker(builder,
|
||||
this.swordAttackDamage
|
||||
);
|
||||
}
|
||||
}
|
||||
58
tests/ts/book-reader.ts
Normal file
58
tests/ts/book-reader.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class BookReader {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):BookReader {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
booksRead():number {
|
||||
return this.bb!.readInt32(this.bb_pos);
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'BookReader';
|
||||
}
|
||||
|
||||
static sizeOf():number {
|
||||
return 4;
|
||||
}
|
||||
|
||||
static createBookReader(builder:flatbuffers.Builder, books_read: number):flatbuffers.Offset {
|
||||
builder.prep(4, 4);
|
||||
builder.writeInt32(books_read);
|
||||
return builder.offset();
|
||||
}
|
||||
|
||||
|
||||
unpack(): BookReaderT {
|
||||
return new BookReaderT(
|
||||
this.booksRead()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: BookReaderT): void {
|
||||
_o.booksRead = this.booksRead();
|
||||
}
|
||||
}
|
||||
|
||||
export class BookReaderT {
|
||||
constructor(
|
||||
public booksRead: number = 0
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return BookReader.createBookReader(builder,
|
||||
this.booksRead
|
||||
);
|
||||
}
|
||||
}
|
||||
50
tests/ts/character.ts
Normal file
50
tests/ts/character.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import { Attacker, AttackerT } from './attacker';
|
||||
import { BookReader, BookReaderT } from './book-reader';
|
||||
import { Rapunzel, RapunzelT } from './rapunzel';
|
||||
|
||||
|
||||
export enum Character{
|
||||
NONE = 0,
|
||||
MuLan = 1,
|
||||
Rapunzel = 2,
|
||||
Belle = 3,
|
||||
BookFan = 4,
|
||||
Other = 5,
|
||||
Unused = 6
|
||||
}
|
||||
|
||||
export function unionToCharacter(
|
||||
type: Character,
|
||||
accessor: (obj:Attacker|BookReader|Rapunzel|string) => Attacker|BookReader|Rapunzel|string|null
|
||||
): Attacker|BookReader|Rapunzel|string|null {
|
||||
switch(Character[type]) {
|
||||
case 'NONE': return null;
|
||||
case 'MuLan': return accessor(new Attacker())! as Attacker;
|
||||
case 'Rapunzel': return accessor(new Rapunzel())! as Rapunzel;
|
||||
case 'Belle': return accessor(new BookReader())! as BookReader;
|
||||
case 'BookFan': return accessor(new BookReader())! as BookReader;
|
||||
case 'Other': return accessor('') as string;
|
||||
case 'Unused': return accessor('') as string;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function unionListToCharacter(
|
||||
type: Character,
|
||||
accessor: (index: number, obj:Attacker|BookReader|Rapunzel|string) => Attacker|BookReader|Rapunzel|string|null,
|
||||
index: number
|
||||
): Attacker|BookReader|Rapunzel|string|null {
|
||||
switch(Character[type]) {
|
||||
case 'NONE': return null;
|
||||
case 'MuLan': return accessor(index, new Attacker())! as Attacker;
|
||||
case 'Rapunzel': return accessor(index, new Rapunzel())! as Rapunzel;
|
||||
case 'Belle': return accessor(index, new BookReader())! as BookReader;
|
||||
case 'BookFan': return accessor(index, new BookReader())! as BookReader;
|
||||
case 'Other': return accessor(index, '') as string;
|
||||
case 'Unused': return accessor(index, '') as string;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
211
tests/ts/movie.ts
Normal file
211
tests/ts/movie.ts
Normal file
@@ -0,0 +1,211 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
import { Attacker, AttackerT } from './attacker';
|
||||
import { BookReader, BookReaderT } from './book-reader';
|
||||
import { Character, unionToCharacter, unionListToCharacter } from './character';
|
||||
import { Rapunzel, RapunzelT } from './rapunzel';
|
||||
|
||||
|
||||
export class Movie {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Movie {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
static getRootAsMovie(bb:flatbuffers.ByteBuffer, obj?:Movie):Movie {
|
||||
return (obj || new Movie()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getSizePrefixedRootAsMovie(bb:flatbuffers.ByteBuffer, obj?:Movie):Movie {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new Movie()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean {
|
||||
return bb.__has_identifier('MOVI');
|
||||
}
|
||||
|
||||
mainCharacterType():Character {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb!.readUint8(this.bb_pos + offset) : Character.NONE;
|
||||
}
|
||||
|
||||
mainCharacter<T extends flatbuffers.Table>(obj:any|string):any|string|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||
return offset ? this.bb!.__union_with_string(obj, this.bb_pos + offset) : null;
|
||||
}
|
||||
|
||||
charactersType(index: number):Character|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0;
|
||||
}
|
||||
|
||||
charactersTypeLength():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
charactersTypeArray():Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null;
|
||||
}
|
||||
|
||||
characters(index: number, obj:any|string):any|string|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||
return offset ? this.bb!.__union_with_string(obj, this.bb!.__vector(this.bb_pos + offset) + index * 4) : null;
|
||||
}
|
||||
|
||||
charactersLength():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'Movie';
|
||||
}
|
||||
|
||||
static startMovie(builder:flatbuffers.Builder) {
|
||||
builder.startObject(4);
|
||||
}
|
||||
|
||||
static addMainCharacterType(builder:flatbuffers.Builder, mainCharacterType:Character) {
|
||||
builder.addFieldInt8(0, mainCharacterType, Character.NONE);
|
||||
}
|
||||
|
||||
static addMainCharacter(builder:flatbuffers.Builder, mainCharacterOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(1, mainCharacterOffset, 0);
|
||||
}
|
||||
|
||||
static addCharactersType(builder:flatbuffers.Builder, charactersTypeOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(2, charactersTypeOffset, 0);
|
||||
}
|
||||
|
||||
static createCharactersTypeVector(builder:flatbuffers.Builder, data:Character[]):flatbuffers.Offset {
|
||||
builder.startVector(1, data.length, 1);
|
||||
for (let i = data.length - 1; i >= 0; i--) {
|
||||
builder.addInt8(data[i]);
|
||||
}
|
||||
return builder.endVector();
|
||||
}
|
||||
|
||||
static startCharactersTypeVector(builder:flatbuffers.Builder, numElems:number) {
|
||||
builder.startVector(1, numElems, 1);
|
||||
}
|
||||
|
||||
static addCharacters(builder:flatbuffers.Builder, charactersOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(3, charactersOffset, 0);
|
||||
}
|
||||
|
||||
static createCharactersVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
|
||||
builder.startVector(4, data.length, 4);
|
||||
for (let i = data.length - 1; i >= 0; i--) {
|
||||
builder.addOffset(data[i]);
|
||||
}
|
||||
return builder.endVector();
|
||||
}
|
||||
|
||||
static startCharactersVector(builder:flatbuffers.Builder, numElems:number) {
|
||||
builder.startVector(4, numElems, 4);
|
||||
}
|
||||
|
||||
static endMovie(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static finishMovieBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
||||
builder.finish(offset, 'MOVI');
|
||||
}
|
||||
|
||||
static finishSizePrefixedMovieBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
||||
builder.finish(offset, 'MOVI', true);
|
||||
}
|
||||
|
||||
static createMovie(builder:flatbuffers.Builder, mainCharacterType:Character, mainCharacterOffset:flatbuffers.Offset, charactersTypeOffset:flatbuffers.Offset, charactersOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||
Movie.startMovie(builder);
|
||||
Movie.addMainCharacterType(builder, mainCharacterType);
|
||||
Movie.addMainCharacter(builder, mainCharacterOffset);
|
||||
Movie.addCharactersType(builder, charactersTypeOffset);
|
||||
Movie.addCharacters(builder, charactersOffset);
|
||||
return Movie.endMovie(builder);
|
||||
}
|
||||
|
||||
unpack(): MovieT {
|
||||
return new MovieT(
|
||||
this.mainCharacterType(),
|
||||
(() => {
|
||||
let temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this));
|
||||
if(temp === null) { return null; }
|
||||
if(typeof temp === 'string') { return temp; }
|
||||
return temp.unpack()
|
||||
})(),
|
||||
this.bb!.createScalarList(this.charactersType.bind(this), this.charactersTypeLength()),
|
||||
(() => {
|
||||
let ret = [];
|
||||
for(let targetEnumIndex = 0; targetEnumIndex < this.charactersTypeLength(); ++targetEnumIndex) {
|
||||
let targetEnum = this.charactersType(targetEnumIndex);
|
||||
if(targetEnum === null || Character[targetEnum!] === 'NONE') { continue; }
|
||||
|
||||
let temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex);
|
||||
if(temp === null) { continue; }
|
||||
if(typeof temp === 'string') { ret.push(temp); continue; }
|
||||
ret.push(temp.unpack());
|
||||
}
|
||||
return ret;
|
||||
})()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: MovieT): void {
|
||||
_o.mainCharacterType = this.mainCharacterType();
|
||||
_o.mainCharacter = (() => {
|
||||
let temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this));
|
||||
if(temp === null) { return null; }
|
||||
if(typeof temp === 'string') { return temp; }
|
||||
return temp.unpack()
|
||||
})();
|
||||
_o.charactersType = this.bb!.createScalarList(this.charactersType.bind(this), this.charactersTypeLength());
|
||||
_o.characters = (() => {
|
||||
let ret = [];
|
||||
for(let targetEnumIndex = 0; targetEnumIndex < this.charactersTypeLength(); ++targetEnumIndex) {
|
||||
let targetEnum = this.charactersType(targetEnumIndex);
|
||||
if(targetEnum === null || Character[targetEnum!] === 'NONE') { continue; }
|
||||
|
||||
let temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex);
|
||||
if(temp === null) { continue; }
|
||||
if(typeof temp === 'string') { ret.push(temp); continue; }
|
||||
ret.push(temp.unpack());
|
||||
}
|
||||
return ret;
|
||||
})();
|
||||
}
|
||||
}
|
||||
|
||||
export class MovieT {
|
||||
constructor(
|
||||
public mainCharacterType: Character = Character.NONE,
|
||||
public mainCharacter: AttackerT|BookReaderT|RapunzelT|string|null = null,
|
||||
public charactersType: (Character)[] = [],
|
||||
public characters: (AttackerT|BookReaderT|RapunzelT|string)[] = []
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
const mainCharacter = builder.createObjectOffset(this.mainCharacter);
|
||||
const charactersType = Movie.createCharactersTypeVector(builder, this.charactersType);
|
||||
const characters = Movie.createCharactersVector(builder, builder.createObjectOffsetList(this.characters));
|
||||
|
||||
return Movie.createMovie(builder,
|
||||
this.mainCharacterType,
|
||||
mainCharacter,
|
||||
charactersType,
|
||||
characters
|
||||
);
|
||||
}
|
||||
}
|
||||
77
tests/ts/my-game/example/ability.ts
Normal file
77
tests/ts/my-game/example/ability.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class Ability {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Ability {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
id():number {
|
||||
return this.bb!.readUint32(this.bb_pos);
|
||||
}
|
||||
|
||||
mutate_id(value:number):boolean {
|
||||
this.bb!.writeUint32(this.bb_pos + 0, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
distance():number {
|
||||
return this.bb!.readUint32(this.bb_pos + 4);
|
||||
}
|
||||
|
||||
mutate_distance(value:number):boolean {
|
||||
this.bb!.writeUint32(this.bb_pos + 4, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.Example.Ability';
|
||||
}
|
||||
|
||||
static sizeOf():number {
|
||||
return 8;
|
||||
}
|
||||
|
||||
static createAbility(builder:flatbuffers.Builder, id: number, distance: number):flatbuffers.Offset {
|
||||
builder.prep(4, 8);
|
||||
builder.writeInt32(distance);
|
||||
builder.writeInt32(id);
|
||||
return builder.offset();
|
||||
}
|
||||
|
||||
|
||||
unpack(): AbilityT {
|
||||
return new AbilityT(
|
||||
this.id(),
|
||||
this.distance()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: AbilityT): void {
|
||||
_o.id = this.id();
|
||||
_o.distance = this.distance();
|
||||
}
|
||||
}
|
||||
|
||||
export class AbilityT {
|
||||
constructor(
|
||||
public id: number = 0,
|
||||
public distance: number = 0
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return Ability.createAbility(builder,
|
||||
this.id,
|
||||
this.distance
|
||||
);
|
||||
}
|
||||
}
|
||||
39
tests/ts/my-game/example/any-ambiguous-aliases.ts
Normal file
39
tests/ts/my-game/example/any-ambiguous-aliases.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import { Monster, MonsterT } from '../../my-game/example/monster';
|
||||
|
||||
|
||||
export enum AnyAmbiguousAliases{
|
||||
NONE = 0,
|
||||
M1 = 1,
|
||||
M2 = 2,
|
||||
M3 = 3
|
||||
}
|
||||
|
||||
export function unionToAnyAmbiguousAliases(
|
||||
type: AnyAmbiguousAliases,
|
||||
accessor: (obj:Monster) => Monster|null
|
||||
): Monster|null {
|
||||
switch(AnyAmbiguousAliases[type]) {
|
||||
case 'NONE': return null;
|
||||
case 'M1': return accessor(new Monster())! as Monster;
|
||||
case 'M2': return accessor(new Monster())! as Monster;
|
||||
case 'M3': return accessor(new Monster())! as Monster;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function unionListToAnyAmbiguousAliases(
|
||||
type: AnyAmbiguousAliases,
|
||||
accessor: (index: number, obj:Monster) => Monster|null,
|
||||
index: number
|
||||
): Monster|null {
|
||||
switch(AnyAmbiguousAliases[type]) {
|
||||
case 'NONE': return null;
|
||||
case 'M1': return accessor(index, new Monster())! as Monster;
|
||||
case 'M2': return accessor(index, new Monster())! as Monster;
|
||||
case 'M3': return accessor(index, new Monster())! as Monster;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
41
tests/ts/my-game/example/any-unique-aliases.ts
Normal file
41
tests/ts/my-game/example/any-unique-aliases.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import { Monster as MyGameExample2Monster, MonsterT as MyGameExample2MonsterT } from '../../my-game/example2/monster';
|
||||
import { Monster, MonsterT } from '../../my-game/example/monster';
|
||||
import { TestSimpleTableWithEnum, TestSimpleTableWithEnumT } from '../../my-game/example/test-simple-table-with-enum';
|
||||
|
||||
|
||||
export enum AnyUniqueAliases{
|
||||
NONE = 0,
|
||||
M = 1,
|
||||
TS = 2,
|
||||
M2 = 3
|
||||
}
|
||||
|
||||
export function unionToAnyUniqueAliases(
|
||||
type: AnyUniqueAliases,
|
||||
accessor: (obj:Monster|MyGameExample2Monster|TestSimpleTableWithEnum) => Monster|MyGameExample2Monster|TestSimpleTableWithEnum|null
|
||||
): Monster|MyGameExample2Monster|TestSimpleTableWithEnum|null {
|
||||
switch(AnyUniqueAliases[type]) {
|
||||
case 'NONE': return null;
|
||||
case 'M': return accessor(new Monster())! as Monster;
|
||||
case 'TS': return accessor(new TestSimpleTableWithEnum())! as TestSimpleTableWithEnum;
|
||||
case 'M2': return accessor(new MyGameExample2Monster())! as MyGameExample2Monster;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function unionListToAnyUniqueAliases(
|
||||
type: AnyUniqueAliases,
|
||||
accessor: (index: number, obj:Monster|MyGameExample2Monster|TestSimpleTableWithEnum) => Monster|MyGameExample2Monster|TestSimpleTableWithEnum|null,
|
||||
index: number
|
||||
): Monster|MyGameExample2Monster|TestSimpleTableWithEnum|null {
|
||||
switch(AnyUniqueAliases[type]) {
|
||||
case 'NONE': return null;
|
||||
case 'M': return accessor(index, new Monster())! as Monster;
|
||||
case 'TS': return accessor(index, new TestSimpleTableWithEnum())! as TestSimpleTableWithEnum;
|
||||
case 'M2': return accessor(index, new MyGameExample2Monster())! as MyGameExample2Monster;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
41
tests/ts/my-game/example/any.ts
Normal file
41
tests/ts/my-game/example/any.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import { Monster as MyGameExample2Monster, MonsterT as MyGameExample2MonsterT } from '../../my-game/example2/monster';
|
||||
import { Monster, MonsterT } from '../../my-game/example/monster';
|
||||
import { TestSimpleTableWithEnum, TestSimpleTableWithEnumT } from '../../my-game/example/test-simple-table-with-enum';
|
||||
|
||||
|
||||
export enum Any{
|
||||
NONE = 0,
|
||||
Monster = 1,
|
||||
TestSimpleTableWithEnum = 2,
|
||||
MyGame_Example2_Monster = 3
|
||||
}
|
||||
|
||||
export function unionToAny(
|
||||
type: Any,
|
||||
accessor: (obj:Monster|MyGameExample2Monster|TestSimpleTableWithEnum) => Monster|MyGameExample2Monster|TestSimpleTableWithEnum|null
|
||||
): Monster|MyGameExample2Monster|TestSimpleTableWithEnum|null {
|
||||
switch(Any[type]) {
|
||||
case 'NONE': return null;
|
||||
case 'Monster': return accessor(new Monster())! as Monster;
|
||||
case 'TestSimpleTableWithEnum': return accessor(new TestSimpleTableWithEnum())! as TestSimpleTableWithEnum;
|
||||
case 'MyGame_Example2_Monster': return accessor(new MyGameExample2Monster())! as MyGameExample2Monster;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function unionListToAny(
|
||||
type: Any,
|
||||
accessor: (index: number, obj:Monster|MyGameExample2Monster|TestSimpleTableWithEnum) => Monster|MyGameExample2Monster|TestSimpleTableWithEnum|null,
|
||||
index: number
|
||||
): Monster|MyGameExample2Monster|TestSimpleTableWithEnum|null {
|
||||
switch(Any[type]) {
|
||||
case 'NONE': return null;
|
||||
case 'Monster': return accessor(index, new Monster())! as Monster;
|
||||
case 'TestSimpleTableWithEnum': return accessor(index, new TestSimpleTableWithEnum())! as TestSimpleTableWithEnum;
|
||||
case 'MyGame_Example2_Monster': return accessor(index, new MyGameExample2Monster())! as MyGameExample2Monster;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
20
tests/ts/my-game/example/color.ts
Normal file
20
tests/ts/my-game/example/color.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
/**
|
||||
* Composite components of Monster color.
|
||||
*/
|
||||
export enum Color{
|
||||
Red = 1,
|
||||
|
||||
/**
|
||||
* \brief color Green
|
||||
* Green is bit_flag with value (1u << 1)
|
||||
*/
|
||||
Green = 2,
|
||||
|
||||
/**
|
||||
* \brief color Blue (1u << 3)
|
||||
*/
|
||||
Blue = 8
|
||||
}
|
||||
|
||||
1370
tests/ts/my-game/example/monster.ts
Normal file
1370
tests/ts/my-game/example/monster.ts
Normal file
File diff suppressed because it is too large
Load Diff
9
tests/ts/my-game/example/race.ts
Normal file
9
tests/ts/my-game/example/race.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
export enum Race{
|
||||
None = -1,
|
||||
Human = 0,
|
||||
Dwarf = 1,
|
||||
Elf = 2
|
||||
}
|
||||
|
||||
95
tests/ts/my-game/example/referrable.ts
Normal file
95
tests/ts/my-game/example/referrable.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class Referrable {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Referrable {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
static getRootAsReferrable(bb:flatbuffers.ByteBuffer, obj?:Referrable):Referrable {
|
||||
return (obj || new Referrable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getSizePrefixedRootAsReferrable(bb:flatbuffers.ByteBuffer, obj?:Referrable):Referrable {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new Referrable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
id():flatbuffers.Long {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb!.readUint64(this.bb_pos + offset) : this.bb!.createLong(0, 0);
|
||||
}
|
||||
|
||||
mutate_id(value:flatbuffers.Long):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeUint64(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.Example.Referrable';
|
||||
}
|
||||
|
||||
static startReferrable(builder:flatbuffers.Builder) {
|
||||
builder.startObject(1);
|
||||
}
|
||||
|
||||
static addId(builder:flatbuffers.Builder, id:flatbuffers.Long) {
|
||||
builder.addFieldInt64(0, id, builder.createLong(0, 0));
|
||||
}
|
||||
|
||||
static endReferrable(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createReferrable(builder:flatbuffers.Builder, id:flatbuffers.Long):flatbuffers.Offset {
|
||||
Referrable.startReferrable(builder);
|
||||
Referrable.addId(builder, id);
|
||||
return Referrable.endReferrable(builder);
|
||||
}
|
||||
|
||||
serialize():Uint8Array {
|
||||
return this.bb!.bytes();
|
||||
}
|
||||
|
||||
static deserialize(buffer: Uint8Array):Referrable {
|
||||
return Referrable.getRootAsReferrable(new flatbuffers.ByteBuffer(buffer))
|
||||
}
|
||||
|
||||
unpack(): ReferrableT {
|
||||
return new ReferrableT(
|
||||
this.id()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: ReferrableT): void {
|
||||
_o.id = this.id();
|
||||
}
|
||||
}
|
||||
|
||||
export class ReferrableT {
|
||||
constructor(
|
||||
public id: flatbuffers.Long = flatbuffers.createLong(0, 0)
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return Referrable.createReferrable(builder,
|
||||
this.id
|
||||
);
|
||||
}
|
||||
}
|
||||
138
tests/ts/my-game/example/stat.ts
Normal file
138
tests/ts/my-game/example/stat.ts
Normal file
@@ -0,0 +1,138 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class Stat {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Stat {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
static getRootAsStat(bb:flatbuffers.ByteBuffer, obj?:Stat):Stat {
|
||||
return (obj || new Stat()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getSizePrefixedRootAsStat(bb:flatbuffers.ByteBuffer, obj?:Stat):Stat {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new Stat()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
id():string|null
|
||||
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
id(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
val():flatbuffers.Long {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||
return offset ? this.bb!.readInt64(this.bb_pos + offset) : this.bb!.createLong(0, 0);
|
||||
}
|
||||
|
||||
mutate_val(value:flatbuffers.Long):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeInt64(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
count():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
mutate_count(value:number):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeUint16(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.Example.Stat';
|
||||
}
|
||||
|
||||
static startStat(builder:flatbuffers.Builder) {
|
||||
builder.startObject(3);
|
||||
}
|
||||
|
||||
static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(0, idOffset, 0);
|
||||
}
|
||||
|
||||
static addVal(builder:flatbuffers.Builder, val:flatbuffers.Long) {
|
||||
builder.addFieldInt64(1, val, builder.createLong(0, 0));
|
||||
}
|
||||
|
||||
static addCount(builder:flatbuffers.Builder, count:number) {
|
||||
builder.addFieldInt16(2, count, 0);
|
||||
}
|
||||
|
||||
static endStat(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createStat(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, val:flatbuffers.Long, count:number):flatbuffers.Offset {
|
||||
Stat.startStat(builder);
|
||||
Stat.addId(builder, idOffset);
|
||||
Stat.addVal(builder, val);
|
||||
Stat.addCount(builder, count);
|
||||
return Stat.endStat(builder);
|
||||
}
|
||||
|
||||
serialize():Uint8Array {
|
||||
return this.bb!.bytes();
|
||||
}
|
||||
|
||||
static deserialize(buffer: Uint8Array):Stat {
|
||||
return Stat.getRootAsStat(new flatbuffers.ByteBuffer(buffer))
|
||||
}
|
||||
|
||||
unpack(): StatT {
|
||||
return new StatT(
|
||||
this.id(),
|
||||
this.val(),
|
||||
this.count()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: StatT): void {
|
||||
_o.id = this.id();
|
||||
_o.val = this.val();
|
||||
_o.count = this.count();
|
||||
}
|
||||
}
|
||||
|
||||
export class StatT {
|
||||
constructor(
|
||||
public id: string|Uint8Array|null = null,
|
||||
public val: flatbuffers.Long = flatbuffers.createLong(0, 0),
|
||||
public count: number = 0
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
const id = (this.id !== null ? builder.createString(this.id!) : 0);
|
||||
|
||||
return Stat.createStat(builder,
|
||||
id,
|
||||
this.val,
|
||||
this.count
|
||||
);
|
||||
}
|
||||
}
|
||||
96
tests/ts/my-game/example/test-simple-table-with-enum.ts
Normal file
96
tests/ts/my-game/example/test-simple-table-with-enum.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
import { Color } from '../../my-game/example/color';
|
||||
|
||||
|
||||
export class TestSimpleTableWithEnum {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):TestSimpleTableWithEnum {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
static getRootAsTestSimpleTableWithEnum(bb:flatbuffers.ByteBuffer, obj?:TestSimpleTableWithEnum):TestSimpleTableWithEnum {
|
||||
return (obj || new TestSimpleTableWithEnum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getSizePrefixedRootAsTestSimpleTableWithEnum(bb:flatbuffers.ByteBuffer, obj?:TestSimpleTableWithEnum):TestSimpleTableWithEnum {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new TestSimpleTableWithEnum()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
color():Color {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb!.readUint8(this.bb_pos + offset) : Color.Green;
|
||||
}
|
||||
|
||||
mutate_color(value:Color):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeUint8(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.Example.TestSimpleTableWithEnum';
|
||||
}
|
||||
|
||||
static startTestSimpleTableWithEnum(builder:flatbuffers.Builder) {
|
||||
builder.startObject(1);
|
||||
}
|
||||
|
||||
static addColor(builder:flatbuffers.Builder, color:Color) {
|
||||
builder.addFieldInt8(0, color, Color.Green);
|
||||
}
|
||||
|
||||
static endTestSimpleTableWithEnum(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createTestSimpleTableWithEnum(builder:flatbuffers.Builder, color:Color):flatbuffers.Offset {
|
||||
TestSimpleTableWithEnum.startTestSimpleTableWithEnum(builder);
|
||||
TestSimpleTableWithEnum.addColor(builder, color);
|
||||
return TestSimpleTableWithEnum.endTestSimpleTableWithEnum(builder);
|
||||
}
|
||||
|
||||
serialize():Uint8Array {
|
||||
return this.bb!.bytes();
|
||||
}
|
||||
|
||||
static deserialize(buffer: Uint8Array):TestSimpleTableWithEnum {
|
||||
return TestSimpleTableWithEnum.getRootAsTestSimpleTableWithEnum(new flatbuffers.ByteBuffer(buffer))
|
||||
}
|
||||
|
||||
unpack(): TestSimpleTableWithEnumT {
|
||||
return new TestSimpleTableWithEnumT(
|
||||
this.color()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: TestSimpleTableWithEnumT): void {
|
||||
_o.color = this.color();
|
||||
}
|
||||
}
|
||||
|
||||
export class TestSimpleTableWithEnumT {
|
||||
constructor(
|
||||
public color: Color = Color.Green
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return TestSimpleTableWithEnum.createTestSimpleTableWithEnum(builder,
|
||||
this.color
|
||||
);
|
||||
}
|
||||
}
|
||||
78
tests/ts/my-game/example/test.ts
Normal file
78
tests/ts/my-game/example/test.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class Test {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Test {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
a():number {
|
||||
return this.bb!.readInt16(this.bb_pos);
|
||||
}
|
||||
|
||||
mutate_a(value:number):boolean {
|
||||
this.bb!.writeInt16(this.bb_pos + 0, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
b():number {
|
||||
return this.bb!.readInt8(this.bb_pos + 2);
|
||||
}
|
||||
|
||||
mutate_b(value:number):boolean {
|
||||
this.bb!.writeInt8(this.bb_pos + 2, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.Example.Test';
|
||||
}
|
||||
|
||||
static sizeOf():number {
|
||||
return 4;
|
||||
}
|
||||
|
||||
static createTest(builder:flatbuffers.Builder, a: number, b: number):flatbuffers.Offset {
|
||||
builder.prep(2, 4);
|
||||
builder.pad(1);
|
||||
builder.writeInt8(b);
|
||||
builder.writeInt16(a);
|
||||
return builder.offset();
|
||||
}
|
||||
|
||||
|
||||
unpack(): TestT {
|
||||
return new TestT(
|
||||
this.a(),
|
||||
this.b()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: TestT): void {
|
||||
_o.a = this.a();
|
||||
_o.b = this.b();
|
||||
}
|
||||
}
|
||||
|
||||
export class TestT {
|
||||
constructor(
|
||||
public a: number = 0,
|
||||
public b: number = 0
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return Test.createTest(builder,
|
||||
this.a,
|
||||
this.b
|
||||
);
|
||||
}
|
||||
}
|
||||
405
tests/ts/my-game/example/type-aliases.ts
Normal file
405
tests/ts/my-game/example/type-aliases.ts
Normal file
@@ -0,0 +1,405 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class TypeAliases {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):TypeAliases {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
static getRootAsTypeAliases(bb:flatbuffers.ByteBuffer, obj?:TypeAliases):TypeAliases {
|
||||
return (obj || new TypeAliases()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getSizePrefixedRootAsTypeAliases(bb:flatbuffers.ByteBuffer, obj?:TypeAliases):TypeAliases {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new TypeAliases()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
i8():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb!.readInt8(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
mutate_i8(value:number):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeInt8(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
u8():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||
return offset ? this.bb!.readUint8(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
mutate_u8(value:number):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeUint8(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
i16():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.readInt16(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
mutate_i16(value:number):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeInt16(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
u16():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||
return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
mutate_u16(value:number):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeUint16(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
i32():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 12);
|
||||
return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
mutate_i32(value:number):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 12);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeInt32(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
u32():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 14);
|
||||
return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
mutate_u32(value:number):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 14);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeUint32(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
i64():flatbuffers.Long {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 16);
|
||||
return offset ? this.bb!.readInt64(this.bb_pos + offset) : this.bb!.createLong(0, 0);
|
||||
}
|
||||
|
||||
mutate_i64(value:flatbuffers.Long):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 16);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeInt64(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
u64():flatbuffers.Long {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 18);
|
||||
return offset ? this.bb!.readUint64(this.bb_pos + offset) : this.bb!.createLong(0, 0);
|
||||
}
|
||||
|
||||
mutate_u64(value:flatbuffers.Long):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 18);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeUint64(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
f32():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 20);
|
||||
return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
|
||||
}
|
||||
|
||||
mutate_f32(value:number):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 20);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeFloat32(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
f64():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 22);
|
||||
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
|
||||
}
|
||||
|
||||
mutate_f64(value:number):boolean {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 22);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeFloat64(this.bb_pos + offset, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
v8(index: number):number|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 24);
|
||||
return offset ? this.bb!.readInt8(this.bb!.__vector(this.bb_pos + offset) + index) : 0;
|
||||
}
|
||||
|
||||
v8Length():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 24);
|
||||
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
v8Array():Int8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 24);
|
||||
return offset ? new Int8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null;
|
||||
}
|
||||
|
||||
vf64(index: number):number|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 26);
|
||||
return offset ? this.bb!.readFloat64(this.bb!.__vector(this.bb_pos + offset) + index * 8) : 0;
|
||||
}
|
||||
|
||||
vf64Length():number {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 26);
|
||||
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
||||
}
|
||||
|
||||
vf64Array():Float64Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 26);
|
||||
return offset ? new Float64Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null;
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.Example.TypeAliases';
|
||||
}
|
||||
|
||||
static startTypeAliases(builder:flatbuffers.Builder) {
|
||||
builder.startObject(12);
|
||||
}
|
||||
|
||||
static addI8(builder:flatbuffers.Builder, i8:number) {
|
||||
builder.addFieldInt8(0, i8, 0);
|
||||
}
|
||||
|
||||
static addU8(builder:flatbuffers.Builder, u8:number) {
|
||||
builder.addFieldInt8(1, u8, 0);
|
||||
}
|
||||
|
||||
static addI16(builder:flatbuffers.Builder, i16:number) {
|
||||
builder.addFieldInt16(2, i16, 0);
|
||||
}
|
||||
|
||||
static addU16(builder:flatbuffers.Builder, u16:number) {
|
||||
builder.addFieldInt16(3, u16, 0);
|
||||
}
|
||||
|
||||
static addI32(builder:flatbuffers.Builder, i32:number) {
|
||||
builder.addFieldInt32(4, i32, 0);
|
||||
}
|
||||
|
||||
static addU32(builder:flatbuffers.Builder, u32:number) {
|
||||
builder.addFieldInt32(5, u32, 0);
|
||||
}
|
||||
|
||||
static addI64(builder:flatbuffers.Builder, i64:flatbuffers.Long) {
|
||||
builder.addFieldInt64(6, i64, builder.createLong(0, 0));
|
||||
}
|
||||
|
||||
static addU64(builder:flatbuffers.Builder, u64:flatbuffers.Long) {
|
||||
builder.addFieldInt64(7, u64, builder.createLong(0, 0));
|
||||
}
|
||||
|
||||
static addF32(builder:flatbuffers.Builder, f32:number) {
|
||||
builder.addFieldFloat32(8, f32, 0.0);
|
||||
}
|
||||
|
||||
static addF64(builder:flatbuffers.Builder, f64:number) {
|
||||
builder.addFieldFloat64(9, f64, 0.0);
|
||||
}
|
||||
|
||||
static addV8(builder:flatbuffers.Builder, v8Offset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(10, v8Offset, 0);
|
||||
}
|
||||
|
||||
static createV8Vector(builder:flatbuffers.Builder, data:number[]|Int8Array):flatbuffers.Offset;
|
||||
/**
|
||||
* @deprecated This Uint8Array overload will be removed in the future.
|
||||
*/
|
||||
static createV8Vector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset;
|
||||
static createV8Vector(builder:flatbuffers.Builder, data:number[]|Int8Array|Uint8Array):flatbuffers.Offset {
|
||||
builder.startVector(1, data.length, 1);
|
||||
for (let i = data.length - 1; i >= 0; i--) {
|
||||
builder.addInt8(data[i]);
|
||||
}
|
||||
return builder.endVector();
|
||||
}
|
||||
|
||||
static startV8Vector(builder:flatbuffers.Builder, numElems:number) {
|
||||
builder.startVector(1, numElems, 1);
|
||||
}
|
||||
|
||||
static addVf64(builder:flatbuffers.Builder, vf64Offset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(11, vf64Offset, 0);
|
||||
}
|
||||
|
||||
static createVf64Vector(builder:flatbuffers.Builder, data:number[]|Float64Array):flatbuffers.Offset;
|
||||
/**
|
||||
* @deprecated This Uint8Array overload will be removed in the future.
|
||||
*/
|
||||
static createVf64Vector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset;
|
||||
static createVf64Vector(builder:flatbuffers.Builder, data:number[]|Float64Array|Uint8Array):flatbuffers.Offset {
|
||||
builder.startVector(8, data.length, 8);
|
||||
for (let i = data.length - 1; i >= 0; i--) {
|
||||
builder.addFloat64(data[i]);
|
||||
}
|
||||
return builder.endVector();
|
||||
}
|
||||
|
||||
static startVf64Vector(builder:flatbuffers.Builder, numElems:number) {
|
||||
builder.startVector(8, numElems, 8);
|
||||
}
|
||||
|
||||
static endTypeAliases(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createTypeAliases(builder:flatbuffers.Builder, i8:number, u8:number, i16:number, u16:number, i32:number, u32:number, i64:flatbuffers.Long, u64:flatbuffers.Long, f32:number, f64:number, v8Offset:flatbuffers.Offset, vf64Offset:flatbuffers.Offset):flatbuffers.Offset {
|
||||
TypeAliases.startTypeAliases(builder);
|
||||
TypeAliases.addI8(builder, i8);
|
||||
TypeAliases.addU8(builder, u8);
|
||||
TypeAliases.addI16(builder, i16);
|
||||
TypeAliases.addU16(builder, u16);
|
||||
TypeAliases.addI32(builder, i32);
|
||||
TypeAliases.addU32(builder, u32);
|
||||
TypeAliases.addI64(builder, i64);
|
||||
TypeAliases.addU64(builder, u64);
|
||||
TypeAliases.addF32(builder, f32);
|
||||
TypeAliases.addF64(builder, f64);
|
||||
TypeAliases.addV8(builder, v8Offset);
|
||||
TypeAliases.addVf64(builder, vf64Offset);
|
||||
return TypeAliases.endTypeAliases(builder);
|
||||
}
|
||||
|
||||
serialize():Uint8Array {
|
||||
return this.bb!.bytes();
|
||||
}
|
||||
|
||||
static deserialize(buffer: Uint8Array):TypeAliases {
|
||||
return TypeAliases.getRootAsTypeAliases(new flatbuffers.ByteBuffer(buffer))
|
||||
}
|
||||
|
||||
unpack(): TypeAliasesT {
|
||||
return new TypeAliasesT(
|
||||
this.i8(),
|
||||
this.u8(),
|
||||
this.i16(),
|
||||
this.u16(),
|
||||
this.i32(),
|
||||
this.u32(),
|
||||
this.i64(),
|
||||
this.u64(),
|
||||
this.f32(),
|
||||
this.f64(),
|
||||
this.bb!.createScalarList(this.v8.bind(this), this.v8Length()),
|
||||
this.bb!.createScalarList(this.vf64.bind(this), this.vf64Length())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: TypeAliasesT): void {
|
||||
_o.i8 = this.i8();
|
||||
_o.u8 = this.u8();
|
||||
_o.i16 = this.i16();
|
||||
_o.u16 = this.u16();
|
||||
_o.i32 = this.i32();
|
||||
_o.u32 = this.u32();
|
||||
_o.i64 = this.i64();
|
||||
_o.u64 = this.u64();
|
||||
_o.f32 = this.f32();
|
||||
_o.f64 = this.f64();
|
||||
_o.v8 = this.bb!.createScalarList(this.v8.bind(this), this.v8Length());
|
||||
_o.vf64 = this.bb!.createScalarList(this.vf64.bind(this), this.vf64Length());
|
||||
}
|
||||
}
|
||||
|
||||
export class TypeAliasesT {
|
||||
constructor(
|
||||
public i8: number = 0,
|
||||
public u8: number = 0,
|
||||
public i16: number = 0,
|
||||
public u16: number = 0,
|
||||
public i32: number = 0,
|
||||
public u32: number = 0,
|
||||
public i64: flatbuffers.Long = flatbuffers.createLong(0, 0),
|
||||
public u64: flatbuffers.Long = flatbuffers.createLong(0, 0),
|
||||
public f32: number = 0.0,
|
||||
public f64: number = 0.0,
|
||||
public v8: (number)[] = [],
|
||||
public vf64: (number)[] = []
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
const v8 = TypeAliases.createV8Vector(builder, this.v8);
|
||||
const vf64 = TypeAliases.createVf64Vector(builder, this.vf64);
|
||||
|
||||
return TypeAliases.createTypeAliases(builder,
|
||||
this.i8,
|
||||
this.u8,
|
||||
this.i16,
|
||||
this.u16,
|
||||
this.i32,
|
||||
this.u32,
|
||||
this.i64,
|
||||
this.u64,
|
||||
this.f32,
|
||||
this.f64,
|
||||
v8,
|
||||
vf64
|
||||
);
|
||||
}
|
||||
}
|
||||
137
tests/ts/my-game/example/vec3.ts
Normal file
137
tests/ts/my-game/example/vec3.ts
Normal file
@@ -0,0 +1,137 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
import { Color } from '../../my-game/example/color';
|
||||
import { Test, TestT } from '../../my-game/example/test';
|
||||
|
||||
|
||||
export class Vec3 {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Vec3 {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
x():number {
|
||||
return this.bb!.readFloat32(this.bb_pos);
|
||||
}
|
||||
|
||||
mutate_x(value:number):boolean {
|
||||
this.bb!.writeFloat32(this.bb_pos + 0, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
y():number {
|
||||
return this.bb!.readFloat32(this.bb_pos + 4);
|
||||
}
|
||||
|
||||
mutate_y(value:number):boolean {
|
||||
this.bb!.writeFloat32(this.bb_pos + 4, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
z():number {
|
||||
return this.bb!.readFloat32(this.bb_pos + 8);
|
||||
}
|
||||
|
||||
mutate_z(value:number):boolean {
|
||||
this.bb!.writeFloat32(this.bb_pos + 8, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
test1():number {
|
||||
return this.bb!.readFloat64(this.bb_pos + 16);
|
||||
}
|
||||
|
||||
mutate_test1(value:number):boolean {
|
||||
this.bb!.writeFloat64(this.bb_pos + 16, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
test2():Color {
|
||||
return this.bb!.readUint8(this.bb_pos + 24);
|
||||
}
|
||||
|
||||
mutate_test2(value:Color):boolean {
|
||||
this.bb!.writeUint8(this.bb_pos + 24, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
test3(obj?:Test):Test|null {
|
||||
return (obj || new Test()).__init(this.bb_pos + 26, this.bb!);
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.Example.Vec3';
|
||||
}
|
||||
|
||||
static sizeOf():number {
|
||||
return 32;
|
||||
}
|
||||
|
||||
static createVec3(builder:flatbuffers.Builder, x: number, y: number, z: number, test1: number, test2: Color, test3_a: number, test3_b: number):flatbuffers.Offset {
|
||||
builder.prep(8, 32);
|
||||
builder.pad(2);
|
||||
builder.prep(2, 4);
|
||||
builder.pad(1);
|
||||
builder.writeInt8(test3_b);
|
||||
builder.writeInt16(test3_a);
|
||||
builder.pad(1);
|
||||
builder.writeInt8(test2);
|
||||
builder.writeFloat64(test1);
|
||||
builder.pad(4);
|
||||
builder.writeFloat32(z);
|
||||
builder.writeFloat32(y);
|
||||
builder.writeFloat32(x);
|
||||
return builder.offset();
|
||||
}
|
||||
|
||||
|
||||
unpack(): Vec3T {
|
||||
return new Vec3T(
|
||||
this.x(),
|
||||
this.y(),
|
||||
this.z(),
|
||||
this.test1(),
|
||||
this.test2(),
|
||||
(this.test3() !== null ? this.test3()!.unpack() : null)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: Vec3T): void {
|
||||
_o.x = this.x();
|
||||
_o.y = this.y();
|
||||
_o.z = this.z();
|
||||
_o.test1 = this.test1();
|
||||
_o.test2 = this.test2();
|
||||
_o.test3 = (this.test3() !== null ? this.test3()!.unpack() : null);
|
||||
}
|
||||
}
|
||||
|
||||
export class Vec3T {
|
||||
constructor(
|
||||
public x: number = 0.0,
|
||||
public y: number = 0.0,
|
||||
public z: number = 0.0,
|
||||
public test1: number = 0.0,
|
||||
public test2: Color = 0,
|
||||
public test3: TestT|null = null
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return Vec3.createVec3(builder,
|
||||
this.x,
|
||||
this.y,
|
||||
this.z,
|
||||
this.test1,
|
||||
this.test2,
|
||||
(this.test3 === null ? 0 : this.test3.a!),
|
||||
(this.test3 === null ? 0 : this.test3.b!)
|
||||
);
|
||||
}
|
||||
}
|
||||
66
tests/ts/my-game/example2/monster.ts
Normal file
66
tests/ts/my-game/example2/monster.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class Monster {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Monster {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
static getRootAsMonster(bb:flatbuffers.ByteBuffer, obj?:Monster):Monster {
|
||||
return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getSizePrefixedRootAsMonster(bb:flatbuffers.ByteBuffer, obj?:Monster):Monster {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.Example2.Monster';
|
||||
}
|
||||
|
||||
static startMonster(builder:flatbuffers.Builder) {
|
||||
builder.startObject(0);
|
||||
}
|
||||
|
||||
static endMonster(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createMonster(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
Monster.startMonster(builder);
|
||||
return Monster.endMonster(builder);
|
||||
}
|
||||
|
||||
serialize():Uint8Array {
|
||||
return this.bb!.bytes();
|
||||
}
|
||||
|
||||
static deserialize(buffer: Uint8Array):Monster {
|
||||
return Monster.getRootAsMonster(new flatbuffers.ByteBuffer(buffer))
|
||||
}
|
||||
|
||||
unpack(): MonsterT {
|
||||
return new MonsterT();
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: MonsterT): void {}
|
||||
}
|
||||
|
||||
export class MonsterT {
|
||||
constructor(){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return Monster.createMonster(builder);
|
||||
}
|
||||
}
|
||||
66
tests/ts/my-game/in-parent-namespace.ts
Normal file
66
tests/ts/my-game/in-parent-namespace.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class InParentNamespace {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):InParentNamespace {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
static getRootAsInParentNamespace(bb:flatbuffers.ByteBuffer, obj?:InParentNamespace):InParentNamespace {
|
||||
return (obj || new InParentNamespace()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getSizePrefixedRootAsInParentNamespace(bb:flatbuffers.ByteBuffer, obj?:InParentNamespace):InParentNamespace {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new InParentNamespace()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.InParentNamespace';
|
||||
}
|
||||
|
||||
static startInParentNamespace(builder:flatbuffers.Builder) {
|
||||
builder.startObject(0);
|
||||
}
|
||||
|
||||
static endInParentNamespace(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createInParentNamespace(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
InParentNamespace.startInParentNamespace(builder);
|
||||
return InParentNamespace.endInParentNamespace(builder);
|
||||
}
|
||||
|
||||
serialize():Uint8Array {
|
||||
return this.bb!.bytes();
|
||||
}
|
||||
|
||||
static deserialize(buffer: Uint8Array):InParentNamespace {
|
||||
return InParentNamespace.getRootAsInParentNamespace(new flatbuffers.ByteBuffer(buffer))
|
||||
}
|
||||
|
||||
unpack(): InParentNamespaceT {
|
||||
return new InParentNamespaceT();
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: InParentNamespaceT): void {}
|
||||
}
|
||||
|
||||
export class InParentNamespaceT {
|
||||
constructor(){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return InParentNamespace.createInParentNamespace(builder);
|
||||
}
|
||||
}
|
||||
58
tests/ts/rapunzel.ts
Normal file
58
tests/ts/rapunzel.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
|
||||
|
||||
export class Rapunzel {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):Rapunzel {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
hairLength():number {
|
||||
return this.bb!.readInt32(this.bb_pos);
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'Rapunzel';
|
||||
}
|
||||
|
||||
static sizeOf():number {
|
||||
return 4;
|
||||
}
|
||||
|
||||
static createRapunzel(builder:flatbuffers.Builder, hair_length: number):flatbuffers.Offset {
|
||||
builder.prep(4, 4);
|
||||
builder.writeInt32(hair_length);
|
||||
return builder.offset();
|
||||
}
|
||||
|
||||
|
||||
unpack(): RapunzelT {
|
||||
return new RapunzelT(
|
||||
this.hairLength()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
unpackTo(_o: RapunzelT): void {
|
||||
_o.hairLength = this.hairLength();
|
||||
}
|
||||
}
|
||||
|
||||
export class RapunzelT {
|
||||
constructor(
|
||||
public hairLength: number = 0
|
||||
){}
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
return Rapunzel.createRapunzel(builder,
|
||||
this.hairLength
|
||||
);
|
||||
}
|
||||
}
|
||||
18
tests/tsconfig.json
Normal file
18
tests/tsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES6",
|
||||
"lib": ["ES2015", "ES2020.BigInt", "DOM"],
|
||||
"moduleResolution": "Node",
|
||||
"noImplicitAny": true,
|
||||
"strict": true,
|
||||
"noUnusedParameters": false,
|
||||
"noUnusedLocals": false,
|
||||
"noImplicitReturns": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": ".",
|
||||
"noEmit": false,
|
||||
"outDir": "./ts"
|
||||
},
|
||||
"include": [ "ts/**/*.ts" ],
|
||||
"exclude": []
|
||||
}
|
||||
@@ -586,7 +586,7 @@ export class Builder {
|
||||
*
|
||||
* @returns offset of obj
|
||||
*/
|
||||
createObjectOffset(obj: string | IGeneratedObject): Offset {
|
||||
createObjectOffset(obj: string | any): Offset {
|
||||
if(obj === null) {
|
||||
return 0
|
||||
}
|
||||
@@ -603,7 +603,7 @@ export class Builder {
|
||||
*
|
||||
* @returns list of offsets of each non null object
|
||||
*/
|
||||
createObjectOffsetList(list: string[]): Offset[] {
|
||||
createObjectOffsetList(list: string[] | any[]): Offset[] {
|
||||
const ret: number[] = [];
|
||||
|
||||
for(let i = 0; i < list.length; ++i) {
|
||||
@@ -620,7 +620,7 @@ export class Builder {
|
||||
return ret;
|
||||
}
|
||||
|
||||
createStructOffsetList(list: string[], startFunc: (builder: Builder, length: number) => void): Offset {
|
||||
createStructOffsetList(list: string[] | any[], startFunc: (builder: Builder, length: number) => void): Offset {
|
||||
startFunc(this, list.length);
|
||||
this.createObjectOffsetList(list);
|
||||
return this.endVector();
|
||||
|
||||
@@ -312,8 +312,8 @@ export class ByteBuffer {
|
||||
/**
|
||||
* A helper function for generating list for obj api
|
||||
*/
|
||||
createScalarList(listAccessor: (i: number) => unknown, listLength: number) : unknown[] {
|
||||
const ret: unknown[] = [];
|
||||
createScalarList(listAccessor: (i: number) => unknown, listLength: number): any[] {
|
||||
const ret: any[] = [];
|
||||
for(let i = 0; i < listLength; ++i) {
|
||||
if(listAccessor(i) !== null) {
|
||||
ret.push(listAccessor(i));
|
||||
@@ -323,25 +323,18 @@ export class ByteBuffer {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is here only to get around typescript type system
|
||||
*/
|
||||
createStringList(listAccessor: (i: number) => unknown, listLength: number): unknown[] {
|
||||
return this.createScalarList(listAccessor, listLength);
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper function for generating list for obj api
|
||||
* @param listAccessor function that accepts an index and return data at that index
|
||||
* @param listLength listLength
|
||||
* @param res result list
|
||||
*/
|
||||
createObjList(listAccessor: (i: number) => IGeneratedObject, listLength: number): IGeneratedObject[] {
|
||||
const ret: IGeneratedObject[] = [];
|
||||
createObjList(listAccessor: (i: number) => unknown, listLength: number): any[] {
|
||||
const ret: any[] = [];
|
||||
for(let i = 0; i < listLength; ++i) {
|
||||
const val = listAccessor(i);
|
||||
if(val !== null) {
|
||||
ret.push(val.unpack());
|
||||
ret.push((val as IGeneratedObject).unpack());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,34 +1,13 @@
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
import * as constants from './constants'
|
||||
import * as types from './types'
|
||||
import * as utils from './utils'
|
||||
export { SIZEOF_SHORT } from './constants'
|
||||
export { SIZEOF_INT } from './constants'
|
||||
export { FILE_IDENTIFIER_LENGTH } from './constants'
|
||||
export { SIZE_PREFIX_LENGTH } from './constants'
|
||||
|
||||
import { Long as LongClass } from './long'
|
||||
import { Encoding as EncodingEnum } from './encoding'
|
||||
import { Builder as BuilderClass } from './builder'
|
||||
import { ByteBuffer as ByteBufferClass } from './byte-buffer'
|
||||
export { Table, Offset } from './types'
|
||||
|
||||
export namespace flatbuffers {
|
||||
export { int32, float32, float64, isLittleEndian } from './utils'
|
||||
|
||||
export type Offset = types.Offset;
|
||||
|
||||
export type Table = types.Table;
|
||||
|
||||
export const SIZEOF_SHORT = constants.SIZEOF_SHORT;
|
||||
export const SIZEOF_INT = constants.SIZEOF_INT;
|
||||
export const FILE_IDENTIFIER_LENGTH = constants.FILE_IDENTIFIER_LENGTH;
|
||||
export const SIZE_PREFIX_LENGTH = constants.SIZE_PREFIX_LENGTH;
|
||||
|
||||
export const Encoding = EncodingEnum;
|
||||
|
||||
export const int32 = utils.int32;
|
||||
export const float32 = utils.float32;
|
||||
export const float64 = utils.float64;
|
||||
export const isLittleEndian = utils.isLittleEndian;
|
||||
|
||||
export const Long = LongClass;
|
||||
export const Builder = BuilderClass;
|
||||
export const ByteBuffer = ByteBufferClass;
|
||||
}
|
||||
|
||||
export default flatbuffers;
|
||||
export { Long, createLong } from './long'
|
||||
export { Encoding } from './encoding'
|
||||
export { Builder } from './builder'
|
||||
export { ByteBuffer } from './byte-buffer'
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
/* eslint-disable @typescript-eslint/no-namespace */
|
||||
import { Builder } from './flexbuffers/builder'
|
||||
import { toReference as toReferenceFunction } from './flexbuffers/reference';
|
||||
import { toReference } from './flexbuffers/reference'
|
||||
export { toReference } from './flexbuffers/reference'
|
||||
|
||||
export function builder(): Builder {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
export function toObject(buffer: Uint8Array): unknown {
|
||||
return toReferenceFunction(buffer).toObject();
|
||||
return toReference(buffer).toObject();
|
||||
}
|
||||
|
||||
export function encode(object: unknown, size = 2048, deduplicateStrings = true, deduplicateKeys = true, deduplicateKeyVectors = true): Uint8Array {
|
||||
@@ -15,16 +16,3 @@ export function encode(object: unknown, size = 2048, deduplicateStrings = true,
|
||||
builder.add(object);
|
||||
return builder.finish();
|
||||
}
|
||||
|
||||
const builderFunction = builder
|
||||
const toObjectFunction = toObject
|
||||
const encodeFunction = encode
|
||||
|
||||
export namespace flexbuffers {
|
||||
export const builder = builderFunction;
|
||||
export const toObject = toObjectFunction;
|
||||
export const encode = encodeFunction;
|
||||
export const toReference = toReferenceFunction;
|
||||
}
|
||||
|
||||
export default flexbuffers;
|
||||
|
||||
956
yarn.lock
956
yarn.lock
@@ -1,956 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@babel/code-frame@^7.0.0":
|
||||
version "7.10.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
|
||||
integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
|
||||
dependencies:
|
||||
"@babel/highlight" "^7.10.4"
|
||||
|
||||
"@babel/helper-validator-identifier@^7.10.4":
|
||||
version "7.10.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
|
||||
integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==
|
||||
|
||||
"@babel/highlight@^7.10.4":
|
||||
version "7.10.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143"
|
||||
integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==
|
||||
dependencies:
|
||||
"@babel/helper-validator-identifier" "^7.10.4"
|
||||
chalk "^2.0.0"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@eslint/eslintrc@^0.1.3":
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.1.3.tgz#7d1a2b2358552cc04834c0979bd4275362e37085"
|
||||
integrity sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==
|
||||
dependencies:
|
||||
ajv "^6.12.4"
|
||||
debug "^4.1.1"
|
||||
espree "^7.3.0"
|
||||
globals "^12.1.0"
|
||||
ignore "^4.0.6"
|
||||
import-fresh "^3.2.1"
|
||||
js-yaml "^3.13.1"
|
||||
lodash "^4.17.19"
|
||||
minimatch "^3.0.4"
|
||||
strip-json-comments "^3.1.1"
|
||||
|
||||
"@nodelib/fs.scandir@2.1.3":
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
|
||||
integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==
|
||||
dependencies:
|
||||
"@nodelib/fs.stat" "2.0.3"
|
||||
run-parallel "^1.1.9"
|
||||
|
||||
"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2":
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3"
|
||||
integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==
|
||||
|
||||
"@nodelib/fs.walk@^1.2.3":
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976"
|
||||
integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==
|
||||
dependencies:
|
||||
"@nodelib/fs.scandir" "2.1.3"
|
||||
fastq "^1.6.0"
|
||||
|
||||
"@types/color-name@^1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
|
||||
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
|
||||
|
||||
"@types/json-schema@^7.0.3":
|
||||
version "7.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
|
||||
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^4.1.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.1.0.tgz#7d309f60815ff35e9627ad85e41928d7b7fd443f"
|
||||
integrity sha512-U+nRJx8XDUqJxYF0FCXbpmD9nWt/xHDDG0zsw1vrVYAmEAuD/r49iowfurjSL2uTA2JsgtpsyG7mjO7PHf2dYw==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "4.1.0"
|
||||
"@typescript-eslint/scope-manager" "4.1.0"
|
||||
debug "^4.1.1"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
regexpp "^3.0.0"
|
||||
semver "^7.3.2"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@typescript-eslint/experimental-utils@4.1.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.1.0.tgz#263d7225645c09a411c8735eeffd417f50f49026"
|
||||
integrity sha512-paEYLA37iqRIDPeQwAmoYSiZ3PiHsaAc3igFeBTeqRHgPnHjHLJ9OGdmP6nwAkF65p2QzEsEBtpjNUBWByNWzA==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.3"
|
||||
"@typescript-eslint/scope-manager" "4.1.0"
|
||||
"@typescript-eslint/types" "4.1.0"
|
||||
"@typescript-eslint/typescript-estree" "4.1.0"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
"@typescript-eslint/parser@^4.1.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.1.0.tgz#9b0409411725f14cd7faa81a664e5051225961db"
|
||||
integrity sha512-hM/WNCQTzDHgS0Ke3cR9zPndL3OTKr9OoN9CL3UqulsAjYDrglSwIIgswSmHBcSbOzLmgaMARwrQEbIumIglvQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "4.1.0"
|
||||
"@typescript-eslint/types" "4.1.0"
|
||||
"@typescript-eslint/typescript-estree" "4.1.0"
|
||||
debug "^4.1.1"
|
||||
|
||||
"@typescript-eslint/scope-manager@4.1.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.1.0.tgz#9e389745ee9cfe12252ed1e9958808abd6b3a683"
|
||||
integrity sha512-HD1/u8vFNnxwiHqlWKC/Pigdn0Mvxi84Y6GzbZ5f5sbLrFKu0al02573Er+D63Sw67IffVUXR0uR8rpdfdk+vA==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.1.0"
|
||||
"@typescript-eslint/visitor-keys" "4.1.0"
|
||||
|
||||
"@typescript-eslint/types@4.1.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.1.0.tgz#edbd3fec346f34e13ce7aa176b03b497a32c496a"
|
||||
integrity sha512-rkBqWsO7m01XckP9R2YHVN8mySOKKY2cophGM8K5uDK89ArCgahItQYdbg/3n8xMxzu2elss+an1TphlUpDuJw==
|
||||
|
||||
"@typescript-eslint/typescript-estree@4.1.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.1.0.tgz#394046ead25164494218c0e3d6b960695ea967f6"
|
||||
integrity sha512-r6et57qqKAWU173nWyw31x7OfgmKfMEcjJl9vlJEzS+kf9uKNRr4AVTRXfTCwebr7bdiVEkfRY5xGnpPaNPe4Q==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.1.0"
|
||||
"@typescript-eslint/visitor-keys" "4.1.0"
|
||||
debug "^4.1.1"
|
||||
globby "^11.0.1"
|
||||
is-glob "^4.0.1"
|
||||
lodash "^4.17.15"
|
||||
semver "^7.3.2"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@typescript-eslint/visitor-keys@4.1.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.1.0.tgz#b2d528c9484e7eda1aa4f86ccf0432fb16e4d545"
|
||||
integrity sha512-+taO0IZGCtCEsuNTTF2Q/5o8+fHrlml8i9YsZt2AiDCdYEJzYlsmRY991l/6f3jNXFyAWepdQj7n8Na6URiDRQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.1.0"
|
||||
eslint-visitor-keys "^2.0.0"
|
||||
|
||||
acorn-jsx@^5.2.0:
|
||||
version "5.3.1"
|
||||
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
|
||||
integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==
|
||||
|
||||
acorn@^7.4.0:
|
||||
version "7.4.0"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c"
|
||||
integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==
|
||||
|
||||
ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.4:
|
||||
version "6.12.4"
|
||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234"
|
||||
integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==
|
||||
dependencies:
|
||||
fast-deep-equal "^3.1.1"
|
||||
fast-json-stable-stringify "^2.0.0"
|
||||
json-schema-traverse "^0.4.1"
|
||||
uri-js "^4.2.2"
|
||||
|
||||
ansi-colors@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
|
||||
integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
|
||||
|
||||
ansi-regex@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
|
||||
integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
|
||||
|
||||
ansi-regex@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
|
||||
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
|
||||
|
||||
ansi-styles@^3.2.0, ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
|
||||
integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
|
||||
dependencies:
|
||||
color-convert "^1.9.0"
|
||||
|
||||
ansi-styles@^4.1.0:
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
|
||||
integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
|
||||
dependencies:
|
||||
"@types/color-name" "^1.1.1"
|
||||
color-convert "^2.0.1"
|
||||
|
||||
argparse@^1.0.7:
|
||||
version "1.0.10"
|
||||
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
||||
integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
|
||||
dependencies:
|
||||
sprintf-js "~1.0.2"
|
||||
|
||||
array-union@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
|
||||
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
|
||||
|
||||
astral-regex@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
|
||||
integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
braces@^3.0.1:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
||||
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
|
||||
dependencies:
|
||||
fill-range "^7.0.1"
|
||||
|
||||
callsites@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
|
||||
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
|
||||
|
||||
chalk@^2.0.0:
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
|
||||
dependencies:
|
||||
ansi-styles "^3.2.1"
|
||||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^5.3.0"
|
||||
|
||||
chalk@^4.0.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
|
||||
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
|
||||
dependencies:
|
||||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
color-convert@^1.9.0:
|
||||
version "1.9.3"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
|
||||
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
|
||||
dependencies:
|
||||
color-name "1.1.3"
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
||||
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
||||
|
||||
cross-spawn@^7.0.2:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
|
||||
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
|
||||
dependencies:
|
||||
path-key "^3.1.0"
|
||||
shebang-command "^2.0.0"
|
||||
which "^2.0.1"
|
||||
|
||||
debug@^4.0.1, debug@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
|
||||
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
deep-is@^0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
|
||||
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
|
||||
|
||||
dir-glob@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
|
||||
integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
|
||||
dependencies:
|
||||
path-type "^4.0.0"
|
||||
|
||||
doctrine@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
|
||||
integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==
|
||||
dependencies:
|
||||
esutils "^2.0.2"
|
||||
|
||||
emoji-regex@^7.0.1:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
|
||||
integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
|
||||
|
||||
enquirer@^2.3.5:
|
||||
version "2.3.6"
|
||||
resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
|
||||
integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
|
||||
dependencies:
|
||||
ansi-colors "^4.1.1"
|
||||
|
||||
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"
|
||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||
|
||||
eslint-scope@^5.0.0, eslint-scope@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5"
|
||||
integrity sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==
|
||||
dependencies:
|
||||
esrecurse "^4.1.0"
|
||||
estraverse "^4.1.1"
|
||||
|
||||
eslint-utils@^2.0.0, eslint-utils@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
|
||||
integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
|
||||
dependencies:
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
|
||||
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
|
||||
|
||||
eslint-visitor-keys@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
|
||||
integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
|
||||
|
||||
eslint@^7.8.1:
|
||||
version "7.8.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.8.1.tgz#e59de3573fb6a5be8ff526c791571646d124a8fa"
|
||||
integrity sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.0.0"
|
||||
"@eslint/eslintrc" "^0.1.3"
|
||||
ajv "^6.10.0"
|
||||
chalk "^4.0.0"
|
||||
cross-spawn "^7.0.2"
|
||||
debug "^4.0.1"
|
||||
doctrine "^3.0.0"
|
||||
enquirer "^2.3.5"
|
||||
eslint-scope "^5.1.0"
|
||||
eslint-utils "^2.1.0"
|
||||
eslint-visitor-keys "^1.3.0"
|
||||
espree "^7.3.0"
|
||||
esquery "^1.2.0"
|
||||
esutils "^2.0.2"
|
||||
file-entry-cache "^5.0.1"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
glob-parent "^5.0.0"
|
||||
globals "^12.1.0"
|
||||
ignore "^4.0.6"
|
||||
import-fresh "^3.0.0"
|
||||
imurmurhash "^0.1.4"
|
||||
is-glob "^4.0.0"
|
||||
js-yaml "^3.13.1"
|
||||
json-stable-stringify-without-jsonify "^1.0.1"
|
||||
levn "^0.4.1"
|
||||
lodash "^4.17.19"
|
||||
minimatch "^3.0.4"
|
||||
natural-compare "^1.4.0"
|
||||
optionator "^0.9.1"
|
||||
progress "^2.0.0"
|
||||
regexpp "^3.1.0"
|
||||
semver "^7.2.1"
|
||||
strip-ansi "^6.0.0"
|
||||
strip-json-comments "^3.1.0"
|
||||
table "^5.2.3"
|
||||
text-table "^0.2.0"
|
||||
v8-compile-cache "^2.0.3"
|
||||
|
||||
espree@^7.3.0:
|
||||
version "7.3.0"
|
||||
resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.0.tgz#dc30437cf67947cf576121ebd780f15eeac72348"
|
||||
integrity sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==
|
||||
dependencies:
|
||||
acorn "^7.4.0"
|
||||
acorn-jsx "^5.2.0"
|
||||
eslint-visitor-keys "^1.3.0"
|
||||
|
||||
esprima@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
|
||||
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
|
||||
|
||||
esquery@^1.2.0:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57"
|
||||
integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==
|
||||
dependencies:
|
||||
estraverse "^5.1.0"
|
||||
|
||||
esrecurse@^4.1.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
|
||||
integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==
|
||||
dependencies:
|
||||
estraverse "^5.2.0"
|
||||
|
||||
estraverse@^4.1.1:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
|
||||
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
|
||||
|
||||
estraverse@^5.1.0, estraverse@^5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"
|
||||
integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==
|
||||
|
||||
esutils@^2.0.2:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
|
||||
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
|
||||
|
||||
fast-deep-equal@^3.1.1:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
|
||||
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
|
||||
|
||||
fast-glob@^3.1.1:
|
||||
version "3.2.4"
|
||||
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3"
|
||||
integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==
|
||||
dependencies:
|
||||
"@nodelib/fs.stat" "^2.0.2"
|
||||
"@nodelib/fs.walk" "^1.2.3"
|
||||
glob-parent "^5.1.0"
|
||||
merge2 "^1.3.0"
|
||||
micromatch "^4.0.2"
|
||||
picomatch "^2.2.1"
|
||||
|
||||
fast-json-stable-stringify@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
|
||||
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
|
||||
|
||||
fast-levenshtein@^2.0.6:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
|
||||
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
|
||||
|
||||
fastq@^1.6.0:
|
||||
version "1.8.0"
|
||||
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481"
|
||||
integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==
|
||||
dependencies:
|
||||
reusify "^1.0.4"
|
||||
|
||||
file-entry-cache@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
|
||||
integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==
|
||||
dependencies:
|
||||
flat-cache "^2.0.1"
|
||||
|
||||
fill-range@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
|
||||
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
|
||||
dependencies:
|
||||
to-regex-range "^5.0.1"
|
||||
|
||||
flat-cache@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
|
||||
integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==
|
||||
dependencies:
|
||||
flatted "^2.0.0"
|
||||
rimraf "2.6.3"
|
||||
write "1.0.3"
|
||||
|
||||
flatted@^2.0.0:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
|
||||
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
|
||||
|
||||
functional-red-black-tree@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
|
||||
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
|
||||
|
||||
glob-parent@^5.0.0, glob-parent@^5.1.0:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
|
||||
integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==
|
||||
dependencies:
|
||||
is-glob "^4.0.1"
|
||||
|
||||
glob@^7.1.3:
|
||||
version "7.1.6"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
|
||||
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.4"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
globals@^12.1.0:
|
||||
version "12.4.0"
|
||||
resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8"
|
||||
integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==
|
||||
dependencies:
|
||||
type-fest "^0.8.1"
|
||||
|
||||
globby@^11.0.1:
|
||||
version "11.0.1"
|
||||
resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357"
|
||||
integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==
|
||||
dependencies:
|
||||
array-union "^2.1.0"
|
||||
dir-glob "^3.0.1"
|
||||
fast-glob "^3.1.1"
|
||||
ignore "^5.1.4"
|
||||
merge2 "^1.3.0"
|
||||
slash "^3.0.0"
|
||||
|
||||
has-flag@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
|
||||
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
|
||||
|
||||
has-flag@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
|
||||
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
|
||||
|
||||
ignore@^4.0.6:
|
||||
version "4.0.6"
|
||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
|
||||
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
|
||||
|
||||
ignore@^5.1.4:
|
||||
version "5.1.8"
|
||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
|
||||
integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
|
||||
|
||||
import-fresh@^3.0.0, import-fresh@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
|
||||
integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==
|
||||
dependencies:
|
||||
parent-module "^1.0.0"
|
||||
resolve-from "^4.0.0"
|
||||
|
||||
imurmurhash@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
|
||||
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
is-extglob@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
|
||||
integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
|
||||
|
||||
is-fullwidth-code-point@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
|
||||
integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
|
||||
|
||||
is-glob@^4.0.0, is-glob@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
|
||||
integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
|
||||
dependencies:
|
||||
is-extglob "^2.1.1"
|
||||
|
||||
is-number@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
||||
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
||||
|
||||
isexe@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
|
||||
|
||||
js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
|
||||
js-yaml@^3.13.1:
|
||||
version "3.14.0"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
|
||||
integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
|
||||
dependencies:
|
||||
argparse "^1.0.7"
|
||||
esprima "^4.0.0"
|
||||
|
||||
json-schema-traverse@^0.4.1:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
|
||||
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
|
||||
|
||||
json-stable-stringify-without-jsonify@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
|
||||
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
|
||||
|
||||
levn@^0.4.1:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
|
||||
integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
|
||||
dependencies:
|
||||
prelude-ls "^1.2.1"
|
||||
type-check "~0.4.0"
|
||||
|
||||
lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19:
|
||||
version "4.17.20"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
|
||||
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
|
||||
|
||||
merge2@^1.3.0:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
|
||||
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
|
||||
|
||||
micromatch@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
|
||||
integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
|
||||
dependencies:
|
||||
braces "^3.0.1"
|
||||
picomatch "^2.0.5"
|
||||
|
||||
minimatch@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
minimist@^1.2.5:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||
|
||||
mkdirp@^0.5.1:
|
||||
version "0.5.5"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
|
||||
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
|
||||
dependencies:
|
||||
minimist "^1.2.5"
|
||||
|
||||
ms@^2.1.1:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
|
||||
natural-compare@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
optionator@^0.9.1:
|
||||
version "0.9.1"
|
||||
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499"
|
||||
integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==
|
||||
dependencies:
|
||||
deep-is "^0.1.3"
|
||||
fast-levenshtein "^2.0.6"
|
||||
levn "^0.4.1"
|
||||
prelude-ls "^1.2.1"
|
||||
type-check "^0.4.0"
|
||||
word-wrap "^1.2.3"
|
||||
|
||||
parent-module@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
|
||||
integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
|
||||
dependencies:
|
||||
callsites "^3.0.0"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
|
||||
|
||||
path-key@^3.1.0:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
|
||||
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
|
||||
|
||||
path-type@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
|
||||
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
|
||||
|
||||
picomatch@^2.0.5, picomatch@^2.2.1:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
|
||||
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
|
||||
|
||||
prelude-ls@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
|
||||
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
|
||||
|
||||
progress@^2.0.0:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
|
||||
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
|
||||
|
||||
punycode@^2.1.0:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
|
||||
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
|
||||
|
||||
regexpp@^3.0.0, regexpp@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
|
||||
integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
|
||||
|
||||
resolve-from@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
||||
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
||||
|
||||
reusify@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
|
||||
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
|
||||
|
||||
rimraf@2.6.3:
|
||||
version "2.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
|
||||
integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
|
||||
dependencies:
|
||||
glob "^7.1.3"
|
||||
|
||||
run-parallel@^1.1.9:
|
||||
version "1.1.9"
|
||||
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679"
|
||||
integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==
|
||||
|
||||
semver@^7.2.1, semver@^7.3.2:
|
||||
version "7.3.2"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
|
||||
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
|
||||
|
||||
shebang-command@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
|
||||
integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
|
||||
dependencies:
|
||||
shebang-regex "^3.0.0"
|
||||
|
||||
shebang-regex@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
|
||||
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
|
||||
|
||||
slash@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
|
||||
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
|
||||
|
||||
slice-ansi@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
|
||||
integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==
|
||||
dependencies:
|
||||
ansi-styles "^3.2.0"
|
||||
astral-regex "^1.0.0"
|
||||
is-fullwidth-code-point "^2.0.0"
|
||||
|
||||
sprintf-js@~1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
|
||||
|
||||
string-width@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
|
||||
integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
|
||||
dependencies:
|
||||
emoji-regex "^7.0.1"
|
||||
is-fullwidth-code-point "^2.0.0"
|
||||
strip-ansi "^5.1.0"
|
||||
|
||||
strip-ansi@^5.1.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
|
||||
integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
|
||||
dependencies:
|
||||
ansi-regex "^4.1.0"
|
||||
|
||||
strip-ansi@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
|
||||
integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.0"
|
||||
|
||||
strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
|
||||
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
|
||||
|
||||
supports-color@^5.3.0:
|
||||
version "5.5.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
||||
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
|
||||
dependencies:
|
||||
has-flag "^3.0.0"
|
||||
|
||||
supports-color@^7.1.0:
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
|
||||
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
|
||||
dependencies:
|
||||
has-flag "^4.0.0"
|
||||
|
||||
table@^5.2.3:
|
||||
version "5.4.6"
|
||||
resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
|
||||
integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==
|
||||
dependencies:
|
||||
ajv "^6.10.2"
|
||||
lodash "^4.17.14"
|
||||
slice-ansi "^2.1.0"
|
||||
string-width "^3.0.0"
|
||||
|
||||
text-table@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
|
||||
|
||||
to-regex-range@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
|
||||
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
|
||||
dependencies:
|
||||
is-number "^7.0.0"
|
||||
|
||||
tslib@^1.8.1:
|
||||
version "1.13.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
|
||||
integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==
|
||||
|
||||
tsutils@^3.17.1:
|
||||
version "3.17.1"
|
||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
|
||||
integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==
|
||||
dependencies:
|
||||
tslib "^1.8.1"
|
||||
|
||||
type-check@^0.4.0, type-check@~0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
|
||||
integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==
|
||||
dependencies:
|
||||
prelude-ls "^1.2.1"
|
||||
|
||||
type-fest@^0.8.1:
|
||||
version "0.8.1"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
|
||||
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
|
||||
|
||||
typescript@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
|
||||
integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
|
||||
|
||||
uri-js@^4.2.2:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602"
|
||||
integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==
|
||||
dependencies:
|
||||
punycode "^2.1.0"
|
||||
|
||||
v8-compile-cache@^2.0.3:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745"
|
||||
integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==
|
||||
|
||||
which@^2.0.1:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
|
||||
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
|
||||
dependencies:
|
||||
isexe "^2.0.0"
|
||||
|
||||
word-wrap@^1.2.3:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
|
||||
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
|
||||
write@1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3"
|
||||
integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==
|
||||
dependencies:
|
||||
mkdirp "^0.5.1"
|
||||
Reference in New Issue
Block a user