From 9a0050f001dd535a36ef027d8e0b354c32d9f503 Mon Sep 17 00:00:00 2001 From: fortuna Date: Thu, 8 Aug 2019 14:16:37 -0400 Subject: [PATCH 1/9] Convert to Bazel --- .bazelignore | 1 + .bazelrc | 59 ++ .gitignore | 5 +- .travis.yml | 19 +- BUILD.bazel | 23 + WORKSPACE | 52 ++ bower.json | 9 - build/shadowsocks_config.d.ts | 1 + build/shadowsocks_config.js | 624 +++++++++--------- jasmine.json | 6 - package.json | 22 +- punycode.d.ts | 144 ---- src/BUILD | 43 ++ tools/bazel-0.28.1-linux-x86_64.sha256 | 1 + tools/release.sh | 17 + tsconfig.json | 26 +- yarn.lock | 868 +++++++++++++++++++------ 17 files changed, 1194 insertions(+), 726 deletions(-) create mode 100644 .bazelignore create mode 100644 .bazelrc create mode 100644 BUILD.bazel create mode 100644 WORKSPACE delete mode 100644 bower.json delete mode 100644 jasmine.json delete mode 100644 punycode.d.ts create mode 100644 src/BUILD create mode 100644 tools/bazel-0.28.1-linux-x86_64.sha256 create mode 100755 tools/release.sh diff --git a/.bazelignore b/.bazelignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.bazelignore @@ -0,0 +1 @@ +node_modules diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 0000000..8a0870b --- /dev/null +++ b/.bazelrc @@ -0,0 +1,59 @@ +# Common Bazel settings for JavaScript/NodeJS workspaces +# This rc file is automatically discovered when Bazel is run in this workspace, +# see https://docs.bazel.build/versions/master/guide.html#bazelrc +# +# The full list of Bazel options: https://docs.bazel.build/versions/master/command-line-reference.html + +# Bazel will create symlinks from the workspace directory to output artifacts. +# Build results will be placed in a directory called "dist/bin" +# Other directories will be created like "dist/testlogs" +# Be aware that this will still create a bazel-out symlink in +# your project directory, which you must exclude from version control and your +# editor's search path. +build --symlink_prefix=dist/ +# To disable the symlinks altogether (including bazel-out) you can use +# build --symlink_prefix=/ +# however this makes it harder to find outputs. + +# Specifies desired output mode for running tests. +# Valid values are +# 'summary' to output only test status summary +# 'errors' to also print test logs for failed tests +# 'all' to print logs for all tests +# 'streamed' to output logs for all tests in real time +# (this will force tests to be executed locally one at a time regardless of --test_strategy value). +test --test_output=errors + +# Support for debugging NodeJS tests +# Add the Bazel option `--config=debug` to enable this +test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results + +# Turn off legacy external runfiles +# This prevents accidentally depending on this feature, which Bazel will remove. +run --nolegacy_external_runfiles +test --nolegacy_external_runfiles + +# Turn on the "Managed Directories" feature. +# This allows Bazel to share the same node_modules directory with other tools +# NB: this option was introduced in Bazel 0.26 +# See https://docs.bazel.build/versions/master/command-line-reference.html#flag--experimental_allow_incremental_repository_updates +common --experimental_allow_incremental_repository_updates + +# Turn on --incompatible_strict_action_env which was on by default +# in Bazel 0.21.0 but turned off again in 0.22.0. Follow +# https://github.com/bazelbuild/bazel/issues/7026 for more details. +# This flag is needed to so that the bazel cache is not invalidated +# when running bazel via `yarn bazel`. +# See https://github.com/angular/angular/issues/27514. +build --incompatible_strict_action_env +run --incompatible_strict_action_env + +# Load any settings specific to the current user. +# .bazelrc.user should appear in .gitignore so that settings are not shared with team members +# This needs to be last statement in this +# config, as the user configuration should be able to overwrite flags from this file. +# See https://docs.bazel.build/versions/master/best-practices.html#bazelrc +# (Note that we use .bazelrc.user so the file appears next to .bazelrc in directory listing, +# rather than user.bazelrc as suggested in the Bazel docs) +try-import %workspace%/.bazelrc.user + diff --git a/.gitignore b/.gitignore index 7ec005e..3c9ced5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -node_modules/ -/build/*.spec.* /yarn-error.log +dist +bazel-out +node_modules diff --git a/.travis.yml b/.travis.yml index fd7b464..703a9e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,18 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -language: node_js +dist: trusty -node_js: - - 10 +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - wget + - pkg-config cache: yarn: true before_install: - # https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Travis-CI-supports-yarn - - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0 - - export PATH="$HOME/.yarn/bin:$PATH" + - wget https://github.com/bazelbuild/bazel/releases/download/0.28.1/bazel_0.28.1-linux-x86_64.deb + - sha256sum -c tools/bazel_0.28.1-linux-x86_64.deb.sha256 + - sudo dpkg -i bazel_0.28.1-linux-x86_64.deb script: - - yarn test + - bazel test //src/... \ No newline at end of file diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 0000000..acb7621 --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,23 @@ +# Copyright 2019 The Outline Authors +# +# 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. + +# Add rules here to build your software +# See https://docs.bazel.build/versions/master/build-ref.html#BUILD_files + +# Allow any ts_library rules in this workspace to reference the config +# Note: if you move the tsconfig.json file to a subdirectory, you can add an alias() here instead +# so that ts_library rules still use it by default. +# See https://www.npmjs.com/package/@bazel/typescript#installation +exports_files(["tsconfig.json"], visibility = ["//:__subpackages__"]) + diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 0000000..833fcc8 --- /dev/null +++ b/WORKSPACE @@ -0,0 +1,52 @@ +# Copyright 2019 The Outline Authors +# +# 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. + +# Bazel workspace created by @bazel/create 0.35.0 + +# Declares that this directory is the root of a Bazel workspace. +# See https://docs.bazel.build/versions/master/build-ref.html#workspace +workspace( + # How this workspace would be referenced with absolute labels from another workspace + name = "outline_shadowsocksconfig", + # Map the @npm bazel workspace to the node_modules directory. + # This lets Bazel use the same node_modules as other local tooling. + managed_directories = {"@npm": ["node_modules"]}, +) + +# Install the nodejs "bootstrap" package +# This provides the basic tools for running and packaging nodejs programs in Bazel +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +http_archive( + name = "build_bazel_rules_nodejs", + sha256 = "6625259f9f77ef90d795d20df1d0385d9b3ce63b6619325f702b6358abb4ab33", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.35.0/rules_nodejs-0.35.0.tar.gz"], +) + +# The yarn_install rule runs yarn anytime the package.json or yarn.lock file changes. +# It also extracts and installs any Bazel rules distributed in an npm package. +load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install") +yarn_install( + # Name this npm so that Bazel Label references look like @npm//package + name = "npm", + package_json = "//:package.json", + yarn_lock = "//:yarn.lock", +) + +# Install any Bazel rules which were extracted earlier by the yarn_install rule. +load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") +install_bazel_dependencies() + +# Setup TypeScript toolchain +load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace") +ts_setup_workspace() diff --git a/bower.json b/bower.json deleted file mode 100644 index 68069ea..0000000 --- a/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "shadowsocks-config", - "version": "0.0.8", - "license": "Apache-2.0", - "main": "shadowsocks_config.js", - "dependencies": { - "punycode": "^1.4.1" - } -} diff --git a/build/shadowsocks_config.d.ts b/build/shadowsocks_config.d.ts index c977245..aff58a7 100644 --- a/build/shadowsocks_config.d.ts +++ b/build/shadowsocks_config.d.ts @@ -1,3 +1,4 @@ +/// export declare class ShadowsocksConfigError extends Error { constructor(message: string); } diff --git a/build/shadowsocks_config.js b/build/shadowsocks_config.js index 446ae41..5961e56 100644 --- a/build/shadowsocks_config.js +++ b/build/shadowsocks_config.js @@ -1,4 +1,3 @@ -"use strict"; // Copyright 2018 The Outline Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,352 +11,319 @@ // 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. -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -/* tslint:disable */ -var isBrowser = typeof window !== 'undefined'; -var b64Encode = isBrowser ? btoa : require('base-64').encode; -var b64Decode = isBrowser ? atob : require('base-64').decode; -var URL = isBrowser ? window.URL : require('url').URL; -var punycode = isBrowser ? window.punycode : require('punycode'); -if (!punycode) { - throw new Error("Could not find punycode. Did you forget to add e.g.\n ?"); -} -/* tslint:enable */ -// Custom error base class -var ShadowsocksConfigError = /** @class */ (function (_super) { - __extends(ShadowsocksConfigError, _super); - function ShadowsocksConfigError(message) { - var _newTarget = this.constructor; - var _this = _super.call(this, message) || this; - Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain - _this.name = _newTarget.name; - return _this; - } - return ShadowsocksConfigError; -}(Error)); -exports.ShadowsocksConfigError = ShadowsocksConfigError; -var InvalidConfigField = /** @class */ (function (_super) { - __extends(InvalidConfigField, _super); - function InvalidConfigField() { - return _super !== null && _super.apply(this, arguments) || this; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; } - return InvalidConfigField; -}(ShadowsocksConfigError)); -exports.InvalidConfigField = InvalidConfigField; -var InvalidUri = /** @class */ (function (_super) { - __extends(InvalidUri, _super); - function InvalidUri() { - return _super !== null && _super.apply(this, arguments) || this; + else if (typeof define === "function" && define.amd) { + define("outline_shadowsocksconfig/src/shadowsocks_config", ["require", "exports"], factory); } - return InvalidUri; -}(ShadowsocksConfigError)); -exports.InvalidUri = InvalidUri; -// Self-validating/normalizing config data types implement this ValidatedConfigField interface. -// Constructors take some data, validate, normalize, and store if valid, or throw otherwise. -var ValidatedConfigField = /** @class */ (function () { - function ValidatedConfigField() { +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /* tslint:disable */ + const isBrowser = typeof window !== 'undefined'; + const b64Encode = isBrowser ? btoa : require('base-64').encode; + const b64Decode = isBrowser ? atob : require('base-64').decode; + const URL = isBrowser ? window.URL : require('url').URL; + const punycode = isBrowser ? window.punycode : require('punycode'); + if (!punycode) { + throw new Error(`Could not find punycode. Did you forget to add e.g. + ?`); } - return ValidatedConfigField; -}()); -exports.ValidatedConfigField = ValidatedConfigField; -function throwErrorForInvalidField(name, value, reason) { - throw new InvalidConfigField("Invalid " + name + ": " + value + " " + (reason || '')); -} -var Host = /** @class */ (function (_super) { - __extends(Host, _super); - function Host(host) { - var _this = _super.call(this) || this; - if (!host) { - throwErrorForInvalidField('host', host); + /* tslint:enable */ + // Custom error base class + class ShadowsocksConfigError extends Error { + constructor(message) { + super(message); // 'Error' breaks prototype chain here if this is transpiled to es5 + Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain + this.name = new.target.name; } - if (host instanceof Host) { - host = host.data; - } - host = punycode.toASCII(host); - _this.isIPv4 = Host.IPV4_PATTERN.test(host); - _this.isIPv6 = _this.isIPv4 ? false : Host.IPV6_PATTERN.test(host); - _this.isHostname = _this.isIPv4 || _this.isIPv6 ? false : Host.HOSTNAME_PATTERN.test(host); - if (!(_this.isIPv4 || _this.isIPv6 || _this.isHostname)) { - throwErrorForInvalidField('host', host); + } + exports.ShadowsocksConfigError = ShadowsocksConfigError; + class InvalidConfigField extends ShadowsocksConfigError { + } + exports.InvalidConfigField = InvalidConfigField; + class InvalidUri extends ShadowsocksConfigError { + } + exports.InvalidUri = InvalidUri; + // Self-validating/normalizing config data types implement this ValidatedConfigField interface. + // Constructors take some data, validate, normalize, and store if valid, or throw otherwise. + class ValidatedConfigField { + } + exports.ValidatedConfigField = ValidatedConfigField; + function throwErrorForInvalidField(name, value, reason) { + throw new InvalidConfigField(`Invalid ${name}: ${value} ${reason || ''}`); + } + class Host extends ValidatedConfigField { + constructor(host) { + super(); + if (!host) { + throwErrorForInvalidField('host', host); + } + if (host instanceof Host) { + host = host.data; + } + host = punycode.toASCII(host); + this.isIPv4 = Host.IPV4_PATTERN.test(host); + this.isIPv6 = this.isIPv4 ? false : Host.IPV6_PATTERN.test(host); + this.isHostname = this.isIPv4 || this.isIPv6 ? false : Host.HOSTNAME_PATTERN.test(host); + if (!(this.isIPv4 || this.isIPv6 || this.isHostname)) { + throwErrorForInvalidField('host', host); + } + this.data = host; } - _this.data = host; - return _this; } Host.IPV4_PATTERN = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/; Host.IPV6_PATTERN = /^(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}$/i; Host.HOSTNAME_PATTERN = /^[A-z0-9]+[A-z0-9_.-]*$/; - return Host; -}(ValidatedConfigField)); -exports.Host = Host; -var Port = /** @class */ (function (_super) { - __extends(Port, _super); - function Port(port) { - var _this = _super.call(this) || this; - if (port instanceof Port) { - port = port.data; - } - if (typeof port === 'number') { - // Stringify in case negative or floating point -> the regex test below will catch. - port = port.toString(); - } - if (!Port.PATTERN.test(port)) { - throwErrorForInvalidField('port', port); - } - // Could exceed the maximum port number, so convert to Number to check. Could also have leading - // zeros. Converting to Number drops those, so we get normalization for free. :) - port = Number(port); - if (port > 65535) { - throwErrorForInvalidField('port', port); + exports.Host = Host; + class Port extends ValidatedConfigField { + constructor(port) { + super(); + if (port instanceof Port) { + port = port.data; + } + if (typeof port === 'number') { + // Stringify in case negative or floating point -> the regex test below will catch. + port = port.toString(); + } + if (!Port.PATTERN.test(port)) { + throwErrorForInvalidField('port', port); + } + // Could exceed the maximum port number, so convert to Number to check. Could also have leading + // zeros. Converting to Number drops those, so we get normalization for free. :) + port = Number(port); + if (port > 65535) { + throwErrorForInvalidField('port', port); + } + this.data = port; } - _this.data = port; - return _this; } Port.PATTERN = /^[0-9]{1,5}$/; - return Port; -}(ValidatedConfigField)); -exports.Port = Port; -// A method value must exactly match an element in the set of known ciphers. -// ref: https://github.com/shadowsocks/shadowsocks-libev/blob/10a2d3e3/completions/bash/ss-redir#L5 -exports.METHODS = new Set([ - 'rc4-md5', - 'aes-128-gcm', - 'aes-192-gcm', - 'aes-256-gcm', - 'aes-128-cfb', - 'aes-192-cfb', - 'aes-256-cfb', - 'aes-128-ctr', - 'aes-192-ctr', - 'aes-256-ctr', - 'camellia-128-cfb', - 'camellia-192-cfb', - 'camellia-256-cfb', - 'bf-cfb', - 'chacha20-ietf-poly1305', - 'salsa20', - 'chacha20', - 'chacha20-ietf', - 'xchacha20-ietf-poly1305', -]); -var Method = /** @class */ (function (_super) { - __extends(Method, _super); - function Method(method) { - var _this = _super.call(this) || this; - if (method instanceof Method) { - method = method.data; - } - if (!exports.METHODS.has(method)) { - throwErrorForInvalidField('method', method); + exports.Port = Port; + // A method value must exactly match an element in the set of known ciphers. + // ref: https://github.com/shadowsocks/shadowsocks-libev/blob/10a2d3e3/completions/bash/ss-redir#L5 + exports.METHODS = new Set([ + 'rc4-md5', + 'aes-128-gcm', + 'aes-192-gcm', + 'aes-256-gcm', + 'aes-128-cfb', + 'aes-192-cfb', + 'aes-256-cfb', + 'aes-128-ctr', + 'aes-192-ctr', + 'aes-256-ctr', + 'camellia-128-cfb', + 'camellia-192-cfb', + 'camellia-256-cfb', + 'bf-cfb', + 'chacha20-ietf-poly1305', + 'salsa20', + 'chacha20', + 'chacha20-ietf', + 'xchacha20-ietf-poly1305', + ]); + class Method extends ValidatedConfigField { + constructor(method) { + super(); + if (method instanceof Method) { + method = method.data; + } + if (!exports.METHODS.has(method)) { + throwErrorForInvalidField('method', method); + } + this.data = method; } - _this.data = method; - return _this; - } - return Method; -}(ValidatedConfigField)); -exports.Method = Method; -var Password = /** @class */ (function (_super) { - __extends(Password, _super); - function Password(password) { - var _this = _super.call(this) || this; - _this.data = password instanceof Password ? password.data : password; - return _this; } - return Password; -}(ValidatedConfigField)); -exports.Password = Password; -var Tag = /** @class */ (function (_super) { - __extends(Tag, _super); - function Tag(tag) { - if (tag === void 0) { tag = ''; } - var _this = _super.call(this) || this; - _this.data = tag instanceof Tag ? tag.data : tag; - return _this; + exports.Method = Method; + class Password extends ValidatedConfigField { + constructor(password) { + super(); + this.data = password instanceof Password ? password.data : password; + } } - return Tag; -}(ValidatedConfigField)); -exports.Tag = Tag; -// tslint:disable-next-line:no-any -function makeConfig(input) { - // Use "!" for the required fields to tell tsc that we handle undefined in the - // ValidatedConfigFields we call; tsc can't figure that out otherwise. - var config = { - host: new Host(input.host), - port: new Port(input.port), - method: new Method(input.method), - password: new Password(input.password), - tag: new Tag(input.tag), - extra: {}, - }; - // Put any remaining fields in `input` into `config.extra`. - for (var _i = 0, _a = Object.keys(input); _i < _a.length; _i++) { - var key = _a[_i]; - if (!/^(host|port|method|password|tag)$/.test(key)) { - config.extra[key] = input[key] && input[key].toString(); + exports.Password = Password; + class Tag extends ValidatedConfigField { + constructor(tag = '') { + super(); + this.data = tag instanceof Tag ? tag.data : tag; } } - return config; -} -exports.makeConfig = makeConfig; -exports.SHADOWSOCKS_URI = { - PROTOCOL: 'ss:', - getUriFormattedHost: function (host) { - return host.isIPv6 ? "[" + host.data + "]" : host.data; - }, - getHash: function (tag) { - return tag.data ? "#" + encodeURIComponent(tag.data) : ''; - }, - validateProtocol: function (uri) { - if (!uri.startsWith(exports.SHADOWSOCKS_URI.PROTOCOL)) { - throw new InvalidUri("URI must start with \"" + exports.SHADOWSOCKS_URI.PROTOCOL + "\""); + exports.Tag = Tag; + // tslint:disable-next-line:no-any + function makeConfig(input) { + // Use "!" for the required fields to tell tsc that we handle undefined in the + // ValidatedConfigFields we call; tsc can't figure that out otherwise. + const config = { + host: new Host(input.host), + port: new Port(input.port), + method: new Method(input.method), + password: new Password(input.password), + tag: new Tag(input.tag), + extra: {}, + }; + // Put any remaining fields in `input` into `config.extra`. + for (const key of Object.keys(input)) { + if (!/^(host|port|method|password|tag)$/.test(key)) { + config.extra[key] = input[key] && input[key].toString(); + } } - }, - parse: function (uri) { - var error; - for (var _i = 0, _a = [exports.SIP002_URI, exports.LEGACY_BASE64_URI]; _i < _a.length; _i++) { - var uriType = _a[_i]; + return config; + } + exports.makeConfig = makeConfig; + exports.SHADOWSOCKS_URI = { + PROTOCOL: 'ss:', + getUriFormattedHost: (host) => { + return host.isIPv6 ? `[${host.data}]` : host.data; + }, + getHash: (tag) => { + return tag.data ? `#${encodeURIComponent(tag.data)}` : ''; + }, + validateProtocol: (uri) => { + if (!uri.startsWith(exports.SHADOWSOCKS_URI.PROTOCOL)) { + throw new InvalidUri(`URI must start with "${exports.SHADOWSOCKS_URI.PROTOCOL}"`); + } + }, + parse: (uri) => { + let error; + for (const uriType of [exports.SIP002_URI, exports.LEGACY_BASE64_URI]) { + try { + return uriType.parse(uri); + } + catch (e) { + error = e; + } + } + if (!(error instanceof InvalidUri)) { + const originalErrorName = error.name || '(Unnamed Error)'; + const originalErrorMessage = error.message || '(no error message provided)'; + const originalErrorString = `${originalErrorName}: ${originalErrorMessage}`; + const newErrorMessage = `Invalid input: ${originalErrorString}`; + error = new InvalidUri(newErrorMessage); + } + throw error; + }, + }; + // Ref: https://shadowsocks.org/en/config/quick-guide.html + exports.LEGACY_BASE64_URI = { + parse: (uri) => { + exports.SHADOWSOCKS_URI.validateProtocol(uri); + const hashIndex = uri.indexOf('#'); + const hasTag = hashIndex !== -1; + const b64EndIndex = hasTag ? hashIndex : uri.length; + const tagStartIndex = hasTag ? hashIndex + 1 : uri.length; + const tag = new Tag(decodeURIComponent(uri.substring(tagStartIndex))); + const b64EncodedData = uri.substring('ss://'.length, b64EndIndex); + const b64DecodedData = b64Decode(b64EncodedData); + const atSignIndex = b64DecodedData.lastIndexOf('@'); + if (atSignIndex === -1) { + throw new InvalidUri(`Missing "@"`); + } + const methodAndPassword = b64DecodedData.substring(0, atSignIndex); + const methodEndIndex = methodAndPassword.indexOf(':'); + if (methodEndIndex === -1) { + throw new InvalidUri(`Missing password`); + } + const methodString = methodAndPassword.substring(0, methodEndIndex); + const method = new Method(methodString); + const passwordStartIndex = methodEndIndex + 1; + const passwordString = methodAndPassword.substring(passwordStartIndex); + const password = new Password(passwordString); + const hostStartIndex = atSignIndex + 1; + const hostAndPort = b64DecodedData.substring(hostStartIndex); + const hostEndIndex = hostAndPort.lastIndexOf(':'); + if (hostEndIndex === -1) { + throw new InvalidUri(`Missing port`); + } + const uriFormattedHost = hostAndPort.substring(0, hostEndIndex); + let host; try { - return uriType.parse(uri); + host = new Host(uriFormattedHost); } - catch (e) { - error = e; + catch (_) { + // Could be IPv6 host formatted with surrounding brackets, so try stripping first and last + // characters. If this throws, give up and let the exception propagate. + host = new Host(uriFormattedHost.substring(1, uriFormattedHost.length - 1)); } - } - if (!(error instanceof InvalidUri)) { - var originalErrorName = error.name || '(Unnamed Error)'; - var originalErrorMessage = error.message || '(no error message provided)'; - var originalErrorString = originalErrorName + ": " + originalErrorMessage; - var newErrorMessage = "Invalid input: " + originalErrorString; - error = new InvalidUri(newErrorMessage); - } - throw error; - }, -}; -// Ref: https://shadowsocks.org/en/config/quick-guide.html -exports.LEGACY_BASE64_URI = { - parse: function (uri) { - exports.SHADOWSOCKS_URI.validateProtocol(uri); - var hashIndex = uri.indexOf('#'); - var hasTag = hashIndex !== -1; - var b64EndIndex = hasTag ? hashIndex : uri.length; - var tagStartIndex = hasTag ? hashIndex + 1 : uri.length; - var tag = new Tag(decodeURIComponent(uri.substring(tagStartIndex))); - var b64EncodedData = uri.substring('ss://'.length, b64EndIndex); - var b64DecodedData = b64Decode(b64EncodedData); - var atSignIndex = b64DecodedData.lastIndexOf('@'); - if (atSignIndex === -1) { - throw new InvalidUri("Missing \"@\""); - } - var methodAndPassword = b64DecodedData.substring(0, atSignIndex); - var methodEndIndex = methodAndPassword.indexOf(':'); - if (methodEndIndex === -1) { - throw new InvalidUri("Missing password"); - } - var methodString = methodAndPassword.substring(0, methodEndIndex); - var method = new Method(methodString); - var passwordStartIndex = methodEndIndex + 1; - var passwordString = methodAndPassword.substring(passwordStartIndex); - var password = new Password(passwordString); - var hostStartIndex = atSignIndex + 1; - var hostAndPort = b64DecodedData.substring(hostStartIndex); - var hostEndIndex = hostAndPort.lastIndexOf(':'); - if (hostEndIndex === -1) { - throw new InvalidUri("Missing port"); - } - var uriFormattedHost = hostAndPort.substring(0, hostEndIndex); - var host; - try { - host = new Host(uriFormattedHost); - } - catch (_) { - // Could be IPv6 host formatted with surrounding brackets, so try stripping first and last - // characters. If this throws, give up and let the exception propagate. - host = new Host(uriFormattedHost.substring(1, uriFormattedHost.length - 1)); - } - var portStartIndex = hostEndIndex + 1; - var portString = hostAndPort.substring(portStartIndex); - var port = new Port(portString); - var extra = {}; // empty because LegacyBase64Uri can't hold extra - return { method: method, password: password, host: host, port: port, tag: tag, extra: extra }; - }, - stringify: function (config) { - var host = config.host, port = config.port, method = config.method, password = config.password, tag = config.tag; - var hash = exports.SHADOWSOCKS_URI.getHash(tag); - var b64EncodedData = b64Encode(method.data + ":" + password.data + "@" + host.data + ":" + port.data); - var dataLength = b64EncodedData.length; - var paddingLength = 0; - for (; b64EncodedData[dataLength - 1 - paddingLength] === '='; paddingLength++) - ; - b64EncodedData = paddingLength === 0 ? b64EncodedData : - b64EncodedData.substring(0, dataLength - paddingLength); - return "ss://" + b64EncodedData + hash; - }, -}; -// Ref: https://shadowsocks.org/en/spec/SIP002-URI-Scheme.html -exports.SIP002_URI = { - parse: function (uri) { - exports.SHADOWSOCKS_URI.validateProtocol(uri); - // Can use built-in URL parser for expedience. Just have to replace "ss" with "http" to ensure - // correct results, otherwise browsers like Safari fail to parse it. - var inputForUrlParser = "http" + uri.substring(2); - // The built-in URL parser throws as desired when given URIs with invalid syntax. - var urlParserResult = new URL(inputForUrlParser); - var uriFormattedHost = urlParserResult.hostname; - // URI-formatted IPv6 hostnames have surrounding brackets. - var last = uriFormattedHost.length - 1; - var brackets = uriFormattedHost[0] === '[' && uriFormattedHost[last] === ']'; - var hostString = brackets ? uriFormattedHost.substring(1, last) : uriFormattedHost; - var host = new Host(hostString); - var parsedPort = urlParserResult.port; - if (!parsedPort && uri.match(/:80($|\/)/g)) { - // The default URL parser fails to recognize the default port (80) when the URI being parsed - // is HTTP. Check if the port is present at the end of the string or before the parameters. - parsedPort = 80; - } - var port = new Port(parsedPort); - var tag = new Tag(decodeURIComponent(urlParserResult.hash.substring(1))); - var b64EncodedUserInfo = urlParserResult.username.replace(/%3D/g, '='); - // base64.decode throws as desired when given invalid base64 input. - var b64DecodedUserInfo = b64Decode(b64EncodedUserInfo); - var colonIdx = b64DecodedUserInfo.indexOf(':'); - if (colonIdx === -1) { - throw new InvalidUri("Missing password"); - } - var methodString = b64DecodedUserInfo.substring(0, colonIdx); - var method = new Method(methodString); - var passwordString = b64DecodedUserInfo.substring(colonIdx + 1); - var password = new Password(passwordString); - var queryParams = urlParserResult.search.substring(1).split('&'); - var extra = {}; - for (var _i = 0, queryParams_1 = queryParams; _i < queryParams_1.length; _i++) { - var pair = queryParams_1[_i]; - var _a = pair.split('=', 2), key = _a[0], value = _a[1]; - if (!key) - continue; - extra[key] = decodeURIComponent(value || ''); - } - return { method: method, password: password, host: host, port: port, tag: tag, extra: extra }; - }, - stringify: function (config) { - var host = config.host, port = config.port, method = config.method, password = config.password, tag = config.tag, extra = config.extra; - var userInfo = b64Encode(method.data + ":" + password.data); - var uriHost = exports.SHADOWSOCKS_URI.getUriFormattedHost(host); - var hash = exports.SHADOWSOCKS_URI.getHash(tag); - var queryString = ''; - for (var key in extra) { - if (!key) - continue; - queryString += (queryString ? '&' : '?') + (key + "=" + encodeURIComponent(extra[key])); - } - return "ss://" + userInfo + "@" + uriHost + ":" + port.data + "/" + queryString + hash; - }, -}; + const portStartIndex = hostEndIndex + 1; + const portString = hostAndPort.substring(portStartIndex); + const port = new Port(portString); + const extra = {}; // empty because LegacyBase64Uri can't hold extra + return { method, password, host, port, tag, extra }; + }, + stringify: (config) => { + const { host, port, method, password, tag } = config; + const hash = exports.SHADOWSOCKS_URI.getHash(tag); + let b64EncodedData = b64Encode(`${method.data}:${password.data}@${host.data}:${port.data}`); + const dataLength = b64EncodedData.length; + let paddingLength = 0; + for (; b64EncodedData[dataLength - 1 - paddingLength] === '='; paddingLength++) + ; + b64EncodedData = paddingLength === 0 ? b64EncodedData : + b64EncodedData.substring(0, dataLength - paddingLength); + return `ss://${b64EncodedData}${hash}`; + }, + }; + // Ref: https://shadowsocks.org/en/spec/SIP002-URI-Scheme.html + exports.SIP002_URI = { + parse: (uri) => { + exports.SHADOWSOCKS_URI.validateProtocol(uri); + // Can use built-in URL parser for expedience. Just have to replace "ss" with "http" to ensure + // correct results, otherwise browsers like Safari fail to parse it. + const inputForUrlParser = `http${uri.substring(2)}`; + // The built-in URL parser throws as desired when given URIs with invalid syntax. + const urlParserResult = new URL(inputForUrlParser); + const uriFormattedHost = urlParserResult.hostname; + // URI-formatted IPv6 hostnames have surrounding brackets. + const last = uriFormattedHost.length - 1; + const brackets = uriFormattedHost[0] === '[' && uriFormattedHost[last] === ']'; + const hostString = brackets ? uriFormattedHost.substring(1, last) : uriFormattedHost; + const host = new Host(hostString); + let parsedPort = urlParserResult.port; + if (!parsedPort && uri.match(/:80($|\/)/g)) { + // The default URL parser fails to recognize the default port (80) when the URI being parsed + // is HTTP. Check if the port is present at the end of the string or before the parameters. + parsedPort = 80; + } + const port = new Port(parsedPort); + const tag = new Tag(decodeURIComponent(urlParserResult.hash.substring(1))); + const b64EncodedUserInfo = urlParserResult.username.replace(/%3D/g, '='); + // base64.decode throws as desired when given invalid base64 input. + const b64DecodedUserInfo = b64Decode(b64EncodedUserInfo); + const colonIdx = b64DecodedUserInfo.indexOf(':'); + if (colonIdx === -1) { + throw new InvalidUri(`Missing password`); + } + const methodString = b64DecodedUserInfo.substring(0, colonIdx); + const method = new Method(methodString); + const passwordString = b64DecodedUserInfo.substring(colonIdx + 1); + const password = new Password(passwordString); + const queryParams = urlParserResult.search.substring(1).split('&'); + const extra = {}; + for (const pair of queryParams) { + const [key, value] = pair.split('=', 2); + if (!key) + continue; + extra[key] = decodeURIComponent(value || ''); + } + return { method, password, host, port, tag, extra }; + }, + stringify: (config) => { + const { host, port, method, password, tag, extra } = config; + const userInfo = b64Encode(`${method.data}:${password.data}`); + const uriHost = exports.SHADOWSOCKS_URI.getUriFormattedHost(host); + const hash = exports.SHADOWSOCKS_URI.getHash(tag); + let queryString = ''; + for (const key in extra) { + if (!key) + continue; + queryString += (queryString ? '&' : '?') + `${key}=${encodeURIComponent(extra[key])}`; + } + return `ss://${userInfo}@${uriHost}:${port.data}/${queryString}${hash}`; + }, + }; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhZG93c29ja3NfY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3NoYWRvd3NvY2tzX2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxxQ0FBcUM7QUFDckMsRUFBRTtBQUNGLGtFQUFrRTtBQUNsRSxtRUFBbUU7QUFDbkUsMENBQTBDO0FBQzFDLEVBQUU7QUFDRixrREFBa0Q7QUFDbEQsRUFBRTtBQUNGLHNFQUFzRTtBQUN0RSxvRUFBb0U7QUFDcEUsMkVBQTJFO0FBQzNFLHNFQUFzRTtBQUN0RSxpQ0FBaUM7Ozs7Ozs7Ozs7OztJQUVqQyxvQkFBb0I7SUFDcEIsTUFBTSxTQUFTLEdBQUcsT0FBTyxNQUFNLEtBQUssV0F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GVVUklDb21wb25lbnQodmFsdWUgfHwgJycpO1xuICAgIH1cbiAgICByZXR1cm4ge21ldGhvZCwgcGFzc3dvcmQsIGhvc3QsIHBvcnQsIHRhZywgZXh0cmF9O1xuICB9LFxuXG4gIHN0cmluZ2lmeTogKGNvbmZpZzogQ29uZmlnKSA9PiB7XG4gICAgY29uc3Qge2hvc3QsIHBvcnQsIG1ldGhvZCwgcGFzc3dvcmQsIHRhZywgZXh0cmF9ID0gY29uZmlnO1xuICAgIGNvbnN0IHVzZXJJbmZvID0gYjY0RW5jb2RlKGAke21ldGhvZC5kYXRhfToke3Bhc3N3b3JkLmRhdGF9YCk7XG4gICAgY29uc3QgdXJpSG9zdCA9IFNIQURPV1NPQ0tTX1VSSS5nZXRVcmlGb3JtYXR0ZWRIb3N0KGhvc3QpO1xuICAgIGNvbnN0IGhhc2ggPSBTSEFET1dTT0NLU19VUkkuZ2V0SGFzaCh0YWcpO1xuICAgIGxldCBxdWVyeVN0cmluZyA9ICcnO1xuICAgIGZvciAoY29uc3Qga2V5IGluIGV4dHJhKSB7XG4gICAgICBpZiAoIWtleSkgY29udGludWU7XG4gICAgICBxdWVyeVN0cmluZyArPSAocXVlcnlTdHJpbmcgPyAnJicgOiAnPycpICsgYCR7a2V5fT0ke2VuY29kZVVSSUNvbXBvbmVudChleHRyYVtrZXldKX1gO1xuICAgIH1cbiAgICByZXR1cm4gYHNzOi8vJHt1c2VySW5mb31AJHt1cmlIb3N0fToke3BvcnQuZGF0YX0vJHtxdWVyeVN0cmluZ30ke2hhc2h9YDtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/jasmine.json b/jasmine.json deleted file mode 100644 index ba2ec92..0000000 --- a/jasmine.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "spec_dir": ".", - "spec_files": [ - "build/**/*.spec.js" - ] -} \ No newline at end of file diff --git a/package.json b/package.json index 6eb3462..8ecc166 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,35 @@ { - "name": "outline-shadowsocksconfig", - "version": "0.0.8", + "name": "outline_shadowsocksconfig", + "author": "The Outline Team", + "version": "0.1.0", + "private": true, "license": "Apache-2.0", "scripts": { - "build": "tsc", - "test": "yarn build && jasmine --config=jasmine.json", - "clean": "rm -rf build/*.spec.* node_modules/" + "build": "bazel build //...", + "test": "bazel test //...", + "clean": "bazel clean --expunge" }, "main": "./build/shadowsocks_config.js", "types": "./build/shadowsocks_config.d.ts", "devDependencies": { + "@bazel/bazel": "latest", + "@bazel/buildifier": "latest", + "@bazel/ibazel": "latest", + "@bazel/jasmine": "^0.35.0", + "@bazel/typescript": "latest", "@types/base-64": "^0.1.2", "@types/jasmine": "^2.8.6", "@types/node": "^8.0.41", + "@types/punycode": "^2.1.0", "clang-format": "^1.2.2", "husky": "^1.3.1", "jasmine": "^3.1.0", "tslint": "^5.12.1", - "typescript": "^2.5.3" + "typescript": "~3.4.0" }, "dependencies": { "base-64": "^0.1.0", - "punycode": "^1.4.1" + "punycode": "^2.1.1" }, "husky": { "hooks": { diff --git a/punycode.d.ts b/punycode.d.ts deleted file mode 100644 index f9d887d..0000000 --- a/punycode.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2018 The Outline Authors -// -// 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. - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * - * ```js - * // decode domain name parts - * punycode.decode('maana-pta'); // 'mañana' - * punycode.decode('--dqo34k'); // '☃-⌘' - * ``` - * - * @param {string} input The Punycode string of ASCII-only symbols. - * @returns {string} The resulting string of Unicode symbols. - */ -export function decode(input: string): string; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII symbols. - * - * ```js - * // encode domain name parts - * punycode.encode('mañana'); // 'maana-pta' - * punycode.encode('☃-⌘'); // '--dqo34k' - * ``` - * - * @param {string} input The string of Unicode symbols. - * @returns {string} The resulting Punycode string of ASCII-only symbols. - */ -export function encode(input: string): string; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, - * i.e. it doesn’t matter if you call it on a string that has already been - * converted to Unicode. - * - * ```js - * // decode domain names - * punycode.toUnicode('xn--maana-pta.com'); - * // → 'mañana.com' - * punycode.toUnicode('xn----dqo34k.com'); - * // → '☃-⌘.com' - * - * // decode email addresses - * punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); - * // → 'джумла@джpумлатест.bрфa' - * ``` - * - * @param {string} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {string} The Unicode representation of the given Punycode - * string. - */ -export function toUnicode(input: string): string; - -/** - * Converts a lowercased Unicode string representing a domain name or an - * email address to Punycode. Only the non-ASCII parts of the input will be - * converted, i.e. it doesn’t matter if you call it with a domain that’s - * already in ASCII. - * - * ```js - * // encode domain names - * punycode.toASCII('mañana.com'); - * // → 'xn--maana-pta.com' - * punycode.toASCII('☃-⌘.com'); - * // → 'xn----dqo34k.com' - * - * // encode email addresses - * punycode.toASCII('джумла@джpумлатест.bрфa'); - * // → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' - * ``` - * - * @param {string} input The domain name or email address to convert, as a - * Unicode string. - * @returns {string} The Punycode representation of the given domain name or - * email address. - */ -export function toASCII(input: string): string; - -/** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * - * @see - */ -export namespace ucs2 { - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * - * ```js - * punycode.ucs2.decode('abc'); - * // → [0x61, 0x62, 0x63] - * // surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: - * punycode.ucs2.decode('\uD834\uDF06'); - * // → [0x1D306] - * ``` - * - * @see `punycode.ucs2.encode` - * @see - * @param {string} string The Unicode input string (UCS-2). - * @returns {number[]} The new array of code points. - */ - export function decode(string: string): number[]; - - /** - * Creates a string based on an array of numeric code point values. - * - * ```js - * punycode.ucs2.encode([0x61, 0x62, 0x63]); - * // → 'abc' - * punycode.ucs2.encode([0x1D306]); - * // → '\uD834\uDF06' - * ``` - * - * @see `punycode.ucs2.decode` - * @param {number[]} codePoints The array of numeric code points. - * @returns {string} The new Unicode string (UCS-2). - */ - export function encode(codePoints: number[]): string; -} - -/** - * A string representing the current Punycode.js version number. - */ -export const version: string; diff --git a/src/BUILD b/src/BUILD new file mode 100644 index 0000000..ead8d1a --- /dev/null +++ b/src/BUILD @@ -0,0 +1,43 @@ +# Copyright 2019 The Outline Authors +# +# 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. + +package(default_visibility=["//visibility:public"]) +load("@npm_bazel_typescript//:index.bzl", "ts_library") +load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") + +ts_library( + name = "shadowsocks_config", + srcs = ["shadowsocks_config.ts"], + deps = [ + "@npm//@types/node", + "@npm//punycode", + "@npm//base-64", + ], +) + +ts_library( + name = "shadowsocks_config_test_lib", + srcs = ["shadowsocks_config.spec.ts"], + deps = [ + ":shadowsocks_config", + "@npm//@types/jasmine", + ], + testonly = True, +) + +jasmine_node_test( + name = "shadowsocks_config_test", + deps = [":shadowsocks_config_test_lib"], + size = "small", +) diff --git a/tools/bazel-0.28.1-linux-x86_64.sha256 b/tools/bazel-0.28.1-linux-x86_64.sha256 new file mode 100644 index 0000000..4a89361 --- /dev/null +++ b/tools/bazel-0.28.1-linux-x86_64.sha256 @@ -0,0 +1 @@ +daa27fbf9213b3dbc8509a8481f7d99cce6815cf54c50d5d3af5ec2b4c41d31f bazel-0.28.1-linux-x86_64 diff --git a/tools/release.sh b/tools/release.sh new file mode 100755 index 0000000..17344a7 --- /dev/null +++ b/tools/release.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2019 The Outline Authors +# +# 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. + +bazel build src/... +cp dist/bin/src/shadowsocks_config.{d.ts,js} build/ diff --git a/tsconfig.json b/tsconfig.json index 5bc489f..18f7112 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,19 +1,11 @@ { - "compilerOptions": { - "target": "es5", - "outDir": "build", - "declaration": true, - "removeComments": false, - "strict": true, - "module": "commonjs", - "lib": [ - "dom", - "es5", - "scripthost", - "es2016" - ] - }, - "include": [ - "src/**/*.ts" - ] + "compilerOptions": { + "target": "es5", + "lib": [ + "dom", + "es5", + "scripthost", + "es2016" + ] + } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index b7fb0a8..197f13f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,37 +2,171 @@ # yarn lockfile v1 +"@babel/code-frame@^7.0.0": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/highlight@^7.0.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@bazel/bazel-darwin_x64@0.28.1": + version "0.28.1" + resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.28.1.tgz#415658785e1dbd6f7ab5c8f2b98c1c99c614e1d5" + +"@bazel/bazel-linux_x64@0.28.1": + version "0.28.1" + resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.28.1.tgz#f78006089e17660261088272a0e04fc886572e34" + +"@bazel/bazel-win32_x64@0.28.1": + version "0.28.1" + resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.28.1.tgz#60a2819618cf7582cc35ac16c01763a5e807b414" + +"@bazel/bazel@latest": + version "0.28.1" + resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.28.1.tgz#3a6b9b7a74d566c66805242ccaa2f907592b5bff" + dependencies: + "@bazel/hide-bazel-files" latest + optionalDependencies: + "@bazel/bazel-darwin_x64" "0.28.1" + "@bazel/bazel-linux_x64" "0.28.1" + "@bazel/bazel-win32_x64" "0.28.1" + +"@bazel/buildifier-darwin_x64@0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier-darwin_x64/-/buildifier-darwin_x64-0.26.0.tgz#0e4f5066750f7984689857e332f93368e0d782dd" + +"@bazel/buildifier-linux_x64@0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier-linux_x64/-/buildifier-linux_x64-0.26.0.tgz#05020641f17441145056821ec33a2c667e253a3f" + +"@bazel/buildifier-win32_x64@0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier-win32_x64/-/buildifier-win32_x64-0.26.0.tgz#51d983d36fd41f59063347e027487a447e4ea83e" + +"@bazel/buildifier@latest": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.26.0.tgz#65af3851f9ebe8b9ac651185d051b1a155012dbb" + optionalDependencies: + "@bazel/buildifier-darwin_x64" "0.26.0" + "@bazel/buildifier-linux_x64" "0.26.0" + "@bazel/buildifier-win32_x64" "0.26.0" + +"@bazel/hide-bazel-files@latest": + version "0.35.0" + resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.35.0.tgz#66ff148c1076534204d755024557609492718b7f" + +"@bazel/ibazel@latest": + version "0.10.3" + resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.10.3.tgz#2e2b8a1d3e885946eac41db2b1aa6801fb319887" + +"@bazel/jasmine@^0.35.0": + version "0.35.0" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.35.0.tgz#1f55145b01761579f8a9f0b525762912ea832d42" + dependencies: + jasmine "~3.4.0" + jasmine-core "~3.4.0" + v8-coverage "1.0.9" + +"@bazel/typescript@latest": + version "0.35.0" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.35.0.tgz#ffc69b7db0c1c7acd9dce1ecbd4381d6af2773a8" + dependencies: + protobufjs "6.8.8" + semver "5.6.0" + source-map-support "0.5.9" + tsutils "2.27.2" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + "@types/base-64@^0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@types/base-64/-/base-64-0.1.2.tgz#63ac318302cdabb5f04e8ae2a56e54d4832107e2" + version "0.1.3" + resolved "https://registry.yarnpkg.com/@types/base-64/-/base-64-0.1.3.tgz#875320c0d019f576a179324124cdbd5031a411f5" "@types/jasmine@^2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.6.tgz#14445b6a1613cf4e05dd61c3c3256d0e95c0421e" + version "2.8.16" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.16.tgz#a6cb24b1149d65293bd616923500014838e14e7d" + +"@types/long@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.0.tgz#719551d2352d301ac8b81db732acb6bdc28dbdef" + +"@types/node@^10.1.0": + version "10.14.15" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.15.tgz#e8f7729b631be1b02ae130ff0b61f3e018000640" "@types/node@^8.0.41": - version "8.0.45" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.45.tgz#89fad82439d5624e1b5c6b42f0f5d85136dcdecc" + version "8.10.51" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.51.tgz#80600857c0a47a8e8bafc2dae6daed6db58e3627" + +"@types/punycode@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@types/punycode/-/punycode-2.1.0.tgz#89e4f3d09b3f92e87a80505af19be7e0c31d4e83" ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 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" 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" @@ -40,15 +174,6 @@ async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -babel-code-frame@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -58,50 +183,43 @@ base-64@^0.1.0: resolved "https://registry.yarnpkg.com/base-64/-/base-64-0.1.0.tgz#780a99c84e7d600260361511c4877613bf24f6bb" brace-expansion@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" dependencies: balanced-match "^1.0.0" concat-map "0.0.1" +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= dependencies: callsites "^2.0.0" caller-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= dependencies: caller-callsite "^2.0.0" callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" -chalk@^2.3.0: +chalk@^2.0.0, chalk@^2.3.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" @@ -110,52 +228,72 @@ chalk@^2.3.0: ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== clang-format@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/clang-format/-/clang-format-1.2.2.tgz#a7277a03fce9aa4e387ddaa83b60d99dab115737" + version "1.2.4" + resolved "https://registry.yarnpkg.com/clang-format/-/clang-format-1.2.4.tgz#4bb4b0a98180428deb093cf20982e9fc1af20b6c" dependencies: async "^1.5.2" glob "^7.0.0" resolve "^1.1.6" +cliui@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi "^2.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + 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-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= -commander@^2.12.1: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== +commander@^2.12.1, commander@~2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" cosmiconfig@^5.0.7: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.1.0.tgz#6c5c35e97f37f985061cdf653f114784231185cf" - integrity sha512-kCNPvthka8gvLtzAxQXvWo4FxqRB+ftRZyPZNuab5ngvM9Y7yw7hbEysglptLgpkGX9nAOKTBVkHUAe8xtYR6Q== + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" dependencies: import-fresh "^2.0.0" is-directory "^0.3.1" - js-yaml "^3.9.0" - lodash.get "^4.4.2" + js-yaml "^3.13.1" parse-json "^4.0.0" +cross-spawn@^4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" path-key "^2.0.1" @@ -163,43 +301,59 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" +debug@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + dependencies: + ms "^2.1.1" + +decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + diff@^3.2.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== dependencies: once "^1.4.0" error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +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" 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== esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== dependencies: cross-spawn "^6.0.0" get-stream "^4.0.0" @@ -209,32 +363,50 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: locate-path "^3.0.0" +foreground-child@^1.5.6: + version "1.5.6" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" + dependencies: + cross-spawn "^4" + signal-exit "^3.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + get-stdin@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== dependencies: pump "^3.0.0" -glob@^7.0.0, glob@^7.0.6: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" +glob@^7.0.0, glob@^7.1.1, glob@^7.1.3: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -243,38 +415,37 @@ glob@^7.0.0, glob@^7.0.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.1: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - 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" +graceful-fs@^4.1.2: + version "4.2.1" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.1.tgz#1c1f0c364882c868f5bff6512146328336a11b1d" -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" +handlebars@^4.0.3: + version "4.1.2" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" dependencies: - ansi-regex "^2.0.0" + neo-async "^2.6.0" + optimist "^0.6.1" + source-map "^0.6.1" + optionalDependencies: + uglify-js "^3.1.4" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" 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= hosted-git-info@^2.1.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== + version "2.8.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.2.tgz#a35c3f355ac1249f1093c0c2a542ace8818c171a" + dependencies: + lru-cache "^5.1.1" husky@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/husky/-/husky-1.3.1.tgz#26823e399300388ca2afff11cfa8a86b0033fae0" - integrity sha512-86U6sVVVf4b5NYSZ0yvv88dRgBSSXXmHaiq5pP4KDj5JVzdwKgBjEtUPOm8hcoytezFwbU+7gotXNhpHdystlg== dependencies: cosmiconfig "^5.0.7" execa "^1.0.0" @@ -290,7 +461,6 @@ husky@^1.3.1: import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= dependencies: caller-path "^2.0.0" resolve-from "^3.0.0" @@ -303,56 +473,82 @@ inflight@^1.0.4: wrappy "1" inherits@2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== dependencies: ci-info "^2.0.0" is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +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" is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= 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= -jasmine-core@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.1.0.tgz#a4785e135d5df65024dfc9224953df585bd2766c" +istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" -jasmine@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.1.0.tgz#2bd59fd7ec6ec0e8acb64e09f45a68ed2ad1952a" +istanbul-lib-report@^1.1.3: + version "1.1.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" dependencies: - glob "^7.0.6" - jasmine-core "~3.1.0" + istanbul-lib-coverage "^1.2.1" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= +istanbul-reports@^1.3.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" + dependencies: + handlebars "^4.0.3" + +jasmine-core@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.4.0.tgz#2a74618e966026530c3518f03e9f845d26473ce3" + +jasmine@^3.1.0, jasmine@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.4.0.tgz#0fa68903ff0c9697459cd044b44f4dcef5ec8bdc" + dependencies: + glob "^7.1.3" + jasmine-core "~3.4.0" -js-yaml@^3.7.0, js-yaml@^3.9.0: - version "3.12.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.1.tgz#295c8632a18a23e054cf5c9d3cecafe678167600" - integrity sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA== +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + +js-yaml@^3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -360,20 +556,62 @@ js-yaml@^3.7.0, js-yaml@^3.9.0: json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== dependencies: p-locate "^3.0.0" path-exists "^3.0.0" -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + +lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + dependencies: + yallist "^3.0.2" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" minimatch@^3.0.4: version "3.0.4" @@ -381,15 +619,35 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + +neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== normalize-package-data@^2.3.2: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== dependencies: hosted-git-info "^2.1.4" resolve "^1.10.0" @@ -399,44 +657,77 @@ normalize-package-data@^2.3.2: npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= dependencies: path-key "^2.0.0" +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + dependencies: + p-try "^1.0.0" p-limit@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.1.0.tgz#1d5a0d20fb12707c758a655f6bbc4386b5930d68" - integrity sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g== + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" dependencies: p-try "^2.0.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== dependencies: p-limit "^2.0.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + p-try@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" - integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= dependencies: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" @@ -444,7 +735,6 @@ parse-json@^4.0.0: path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= path-is-absolute@^1.0.0: version "1.0.1" @@ -453,123 +743,180 @@ path-is-absolute@^1.0.0: path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -path-parse@^1.0.6: +path-parse@^1.0.5, path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + dependencies: + pify "^3.0.0" pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== dependencies: find-up "^3.0.0" please-upgrade-node@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz#ed320051dfcc5024fae696712c8288993595e8ac" - integrity sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ== + version "3.2.0" + resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" dependencies: semver-compare "^1.0.0" +protobufjs@6.8.8: + version "6.8.8" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.8.tgz#c8b4f1282fd7a90e6f5b109ed11c84af82908e7c" + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.0" + "@types/node" "^10.1.0" + long "^4.0.0" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== dependencies: end-of-stream "^1.1.0" once "^1.3.1" -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + +read-pkg-up@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" + dependencies: + find-up "^3.0.0" + read-pkg "^3.0.0" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" read-pkg@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" - integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc= dependencies: normalize-package-data "^2.3.2" parse-json "^4.0.0" pify "^3.0.0" +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - -resolve@^1.1.6: - version "1.4.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" - dependencies: - path-parse "^1.0.5" -resolve@^1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" - integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2: + version "1.12.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" dependencies: path-parse "^1.0.6" -resolve@^1.3.2: - version "1.9.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06" - integrity sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ== +rimraf@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" dependencies: - path-parse "^1.0.6" + glob "^7.1.3" run-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" - integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A== semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" + +semver@5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= slash@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +source-map-support@0.5.9: + version "0.5.9" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + +spawn-wrap@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c" + dependencies: + foreground-child "^1.5.6" + mkdirp "^0.5.0" + os-homedir "^1.0.1" + rimraf "^2.6.2" + signal-exit "^3.0.2" + which "^1.3.0" spdx-correct@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" @@ -577,101 +924,212 @@ spdx-correct@^3.0.0: spdx-exceptions@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== spdx-expression-parse@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" - integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" 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= -strip-ansi@^3.0.0: +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" dependencies: ansi-regex "^2.0.0" +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" +supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" 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" -tslib@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.0.tgz#dc604ebad64bcbf696d613da6c954aa0e7ea1eb6" +test-exclude@^5.2.2: + version "5.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" + dependencies: + glob "^7.1.3" + minimatch "^3.0.4" + read-pkg-up "^4.0.0" + require-main-filename "^2.0.0" -tslib@^1.8.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" - integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== +tslib@^1.8.0, tslib@^1.8.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" tslint@^5.12.1: - version "5.12.1" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.12.1.tgz#8cec9d454cf8a1de9b0a26d7bdbad6de362e52c1" - integrity sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw== + version "5.18.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.18.0.tgz#f61a6ddcf372344ac5e41708095bbf043a147ac6" dependencies: - babel-code-frame "^6.22.0" + "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1" chalk "^2.3.0" commander "^2.12.1" diff "^3.2.0" glob "^7.1.1" - js-yaml "^3.7.0" + js-yaml "^3.13.1" minimatch "^3.0.4" + mkdirp "^0.5.1" resolve "^1.3.2" semver "^5.3.0" tslib "^1.8.0" - tsutils "^2.27.2" + tsutils "^2.29.0" -tsutils@^2.27.2: +tsutils@2.27.2: + version "2.27.2" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.2.tgz#60ba88a23d6f785ec4b89c6e8179cac9b431f1c7" + dependencies: + tslib "^1.8.1" + +tsutils@^2.29.0: version "2.29.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" - integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== dependencies: tslib "^1.8.1" -typescript@^2.5.3: - version "2.5.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.3.tgz#df3dcdc38f3beb800d4bc322646b04a3f6ca7f0d" +typescript@~3.4.0: + version "3.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99" + +uglify-js@^3.1.4: + version "3.6.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" + dependencies: + commander "~2.20.0" + source-map "~0.6.1" + +uuid@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + +v8-coverage@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/v8-coverage/-/v8-coverage-1.0.9.tgz#780889680c0fea0f587adf22e2b5f443b9434745" + dependencies: + debug "^3.1.0" + foreground-child "^1.5.6" + istanbul-lib-coverage "^1.2.0" + istanbul-lib-report "^1.1.3" + istanbul-reports "^1.3.0" + mkdirp "^0.5.1" + rimraf "^2.6.2" + signal-exit "^3.0.2" + spawn-wrap "^1.4.2" + test-exclude "^5.2.2" + uuid "^3.3.2" + v8-to-istanbul "1.2.0" + yargs "^11.0.0" + +v8-to-istanbul@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-1.2.0.tgz#f6a22ffb08b2202aaba8c2be497d1d41fe8fb4b6" validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -which@^1.2.9: +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@^1.2.9, which@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yallist@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + +yargs-parser@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" + dependencies: + camelcase "^4.1.0" + +yargs@^11.0.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" + dependencies: + cliui "^4.0.0" + decamelize "^1.1.1" + find-up "^2.1.0" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^9.0.2" From 75b809c53d66a30dd6d3934a15f4adf732a8fda9 Mon Sep 17 00:00:00 2001 From: fortuna Date: Thu, 8 Aug 2019 14:23:00 -0400 Subject: [PATCH 2/9] Fix travis sha256 --- tools/bazel-0.28.1-linux-x86_64.sha256 | 1 - tools/bazel_0.28.1-linux-x86_64.deb.sha256 | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 tools/bazel-0.28.1-linux-x86_64.sha256 create mode 100644 tools/bazel_0.28.1-linux-x86_64.deb.sha256 diff --git a/tools/bazel-0.28.1-linux-x86_64.sha256 b/tools/bazel-0.28.1-linux-x86_64.sha256 deleted file mode 100644 index 4a89361..0000000 --- a/tools/bazel-0.28.1-linux-x86_64.sha256 +++ /dev/null @@ -1 +0,0 @@ -daa27fbf9213b3dbc8509a8481f7d99cce6815cf54c50d5d3af5ec2b4c41d31f bazel-0.28.1-linux-x86_64 diff --git a/tools/bazel_0.28.1-linux-x86_64.deb.sha256 b/tools/bazel_0.28.1-linux-x86_64.deb.sha256 new file mode 100644 index 0000000..5a310b6 --- /dev/null +++ b/tools/bazel_0.28.1-linux-x86_64.deb.sha256 @@ -0,0 +1 @@ +238795b1850d4c155c8f280828c344c22d096756d206b8be2ba423731dca52c0 bazel_0.28.1-linux-x86_64.deb From cae3fb40a903b13cf4890dad07f1118371374cea Mon Sep 17 00:00:00 2001 From: fortuna Date: Thu, 8 Aug 2019 14:29:08 -0400 Subject: [PATCH 3/9] Add bazelrc for Travis --- .travis.yml | 3 ++- tools/travis.bazelrc | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tools/travis.bazelrc diff --git a/.travis.yml b/.travis.yml index 703a9e1..95511d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,4 +31,5 @@ before_install: - sudo dpkg -i bazel_0.28.1-linux-x86_64.deb script: - - bazel test //src/... \ No newline at end of file + - bazel --bazelrc=tools/travis.bazelrc test //src/... + \ No newline at end of file diff --git a/tools/travis.bazelrc b/tools/travis.bazelrc new file mode 100644 index 0000000..3e36c3e --- /dev/null +++ b/tools/travis.bazelrc @@ -0,0 +1,20 @@ +# From https://github.com/korfuri/bazel-travis/blob/master/.bazelrc + +# This is from Bazel's former travis setup, to avoid blowing up the RAM usage. +startup --host_jvm_args=-Xms2500m +startup --batch +test --ram_utilization_factor=10 + +# This is so we understand failures better +build --verbose_failures + +# This is so we don't use sandboxed execution. Sandboxed execution +# runs stuff in a container, and since Travis already runs its script +# in a container (unless you require sudo in your .travis.yml) this +# fails to run tests. +build --spawn_strategy=standalone --genrule_strategy=standalone +test --test_strategy=standalone + +# Below this line, .travis.yml will cat the default bazelrc. +# This is needed so Bazel starts with the base workspace in its +# package path. From 7f6d722d08fc290900ee635348e87ecfc360770e Mon Sep 17 00:00:00 2001 From: fortuna Date: Thu, 8 Aug 2019 14:33:59 -0400 Subject: [PATCH 4/9] Use language:minimal --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 95511d0..0e9d896 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ # limitations under the License. dist: trusty +language: minimal addons: apt: @@ -32,4 +33,3 @@ before_install: script: - bazel --bazelrc=tools/travis.bazelrc test //src/... - \ No newline at end of file From f887245368c7be478b08895ffb7c760583045fec Mon Sep 17 00:00:00 2001 From: fortuna Date: Thu, 8 Aug 2019 14:38:22 -0400 Subject: [PATCH 5/9] Remove deprecated --batch --- tools/travis.bazelrc | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/travis.bazelrc b/tools/travis.bazelrc index 3e36c3e..df46e04 100644 --- a/tools/travis.bazelrc +++ b/tools/travis.bazelrc @@ -2,7 +2,6 @@ # This is from Bazel's former travis setup, to avoid blowing up the RAM usage. startup --host_jvm_args=-Xms2500m -startup --batch test --ram_utilization_factor=10 # This is so we understand failures better From a3d3c6044dd22e86aaf441ba3b816b40c56c8da3 Mon Sep 17 00:00:00 2001 From: fortuna Date: Thu, 8 Aug 2019 17:07:12 -0400 Subject: [PATCH 6/9] Remove unused comment --- .bazelrc | 3 --- 1 file changed, 3 deletions(-) diff --git a/.bazelrc b/.bazelrc index 8a0870b..f8b9a02 100644 --- a/.bazelrc +++ b/.bazelrc @@ -11,9 +11,6 @@ # your project directory, which you must exclude from version control and your # editor's search path. build --symlink_prefix=dist/ -# To disable the symlinks altogether (including bazel-out) you can use -# build --symlink_prefix=/ -# however this makes it harder to find outputs. # Specifies desired output mode for running tests. # Valid values are From e1caaac6dd6ad98684fc6599f0dfa717a01e060d Mon Sep 17 00:00:00 2001 From: fortuna Date: Thu, 8 Aug 2019 17:07:46 -0400 Subject: [PATCH 7/9] Run buildifier --- BUILD.bazel | 6 ++++-- WORKSPACE | 6 +++++- src/BUILD | 9 +++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index acb7621..956c07d 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -19,5 +19,7 @@ # Note: if you move the tsconfig.json file to a subdirectory, you can add an alias() here instead # so that ts_library rules still use it by default. # See https://www.npmjs.com/package/@bazel/typescript#installation -exports_files(["tsconfig.json"], visibility = ["//:__subpackages__"]) - +exports_files( + ["tsconfig.json"], + visibility = ["//:__subpackages__"], +) diff --git a/WORKSPACE b/WORKSPACE index 833fcc8..a38e4f5 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -27,6 +27,7 @@ workspace( # Install the nodejs "bootstrap" package # This provides the basic tools for running and packaging nodejs programs in Bazel load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + http_archive( name = "build_bazel_rules_nodejs", sha256 = "6625259f9f77ef90d795d20df1d0385d9b3ce63b6619325f702b6358abb4ab33", @@ -36,6 +37,7 @@ http_archive( # The yarn_install rule runs yarn anytime the package.json or yarn.lock file changes. # It also extracts and installs any Bazel rules distributed in an npm package. load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install") + yarn_install( # Name this npm so that Bazel Label references look like @npm//package name = "npm", @@ -45,8 +47,10 @@ yarn_install( # Install any Bazel rules which were extracted earlier by the yarn_install rule. load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") + install_bazel_dependencies() -# Setup TypeScript toolchain +# Setup TypeScript toolchain load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace") + ts_setup_workspace() diff --git a/src/BUILD b/src/BUILD index ead8d1a..191a539 100644 --- a/src/BUILD +++ b/src/BUILD @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -package(default_visibility=["//visibility:public"]) +package(default_visibility = ["//visibility:public"]) + load("@npm_bazel_typescript//:index.bzl", "ts_library") load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") @@ -21,23 +22,23 @@ ts_library( srcs = ["shadowsocks_config.ts"], deps = [ "@npm//@types/node", - "@npm//punycode", "@npm//base-64", + "@npm//punycode", ], ) ts_library( name = "shadowsocks_config_test_lib", + testonly = True, srcs = ["shadowsocks_config.spec.ts"], deps = [ ":shadowsocks_config", "@npm//@types/jasmine", ], - testonly = True, ) jasmine_node_test( name = "shadowsocks_config_test", - deps = [":shadowsocks_config_test_lib"], size = "small", + deps = [":shadowsocks_config_test_lib"], ) From 46085c5e2b7993622bebdca2067609425df8702a Mon Sep 17 00:00:00 2001 From: fortuna Date: Thu, 8 Aug 2019 18:34:42 -0400 Subject: [PATCH 8/9] Remove clean script --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 8ecc166..15af371 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "license": "Apache-2.0", "scripts": { "build": "bazel build //...", - "test": "bazel test //...", - "clean": "bazel clean --expunge" + "test": "bazel test //..." }, "main": "./build/shadowsocks_config.js", "types": "./build/shadowsocks_config.d.ts", From 9a8e502850c1fc8c0695ed3121ec8878f18c6267 Mon Sep 17 00:00:00 2001 From: fortuna Date: Thu, 8 Aug 2019 18:36:06 -0400 Subject: [PATCH 9/9] Use npm_package --- BUILD.bazel | 8 ++++++++ build/shadowsocks_config.d.ts | 0 build/shadowsocks_config.js | 0 tools/release.sh | 7 +++++-- 4 files changed, 13 insertions(+), 2 deletions(-) mode change 100644 => 100755 build/shadowsocks_config.d.ts mode change 100644 => 100755 build/shadowsocks_config.js diff --git a/BUILD.bazel b/BUILD.bazel index 956c07d..2cb5e84 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -15,6 +15,8 @@ # Add rules here to build your software # See https://docs.bazel.build/versions/master/build-ref.html#BUILD_files +load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") + # Allow any ts_library rules in this workspace to reference the config # Note: if you move the tsconfig.json file to a subdirectory, you can add an alias() here instead # so that ts_library rules still use it by default. @@ -23,3 +25,9 @@ exports_files( ["tsconfig.json"], visibility = ["//:__subpackages__"], ) + +npm_package( + name = "shadowsocks_config_npm", + srcs = [":package.json"], + deps = ["//src:shadowsocks_config"], +) diff --git a/build/shadowsocks_config.d.ts b/build/shadowsocks_config.d.ts old mode 100644 new mode 100755 diff --git a/build/shadowsocks_config.js b/build/shadowsocks_config.js old mode 100644 new mode 100755 diff --git a/tools/release.sh b/tools/release.sh index 17344a7..5beb9a5 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -13,5 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -bazel build src/... -cp dist/bin/src/shadowsocks_config.{d.ts,js} build/ +bazel build :shadowsocks_config_npm + +rm -rf build +mkdir -p build +cp -r dist/bin/shadowsocks_config_npm/src/* build/