diff --git a/.eslintignore b/.eslintignore index a7c94a3..967d5f8 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,3 +6,5 @@ coverage storage.json web/ .esm-cache +dist +src/protos.d.ts diff --git a/.eslintrc b/.eslintrc index 3c3b88b..ee7f70b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,98 +1,26 @@ { - "parser": "babel-eslint", // https://github.com/babel/babel-eslint - // Extend existing configuration from ESlint and eslint-plugin-react defaults. - "extends": [ - "eslint:recommended", // http://eslint.org/docs/rules/ - ], - // Enable ES6 support. If you want to use custom Babel - // features, you will need to enable a custom parser - // as described in a section below. - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" - }, - "env": { - "browser": true, - "node": true, - "es6": true, - "jest": true - }, - // Enable custom plugin known as eslint-plugin-jest - "plugins": [ - "jest" - ], - "rules": { - // Default to single quotes and raise an error if something - // else is used - "quotes": [2, "single"], - //Variables - "no-shadow": 2, // http://eslint.org/docs/rules/no-shadow - "no-shadow-restricted-names": 2, // http://eslint.org/docs/rules/no-shadow-restricted-names - "no-use-before-define": 0, // http://eslint.org/docs/rules/no-use-before-define - //Possible errors - "no-alert": 2, // http://eslint.org/docs/rules/no-alert - "block-scoped-var": 0, // http://eslint.org/docs/rules/block-scoped-var - //ES6 - "no-var": 2, // http://eslint.org/docs/rules/no-var - "prefer-const": 2, // http://eslint.org/docs/rules/prefer-const - //Best Practices - "curly": [2, "multi-line"], // http://eslint.org/docs/rules/curly - "default-case": 2, // http://eslint.org/docs/rules/default-case - "dot-notation": [2, { // http://eslint.org/docs/rules/dot-notation - "allowKeywords": true, - "allowPattern": "^[a-z]+(-[a-z]+)+$", - }], - "comma-dangle": [2, //http://eslint.org/docs/rules/comma-dangle - "always-multiline" + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": [ + "@typescript-eslint" ], - "eqeqeq": 2, // http://eslint.org/docs/rules/eqeqeq - "guard-for-in": 0, // http://eslint.org/docs/rules/guard-for-in - "no-caller": 2, // http://eslint.org/docs/rules/no-caller - "no-eq-null": 2, // http://eslint.org/docs/rules/no-eq-null - "no-eval": 2, // http://eslint.org/docs/rules/no-eval - "no-extend-native": 2, // http://eslint.org/docs/rules/no-extend-native - "no-extra-bind": 2, // http://eslint.org/docs/rules/no-extra-bind - "no-fallthrough": 2, // http://eslint.org/docs/rules/no-fallthrough - "no-floating-decimal": 2, // http://eslint.org/docs/rules/no-floating-decimal - "no-implied-eval": 2, // http://eslint.org/docs/rules/no-implied-eval - "no-lone-blocks": 2, // http://eslint.org/docs/rules/no-lone-blocks - "no-loop-func": 2, // http://eslint.org/docs/rules/no-loop-func - "no-multi-str": 2, // http://eslint.org/docs/rules/no-multi-str - "no-native-reassign": 2, // http://eslint.org/docs/rules/no-native-reassign - "no-new": 2, // http://eslint.org/docs/rules/no-new - "no-new-func": 2, // http://eslint.org/docs/rules/no-new-func - "no-new-wrappers": 2, // http://eslint.org/docs/rules/no-new-wrappers - "no-octal-escape": 2, // http://eslint.org/docs/rules/no-octal-escape - "no-param-reassign": 2, // http://eslint.org/docs/rules/no-param-reassign - "no-proto": 2, // http://eslint.org/docs/rules/no-proto - "no-redeclare": 2, // http://eslint.org/docs/rules/no-redeclare - "no-return-assign": 2, // http://eslint.org/docs/rules/no-return-assign - "no-script-url": 2, // http://eslint.org/docs/rules/no-script-url - "no-self-compare": 2, // http://eslint.org/docs/rules/no-self-compare - "no-sequences": 2, // http://eslint.org/docs/rules/no-sequences - "no-throw-literal": 2, // http://eslint.org/docs/rules/no-throw-literal - "no-trailing-spaces": 2, //http://eslint.org/docs/rules/no-trailing-spaces - "no-underscore-dangle": 0, //http://eslint.org/docs/rules/no-underscore-dangle - "no-with": 2, // http://eslint.org/docs/rules/no-with - "radix": 2, // http://eslint.org/docs/rules/radix - "semi": [2, "always", { //http://eslint.org/docs/rules/semi - "omitLastInOneLineBlock": true - }], - "vars-on-top": 2, // http://eslint.org/docs/rules/vars-on-top - "wrap-iife": [2, "any"], // http://eslint.org/docs/rules/wrap-iife - "yoda": 2, // http://eslint.org/docs/rules/yoda - "no-console": 0, - "no-unused-vars": [2, { "ignoreRestSiblings": true }], - "key-spacing": [2, { - "beforeColon": true, - "afterColon": true, - "mode": "minimum", - "align": { - "beforeColon": true, - "afterColon": true, - "on": "colon", - "mode": "strict" - } - }] - } -} + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended" + ], + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-duplicate-enum-values": "off" + }, + "overrides": [ + { + "files": ["**/*.test"], + "plugins": ["jest"], + "extends": ["plugin:jest/recommended"], + "rules": { + "no-undef": "off", + "import/first": "off" + } + } + ] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8316bb8..f592bfe 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,9 @@ storage.json web/ .esm-cache test/keys.js +.history +dist +src/protos.d.ts +*.tsbuildinfo +yarn-error.log +tests diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 19282ed..0000000 --- a/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.eslintignore -.eslintrc -.gitignore -web -proxy -scripts diff --git a/.nvmrc b/.nvmrc index 45a4fb7..209e3ef 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -8 +20 diff --git a/.yarnclean b/.yarnclean new file mode 100644 index 0000000..4be6e16 --- /dev/null +++ b/.yarnclean @@ -0,0 +1 @@ +dist/* \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8d99e80 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +# @eneris/push-receiver + +## 4.0.1-beta +### Braking changes +- New parametrer `firebase` is now requried in the config - this is used mainly for FCM installation +- FCM `installation` data were added into `fcm` part of `Credentials` containing Firebase Install credentials - Token refreshing is in TODO +- Removed the `logLevel` option and replaced it with `debug: boolean` +- Moved `sentTestMessage` into separate class called `PushSender` + +### Major changes +- Replaced `axios` with native `fetch` in Node v20+ +- Added `index` export for `PushReceiver` and `PushSender` + +## 3.1.0 + +### Minor Changes + +- Added automated Heartbeat messages + - new option `heartbeatIntervalMs` DEFAULT: 5 * 60 * 1000 + - new events `ON_HEARTBEAT` - this is emited when socket recieves `ping` or `ack` messages + +### Patch Changes + +- Updated devDependencies \ No newline at end of file diff --git a/README.md b/README.md index dc4a61a..d73d2c8 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,6 @@ A library to subscribe to GCM/FCM and receive notifications within a node process. -For [Electron](https://github.com/electron/electron), you can use [electron-push-receiver](https://github.com/MatthieuLemoine/electron-push-receiver) instead which provides a convenient wrapper. - -See [this blog post](https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0) for more details. - ## When should I use `push-receiver` ? - I want to **receive** push notifications sent using Firebase Cloud Messaging in an [electron](https://github.com/electron/electron) desktop application. @@ -19,53 +15,79 @@ See [this blog post](https://medium.com/@MatthieuLemoine/my-journey-to-bring-web ## Install ` -npm i -S push-receiver +npm i -S @eneris/push-receiver ` -## Requirements +## Requirements -- Node v8 (async/await support) -- Firebase sender id to receive notification -- Firebase serverKey to send notification (optional) +- Node v20 (async/await/randomUUID/fetch support) +- Firebase credentials from `Step 1` - https://firebase.google.com/docs/web/setup -## Usage +## Acknowledgements +- https://github.com/MatthieuLemoine - for creating initial module on wich uppon in iterated -### Electron +## Usage -You can use [electron-push-receiver](https://github.com/MatthieuLemoine/electron-push-receiver) instead which provides a convenient wrapper. +### ClientConfig + +```typescript +interface ClientConfig { + credentials?: Credentials // Will be generated if missing - save this after first use! + persistentIds?: PersistentId[] // Default - [] + bundleId?: string // Default - 'receiver.push.com' + chromeId?: string // Default - 'org.chromium.linux' + chromeVersion?: string // Default - '94.0.4606.51' + debug?: boolean // Enables debug console logs + heartbeatIntervalMs?: number // Default - 5 * 60 * 1000 + firebase: FirebaseConfig // Full client firebase credentials are now needed +} +``` -### Node +### Node example ```javascript -const { register, listen } = require('push-receiver'); - -// First time -// Register to GCM and FCM -const credentials = await register(senderId); // You should call register only once and then store the credentials somewhere -storeCredentials(credentials) // Store credentials to use it later -const fcmToken = credentials.fcm.token; // Token to use to send notifications -sendTokenToBackendOrWhatever(fcmToken); - - -// Next times -const credentials = getSavedCredentials() // get your saved credentials from somewhere (file, db, etc...) -// persistentIds is the list of notification ids received to avoid receiving all already received notifications on start. -const persistentIds = getPersistentIds() || [] // get all previous persistentIds from somewhere (file, db, etc...) -await listen({ ...credentials, persistentIds}, onNotification); - -// Called on new notification -function onNotification({ notification, persistentId }) { - // Update list of persistentId in file/db/... - updatePersistentIds([...persistentIds, persistentId]); - // Do someting with the notification - display(notification) -} -``` +import { PushReceiver } from '@eneris/push-receiver' -### Test notification +(async () => { + const instance = new PushReceiver({ + debug: true, + persistentIds: [], // Recover stored ids of all previous notifications + firebase: { + // ...Firebase web credentials + }, + credentials: null, // Insert credentials here after the first run + }) -To test, you can use the [send script](scripts/send/index.js) provided in this repo, you need to pass your serverKey and the FCM token as arguments : + const stopListeningToCredentials = instance.onCredentialsChanged(({ oldCredentials, newCredentials }) => { + console.log('Client generated new credentials.', newCredentials) + // Save them somewhere! And decide if thing are needed to re-subscribe + }) -``` -node scripts/send --serverKey="" --token="" + const stopListeningToNotifications = instance.onNotification(notification => { + // Do someting with the notification + console.log('Notification received', notification) + }) + + await instance.connect() + + + await instance.connect() + + console.log('connected') + + const sender = new PushSender({ + // Firebase service account credentials here + }) + + console.log('server created') + + await sender.testMessage(instance.config.credentials.fcm.token) + + console.log('message sent') + + stopListeningToCredentials() + stopListeningToNotifications() + + instance.destroy() +})() ``` diff --git a/example.js b/example.js new file mode 100644 index 0000000..a3a8210 --- /dev/null +++ b/example.js @@ -0,0 +1,21 @@ +const { + PushReceiver, + PushSender, +} = require('./dist'); + +(async () => { + const client = new PushReceiver({ + debug: true, + persistentIds: [], + firebase: /* Insert firebase config here */, + credentials: null + }) + + await client.connect(); + + client.on('ON_MESSAGE_RECEIVED', console.log) + + const sender = new PushSender(/* FIREBASE SERVICE ACCOUNT JSON */); + + sender.testMessage(client.fcmToken); +})() diff --git a/example/index.js b/example/index.js deleted file mode 100644 index f3fbaf2..0000000 --- a/example/index.js +++ /dev/null @@ -1,25 +0,0 @@ -const { register, listen } = require('../src'); -const senderId = require('yargs').argv.senderId; - -if (!senderId) { - console.error('Missing senderId'); - return; -} - -(async () => { - // First time - // Register to GCM and FCM - const credentials = await register(senderId); // You should call register only once and then store the credentials somewhere - const fcmToken = credentials.fcm.token; // Token to use to send notifications - console.log('Use this following token to send a notification', fcmToken); - // persistentIds is the list of notification ids received to avoid receiving all already received notifications on start. - const persistentIds = []; // get all previous persistentIds from somewhere (file, db, etc...) - await listen({ ...credentials, persistentIds }, onNotification); -})(); - -// Called on new notification -function onNotification({ notification }) { - // Do someting with the notification - console.log('Notification received'); - console.log(notification); -} diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..41b6c0e --- /dev/null +++ b/jest.config.js @@ -0,0 +1,6 @@ +/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ + +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', +} diff --git a/package.json b/package.json index 398fb88..f2e2740 100644 --- a/package.json +++ b/package.json @@ -1,68 +1,60 @@ { - "name": "push-receiver", - "version": "2.1.1", - "description": - "A module to subscribe to GCM/FCM and receive notifications within a node process.", - "main": "src/index.js", - "scripts": { - "start": "node scripts/listen", - "register": "node scripts/register", - "send": "node scripts/send", - "pretty": - "prettier-eslint --single-quote --trailing-comma es5 --write \"**/*.js\" \"**/*.json\"", - "pretty:check": - "prettier-eslint --single-quote --trailing-comma es5 --list-different --log-level silent \"**/*.js\" \"**/*.json\"", - "lint": "eslint 'src/**/*.js'", - "lint:fix": "eslint 'src/**/*.js' --fix", - "test": "jest", - "precommit": "lint-staged" - }, - "lint-staged": { - "*.js": [ - "eslint --fix", - "prettier-eslint --single-quote --trailing-comma es5 --write" + "name": "@eneris/push-receiver", + "version": "4.3.0", + "description": "A module to subscribe to GCM/FCM and receive notifications within a node process.", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist", + "package*", + "*.md" ], - "*.json": ["prettier-eslint --single-quote --trailing-comma es5 --write"] - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/MatthieuLemoine/push-receiver.git" - }, - "keywords": [ - "push", - "service", - "fcm", - "gcm", - "notifications", - "node", - "electron", - "receiver" - ], - "author": "MatthieuLemoine", - "license": "MIT", - "bugs": { - "url": "https://github.com/MatthieuLemoine/push-receiver/issues" - }, - "homepage": "https://github.com/MatthieuLemoine/push-receiver#readme", - "devDependencies": { - "babel-eslint": "^7.2.3", - "eslint": "^4.4.1", - "eslint-plugin-jest": "^20.0.3", - "http-proxy": "^1.16.2", - "husky": "^0.14.3", - "jest": "^22.2.2", - "lint-staged": "^6.1.0", - "prettier": "^1.6.1", - "prettier-eslint": "^7.0.0", - "prettier-eslint-cli": "^4.3.0", - "yargs": "^10.0.3" - }, - "dependencies": { - "http_ece": "^1.0.5", - "long": "^3.2.0", - "protobufjs": "^6.8.0", - "request": "^2.81.0", - "request-promise": "^4.2.1", - "uuid": "^3.1.0" - } + "scripts": { + "protos:convert": "yarn pbjs -t static-module --force-long --wrap commonjs -o ./src/protos.js ./src/protos/*.proto", + "protos": "yarn pbts -o ./src/protos.d.ts ./src/protos.js", + "protos:build": "yarn protos:convert && yarn protos", + "protos:copy": "cp ./src/protos.* ./dist/", + "build": "yarn protos:build && yarn tsc && yarn protos:copy", + "prepublish": "yarn build", + "lint": "yarn eslint src --ext .ts", + "precommit": "yarn lint && yarn build", + "prepare": "yarn prepublish" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/eneris/push-receiver.git" + }, + "keywords": [ + "push", + "service", + "fcm", + "gcm", + "notifications", + "node", + "electron", + "receiver" + ], + "author": "Eneris & MatthieuLemoine", + "license": "MIT", + "bugs": { + "url": "https://github.com/eneris/push-receiver/issues" + }, + "homepage": "https://github.com/eneris/push-receiver#readme", + "devDependencies": { + "@types/node": "^22.8.2", + "@typescript-eslint/eslint-plugin": "^8.12.1", + "@typescript-eslint/parser": "^8.12.1", + "eslint": "^9.13.0", + "protobufjs-cli": "^1.1.3", + "typescript": "^5.6.3" + }, + "dependencies": { + "http_ece": "^1.2.1", + "jsonwebtoken": "^9.0.2", + "long": "^5.2.3", + "protobufjs": "^7.4.0" + }, + "engines": { + "node": ">=20" + } } diff --git a/proxy/gcm.js b/proxy/gcm.js deleted file mode 100644 index 94c4e5c..0000000 --- a/proxy/gcm.js +++ /dev/null @@ -1,76 +0,0 @@ -const https = require('https'); -const fs = require('fs'); -const path = require('path'); -const protobuf = require('protobufjs'); -const httpProxy = require('http-proxy'); -const proxy = httpProxy.createProxyServer({}); -const { warn, info } = require('../src/logger'); - -const HOST = 'https://216.58.198.206'; -let root; - -const options = { - key : fs.readFileSync(path.join(__dirname, 'android_key.pem')), - cert : fs.readFileSync(path.join(__dirname, 'android_cert.pem')), -}; - -proxy.on('proxyRes', (proxyRes, req) => { - proxyRes.on('data', data => { - info('REQUEST RESPONSE :'); - try { - if (req.url === '/checkin') { - const AndroidCheckinResponse = root.lookupType( - 'checkin_proto.AndroidCheckinResponse' - ); - console.log(AndroidCheckinResponse.decode(data)); - } else if (req.url === '/c2dm/register3') { - console.log(data.toString('utf8')); - } - } catch (e) { - console.log(e); - logBuffer(data); - warn('Error while decoding response'); - } - }); -}); - -https - .createServer(options, (req, res) => { - console.log(req.url); - req.on('data', data => { - info('REQUEST DATA :'); - try { - if (req.url === '/checkin') { - const AndroidCheckinRequest = root.lookupType( - 'checkin_proto.AndroidCheckinRequest' - ); - console.log(AndroidCheckinRequest.decode(data)); - } else if (req.url === '/c2dm/register3') { - console.log(data.toString('utf8')); - } - } catch (e) { - warn('Error while decoding'); - } - //logBuffer(data); - }); - proxy.web(req, res, { target : HOST }); - }) - .listen(443); - -loadProtoFile() - .then(r => (root = r)) - .catch(console.error); - -function loadProtoFile() { - return protobuf.load( - path.join(__dirname, '..', 'src', 'gcm', 'checkin.proto') - ); -} - -function logBuffer(buffer) { - console.log( - Array.from(buffer.values()) - .reduce((string, item) => `${string} ${item.toString(16)}`, '') - .slice(1) - ); -} diff --git a/proxy/index.js b/proxy/index.js deleted file mode 100644 index 69bf384..0000000 --- a/proxy/index.js +++ /dev/null @@ -1,83 +0,0 @@ -const tls = require('tls'); -const fs = require('fs'); -const path = require('path'); -const protobuf = require('protobufjs'); - -const mtalkOptions = { - key : fs.readFileSync(path.join(__dirname, 'key.pem')), - cert : fs.readFileSync(path.join(__dirname, 'cert.pem')), -}; -let root; - -const server = tls.createServer(mtalkOptions, socket => { - console.info('socket connected'); - const proxySocket = new tls.TLSSocket(); - let connected = false; - socket.on('data', data => { - console.info('SOCKET DATA :'); - try { - const LoginRequestType = root.lookupType('mcs_proto.LoginRequest'); - console.log(LoginRequestType.decode(data)); - } catch (e) {} - logBuffer(data); - console.info('*******'); - if (connected) { - proxySocket.write(data); - } else { - proxySocket.connect( - { - host : '64.233.166.188', - port : 5228, - }, - () => { - connected = true; - proxySocket.write(data); - } - ); - } - }); - socket.on('error', error => { - console.info('Error'); - console.info(error); - }); - socket.on('end', () => { - console.info('end'); - proxySocket.end(); - }); - proxySocket.on('close', () => console.warn('Socket closed')); - proxySocket.on('data', buffer => { - console.warn('PROXY DATA :'); - logBuffer(buffer); - console.warn('*******'); - socket.write(buffer); - }); - proxySocket.on('error', err => { - console.warn('proxy error'); - console.warn(err); - }); - proxySocket.on('end', () => { - console.warn('proxy end'); - socket.end(); - }); -}); -server.listen(5228, () => { - console.log('server bound'); -}); - -loadProtoFile() - .then(r => (root = r)) - .catch(console.error); - -function loadProtoFile() { - return protobuf.load( - path.join(__dirname, '..', 'src', 'client', 'mcs.proto') - ); -} - -function logBuffer(buffer) { - console.log( - Array.from(buffer.values()) - .reduce((string, item) => `${string} ${item.toString(16)}`, '') - .slice(1) - ); -} diff --git a/scripts/listen/index.js b/scripts/listen/index.js deleted file mode 100644 index 9fd8b88..0000000 --- a/scripts/listen/index.js +++ /dev/null @@ -1,11 +0,0 @@ -const { listen } = require('../../src'); - -(async () => { - try { - await listen(); - console.log('Connected'); - } catch (e) { - console.error('Error during notification listening'); - console.error(e); - } -})(); diff --git a/scripts/register/index.js b/scripts/register/index.js deleted file mode 100644 index 6124d16..0000000 --- a/scripts/register/index.js +++ /dev/null @@ -1,17 +0,0 @@ -const { register } = require('../../src'); -const senderId = require('yargs').argv.senderId; - -if (!senderId) { - console.error('Missing senderId'); - return; -} - -(async () => { - try { - await register(senderId); - console.log('Successfully registered'); - } catch (e) { - console.error('Error during registration'); - console.error(e); - } -})(); diff --git a/scripts/send/index.js b/scripts/send/index.js deleted file mode 100644 index 2185a04..0000000 --- a/scripts/send/index.js +++ /dev/null @@ -1,38 +0,0 @@ -const request = require('request-promise'); -const argv = require('yargs').argv; - -const serverKey = argv.serverKey; -const token = argv.token; - -if (!serverKey) { - console.error('Missing serverKey argument'); - return; -} - -if (!token) { - console.error('Missing token argument'); - return; -} - -(async () => { - try { - const response = await request({ - method : 'POST', - url : 'https://fcm.googleapis.com/fcm/send', - json : true, - body : { - to : token, - notification : { - title : 'Hello world', - body : 'Test', - }, - }, - headers : { - Authorization : `key=${serverKey}`, - }, - }); - console.log(response); - } catch (e) { - console.error(e.message); - } -})(); diff --git a/src/client.js b/src/client.js deleted file mode 100644 index 22fbea5..0000000 --- a/src/client.js +++ /dev/null @@ -1,205 +0,0 @@ -const EventEmitter = require('events'); -const Long = require('long'); -const Parser = require('./parser'); -const decrypt = require('./utils/decrypt'); -const path = require('path'); -const tls = require('tls'); -const { checkIn } = require('./gcm'); -const { - kMCSVersion, - kLoginRequestTag, - kDataMessageStanzaTag, - kLoginResponseTag, -} = require('./constants'); -const { load } = require('protobufjs'); - -const HOST = 'mtalk.google.com'; -const PORT = 5228; -const MAX_RETRY_TIMEOUT = 15; - -let proto = null; - -module.exports = class Client extends EventEmitter { - static async init() { - if (proto) { - return; - } - proto = await load(path.resolve(__dirname, 'mcs.proto')); - } - - constructor(credentials, persistentIds) { - super(); - this._credentials = credentials; - this._persistentIds = persistentIds || []; - this._retryCount = 0; - this._onSocketConnect = this._onSocketConnect.bind(this); - this._onSocketClose = this._onSocketClose.bind(this); - this._onSocketError = this._onSocketError.bind(this); - this._onMessage = this._onMessage.bind(this); - this._onParserError = this._onParserError.bind(this); - } - - async connect() { - await Client.init(); - await this._checkIn(); - this._connect(); - // can happen if the socket immediately closes after being created - if (!this._socket) { - return; - } - await Parser.init(); - // can happen if the socket immediately closes after being created - if (!this._socket) { - return; - } - this._parser = new Parser(this._socket); - this._parser.on('message', this._onMessage); - this._parser.on('error', this._onParserError); - } - - destroy() { - this._destroy(); - } - - async _checkIn() { - return checkIn( - this._credentials.gcm.androidId, - this._credentials.gcm.securityToken - ); - } - - _connect() { - this._socket = new tls.TLSSocket(); - this._socket.setKeepAlive(true); - this._socket.on('connect', this._onSocketConnect); - this._socket.on('close', this._onSocketClose); - this._socket.on('error', this._onSocketError); - this._socket.connect({ host : HOST, port : PORT }); - this._socket.write(this._loginBuffer()); - } - - _destroy() { - clearTimeout(this._retryTimeout); - if (this._socket) { - this._socket.removeListener('connect', this._onSocketConnect); - this._socket.removeListener('close', this._onSocketClose); - this._socket.removeListener('error', this._onSocketError); - this._socket.destroy(); - this._socket = null; - } - if (this._parser) { - this._parser.removeListener('message', this._onMessage); - this._parser.removeListener('error', this._onParserError); - this._parser.destroy(); - this._parser = null; - } - } - - _loginBuffer() { - const LoginRequestType = proto.lookupType('mcs_proto.LoginRequest'); - const hexAndroidId = Long.fromString( - this._credentials.gcm.androidId - ).toString(16); - const loginRequest = { - adaptiveHeartbeat : false, - authService : 2, - authToken : this._credentials.gcm.securityToken, - id : 'chrome-63.0.3234.0', - domain : 'mcs.android.com', - deviceId : `android-${hexAndroidId}`, - networkType : 1, - resource : this._credentials.gcm.androidId, - user : this._credentials.gcm.androidId, - useRmq2 : true, - setting : [{ name : 'new_vc', value : '1' }], - // Id of the last notification received - clientEvent : [], - receivedPersistentId : this._persistentIds, - }; - - const errorMessage = LoginRequestType.verify(loginRequest); - if (errorMessage) { - throw new Error(errorMessage); - } - - const buffer = LoginRequestType.encodeDelimited(loginRequest).finish(); - - return Buffer.concat([ - Buffer.from([kMCSVersion, kLoginRequestTag]), - buffer, - ]); - } - - _onSocketConnect() { - this._retryCount = 0; - this.emit('connect'); - } - - _onSocketClose() { - this.emit('disconnect') - this._retry(); - } - - _onSocketError(error) { - // ignore, the close handler takes care of retry - } - - _onParserError(error) { - this._retry(); - } - - _retry() { - this._destroy(); - const timeout = Math.min(++this._retryCount, MAX_RETRY_TIMEOUT) * 1000; - this._retryTimeout = setTimeout(this.connect.bind(this), timeout); - } - - _onMessage({ tag, object }) { - if (tag === kLoginResponseTag) { - // clear persistent ids, as we just sent them to the server while logging - // in - this._persistentIds = []; - } else if (tag === kDataMessageStanzaTag) { - this._onDataMessage(object); - } - } - - _onDataMessage(object) { - if (this._persistentIds.includes(object.persistentId)) { - return; - } - - let message; - try { - message = decrypt(object, this._credentials.keys); - } catch (error) { - switch (true) { - case error.message.includes( - 'Unsupported state or unable to authenticate data' - ): - case error.message.includes('crypto-key is missing'): - case error.message.includes('salt is missing'): - // NOTE(ibash) Periodically we're unable to decrypt notifications. In - // all cases we've been able to receive future notifications using the - // same keys. So, we silently drop this notification. - console.warn( - 'Message dropped as it could not be decrypted: ' + error.message - ); - this._persistentIds.push(object.persistentId); - return; - default: { - throw error; - } - } - } - - // Maintain persistentIds updated with the very last received value - this._persistentIds.push(object.persistentId); - // Send notification - this.emit('ON_NOTIFICATION_RECEIVED', { - notification : message, - // Needs to be saved by the client - persistentId : object.persistentId, - }); - } -}; diff --git a/src/client.ts b/src/client.ts new file mode 100644 index 0000000..9fb6559 --- /dev/null +++ b/src/client.ts @@ -0,0 +1,441 @@ +import Long from 'long' +import ProtobufJS from 'protobufjs' +import tls from 'tls' +import registerGCM, { checkIn } from './gcm' +import registerFCM from './fcm' +import createKeys from './keys' +import Parser from './parser' +import decrypt from './utils/decrypt' +import Logger from './utils/logger' +import Protos, { mcs_proto } from './protos' +import defer from './utils/defer' + +import Emitter from './emitter' + +import { Variables, MCSProtoTag } from './constants' + +import type * as Types from './types' + +export { + Types +} + +ProtobufJS.util.Long = Long +ProtobufJS.configure() + +const HOST = 'mtalk.google.com' +const PORT = 5228 +const MAX_RETRY_TIMEOUT = 15 + +interface ClientEvents { + ON_MESSAGE_RECEIVED: (data: Types.MessageEnvelope) => void + ON_CREDENTIALS_CHANGE: (data: Types.EventChangeCredentials) => void + ON_CONNECT: (data: void) => void + ON_DISCONNECT: (data: void) => void + ON_READY: (data: void) => void + ON_HEARTBEAT: (data: void) => void +} + +export default class PushReceiver extends Emitter { + #config: Types.ClientConfig + #socket: tls.TLSSocket + #retryCount = 0 + #retryTimeout: NodeJS.Timeout + #parser: Parser + #heartbeatTimer?: NodeJS.Timeout + #heartbeatTimeout?: NodeJS.Timeout + #streamId = 0 + #lastStreamIdReported = -1 + #ready = defer() + + persistentIds: Types.PersistentId[] + + get fcmToken() { + return this.#config.credentials?.fcm?.token + } + + constructor(config: Types.ClientConfig) { + super() + + this.setDebug(config.debug) + Logger.debug('constructor', config) + + this.#config = { + bundleId: 'receiver.push.com', + chromeId: 'org.chromium.linux', + chromeVersion: '94.0.4606.51', + vapidKey: '', + persistentIds: [], + heartbeatIntervalMs: 5 * 60 * 1000, // 5 min + ...config + } + + this.persistentIds = this.#config.persistentIds + } + + get whenReady() { + return this.#ready.promise; + } + + setDebug(enabled?: boolean) { + Logger.setDebug(enabled) + } + + onNotification(listener: (data: Types.MessageEnvelope) => void): Types.DisposeFunction { + return this.on('ON_MESSAGE_RECEIVED', listener) + } + + onCredentialsChanged(listener: (data: Types.EventChangeCredentials) => void): Types.DisposeFunction { + return this.on('ON_CREDENTIALS_CHANGE', listener) + } + + onReady(listener: () => void): Types.DisposeFunction { + return this.on('ON_READY', listener) + } + + connect = async (): Promise => { + if (this.#socket) return + + await this.registerIfNeeded() + + Logger.debug('connect') + + this.#lastStreamIdReported = -1 + + this.#socket = new tls.TLSSocket(null) + this.#socket.setKeepAlive(true) + this.#socket.on('connect', () => this.#handleSocketConnect()) + this.#socket.on('close', () => this.#handleSocketClose()) + this.#socket.on('error', (err) => this.#handleSocketError(err)) + this.#socket.connect({ host: HOST, port: PORT }) + + this.#parser = new Parser(this.#socket) + this.#parser.on('message', (data) => this.#handleMessage(data)) + this.#parser.on('error', (err) => this.#handleParserError(err)) + + this.#sendLogin() + + return new Promise((res) => { + const dispose = this.onReady(() => { + dispose() + res() + }) + }) + } + + destroy = () => { + this.#clearReady(); + + clearTimeout(this.#retryTimeout) + this.#clearHeartbeat() + + if (this.#socket) { + this.#socket.removeAllListeners() + this.#socket.end() + this.#socket.destroy() + this.#socket = null + } + + if (this.#parser) { + this.#parser.destroy() + this.#parser = null + } + } + + get #configMetaData() { + return { + bundleId: this.#config.bundleId, + projectId: this.#config.firebase.projectId, + vapidKey: this.#config.vapidKey + } + } + + checkCredentials(credentials: Types.Credentials) { + // Structure check + if (!credentials) return false + if (!credentials.fcm || !credentials.gcm || !credentials.keys) return false + if (!credentials.fcm.installation) return false + if (!credentials.config) return false + + // Config data + if (JSON.stringify(credentials.config) !== JSON.stringify(this.#configMetaData)) return false + + return true + } + + async registerIfNeeded(): Promise { + if (this.checkCredentials(this.#config.credentials)) { + await checkIn(this.#config) + + return this.#config.credentials + } + + const keys = await createKeys() + const gcm = await registerGCM(this.#config) + const fcm = await registerFCM(gcm, keys, this.#config) + + const credentials: Types.Credentials = { + keys, + gcm, + fcm, + config: this.#configMetaData, + } + + this.emit('ON_CREDENTIALS_CHANGE', { + oldCredentials: this.#config.credentials, + newCredentials: credentials + }) + + this.#config.credentials = credentials + + Logger.debug('got credentials', credentials) + + return this.#config.credentials + } + + #clearReady() { + if (!this.#ready.isResolved) { + this.#ready.reject(new Error('Client destroyed')) + } + + this.#ready = defer() + } + + #clearHeartbeat() { + clearTimeout(this.#heartbeatTimer) + this.#heartbeatTimer = undefined + + clearTimeout(this.#heartbeatTimeout) + this.#heartbeatTimeout = undefined + } + + #startHeartbeat() { + this.#clearHeartbeat() + + if (!this.#config.heartbeatIntervalMs) return + + this.#heartbeatTimer = setTimeout(() => this.#sendHeartbeatPing(), this.#config.heartbeatIntervalMs) + this.#heartbeatTimeout = setTimeout(() => this.#socketRetry(), this.#config.heartbeatIntervalMs * 2) + } + + #handleSocketConnect = (): void => { + this.#retryCount = 0 + this.emit('ON_CONNECT') + this.#startHeartbeat() + } + + #handleSocketClose = (): void => { + this.emit('ON_DISCONNECT') + this.#clearHeartbeat() + this.#socketRetry() + } + + #handleSocketError = (err: Error): void => { + Logger.error(err) + // ignore, the close handler takes care of retry + } + + #socketRetry() { + this.destroy() + const timeout = Math.min(++this.#retryCount, MAX_RETRY_TIMEOUT) * 1000 + this.#retryTimeout = setTimeout(() => this.connect(), timeout) + } + + #getStreamId(): number { + this.#lastStreamIdReported = this.#streamId + return this.#streamId + } + + #newStreamIdAvailable(): boolean { + return this.#lastStreamIdReported != this.#streamId + } + + #sendHeartbeatPing() { + const heartbeatPingRequest: Record = {} + + if (this.#newStreamIdAvailable()) { + heartbeatPingRequest.last_stream_id_received = this.#getStreamId() + } + + Logger.debug('Heartbeat send pong', heartbeatPingRequest) + + const HeartbeatPingRequestType = Protos.mcs_proto.HeartbeatPing + const errorMessage = HeartbeatPingRequestType.verify(heartbeatPingRequest) + + if (errorMessage) { + throw new Error(errorMessage) + } + + const buffer = HeartbeatPingRequestType.encodeDelimited(heartbeatPingRequest).finish() + + Logger.debug('HEARTBEAT sending PING', heartbeatPingRequest) + + this.#socket.write(Buffer.concat([ + Buffer.from([MCSProtoTag.kHeartbeatPingTag]), + buffer, + ])) + } + + #sendHeartbeatPong(object) { + const heartbeatAckRequest: Record = {} + + if (this.#newStreamIdAvailable()) { + heartbeatAckRequest.last_stream_id_received = this.#getStreamId() + } + + if (object?.status) { + heartbeatAckRequest.status = object.status + } + + Logger.debug('Heartbeat send pong', heartbeatAckRequest) + + const HeartbeatAckRequestType = Protos.mcs_proto.HeartbeatAck + const errorMessage = HeartbeatAckRequestType.verify(heartbeatAckRequest) + if (errorMessage) { + throw new Error(errorMessage) + } + + const buffer = HeartbeatAckRequestType.encodeDelimited(heartbeatAckRequest).finish() + + Logger.debug('HEARTBEAT sending PONG', heartbeatAckRequest) + + this.#socket.write(Buffer.concat([ + Buffer.from([MCSProtoTag.kHeartbeatAckTag]), + buffer + ])) + } + + #sendLogin() { + const gcm = this.#config.credentials.gcm + const LoginRequestType = Protos.mcs_proto.LoginRequest + const hexAndroidId = Long.fromString(gcm.androidId).toString(16) + const loginRequest: mcs_proto.ILoginRequest = { + adaptiveHeartbeat: false, + authService: 2, + authToken: gcm.securityToken, + id: `chrome-${this.#config.chromeVersion}`, + domain: 'mcs.android.com', + deviceId: `android-${hexAndroidId}`, + networkType: 1, + resource: gcm.androidId, + user: gcm.androidId, + useRmq2: true, + setting: [{ name: 'new_vc', value: '1' }], + clientEvent: [], + // Id of the last notification received + receivedPersistentId: this.#config.persistentIds, + } + + if (this.#config.heartbeatIntervalMs) { + loginRequest.heartbeatStat = { + ip: '', + timeout: true, + intervalMs: this.#config.heartbeatIntervalMs, + } + } + + const errorMessage = LoginRequestType.verify(loginRequest) + if (errorMessage) { + throw new Error(errorMessage) + } + + const buffer = LoginRequestType.encodeDelimited(loginRequest).finish() + + this.#socket.write(Buffer.concat([ + Buffer.from([Variables.kMCSVersion, MCSProtoTag.kLoginRequestTag]), + buffer, + ])) + } + + #handleMessage = ({ tag, object }: Types.DataPacket): void => { + // any message will reset the client side heartbeat timeout. + this.#startHeartbeat() + + switch (tag) { + case MCSProtoTag.kLoginResponseTag: + // clear persistent ids, as we just sent them to the server while logging in + this.#config.persistentIds = [] + this.emit('ON_READY') + this.#startHeartbeat() + this.#ready.resolve() + break + + case MCSProtoTag.kDataMessageStanzaTag: + this.#handleDataMessage(object) + break + + case MCSProtoTag.kHeartbeatPingTag: + this.emit('ON_HEARTBEAT') + Logger.debug('HEARTBEAT PING', object) + this.#sendHeartbeatPong(object) + break + + case MCSProtoTag.kHeartbeatAckTag: + this.emit('ON_HEARTBEAT') + Logger.debug('HEARTBEAT PONG', object) + break + + case MCSProtoTag.kCloseTag: + Logger.debug('Close: Server requested close! message: ', JSON.stringify(object)) + this.#handleSocketClose() + break + + case MCSProtoTag.kLoginRequestTag: + Logger.debug('Login request: message: ', JSON.stringify(object)) + break + + case MCSProtoTag.kIqStanzaTag: + Logger.debug('IqStanza: ', JSON.stringify(object)) + // FIXME: If anyone knows what is this and how to respond, please let me know + break + + default: + Logger.error('Unknown message: ', JSON.stringify(object)) + return + + // no default + } + + this.#streamId++ + } + + #handleDataMessage = (object): void => { + if (this.persistentIds.includes(object.persistentId)) { + return + } + + let message + try { + message = decrypt(object, this.#config.credentials.keys) + } catch (error) { + switch (true) { + case error.message.includes('Unsupported state or unable to authenticate data'): + case error.message.includes('crypto-key is missing'): + case error.message.includes('salt is missing'): + // NOTE(ibash) Periodically we're unable to decrypt notifications. In + // all cases we've been able to receive future notifications using the + // same keys. So, we silently drop this notification. + Logger.warn('Message dropped as it could not be decrypted: ' + error.message) + return + default: + throw error + } + } + + // Maintain persistentIds updated with the very last received value + this.persistentIds.push(object.persistentId) + // Send notification + this.emit('ON_MESSAGE_RECEIVED', { + message, + // Needs to be saved by the client + persistentId: object.persistentId, + }) + } + + #handleParserError = (error) => { + Logger.error(error) + this.#socketRetry() + } +} + +export { PushReceiver } diff --git a/src/constants.js b/src/constants.js deleted file mode 100644 index 9ebe669..0000000 --- a/src/constants.js +++ /dev/null @@ -1,53 +0,0 @@ -module.exports = { - // enum ProcessingState - // - // Processing the version, tag, and size packets (assuming minimum length - // size packet). Only used during the login handshake. - MCS_VERSION_TAG_AND_SIZE : 0, - // Processing the tag and size packets (assuming minimum length size - // packet). Used for normal messages. - MCS_TAG_AND_SIZE : 1, - // Processing the size packet alone. - MCS_SIZE : 2, - // Processing the protocol buffer bytes (for those messages with non-zero - // sizes). - MCS_PROTO_BYTES : 3, - - // # of bytes a MCS version packet consumes. - kVersionPacketLen : 1, - // # of bytes a tag packet consumes. - kTagPacketLen : 1, - // Max # of bytes a length packet consumes. A Varint32 can consume up to 5 bytes - // (the msb in each byte is reserved for denoting whether more bytes follow). - // Although the protocol only allows for 4KiB payloads currently, and the socket - // stream buffer is only of size 8KiB, it's possible for certain applications to - // have larger message sizes. When payload is larger than 4KiB, an temporary - // in-memory buffer is used instead of the normal in-place socket stream buffer. - kSizePacketLenMin : 1, - kSizePacketLenMax : 5, - - // The current MCS protocol version. - kMCSVersion : 41, - - // MCS Message tags. - // WARNING: the order of these tags must remain the same, as the tag values - // must be consistent with those used on the server. - // enum MCSProtoTag { - kHeartbeatPingTag : 0, - kHeartbeatAckTag : 1, - kLoginRequestTag : 2, - kLoginResponseTag : 3, - kCloseTag : 4, - kMessageStanzaTag : 5, - kPresenceStanzaTag : 6, - kIqStanzaTag : 7, - kDataMessageStanzaTag : 8, - kBatchPresenceStanzaTag : 9, - kStreamErrorStanzaTag : 10, - kHttpRequestTag : 11, - kHttpResponseTag : 12, - kBindAccountRequestTag : 13, - kBindAccountResponseTag : 14, - kTalkMetadataTag : 15, - kNumProtoTypes : 16, -}; diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..2d9984f --- /dev/null +++ b/src/constants.ts @@ -0,0 +1,138 @@ +export enum ProcessingState { + // Processing the version, tag, and size packets (assuming minimum length + // size packet). Only used during the login handshake. + MCS_VERSION_TAG_AND_SIZE = 0, + // Processing the tag and size packets (assuming minimum length size + // packet). Used for normal messages. + MCS_TAG_AND_SIZE = 1, + // Processing the size packet alone. + MCS_SIZE = 2, + // Processing the protocol buffer bytes (for those messages with non-zero + // sizes). + MCS_PROTO_BYTES = 3, +} + +export enum Variables { + // # of bytes a MCS version packet consumes. + kVersionPacketLen = 1, + // # of bytes a tag packet consumes. + kTagPacketLen = 1, + // Max # of bytes a length packet consumes. A Varint32 can consume up to 5 bytes + // (the msb in each byte is reserved for denoting whether more bytes follow). + // Although the protocol only allows for 4KiB payloads currently, and the socket + // stream buffer is only of size 8KiB, it's possible for certain applications to + // have larger message sizes. When payload is larger than 4KiB, an temporary + // in-memory buffer is used instead of the normal in-place socket stream buffer. + kSizePacketLenMin = 1, + kSizePacketLenMax = 5, + + // The current MCS protocol version. + kMCSVersion = 41, +} + +// MCS Message tags. +// WARNING: the order of these tags must remain the same, as the tag values +// must be consistent with those used on the server. +export enum MCSProtoTag { + kHeartbeatPingTag = 0, + kHeartbeatAckTag = 1, + kLoginRequestTag = 2, + kLoginResponseTag = 3, + kCloseTag = 4, + kMessageStanzaTag = 5, + kPresenceStanzaTag = 6, + kIqStanzaTag = 7, + kDataMessageStanzaTag = 8, + kBatchPresenceStanzaTag = 9, + kStreamErrorStanzaTag = 10, + kHttpRequestTag = 11, + kHttpResponseTag = 12, + kBindAccountRequestTag = 13, + kBindAccountResponseTag = 14, + kTalkMetadataTag = 15, + kNumProtoTypes = 16, +} + +export enum GcmRequestConstants { + kErrorPrefix = "Error=", + kTokenPrefix = "token=", + kDeviceRegistrationError = "PHONE_REGISTRATION_ERROR", + kAuthenticationFailed = "AUTHENTICATION_FAILED", + kInvalidSender = "INVALID_SENDER", + kInvalidParameters = "INVALID_PARAMETERS", + kInternalServerError = "InternalServerError", + kQuotaExceeded = "QUOTA_EXCEEDED", + kTooManyRegistrations = "TOO_MANY_REGISTRATIONS", +} + +// Taken from `registration_request.h` in Chromium project +export enum GcmRequestStatus { + SUCCESS, // Registration completed successfully. + INVALID_PARAMETERS, // One of request paramteres was invalid. + INVALID_SENDER, // One of the provided senders was invalid. + AUTHENTICATION_FAILED, // Authentication failed. + DEVICE_REGISTRATION_ERROR, // Chrome is not properly registered. + UNKNOWN_ERROR, // Unknown error. + URL_FETCHING_FAILED, // URL fetching failed. + HTTP_NOT_OK, // HTTP status was not OK. + NO_RESPONSE_BODY, // No response body. + REACHED_MAX_RETRIES, // Reached maximum number of retries. + RESPONSE_PARSING_FAILED, // Registration response parsing failed. + INTERNAL_SERVER_ERROR, // Internal server error during request. + QUOTA_EXCEEDED, // Registration quota exceeded. + TOO_MANY_REGISTRATIONS, // Max registrations per device exceeded. + // NOTE: always keep this entry at the end. Add new status types only + // immediately above this line. Make sure to update the corresponding + // histogram enum accordingly. + STATUS_COUNT +} + +/** + * enum values correspond to the type of device. + * Used in the AndroidCheckinProto and Device proto. + */ +export enum DeviceType { + /** DEVICE_ANDROID_OS - Android Device */ + DEVICE_ANDROID_OS = 1, + /** DEVICE_IOS_OS - Apple IOS device */ + DEVICE_IOS_OS = 2, + /** DEVICE_CHROME_BROWSER - Chrome browser - Not Chrome OS. No hardware records. */ + DEVICE_CHROME_BROWSER = 3, + /** DEVICE_CHROME_OS - Chrome OS */ + DEVICE_CHROME_OS = 4, + UNRECOGNIZED = -1 +} + +/** Build characteristics unique to the Chrome browser, and Chrome OS */ +export interface ChromeBuildProto { + /** The platform of the device. */ + platform: ChromeBuildProtoPlatform + /** The Chrome instance's version. */ + chrome_version: string + /** The Channel (build type) of Chrome. */ + channel: ChromeBuildProtoChannel +} + +export enum ChromeBuildProtoPlatform { + PLATFORM_WIN = 1, + PLATFORM_MAC = 2, + PLATFORM_LINUX = 3, + PLATFORM_CROS = 4, + PLATFORM_IOS = 5, + /** + * PLATFORM_ANDROID - Just a placeholder. Likely don't need it due to the presence of the + * Android GCM on phone/tablet devices. + */ + PLATFORM_ANDROID = 6, + UNRECOGNIZED = -1 +} + +export enum ChromeBuildProtoChannel { + CHANNEL_STABLE = 1, + CHANNEL_BETA = 2, + CHANNEL_DEV = 3, + CHANNEL_CANARY = 4, + /** CHANNEL_UNKNOWN - for tip of tree or custom builds */ + CHANNEL_UNKNOWN = 5, + UNRECOGNIZED = -1 +} diff --git a/src/emitter.ts b/src/emitter.ts new file mode 100644 index 0000000..013ad51 --- /dev/null +++ b/src/emitter.ts @@ -0,0 +1,27 @@ +import { EventEmitter } from "node:events" + +export type Unsubscribe = CallableFunction + +interface EmitterEvents {} + +export default class ClassWithEmitter { + #emitter = new EventEmitter() + + on(eventName: K, listener: EventMap[K]): Unsubscribe { + const handler = (...args: any[]) => { + try { + return (listener as CallableFunction)(...args) + } catch (err: any) { + console.error(err) + } + } + + this.#emitter.on(eventName as string, handler) + return () => this.#emitter.off(eventName as string, handler) + } + + // @ts-expect-error - no reason TODO: Fixme + emit(eventName: K, ...args: Parameters) { + this.#emitter.emit(eventName as string, ...args) + } +} \ No newline at end of file diff --git a/src/fcm.ts b/src/fcm.ts new file mode 100644 index 0000000..5e9c010 --- /dev/null +++ b/src/fcm.ts @@ -0,0 +1,120 @@ +import crypto from 'crypto' +import request, { getEndpoint } from './utils/request' + +import type * as Types from './types' + +const FCM_API = 'https://fcm.googleapis.com/' +const FCM_REGISTRATION = 'https://fcmregistrations.googleapis.com/v1/' +const FCM_INSTALLATION = 'https://firebaseinstallations.googleapis.com/v1/' +const AUTH_VERSION = 'FIS_v2' +const SDK_VERSION = 'w:0.6.6' + +// TODO: FIXME it is optional to send it but better to implement proper heatbeat in the future +const getEmptyHeatbeat = () => btoa(JSON.stringify({ heartbeats: [], version: 2 })).toString() + +function generateFirebaseFID() { + // A valid FID has exactly 22 base64 characters, which is 132 bits, or 16.5 + // bytes. our implementation generates a 17 byte array instead. + const fid = crypto.randomBytes(17) + + // Replace the first 4 random bits with the constant FID header of 0b0111. + fid[0] = 0b01110000 + (fid[0] % 0b00010000) + + return fid.toString('base64') +} + +function encodeBase64URL(value: string): string { + return String(value).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_') +} + +// TODO: Installation token expires after 7 days. It should be refreshed but requests are failing (404) +// export async function refreshFCMInstallationToken(fcmData: Types.FcmData, config: Types.ClientConfig) { +// const response = await request(getEndpoint(config, FCM_INSTALLATION, `${fcmData.fid}/authTokens:generate`), { +// method: 'POST', +// headers: new Headers({ +// Authorization: `${AUTH_VERSION} ${fcmData.refreshToken}`, +// 'x-firebase-client': getEmptyHeatbeat(), +// }), +// body: JSON.stringify({ +// installation: { +// sdkVersion: SDK_VERSION, +// appId: config.firebase.appId, +// } +// }) +// }) +// const data = await response.json() +// return data +// } + +export async function installFCM(config: Types.ClientConfig): Promise { + const response = await request(getEndpoint(config, FCM_INSTALLATION, 'installations'), { + method: 'POST', + headers: { + 'x-firebase-client': getEmptyHeatbeat(), + 'x-goog-api-key': config.firebase.apiKey + }, + body: JSON.stringify({ + appId: config.firebase.appId, + authVersion: AUTH_VERSION, + fid: generateFirebaseFID(), + sdkVersion: SDK_VERSION + }), + }) + + const data = await response.json() as Types.FcmInstallationResponse + + return { + token: data.authToken.token, + createdAt: (new Date()).getTime(), // in ms + expiresIn: Number.parseInt(data.authToken.expiresIn) * 1000, // in ms + refreshToken: data.refreshToken, + fid: data.fid, + } +} + +export async function registerFCM(gcmData: Types.GcmData, installation: Types.InstallationData, keys: Types.Keys, config: Types.ClientConfig): Promise { + const requestOptions = { + method: 'POST', + headers: { + 'x-goog-api-key': config.firebase.apiKey, + 'x-goog-firebase-installations-auth': installation.token, + }, + body: JSON.stringify({ + web: { + // Include VAPID only if it's not default key, otherwise FCM registration will fail + applicationPubKey: config.vapidKey || undefined, + auth: encodeBase64URL(keys.authSecret), + /** + * TODO + * Shouldn't endpoint be migrated to v1 too??? But official JS module still uses the old one... + * https://firebase.google.com/docs/cloud-messaging/migrate-v1 + * Currently not working with + * Works - https://fcm.googleapis.com/fcm/send + * Does not work - https://fcm.googleapis.com/v1/projects/{projectId}/messages:send + */ + endpoint: `${FCM_API}fcm/send/${gcmData.token}`, + p256dh: encodeBase64URL(keys.publicKey), + } + }) + } + + const response = await request(getEndpoint(config, FCM_REGISTRATION, 'registrations'), requestOptions) + + const data = await response.json() + + if (data.error) { + throw new Error('FCM registration failed... ' + data.error.message) + } + + return data +} + +export default async function register(gcm: Types.GcmData, keys: Types.Keys, config: Types.ClientConfig): Promise { + const installation = await installFCM(config) + const registration = await registerFCM(gcm, installation, keys, config) + + return { + token: registration.token, + installation + } +} \ No newline at end of file diff --git a/src/fcm/index.js b/src/fcm/index.js deleted file mode 100644 index 408c097..0000000 --- a/src/fcm/index.js +++ /dev/null @@ -1,52 +0,0 @@ -const crypto = require('crypto'); -const request = require('request-promise'); -const { escape } = require('../utils/base64'); - -const FCM_SUBSCRIBE = 'https://fcm.googleapis.com/fcm/connect/subscribe'; -const FCM_ENDPOINT = 'https://fcm.googleapis.com/fcm/send'; - -module.exports = registerFCM; - -async function registerFCM({ senderId, token }) { - const keys = await createKeys(); - const response = await request({ - url : FCM_SUBSCRIBE, - method : 'POST', - headers : { - 'Content-Type' : 'application/x-www-form-urlencoded', - }, - form : { - authorized_entity : senderId, - endpoint : `${FCM_ENDPOINT}/${token}`, - encryption_key : keys.publicKey - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'), - encryption_auth : keys.authSecret - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'), - }, - }); - return { - keys, - fcm : JSON.parse(response), - }; -} - -function createKeys() { - return new Promise((resolve, reject) => { - const dh = crypto.createECDH('prime256v1'); - dh.generateKeys(); - crypto.randomBytes(16, (err, buf) => { - if (err) { - return reject(err); - } - return resolve({ - privateKey : escape(dh.getPrivateKey('base64')), - publicKey : escape(dh.getPublicKey('base64')), - authSecret : escape(buf.toString('base64')), - }); - }); - }); -} diff --git a/src/fcm/server-key/index.js b/src/fcm/server-key/index.js deleted file mode 100644 index 7a5114c..0000000 --- a/src/fcm/server-key/index.js +++ /dev/null @@ -1,67 +0,0 @@ -module.exports = [ - 0x04, - 0x33, - 0x94, - 0xf7, - 0xdf, - 0xa1, - 0xeb, - 0xb1, - 0xdc, - 0x03, - 0xa2, - 0x5e, - 0x15, - 0x71, - 0xdb, - 0x48, - 0xd3, - 0x2e, - 0xed, - 0xed, - 0xb2, - 0x34, - 0xdb, - 0xb7, - 0x47, - 0x3a, - 0x0c, - 0x8f, - 0xc4, - 0xcc, - 0xe1, - 0x6f, - 0x3c, - 0x8c, - 0x84, - 0xdf, - 0xab, - 0xb6, - 0x66, - 0x3e, - 0xf2, - 0x0c, - 0xd4, - 0x8b, - 0xfe, - 0xe3, - 0xf9, - 0x76, - 0x2f, - 0x14, - 0x1c, - 0x63, - 0x08, - 0x6a, - 0x6f, - 0x2d, - 0xb1, - 0x1a, - 0x95, - 0xb0, - 0xce, - 0x37, - 0xc0, - 0x9c, - 0x6e, -]; diff --git a/src/gcm.ts b/src/gcm.ts new file mode 100644 index 0000000..6da74a1 --- /dev/null +++ b/src/gcm.ts @@ -0,0 +1,138 @@ +import Long from 'long' +import { randomUUID } from 'crypto' +import request from './utils/request' +import delay from './utils/timeout' +import Protos from './protos' +import Logger from './utils/logger' + +import type * as Types from './types' + +const REGISTER_URL = 'https://android.clients.google.com/c2dm/register3' +const CHECKIN_URL = 'https://android.clients.google.com/checkin' + +function parseLong(number: bigint, unsigned?: boolean | number, radix?: number): Long { + return Long.fromString(number.toString(), unsigned, radix) +} + +export default async (config: Types.ClientConfig): Promise => { + const options = await checkIn(config) + const credentials = await doRegister(options, config) + return credentials +} + +export async function checkIn(config: Types.ClientConfig): Promise { + const body = await (await request(CHECKIN_URL, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-protobuf', + }, + body: prepareCheckinBuffer(config), + })).arrayBuffer() + + + const AndroidCheckinResponse = Protos.checkin_proto.AndroidCheckinResponse + const message = AndroidCheckinResponse.decode(new Uint8Array(body)) + const object = AndroidCheckinResponse.toObject(message, { + longs: String, + enums: String, + bytes: String, + }) + + return { + androidId: object.androidId, + securityToken: object.securityToken, + } +} + +async function doRegister({ androidId, securityToken }: Types.GcmCheckinResponse, config: Types.ClientConfig): Promise { + const appId = `wp:${config.bundleId}#${randomUUID()}` + const body = (new URLSearchParams({ + app: 'org.chromium.linux', + 'X-subtype': appId, + device: androidId, + sender: config.vapidKey || 'BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4', + })).toString() + + const response = await postRegister({ androidId, securityToken, body }) + const token = response.split('=')[1] + + return { + token, + androidId, + securityToken, + appId, + } +} + + +async function postRegister({ androidId, securityToken, body, retry = 0 }: { + androidId: Types.GcmData['androidId'] + securityToken: Types.GcmData['securityToken'] + body: string + retry?: number +}): Promise { + const response = await (await request(REGISTER_URL, { + method: 'POST', + headers: { + Authorization: `AidLogin ${androidId}:${securityToken}`, + 'Content-Type': 'application/x-www-form-urlencoded', + }, + body, + })).text() + + if (response.includes('Error')) { + Logger.warn(`Register request has failed with ${response}`) + if (retry >= 5) { + throw new Error('GCM register has failed') + } + + Logger.warn(`Retry... ${retry + 1}`) + await delay(1000) + return postRegister({ androidId, securityToken, body, retry: retry + 1 }) + } + + return response +} + +function prepareCheckinBuffer(config: Types.ClientConfig) { + const gcm = config.credentials?.gcm + const AndroidCheckinRequest = Protos.checkin_proto.AndroidCheckinRequest + + const payload: Protos.checkin_proto.IAndroidCheckinRequest = { + accountCookie: [], + checkin: { + cellOperator: '', // Optional + chromeBuild: { + platform: config.chromePlatform || Protos.checkin_proto.ChromeBuildProto.Platform.PLATFORM_MAC, + chromeVersion: config.chromeVersion || '63.0.3234.0', + channel: config.chromeChannel || Protos.checkin_proto.ChromeBuildProto.Channel.CHANNEL_STABLE, + }, + type: Protos.checkin_proto.DeviceType.DEVICE_CHROME_BROWSER, + lastCheckinMsec: parseLong(0n), // TODO + roaming: '', // Optional + simOperator: '', // Optional + userNumber: 0, // Optional + }, + desiredBuild: '', // Optional + digest: '', // Optional + fragment: 0, + id: gcm?.androidId ? Long.fromString(gcm.androidId) : undefined, + locale: '', // Optional + loggingId: parseLong(0n), // Optional + macAddr: [], + macAddrType: [], + marketCheckin: '', // Optional + otaCert: [], + securityToken: gcm?.securityToken ? Long.fromString(gcm?.securityToken, true) : undefined, + timeZone: config.timeZone || 'Europe/Prague', + userName: '', // Optional + userSerialNumber: 0, // TODO + version: 3, // TODO - ??? + } + + const errMsg = AndroidCheckinRequest.verify(payload) + if (errMsg) throw Error(errMsg) + + const message = AndroidCheckinRequest.create(payload) + return AndroidCheckinRequest.encode(message).finish() +} diff --git a/src/gcm/index.js b/src/gcm/index.js deleted file mode 100644 index 9260129..0000000 --- a/src/gcm/index.js +++ /dev/null @@ -1,128 +0,0 @@ -const path = require('path'); -const request = require('../utils/request'); -const protobuf = require('protobufjs'); -const Long = require('long'); -const { waitFor } = require('../utils/timeout'); -const fcmKey = require('../fcm/server-key'); -const { toBase64 } = require('../utils/base64'); - -// Hack to fix PHONE_REGISTRATION_ERROR #17 when bundled with webpack -// https://github.com/dcodeIO/protobuf.js#browserify-integration -protobuf.util.Long = Long -protobuf.configure() - -const serverKey = toBase64(Buffer.from(fcmKey)); - -const REGISTER_URL = 'https://android.clients.google.com/c2dm/register3'; -const CHECKIN_URL = 'https://android.clients.google.com/checkin'; - -let root; -let AndroidCheckinResponse; - -module.exports = { - register, - checkIn, -}; - -async function register(appId) { - const options = await checkIn(); - const credentials = await doRegister(options, appId); - return credentials; -} - -async function checkIn(androidId, securityToken) { - await loadProtoFile(); - const buffer = getCheckinRequest(androidId, securityToken); - const body = await request({ - url : CHECKIN_URL, - method : 'POST', - headers : { - 'Content-Type' : 'application/x-protobuf', - }, - body : buffer, - encoding : null, - }); - const message = AndroidCheckinResponse.decode(body); - const object = AndroidCheckinResponse.toObject(message, { - longs : String, - enums : String, - bytes : String, - }); - return object; -} - -async function doRegister({ androidId, securityToken }, appId) { - const body = { - app : 'org.chromium.linux', - 'X-subtype' : appId, - device : androidId, - sender : serverKey, - }; - const response = await postRegister({ androidId, securityToken, body }); - const token = response.split('=')[1]; - return { - token, - androidId, - securityToken, - appId, - }; -} - -async function postRegister({ androidId, securityToken, body, retry = 0 }) { - const response = await request({ - url : REGISTER_URL, - method : 'POST', - headers : { - Authorization : `AidLogin ${androidId}:${securityToken}`, - 'Content-Type' : 'application/x-www-form-urlencoded', - }, - form : body, - }); - if (response.includes('Error')) { - console.warn(`Register request has failed with ${response}`); - if (retry >= 5) { - throw new Error('GCM register has failed'); - } - console.warn(`Retry... ${retry + 1}`); - await waitFor(1000); - return postRegister({ androidId, securityToken, body, retry : retry + 1 }); - } - return response; -} - -async function loadProtoFile() { - if (root) { - return; - } - root = await protobuf.load(path.join(__dirname, 'checkin.proto')); - return root; -} - -function getCheckinRequest(androidId, securityToken) { - const AndroidCheckinRequest = root.lookupType( - 'checkin_proto.AndroidCheckinRequest' - ); - AndroidCheckinResponse = root.lookupType( - 'checkin_proto.AndroidCheckinResponse' - ); - const payload = { - userSerialNumber : 0, - checkin : { - type : 3, - chromeBuild : { - platform : 2, - chromeVersion : '63.0.3234.0', - channel : 1, - }, - }, - version : 3, - id : androidId ? Long.fromString(androidId) : undefined, - securityToken : securityToken - ? Long.fromString(securityToken, true) - : undefined, - }; - const errMsg = AndroidCheckinRequest.verify(payload); - if (errMsg) throw Error(errMsg); - const message = AndroidCheckinRequest.create(payload); - return AndroidCheckinRequest.encode(message).finish(); -} diff --git a/src/index.js b/src/index.js deleted file mode 100644 index bca2efe..0000000 --- a/src/index.js +++ /dev/null @@ -1,36 +0,0 @@ -const register = require('./register'); -const Client = require('./client.js'); - -module.exports = { - listen, - register, -}; - -async function listen(credentials, notificationCallback) { - if (!credentials) { - throw new Error('Missing credentials'); - } - if (!credentials.gcm) { - throw new Error('Missing gcm object in credentials'); - } - if (!credentials.gcm.androidId) { - throw new Error('Missing gcm.androidId in credentials'); - } - if (!credentials.gcm.securityToken) { - throw new Error('Missing gcm.securityToken in credentials'); - } - if (!credentials.keys) { - throw new Error('Missing keys object in credentials'); - } - if (!credentials.keys.privateKey) { - throw new Error('Missing keys.privateKey in credentials'); - } - if (!credentials.keys.authSecret) { - throw new Error('Missing keys.authSecret in credentials'); - } - - const client = new Client(credentials, credentials.persistentIds); - client.on('ON_NOTIFICATION_RECEIVED', notificationCallback); - client.connect(); - return client; -} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..9e70aa7 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,9 @@ +import PushReceiver from "./client" +import PushSender from "./sender" + +export { + PushReceiver, + PushSender, +} + +export default PushReceiver diff --git a/src/keys.ts b/src/keys.ts new file mode 100644 index 0000000..2db21c6 --- /dev/null +++ b/src/keys.ts @@ -0,0 +1,23 @@ +import crypto from 'crypto' +import { escape } from './utils/base64' + +import type * as Types from './types' + +export default function createKeys(): Promise { + return new Promise((resolve, reject) => { + const dh = crypto.createECDH('prime256v1') + + dh.generateKeys() + crypto.randomBytes(16, (err, buf) => { + if (err) { + return reject(err) + } + + return resolve({ + privateKey: escape(dh.getPrivateKey('base64')), + publicKey: escape(dh.getPublicKey('base64')), + authSecret: escape(buf.toString('base64')), + }) + }) + }) +} \ No newline at end of file diff --git a/src/parser.js b/src/parser.js deleted file mode 100644 index 41c4443..0000000 --- a/src/parser.js +++ /dev/null @@ -1,276 +0,0 @@ -const EventEmitter = require('events'); -const path = require('path'); -const { load, BufferReader } = require('protobufjs'); -const { - MCS_VERSION_TAG_AND_SIZE, - MCS_TAG_AND_SIZE, - MCS_SIZE, - MCS_PROTO_BYTES, - - kVersionPacketLen, - kTagPacketLen, - kSizePacketLenMin, - kMCSVersion, - - kHeartbeatPingTag, - kHeartbeatAckTag, - kLoginRequestTag, - kLoginResponseTag, - kCloseTag, - kIqStanzaTag, - kDataMessageStanzaTag, - kStreamErrorStanzaTag, -} = require('./constants'); - -const DEBUG = () => {}; -// uncomment the line below to output debug messages -// const DEBUG = console.log; - -let proto = null; - -// Parser parses wire data from gcm. -// This takes the role of WaitForData in the chromium connection handler. -// -// The main differences from the chromium implementation are: -// - Did not use a max packet length (kDefaultDataPacketLimit), instead we just -// buffer data in this._data -// - Error handling around protobufs -// - Setting timeouts while waiting for data -// -// ref: https://cs.chromium.org/chromium/src/google_apis/gcm/engine/connection_handler_impl.cc?rcl=dc7c41bc0ee5fee0ed269495dde6b8c40df43e40&l=178 -module.exports = class Parser extends EventEmitter { - static async init() { - if (proto) { - return; - } - proto = await load(path.resolve(__dirname, 'mcs.proto')); - } - - constructor(socket) { - super(); - this._socket = socket; - this._state = MCS_VERSION_TAG_AND_SIZE; - this._data = Buffer.alloc(0); - this._sizePacketSoFar = 0; - this._messageTag = 0; - this._messageSize = 0; - this._handshakeComplete = false; - this._isWaitingForData = true; - this._onData = this._onData.bind(this); - this._socket.on('data', this._onData); - } - - destroy() { - this._isWaitingForData = false; - this._socket.removeListener('data', this._onData); - } - - _emitError(error) { - this.destroy(); - this.emit('error', error); - } - - _onData(buffer) { - DEBUG(`Got data: ${buffer.length}`); - this._data = Buffer.concat([this._data, buffer]); - if (this._isWaitingForData) { - this._isWaitingForData = false; - this._waitForData(); - } - } - - _waitForData() { - DEBUG(`waitForData state: ${this._state}`); - - let minBytesNeeded = 0; - - switch (this._state) { - case MCS_VERSION_TAG_AND_SIZE: - minBytesNeeded = kVersionPacketLen + kTagPacketLen + kSizePacketLenMin; - break; - case MCS_TAG_AND_SIZE: - minBytesNeeded = kTagPacketLen + kSizePacketLenMin; - break; - case MCS_SIZE: - minBytesNeeded = this._sizePacketSoFar + 1; - break; - case MCS_PROTO_BYTES: - minBytesNeeded = this._messageSize; - break; - default: - this._emitError(new Error(`Unexpected state: ${this._state}`)); - return; - } - - if (this._data.length < minBytesNeeded) { - // TODO(ibash) set a timeout and check for socket disconnect - DEBUG( - `Socket read finished prematurely. Waiting for ${minBytesNeeded - - this._data.length} more bytes` - ); - this._isWaitingForData = true; - return; - } - - DEBUG(`Processing MCS data: state == ${this._state}`); - - switch (this._state) { - case MCS_VERSION_TAG_AND_SIZE: - this._onGotVersion(); - break; - case MCS_TAG_AND_SIZE: - this._onGotMessageTag(); - break; - case MCS_SIZE: - this._onGotMessageSize(); - break; - case MCS_PROTO_BYTES: - this._onGotMessageBytes(); - break; - default: - this._emitError(new Error(`Unexpected state: ${this._state}`)); - return; - } - } - - _onGotVersion() { - const version = this._data.readInt8(0); - this._data = this._data.slice(1); - DEBUG(`VERSION IS ${version}`); - - if (version < kMCSVersion && version !== 38) { - this._emitError(new Error(`Got wrong version: ${version}`)); - return; - } - - // Process the LoginResponse message tag. - this._onGotMessageTag(); - } - - _onGotMessageTag() { - this._messageTag = this._data.readInt8(0); - this._data = this._data.slice(1); - DEBUG(`RECEIVED PROTO OF TYPE ${this._messageTag}`); - - this._onGotMessageSize(); - } - - _onGotMessageSize() { - let incompleteSizePacket = false; - const reader = new BufferReader(this._data); - - try { - this._messageSize = reader.int32(); - } catch (error) { - if (error.message.startsWith('index out of range:')) { - incompleteSizePacket = true; - } else { - this._emitError(error); - return; - } - } - - // TODO(ibash) in chromium code there is an extra check here of: - // if prev_byte_count >= kSizePacketLenMax then something else went wrong - // NOTE(ibash) I could only test this case by manually cutting the buffer - // above to be mid-packet like: new BufferReader(this._data.slice(0, 1)) - if (incompleteSizePacket) { - this._sizePacketSoFar = reader.pos; - this._state = MCS_SIZE; - this._waitForData(); - return; - } - - this._data = this._data.slice(reader.pos); - - DEBUG(`Proto size: ${this._messageSize}`); - this._sizePacketSoFar = 0; - - if (this._messageSize > 0) { - this._state = MCS_PROTO_BYTES; - this._waitForData(); - } else { - this._onGotMessageBytes(); - } - } - - _onGotMessageBytes() { - const protobuf = this._buildProtobufFromTag(this._messageTag); - if (!protobuf) { - this._emitError(new Error('Unknown tag')); - return; - } - - // Messages with no content are valid; just use the default protobuf for - // that tag. - if (this._messageSize === 0) { - this.emit('message', {tag: this._messageTag, object: {}}); - this._getNextMessage(); - return; - } - - if (this._data.length < this._messageSize) { - // Continue reading data. - DEBUG( - `Continuing data read. Buffer size is ${this._data.length}, expecting ${ - this._messageSize - }` - ); - this._state = MCS_PROTO_BYTES; - this._waitForData(); - return; - } - - const buffer = this._data.slice(0, this._messageSize); - this._data = this._data.slice(this._messageSize); - const message = protobuf.decode(buffer); - const object = protobuf.toObject(message, { - longs : String, - enums : String, - bytes : Buffer, - }); - - this.emit('message', {tag: this._messageTag, object: object}); - - if (this._messageTag === kLoginResponseTag) { - if (this._handshakeComplete) { - console.error('Unexpected login response'); - } else { - this._handshakeComplete = true; - DEBUG('GCM Handshake complete.'); - } - } - - this._getNextMessage(); - } - - _getNextMessage() { - this._messageTag = 0; - this._messageSize = 0; - this._state = MCS_TAG_AND_SIZE; - this._waitForData(); - } - - _buildProtobufFromTag(tag) { - switch (tag) { - case kHeartbeatPingTag: - return proto.lookupType('mcs_proto.HeartbeatPing'); - case kHeartbeatAckTag: - return proto.lookupType('mcs_proto.HeartbeatAck'); - case kLoginRequestTag: - return proto.lookupType('mcs_proto.LoginRequest'); - case kLoginResponseTag: - return proto.lookupType('mcs_proto.LoginResponse'); - case kCloseTag: - return proto.lookupType('mcs_proto.Close'); - case kIqStanzaTag: - return proto.lookupType('mcs_proto.IqStanza'); - case kDataMessageStanzaTag: - return proto.lookupType('mcs_proto.DataMessageStanza'); - case kStreamErrorStanzaTag: - return proto.lookupType('mcs_proto.StreamErrorStanza'); - default: - return null; - } - } -}; diff --git a/src/parser.ts b/src/parser.ts new file mode 100644 index 0000000..c7e4346 --- /dev/null +++ b/src/parser.ts @@ -0,0 +1,243 @@ +import ProtobufJS from 'protobufjs' +import Logger from './utils/logger' +import { TLSSocket } from 'tls' +import Protos from './protos' +import { + Variables, + ProcessingState, + MCSProtoTag +} from './constants' + +import Emitter from './emitter' + +import type { DataPacket } from './types' + +// Parser parses wire data from gcm. +// This takes the role of WaitForData in the chromium connection handler. +// +// The main differences from the chromium implementation are: +// - Did not use a max packet length (kDefaultDataPacketLimit), instead we just +// buffer data in this.#data +// - Error handling around protobufs +// - Setting timeouts while waiting for data +// +// ref: https://cs.chromium.org/chromium/src/google_apis/gcm/engine/connection_handler_impl.cc?rcl=dc7c41bc0ee5fee0ed269495dde6b8c40df43e40&l=178 + +interface ParserEvents { + error: (err: Error) => void + message: (data: DataPacket) => void +} + +export default class Parser extends Emitter { + #socket: TLSSocket + #state: ProcessingState = ProcessingState.MCS_VERSION_TAG_AND_SIZE + #data: Buffer = Buffer.alloc(0) + #messageTag = 0 + #messageSize = 0 + #handshakeComplete = false + #isWaitingForData = true + + constructor(socket: TLSSocket) { + super() + + this.#socket = socket + this.#socket.on('data', this.#handleData) + } + + destroy(): void { + this.#isWaitingForData = false + this.#socket.removeListener('data', this.#handleData) + } + + #emitError(error): void { + this.destroy() + this.emit('error', error) + } + + #handleData = (buffer) => { + Logger.debug(`Got data: ${buffer.length}`) + this.#data = Buffer.concat([this.#data, buffer]) + if (this.#isWaitingForData) { + this.#isWaitingForData = false + this.#waitForData() + } + } + + #waitForData() { + Logger.debug(`waitForData state: ${this.#state}`) + + let minBytesNeeded = 0 + + switch (this.#state) { + case ProcessingState.MCS_VERSION_TAG_AND_SIZE: + minBytesNeeded += Variables.kVersionPacketLen + // eslint-disable-next-line no-fallthrough + case ProcessingState.MCS_TAG_AND_SIZE: + minBytesNeeded += Variables.kTagPacketLen + // eslint-disable-next-line no-fallthrough + case ProcessingState.MCS_SIZE: + minBytesNeeded += Variables.kSizePacketLenMin + break + case ProcessingState.MCS_PROTO_BYTES: + minBytesNeeded = this.#messageSize + break + default: + this.#emitError(new Error(`Unexpected state: ${this.#state}`)) + return + } + + if (this.#data.length < minBytesNeeded) { + Logger.debug(`Waiting for ${minBytesNeeded - this.#data.length} more bytes. Got ${this.#data.length}`) + this.#isWaitingForData = true + return + } + + Logger.debug(`Processing MCS data: state == ${this.#state}`) + + switch (this.#state) { + case ProcessingState.MCS_VERSION_TAG_AND_SIZE: + this.#handleGotVersion() + this.#handleGotMessageTag() + this.#handleGotMessageSize() + break + case ProcessingState.MCS_TAG_AND_SIZE: + this.#handleGotMessageTag() + this.#handleGotMessageSize() + break + case ProcessingState.MCS_SIZE: + this.#handleGotMessageSize() + break + case ProcessingState.MCS_PROTO_BYTES: + this.#handleGotMessageBytes() + break + default: + this.#emitError(new Error(`Unexpected state: ${this.#state}`)) + return + } + } + + #handleGotVersion() { + const version = this.#data.readInt8(0) + this.#data = this.#data.slice(1) + Logger.debug(`VERSION IS ${version}`) + + if (version < Variables.kMCSVersion && version !== 38) { + this.#emitError(new Error(`Got wrong version: ${version}`)) + return + } + } + + #handleGotMessageTag() { + this.#messageTag = this.#data.readInt8(0) + this.#data = this.#data.slice(1) + Logger.debug(`RECEIVED PROTO OF TYPE ${this.#messageTag}`) + + } + + #handleGotMessageSize() { + let incompleteSizePacket = false + const reader = new ProtobufJS.BufferReader(this.#data) + + try { + this.#messageSize = reader.int32() + } catch (error) { + if (error.message.startsWith('index out of range:')) { + incompleteSizePacket = true + } else { + this.#emitError(error) + return + } + } + + // TODO(ibash) in chromium code there is an extra check here of: + // if prev_byte_count >= kSizePacketLenMax then something else went wrong + // NOTE(ibash) I could only test this case by manually cutting the buffer + // above to be mid-packet like: new ProtobufJS.BufferReader(this.#data.slice(0, 1)) + if (incompleteSizePacket) { + this.#state = ProcessingState.MCS_SIZE + this.#waitForData() + return + } + + this.#data = this.#data.slice(reader.pos) + + Logger.debug(`Proto size: ${this.#messageSize}`) + + if (this.#messageSize > 0) { + this.#state = ProcessingState.MCS_PROTO_BYTES + this.#waitForData() + } else { + this.#handleGotMessageBytes() + } + } + + #handleGotMessageBytes() { + const protobuf = this.#buildProtobufFromTag(this.#messageTag) + if (!protobuf) { + this.#emitError(new Error('Unknown tag')) + return + } + + // Messages with no content are valid just use the default protobuf for + // that tag. + if (this.#messageSize === 0) { + this.emit('message', { tag: this.#messageTag, object: {} }) + this.#getNextMessage() + return + } + + if (this.#data.length < this.#messageSize) { + // Continue reading data. + Logger.debug(`Continuing data read. Buffer size is ${this.#data.length}, expecting ${this.#messageSize}`) + this.#state = ProcessingState.MCS_PROTO_BYTES + this.#waitForData() + return + } + + const buffer = this.#data.slice(0, this.#messageSize) + const message = protobuf.decode(buffer) + + this.#data = this.#data.slice(this.#messageSize) + + const object = protobuf.toObject(message, { + longs: String, + enums: String, + bytes: Buffer, + }) + + this.emit('message', { tag: this.#messageTag, object: object }) + + if (this.#messageTag === MCSProtoTag.kLoginResponseTag) { + if (this.#handshakeComplete) { + Logger.error('Unexpected login response') + } else { + this.#handshakeComplete = true + Logger.debug('GCM Handshake complete.') + } + } + + this.#getNextMessage() + } + + #getNextMessage() { + this.#messageTag = 0 + this.#messageSize = 0 + this.#state = ProcessingState.MCS_TAG_AND_SIZE + this.#waitForData() + } + + #buildProtobufFromTag(tag) { + switch (tag) { + case MCSProtoTag.kHeartbeatPingTag: return Protos.mcs_proto.HeartbeatPing + case MCSProtoTag.kHeartbeatAckTag: return Protos.mcs_proto.HeartbeatAck + case MCSProtoTag.kLoginRequestTag: return Protos.mcs_proto.LoginRequest + case MCSProtoTag.kLoginResponseTag: return Protos.mcs_proto.LoginResponse + case MCSProtoTag.kCloseTag: return Protos.mcs_proto.Close + case MCSProtoTag.kIqStanzaTag: return Protos.mcs_proto.IqStanza + case MCSProtoTag.kDataMessageStanzaTag: return Protos.mcs_proto.DataMessageStanza + case MCSProtoTag.kStreamErrorStanzaTag: return Protos.mcs_proto.StreamErrorStanza + default: + return null + } + } +} diff --git a/src/protos.js b/src/protos.js new file mode 100644 index 0000000..fa5a3cc --- /dev/null +++ b/src/protos.js @@ -0,0 +1,7890 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +"use strict"; + +var $protobuf = require("protobufjs/minimal"); + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +$root.checkin_proto = (function() { + + /** + * Namespace checkin_proto. + * @exports checkin_proto + * @namespace + */ + var checkin_proto = {}; + + checkin_proto.ChromeBuildProto = (function() { + + /** + * Properties of a ChromeBuildProto. + * @memberof checkin_proto + * @interface IChromeBuildProto + * @property {checkin_proto.ChromeBuildProto.Platform|null} [platform] ChromeBuildProto platform + * @property {string|null} [chromeVersion] ChromeBuildProto chromeVersion + * @property {checkin_proto.ChromeBuildProto.Channel|null} [channel] ChromeBuildProto channel + */ + + /** + * Constructs a new ChromeBuildProto. + * @memberof checkin_proto + * @classdesc Represents a ChromeBuildProto. + * @implements IChromeBuildProto + * @constructor + * @param {checkin_proto.IChromeBuildProto=} [properties] Properties to set + */ + function ChromeBuildProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChromeBuildProto platform. + * @member {checkin_proto.ChromeBuildProto.Platform} platform + * @memberof checkin_proto.ChromeBuildProto + * @instance + */ + ChromeBuildProto.prototype.platform = 1; + + /** + * ChromeBuildProto chromeVersion. + * @member {string} chromeVersion + * @memberof checkin_proto.ChromeBuildProto + * @instance + */ + ChromeBuildProto.prototype.chromeVersion = ""; + + /** + * ChromeBuildProto channel. + * @member {checkin_proto.ChromeBuildProto.Channel} channel + * @memberof checkin_proto.ChromeBuildProto + * @instance + */ + ChromeBuildProto.prototype.channel = 1; + + /** + * Creates a new ChromeBuildProto instance using the specified properties. + * @function create + * @memberof checkin_proto.ChromeBuildProto + * @static + * @param {checkin_proto.IChromeBuildProto=} [properties] Properties to set + * @returns {checkin_proto.ChromeBuildProto} ChromeBuildProto instance + */ + ChromeBuildProto.create = function create(properties) { + return new ChromeBuildProto(properties); + }; + + /** + * Encodes the specified ChromeBuildProto message. Does not implicitly {@link checkin_proto.ChromeBuildProto.verify|verify} messages. + * @function encode + * @memberof checkin_proto.ChromeBuildProto + * @static + * @param {checkin_proto.IChromeBuildProto} message ChromeBuildProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChromeBuildProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.platform); + if (message.chromeVersion != null && Object.hasOwnProperty.call(message, "chromeVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chromeVersion); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.channel); + return writer; + }; + + /** + * Encodes the specified ChromeBuildProto message, length delimited. Does not implicitly {@link checkin_proto.ChromeBuildProto.verify|verify} messages. + * @function encodeDelimited + * @memberof checkin_proto.ChromeBuildProto + * @static + * @param {checkin_proto.IChromeBuildProto} message ChromeBuildProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChromeBuildProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChromeBuildProto message from the specified reader or buffer. + * @function decode + * @memberof checkin_proto.ChromeBuildProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {checkin_proto.ChromeBuildProto} ChromeBuildProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChromeBuildProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.checkin_proto.ChromeBuildProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.platform = reader.int32(); + break; + } + case 2: { + message.chromeVersion = reader.string(); + break; + } + case 3: { + message.channel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChromeBuildProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof checkin_proto.ChromeBuildProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {checkin_proto.ChromeBuildProto} ChromeBuildProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChromeBuildProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChromeBuildProto message. + * @function verify + * @memberof checkin_proto.ChromeBuildProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChromeBuildProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.platform != null && message.hasOwnProperty("platform")) + switch (message.platform) { + default: + return "platform: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.chromeVersion != null && message.hasOwnProperty("chromeVersion")) + if (!$util.isString(message.chromeVersion)) + return "chromeVersion: string expected"; + if (message.channel != null && message.hasOwnProperty("channel")) + switch (message.channel) { + default: + return "channel: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a ChromeBuildProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof checkin_proto.ChromeBuildProto + * @static + * @param {Object.} object Plain object + * @returns {checkin_proto.ChromeBuildProto} ChromeBuildProto + */ + ChromeBuildProto.fromObject = function fromObject(object) { + if (object instanceof $root.checkin_proto.ChromeBuildProto) + return object; + var message = new $root.checkin_proto.ChromeBuildProto(); + switch (object.platform) { + default: + if (typeof object.platform === "number") { + message.platform = object.platform; + break; + } + break; + case "PLATFORM_WIN": + case 1: + message.platform = 1; + break; + case "PLATFORM_MAC": + case 2: + message.platform = 2; + break; + case "PLATFORM_LINUX": + case 3: + message.platform = 3; + break; + case "PLATFORM_CROS": + case 4: + message.platform = 4; + break; + case "PLATFORM_IOS": + case 5: + message.platform = 5; + break; + case "PLATFORM_ANDROID": + case 6: + message.platform = 6; + break; + } + if (object.chromeVersion != null) + message.chromeVersion = String(object.chromeVersion); + switch (object.channel) { + default: + if (typeof object.channel === "number") { + message.channel = object.channel; + break; + } + break; + case "CHANNEL_STABLE": + case 1: + message.channel = 1; + break; + case "CHANNEL_BETA": + case 2: + message.channel = 2; + break; + case "CHANNEL_DEV": + case 3: + message.channel = 3; + break; + case "CHANNEL_CANARY": + case 4: + message.channel = 4; + break; + case "CHANNEL_UNKNOWN": + case 5: + message.channel = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a ChromeBuildProto message. Also converts values to other types if specified. + * @function toObject + * @memberof checkin_proto.ChromeBuildProto + * @static + * @param {checkin_proto.ChromeBuildProto} message ChromeBuildProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChromeBuildProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.platform = options.enums === String ? "PLATFORM_WIN" : 1; + object.chromeVersion = ""; + object.channel = options.enums === String ? "CHANNEL_STABLE" : 1; + } + if (message.platform != null && message.hasOwnProperty("platform")) + object.platform = options.enums === String ? $root.checkin_proto.ChromeBuildProto.Platform[message.platform] === undefined ? message.platform : $root.checkin_proto.ChromeBuildProto.Platform[message.platform] : message.platform; + if (message.chromeVersion != null && message.hasOwnProperty("chromeVersion")) + object.chromeVersion = message.chromeVersion; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = options.enums === String ? $root.checkin_proto.ChromeBuildProto.Channel[message.channel] === undefined ? message.channel : $root.checkin_proto.ChromeBuildProto.Channel[message.channel] : message.channel; + return object; + }; + + /** + * Converts this ChromeBuildProto to JSON. + * @function toJSON + * @memberof checkin_proto.ChromeBuildProto + * @instance + * @returns {Object.} JSON object + */ + ChromeBuildProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChromeBuildProto + * @function getTypeUrl + * @memberof checkin_proto.ChromeBuildProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChromeBuildProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/checkin_proto.ChromeBuildProto"; + }; + + /** + * Platform enum. + * @name checkin_proto.ChromeBuildProto.Platform + * @enum {number} + * @property {number} PLATFORM_WIN=1 PLATFORM_WIN value + * @property {number} PLATFORM_MAC=2 PLATFORM_MAC value + * @property {number} PLATFORM_LINUX=3 PLATFORM_LINUX value + * @property {number} PLATFORM_CROS=4 PLATFORM_CROS value + * @property {number} PLATFORM_IOS=5 PLATFORM_IOS value + * @property {number} PLATFORM_ANDROID=6 PLATFORM_ANDROID value + */ + ChromeBuildProto.Platform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "PLATFORM_WIN"] = 1; + values[valuesById[2] = "PLATFORM_MAC"] = 2; + values[valuesById[3] = "PLATFORM_LINUX"] = 3; + values[valuesById[4] = "PLATFORM_CROS"] = 4; + values[valuesById[5] = "PLATFORM_IOS"] = 5; + values[valuesById[6] = "PLATFORM_ANDROID"] = 6; + return values; + })(); + + /** + * Channel enum. + * @name checkin_proto.ChromeBuildProto.Channel + * @enum {number} + * @property {number} CHANNEL_STABLE=1 CHANNEL_STABLE value + * @property {number} CHANNEL_BETA=2 CHANNEL_BETA value + * @property {number} CHANNEL_DEV=3 CHANNEL_DEV value + * @property {number} CHANNEL_CANARY=4 CHANNEL_CANARY value + * @property {number} CHANNEL_UNKNOWN=5 CHANNEL_UNKNOWN value + */ + ChromeBuildProto.Channel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "CHANNEL_STABLE"] = 1; + values[valuesById[2] = "CHANNEL_BETA"] = 2; + values[valuesById[3] = "CHANNEL_DEV"] = 3; + values[valuesById[4] = "CHANNEL_CANARY"] = 4; + values[valuesById[5] = "CHANNEL_UNKNOWN"] = 5; + return values; + })(); + + return ChromeBuildProto; + })(); + + checkin_proto.AndroidCheckinProto = (function() { + + /** + * Properties of an AndroidCheckinProto. + * @memberof checkin_proto + * @interface IAndroidCheckinProto + * @property {Long|null} [lastCheckinMsec] AndroidCheckinProto lastCheckinMsec + * @property {string|null} [cellOperator] AndroidCheckinProto cellOperator + * @property {string|null} [simOperator] AndroidCheckinProto simOperator + * @property {string|null} [roaming] AndroidCheckinProto roaming + * @property {number|null} [userNumber] AndroidCheckinProto userNumber + * @property {checkin_proto.DeviceType|null} [type] AndroidCheckinProto type + * @property {checkin_proto.IChromeBuildProto|null} [chromeBuild] AndroidCheckinProto chromeBuild + */ + + /** + * Constructs a new AndroidCheckinProto. + * @memberof checkin_proto + * @classdesc Represents an AndroidCheckinProto. + * @implements IAndroidCheckinProto + * @constructor + * @param {checkin_proto.IAndroidCheckinProto=} [properties] Properties to set + */ + function AndroidCheckinProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AndroidCheckinProto lastCheckinMsec. + * @member {Long} lastCheckinMsec + * @memberof checkin_proto.AndroidCheckinProto + * @instance + */ + AndroidCheckinProto.prototype.lastCheckinMsec = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AndroidCheckinProto cellOperator. + * @member {string} cellOperator + * @memberof checkin_proto.AndroidCheckinProto + * @instance + */ + AndroidCheckinProto.prototype.cellOperator = ""; + + /** + * AndroidCheckinProto simOperator. + * @member {string} simOperator + * @memberof checkin_proto.AndroidCheckinProto + * @instance + */ + AndroidCheckinProto.prototype.simOperator = ""; + + /** + * AndroidCheckinProto roaming. + * @member {string} roaming + * @memberof checkin_proto.AndroidCheckinProto + * @instance + */ + AndroidCheckinProto.prototype.roaming = ""; + + /** + * AndroidCheckinProto userNumber. + * @member {number} userNumber + * @memberof checkin_proto.AndroidCheckinProto + * @instance + */ + AndroidCheckinProto.prototype.userNumber = 0; + + /** + * AndroidCheckinProto type. + * @member {checkin_proto.DeviceType} type + * @memberof checkin_proto.AndroidCheckinProto + * @instance + */ + AndroidCheckinProto.prototype.type = 1; + + /** + * AndroidCheckinProto chromeBuild. + * @member {checkin_proto.IChromeBuildProto|null|undefined} chromeBuild + * @memberof checkin_proto.AndroidCheckinProto + * @instance + */ + AndroidCheckinProto.prototype.chromeBuild = null; + + /** + * Creates a new AndroidCheckinProto instance using the specified properties. + * @function create + * @memberof checkin_proto.AndroidCheckinProto + * @static + * @param {checkin_proto.IAndroidCheckinProto=} [properties] Properties to set + * @returns {checkin_proto.AndroidCheckinProto} AndroidCheckinProto instance + */ + AndroidCheckinProto.create = function create(properties) { + return new AndroidCheckinProto(properties); + }; + + /** + * Encodes the specified AndroidCheckinProto message. Does not implicitly {@link checkin_proto.AndroidCheckinProto.verify|verify} messages. + * @function encode + * @memberof checkin_proto.AndroidCheckinProto + * @static + * @param {checkin_proto.IAndroidCheckinProto} message AndroidCheckinProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidCheckinProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastCheckinMsec != null && Object.hasOwnProperty.call(message, "lastCheckinMsec")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lastCheckinMsec); + if (message.cellOperator != null && Object.hasOwnProperty.call(message, "cellOperator")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.cellOperator); + if (message.simOperator != null && Object.hasOwnProperty.call(message, "simOperator")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.simOperator); + if (message.roaming != null && Object.hasOwnProperty.call(message, "roaming")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.roaming); + if (message.userNumber != null && Object.hasOwnProperty.call(message, "userNumber")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.userNumber); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.type); + if (message.chromeBuild != null && Object.hasOwnProperty.call(message, "chromeBuild")) + $root.checkin_proto.ChromeBuildProto.encode(message.chromeBuild, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AndroidCheckinProto message, length delimited. Does not implicitly {@link checkin_proto.AndroidCheckinProto.verify|verify} messages. + * @function encodeDelimited + * @memberof checkin_proto.AndroidCheckinProto + * @static + * @param {checkin_proto.IAndroidCheckinProto} message AndroidCheckinProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidCheckinProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AndroidCheckinProto message from the specified reader or buffer. + * @function decode + * @memberof checkin_proto.AndroidCheckinProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {checkin_proto.AndroidCheckinProto} AndroidCheckinProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidCheckinProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.checkin_proto.AndroidCheckinProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.lastCheckinMsec = reader.int64(); + break; + } + case 6: { + message.cellOperator = reader.string(); + break; + } + case 7: { + message.simOperator = reader.string(); + break; + } + case 8: { + message.roaming = reader.string(); + break; + } + case 9: { + message.userNumber = reader.int32(); + break; + } + case 12: { + message.type = reader.int32(); + break; + } + case 13: { + message.chromeBuild = $root.checkin_proto.ChromeBuildProto.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AndroidCheckinProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof checkin_proto.AndroidCheckinProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {checkin_proto.AndroidCheckinProto} AndroidCheckinProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidCheckinProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AndroidCheckinProto message. + * @function verify + * @memberof checkin_proto.AndroidCheckinProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AndroidCheckinProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lastCheckinMsec != null && message.hasOwnProperty("lastCheckinMsec")) + if (!$util.isInteger(message.lastCheckinMsec) && !(message.lastCheckinMsec && $util.isInteger(message.lastCheckinMsec.low) && $util.isInteger(message.lastCheckinMsec.high))) + return "lastCheckinMsec: integer|Long expected"; + if (message.cellOperator != null && message.hasOwnProperty("cellOperator")) + if (!$util.isString(message.cellOperator)) + return "cellOperator: string expected"; + if (message.simOperator != null && message.hasOwnProperty("simOperator")) + if (!$util.isString(message.simOperator)) + return "simOperator: string expected"; + if (message.roaming != null && message.hasOwnProperty("roaming")) + if (!$util.isString(message.roaming)) + return "roaming: string expected"; + if (message.userNumber != null && message.hasOwnProperty("userNumber")) + if (!$util.isInteger(message.userNumber)) + return "userNumber: integer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.chromeBuild != null && message.hasOwnProperty("chromeBuild")) { + var error = $root.checkin_proto.ChromeBuildProto.verify(message.chromeBuild); + if (error) + return "chromeBuild." + error; + } + return null; + }; + + /** + * Creates an AndroidCheckinProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof checkin_proto.AndroidCheckinProto + * @static + * @param {Object.} object Plain object + * @returns {checkin_proto.AndroidCheckinProto} AndroidCheckinProto + */ + AndroidCheckinProto.fromObject = function fromObject(object) { + if (object instanceof $root.checkin_proto.AndroidCheckinProto) + return object; + var message = new $root.checkin_proto.AndroidCheckinProto(); + if (object.lastCheckinMsec != null) + if ($util.Long) + (message.lastCheckinMsec = $util.Long.fromValue(object.lastCheckinMsec)).unsigned = false; + else if (typeof object.lastCheckinMsec === "string") + message.lastCheckinMsec = parseInt(object.lastCheckinMsec, 10); + else if (typeof object.lastCheckinMsec === "number") + message.lastCheckinMsec = object.lastCheckinMsec; + else if (typeof object.lastCheckinMsec === "object") + message.lastCheckinMsec = new $util.LongBits(object.lastCheckinMsec.low >>> 0, object.lastCheckinMsec.high >>> 0).toNumber(); + if (object.cellOperator != null) + message.cellOperator = String(object.cellOperator); + if (object.simOperator != null) + message.simOperator = String(object.simOperator); + if (object.roaming != null) + message.roaming = String(object.roaming); + if (object.userNumber != null) + message.userNumber = object.userNumber | 0; + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DEVICE_ANDROID_OS": + case 1: + message.type = 1; + break; + case "DEVICE_IOS_OS": + case 2: + message.type = 2; + break; + case "DEVICE_CHROME_BROWSER": + case 3: + message.type = 3; + break; + case "DEVICE_CHROME_OS": + case 4: + message.type = 4; + break; + } + if (object.chromeBuild != null) { + if (typeof object.chromeBuild !== "object") + throw TypeError(".checkin_proto.AndroidCheckinProto.chromeBuild: object expected"); + message.chromeBuild = $root.checkin_proto.ChromeBuildProto.fromObject(object.chromeBuild); + } + return message; + }; + + /** + * Creates a plain object from an AndroidCheckinProto message. Also converts values to other types if specified. + * @function toObject + * @memberof checkin_proto.AndroidCheckinProto + * @static + * @param {checkin_proto.AndroidCheckinProto} message AndroidCheckinProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AndroidCheckinProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lastCheckinMsec = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastCheckinMsec = options.longs === String ? "0" : 0; + object.cellOperator = ""; + object.simOperator = ""; + object.roaming = ""; + object.userNumber = 0; + object.type = options.enums === String ? "DEVICE_ANDROID_OS" : 1; + object.chromeBuild = null; + } + if (message.lastCheckinMsec != null && message.hasOwnProperty("lastCheckinMsec")) + if (typeof message.lastCheckinMsec === "number") + object.lastCheckinMsec = options.longs === String ? String(message.lastCheckinMsec) : message.lastCheckinMsec; + else + object.lastCheckinMsec = options.longs === String ? $util.Long.prototype.toString.call(message.lastCheckinMsec) : options.longs === Number ? new $util.LongBits(message.lastCheckinMsec.low >>> 0, message.lastCheckinMsec.high >>> 0).toNumber() : message.lastCheckinMsec; + if (message.cellOperator != null && message.hasOwnProperty("cellOperator")) + object.cellOperator = message.cellOperator; + if (message.simOperator != null && message.hasOwnProperty("simOperator")) + object.simOperator = message.simOperator; + if (message.roaming != null && message.hasOwnProperty("roaming")) + object.roaming = message.roaming; + if (message.userNumber != null && message.hasOwnProperty("userNumber")) + object.userNumber = message.userNumber; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.checkin_proto.DeviceType[message.type] === undefined ? message.type : $root.checkin_proto.DeviceType[message.type] : message.type; + if (message.chromeBuild != null && message.hasOwnProperty("chromeBuild")) + object.chromeBuild = $root.checkin_proto.ChromeBuildProto.toObject(message.chromeBuild, options); + return object; + }; + + /** + * Converts this AndroidCheckinProto to JSON. + * @function toJSON + * @memberof checkin_proto.AndroidCheckinProto + * @instance + * @returns {Object.} JSON object + */ + AndroidCheckinProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AndroidCheckinProto + * @function getTypeUrl + * @memberof checkin_proto.AndroidCheckinProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AndroidCheckinProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/checkin_proto.AndroidCheckinProto"; + }; + + return AndroidCheckinProto; + })(); + + /** + * DeviceType enum. + * @name checkin_proto.DeviceType + * @enum {number} + * @property {number} DEVICE_ANDROID_OS=1 DEVICE_ANDROID_OS value + * @property {number} DEVICE_IOS_OS=2 DEVICE_IOS_OS value + * @property {number} DEVICE_CHROME_BROWSER=3 DEVICE_CHROME_BROWSER value + * @property {number} DEVICE_CHROME_OS=4 DEVICE_CHROME_OS value + */ + checkin_proto.DeviceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "DEVICE_ANDROID_OS"] = 1; + values[valuesById[2] = "DEVICE_IOS_OS"] = 2; + values[valuesById[3] = "DEVICE_CHROME_BROWSER"] = 3; + values[valuesById[4] = "DEVICE_CHROME_OS"] = 4; + return values; + })(); + + checkin_proto.GservicesSetting = (function() { + + /** + * Properties of a GservicesSetting. + * @memberof checkin_proto + * @interface IGservicesSetting + * @property {Uint8Array} name GservicesSetting name + * @property {Uint8Array} value GservicesSetting value + */ + + /** + * Constructs a new GservicesSetting. + * @memberof checkin_proto + * @classdesc Represents a GservicesSetting. + * @implements IGservicesSetting + * @constructor + * @param {checkin_proto.IGservicesSetting=} [properties] Properties to set + */ + function GservicesSetting(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GservicesSetting name. + * @member {Uint8Array} name + * @memberof checkin_proto.GservicesSetting + * @instance + */ + GservicesSetting.prototype.name = $util.newBuffer([]); + + /** + * GservicesSetting value. + * @member {Uint8Array} value + * @memberof checkin_proto.GservicesSetting + * @instance + */ + GservicesSetting.prototype.value = $util.newBuffer([]); + + /** + * Creates a new GservicesSetting instance using the specified properties. + * @function create + * @memberof checkin_proto.GservicesSetting + * @static + * @param {checkin_proto.IGservicesSetting=} [properties] Properties to set + * @returns {checkin_proto.GservicesSetting} GservicesSetting instance + */ + GservicesSetting.create = function create(properties) { + return new GservicesSetting(properties); + }; + + /** + * Encodes the specified GservicesSetting message. Does not implicitly {@link checkin_proto.GservicesSetting.verify|verify} messages. + * @function encode + * @memberof checkin_proto.GservicesSetting + * @static + * @param {checkin_proto.IGservicesSetting} message GservicesSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GservicesSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.name); + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified GservicesSetting message, length delimited. Does not implicitly {@link checkin_proto.GservicesSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof checkin_proto.GservicesSetting + * @static + * @param {checkin_proto.IGservicesSetting} message GservicesSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GservicesSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GservicesSetting message from the specified reader or buffer. + * @function decode + * @memberof checkin_proto.GservicesSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {checkin_proto.GservicesSetting} GservicesSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GservicesSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.checkin_proto.GservicesSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.bytes(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("value")) + throw $util.ProtocolError("missing required 'value'", { instance: message }); + return message; + }; + + /** + * Decodes a GservicesSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof checkin_proto.GservicesSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {checkin_proto.GservicesSetting} GservicesSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GservicesSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GservicesSetting message. + * @function verify + * @memberof checkin_proto.GservicesSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GservicesSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!(message.name && typeof message.name.length === "number" || $util.isString(message.name))) + return "name: buffer expected"; + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a GservicesSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof checkin_proto.GservicesSetting + * @static + * @param {Object.} object Plain object + * @returns {checkin_proto.GservicesSetting} GservicesSetting + */ + GservicesSetting.fromObject = function fromObject(object) { + if (object instanceof $root.checkin_proto.GservicesSetting) + return object; + var message = new $root.checkin_proto.GservicesSetting(); + if (object.name != null) + if (typeof object.name === "string") + $util.base64.decode(object.name, message.name = $util.newBuffer($util.base64.length(object.name)), 0); + else if (object.name.length >= 0) + message.name = object.name; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a GservicesSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof checkin_proto.GservicesSetting + * @static + * @param {checkin_proto.GservicesSetting} message GservicesSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GservicesSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.name = ""; + else { + object.name = []; + if (options.bytes !== Array) + object.name = $util.newBuffer(object.name); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = options.bytes === String ? $util.base64.encode(message.name, 0, message.name.length) : options.bytes === Array ? Array.prototype.slice.call(message.name) : message.name; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this GservicesSetting to JSON. + * @function toJSON + * @memberof checkin_proto.GservicesSetting + * @instance + * @returns {Object.} JSON object + */ + GservicesSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GservicesSetting + * @function getTypeUrl + * @memberof checkin_proto.GservicesSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GservicesSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/checkin_proto.GservicesSetting"; + }; + + return GservicesSetting; + })(); + + checkin_proto.AndroidCheckinRequest = (function() { + + /** + * Properties of an AndroidCheckinRequest. + * @memberof checkin_proto + * @interface IAndroidCheckinRequest + * @property {string|null} [imei] AndroidCheckinRequest imei + * @property {string|null} [meid] AndroidCheckinRequest meid + * @property {Array.|null} [macAddr] AndroidCheckinRequest macAddr + * @property {Array.|null} [macAddrType] AndroidCheckinRequest macAddrType + * @property {string|null} [serialNumber] AndroidCheckinRequest serialNumber + * @property {string|null} [esn] AndroidCheckinRequest esn + * @property {Long|null} [id] AndroidCheckinRequest id + * @property {Long|null} [loggingId] AndroidCheckinRequest loggingId + * @property {string|null} [digest] AndroidCheckinRequest digest + * @property {string|null} [locale] AndroidCheckinRequest locale + * @property {checkin_proto.IAndroidCheckinProto} checkin AndroidCheckinRequest checkin + * @property {string|null} [desiredBuild] AndroidCheckinRequest desiredBuild + * @property {string|null} [marketCheckin] AndroidCheckinRequest marketCheckin + * @property {Array.|null} [accountCookie] AndroidCheckinRequest accountCookie + * @property {string|null} [timeZone] AndroidCheckinRequest timeZone + * @property {Long|null} [securityToken] AndroidCheckinRequest securityToken + * @property {number|null} [version] AndroidCheckinRequest version + * @property {Array.|null} [otaCert] AndroidCheckinRequest otaCert + * @property {number|null} [fragment] AndroidCheckinRequest fragment + * @property {string|null} [userName] AndroidCheckinRequest userName + * @property {number|null} [userSerialNumber] AndroidCheckinRequest userSerialNumber + */ + + /** + * Constructs a new AndroidCheckinRequest. + * @memberof checkin_proto + * @classdesc Represents an AndroidCheckinRequest. + * @implements IAndroidCheckinRequest + * @constructor + * @param {checkin_proto.IAndroidCheckinRequest=} [properties] Properties to set + */ + function AndroidCheckinRequest(properties) { + this.macAddr = []; + this.macAddrType = []; + this.accountCookie = []; + this.otaCert = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AndroidCheckinRequest imei. + * @member {string} imei + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.imei = ""; + + /** + * AndroidCheckinRequest meid. + * @member {string} meid + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.meid = ""; + + /** + * AndroidCheckinRequest macAddr. + * @member {Array.} macAddr + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.macAddr = $util.emptyArray; + + /** + * AndroidCheckinRequest macAddrType. + * @member {Array.} macAddrType + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.macAddrType = $util.emptyArray; + + /** + * AndroidCheckinRequest serialNumber. + * @member {string} serialNumber + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.serialNumber = ""; + + /** + * AndroidCheckinRequest esn. + * @member {string} esn + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.esn = ""; + + /** + * AndroidCheckinRequest id. + * @member {Long} id + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AndroidCheckinRequest loggingId. + * @member {Long} loggingId + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.loggingId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AndroidCheckinRequest digest. + * @member {string} digest + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.digest = ""; + + /** + * AndroidCheckinRequest locale. + * @member {string} locale + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.locale = ""; + + /** + * AndroidCheckinRequest checkin. + * @member {checkin_proto.IAndroidCheckinProto} checkin + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.checkin = null; + + /** + * AndroidCheckinRequest desiredBuild. + * @member {string} desiredBuild + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.desiredBuild = ""; + + /** + * AndroidCheckinRequest marketCheckin. + * @member {string} marketCheckin + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.marketCheckin = ""; + + /** + * AndroidCheckinRequest accountCookie. + * @member {Array.} accountCookie + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.accountCookie = $util.emptyArray; + + /** + * AndroidCheckinRequest timeZone. + * @member {string} timeZone + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.timeZone = ""; + + /** + * AndroidCheckinRequest securityToken. + * @member {Long} securityToken + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.securityToken = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AndroidCheckinRequest version. + * @member {number} version + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.version = 0; + + /** + * AndroidCheckinRequest otaCert. + * @member {Array.} otaCert + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.otaCert = $util.emptyArray; + + /** + * AndroidCheckinRequest fragment. + * @member {number} fragment + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.fragment = 0; + + /** + * AndroidCheckinRequest userName. + * @member {string} userName + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.userName = ""; + + /** + * AndroidCheckinRequest userSerialNumber. + * @member {number} userSerialNumber + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + */ + AndroidCheckinRequest.prototype.userSerialNumber = 0; + + /** + * Creates a new AndroidCheckinRequest instance using the specified properties. + * @function create + * @memberof checkin_proto.AndroidCheckinRequest + * @static + * @param {checkin_proto.IAndroidCheckinRequest=} [properties] Properties to set + * @returns {checkin_proto.AndroidCheckinRequest} AndroidCheckinRequest instance + */ + AndroidCheckinRequest.create = function create(properties) { + return new AndroidCheckinRequest(properties); + }; + + /** + * Encodes the specified AndroidCheckinRequest message. Does not implicitly {@link checkin_proto.AndroidCheckinRequest.verify|verify} messages. + * @function encode + * @memberof checkin_proto.AndroidCheckinRequest + * @static + * @param {checkin_proto.IAndroidCheckinRequest} message AndroidCheckinRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidCheckinRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imei != null && Object.hasOwnProperty.call(message, "imei")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imei); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); + if (message.digest != null && Object.hasOwnProperty.call(message, "digest")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.digest); + $root.checkin_proto.AndroidCheckinProto.encode(message.checkin, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.desiredBuild != null && Object.hasOwnProperty.call(message, "desiredBuild")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.desiredBuild); + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.locale); + if (message.loggingId != null && Object.hasOwnProperty.call(message, "loggingId")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.loggingId); + if (message.marketCheckin != null && Object.hasOwnProperty.call(message, "marketCheckin")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.marketCheckin); + if (message.macAddr != null && message.macAddr.length) + for (var i = 0; i < message.macAddr.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.macAddr[i]); + if (message.meid != null && Object.hasOwnProperty.call(message, "meid")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.meid); + if (message.accountCookie != null && message.accountCookie.length) + for (var i = 0; i < message.accountCookie.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.accountCookie[i]); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.timeZone); + if (message.securityToken != null && Object.hasOwnProperty.call(message, "securityToken")) + writer.uint32(/* id 13, wireType 1 =*/105).fixed64(message.securityToken); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.version); + if (message.otaCert != null && message.otaCert.length) + for (var i = 0; i < message.otaCert.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.otaCert[i]); + if (message.serialNumber != null && Object.hasOwnProperty.call(message, "serialNumber")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.serialNumber); + if (message.esn != null && Object.hasOwnProperty.call(message, "esn")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.esn); + if (message.macAddrType != null && message.macAddrType.length) + for (var i = 0; i < message.macAddrType.length; ++i) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.macAddrType[i]); + if (message.fragment != null && Object.hasOwnProperty.call(message, "fragment")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.fragment); + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.userName); + if (message.userSerialNumber != null && Object.hasOwnProperty.call(message, "userSerialNumber")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.userSerialNumber); + return writer; + }; + + /** + * Encodes the specified AndroidCheckinRequest message, length delimited. Does not implicitly {@link checkin_proto.AndroidCheckinRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof checkin_proto.AndroidCheckinRequest + * @static + * @param {checkin_proto.IAndroidCheckinRequest} message AndroidCheckinRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidCheckinRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AndroidCheckinRequest message from the specified reader or buffer. + * @function decode + * @memberof checkin_proto.AndroidCheckinRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {checkin_proto.AndroidCheckinRequest} AndroidCheckinRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidCheckinRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.checkin_proto.AndroidCheckinRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imei = reader.string(); + break; + } + case 10: { + message.meid = reader.string(); + break; + } + case 9: { + if (!(message.macAddr && message.macAddr.length)) + message.macAddr = []; + message.macAddr.push(reader.string()); + break; + } + case 19: { + if (!(message.macAddrType && message.macAddrType.length)) + message.macAddrType = []; + message.macAddrType.push(reader.string()); + break; + } + case 16: { + message.serialNumber = reader.string(); + break; + } + case 17: { + message.esn = reader.string(); + break; + } + case 2: { + message.id = reader.int64(); + break; + } + case 7: { + message.loggingId = reader.int64(); + break; + } + case 3: { + message.digest = reader.string(); + break; + } + case 6: { + message.locale = reader.string(); + break; + } + case 4: { + message.checkin = $root.checkin_proto.AndroidCheckinProto.decode(reader, reader.uint32()); + break; + } + case 5: { + message.desiredBuild = reader.string(); + break; + } + case 8: { + message.marketCheckin = reader.string(); + break; + } + case 11: { + if (!(message.accountCookie && message.accountCookie.length)) + message.accountCookie = []; + message.accountCookie.push(reader.string()); + break; + } + case 12: { + message.timeZone = reader.string(); + break; + } + case 13: { + message.securityToken = reader.fixed64(); + break; + } + case 14: { + message.version = reader.int32(); + break; + } + case 15: { + if (!(message.otaCert && message.otaCert.length)) + message.otaCert = []; + message.otaCert.push(reader.string()); + break; + } + case 20: { + message.fragment = reader.int32(); + break; + } + case 21: { + message.userName = reader.string(); + break; + } + case 22: { + message.userSerialNumber = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("checkin")) + throw $util.ProtocolError("missing required 'checkin'", { instance: message }); + return message; + }; + + /** + * Decodes an AndroidCheckinRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof checkin_proto.AndroidCheckinRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {checkin_proto.AndroidCheckinRequest} AndroidCheckinRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidCheckinRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AndroidCheckinRequest message. + * @function verify + * @memberof checkin_proto.AndroidCheckinRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AndroidCheckinRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imei != null && message.hasOwnProperty("imei")) + if (!$util.isString(message.imei)) + return "imei: string expected"; + if (message.meid != null && message.hasOwnProperty("meid")) + if (!$util.isString(message.meid)) + return "meid: string expected"; + if (message.macAddr != null && message.hasOwnProperty("macAddr")) { + if (!Array.isArray(message.macAddr)) + return "macAddr: array expected"; + for (var i = 0; i < message.macAddr.length; ++i) + if (!$util.isString(message.macAddr[i])) + return "macAddr: string[] expected"; + } + if (message.macAddrType != null && message.hasOwnProperty("macAddrType")) { + if (!Array.isArray(message.macAddrType)) + return "macAddrType: array expected"; + for (var i = 0; i < message.macAddrType.length; ++i) + if (!$util.isString(message.macAddrType[i])) + return "macAddrType: string[] expected"; + } + if (message.serialNumber != null && message.hasOwnProperty("serialNumber")) + if (!$util.isString(message.serialNumber)) + return "serialNumber: string expected"; + if (message.esn != null && message.hasOwnProperty("esn")) + if (!$util.isString(message.esn)) + return "esn: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) + return "id: integer|Long expected"; + if (message.loggingId != null && message.hasOwnProperty("loggingId")) + if (!$util.isInteger(message.loggingId) && !(message.loggingId && $util.isInteger(message.loggingId.low) && $util.isInteger(message.loggingId.high))) + return "loggingId: integer|Long expected"; + if (message.digest != null && message.hasOwnProperty("digest")) + if (!$util.isString(message.digest)) + return "digest: string expected"; + if (message.locale != null && message.hasOwnProperty("locale")) + if (!$util.isString(message.locale)) + return "locale: string expected"; + { + var error = $root.checkin_proto.AndroidCheckinProto.verify(message.checkin); + if (error) + return "checkin." + error; + } + if (message.desiredBuild != null && message.hasOwnProperty("desiredBuild")) + if (!$util.isString(message.desiredBuild)) + return "desiredBuild: string expected"; + if (message.marketCheckin != null && message.hasOwnProperty("marketCheckin")) + if (!$util.isString(message.marketCheckin)) + return "marketCheckin: string expected"; + if (message.accountCookie != null && message.hasOwnProperty("accountCookie")) { + if (!Array.isArray(message.accountCookie)) + return "accountCookie: array expected"; + for (var i = 0; i < message.accountCookie.length; ++i) + if (!$util.isString(message.accountCookie[i])) + return "accountCookie: string[] expected"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.securityToken != null && message.hasOwnProperty("securityToken")) + if (!$util.isInteger(message.securityToken) && !(message.securityToken && $util.isInteger(message.securityToken.low) && $util.isInteger(message.securityToken.high))) + return "securityToken: integer|Long expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.otaCert != null && message.hasOwnProperty("otaCert")) { + if (!Array.isArray(message.otaCert)) + return "otaCert: array expected"; + for (var i = 0; i < message.otaCert.length; ++i) + if (!$util.isString(message.otaCert[i])) + return "otaCert: string[] expected"; + } + if (message.fragment != null && message.hasOwnProperty("fragment")) + if (!$util.isInteger(message.fragment)) + return "fragment: integer expected"; + if (message.userName != null && message.hasOwnProperty("userName")) + if (!$util.isString(message.userName)) + return "userName: string expected"; + if (message.userSerialNumber != null && message.hasOwnProperty("userSerialNumber")) + if (!$util.isInteger(message.userSerialNumber)) + return "userSerialNumber: integer expected"; + return null; + }; + + /** + * Creates an AndroidCheckinRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof checkin_proto.AndroidCheckinRequest + * @static + * @param {Object.} object Plain object + * @returns {checkin_proto.AndroidCheckinRequest} AndroidCheckinRequest + */ + AndroidCheckinRequest.fromObject = function fromObject(object) { + if (object instanceof $root.checkin_proto.AndroidCheckinRequest) + return object; + var message = new $root.checkin_proto.AndroidCheckinRequest(); + if (object.imei != null) + message.imei = String(object.imei); + if (object.meid != null) + message.meid = String(object.meid); + if (object.macAddr) { + if (!Array.isArray(object.macAddr)) + throw TypeError(".checkin_proto.AndroidCheckinRequest.macAddr: array expected"); + message.macAddr = []; + for (var i = 0; i < object.macAddr.length; ++i) + message.macAddr[i] = String(object.macAddr[i]); + } + if (object.macAddrType) { + if (!Array.isArray(object.macAddrType)) + throw TypeError(".checkin_proto.AndroidCheckinRequest.macAddrType: array expected"); + message.macAddrType = []; + for (var i = 0; i < object.macAddrType.length; ++i) + message.macAddrType[i] = String(object.macAddrType[i]); + } + if (object.serialNumber != null) + message.serialNumber = String(object.serialNumber); + if (object.esn != null) + message.esn = String(object.esn); + if (object.id != null) + if ($util.Long) + (message.id = $util.Long.fromValue(object.id)).unsigned = false; + else if (typeof object.id === "string") + message.id = parseInt(object.id, 10); + else if (typeof object.id === "number") + message.id = object.id; + else if (typeof object.id === "object") + message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); + if (object.loggingId != null) + if ($util.Long) + (message.loggingId = $util.Long.fromValue(object.loggingId)).unsigned = false; + else if (typeof object.loggingId === "string") + message.loggingId = parseInt(object.loggingId, 10); + else if (typeof object.loggingId === "number") + message.loggingId = object.loggingId; + else if (typeof object.loggingId === "object") + message.loggingId = new $util.LongBits(object.loggingId.low >>> 0, object.loggingId.high >>> 0).toNumber(); + if (object.digest != null) + message.digest = String(object.digest); + if (object.locale != null) + message.locale = String(object.locale); + if (object.checkin != null) { + if (typeof object.checkin !== "object") + throw TypeError(".checkin_proto.AndroidCheckinRequest.checkin: object expected"); + message.checkin = $root.checkin_proto.AndroidCheckinProto.fromObject(object.checkin); + } + if (object.desiredBuild != null) + message.desiredBuild = String(object.desiredBuild); + if (object.marketCheckin != null) + message.marketCheckin = String(object.marketCheckin); + if (object.accountCookie) { + if (!Array.isArray(object.accountCookie)) + throw TypeError(".checkin_proto.AndroidCheckinRequest.accountCookie: array expected"); + message.accountCookie = []; + for (var i = 0; i < object.accountCookie.length; ++i) + message.accountCookie[i] = String(object.accountCookie[i]); + } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.securityToken != null) + if ($util.Long) + (message.securityToken = $util.Long.fromValue(object.securityToken)).unsigned = false; + else if (typeof object.securityToken === "string") + message.securityToken = parseInt(object.securityToken, 10); + else if (typeof object.securityToken === "number") + message.securityToken = object.securityToken; + else if (typeof object.securityToken === "object") + message.securityToken = new $util.LongBits(object.securityToken.low >>> 0, object.securityToken.high >>> 0).toNumber(); + if (object.version != null) + message.version = object.version | 0; + if (object.otaCert) { + if (!Array.isArray(object.otaCert)) + throw TypeError(".checkin_proto.AndroidCheckinRequest.otaCert: array expected"); + message.otaCert = []; + for (var i = 0; i < object.otaCert.length; ++i) + message.otaCert[i] = String(object.otaCert[i]); + } + if (object.fragment != null) + message.fragment = object.fragment | 0; + if (object.userName != null) + message.userName = String(object.userName); + if (object.userSerialNumber != null) + message.userSerialNumber = object.userSerialNumber | 0; + return message; + }; + + /** + * Creates a plain object from an AndroidCheckinRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof checkin_proto.AndroidCheckinRequest + * @static + * @param {checkin_proto.AndroidCheckinRequest} message AndroidCheckinRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AndroidCheckinRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.macAddr = []; + object.accountCookie = []; + object.otaCert = []; + object.macAddrType = []; + } + if (options.defaults) { + object.imei = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.id = options.longs === String ? "0" : 0; + object.digest = ""; + object.checkin = null; + object.desiredBuild = ""; + object.locale = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.loggingId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.loggingId = options.longs === String ? "0" : 0; + object.marketCheckin = ""; + object.meid = ""; + object.timeZone = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.securityToken = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.securityToken = options.longs === String ? "0" : 0; + object.version = 0; + object.serialNumber = ""; + object.esn = ""; + object.fragment = 0; + object.userName = ""; + object.userSerialNumber = 0; + } + if (message.imei != null && message.hasOwnProperty("imei")) + object.imei = message.imei; + if (message.id != null && message.hasOwnProperty("id")) + if (typeof message.id === "number") + object.id = options.longs === String ? String(message.id) : message.id; + else + object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; + if (message.digest != null && message.hasOwnProperty("digest")) + object.digest = message.digest; + if (message.checkin != null && message.hasOwnProperty("checkin")) + object.checkin = $root.checkin_proto.AndroidCheckinProto.toObject(message.checkin, options); + if (message.desiredBuild != null && message.hasOwnProperty("desiredBuild")) + object.desiredBuild = message.desiredBuild; + if (message.locale != null && message.hasOwnProperty("locale")) + object.locale = message.locale; + if (message.loggingId != null && message.hasOwnProperty("loggingId")) + if (typeof message.loggingId === "number") + object.loggingId = options.longs === String ? String(message.loggingId) : message.loggingId; + else + object.loggingId = options.longs === String ? $util.Long.prototype.toString.call(message.loggingId) : options.longs === Number ? new $util.LongBits(message.loggingId.low >>> 0, message.loggingId.high >>> 0).toNumber() : message.loggingId; + if (message.marketCheckin != null && message.hasOwnProperty("marketCheckin")) + object.marketCheckin = message.marketCheckin; + if (message.macAddr && message.macAddr.length) { + object.macAddr = []; + for (var j = 0; j < message.macAddr.length; ++j) + object.macAddr[j] = message.macAddr[j]; + } + if (message.meid != null && message.hasOwnProperty("meid")) + object.meid = message.meid; + if (message.accountCookie && message.accountCookie.length) { + object.accountCookie = []; + for (var j = 0; j < message.accountCookie.length; ++j) + object.accountCookie[j] = message.accountCookie[j]; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.securityToken != null && message.hasOwnProperty("securityToken")) + if (typeof message.securityToken === "number") + object.securityToken = options.longs === String ? String(message.securityToken) : message.securityToken; + else + object.securityToken = options.longs === String ? $util.Long.prototype.toString.call(message.securityToken) : options.longs === Number ? new $util.LongBits(message.securityToken.low >>> 0, message.securityToken.high >>> 0).toNumber() : message.securityToken; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.otaCert && message.otaCert.length) { + object.otaCert = []; + for (var j = 0; j < message.otaCert.length; ++j) + object.otaCert[j] = message.otaCert[j]; + } + if (message.serialNumber != null && message.hasOwnProperty("serialNumber")) + object.serialNumber = message.serialNumber; + if (message.esn != null && message.hasOwnProperty("esn")) + object.esn = message.esn; + if (message.macAddrType && message.macAddrType.length) { + object.macAddrType = []; + for (var j = 0; j < message.macAddrType.length; ++j) + object.macAddrType[j] = message.macAddrType[j]; + } + if (message.fragment != null && message.hasOwnProperty("fragment")) + object.fragment = message.fragment; + if (message.userName != null && message.hasOwnProperty("userName")) + object.userName = message.userName; + if (message.userSerialNumber != null && message.hasOwnProperty("userSerialNumber")) + object.userSerialNumber = message.userSerialNumber; + return object; + }; + + /** + * Converts this AndroidCheckinRequest to JSON. + * @function toJSON + * @memberof checkin_proto.AndroidCheckinRequest + * @instance + * @returns {Object.} JSON object + */ + AndroidCheckinRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AndroidCheckinRequest + * @function getTypeUrl + * @memberof checkin_proto.AndroidCheckinRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AndroidCheckinRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/checkin_proto.AndroidCheckinRequest"; + }; + + return AndroidCheckinRequest; + })(); + + checkin_proto.AndroidCheckinResponse = (function() { + + /** + * Properties of an AndroidCheckinResponse. + * @memberof checkin_proto + * @interface IAndroidCheckinResponse + * @property {boolean} statsOk AndroidCheckinResponse statsOk + * @property {Long|null} [timeMsec] AndroidCheckinResponse timeMsec + * @property {string|null} [digest] AndroidCheckinResponse digest + * @property {boolean|null} [settingsDiff] AndroidCheckinResponse settingsDiff + * @property {Array.|null} [deleteSetting] AndroidCheckinResponse deleteSetting + * @property {Array.|null} [setting] AndroidCheckinResponse setting + * @property {boolean|null} [marketOk] AndroidCheckinResponse marketOk + * @property {Long|null} [androidId] AndroidCheckinResponse androidId + * @property {Long|null} [securityToken] AndroidCheckinResponse securityToken + * @property {string|null} [versionInfo] AndroidCheckinResponse versionInfo + */ + + /** + * Constructs a new AndroidCheckinResponse. + * @memberof checkin_proto + * @classdesc Represents an AndroidCheckinResponse. + * @implements IAndroidCheckinResponse + * @constructor + * @param {checkin_proto.IAndroidCheckinResponse=} [properties] Properties to set + */ + function AndroidCheckinResponse(properties) { + this.deleteSetting = []; + this.setting = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AndroidCheckinResponse statsOk. + * @member {boolean} statsOk + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.statsOk = false; + + /** + * AndroidCheckinResponse timeMsec. + * @member {Long} timeMsec + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.timeMsec = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AndroidCheckinResponse digest. + * @member {string} digest + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.digest = ""; + + /** + * AndroidCheckinResponse settingsDiff. + * @member {boolean} settingsDiff + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.settingsDiff = false; + + /** + * AndroidCheckinResponse deleteSetting. + * @member {Array.} deleteSetting + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.deleteSetting = $util.emptyArray; + + /** + * AndroidCheckinResponse setting. + * @member {Array.} setting + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.setting = $util.emptyArray; + + /** + * AndroidCheckinResponse marketOk. + * @member {boolean} marketOk + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.marketOk = false; + + /** + * AndroidCheckinResponse androidId. + * @member {Long} androidId + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.androidId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AndroidCheckinResponse securityToken. + * @member {Long} securityToken + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.securityToken = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AndroidCheckinResponse versionInfo. + * @member {string} versionInfo + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + */ + AndroidCheckinResponse.prototype.versionInfo = ""; + + /** + * Creates a new AndroidCheckinResponse instance using the specified properties. + * @function create + * @memberof checkin_proto.AndroidCheckinResponse + * @static + * @param {checkin_proto.IAndroidCheckinResponse=} [properties] Properties to set + * @returns {checkin_proto.AndroidCheckinResponse} AndroidCheckinResponse instance + */ + AndroidCheckinResponse.create = function create(properties) { + return new AndroidCheckinResponse(properties); + }; + + /** + * Encodes the specified AndroidCheckinResponse message. Does not implicitly {@link checkin_proto.AndroidCheckinResponse.verify|verify} messages. + * @function encode + * @memberof checkin_proto.AndroidCheckinResponse + * @static + * @param {checkin_proto.IAndroidCheckinResponse} message AndroidCheckinResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidCheckinResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.statsOk); + if (message.timeMsec != null && Object.hasOwnProperty.call(message, "timeMsec")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timeMsec); + if (message.digest != null && Object.hasOwnProperty.call(message, "digest")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.digest); + if (message.setting != null && message.setting.length) + for (var i = 0; i < message.setting.length; ++i) + $root.checkin_proto.GservicesSetting.encode(message.setting[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.marketOk != null && Object.hasOwnProperty.call(message, "marketOk")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.marketOk); + if (message.androidId != null && Object.hasOwnProperty.call(message, "androidId")) + writer.uint32(/* id 7, wireType 1 =*/57).fixed64(message.androidId); + if (message.securityToken != null && Object.hasOwnProperty.call(message, "securityToken")) + writer.uint32(/* id 8, wireType 1 =*/65).fixed64(message.securityToken); + if (message.settingsDiff != null && Object.hasOwnProperty.call(message, "settingsDiff")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.settingsDiff); + if (message.deleteSetting != null && message.deleteSetting.length) + for (var i = 0; i < message.deleteSetting.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.deleteSetting[i]); + if (message.versionInfo != null && Object.hasOwnProperty.call(message, "versionInfo")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.versionInfo); + return writer; + }; + + /** + * Encodes the specified AndroidCheckinResponse message, length delimited. Does not implicitly {@link checkin_proto.AndroidCheckinResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof checkin_proto.AndroidCheckinResponse + * @static + * @param {checkin_proto.IAndroidCheckinResponse} message AndroidCheckinResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidCheckinResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AndroidCheckinResponse message from the specified reader or buffer. + * @function decode + * @memberof checkin_proto.AndroidCheckinResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {checkin_proto.AndroidCheckinResponse} AndroidCheckinResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidCheckinResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.checkin_proto.AndroidCheckinResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.statsOk = reader.bool(); + break; + } + case 3: { + message.timeMsec = reader.int64(); + break; + } + case 4: { + message.digest = reader.string(); + break; + } + case 9: { + message.settingsDiff = reader.bool(); + break; + } + case 10: { + if (!(message.deleteSetting && message.deleteSetting.length)) + message.deleteSetting = []; + message.deleteSetting.push(reader.string()); + break; + } + case 5: { + if (!(message.setting && message.setting.length)) + message.setting = []; + message.setting.push($root.checkin_proto.GservicesSetting.decode(reader, reader.uint32())); + break; + } + case 6: { + message.marketOk = reader.bool(); + break; + } + case 7: { + message.androidId = reader.fixed64(); + break; + } + case 8: { + message.securityToken = reader.fixed64(); + break; + } + case 11: { + message.versionInfo = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("statsOk")) + throw $util.ProtocolError("missing required 'statsOk'", { instance: message }); + return message; + }; + + /** + * Decodes an AndroidCheckinResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof checkin_proto.AndroidCheckinResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {checkin_proto.AndroidCheckinResponse} AndroidCheckinResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidCheckinResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AndroidCheckinResponse message. + * @function verify + * @memberof checkin_proto.AndroidCheckinResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AndroidCheckinResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (typeof message.statsOk !== "boolean") + return "statsOk: boolean expected"; + if (message.timeMsec != null && message.hasOwnProperty("timeMsec")) + if (!$util.isInteger(message.timeMsec) && !(message.timeMsec && $util.isInteger(message.timeMsec.low) && $util.isInteger(message.timeMsec.high))) + return "timeMsec: integer|Long expected"; + if (message.digest != null && message.hasOwnProperty("digest")) + if (!$util.isString(message.digest)) + return "digest: string expected"; + if (message.settingsDiff != null && message.hasOwnProperty("settingsDiff")) + if (typeof message.settingsDiff !== "boolean") + return "settingsDiff: boolean expected"; + if (message.deleteSetting != null && message.hasOwnProperty("deleteSetting")) { + if (!Array.isArray(message.deleteSetting)) + return "deleteSetting: array expected"; + for (var i = 0; i < message.deleteSetting.length; ++i) + if (!$util.isString(message.deleteSetting[i])) + return "deleteSetting: string[] expected"; + } + if (message.setting != null && message.hasOwnProperty("setting")) { + if (!Array.isArray(message.setting)) + return "setting: array expected"; + for (var i = 0; i < message.setting.length; ++i) { + var error = $root.checkin_proto.GservicesSetting.verify(message.setting[i]); + if (error) + return "setting." + error; + } + } + if (message.marketOk != null && message.hasOwnProperty("marketOk")) + if (typeof message.marketOk !== "boolean") + return "marketOk: boolean expected"; + if (message.androidId != null && message.hasOwnProperty("androidId")) + if (!$util.isInteger(message.androidId) && !(message.androidId && $util.isInteger(message.androidId.low) && $util.isInteger(message.androidId.high))) + return "androidId: integer|Long expected"; + if (message.securityToken != null && message.hasOwnProperty("securityToken")) + if (!$util.isInteger(message.securityToken) && !(message.securityToken && $util.isInteger(message.securityToken.low) && $util.isInteger(message.securityToken.high))) + return "securityToken: integer|Long expected"; + if (message.versionInfo != null && message.hasOwnProperty("versionInfo")) + if (!$util.isString(message.versionInfo)) + return "versionInfo: string expected"; + return null; + }; + + /** + * Creates an AndroidCheckinResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof checkin_proto.AndroidCheckinResponse + * @static + * @param {Object.} object Plain object + * @returns {checkin_proto.AndroidCheckinResponse} AndroidCheckinResponse + */ + AndroidCheckinResponse.fromObject = function fromObject(object) { + if (object instanceof $root.checkin_proto.AndroidCheckinResponse) + return object; + var message = new $root.checkin_proto.AndroidCheckinResponse(); + if (object.statsOk != null) + message.statsOk = Boolean(object.statsOk); + if (object.timeMsec != null) + if ($util.Long) + (message.timeMsec = $util.Long.fromValue(object.timeMsec)).unsigned = false; + else if (typeof object.timeMsec === "string") + message.timeMsec = parseInt(object.timeMsec, 10); + else if (typeof object.timeMsec === "number") + message.timeMsec = object.timeMsec; + else if (typeof object.timeMsec === "object") + message.timeMsec = new $util.LongBits(object.timeMsec.low >>> 0, object.timeMsec.high >>> 0).toNumber(); + if (object.digest != null) + message.digest = String(object.digest); + if (object.settingsDiff != null) + message.settingsDiff = Boolean(object.settingsDiff); + if (object.deleteSetting) { + if (!Array.isArray(object.deleteSetting)) + throw TypeError(".checkin_proto.AndroidCheckinResponse.deleteSetting: array expected"); + message.deleteSetting = []; + for (var i = 0; i < object.deleteSetting.length; ++i) + message.deleteSetting[i] = String(object.deleteSetting[i]); + } + if (object.setting) { + if (!Array.isArray(object.setting)) + throw TypeError(".checkin_proto.AndroidCheckinResponse.setting: array expected"); + message.setting = []; + for (var i = 0; i < object.setting.length; ++i) { + if (typeof object.setting[i] !== "object") + throw TypeError(".checkin_proto.AndroidCheckinResponse.setting: object expected"); + message.setting[i] = $root.checkin_proto.GservicesSetting.fromObject(object.setting[i]); + } + } + if (object.marketOk != null) + message.marketOk = Boolean(object.marketOk); + if (object.androidId != null) + if ($util.Long) + (message.androidId = $util.Long.fromValue(object.androidId)).unsigned = false; + else if (typeof object.androidId === "string") + message.androidId = parseInt(object.androidId, 10); + else if (typeof object.androidId === "number") + message.androidId = object.androidId; + else if (typeof object.androidId === "object") + message.androidId = new $util.LongBits(object.androidId.low >>> 0, object.androidId.high >>> 0).toNumber(); + if (object.securityToken != null) + if ($util.Long) + (message.securityToken = $util.Long.fromValue(object.securityToken)).unsigned = false; + else if (typeof object.securityToken === "string") + message.securityToken = parseInt(object.securityToken, 10); + else if (typeof object.securityToken === "number") + message.securityToken = object.securityToken; + else if (typeof object.securityToken === "object") + message.securityToken = new $util.LongBits(object.securityToken.low >>> 0, object.securityToken.high >>> 0).toNumber(); + if (object.versionInfo != null) + message.versionInfo = String(object.versionInfo); + return message; + }; + + /** + * Creates a plain object from an AndroidCheckinResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof checkin_proto.AndroidCheckinResponse + * @static + * @param {checkin_proto.AndroidCheckinResponse} message AndroidCheckinResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AndroidCheckinResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.setting = []; + object.deleteSetting = []; + } + if (options.defaults) { + object.statsOk = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeMsec = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeMsec = options.longs === String ? "0" : 0; + object.digest = ""; + object.marketOk = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.androidId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.androidId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.securityToken = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.securityToken = options.longs === String ? "0" : 0; + object.settingsDiff = false; + object.versionInfo = ""; + } + if (message.statsOk != null && message.hasOwnProperty("statsOk")) + object.statsOk = message.statsOk; + if (message.timeMsec != null && message.hasOwnProperty("timeMsec")) + if (typeof message.timeMsec === "number") + object.timeMsec = options.longs === String ? String(message.timeMsec) : message.timeMsec; + else + object.timeMsec = options.longs === String ? $util.Long.prototype.toString.call(message.timeMsec) : options.longs === Number ? new $util.LongBits(message.timeMsec.low >>> 0, message.timeMsec.high >>> 0).toNumber() : message.timeMsec; + if (message.digest != null && message.hasOwnProperty("digest")) + object.digest = message.digest; + if (message.setting && message.setting.length) { + object.setting = []; + for (var j = 0; j < message.setting.length; ++j) + object.setting[j] = $root.checkin_proto.GservicesSetting.toObject(message.setting[j], options); + } + if (message.marketOk != null && message.hasOwnProperty("marketOk")) + object.marketOk = message.marketOk; + if (message.androidId != null && message.hasOwnProperty("androidId")) + if (typeof message.androidId === "number") + object.androidId = options.longs === String ? String(message.androidId) : message.androidId; + else + object.androidId = options.longs === String ? $util.Long.prototype.toString.call(message.androidId) : options.longs === Number ? new $util.LongBits(message.androidId.low >>> 0, message.androidId.high >>> 0).toNumber() : message.androidId; + if (message.securityToken != null && message.hasOwnProperty("securityToken")) + if (typeof message.securityToken === "number") + object.securityToken = options.longs === String ? String(message.securityToken) : message.securityToken; + else + object.securityToken = options.longs === String ? $util.Long.prototype.toString.call(message.securityToken) : options.longs === Number ? new $util.LongBits(message.securityToken.low >>> 0, message.securityToken.high >>> 0).toNumber() : message.securityToken; + if (message.settingsDiff != null && message.hasOwnProperty("settingsDiff")) + object.settingsDiff = message.settingsDiff; + if (message.deleteSetting && message.deleteSetting.length) { + object.deleteSetting = []; + for (var j = 0; j < message.deleteSetting.length; ++j) + object.deleteSetting[j] = message.deleteSetting[j]; + } + if (message.versionInfo != null && message.hasOwnProperty("versionInfo")) + object.versionInfo = message.versionInfo; + return object; + }; + + /** + * Converts this AndroidCheckinResponse to JSON. + * @function toJSON + * @memberof checkin_proto.AndroidCheckinResponse + * @instance + * @returns {Object.} JSON object + */ + AndroidCheckinResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AndroidCheckinResponse + * @function getTypeUrl + * @memberof checkin_proto.AndroidCheckinResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AndroidCheckinResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/checkin_proto.AndroidCheckinResponse"; + }; + + return AndroidCheckinResponse; + })(); + + return checkin_proto; +})(); + +$root.mcs_proto = (function() { + + /** + * Namespace mcs_proto. + * @exports mcs_proto + * @namespace + */ + var mcs_proto = {}; + + mcs_proto.HeartbeatPing = (function() { + + /** + * Properties of a HeartbeatPing. + * @memberof mcs_proto + * @interface IHeartbeatPing + * @property {number|null} [streamId] HeartbeatPing streamId + * @property {number|null} [lastStreamIdReceived] HeartbeatPing lastStreamIdReceived + * @property {Long|null} [status] HeartbeatPing status + */ + + /** + * Constructs a new HeartbeatPing. + * @memberof mcs_proto + * @classdesc TAG: 0 + * @implements IHeartbeatPing + * @constructor + * @param {mcs_proto.IHeartbeatPing=} [properties] Properties to set + */ + function HeartbeatPing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HeartbeatPing streamId. + * @member {number} streamId + * @memberof mcs_proto.HeartbeatPing + * @instance + */ + HeartbeatPing.prototype.streamId = 0; + + /** + * HeartbeatPing lastStreamIdReceived. + * @member {number} lastStreamIdReceived + * @memberof mcs_proto.HeartbeatPing + * @instance + */ + HeartbeatPing.prototype.lastStreamIdReceived = 0; + + /** + * HeartbeatPing status. + * @member {Long} status + * @memberof mcs_proto.HeartbeatPing + * @instance + */ + HeartbeatPing.prototype.status = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HeartbeatPing instance using the specified properties. + * @function create + * @memberof mcs_proto.HeartbeatPing + * @static + * @param {mcs_proto.IHeartbeatPing=} [properties] Properties to set + * @returns {mcs_proto.HeartbeatPing} HeartbeatPing instance + */ + HeartbeatPing.create = function create(properties) { + return new HeartbeatPing(properties); + }; + + /** + * Encodes the specified HeartbeatPing message. Does not implicitly {@link mcs_proto.HeartbeatPing.verify|verify} messages. + * @function encode + * @memberof mcs_proto.HeartbeatPing + * @static + * @param {mcs_proto.IHeartbeatPing} message HeartbeatPing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatPing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.streamId); + if (message.lastStreamIdReceived != null && Object.hasOwnProperty.call(message, "lastStreamIdReceived")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lastStreamIdReceived); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.status); + return writer; + }; + + /** + * Encodes the specified HeartbeatPing message, length delimited. Does not implicitly {@link mcs_proto.HeartbeatPing.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.HeartbeatPing + * @static + * @param {mcs_proto.IHeartbeatPing} message HeartbeatPing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatPing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HeartbeatPing message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.HeartbeatPing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.HeartbeatPing} HeartbeatPing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatPing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.HeartbeatPing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.streamId = reader.int32(); + break; + } + case 2: { + message.lastStreamIdReceived = reader.int32(); + break; + } + case 3: { + message.status = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HeartbeatPing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.HeartbeatPing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.HeartbeatPing} HeartbeatPing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatPing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HeartbeatPing message. + * @function verify + * @memberof mcs_proto.HeartbeatPing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HeartbeatPing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.streamId != null && message.hasOwnProperty("streamId")) + if (!$util.isInteger(message.streamId)) + return "streamId: integer expected"; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + if (!$util.isInteger(message.lastStreamIdReceived)) + return "lastStreamIdReceived: integer expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status) && !(message.status && $util.isInteger(message.status.low) && $util.isInteger(message.status.high))) + return "status: integer|Long expected"; + return null; + }; + + /** + * Creates a HeartbeatPing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.HeartbeatPing + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.HeartbeatPing} HeartbeatPing + */ + HeartbeatPing.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.HeartbeatPing) + return object; + var message = new $root.mcs_proto.HeartbeatPing(); + if (object.streamId != null) + message.streamId = object.streamId | 0; + if (object.lastStreamIdReceived != null) + message.lastStreamIdReceived = object.lastStreamIdReceived | 0; + if (object.status != null) + if ($util.Long) + (message.status = $util.Long.fromValue(object.status)).unsigned = false; + else if (typeof object.status === "string") + message.status = parseInt(object.status, 10); + else if (typeof object.status === "number") + message.status = object.status; + else if (typeof object.status === "object") + message.status = new $util.LongBits(object.status.low >>> 0, object.status.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a HeartbeatPing message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.HeartbeatPing + * @static + * @param {mcs_proto.HeartbeatPing} message HeartbeatPing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HeartbeatPing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.streamId = 0; + object.lastStreamIdReceived = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.status = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.status = options.longs === String ? "0" : 0; + } + if (message.streamId != null && message.hasOwnProperty("streamId")) + object.streamId = message.streamId; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + object.lastStreamIdReceived = message.lastStreamIdReceived; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status === "number") + object.status = options.longs === String ? String(message.status) : message.status; + else + object.status = options.longs === String ? $util.Long.prototype.toString.call(message.status) : options.longs === Number ? new $util.LongBits(message.status.low >>> 0, message.status.high >>> 0).toNumber() : message.status; + return object; + }; + + /** + * Converts this HeartbeatPing to JSON. + * @function toJSON + * @memberof mcs_proto.HeartbeatPing + * @instance + * @returns {Object.} JSON object + */ + HeartbeatPing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HeartbeatPing + * @function getTypeUrl + * @memberof mcs_proto.HeartbeatPing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HeartbeatPing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.HeartbeatPing"; + }; + + return HeartbeatPing; + })(); + + mcs_proto.HeartbeatAck = (function() { + + /** + * Properties of a HeartbeatAck. + * @memberof mcs_proto + * @interface IHeartbeatAck + * @property {number|null} [streamId] HeartbeatAck streamId + * @property {number|null} [lastStreamIdReceived] HeartbeatAck lastStreamIdReceived + * @property {Long|null} [status] HeartbeatAck status + */ + + /** + * Constructs a new HeartbeatAck. + * @memberof mcs_proto + * @classdesc TAG: 1 + * @implements IHeartbeatAck + * @constructor + * @param {mcs_proto.IHeartbeatAck=} [properties] Properties to set + */ + function HeartbeatAck(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HeartbeatAck streamId. + * @member {number} streamId + * @memberof mcs_proto.HeartbeatAck + * @instance + */ + HeartbeatAck.prototype.streamId = 0; + + /** + * HeartbeatAck lastStreamIdReceived. + * @member {number} lastStreamIdReceived + * @memberof mcs_proto.HeartbeatAck + * @instance + */ + HeartbeatAck.prototype.lastStreamIdReceived = 0; + + /** + * HeartbeatAck status. + * @member {Long} status + * @memberof mcs_proto.HeartbeatAck + * @instance + */ + HeartbeatAck.prototype.status = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HeartbeatAck instance using the specified properties. + * @function create + * @memberof mcs_proto.HeartbeatAck + * @static + * @param {mcs_proto.IHeartbeatAck=} [properties] Properties to set + * @returns {mcs_proto.HeartbeatAck} HeartbeatAck instance + */ + HeartbeatAck.create = function create(properties) { + return new HeartbeatAck(properties); + }; + + /** + * Encodes the specified HeartbeatAck message. Does not implicitly {@link mcs_proto.HeartbeatAck.verify|verify} messages. + * @function encode + * @memberof mcs_proto.HeartbeatAck + * @static + * @param {mcs_proto.IHeartbeatAck} message HeartbeatAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatAck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.streamId); + if (message.lastStreamIdReceived != null && Object.hasOwnProperty.call(message, "lastStreamIdReceived")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lastStreamIdReceived); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.status); + return writer; + }; + + /** + * Encodes the specified HeartbeatAck message, length delimited. Does not implicitly {@link mcs_proto.HeartbeatAck.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.HeartbeatAck + * @static + * @param {mcs_proto.IHeartbeatAck} message HeartbeatAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatAck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HeartbeatAck message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.HeartbeatAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.HeartbeatAck} HeartbeatAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatAck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.HeartbeatAck(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.streamId = reader.int32(); + break; + } + case 2: { + message.lastStreamIdReceived = reader.int32(); + break; + } + case 3: { + message.status = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HeartbeatAck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.HeartbeatAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.HeartbeatAck} HeartbeatAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatAck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HeartbeatAck message. + * @function verify + * @memberof mcs_proto.HeartbeatAck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HeartbeatAck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.streamId != null && message.hasOwnProperty("streamId")) + if (!$util.isInteger(message.streamId)) + return "streamId: integer expected"; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + if (!$util.isInteger(message.lastStreamIdReceived)) + return "lastStreamIdReceived: integer expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status) && !(message.status && $util.isInteger(message.status.low) && $util.isInteger(message.status.high))) + return "status: integer|Long expected"; + return null; + }; + + /** + * Creates a HeartbeatAck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.HeartbeatAck + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.HeartbeatAck} HeartbeatAck + */ + HeartbeatAck.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.HeartbeatAck) + return object; + var message = new $root.mcs_proto.HeartbeatAck(); + if (object.streamId != null) + message.streamId = object.streamId | 0; + if (object.lastStreamIdReceived != null) + message.lastStreamIdReceived = object.lastStreamIdReceived | 0; + if (object.status != null) + if ($util.Long) + (message.status = $util.Long.fromValue(object.status)).unsigned = false; + else if (typeof object.status === "string") + message.status = parseInt(object.status, 10); + else if (typeof object.status === "number") + message.status = object.status; + else if (typeof object.status === "object") + message.status = new $util.LongBits(object.status.low >>> 0, object.status.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a HeartbeatAck message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.HeartbeatAck + * @static + * @param {mcs_proto.HeartbeatAck} message HeartbeatAck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HeartbeatAck.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.streamId = 0; + object.lastStreamIdReceived = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.status = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.status = options.longs === String ? "0" : 0; + } + if (message.streamId != null && message.hasOwnProperty("streamId")) + object.streamId = message.streamId; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + object.lastStreamIdReceived = message.lastStreamIdReceived; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status === "number") + object.status = options.longs === String ? String(message.status) : message.status; + else + object.status = options.longs === String ? $util.Long.prototype.toString.call(message.status) : options.longs === Number ? new $util.LongBits(message.status.low >>> 0, message.status.high >>> 0).toNumber() : message.status; + return object; + }; + + /** + * Converts this HeartbeatAck to JSON. + * @function toJSON + * @memberof mcs_proto.HeartbeatAck + * @instance + * @returns {Object.} JSON object + */ + HeartbeatAck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HeartbeatAck + * @function getTypeUrl + * @memberof mcs_proto.HeartbeatAck + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HeartbeatAck.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.HeartbeatAck"; + }; + + return HeartbeatAck; + })(); + + mcs_proto.ErrorInfo = (function() { + + /** + * Properties of an ErrorInfo. + * @memberof mcs_proto + * @interface IErrorInfo + * @property {number} code ErrorInfo code + * @property {string|null} [message] ErrorInfo message + * @property {string|null} [type] ErrorInfo type + * @property {mcs_proto.IExtension|null} [extension] ErrorInfo extension + */ + + /** + * Constructs a new ErrorInfo. + * @memberof mcs_proto + * @classdesc Represents an ErrorInfo. + * @implements IErrorInfo + * @constructor + * @param {mcs_proto.IErrorInfo=} [properties] Properties to set + */ + function ErrorInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorInfo code. + * @member {number} code + * @memberof mcs_proto.ErrorInfo + * @instance + */ + ErrorInfo.prototype.code = 0; + + /** + * ErrorInfo message. + * @member {string} message + * @memberof mcs_proto.ErrorInfo + * @instance + */ + ErrorInfo.prototype.message = ""; + + /** + * ErrorInfo type. + * @member {string} type + * @memberof mcs_proto.ErrorInfo + * @instance + */ + ErrorInfo.prototype.type = ""; + + /** + * ErrorInfo extension. + * @member {mcs_proto.IExtension|null|undefined} extension + * @memberof mcs_proto.ErrorInfo + * @instance + */ + ErrorInfo.prototype.extension = null; + + /** + * Creates a new ErrorInfo instance using the specified properties. + * @function create + * @memberof mcs_proto.ErrorInfo + * @static + * @param {mcs_proto.IErrorInfo=} [properties] Properties to set + * @returns {mcs_proto.ErrorInfo} ErrorInfo instance + */ + ErrorInfo.create = function create(properties) { + return new ErrorInfo(properties); + }; + + /** + * Encodes the specified ErrorInfo message. Does not implicitly {@link mcs_proto.ErrorInfo.verify|verify} messages. + * @function encode + * @memberof mcs_proto.ErrorInfo + * @static + * @param {mcs_proto.IErrorInfo} message ErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) + $root.mcs_proto.Extension.encode(message.extension, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ErrorInfo message, length delimited. Does not implicitly {@link mcs_proto.ErrorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.ErrorInfo + * @static + * @param {mcs_proto.IErrorInfo} message ErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.ErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.ErrorInfo} ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.ErrorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 4: { + message.extension = $root.mcs_proto.Extension.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("code")) + throw $util.ProtocolError("missing required 'code'", { instance: message }); + return message; + }; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.ErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.ErrorInfo} ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorInfo message. + * @function verify + * @memberof mcs_proto.ErrorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.extension != null && message.hasOwnProperty("extension")) { + var error = $root.mcs_proto.Extension.verify(message.extension); + if (error) + return "extension." + error; + } + return null; + }; + + /** + * Creates an ErrorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.ErrorInfo + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.ErrorInfo} ErrorInfo + */ + ErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.ErrorInfo) + return object; + var message = new $root.mcs_proto.ErrorInfo(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.type != null) + message.type = String(object.type); + if (object.extension != null) { + if (typeof object.extension !== "object") + throw TypeError(".mcs_proto.ErrorInfo.extension: object expected"); + message.extension = $root.mcs_proto.Extension.fromObject(object.extension); + } + return message; + }; + + /** + * Creates a plain object from an ErrorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.ErrorInfo + * @static + * @param {mcs_proto.ErrorInfo} message ErrorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = 0; + object.message = ""; + object.type = ""; + object.extension = null; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.extension != null && message.hasOwnProperty("extension")) + object.extension = $root.mcs_proto.Extension.toObject(message.extension, options); + return object; + }; + + /** + * Converts this ErrorInfo to JSON. + * @function toJSON + * @memberof mcs_proto.ErrorInfo + * @instance + * @returns {Object.} JSON object + */ + ErrorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorInfo + * @function getTypeUrl + * @memberof mcs_proto.ErrorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.ErrorInfo"; + }; + + return ErrorInfo; + })(); + + mcs_proto.Setting = (function() { + + /** + * Properties of a Setting. + * @memberof mcs_proto + * @interface ISetting + * @property {string} name Setting name + * @property {string} value Setting value + */ + + /** + * Constructs a new Setting. + * @memberof mcs_proto + * @classdesc Represents a Setting. + * @implements ISetting + * @constructor + * @param {mcs_proto.ISetting=} [properties] Properties to set + */ + function Setting(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Setting name. + * @member {string} name + * @memberof mcs_proto.Setting + * @instance + */ + Setting.prototype.name = ""; + + /** + * Setting value. + * @member {string} value + * @memberof mcs_proto.Setting + * @instance + */ + Setting.prototype.value = ""; + + /** + * Creates a new Setting instance using the specified properties. + * @function create + * @memberof mcs_proto.Setting + * @static + * @param {mcs_proto.ISetting=} [properties] Properties to set + * @returns {mcs_proto.Setting} Setting instance + */ + Setting.create = function create(properties) { + return new Setting(properties); + }; + + /** + * Encodes the specified Setting message. Does not implicitly {@link mcs_proto.Setting.verify|verify} messages. + * @function encode + * @memberof mcs_proto.Setting + * @static + * @param {mcs_proto.ISetting} message Setting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Setting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified Setting message, length delimited. Does not implicitly {@link mcs_proto.Setting.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.Setting + * @static + * @param {mcs_proto.ISetting} message Setting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Setting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Setting message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.Setting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.Setting} Setting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Setting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.Setting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("name")) + throw $util.ProtocolError("missing required 'name'", { instance: message }); + if (!message.hasOwnProperty("value")) + throw $util.ProtocolError("missing required 'value'", { instance: message }); + return message; + }; + + /** + * Decodes a Setting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.Setting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.Setting} Setting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Setting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Setting message. + * @function verify + * @memberof mcs_proto.Setting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Setting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.name)) + return "name: string expected"; + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a Setting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.Setting + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.Setting} Setting + */ + Setting.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.Setting) + return object; + var message = new $root.mcs_proto.Setting(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a Setting message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.Setting + * @static + * @param {mcs_proto.Setting} message Setting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Setting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.value = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Setting to JSON. + * @function toJSON + * @memberof mcs_proto.Setting + * @instance + * @returns {Object.} JSON object + */ + Setting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Setting + * @function getTypeUrl + * @memberof mcs_proto.Setting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Setting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.Setting"; + }; + + return Setting; + })(); + + mcs_proto.HeartbeatStat = (function() { + + /** + * Properties of a HeartbeatStat. + * @memberof mcs_proto + * @interface IHeartbeatStat + * @property {string} ip HeartbeatStat ip + * @property {boolean} timeout HeartbeatStat timeout + * @property {number} intervalMs HeartbeatStat intervalMs + */ + + /** + * Constructs a new HeartbeatStat. + * @memberof mcs_proto + * @classdesc Represents a HeartbeatStat. + * @implements IHeartbeatStat + * @constructor + * @param {mcs_proto.IHeartbeatStat=} [properties] Properties to set + */ + function HeartbeatStat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HeartbeatStat ip. + * @member {string} ip + * @memberof mcs_proto.HeartbeatStat + * @instance + */ + HeartbeatStat.prototype.ip = ""; + + /** + * HeartbeatStat timeout. + * @member {boolean} timeout + * @memberof mcs_proto.HeartbeatStat + * @instance + */ + HeartbeatStat.prototype.timeout = false; + + /** + * HeartbeatStat intervalMs. + * @member {number} intervalMs + * @memberof mcs_proto.HeartbeatStat + * @instance + */ + HeartbeatStat.prototype.intervalMs = 0; + + /** + * Creates a new HeartbeatStat instance using the specified properties. + * @function create + * @memberof mcs_proto.HeartbeatStat + * @static + * @param {mcs_proto.IHeartbeatStat=} [properties] Properties to set + * @returns {mcs_proto.HeartbeatStat} HeartbeatStat instance + */ + HeartbeatStat.create = function create(properties) { + return new HeartbeatStat(properties); + }; + + /** + * Encodes the specified HeartbeatStat message. Does not implicitly {@link mcs_proto.HeartbeatStat.verify|verify} messages. + * @function encode + * @memberof mcs_proto.HeartbeatStat + * @static + * @param {mcs_proto.IHeartbeatStat} message HeartbeatStat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatStat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ip); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.timeout); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.intervalMs); + return writer; + }; + + /** + * Encodes the specified HeartbeatStat message, length delimited. Does not implicitly {@link mcs_proto.HeartbeatStat.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.HeartbeatStat + * @static + * @param {mcs_proto.IHeartbeatStat} message HeartbeatStat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatStat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HeartbeatStat message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.HeartbeatStat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.HeartbeatStat} HeartbeatStat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatStat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.HeartbeatStat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ip = reader.string(); + break; + } + case 2: { + message.timeout = reader.bool(); + break; + } + case 3: { + message.intervalMs = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("ip")) + throw $util.ProtocolError("missing required 'ip'", { instance: message }); + if (!message.hasOwnProperty("timeout")) + throw $util.ProtocolError("missing required 'timeout'", { instance: message }); + if (!message.hasOwnProperty("intervalMs")) + throw $util.ProtocolError("missing required 'intervalMs'", { instance: message }); + return message; + }; + + /** + * Decodes a HeartbeatStat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.HeartbeatStat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.HeartbeatStat} HeartbeatStat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatStat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HeartbeatStat message. + * @function verify + * @memberof mcs_proto.HeartbeatStat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HeartbeatStat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.ip)) + return "ip: string expected"; + if (typeof message.timeout !== "boolean") + return "timeout: boolean expected"; + if (!$util.isInteger(message.intervalMs)) + return "intervalMs: integer expected"; + return null; + }; + + /** + * Creates a HeartbeatStat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.HeartbeatStat + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.HeartbeatStat} HeartbeatStat + */ + HeartbeatStat.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.HeartbeatStat) + return object; + var message = new $root.mcs_proto.HeartbeatStat(); + if (object.ip != null) + message.ip = String(object.ip); + if (object.timeout != null) + message.timeout = Boolean(object.timeout); + if (object.intervalMs != null) + message.intervalMs = object.intervalMs | 0; + return message; + }; + + /** + * Creates a plain object from a HeartbeatStat message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.HeartbeatStat + * @static + * @param {mcs_proto.HeartbeatStat} message HeartbeatStat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HeartbeatStat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ip = ""; + object.timeout = false; + object.intervalMs = 0; + } + if (message.ip != null && message.hasOwnProperty("ip")) + object.ip = message.ip; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = message.timeout; + if (message.intervalMs != null && message.hasOwnProperty("intervalMs")) + object.intervalMs = message.intervalMs; + return object; + }; + + /** + * Converts this HeartbeatStat to JSON. + * @function toJSON + * @memberof mcs_proto.HeartbeatStat + * @instance + * @returns {Object.} JSON object + */ + HeartbeatStat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HeartbeatStat + * @function getTypeUrl + * @memberof mcs_proto.HeartbeatStat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HeartbeatStat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.HeartbeatStat"; + }; + + return HeartbeatStat; + })(); + + mcs_proto.HeartbeatConfig = (function() { + + /** + * Properties of a HeartbeatConfig. + * @memberof mcs_proto + * @interface IHeartbeatConfig + * @property {boolean|null} [uploadStat] HeartbeatConfig uploadStat + * @property {string|null} [ip] HeartbeatConfig ip + * @property {number|null} [intervalMs] HeartbeatConfig intervalMs + */ + + /** + * Constructs a new HeartbeatConfig. + * @memberof mcs_proto + * @classdesc Represents a HeartbeatConfig. + * @implements IHeartbeatConfig + * @constructor + * @param {mcs_proto.IHeartbeatConfig=} [properties] Properties to set + */ + function HeartbeatConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HeartbeatConfig uploadStat. + * @member {boolean} uploadStat + * @memberof mcs_proto.HeartbeatConfig + * @instance + */ + HeartbeatConfig.prototype.uploadStat = false; + + /** + * HeartbeatConfig ip. + * @member {string} ip + * @memberof mcs_proto.HeartbeatConfig + * @instance + */ + HeartbeatConfig.prototype.ip = ""; + + /** + * HeartbeatConfig intervalMs. + * @member {number} intervalMs + * @memberof mcs_proto.HeartbeatConfig + * @instance + */ + HeartbeatConfig.prototype.intervalMs = 0; + + /** + * Creates a new HeartbeatConfig instance using the specified properties. + * @function create + * @memberof mcs_proto.HeartbeatConfig + * @static + * @param {mcs_proto.IHeartbeatConfig=} [properties] Properties to set + * @returns {mcs_proto.HeartbeatConfig} HeartbeatConfig instance + */ + HeartbeatConfig.create = function create(properties) { + return new HeartbeatConfig(properties); + }; + + /** + * Encodes the specified HeartbeatConfig message. Does not implicitly {@link mcs_proto.HeartbeatConfig.verify|verify} messages. + * @function encode + * @memberof mcs_proto.HeartbeatConfig + * @static + * @param {mcs_proto.IHeartbeatConfig} message HeartbeatConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uploadStat != null && Object.hasOwnProperty.call(message, "uploadStat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.uploadStat); + if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ip); + if (message.intervalMs != null && Object.hasOwnProperty.call(message, "intervalMs")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.intervalMs); + return writer; + }; + + /** + * Encodes the specified HeartbeatConfig message, length delimited. Does not implicitly {@link mcs_proto.HeartbeatConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.HeartbeatConfig + * @static + * @param {mcs_proto.IHeartbeatConfig} message HeartbeatConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeartbeatConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HeartbeatConfig message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.HeartbeatConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.HeartbeatConfig} HeartbeatConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.HeartbeatConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uploadStat = reader.bool(); + break; + } + case 2: { + message.ip = reader.string(); + break; + } + case 3: { + message.intervalMs = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HeartbeatConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.HeartbeatConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.HeartbeatConfig} HeartbeatConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HeartbeatConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HeartbeatConfig message. + * @function verify + * @memberof mcs_proto.HeartbeatConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HeartbeatConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uploadStat != null && message.hasOwnProperty("uploadStat")) + if (typeof message.uploadStat !== "boolean") + return "uploadStat: boolean expected"; + if (message.ip != null && message.hasOwnProperty("ip")) + if (!$util.isString(message.ip)) + return "ip: string expected"; + if (message.intervalMs != null && message.hasOwnProperty("intervalMs")) + if (!$util.isInteger(message.intervalMs)) + return "intervalMs: integer expected"; + return null; + }; + + /** + * Creates a HeartbeatConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.HeartbeatConfig + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.HeartbeatConfig} HeartbeatConfig + */ + HeartbeatConfig.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.HeartbeatConfig) + return object; + var message = new $root.mcs_proto.HeartbeatConfig(); + if (object.uploadStat != null) + message.uploadStat = Boolean(object.uploadStat); + if (object.ip != null) + message.ip = String(object.ip); + if (object.intervalMs != null) + message.intervalMs = object.intervalMs | 0; + return message; + }; + + /** + * Creates a plain object from a HeartbeatConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.HeartbeatConfig + * @static + * @param {mcs_proto.HeartbeatConfig} message HeartbeatConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HeartbeatConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uploadStat = false; + object.ip = ""; + object.intervalMs = 0; + } + if (message.uploadStat != null && message.hasOwnProperty("uploadStat")) + object.uploadStat = message.uploadStat; + if (message.ip != null && message.hasOwnProperty("ip")) + object.ip = message.ip; + if (message.intervalMs != null && message.hasOwnProperty("intervalMs")) + object.intervalMs = message.intervalMs; + return object; + }; + + /** + * Converts this HeartbeatConfig to JSON. + * @function toJSON + * @memberof mcs_proto.HeartbeatConfig + * @instance + * @returns {Object.} JSON object + */ + HeartbeatConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HeartbeatConfig + * @function getTypeUrl + * @memberof mcs_proto.HeartbeatConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HeartbeatConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.HeartbeatConfig"; + }; + + return HeartbeatConfig; + })(); + + mcs_proto.ClientEvent = (function() { + + /** + * Properties of a ClientEvent. + * @memberof mcs_proto + * @interface IClientEvent + * @property {mcs_proto.ClientEvent.Type|null} [type] ClientEvent type + * @property {number|null} [numberDiscardedEvents] ClientEvent numberDiscardedEvents + * @property {number|null} [networkType] ClientEvent networkType + * @property {Long|null} [timeConnectionStartedMs] ClientEvent timeConnectionStartedMs + * @property {Long|null} [timeConnectionEndedMs] ClientEvent timeConnectionEndedMs + * @property {number|null} [errorCode] ClientEvent errorCode + * @property {Long|null} [timeConnectionEstablishedMs] ClientEvent timeConnectionEstablishedMs + */ + + /** + * Constructs a new ClientEvent. + * @memberof mcs_proto + * @classdesc Represents a ClientEvent. + * @implements IClientEvent + * @constructor + * @param {mcs_proto.IClientEvent=} [properties] Properties to set + */ + function ClientEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientEvent type. + * @member {mcs_proto.ClientEvent.Type} type + * @memberof mcs_proto.ClientEvent + * @instance + */ + ClientEvent.prototype.type = 0; + + /** + * ClientEvent numberDiscardedEvents. + * @member {number} numberDiscardedEvents + * @memberof mcs_proto.ClientEvent + * @instance + */ + ClientEvent.prototype.numberDiscardedEvents = 0; + + /** + * ClientEvent networkType. + * @member {number} networkType + * @memberof mcs_proto.ClientEvent + * @instance + */ + ClientEvent.prototype.networkType = 0; + + /** + * ClientEvent timeConnectionStartedMs. + * @member {Long} timeConnectionStartedMs + * @memberof mcs_proto.ClientEvent + * @instance + */ + ClientEvent.prototype.timeConnectionStartedMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ClientEvent timeConnectionEndedMs. + * @member {Long} timeConnectionEndedMs + * @memberof mcs_proto.ClientEvent + * @instance + */ + ClientEvent.prototype.timeConnectionEndedMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ClientEvent errorCode. + * @member {number} errorCode + * @memberof mcs_proto.ClientEvent + * @instance + */ + ClientEvent.prototype.errorCode = 0; + + /** + * ClientEvent timeConnectionEstablishedMs. + * @member {Long} timeConnectionEstablishedMs + * @memberof mcs_proto.ClientEvent + * @instance + */ + ClientEvent.prototype.timeConnectionEstablishedMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new ClientEvent instance using the specified properties. + * @function create + * @memberof mcs_proto.ClientEvent + * @static + * @param {mcs_proto.IClientEvent=} [properties] Properties to set + * @returns {mcs_proto.ClientEvent} ClientEvent instance + */ + ClientEvent.create = function create(properties) { + return new ClientEvent(properties); + }; + + /** + * Encodes the specified ClientEvent message. Does not implicitly {@link mcs_proto.ClientEvent.verify|verify} messages. + * @function encode + * @memberof mcs_proto.ClientEvent + * @static + * @param {mcs_proto.IClientEvent} message ClientEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.numberDiscardedEvents != null && Object.hasOwnProperty.call(message, "numberDiscardedEvents")) + writer.uint32(/* id 100, wireType 0 =*/800).uint32(message.numberDiscardedEvents); + if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) + writer.uint32(/* id 200, wireType 0 =*/1600).int32(message.networkType); + if (message.timeConnectionStartedMs != null && Object.hasOwnProperty.call(message, "timeConnectionStartedMs")) + writer.uint32(/* id 202, wireType 0 =*/1616).uint64(message.timeConnectionStartedMs); + if (message.timeConnectionEndedMs != null && Object.hasOwnProperty.call(message, "timeConnectionEndedMs")) + writer.uint32(/* id 203, wireType 0 =*/1624).uint64(message.timeConnectionEndedMs); + if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) + writer.uint32(/* id 204, wireType 0 =*/1632).int32(message.errorCode); + if (message.timeConnectionEstablishedMs != null && Object.hasOwnProperty.call(message, "timeConnectionEstablishedMs")) + writer.uint32(/* id 300, wireType 0 =*/2400).uint64(message.timeConnectionEstablishedMs); + return writer; + }; + + /** + * Encodes the specified ClientEvent message, length delimited. Does not implicitly {@link mcs_proto.ClientEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.ClientEvent + * @static + * @param {mcs_proto.IClientEvent} message ClientEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientEvent message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.ClientEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.ClientEvent} ClientEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.ClientEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 100: { + message.numberDiscardedEvents = reader.uint32(); + break; + } + case 200: { + message.networkType = reader.int32(); + break; + } + case 202: { + message.timeConnectionStartedMs = reader.uint64(); + break; + } + case 203: { + message.timeConnectionEndedMs = reader.uint64(); + break; + } + case 204: { + message.errorCode = reader.int32(); + break; + } + case 300: { + message.timeConnectionEstablishedMs = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.ClientEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.ClientEvent} ClientEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientEvent message. + * @function verify + * @memberof mcs_proto.ClientEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.numberDiscardedEvents != null && message.hasOwnProperty("numberDiscardedEvents")) + if (!$util.isInteger(message.numberDiscardedEvents)) + return "numberDiscardedEvents: integer expected"; + if (message.networkType != null && message.hasOwnProperty("networkType")) + if (!$util.isInteger(message.networkType)) + return "networkType: integer expected"; + if (message.timeConnectionStartedMs != null && message.hasOwnProperty("timeConnectionStartedMs")) + if (!$util.isInteger(message.timeConnectionStartedMs) && !(message.timeConnectionStartedMs && $util.isInteger(message.timeConnectionStartedMs.low) && $util.isInteger(message.timeConnectionStartedMs.high))) + return "timeConnectionStartedMs: integer|Long expected"; + if (message.timeConnectionEndedMs != null && message.hasOwnProperty("timeConnectionEndedMs")) + if (!$util.isInteger(message.timeConnectionEndedMs) && !(message.timeConnectionEndedMs && $util.isInteger(message.timeConnectionEndedMs.low) && $util.isInteger(message.timeConnectionEndedMs.high))) + return "timeConnectionEndedMs: integer|Long expected"; + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + if (!$util.isInteger(message.errorCode)) + return "errorCode: integer expected"; + if (message.timeConnectionEstablishedMs != null && message.hasOwnProperty("timeConnectionEstablishedMs")) + if (!$util.isInteger(message.timeConnectionEstablishedMs) && !(message.timeConnectionEstablishedMs && $util.isInteger(message.timeConnectionEstablishedMs.low) && $util.isInteger(message.timeConnectionEstablishedMs.high))) + return "timeConnectionEstablishedMs: integer|Long expected"; + return null; + }; + + /** + * Creates a ClientEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.ClientEvent + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.ClientEvent} ClientEvent + */ + ClientEvent.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.ClientEvent) + return object; + var message = new $root.mcs_proto.ClientEvent(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "DISCARDED_EVENTS": + case 1: + message.type = 1; + break; + case "FAILED_CONNECTION": + case 2: + message.type = 2; + break; + case "SUCCESSFUL_CONNECTION": + case 3: + message.type = 3; + break; + } + if (object.numberDiscardedEvents != null) + message.numberDiscardedEvents = object.numberDiscardedEvents >>> 0; + if (object.networkType != null) + message.networkType = object.networkType | 0; + if (object.timeConnectionStartedMs != null) + if ($util.Long) + (message.timeConnectionStartedMs = $util.Long.fromValue(object.timeConnectionStartedMs)).unsigned = true; + else if (typeof object.timeConnectionStartedMs === "string") + message.timeConnectionStartedMs = parseInt(object.timeConnectionStartedMs, 10); + else if (typeof object.timeConnectionStartedMs === "number") + message.timeConnectionStartedMs = object.timeConnectionStartedMs; + else if (typeof object.timeConnectionStartedMs === "object") + message.timeConnectionStartedMs = new $util.LongBits(object.timeConnectionStartedMs.low >>> 0, object.timeConnectionStartedMs.high >>> 0).toNumber(true); + if (object.timeConnectionEndedMs != null) + if ($util.Long) + (message.timeConnectionEndedMs = $util.Long.fromValue(object.timeConnectionEndedMs)).unsigned = true; + else if (typeof object.timeConnectionEndedMs === "string") + message.timeConnectionEndedMs = parseInt(object.timeConnectionEndedMs, 10); + else if (typeof object.timeConnectionEndedMs === "number") + message.timeConnectionEndedMs = object.timeConnectionEndedMs; + else if (typeof object.timeConnectionEndedMs === "object") + message.timeConnectionEndedMs = new $util.LongBits(object.timeConnectionEndedMs.low >>> 0, object.timeConnectionEndedMs.high >>> 0).toNumber(true); + if (object.errorCode != null) + message.errorCode = object.errorCode | 0; + if (object.timeConnectionEstablishedMs != null) + if ($util.Long) + (message.timeConnectionEstablishedMs = $util.Long.fromValue(object.timeConnectionEstablishedMs)).unsigned = true; + else if (typeof object.timeConnectionEstablishedMs === "string") + message.timeConnectionEstablishedMs = parseInt(object.timeConnectionEstablishedMs, 10); + else if (typeof object.timeConnectionEstablishedMs === "number") + message.timeConnectionEstablishedMs = object.timeConnectionEstablishedMs; + else if (typeof object.timeConnectionEstablishedMs === "object") + message.timeConnectionEstablishedMs = new $util.LongBits(object.timeConnectionEstablishedMs.low >>> 0, object.timeConnectionEstablishedMs.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ClientEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.ClientEvent + * @static + * @param {mcs_proto.ClientEvent} message ClientEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "UNKNOWN" : 0; + object.numberDiscardedEvents = 0; + object.networkType = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeConnectionStartedMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeConnectionStartedMs = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeConnectionEndedMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeConnectionEndedMs = options.longs === String ? "0" : 0; + object.errorCode = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeConnectionEstablishedMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeConnectionEstablishedMs = options.longs === String ? "0" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.mcs_proto.ClientEvent.Type[message.type] === undefined ? message.type : $root.mcs_proto.ClientEvent.Type[message.type] : message.type; + if (message.numberDiscardedEvents != null && message.hasOwnProperty("numberDiscardedEvents")) + object.numberDiscardedEvents = message.numberDiscardedEvents; + if (message.networkType != null && message.hasOwnProperty("networkType")) + object.networkType = message.networkType; + if (message.timeConnectionStartedMs != null && message.hasOwnProperty("timeConnectionStartedMs")) + if (typeof message.timeConnectionStartedMs === "number") + object.timeConnectionStartedMs = options.longs === String ? String(message.timeConnectionStartedMs) : message.timeConnectionStartedMs; + else + object.timeConnectionStartedMs = options.longs === String ? $util.Long.prototype.toString.call(message.timeConnectionStartedMs) : options.longs === Number ? new $util.LongBits(message.timeConnectionStartedMs.low >>> 0, message.timeConnectionStartedMs.high >>> 0).toNumber(true) : message.timeConnectionStartedMs; + if (message.timeConnectionEndedMs != null && message.hasOwnProperty("timeConnectionEndedMs")) + if (typeof message.timeConnectionEndedMs === "number") + object.timeConnectionEndedMs = options.longs === String ? String(message.timeConnectionEndedMs) : message.timeConnectionEndedMs; + else + object.timeConnectionEndedMs = options.longs === String ? $util.Long.prototype.toString.call(message.timeConnectionEndedMs) : options.longs === Number ? new $util.LongBits(message.timeConnectionEndedMs.low >>> 0, message.timeConnectionEndedMs.high >>> 0).toNumber(true) : message.timeConnectionEndedMs; + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + object.errorCode = message.errorCode; + if (message.timeConnectionEstablishedMs != null && message.hasOwnProperty("timeConnectionEstablishedMs")) + if (typeof message.timeConnectionEstablishedMs === "number") + object.timeConnectionEstablishedMs = options.longs === String ? String(message.timeConnectionEstablishedMs) : message.timeConnectionEstablishedMs; + else + object.timeConnectionEstablishedMs = options.longs === String ? $util.Long.prototype.toString.call(message.timeConnectionEstablishedMs) : options.longs === Number ? new $util.LongBits(message.timeConnectionEstablishedMs.low >>> 0, message.timeConnectionEstablishedMs.high >>> 0).toNumber(true) : message.timeConnectionEstablishedMs; + return object; + }; + + /** + * Converts this ClientEvent to JSON. + * @function toJSON + * @memberof mcs_proto.ClientEvent + * @instance + * @returns {Object.} JSON object + */ + ClientEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientEvent + * @function getTypeUrl + * @memberof mcs_proto.ClientEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.ClientEvent"; + }; + + /** + * Type enum. + * @name mcs_proto.ClientEvent.Type + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} DISCARDED_EVENTS=1 DISCARDED_EVENTS value + * @property {number} FAILED_CONNECTION=2 FAILED_CONNECTION value + * @property {number} SUCCESSFUL_CONNECTION=3 SUCCESSFUL_CONNECTION value + */ + ClientEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "DISCARDED_EVENTS"] = 1; + values[valuesById[2] = "FAILED_CONNECTION"] = 2; + values[valuesById[3] = "SUCCESSFUL_CONNECTION"] = 3; + return values; + })(); + + return ClientEvent; + })(); + + mcs_proto.LoginRequest = (function() { + + /** + * Properties of a LoginRequest. + * @memberof mcs_proto + * @interface ILoginRequest + * @property {string} id LoginRequest id + * @property {string} domain LoginRequest domain + * @property {string} user LoginRequest user + * @property {string} resource LoginRequest resource + * @property {string} authToken LoginRequest authToken + * @property {string|null} [deviceId] LoginRequest deviceId + * @property {Long|null} [lastRmqId] LoginRequest lastRmqId + * @property {Array.|null} [setting] LoginRequest setting + * @property {Array.|null} [receivedPersistentId] LoginRequest receivedPersistentId + * @property {boolean|null} [adaptiveHeartbeat] LoginRequest adaptiveHeartbeat + * @property {mcs_proto.IHeartbeatStat|null} [heartbeatStat] LoginRequest heartbeatStat + * @property {boolean|null} [useRmq2] LoginRequest useRmq2 + * @property {Long|null} [accountId] LoginRequest accountId + * @property {mcs_proto.LoginRequest.AuthService|null} [authService] LoginRequest authService + * @property {number|null} [networkType] LoginRequest networkType + * @property {Long|null} [status] LoginRequest status + * @property {Array.|null} [clientEvent] LoginRequest clientEvent + */ + + /** + * Constructs a new LoginRequest. + * @memberof mcs_proto + * @classdesc TAG: 2 + * @implements ILoginRequest + * @constructor + * @param {mcs_proto.ILoginRequest=} [properties] Properties to set + */ + function LoginRequest(properties) { + this.setting = []; + this.receivedPersistentId = []; + this.clientEvent = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoginRequest id. + * @member {string} id + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.id = ""; + + /** + * LoginRequest domain. + * @member {string} domain + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.domain = ""; + + /** + * LoginRequest user. + * @member {string} user + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.user = ""; + + /** + * LoginRequest resource. + * @member {string} resource + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.resource = ""; + + /** + * LoginRequest authToken. + * @member {string} authToken + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.authToken = ""; + + /** + * LoginRequest deviceId. + * @member {string} deviceId + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.deviceId = ""; + + /** + * LoginRequest lastRmqId. + * @member {Long} lastRmqId + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.lastRmqId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LoginRequest setting. + * @member {Array.} setting + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.setting = $util.emptyArray; + + /** + * LoginRequest receivedPersistentId. + * @member {Array.} receivedPersistentId + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.receivedPersistentId = $util.emptyArray; + + /** + * LoginRequest adaptiveHeartbeat. + * @member {boolean} adaptiveHeartbeat + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.adaptiveHeartbeat = false; + + /** + * LoginRequest heartbeatStat. + * @member {mcs_proto.IHeartbeatStat|null|undefined} heartbeatStat + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.heartbeatStat = null; + + /** + * LoginRequest useRmq2. + * @member {boolean} useRmq2 + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.useRmq2 = false; + + /** + * LoginRequest accountId. + * @member {Long} accountId + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.accountId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LoginRequest authService. + * @member {mcs_proto.LoginRequest.AuthService} authService + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.authService = 2; + + /** + * LoginRequest networkType. + * @member {number} networkType + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.networkType = 0; + + /** + * LoginRequest status. + * @member {Long} status + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.status = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LoginRequest clientEvent. + * @member {Array.} clientEvent + * @memberof mcs_proto.LoginRequest + * @instance + */ + LoginRequest.prototype.clientEvent = $util.emptyArray; + + /** + * Creates a new LoginRequest instance using the specified properties. + * @function create + * @memberof mcs_proto.LoginRequest + * @static + * @param {mcs_proto.ILoginRequest=} [properties] Properties to set + * @returns {mcs_proto.LoginRequest} LoginRequest instance + */ + LoginRequest.create = function create(properties) { + return new LoginRequest(properties); + }; + + /** + * Encodes the specified LoginRequest message. Does not implicitly {@link mcs_proto.LoginRequest.verify|verify} messages. + * @function encode + * @memberof mcs_proto.LoginRequest + * @static + * @param {mcs_proto.ILoginRequest} message LoginRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoginRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.domain); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.user); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resource); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.authToken); + if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.deviceId); + if (message.lastRmqId != null && Object.hasOwnProperty.call(message, "lastRmqId")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.lastRmqId); + if (message.setting != null && message.setting.length) + for (var i = 0; i < message.setting.length; ++i) + $root.mcs_proto.Setting.encode(message.setting[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.receivedPersistentId != null && message.receivedPersistentId.length) + for (var i = 0; i < message.receivedPersistentId.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.receivedPersistentId[i]); + if (message.adaptiveHeartbeat != null && Object.hasOwnProperty.call(message, "adaptiveHeartbeat")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.adaptiveHeartbeat); + if (message.heartbeatStat != null && Object.hasOwnProperty.call(message, "heartbeatStat")) + $root.mcs_proto.HeartbeatStat.encode(message.heartbeatStat, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.useRmq2 != null && Object.hasOwnProperty.call(message, "useRmq2")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.useRmq2); + if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) + writer.uint32(/* id 15, wireType 0 =*/120).int64(message.accountId); + if (message.authService != null && Object.hasOwnProperty.call(message, "authService")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.authService); + if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.networkType); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 18, wireType 0 =*/144).int64(message.status); + if (message.clientEvent != null && message.clientEvent.length) + for (var i = 0; i < message.clientEvent.length; ++i) + $root.mcs_proto.ClientEvent.encode(message.clientEvent[i], writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LoginRequest message, length delimited. Does not implicitly {@link mcs_proto.LoginRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.LoginRequest + * @static + * @param {mcs_proto.ILoginRequest} message LoginRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoginRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoginRequest message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.LoginRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.LoginRequest} LoginRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoginRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.LoginRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.domain = reader.string(); + break; + } + case 3: { + message.user = reader.string(); + break; + } + case 4: { + message.resource = reader.string(); + break; + } + case 5: { + message.authToken = reader.string(); + break; + } + case 6: { + message.deviceId = reader.string(); + break; + } + case 7: { + message.lastRmqId = reader.int64(); + break; + } + case 8: { + if (!(message.setting && message.setting.length)) + message.setting = []; + message.setting.push($root.mcs_proto.Setting.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.receivedPersistentId && message.receivedPersistentId.length)) + message.receivedPersistentId = []; + message.receivedPersistentId.push(reader.string()); + break; + } + case 12: { + message.adaptiveHeartbeat = reader.bool(); + break; + } + case 13: { + message.heartbeatStat = $root.mcs_proto.HeartbeatStat.decode(reader, reader.uint32()); + break; + } + case 14: { + message.useRmq2 = reader.bool(); + break; + } + case 15: { + message.accountId = reader.int64(); + break; + } + case 16: { + message.authService = reader.int32(); + break; + } + case 17: { + message.networkType = reader.int32(); + break; + } + case 18: { + message.status = reader.int64(); + break; + } + case 22: { + if (!(message.clientEvent && message.clientEvent.length)) + message.clientEvent = []; + message.clientEvent.push($root.mcs_proto.ClientEvent.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("id")) + throw $util.ProtocolError("missing required 'id'", { instance: message }); + if (!message.hasOwnProperty("domain")) + throw $util.ProtocolError("missing required 'domain'", { instance: message }); + if (!message.hasOwnProperty("user")) + throw $util.ProtocolError("missing required 'user'", { instance: message }); + if (!message.hasOwnProperty("resource")) + throw $util.ProtocolError("missing required 'resource'", { instance: message }); + if (!message.hasOwnProperty("authToken")) + throw $util.ProtocolError("missing required 'authToken'", { instance: message }); + return message; + }; + + /** + * Decodes a LoginRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.LoginRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.LoginRequest} LoginRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoginRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoginRequest message. + * @function verify + * @memberof mcs_proto.LoginRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoginRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.id)) + return "id: string expected"; + if (!$util.isString(message.domain)) + return "domain: string expected"; + if (!$util.isString(message.user)) + return "user: string expected"; + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (!$util.isString(message.authToken)) + return "authToken: string expected"; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + if (!$util.isString(message.deviceId)) + return "deviceId: string expected"; + if (message.lastRmqId != null && message.hasOwnProperty("lastRmqId")) + if (!$util.isInteger(message.lastRmqId) && !(message.lastRmqId && $util.isInteger(message.lastRmqId.low) && $util.isInteger(message.lastRmqId.high))) + return "lastRmqId: integer|Long expected"; + if (message.setting != null && message.hasOwnProperty("setting")) { + if (!Array.isArray(message.setting)) + return "setting: array expected"; + for (var i = 0; i < message.setting.length; ++i) { + var error = $root.mcs_proto.Setting.verify(message.setting[i]); + if (error) + return "setting." + error; + } + } + if (message.receivedPersistentId != null && message.hasOwnProperty("receivedPersistentId")) { + if (!Array.isArray(message.receivedPersistentId)) + return "receivedPersistentId: array expected"; + for (var i = 0; i < message.receivedPersistentId.length; ++i) + if (!$util.isString(message.receivedPersistentId[i])) + return "receivedPersistentId: string[] expected"; + } + if (message.adaptiveHeartbeat != null && message.hasOwnProperty("adaptiveHeartbeat")) + if (typeof message.adaptiveHeartbeat !== "boolean") + return "adaptiveHeartbeat: boolean expected"; + if (message.heartbeatStat != null && message.hasOwnProperty("heartbeatStat")) { + var error = $root.mcs_proto.HeartbeatStat.verify(message.heartbeatStat); + if (error) + return "heartbeatStat." + error; + } + if (message.useRmq2 != null && message.hasOwnProperty("useRmq2")) + if (typeof message.useRmq2 !== "boolean") + return "useRmq2: boolean expected"; + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (!$util.isInteger(message.accountId) && !(message.accountId && $util.isInteger(message.accountId.low) && $util.isInteger(message.accountId.high))) + return "accountId: integer|Long expected"; + if (message.authService != null && message.hasOwnProperty("authService")) + switch (message.authService) { + default: + return "authService: enum value expected"; + case 2: + break; + } + if (message.networkType != null && message.hasOwnProperty("networkType")) + if (!$util.isInteger(message.networkType)) + return "networkType: integer expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status) && !(message.status && $util.isInteger(message.status.low) && $util.isInteger(message.status.high))) + return "status: integer|Long expected"; + if (message.clientEvent != null && message.hasOwnProperty("clientEvent")) { + if (!Array.isArray(message.clientEvent)) + return "clientEvent: array expected"; + for (var i = 0; i < message.clientEvent.length; ++i) { + var error = $root.mcs_proto.ClientEvent.verify(message.clientEvent[i]); + if (error) + return "clientEvent." + error; + } + } + return null; + }; + + /** + * Creates a LoginRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.LoginRequest + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.LoginRequest} LoginRequest + */ + LoginRequest.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.LoginRequest) + return object; + var message = new $root.mcs_proto.LoginRequest(); + if (object.id != null) + message.id = String(object.id); + if (object.domain != null) + message.domain = String(object.domain); + if (object.user != null) + message.user = String(object.user); + if (object.resource != null) + message.resource = String(object.resource); + if (object.authToken != null) + message.authToken = String(object.authToken); + if (object.deviceId != null) + message.deviceId = String(object.deviceId); + if (object.lastRmqId != null) + if ($util.Long) + (message.lastRmqId = $util.Long.fromValue(object.lastRmqId)).unsigned = false; + else if (typeof object.lastRmqId === "string") + message.lastRmqId = parseInt(object.lastRmqId, 10); + else if (typeof object.lastRmqId === "number") + message.lastRmqId = object.lastRmqId; + else if (typeof object.lastRmqId === "object") + message.lastRmqId = new $util.LongBits(object.lastRmqId.low >>> 0, object.lastRmqId.high >>> 0).toNumber(); + if (object.setting) { + if (!Array.isArray(object.setting)) + throw TypeError(".mcs_proto.LoginRequest.setting: array expected"); + message.setting = []; + for (var i = 0; i < object.setting.length; ++i) { + if (typeof object.setting[i] !== "object") + throw TypeError(".mcs_proto.LoginRequest.setting: object expected"); + message.setting[i] = $root.mcs_proto.Setting.fromObject(object.setting[i]); + } + } + if (object.receivedPersistentId) { + if (!Array.isArray(object.receivedPersistentId)) + throw TypeError(".mcs_proto.LoginRequest.receivedPersistentId: array expected"); + message.receivedPersistentId = []; + for (var i = 0; i < object.receivedPersistentId.length; ++i) + message.receivedPersistentId[i] = String(object.receivedPersistentId[i]); + } + if (object.adaptiveHeartbeat != null) + message.adaptiveHeartbeat = Boolean(object.adaptiveHeartbeat); + if (object.heartbeatStat != null) { + if (typeof object.heartbeatStat !== "object") + throw TypeError(".mcs_proto.LoginRequest.heartbeatStat: object expected"); + message.heartbeatStat = $root.mcs_proto.HeartbeatStat.fromObject(object.heartbeatStat); + } + if (object.useRmq2 != null) + message.useRmq2 = Boolean(object.useRmq2); + if (object.accountId != null) + if ($util.Long) + (message.accountId = $util.Long.fromValue(object.accountId)).unsigned = false; + else if (typeof object.accountId === "string") + message.accountId = parseInt(object.accountId, 10); + else if (typeof object.accountId === "number") + message.accountId = object.accountId; + else if (typeof object.accountId === "object") + message.accountId = new $util.LongBits(object.accountId.low >>> 0, object.accountId.high >>> 0).toNumber(); + switch (object.authService) { + default: + if (typeof object.authService === "number") { + message.authService = object.authService; + break; + } + break; + case "ANDROID_ID": + case 2: + message.authService = 2; + break; + } + if (object.networkType != null) + message.networkType = object.networkType | 0; + if (object.status != null) + if ($util.Long) + (message.status = $util.Long.fromValue(object.status)).unsigned = false; + else if (typeof object.status === "string") + message.status = parseInt(object.status, 10); + else if (typeof object.status === "number") + message.status = object.status; + else if (typeof object.status === "object") + message.status = new $util.LongBits(object.status.low >>> 0, object.status.high >>> 0).toNumber(); + if (object.clientEvent) { + if (!Array.isArray(object.clientEvent)) + throw TypeError(".mcs_proto.LoginRequest.clientEvent: array expected"); + message.clientEvent = []; + for (var i = 0; i < object.clientEvent.length; ++i) { + if (typeof object.clientEvent[i] !== "object") + throw TypeError(".mcs_proto.LoginRequest.clientEvent: object expected"); + message.clientEvent[i] = $root.mcs_proto.ClientEvent.fromObject(object.clientEvent[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LoginRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.LoginRequest + * @static + * @param {mcs_proto.LoginRequest} message LoginRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoginRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.setting = []; + object.receivedPersistentId = []; + object.clientEvent = []; + } + if (options.defaults) { + object.id = ""; + object.domain = ""; + object.user = ""; + object.resource = ""; + object.authToken = ""; + object.deviceId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lastRmqId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastRmqId = options.longs === String ? "0" : 0; + object.adaptiveHeartbeat = false; + object.heartbeatStat = null; + object.useRmq2 = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.accountId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountId = options.longs === String ? "0" : 0; + object.authService = options.enums === String ? "ANDROID_ID" : 2; + object.networkType = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.status = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.status = options.longs === String ? "0" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.domain != null && message.hasOwnProperty("domain")) + object.domain = message.domain; + if (message.user != null && message.hasOwnProperty("user")) + object.user = message.user; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.authToken != null && message.hasOwnProperty("authToken")) + object.authToken = message.authToken; + if (message.deviceId != null && message.hasOwnProperty("deviceId")) + object.deviceId = message.deviceId; + if (message.lastRmqId != null && message.hasOwnProperty("lastRmqId")) + if (typeof message.lastRmqId === "number") + object.lastRmqId = options.longs === String ? String(message.lastRmqId) : message.lastRmqId; + else + object.lastRmqId = options.longs === String ? $util.Long.prototype.toString.call(message.lastRmqId) : options.longs === Number ? new $util.LongBits(message.lastRmqId.low >>> 0, message.lastRmqId.high >>> 0).toNumber() : message.lastRmqId; + if (message.setting && message.setting.length) { + object.setting = []; + for (var j = 0; j < message.setting.length; ++j) + object.setting[j] = $root.mcs_proto.Setting.toObject(message.setting[j], options); + } + if (message.receivedPersistentId && message.receivedPersistentId.length) { + object.receivedPersistentId = []; + for (var j = 0; j < message.receivedPersistentId.length; ++j) + object.receivedPersistentId[j] = message.receivedPersistentId[j]; + } + if (message.adaptiveHeartbeat != null && message.hasOwnProperty("adaptiveHeartbeat")) + object.adaptiveHeartbeat = message.adaptiveHeartbeat; + if (message.heartbeatStat != null && message.hasOwnProperty("heartbeatStat")) + object.heartbeatStat = $root.mcs_proto.HeartbeatStat.toObject(message.heartbeatStat, options); + if (message.useRmq2 != null && message.hasOwnProperty("useRmq2")) + object.useRmq2 = message.useRmq2; + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (typeof message.accountId === "number") + object.accountId = options.longs === String ? String(message.accountId) : message.accountId; + else + object.accountId = options.longs === String ? $util.Long.prototype.toString.call(message.accountId) : options.longs === Number ? new $util.LongBits(message.accountId.low >>> 0, message.accountId.high >>> 0).toNumber() : message.accountId; + if (message.authService != null && message.hasOwnProperty("authService")) + object.authService = options.enums === String ? $root.mcs_proto.LoginRequest.AuthService[message.authService] === undefined ? message.authService : $root.mcs_proto.LoginRequest.AuthService[message.authService] : message.authService; + if (message.networkType != null && message.hasOwnProperty("networkType")) + object.networkType = message.networkType; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status === "number") + object.status = options.longs === String ? String(message.status) : message.status; + else + object.status = options.longs === String ? $util.Long.prototype.toString.call(message.status) : options.longs === Number ? new $util.LongBits(message.status.low >>> 0, message.status.high >>> 0).toNumber() : message.status; + if (message.clientEvent && message.clientEvent.length) { + object.clientEvent = []; + for (var j = 0; j < message.clientEvent.length; ++j) + object.clientEvent[j] = $root.mcs_proto.ClientEvent.toObject(message.clientEvent[j], options); + } + return object; + }; + + /** + * Converts this LoginRequest to JSON. + * @function toJSON + * @memberof mcs_proto.LoginRequest + * @instance + * @returns {Object.} JSON object + */ + LoginRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoginRequest + * @function getTypeUrl + * @memberof mcs_proto.LoginRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoginRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.LoginRequest"; + }; + + /** + * AuthService enum. + * @name mcs_proto.LoginRequest.AuthService + * @enum {number} + * @property {number} ANDROID_ID=2 ANDROID_ID value + */ + LoginRequest.AuthService = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[2] = "ANDROID_ID"] = 2; + return values; + })(); + + return LoginRequest; + })(); + + mcs_proto.LoginResponse = (function() { + + /** + * Properties of a LoginResponse. + * @memberof mcs_proto + * @interface ILoginResponse + * @property {string} id LoginResponse id + * @property {string|null} [jid] LoginResponse jid + * @property {mcs_proto.IErrorInfo|null} [error] LoginResponse error + * @property {Array.|null} [setting] LoginResponse setting + * @property {number|null} [streamId] LoginResponse streamId + * @property {number|null} [lastStreamIdReceived] LoginResponse lastStreamIdReceived + * @property {mcs_proto.IHeartbeatConfig|null} [heartbeatConfig] LoginResponse heartbeatConfig + * @property {Long|null} [serverTimestamp] LoginResponse serverTimestamp + */ + + /** + * Constructs a new LoginResponse. + * @memberof mcs_proto + * @classdesc TAG: 3 + * @implements ILoginResponse + * @constructor + * @param {mcs_proto.ILoginResponse=} [properties] Properties to set + */ + function LoginResponse(properties) { + this.setting = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoginResponse id. + * @member {string} id + * @memberof mcs_proto.LoginResponse + * @instance + */ + LoginResponse.prototype.id = ""; + + /** + * LoginResponse jid. + * @member {string} jid + * @memberof mcs_proto.LoginResponse + * @instance + */ + LoginResponse.prototype.jid = ""; + + /** + * LoginResponse error. + * @member {mcs_proto.IErrorInfo|null|undefined} error + * @memberof mcs_proto.LoginResponse + * @instance + */ + LoginResponse.prototype.error = null; + + /** + * LoginResponse setting. + * @member {Array.} setting + * @memberof mcs_proto.LoginResponse + * @instance + */ + LoginResponse.prototype.setting = $util.emptyArray; + + /** + * LoginResponse streamId. + * @member {number} streamId + * @memberof mcs_proto.LoginResponse + * @instance + */ + LoginResponse.prototype.streamId = 0; + + /** + * LoginResponse lastStreamIdReceived. + * @member {number} lastStreamIdReceived + * @memberof mcs_proto.LoginResponse + * @instance + */ + LoginResponse.prototype.lastStreamIdReceived = 0; + + /** + * LoginResponse heartbeatConfig. + * @member {mcs_proto.IHeartbeatConfig|null|undefined} heartbeatConfig + * @memberof mcs_proto.LoginResponse + * @instance + */ + LoginResponse.prototype.heartbeatConfig = null; + + /** + * LoginResponse serverTimestamp. + * @member {Long} serverTimestamp + * @memberof mcs_proto.LoginResponse + * @instance + */ + LoginResponse.prototype.serverTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LoginResponse instance using the specified properties. + * @function create + * @memberof mcs_proto.LoginResponse + * @static + * @param {mcs_proto.ILoginResponse=} [properties] Properties to set + * @returns {mcs_proto.LoginResponse} LoginResponse instance + */ + LoginResponse.create = function create(properties) { + return new LoginResponse(properties); + }; + + /** + * Encodes the specified LoginResponse message. Does not implicitly {@link mcs_proto.LoginResponse.verify|verify} messages. + * @function encode + * @memberof mcs_proto.LoginResponse + * @static + * @param {mcs_proto.ILoginResponse} message LoginResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoginResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.jid != null && Object.hasOwnProperty.call(message, "jid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jid); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.mcs_proto.ErrorInfo.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.setting != null && message.setting.length) + for (var i = 0; i < message.setting.length; ++i) + $root.mcs_proto.Setting.encode(message.setting[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.streamId); + if (message.lastStreamIdReceived != null && Object.hasOwnProperty.call(message, "lastStreamIdReceived")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.lastStreamIdReceived); + if (message.heartbeatConfig != null && Object.hasOwnProperty.call(message, "heartbeatConfig")) + $root.mcs_proto.HeartbeatConfig.encode(message.heartbeatConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.serverTimestamp != null && Object.hasOwnProperty.call(message, "serverTimestamp")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.serverTimestamp); + return writer; + }; + + /** + * Encodes the specified LoginResponse message, length delimited. Does not implicitly {@link mcs_proto.LoginResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.LoginResponse + * @static + * @param {mcs_proto.ILoginResponse} message LoginResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoginResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoginResponse message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.LoginResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.LoginResponse} LoginResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoginResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.LoginResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.jid = reader.string(); + break; + } + case 3: { + message.error = $root.mcs_proto.ErrorInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.setting && message.setting.length)) + message.setting = []; + message.setting.push($root.mcs_proto.Setting.decode(reader, reader.uint32())); + break; + } + case 5: { + message.streamId = reader.int32(); + break; + } + case 6: { + message.lastStreamIdReceived = reader.int32(); + break; + } + case 7: { + message.heartbeatConfig = $root.mcs_proto.HeartbeatConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.serverTimestamp = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("id")) + throw $util.ProtocolError("missing required 'id'", { instance: message }); + return message; + }; + + /** + * Decodes a LoginResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.LoginResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.LoginResponse} LoginResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoginResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoginResponse message. + * @function verify + * @memberof mcs_proto.LoginResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoginResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.jid != null && message.hasOwnProperty("jid")) + if (!$util.isString(message.jid)) + return "jid: string expected"; + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.mcs_proto.ErrorInfo.verify(message.error); + if (error) + return "error." + error; + } + if (message.setting != null && message.hasOwnProperty("setting")) { + if (!Array.isArray(message.setting)) + return "setting: array expected"; + for (var i = 0; i < message.setting.length; ++i) { + var error = $root.mcs_proto.Setting.verify(message.setting[i]); + if (error) + return "setting." + error; + } + } + if (message.streamId != null && message.hasOwnProperty("streamId")) + if (!$util.isInteger(message.streamId)) + return "streamId: integer expected"; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + if (!$util.isInteger(message.lastStreamIdReceived)) + return "lastStreamIdReceived: integer expected"; + if (message.heartbeatConfig != null && message.hasOwnProperty("heartbeatConfig")) { + var error = $root.mcs_proto.HeartbeatConfig.verify(message.heartbeatConfig); + if (error) + return "heartbeatConfig." + error; + } + if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) + if (!$util.isInteger(message.serverTimestamp) && !(message.serverTimestamp && $util.isInteger(message.serverTimestamp.low) && $util.isInteger(message.serverTimestamp.high))) + return "serverTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a LoginResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.LoginResponse + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.LoginResponse} LoginResponse + */ + LoginResponse.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.LoginResponse) + return object; + var message = new $root.mcs_proto.LoginResponse(); + if (object.id != null) + message.id = String(object.id); + if (object.jid != null) + message.jid = String(object.jid); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".mcs_proto.LoginResponse.error: object expected"); + message.error = $root.mcs_proto.ErrorInfo.fromObject(object.error); + } + if (object.setting) { + if (!Array.isArray(object.setting)) + throw TypeError(".mcs_proto.LoginResponse.setting: array expected"); + message.setting = []; + for (var i = 0; i < object.setting.length; ++i) { + if (typeof object.setting[i] !== "object") + throw TypeError(".mcs_proto.LoginResponse.setting: object expected"); + message.setting[i] = $root.mcs_proto.Setting.fromObject(object.setting[i]); + } + } + if (object.streamId != null) + message.streamId = object.streamId | 0; + if (object.lastStreamIdReceived != null) + message.lastStreamIdReceived = object.lastStreamIdReceived | 0; + if (object.heartbeatConfig != null) { + if (typeof object.heartbeatConfig !== "object") + throw TypeError(".mcs_proto.LoginResponse.heartbeatConfig: object expected"); + message.heartbeatConfig = $root.mcs_proto.HeartbeatConfig.fromObject(object.heartbeatConfig); + } + if (object.serverTimestamp != null) + if ($util.Long) + (message.serverTimestamp = $util.Long.fromValue(object.serverTimestamp)).unsigned = false; + else if (typeof object.serverTimestamp === "string") + message.serverTimestamp = parseInt(object.serverTimestamp, 10); + else if (typeof object.serverTimestamp === "number") + message.serverTimestamp = object.serverTimestamp; + else if (typeof object.serverTimestamp === "object") + message.serverTimestamp = new $util.LongBits(object.serverTimestamp.low >>> 0, object.serverTimestamp.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LoginResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.LoginResponse + * @static + * @param {mcs_proto.LoginResponse} message LoginResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoginResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.setting = []; + if (options.defaults) { + object.id = ""; + object.jid = ""; + object.error = null; + object.streamId = 0; + object.lastStreamIdReceived = 0; + object.heartbeatConfig = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.serverTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.serverTimestamp = options.longs === String ? "0" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.jid != null && message.hasOwnProperty("jid")) + object.jid = message.jid; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.mcs_proto.ErrorInfo.toObject(message.error, options); + if (message.setting && message.setting.length) { + object.setting = []; + for (var j = 0; j < message.setting.length; ++j) + object.setting[j] = $root.mcs_proto.Setting.toObject(message.setting[j], options); + } + if (message.streamId != null && message.hasOwnProperty("streamId")) + object.streamId = message.streamId; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + object.lastStreamIdReceived = message.lastStreamIdReceived; + if (message.heartbeatConfig != null && message.hasOwnProperty("heartbeatConfig")) + object.heartbeatConfig = $root.mcs_proto.HeartbeatConfig.toObject(message.heartbeatConfig, options); + if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) + if (typeof message.serverTimestamp === "number") + object.serverTimestamp = options.longs === String ? String(message.serverTimestamp) : message.serverTimestamp; + else + object.serverTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestamp) : options.longs === Number ? new $util.LongBits(message.serverTimestamp.low >>> 0, message.serverTimestamp.high >>> 0).toNumber() : message.serverTimestamp; + return object; + }; + + /** + * Converts this LoginResponse to JSON. + * @function toJSON + * @memberof mcs_proto.LoginResponse + * @instance + * @returns {Object.} JSON object + */ + LoginResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoginResponse + * @function getTypeUrl + * @memberof mcs_proto.LoginResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoginResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.LoginResponse"; + }; + + return LoginResponse; + })(); + + mcs_proto.StreamErrorStanza = (function() { + + /** + * Properties of a StreamErrorStanza. + * @memberof mcs_proto + * @interface IStreamErrorStanza + * @property {string} type StreamErrorStanza type + * @property {string|null} [text] StreamErrorStanza text + */ + + /** + * Constructs a new StreamErrorStanza. + * @memberof mcs_proto + * @classdesc Represents a StreamErrorStanza. + * @implements IStreamErrorStanza + * @constructor + * @param {mcs_proto.IStreamErrorStanza=} [properties] Properties to set + */ + function StreamErrorStanza(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StreamErrorStanza type. + * @member {string} type + * @memberof mcs_proto.StreamErrorStanza + * @instance + */ + StreamErrorStanza.prototype.type = ""; + + /** + * StreamErrorStanza text. + * @member {string} text + * @memberof mcs_proto.StreamErrorStanza + * @instance + */ + StreamErrorStanza.prototype.text = ""; + + /** + * Creates a new StreamErrorStanza instance using the specified properties. + * @function create + * @memberof mcs_proto.StreamErrorStanza + * @static + * @param {mcs_proto.IStreamErrorStanza=} [properties] Properties to set + * @returns {mcs_proto.StreamErrorStanza} StreamErrorStanza instance + */ + StreamErrorStanza.create = function create(properties) { + return new StreamErrorStanza(properties); + }; + + /** + * Encodes the specified StreamErrorStanza message. Does not implicitly {@link mcs_proto.StreamErrorStanza.verify|verify} messages. + * @function encode + * @memberof mcs_proto.StreamErrorStanza + * @static + * @param {mcs_proto.IStreamErrorStanza} message StreamErrorStanza message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamErrorStanza.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); + return writer; + }; + + /** + * Encodes the specified StreamErrorStanza message, length delimited. Does not implicitly {@link mcs_proto.StreamErrorStanza.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.StreamErrorStanza + * @static + * @param {mcs_proto.IStreamErrorStanza} message StreamErrorStanza message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamErrorStanza.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StreamErrorStanza message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.StreamErrorStanza + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.StreamErrorStanza} StreamErrorStanza + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamErrorStanza.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.StreamErrorStanza(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + return message; + }; + + /** + * Decodes a StreamErrorStanza message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.StreamErrorStanza + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.StreamErrorStanza} StreamErrorStanza + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamErrorStanza.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StreamErrorStanza message. + * @function verify + * @memberof mcs_proto.StreamErrorStanza + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamErrorStanza.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates a StreamErrorStanza message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.StreamErrorStanza + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.StreamErrorStanza} StreamErrorStanza + */ + StreamErrorStanza.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.StreamErrorStanza) + return object; + var message = new $root.mcs_proto.StreamErrorStanza(); + if (object.type != null) + message.type = String(object.type); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a StreamErrorStanza message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.StreamErrorStanza + * @static + * @param {mcs_proto.StreamErrorStanza} message StreamErrorStanza + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamErrorStanza.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.text = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this StreamErrorStanza to JSON. + * @function toJSON + * @memberof mcs_proto.StreamErrorStanza + * @instance + * @returns {Object.} JSON object + */ + StreamErrorStanza.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StreamErrorStanza + * @function getTypeUrl + * @memberof mcs_proto.StreamErrorStanza + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamErrorStanza.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.StreamErrorStanza"; + }; + + return StreamErrorStanza; + })(); + + mcs_proto.Close = (function() { + + /** + * Properties of a Close. + * @memberof mcs_proto + * @interface IClose + */ + + /** + * Constructs a new Close. + * @memberof mcs_proto + * @classdesc TAG: 4 + * @implements IClose + * @constructor + * @param {mcs_proto.IClose=} [properties] Properties to set + */ + function Close(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Close instance using the specified properties. + * @function create + * @memberof mcs_proto.Close + * @static + * @param {mcs_proto.IClose=} [properties] Properties to set + * @returns {mcs_proto.Close} Close instance + */ + Close.create = function create(properties) { + return new Close(properties); + }; + + /** + * Encodes the specified Close message. Does not implicitly {@link mcs_proto.Close.verify|verify} messages. + * @function encode + * @memberof mcs_proto.Close + * @static + * @param {mcs_proto.IClose} message Close message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Close.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Close message, length delimited. Does not implicitly {@link mcs_proto.Close.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.Close + * @static + * @param {mcs_proto.IClose} message Close message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Close.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Close message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.Close + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.Close} Close + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Close.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.Close(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Close message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.Close + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.Close} Close + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Close.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Close message. + * @function verify + * @memberof mcs_proto.Close + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Close.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Close message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.Close + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.Close} Close + */ + Close.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.Close) + return object; + return new $root.mcs_proto.Close(); + }; + + /** + * Creates a plain object from a Close message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.Close + * @static + * @param {mcs_proto.Close} message Close + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Close.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Close to JSON. + * @function toJSON + * @memberof mcs_proto.Close + * @instance + * @returns {Object.} JSON object + */ + Close.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Close + * @function getTypeUrl + * @memberof mcs_proto.Close + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Close.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.Close"; + }; + + return Close; + })(); + + mcs_proto.Extension = (function() { + + /** + * Properties of an Extension. + * @memberof mcs_proto + * @interface IExtension + * @property {number} id Extension id + * @property {Uint8Array} data Extension data + */ + + /** + * Constructs a new Extension. + * @memberof mcs_proto + * @classdesc Represents an Extension. + * @implements IExtension + * @constructor + * @param {mcs_proto.IExtension=} [properties] Properties to set + */ + function Extension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Extension id. + * @member {number} id + * @memberof mcs_proto.Extension + * @instance + */ + Extension.prototype.id = 0; + + /** + * Extension data. + * @member {Uint8Array} data + * @memberof mcs_proto.Extension + * @instance + */ + Extension.prototype.data = $util.newBuffer([]); + + /** + * Creates a new Extension instance using the specified properties. + * @function create + * @memberof mcs_proto.Extension + * @static + * @param {mcs_proto.IExtension=} [properties] Properties to set + * @returns {mcs_proto.Extension} Extension instance + */ + Extension.create = function create(properties) { + return new Extension(properties); + }; + + /** + * Encodes the specified Extension message. Does not implicitly {@link mcs_proto.Extension.verify|verify} messages. + * @function encode + * @memberof mcs_proto.Extension + * @static + * @param {mcs_proto.IExtension} message Extension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Extension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified Extension message, length delimited. Does not implicitly {@link mcs_proto.Extension.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.Extension + * @static + * @param {mcs_proto.IExtension} message Extension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Extension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Extension message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.Extension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.Extension} Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Extension.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.Extension(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.int32(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("id")) + throw $util.ProtocolError("missing required 'id'", { instance: message }); + if (!message.hasOwnProperty("data")) + throw $util.ProtocolError("missing required 'data'", { instance: message }); + return message; + }; + + /** + * Decodes an Extension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.Extension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.Extension} Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Extension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Extension message. + * @function verify + * @memberof mcs_proto.Extension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Extension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.id)) + return "id: integer expected"; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates an Extension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.Extension + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.Extension} Extension + */ + Extension.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.Extension) + return object; + var message = new $root.mcs_proto.Extension(); + if (object.id != null) + message.id = object.id | 0; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from an Extension message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.Extension + * @static + * @param {mcs_proto.Extension} message Extension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Extension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this Extension to JSON. + * @function toJSON + * @memberof mcs_proto.Extension + * @instance + * @returns {Object.} JSON object + */ + Extension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Extension + * @function getTypeUrl + * @memberof mcs_proto.Extension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Extension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.Extension"; + }; + + return Extension; + })(); + + mcs_proto.IqStanza = (function() { + + /** + * Properties of an IqStanza. + * @memberof mcs_proto + * @interface IIqStanza + * @property {Long|null} [rmqId] IqStanza rmqId + * @property {mcs_proto.IqStanza.IqType} type IqStanza type + * @property {string} id IqStanza id + * @property {string|null} [from] IqStanza from + * @property {string|null} [to] IqStanza to + * @property {mcs_proto.IErrorInfo|null} [error] IqStanza error + * @property {mcs_proto.IExtension|null} [extension] IqStanza extension + * @property {string|null} [persistentId] IqStanza persistentId + * @property {number|null} [streamId] IqStanza streamId + * @property {number|null} [lastStreamIdReceived] IqStanza lastStreamIdReceived + * @property {Long|null} [accountId] IqStanza accountId + * @property {Long|null} [status] IqStanza status + */ + + /** + * Constructs a new IqStanza. + * @memberof mcs_proto + * @classdesc TAG: 7 + * IqRequest must contain a single extension. IqResponse may contain 0 or 1 + * extensions. + * @implements IIqStanza + * @constructor + * @param {mcs_proto.IIqStanza=} [properties] Properties to set + */ + function IqStanza(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IqStanza rmqId. + * @member {Long} rmqId + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.rmqId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IqStanza type. + * @member {mcs_proto.IqStanza.IqType} type + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.type = 0; + + /** + * IqStanza id. + * @member {string} id + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.id = ""; + + /** + * IqStanza from. + * @member {string} from + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.from = ""; + + /** + * IqStanza to. + * @member {string} to + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.to = ""; + + /** + * IqStanza error. + * @member {mcs_proto.IErrorInfo|null|undefined} error + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.error = null; + + /** + * IqStanza extension. + * @member {mcs_proto.IExtension|null|undefined} extension + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.extension = null; + + /** + * IqStanza persistentId. + * @member {string} persistentId + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.persistentId = ""; + + /** + * IqStanza streamId. + * @member {number} streamId + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.streamId = 0; + + /** + * IqStanza lastStreamIdReceived. + * @member {number} lastStreamIdReceived + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.lastStreamIdReceived = 0; + + /** + * IqStanza accountId. + * @member {Long} accountId + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.accountId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IqStanza status. + * @member {Long} status + * @memberof mcs_proto.IqStanza + * @instance + */ + IqStanza.prototype.status = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IqStanza instance using the specified properties. + * @function create + * @memberof mcs_proto.IqStanza + * @static + * @param {mcs_proto.IIqStanza=} [properties] Properties to set + * @returns {mcs_proto.IqStanza} IqStanza instance + */ + IqStanza.create = function create(properties) { + return new IqStanza(properties); + }; + + /** + * Encodes the specified IqStanza message. Does not implicitly {@link mcs_proto.IqStanza.verify|verify} messages. + * @function encode + * @memberof mcs_proto.IqStanza + * @static + * @param {mcs_proto.IIqStanza} message IqStanza message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IqStanza.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rmqId != null && Object.hasOwnProperty.call(message, "rmqId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rmqId); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); + if (message.from != null && Object.hasOwnProperty.call(message, "from")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.from); + if (message.to != null && Object.hasOwnProperty.call(message, "to")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.to); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.mcs_proto.ErrorInfo.encode(message.error, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) + $root.mcs_proto.Extension.encode(message.extension, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.persistentId != null && Object.hasOwnProperty.call(message, "persistentId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.persistentId); + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.streamId); + if (message.lastStreamIdReceived != null && Object.hasOwnProperty.call(message, "lastStreamIdReceived")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.lastStreamIdReceived); + if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.accountId); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.status); + return writer; + }; + + /** + * Encodes the specified IqStanza message, length delimited. Does not implicitly {@link mcs_proto.IqStanza.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.IqStanza + * @static + * @param {mcs_proto.IIqStanza} message IqStanza message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IqStanza.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IqStanza message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.IqStanza + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.IqStanza} IqStanza + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IqStanza.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.IqStanza(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rmqId = reader.int64(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.id = reader.string(); + break; + } + case 4: { + message.from = reader.string(); + break; + } + case 5: { + message.to = reader.string(); + break; + } + case 6: { + message.error = $root.mcs_proto.ErrorInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.extension = $root.mcs_proto.Extension.decode(reader, reader.uint32()); + break; + } + case 8: { + message.persistentId = reader.string(); + break; + } + case 9: { + message.streamId = reader.int32(); + break; + } + case 10: { + message.lastStreamIdReceived = reader.int32(); + break; + } + case 11: { + message.accountId = reader.int64(); + break; + } + case 12: { + message.status = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("type")) + throw $util.ProtocolError("missing required 'type'", { instance: message }); + if (!message.hasOwnProperty("id")) + throw $util.ProtocolError("missing required 'id'", { instance: message }); + return message; + }; + + /** + * Decodes an IqStanza message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.IqStanza + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.IqStanza} IqStanza + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IqStanza.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IqStanza message. + * @function verify + * @memberof mcs_proto.IqStanza + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IqStanza.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rmqId != null && message.hasOwnProperty("rmqId")) + if (!$util.isInteger(message.rmqId) && !(message.rmqId && $util.isInteger(message.rmqId.low) && $util.isInteger(message.rmqId.high))) + return "rmqId: integer|Long expected"; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.from != null && message.hasOwnProperty("from")) + if (!$util.isString(message.from)) + return "from: string expected"; + if (message.to != null && message.hasOwnProperty("to")) + if (!$util.isString(message.to)) + return "to: string expected"; + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.mcs_proto.ErrorInfo.verify(message.error); + if (error) + return "error." + error; + } + if (message.extension != null && message.hasOwnProperty("extension")) { + var error = $root.mcs_proto.Extension.verify(message.extension); + if (error) + return "extension." + error; + } + if (message.persistentId != null && message.hasOwnProperty("persistentId")) + if (!$util.isString(message.persistentId)) + return "persistentId: string expected"; + if (message.streamId != null && message.hasOwnProperty("streamId")) + if (!$util.isInteger(message.streamId)) + return "streamId: integer expected"; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + if (!$util.isInteger(message.lastStreamIdReceived)) + return "lastStreamIdReceived: integer expected"; + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (!$util.isInteger(message.accountId) && !(message.accountId && $util.isInteger(message.accountId.low) && $util.isInteger(message.accountId.high))) + return "accountId: integer|Long expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status) && !(message.status && $util.isInteger(message.status.low) && $util.isInteger(message.status.high))) + return "status: integer|Long expected"; + return null; + }; + + /** + * Creates an IqStanza message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.IqStanza + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.IqStanza} IqStanza + */ + IqStanza.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.IqStanza) + return object; + var message = new $root.mcs_proto.IqStanza(); + if (object.rmqId != null) + if ($util.Long) + (message.rmqId = $util.Long.fromValue(object.rmqId)).unsigned = false; + else if (typeof object.rmqId === "string") + message.rmqId = parseInt(object.rmqId, 10); + else if (typeof object.rmqId === "number") + message.rmqId = object.rmqId; + else if (typeof object.rmqId === "object") + message.rmqId = new $util.LongBits(object.rmqId.low >>> 0, object.rmqId.high >>> 0).toNumber(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "GET": + case 0: + message.type = 0; + break; + case "SET": + case 1: + message.type = 1; + break; + case "RESULT": + case 2: + message.type = 2; + break; + case "IQ_ERROR": + case 3: + message.type = 3; + break; + } + if (object.id != null) + message.id = String(object.id); + if (object.from != null) + message.from = String(object.from); + if (object.to != null) + message.to = String(object.to); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".mcs_proto.IqStanza.error: object expected"); + message.error = $root.mcs_proto.ErrorInfo.fromObject(object.error); + } + if (object.extension != null) { + if (typeof object.extension !== "object") + throw TypeError(".mcs_proto.IqStanza.extension: object expected"); + message.extension = $root.mcs_proto.Extension.fromObject(object.extension); + } + if (object.persistentId != null) + message.persistentId = String(object.persistentId); + if (object.streamId != null) + message.streamId = object.streamId | 0; + if (object.lastStreamIdReceived != null) + message.lastStreamIdReceived = object.lastStreamIdReceived | 0; + if (object.accountId != null) + if ($util.Long) + (message.accountId = $util.Long.fromValue(object.accountId)).unsigned = false; + else if (typeof object.accountId === "string") + message.accountId = parseInt(object.accountId, 10); + else if (typeof object.accountId === "number") + message.accountId = object.accountId; + else if (typeof object.accountId === "object") + message.accountId = new $util.LongBits(object.accountId.low >>> 0, object.accountId.high >>> 0).toNumber(); + if (object.status != null) + if ($util.Long) + (message.status = $util.Long.fromValue(object.status)).unsigned = false; + else if (typeof object.status === "string") + message.status = parseInt(object.status, 10); + else if (typeof object.status === "number") + message.status = object.status; + else if (typeof object.status === "object") + message.status = new $util.LongBits(object.status.low >>> 0, object.status.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IqStanza message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.IqStanza + * @static + * @param {mcs_proto.IqStanza} message IqStanza + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IqStanza.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rmqId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rmqId = options.longs === String ? "0" : 0; + object.type = options.enums === String ? "GET" : 0; + object.id = ""; + object.from = ""; + object.to = ""; + object.error = null; + object.extension = null; + object.persistentId = ""; + object.streamId = 0; + object.lastStreamIdReceived = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.accountId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.status = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.status = options.longs === String ? "0" : 0; + } + if (message.rmqId != null && message.hasOwnProperty("rmqId")) + if (typeof message.rmqId === "number") + object.rmqId = options.longs === String ? String(message.rmqId) : message.rmqId; + else + object.rmqId = options.longs === String ? $util.Long.prototype.toString.call(message.rmqId) : options.longs === Number ? new $util.LongBits(message.rmqId.low >>> 0, message.rmqId.high >>> 0).toNumber() : message.rmqId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.mcs_proto.IqStanza.IqType[message.type] === undefined ? message.type : $root.mcs_proto.IqStanza.IqType[message.type] : message.type; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.from != null && message.hasOwnProperty("from")) + object.from = message.from; + if (message.to != null && message.hasOwnProperty("to")) + object.to = message.to; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.mcs_proto.ErrorInfo.toObject(message.error, options); + if (message.extension != null && message.hasOwnProperty("extension")) + object.extension = $root.mcs_proto.Extension.toObject(message.extension, options); + if (message.persistentId != null && message.hasOwnProperty("persistentId")) + object.persistentId = message.persistentId; + if (message.streamId != null && message.hasOwnProperty("streamId")) + object.streamId = message.streamId; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + object.lastStreamIdReceived = message.lastStreamIdReceived; + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (typeof message.accountId === "number") + object.accountId = options.longs === String ? String(message.accountId) : message.accountId; + else + object.accountId = options.longs === String ? $util.Long.prototype.toString.call(message.accountId) : options.longs === Number ? new $util.LongBits(message.accountId.low >>> 0, message.accountId.high >>> 0).toNumber() : message.accountId; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status === "number") + object.status = options.longs === String ? String(message.status) : message.status; + else + object.status = options.longs === String ? $util.Long.prototype.toString.call(message.status) : options.longs === Number ? new $util.LongBits(message.status.low >>> 0, message.status.high >>> 0).toNumber() : message.status; + return object; + }; + + /** + * Converts this IqStanza to JSON. + * @function toJSON + * @memberof mcs_proto.IqStanza + * @instance + * @returns {Object.} JSON object + */ + IqStanza.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IqStanza + * @function getTypeUrl + * @memberof mcs_proto.IqStanza + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IqStanza.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.IqStanza"; + }; + + /** + * IqType enum. + * @name mcs_proto.IqStanza.IqType + * @enum {number} + * @property {number} GET=0 GET value + * @property {number} SET=1 SET value + * @property {number} RESULT=2 RESULT value + * @property {number} IQ_ERROR=3 IQ_ERROR value + */ + IqStanza.IqType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GET"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "RESULT"] = 2; + values[valuesById[3] = "IQ_ERROR"] = 3; + return values; + })(); + + return IqStanza; + })(); + + mcs_proto.AppData = (function() { + + /** + * Properties of an AppData. + * @memberof mcs_proto + * @interface IAppData + * @property {string} key AppData key + * @property {string} value AppData value + */ + + /** + * Constructs a new AppData. + * @memberof mcs_proto + * @classdesc Represents an AppData. + * @implements IAppData + * @constructor + * @param {mcs_proto.IAppData=} [properties] Properties to set + */ + function AppData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppData key. + * @member {string} key + * @memberof mcs_proto.AppData + * @instance + */ + AppData.prototype.key = ""; + + /** + * AppData value. + * @member {string} value + * @memberof mcs_proto.AppData + * @instance + */ + AppData.prototype.value = ""; + + /** + * Creates a new AppData instance using the specified properties. + * @function create + * @memberof mcs_proto.AppData + * @static + * @param {mcs_proto.IAppData=} [properties] Properties to set + * @returns {mcs_proto.AppData} AppData instance + */ + AppData.create = function create(properties) { + return new AppData(properties); + }; + + /** + * Encodes the specified AppData message. Does not implicitly {@link mcs_proto.AppData.verify|verify} messages. + * @function encode + * @memberof mcs_proto.AppData + * @static + * @param {mcs_proto.IAppData} message AppData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified AppData message, length delimited. Does not implicitly {@link mcs_proto.AppData.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.AppData + * @static + * @param {mcs_proto.IAppData} message AppData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppData message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.AppData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.AppData} AppData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.AppData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("key")) + throw $util.ProtocolError("missing required 'key'", { instance: message }); + if (!message.hasOwnProperty("value")) + throw $util.ProtocolError("missing required 'value'", { instance: message }); + return message; + }; + + /** + * Decodes an AppData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.AppData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.AppData} AppData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppData message. + * @function verify + * @memberof mcs_proto.AppData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.key)) + return "key: string expected"; + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an AppData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.AppData + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.AppData} AppData + */ + AppData.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.AppData) + return object; + var message = new $root.mcs_proto.AppData(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AppData message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.AppData + * @static + * @param {mcs_proto.AppData} message AppData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.value = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this AppData to JSON. + * @function toJSON + * @memberof mcs_proto.AppData + * @instance + * @returns {Object.} JSON object + */ + AppData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppData + * @function getTypeUrl + * @memberof mcs_proto.AppData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.AppData"; + }; + + return AppData; + })(); + + mcs_proto.DataMessageStanza = (function() { + + /** + * Properties of a DataMessageStanza. + * @memberof mcs_proto + * @interface IDataMessageStanza + * @property {string|null} [id] DataMessageStanza id + * @property {string} from DataMessageStanza from + * @property {string|null} [to] DataMessageStanza to + * @property {string} category DataMessageStanza category + * @property {string|null} [token] DataMessageStanza token + * @property {Array.|null} [appData] DataMessageStanza appData + * @property {boolean|null} [fromTrustedServer] DataMessageStanza fromTrustedServer + * @property {string|null} [persistentId] DataMessageStanza persistentId + * @property {number|null} [streamId] DataMessageStanza streamId + * @property {number|null} [lastStreamIdReceived] DataMessageStanza lastStreamIdReceived + * @property {string|null} [regId] DataMessageStanza regId + * @property {Long|null} [deviceUserId] DataMessageStanza deviceUserId + * @property {number|null} [ttl] DataMessageStanza ttl + * @property {Long|null} [sent] DataMessageStanza sent + * @property {number|null} [queued] DataMessageStanza queued + * @property {Long|null} [status] DataMessageStanza status + * @property {Uint8Array|null} [rawData] DataMessageStanza rawData + * @property {boolean|null} [immediateAck] DataMessageStanza immediateAck + */ + + /** + * Constructs a new DataMessageStanza. + * @memberof mcs_proto + * @classdesc TAG: 8 + * @implements IDataMessageStanza + * @constructor + * @param {mcs_proto.IDataMessageStanza=} [properties] Properties to set + */ + function DataMessageStanza(properties) { + this.appData = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataMessageStanza id. + * @member {string} id + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.id = ""; + + /** + * DataMessageStanza from. + * @member {string} from + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.from = ""; + + /** + * DataMessageStanza to. + * @member {string} to + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.to = ""; + + /** + * DataMessageStanza category. + * @member {string} category + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.category = ""; + + /** + * DataMessageStanza token. + * @member {string} token + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.token = ""; + + /** + * DataMessageStanza appData. + * @member {Array.} appData + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.appData = $util.emptyArray; + + /** + * DataMessageStanza fromTrustedServer. + * @member {boolean} fromTrustedServer + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.fromTrustedServer = false; + + /** + * DataMessageStanza persistentId. + * @member {string} persistentId + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.persistentId = ""; + + /** + * DataMessageStanza streamId. + * @member {number} streamId + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.streamId = 0; + + /** + * DataMessageStanza lastStreamIdReceived. + * @member {number} lastStreamIdReceived + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.lastStreamIdReceived = 0; + + /** + * DataMessageStanza regId. + * @member {string} regId + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.regId = ""; + + /** + * DataMessageStanza deviceUserId. + * @member {Long} deviceUserId + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.deviceUserId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataMessageStanza ttl. + * @member {number} ttl + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.ttl = 0; + + /** + * DataMessageStanza sent. + * @member {Long} sent + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.sent = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataMessageStanza queued. + * @member {number} queued + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.queued = 0; + + /** + * DataMessageStanza status. + * @member {Long} status + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.status = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataMessageStanza rawData. + * @member {Uint8Array} rawData + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.rawData = $util.newBuffer([]); + + /** + * DataMessageStanza immediateAck. + * @member {boolean} immediateAck + * @memberof mcs_proto.DataMessageStanza + * @instance + */ + DataMessageStanza.prototype.immediateAck = false; + + /** + * Creates a new DataMessageStanza instance using the specified properties. + * @function create + * @memberof mcs_proto.DataMessageStanza + * @static + * @param {mcs_proto.IDataMessageStanza=} [properties] Properties to set + * @returns {mcs_proto.DataMessageStanza} DataMessageStanza instance + */ + DataMessageStanza.create = function create(properties) { + return new DataMessageStanza(properties); + }; + + /** + * Encodes the specified DataMessageStanza message. Does not implicitly {@link mcs_proto.DataMessageStanza.verify|verify} messages. + * @function encode + * @memberof mcs_proto.DataMessageStanza + * @static + * @param {mcs_proto.IDataMessageStanza} message DataMessageStanza message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMessageStanza.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.from); + if (message.to != null && Object.hasOwnProperty.call(message, "to")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.to); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.category); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.token); + if (message.appData != null && message.appData.length) + for (var i = 0; i < message.appData.length; ++i) + $root.mcs_proto.AppData.encode(message.appData[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.fromTrustedServer != null && Object.hasOwnProperty.call(message, "fromTrustedServer")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.fromTrustedServer); + if (message.persistentId != null && Object.hasOwnProperty.call(message, "persistentId")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.persistentId); + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.streamId); + if (message.lastStreamIdReceived != null && Object.hasOwnProperty.call(message, "lastStreamIdReceived")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.lastStreamIdReceived); + if (message.regId != null && Object.hasOwnProperty.call(message, "regId")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.regId); + if (message.deviceUserId != null && Object.hasOwnProperty.call(message, "deviceUserId")) + writer.uint32(/* id 16, wireType 0 =*/128).int64(message.deviceUserId); + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.ttl); + if (message.sent != null && Object.hasOwnProperty.call(message, "sent")) + writer.uint32(/* id 18, wireType 0 =*/144).int64(message.sent); + if (message.queued != null && Object.hasOwnProperty.call(message, "queued")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.queued); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 20, wireType 0 =*/160).int64(message.status); + if (message.rawData != null && Object.hasOwnProperty.call(message, "rawData")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.rawData); + if (message.immediateAck != null && Object.hasOwnProperty.call(message, "immediateAck")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.immediateAck); + return writer; + }; + + /** + * Encodes the specified DataMessageStanza message, length delimited. Does not implicitly {@link mcs_proto.DataMessageStanza.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.DataMessageStanza + * @static + * @param {mcs_proto.IDataMessageStanza} message DataMessageStanza message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMessageStanza.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataMessageStanza message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.DataMessageStanza + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.DataMessageStanza} DataMessageStanza + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMessageStanza.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.DataMessageStanza(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.id = reader.string(); + break; + } + case 3: { + message.from = reader.string(); + break; + } + case 4: { + message.to = reader.string(); + break; + } + case 5: { + message.category = reader.string(); + break; + } + case 6: { + message.token = reader.string(); + break; + } + case 7: { + if (!(message.appData && message.appData.length)) + message.appData = []; + message.appData.push($root.mcs_proto.AppData.decode(reader, reader.uint32())); + break; + } + case 8: { + message.fromTrustedServer = reader.bool(); + break; + } + case 9: { + message.persistentId = reader.string(); + break; + } + case 10: { + message.streamId = reader.int32(); + break; + } + case 11: { + message.lastStreamIdReceived = reader.int32(); + break; + } + case 13: { + message.regId = reader.string(); + break; + } + case 16: { + message.deviceUserId = reader.int64(); + break; + } + case 17: { + message.ttl = reader.int32(); + break; + } + case 18: { + message.sent = reader.int64(); + break; + } + case 19: { + message.queued = reader.int32(); + break; + } + case 20: { + message.status = reader.int64(); + break; + } + case 21: { + message.rawData = reader.bytes(); + break; + } + case 24: { + message.immediateAck = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("from")) + throw $util.ProtocolError("missing required 'from'", { instance: message }); + if (!message.hasOwnProperty("category")) + throw $util.ProtocolError("missing required 'category'", { instance: message }); + return message; + }; + + /** + * Decodes a DataMessageStanza message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.DataMessageStanza + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.DataMessageStanza} DataMessageStanza + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMessageStanza.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataMessageStanza message. + * @function verify + * @memberof mcs_proto.DataMessageStanza + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataMessageStanza.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (!$util.isString(message.from)) + return "from: string expected"; + if (message.to != null && message.hasOwnProperty("to")) + if (!$util.isString(message.to)) + return "to: string expected"; + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.appData != null && message.hasOwnProperty("appData")) { + if (!Array.isArray(message.appData)) + return "appData: array expected"; + for (var i = 0; i < message.appData.length; ++i) { + var error = $root.mcs_proto.AppData.verify(message.appData[i]); + if (error) + return "appData." + error; + } + } + if (message.fromTrustedServer != null && message.hasOwnProperty("fromTrustedServer")) + if (typeof message.fromTrustedServer !== "boolean") + return "fromTrustedServer: boolean expected"; + if (message.persistentId != null && message.hasOwnProperty("persistentId")) + if (!$util.isString(message.persistentId)) + return "persistentId: string expected"; + if (message.streamId != null && message.hasOwnProperty("streamId")) + if (!$util.isInteger(message.streamId)) + return "streamId: integer expected"; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + if (!$util.isInteger(message.lastStreamIdReceived)) + return "lastStreamIdReceived: integer expected"; + if (message.regId != null && message.hasOwnProperty("regId")) + if (!$util.isString(message.regId)) + return "regId: string expected"; + if (message.deviceUserId != null && message.hasOwnProperty("deviceUserId")) + if (!$util.isInteger(message.deviceUserId) && !(message.deviceUserId && $util.isInteger(message.deviceUserId.low) && $util.isInteger(message.deviceUserId.high))) + return "deviceUserId: integer|Long expected"; + if (message.ttl != null && message.hasOwnProperty("ttl")) + if (!$util.isInteger(message.ttl)) + return "ttl: integer expected"; + if (message.sent != null && message.hasOwnProperty("sent")) + if (!$util.isInteger(message.sent) && !(message.sent && $util.isInteger(message.sent.low) && $util.isInteger(message.sent.high))) + return "sent: integer|Long expected"; + if (message.queued != null && message.hasOwnProperty("queued")) + if (!$util.isInteger(message.queued)) + return "queued: integer expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status) && !(message.status && $util.isInteger(message.status.low) && $util.isInteger(message.status.high))) + return "status: integer|Long expected"; + if (message.rawData != null && message.hasOwnProperty("rawData")) + if (!(message.rawData && typeof message.rawData.length === "number" || $util.isString(message.rawData))) + return "rawData: buffer expected"; + if (message.immediateAck != null && message.hasOwnProperty("immediateAck")) + if (typeof message.immediateAck !== "boolean") + return "immediateAck: boolean expected"; + return null; + }; + + /** + * Creates a DataMessageStanza message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.DataMessageStanza + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.DataMessageStanza} DataMessageStanza + */ + DataMessageStanza.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.DataMessageStanza) + return object; + var message = new $root.mcs_proto.DataMessageStanza(); + if (object.id != null) + message.id = String(object.id); + if (object.from != null) + message.from = String(object.from); + if (object.to != null) + message.to = String(object.to); + if (object.category != null) + message.category = String(object.category); + if (object.token != null) + message.token = String(object.token); + if (object.appData) { + if (!Array.isArray(object.appData)) + throw TypeError(".mcs_proto.DataMessageStanza.appData: array expected"); + message.appData = []; + for (var i = 0; i < object.appData.length; ++i) { + if (typeof object.appData[i] !== "object") + throw TypeError(".mcs_proto.DataMessageStanza.appData: object expected"); + message.appData[i] = $root.mcs_proto.AppData.fromObject(object.appData[i]); + } + } + if (object.fromTrustedServer != null) + message.fromTrustedServer = Boolean(object.fromTrustedServer); + if (object.persistentId != null) + message.persistentId = String(object.persistentId); + if (object.streamId != null) + message.streamId = object.streamId | 0; + if (object.lastStreamIdReceived != null) + message.lastStreamIdReceived = object.lastStreamIdReceived | 0; + if (object.regId != null) + message.regId = String(object.regId); + if (object.deviceUserId != null) + if ($util.Long) + (message.deviceUserId = $util.Long.fromValue(object.deviceUserId)).unsigned = false; + else if (typeof object.deviceUserId === "string") + message.deviceUserId = parseInt(object.deviceUserId, 10); + else if (typeof object.deviceUserId === "number") + message.deviceUserId = object.deviceUserId; + else if (typeof object.deviceUserId === "object") + message.deviceUserId = new $util.LongBits(object.deviceUserId.low >>> 0, object.deviceUserId.high >>> 0).toNumber(); + if (object.ttl != null) + message.ttl = object.ttl | 0; + if (object.sent != null) + if ($util.Long) + (message.sent = $util.Long.fromValue(object.sent)).unsigned = false; + else if (typeof object.sent === "string") + message.sent = parseInt(object.sent, 10); + else if (typeof object.sent === "number") + message.sent = object.sent; + else if (typeof object.sent === "object") + message.sent = new $util.LongBits(object.sent.low >>> 0, object.sent.high >>> 0).toNumber(); + if (object.queued != null) + message.queued = object.queued | 0; + if (object.status != null) + if ($util.Long) + (message.status = $util.Long.fromValue(object.status)).unsigned = false; + else if (typeof object.status === "string") + message.status = parseInt(object.status, 10); + else if (typeof object.status === "number") + message.status = object.status; + else if (typeof object.status === "object") + message.status = new $util.LongBits(object.status.low >>> 0, object.status.high >>> 0).toNumber(); + if (object.rawData != null) + if (typeof object.rawData === "string") + $util.base64.decode(object.rawData, message.rawData = $util.newBuffer($util.base64.length(object.rawData)), 0); + else if (object.rawData.length >= 0) + message.rawData = object.rawData; + if (object.immediateAck != null) + message.immediateAck = Boolean(object.immediateAck); + return message; + }; + + /** + * Creates a plain object from a DataMessageStanza message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.DataMessageStanza + * @static + * @param {mcs_proto.DataMessageStanza} message DataMessageStanza + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataMessageStanza.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.appData = []; + if (options.defaults) { + object.id = ""; + object.from = ""; + object.to = ""; + object.category = ""; + object.token = ""; + object.fromTrustedServer = false; + object.persistentId = ""; + object.streamId = 0; + object.lastStreamIdReceived = 0; + object.regId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.deviceUserId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.deviceUserId = options.longs === String ? "0" : 0; + object.ttl = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sent = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sent = options.longs === String ? "0" : 0; + object.queued = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.status = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.status = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.rawData = ""; + else { + object.rawData = []; + if (options.bytes !== Array) + object.rawData = $util.newBuffer(object.rawData); + } + object.immediateAck = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.from != null && message.hasOwnProperty("from")) + object.from = message.from; + if (message.to != null && message.hasOwnProperty("to")) + object.to = message.to; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.appData && message.appData.length) { + object.appData = []; + for (var j = 0; j < message.appData.length; ++j) + object.appData[j] = $root.mcs_proto.AppData.toObject(message.appData[j], options); + } + if (message.fromTrustedServer != null && message.hasOwnProperty("fromTrustedServer")) + object.fromTrustedServer = message.fromTrustedServer; + if (message.persistentId != null && message.hasOwnProperty("persistentId")) + object.persistentId = message.persistentId; + if (message.streamId != null && message.hasOwnProperty("streamId")) + object.streamId = message.streamId; + if (message.lastStreamIdReceived != null && message.hasOwnProperty("lastStreamIdReceived")) + object.lastStreamIdReceived = message.lastStreamIdReceived; + if (message.regId != null && message.hasOwnProperty("regId")) + object.regId = message.regId; + if (message.deviceUserId != null && message.hasOwnProperty("deviceUserId")) + if (typeof message.deviceUserId === "number") + object.deviceUserId = options.longs === String ? String(message.deviceUserId) : message.deviceUserId; + else + object.deviceUserId = options.longs === String ? $util.Long.prototype.toString.call(message.deviceUserId) : options.longs === Number ? new $util.LongBits(message.deviceUserId.low >>> 0, message.deviceUserId.high >>> 0).toNumber() : message.deviceUserId; + if (message.ttl != null && message.hasOwnProperty("ttl")) + object.ttl = message.ttl; + if (message.sent != null && message.hasOwnProperty("sent")) + if (typeof message.sent === "number") + object.sent = options.longs === String ? String(message.sent) : message.sent; + else + object.sent = options.longs === String ? $util.Long.prototype.toString.call(message.sent) : options.longs === Number ? new $util.LongBits(message.sent.low >>> 0, message.sent.high >>> 0).toNumber() : message.sent; + if (message.queued != null && message.hasOwnProperty("queued")) + object.queued = message.queued; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status === "number") + object.status = options.longs === String ? String(message.status) : message.status; + else + object.status = options.longs === String ? $util.Long.prototype.toString.call(message.status) : options.longs === Number ? new $util.LongBits(message.status.low >>> 0, message.status.high >>> 0).toNumber() : message.status; + if (message.rawData != null && message.hasOwnProperty("rawData")) + object.rawData = options.bytes === String ? $util.base64.encode(message.rawData, 0, message.rawData.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawData) : message.rawData; + if (message.immediateAck != null && message.hasOwnProperty("immediateAck")) + object.immediateAck = message.immediateAck; + return object; + }; + + /** + * Converts this DataMessageStanza to JSON. + * @function toJSON + * @memberof mcs_proto.DataMessageStanza + * @instance + * @returns {Object.} JSON object + */ + DataMessageStanza.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataMessageStanza + * @function getTypeUrl + * @memberof mcs_proto.DataMessageStanza + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataMessageStanza.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.DataMessageStanza"; + }; + + return DataMessageStanza; + })(); + + mcs_proto.StreamAck = (function() { + + /** + * Properties of a StreamAck. + * @memberof mcs_proto + * @interface IStreamAck + */ + + /** + * Constructs a new StreamAck. + * @memberof mcs_proto + * @classdesc Included in IQ with ID 13, sent from client or server after 10 unconfirmed + * messages. + * @implements IStreamAck + * @constructor + * @param {mcs_proto.IStreamAck=} [properties] Properties to set + */ + function StreamAck(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new StreamAck instance using the specified properties. + * @function create + * @memberof mcs_proto.StreamAck + * @static + * @param {mcs_proto.IStreamAck=} [properties] Properties to set + * @returns {mcs_proto.StreamAck} StreamAck instance + */ + StreamAck.create = function create(properties) { + return new StreamAck(properties); + }; + + /** + * Encodes the specified StreamAck message. Does not implicitly {@link mcs_proto.StreamAck.verify|verify} messages. + * @function encode + * @memberof mcs_proto.StreamAck + * @static + * @param {mcs_proto.IStreamAck} message StreamAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamAck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified StreamAck message, length delimited. Does not implicitly {@link mcs_proto.StreamAck.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.StreamAck + * @static + * @param {mcs_proto.IStreamAck} message StreamAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamAck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StreamAck message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.StreamAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.StreamAck} StreamAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamAck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.StreamAck(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StreamAck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.StreamAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.StreamAck} StreamAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamAck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StreamAck message. + * @function verify + * @memberof mcs_proto.StreamAck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamAck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a StreamAck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.StreamAck + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.StreamAck} StreamAck + */ + StreamAck.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.StreamAck) + return object; + return new $root.mcs_proto.StreamAck(); + }; + + /** + * Creates a plain object from a StreamAck message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.StreamAck + * @static + * @param {mcs_proto.StreamAck} message StreamAck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamAck.toObject = function toObject() { + return {}; + }; + + /** + * Converts this StreamAck to JSON. + * @function toJSON + * @memberof mcs_proto.StreamAck + * @instance + * @returns {Object.} JSON object + */ + StreamAck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StreamAck + * @function getTypeUrl + * @memberof mcs_proto.StreamAck + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamAck.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.StreamAck"; + }; + + return StreamAck; + })(); + + mcs_proto.SelectiveAck = (function() { + + /** + * Properties of a SelectiveAck. + * @memberof mcs_proto + * @interface ISelectiveAck + * @property {Array.|null} [id] SelectiveAck id + */ + + /** + * Constructs a new SelectiveAck. + * @memberof mcs_proto + * @classdesc Included in IQ sent after LoginResponse from server with ID 12. + * @implements ISelectiveAck + * @constructor + * @param {mcs_proto.ISelectiveAck=} [properties] Properties to set + */ + function SelectiveAck(properties) { + this.id = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveAck id. + * @member {Array.} id + * @memberof mcs_proto.SelectiveAck + * @instance + */ + SelectiveAck.prototype.id = $util.emptyArray; + + /** + * Creates a new SelectiveAck instance using the specified properties. + * @function create + * @memberof mcs_proto.SelectiveAck + * @static + * @param {mcs_proto.ISelectiveAck=} [properties] Properties to set + * @returns {mcs_proto.SelectiveAck} SelectiveAck instance + */ + SelectiveAck.create = function create(properties) { + return new SelectiveAck(properties); + }; + + /** + * Encodes the specified SelectiveAck message. Does not implicitly {@link mcs_proto.SelectiveAck.verify|verify} messages. + * @function encode + * @memberof mcs_proto.SelectiveAck + * @static + * @param {mcs_proto.ISelectiveAck} message SelectiveAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveAck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.id.length) + for (var i = 0; i < message.id.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id[i]); + return writer; + }; + + /** + * Encodes the specified SelectiveAck message, length delimited. Does not implicitly {@link mcs_proto.SelectiveAck.verify|verify} messages. + * @function encodeDelimited + * @memberof mcs_proto.SelectiveAck + * @static + * @param {mcs_proto.ISelectiveAck} message SelectiveAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveAck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveAck message from the specified reader or buffer. + * @function decode + * @memberof mcs_proto.SelectiveAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mcs_proto.SelectiveAck} SelectiveAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveAck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mcs_proto.SelectiveAck(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.id && message.id.length)) + message.id = []; + message.id.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveAck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mcs_proto.SelectiveAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mcs_proto.SelectiveAck} SelectiveAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveAck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveAck message. + * @function verify + * @memberof mcs_proto.SelectiveAck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveAck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) { + if (!Array.isArray(message.id)) + return "id: array expected"; + for (var i = 0; i < message.id.length; ++i) + if (!$util.isString(message.id[i])) + return "id: string[] expected"; + } + return null; + }; + + /** + * Creates a SelectiveAck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mcs_proto.SelectiveAck + * @static + * @param {Object.} object Plain object + * @returns {mcs_proto.SelectiveAck} SelectiveAck + */ + SelectiveAck.fromObject = function fromObject(object) { + if (object instanceof $root.mcs_proto.SelectiveAck) + return object; + var message = new $root.mcs_proto.SelectiveAck(); + if (object.id) { + if (!Array.isArray(object.id)) + throw TypeError(".mcs_proto.SelectiveAck.id: array expected"); + message.id = []; + for (var i = 0; i < object.id.length; ++i) + message.id[i] = String(object.id[i]); + } + return message; + }; + + /** + * Creates a plain object from a SelectiveAck message. Also converts values to other types if specified. + * @function toObject + * @memberof mcs_proto.SelectiveAck + * @static + * @param {mcs_proto.SelectiveAck} message SelectiveAck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveAck.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.id = []; + if (message.id && message.id.length) { + object.id = []; + for (var j = 0; j < message.id.length; ++j) + object.id[j] = message.id[j]; + } + return object; + }; + + /** + * Converts this SelectiveAck to JSON. + * @function toJSON + * @memberof mcs_proto.SelectiveAck + * @instance + * @returns {Object.} JSON object + */ + SelectiveAck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveAck + * @function getTypeUrl + * @memberof mcs_proto.SelectiveAck + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveAck.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/mcs_proto.SelectiveAck"; + }; + + return SelectiveAck; + })(); + + return mcs_proto; +})(); + +module.exports = $root; diff --git a/src/gcm/android_checkin.proto b/src/protos/android_checkin.proto similarity index 100% rename from src/gcm/android_checkin.proto rename to src/protos/android_checkin.proto diff --git a/src/gcm/checkin.proto b/src/protos/checkin.proto similarity index 100% rename from src/gcm/checkin.proto rename to src/protos/checkin.proto diff --git a/src/mcs.proto b/src/protos/mcs.proto similarity index 100% rename from src/mcs.proto rename to src/protos/mcs.proto diff --git a/src/register/index.js b/src/register/index.js deleted file mode 100644 index b3d69a4..0000000 --- a/src/register/index.js +++ /dev/null @@ -1,18 +0,0 @@ -const uuidv4 = require('uuid/v4'); -const { register: registerGCM } = require('../gcm'); -const registerFCM = require('../fcm'); - -module.exports = register; - -async function register(senderId) { - // Should be unique by app - One GCM registration/token by app/appId - const appId = `wp:receiver.push.com#${uuidv4()}`; - const subscription = await registerGCM(appId); - const result = await registerFCM({ - token : subscription.token, - senderId, - appId, - }); - // Need to be saved by the client - return Object.assign({}, result, { gcm : subscription }); -} diff --git a/src/sender.ts b/src/sender.ts new file mode 100644 index 0000000..c017c78 --- /dev/null +++ b/src/sender.ts @@ -0,0 +1,120 @@ +import request from './utils/request' +import type * as Types from './types' + +const FCM_API = 'https://fcm.googleapis.com/v1/projects/' + +const GOOGLE_TOKEN_AUDIENCE = 'https://accounts.google.com/o/oauth2/token'; +const GOOGLE_AUTH_TOKEN_HOST = 'accounts.google.com'; +const GOOGLE_AUTH_TOKEN_PATH = '/o/oauth2/token'; + +const ONE_HOUR_IN_SECONDS = 60 * 60; +const JWT_ALGORITHM = 'RS256'; + +interface ServiceAccount { + type: 'service_account' + project_id: string + private_key_id: string + private_key: string + client_email: string + client_id: string + auth_uri: string + token_uri: string + auth_provider_x509_cert_url: string + client_x509_cert_url: string + universe_domain: string +} + +interface GoogleOAuthAccessToken { + access_token: string; + expires_in: number; +} + +export default class PushSender { + #projectId: string + #privateKey: string + #clientEmail: string + #accessToken: GoogleOAuthAccessToken & { generated_at: number } + + constructor(serviceAccount: ServiceAccount) { + this.#projectId = serviceAccount.project_id + this.#privateKey = serviceAccount.private_key + this.#clientEmail = serviceAccount.client_email + } + + #createAuthJwt(): string { + const claims = { + scope: [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/firebase.database', + 'https://www.googleapis.com/auth/firebase.messaging', + 'https://www.googleapis.com/auth/identitytoolkit', + 'https://www.googleapis.com/auth/userinfo.email', + ].join(' '), + }; + + // eslint-disable-next-line @typescript-eslint/no-var-requires + const jwt = require('jsonwebtoken'); + // This method is actually synchronous so we can capture and return the buffer. + return jwt.sign(claims, this.#privateKey, { + audience: GOOGLE_TOKEN_AUDIENCE, + expiresIn: ONE_HOUR_IN_SECONDS, + issuer: this.#clientEmail, + algorithm: JWT_ALGORITHM, + }); + } + + async #getAccessToken(): Promise { + if (this.#accessToken && this.#accessToken.generated_at + this.#accessToken.expires_in > new Date().getTime()) return this.#accessToken; + + const token = this.#createAuthJwt(); + + const res = await request(`https://${GOOGLE_AUTH_TOKEN_HOST}${GOOGLE_AUTH_TOKEN_PATH}`, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + body: 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=' + token, + }) + + const { access_token, expires_in } = await res.json() + + this.#accessToken = { + access_token, + expires_in, + generated_at: new Date().getTime() + }; + + return this.#accessToken + } + + async send(message: Types.MessageToSend, fcmToken: string): Promise { + const serverAuthToken = await this.#getAccessToken() + + return request(`${FCM_API}${this.#projectId}/messages:send`, { + method: 'POST', + body: JSON.stringify({ + message: { + notification: message, + token: fcmToken + } + }), + headers: new Headers({ + 'Content-Type': 'application/json', + Authorization: `Bearer ${serverAuthToken.access_token}` + }) + }).then(async (response) => { + const data = await response.json() as { failure: boolean } + + if (data.failure) { + throw new Error(JSON.stringify(data)) + } + }).catch(console.error) + } + + testMessage(fcmToken: string): Promise { + return this.send({ + body: "PushReceiver test message", + title: "testMessage", + }, fcmToken) + } +} diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..2568b42 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,167 @@ +export interface Credentials { + gcm: GcmData + fcm: FcmData + keys: Keys + config: { + projectId: string + vapidKey: string + bundleId: string + } + +} + +export interface InstallationData { + token: string + createdAt: number + expiresIn: number + refreshToken: string + fid: string +} + +export interface Keys { + privateKey: string + publicKey: string + authSecret: string +} + +export interface GcmCheckinResponse { + androidId: string + securityToken: string +} + +export interface GcmRegisterResponse { + appId: string + token: string +} + +export type GcmData = GcmCheckinResponse & GcmRegisterResponse + +export interface FcmRegistrationResponse { + name: string + token: string + web: { + applicationPubKey: string + auth: string + endpoint: string + p256dh: string + } +} + +export interface FcmInstallationResponse { + authToken: { + expiresIn: string + token: string + } + fid: string + name: string + refreshToken: string +} + +// TODO: replace this with actual data +export interface FcmData { + token: string + installation: InstallationData +} + +export type PersistentId = string + +export type DisposeFunction = CallableFunction + +// table 2b. - https://firebase.google.com/docs/cloud-messaging/http-server-ref +export interface Notification { + title?: string + body?: string + android_channel_id?: string + icon?: string + sound?: string + tag?: string + color?: string + click_action?: string + body_loc_key?: string + body_loc_args?: string // JSON array as string + title_loc_key?: string + title_loc_args?: string // JSON array as string +} + +export interface MessageCustomData { + [key: string]: unknown +} + +// table 1. - https://firebase.google.com/docs/cloud-messaging/http-server-ref +export interface Message { + to?: string + registration_ids?: string[] + condition?: string + collapse_key?: string + priority?: 'normal' | 'high' + content_available?: boolean + mutable_content?: string // JSON boolean ??? + restricted_package_name?: string + dry_run?: boolean + data?: MessageCustomData + notification?: Notification + + // Not in table, but found in data + fcmMessageId?: string + from?: string +} + +export interface MessageEnvelope { + message: Message + persistentId: string +} + +export interface DataPacket { + tag: number + object: T +} + +export interface FirebaseConfig { + projectId: string + appId: string + apiKey: string + messagingSenderId: string + authDomain?: string + databaseURL?: string + storageBucket?: string + measurementId?: string +} + +export interface ClientConfig { + credentials?: Credentials + persistentIds?: PersistentId[] + bundleId?: string + chromeId?: string + /** + * 1 = Windows + * 2 = Darwin + * 3 = Linux + * 4 = Cros + * 5 = iOS + */ + chromePlatform?: number + /** + * 1 = stable + * 2 = beta + * 3 = dev + * 4 = canary + * 5 = unknown + */ + chromeChannel?: number + chromeVersion?: string + timeZone?: string + debug?: boolean + vapidKey?: string + heartbeatIntervalMs?: number + firebase: FirebaseConfig +} + +export interface EventChangeCredentials { + oldCredentials?: Credentials + newCredentials: Credentials +} + +export interface MessageToSend { + title: string + body: string +} diff --git a/src/utils/base64.ts b/src/utils/base64.ts new file mode 100644 index 0000000..c8aa324 --- /dev/null +++ b/src/utils/base64.ts @@ -0,0 +1,10 @@ +export function escape(value: string): string { + return value + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_') +} + +export function toBase64(value: Buffer): string { + return escape(value.toString('base64')) +} diff --git a/src/utils/base64/index.js b/src/utils/base64/index.js deleted file mode 100644 index 16d97a0..0000000 --- a/src/utils/base64/index.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - escape, - toBase64, -}; - -function escape(string) { - return string - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} - -function toBase64(input) { - return escape(input.toString('base64')); -} diff --git a/src/utils/decrypt.ts b/src/utils/decrypt.ts new file mode 100644 index 0000000..18723e0 --- /dev/null +++ b/src/utils/decrypt.ts @@ -0,0 +1,37 @@ +import crypto from 'crypto' +import ece from 'http_ece' + +import type * as Types from '../types' + +interface MessageHeader { + key: 'crypto-key' | 'encryption' + value: string +} + +interface EncryptedMessage { + appData: MessageHeader[] + rawData: Buffer +} + +// https://tools.ietf.org/html/draft-ietf-webpush-encryption-03 +export default function decrypt(object: EncryptedMessage, keys: Types.Keys): T { + const cryptoKey = object.appData.find(item => item.key === 'crypto-key') + if (!cryptoKey) throw new Error('crypto-key is missing') + + const salt = object.appData.find(item => item.key === 'encryption') + if (!salt) throw new Error('salt is missing') + + const dh = crypto.createECDH('prime256v1') + dh.setPrivateKey(keys.privateKey, 'base64') + + const params = { + version: 'aesgcm', + authSecret: keys.authSecret, + dh: cryptoKey.value.slice(3), + privateKey: dh, + salt: salt.value.slice(5), + } + const decrypted = ece.decrypt(object.rawData, params) + + return JSON.parse(decrypted) +} diff --git a/src/utils/decrypt/index.js b/src/utils/decrypt/index.js deleted file mode 100644 index b06a219..0000000 --- a/src/utils/decrypt/index.js +++ /dev/null @@ -1,23 +0,0 @@ -const crypto = require('crypto'); -const ece = require('http_ece'); - -module.exports = decrypt; - -// https://tools.ietf.org/html/draft-ietf-webpush-encryption-03 -function decrypt(object, keys) { - const cryptoKey = object.appData.find(item => item.key === 'crypto-key'); - if (!cryptoKey) throw new Error('crypto-key is missing'); - const salt = object.appData.find(item => item.key === 'encryption'); - if (!salt) throw new Error('salt is missing'); - const dh = crypto.createECDH('prime256v1'); - dh.setPrivateKey(keys.privateKey, 'base64'); - const params = { - version : 'aesgcm', - authSecret : keys.authSecret, - dh : cryptoKey.value.slice(3), - privateKey : dh, - salt : salt.value.slice(5), - }; - const decrypted = ece.decrypt(object.rawData, params); - return JSON.parse(decrypted); -} diff --git a/src/utils/defer.ts b/src/utils/defer.ts new file mode 100644 index 0000000..2b04232 --- /dev/null +++ b/src/utils/defer.ts @@ -0,0 +1,18 @@ +export default function defer(): { promise: Promise; resolve: (value?: T | PromiseLike) => void; reject: (reason?: any) => void; isResolved: boolean } { + let resolve: (value?: T | PromiseLike) => void; + let reject: (reason?: any) => void; + let isResolved = false; + + const promise = new Promise((res, rej) => { + resolve = (value?: T | PromiseLike) => { + isResolved = true; + res(value); + }; + reject = (reason?: any) => { + isResolved = true; + rej(reason); + }; + }); + + return { promise, resolve, reject, isResolved }; +} diff --git a/src/utils/logger.ts b/src/utils/logger.ts new file mode 100644 index 0000000..edb6eee --- /dev/null +++ b/src/utils/logger.ts @@ -0,0 +1,19 @@ +let debugEnabled = false + +export default { + setDebug: (enabled?: boolean) => { + debugEnabled = Boolean(enabled) + }, + log: (...args: unknown[]): void => { + console.log(...args) + }, + debug: (...args: unknown[]): void => { + if (debugEnabled) { + console.debug(...args) + } + }, + warn: (...args: unknown[]): void => { + console.warn(...args) + }, + error: console.error, +} \ No newline at end of file diff --git a/src/utils/request.ts b/src/utils/request.ts new file mode 100644 index 0000000..10cb800 --- /dev/null +++ b/src/utils/request.ts @@ -0,0 +1,43 @@ +import delay from './timeout' +import Logger from './logger' +import type { ClientConfig } from '../types' + +// In seconds +const MAX_RETRY_TIMEOUT = 15 + +// Step in seconds +const RETRY_STEP = 5 + +export default function requestWithRety(url: string, options?: globalThis.RequestInit, maxRetries = 3): Promise { + return retry(0, url, options, maxRetries) +} + +async function retry(retryCount = 0, url: string, options?: globalThis.RequestInit, maxRetries = 3): Promise { + try { + return await fetch(url, options) + .then(async (response) => { // Serer responded + if (response.ok) return response + + // Response not ok. This means server responded but with an error. We retry with increased retry count + const timeout = Math.min(retryCount * RETRY_STEP, MAX_RETRY_TIMEOUT) + + Logger.debug(`Request failed : ${response.statusText}`) + Logger.debug(`Retrying in ${timeout} seconds`) + + if (retryCount >= maxRetries) throw response.statusText + + await delay(timeout * 1000) + + return retry(retryCount + 1, url, options) + }) + } catch (error) { + Logger.debug('Request failed with network error. Wait 10s and retry') + // Fetch throws only for network errors. In that case we wait a bit and retry without increasing the count + await delay(10_000) // 10 seconds + return retry(retryCount, url, options) + } +} + +export const getEndpoint = (config: ClientConfig, baseUrl: string, path = '') => ( + `${baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`}projects/${config.firebase.projectId}/${path}` +) diff --git a/src/utils/request/index.js b/src/utils/request/index.js deleted file mode 100644 index 90f3f86..0000000 --- a/src/utils/request/index.js +++ /dev/null @@ -1,27 +0,0 @@ -const request = require('request-promise'); -const { waitFor } = require('../timeout'); - -// In seconds -const MAX_RETRY_TIMEOUT = 15; -// Step in seconds -const RETRY_STEP = 5; - -module.exports = requestWithRety; - -function requestWithRety(...args) { - return retry(0, ...args); -} - -async function retry(retryCount = 0, ...args) { - try { - const result = await request(...args); - return result; - } catch (e) { - const timeout = Math.min(retryCount * RETRY_STEP, MAX_RETRY_TIMEOUT); - console.error(`Request failed : ${e.message}`); - console.error(`Retrying in ${timeout} seconds`); - await waitFor(timeout * 1000); - const result = await retry(retryCount + 1, ...args); - return result; - } -} diff --git a/src/utils/timeout.ts b/src/utils/timeout.ts new file mode 100644 index 0000000..3aff87c --- /dev/null +++ b/src/utils/timeout.ts @@ -0,0 +1 @@ +export default (timeout: number): Promise => new Promise(resolve => setTimeout(resolve, timeout)) \ No newline at end of file diff --git a/src/utils/timeout/index.js b/src/utils/timeout/index.js deleted file mode 100644 index 017f648..0000000 --- a/src/utils/timeout/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - waitFor, -}; - -function waitFor(timeout) { - return new Promise(resolve => setTimeout(resolve, timeout)); -} diff --git a/test/4kb.js b/test/4kb.js deleted file mode 100644 index 93342d3..0000000 --- a/test/4kb.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = - 'iVBORw0KGgoAAAANSUhEUgAAAAwAAAACCAYAAABsfz2XAAAMFGlDQ1BJQ0MgUHJvZmlsZQAASImVVwdUk8kWnr+kEBJaINIJvQnSq0DoIAhIBxshCRBKgISgYkcXFVy7WFBUdAVE0bUAshZE7CyCvT8QUVlZFws2VN6kgK6vnXfPmX++3Ln3zncnd+bMAKBsx87Ly0ZVAMgRFAijg/2YiUnJTFIPwIAe0AA6QIvNEeX5RkWFAyij/d/l3S2ASPrrNpJY/zr+X0WVyxNxAECiIE7lijg5EB8FANfk5AkLACC0Q73xrII8CR6EWF0ICQJAxCU4XYY1JThVhsdLbWKj/SFmAUCmstnCdACUJLyZhZx0GEdJwtFOwOULIN4GsTcng82F+AHE43NyciFWJkNskfpdnPS/xUwdi8lmp49hWS5SIQfwRXnZ7Dn/53L8b8nJFo/OYQQbNUMYEi3JGa5bTVZumARTIT4hSI2IhFgN4ot8rtRegu9liEPi5PYDHJE/XDPAAAAFXHZAGMS6EDPEWXG+cuzAFkp9oT0awS8IjZXjVGFutDw+WijIjgiXx1mewQsdxZU8UWDMqE0aPygUYlhp6NGijNgEGU+0rZAfHwGxEsSdoqyYMLnvo6IM/4hRG6E4WsLZBOK3acKgaJkNppkjGs0Ls+WwpXPBWsBYBRmxITJfLJEnSgwf5cDlBQTKOGBcniBOzg2D1eUXLfctycuOkttjlbzs4GjZOmOHRIUxo77XCmCBydYBe5zJnhQln+tdXkFUrIwbjoJw4A8CABOIYUsFuSAT8DsGGgfgL9lIEGADIUgHPGAj14x6JEhHBPAbA4rAnxDxgGjMz086ygOFUP9lTCv72oA06Wih1CMLPIU4B9fGvXFPPBx+WbA54G64+6gfU3l0VmIgMYAYQgwiWo7x4EDW2bAJAf/f6MJgz4PZSbgIRnP4Fo/wlNBFeEy4Segm3AXx4Ik0itxqJr9Y+ANzJpgMumG0IHl2qd9nh5tB1s64H+4F+UPuOAPXBja4E8zEF/eBuTlD7fcMxWPcvq3lj/NJWH+fj1yvZKXkLGeROvbP+I9Z/RjF/7s14sI+7EdLbDl2BLuAncEuYSewRsDETmNNWDt2UoLHKuGJtBJGZ4uWcsuCcfijNnZ1dv12n3+Ymy2fX7JeogLe7ALJZvDPzZsj5KdnFDB94WnMY4YKOLbjmQ529q4ASM522dHxhiE9sxHG5W+6/BYA3EuhMv2bjm0MwPGnANDffdMZv4blvgaAk50csbBQppMcx4AAKEAZ7gotoA+MgQXMxwG4AE/AAoFgEogEsSAJzIArngFyIOdZYB5YDEpAGVgDNoKtYAfYDWrAAXAYNIIT4Aw4D66ATnAT3Id10QdegEHwDgwjCEJCaAgd0UIMEFPEGnFA3BBvJBAJR6KRJCQFSUcEiBiZhyxBypB1yFZkF1KL/IocR84gl5Au5C7Sg/Qjr5FPKIZSUXVUDzVDJ6BuqC8ahsai09F0NB8tQpeiq9DNaBW6H21Az6BX0JtoN/oCHcIApogxMEPMBnPD/LFILBlLw4TYAqwUK8eqsHqsGf7P17FubAD7iBNxOs7EbWBthuBxOAfPxxfgK/GteA3egLfh1/EefBD/SqARdAnWBA9CKCGRkE6YRSghlBP2Eo4RzsF900d4RyQSGURzoivcl0nETOJc4kriduJBYguxi9hLHCKRSFoka5IXKZLEJhWQSkhbSPtJp0nXSH2kD2RFsgHZgRxETiYLyMXkcvI+8inyNfIz8rCCioKpgodCpAJXYY7CaoU9Cs0KVxX6FIYpqhRzihcllpJJWUzZTKmnnKM8oLxRVFQ0UnRXnKLIV1ykuFnxkOJFxR7Fj1Q1qhXVnzqNKqauolZTW6h3qW9oNJoZjUVLphXQVtFqaWdpj2gflOhKtkqhSlylhUoVSg1K15ReKisomyr7Ks9QLlIuVz6ifFV5QEVBxUzFX4WtskClQuW4ym2VIVW6qr1qpGqO6krVfaqXVJ+rkdTM1ALVuGpL1XarnVXrpWN0Y7o/nUNfQt9DP0fvUyeqm6uHqmeql6kfUO9QH9RQ03DSiNeYrVGhcVKjm4ExzBihjGzGasZhxi3Gp3F643zH8catGFc/7tq495o6mixNnmap5kHNm5qftJhagVpZWmu1GrUeauPaVtpTtGdpV2qf0x7QUdfx1OHolOoc1rmni+pa6UbrztXdrduuO6Snrxesl6e3Re+s3oA+Q5+ln6m/Qf+Ufr8B3cDbgG+wweC0wR9MDaYvM5u5mdnGHDTUNQwxFBvuMuwwHDYyN4ozKjY6aPTQmGLsZpxmvMG41XjQxMBkssk8kzqTe6YKpm6mGaabTC+YvjczN0swW2bWaPbcXNM81LzIvM78gQXNwsci36LK4oYl0dLNMstyu2WnFWrlbJVhVWF11Rq1drHmW2+37hpPGO8+XjC+avxtG6qNr02hTZ1Njy3DNty22LbR9uUEkwnJE9ZOuDDhq52zXbbdHrv79mr2k+yL7ZvtXztYOXAcKhxuONIcgxwXOjY5vnKyduI5VTrdcaY7T3Ze5tzq/MXF1UXoUu/S72rimuK6zfW2m7pblNtKt4vuBHc/94XuJ9w/erh4FHgc9vjL08Yzy3Of5/OJ5hN5E/dM7PUy8mJ77fLq9mZ6p3jv9O72MfRh+1T5PGYZs7isvaxnvpa+mb77fV/62fkJ/Y75vff38J/v3xKABQQHlAZ0BKoFxgVuDXwUZBSUHlQXNBjsHDw3uCWEEBIWsjbkdqheKCe0NnRwkuuk+ZPawqhhMWFbwx6HW4ULw5sno5MnTV4/+UGEaYQgojESRIZGro98GGUelR/12xTilKgpFVOeRttHz4u+EEOPmRmzL+ZdrF/s6tj7cRZx4rjWeOX4afG18e8TAhLWJXQnTkicn3glSTuJn9SUTEqOT96bPDQ1cOrGqX3TnKeVTLs13Xz67OmXZmjPyJ5xcqbyTPbMIymElISUfSmf2ZHsKvZQamjqttRBjj9nE+cFl8XdwO3nefHW8Z6leaWtS3ue7pW+Pr0/wyejPGOA78/fyn+VGZK5I/N9VmRWddZIdkL2wRxyTkrOcYGaIEvQlqufOzu3K886rySvO98jf2P+oDBMuFeEiKaLmgrU4TWnXWwh/kncU+hdWFH4YVb8rCOzVWcLZrfPsZqzYs6zoqCiX+biczlzW+cZzls8r2e+7/xdC5AFqQtaFxovXLqwb1HwoprFlMVZi38vtiteV/x2ScKS5qV6Sxct7f0p+Ke6EqUSYcntZZ7LdizHl/OXd6xwXLFlxddSbunlMruy8rLPKzkrL/9s//Pmn0dWpa3qWO2yunINcY1gza21Pmtr1qmuK1rXu37y+oYNzA2lG95unLnxUrlT+Y5NlE3iTd2bwzc3bTHZsmbL560ZW29W+FUc3Ka7bcW299u5269Vsirrd+jtKNvxaSd/551dwbsaqsyqyncTdxfufronfs+FX9x+qd2rvbds75dqQXV3TXRNW61rbe0+3X2r69A6cV3//mn7Ow8EHGiqt6nfdZBxsOwQOCQ+9MevKb/eOhx2uPWI25H6o6ZHtx2jHyttQBrmNAw2ZjR2NyU1dR2fdLy12bP52G+2v1WfMDxRcVLj5OpTlFNLT42cLjo91JLXMnAm/Uxv68zW+2cTz95om9LWcS7s3MXzQefPXvC9cPqi18UTlzwuHb/sdrnxisuVhnbn9mO/O/9+rMOlo+Gq69WmTvfO5q6JXaeu+Vw7cz3g+vkboTeu3Iy42XUr7tad29Nud9/h3nl+N/vuq3uF94bvL3pAeFD6UOVh+SPdR1X/sPzHwW6X7pM9AT3tj2Me3+/l9L54InryuW/pU9rT8mcGz2qfOzw/0R/U3/nH1D/6XuS9GB4o+'; diff --git a/test/keys.template.js b/test/keys.template.js deleted file mode 100644 index 53fc5ee..0000000 --- a/test/keys.template.js +++ /dev/null @@ -1,5 +0,0 @@ -// Set a sender id and server key and save this under test/keys.js -module.exports = { - SENDER_ID : 'Your sender id here', - SERVER_KEY : 'Your server key here', -}; diff --git a/test/notification.test.js b/test/notification.test.js deleted file mode 100644 index 06807f7..0000000 --- a/test/notification.test.js +++ /dev/null @@ -1,92 +0,0 @@ -const request = require('request-promise'); -const { SENDER_ID, SERVER_KEY } = require('./keys'); -const { register, listen } = require('../src/index'); - -const NOTIFICATIONS = { - SIMPLE : { title : 'Hello world ', body : 'Test' }, - LARGE : { title : 'Hello world ', body : require('./4kb') }, -}; - -let credentials; -let client; -describe('Parser', function() { - beforeEach(async function() { - credentials = await register(SENDER_ID); - }); - - afterEach(async function() { - client.destroy(); - credentials = null; - }); - - it('should receive a simple notification', async function() { - await send(NOTIFICATIONS.SIMPLE); - const notifications = await receive(1); - expect(notifications.length).toEqual(1); - expect(notifications[0].notification.notification).toEqual( - NOTIFICATIONS.SIMPLE - ); - }); - - it('should receive a large notification', async function() { - await send(NOTIFICATIONS.LARGE); - const notifications = await receive(1); - expect(notifications.length).toEqual(1); - expect(notifications[0].notification.notification).toEqual( - NOTIFICATIONS.LARGE - ); - }); - - it('should receive multiple notifications', async function() { - await send(NOTIFICATIONS.SIMPLE); - await send(NOTIFICATIONS.LARGE); - await send(NOTIFICATIONS.SIMPLE); - - const notifications = await receive(3); - expect(notifications.length).toEqual(3); - expect(notifications[0].notification.notification).toEqual( - NOTIFICATIONS.SIMPLE - ); - expect(notifications[1].notification.notification).toEqual( - NOTIFICATIONS.LARGE - ); - expect(notifications[2].notification.notification).toEqual( - NOTIFICATIONS.SIMPLE - ); - }); -}); - -async function send(notification) { - const response = await request({ - method : 'POST', - url : 'https://fcm.googleapis.com/fcm/send', - json : true, - body : { - to : credentials.fcm.token, - notification : notification, - }, - headers : { Authorization : `key=${SERVER_KEY}` }, - }); - try { - expect(response.success).toEqual(1); - } catch (e) { - throw new Error( - `sending of notification failed: ${JSON.stringify(response)}` - ); - } - return response; -} - -async function receive(n) { - const received = []; - return new Promise(async resolve => { - const onNotification = notification => { - received.push(notification); - if (received.length === n) { - resolve(received); - } - }; - credentials.persistentIds = []; - client = await listen(credentials, onNotification); - }); -} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..34c52b9 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "rootDir": "src", + "declaration": true, + "outDir": "dist", + "module": "CommonJS", + "target": "ESNext", + "moduleResolution": "node", + "sourceMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true + }, + "exclude": [ + "src/protos.d.ts", + "dist" + ] +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 2d1485c..002c81b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,33 +2,159 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.39" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.39.tgz#91c90bb65207fc5a55128cb54956ded39e850457" +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + +"@babel/parser@^7.20.15": + version "7.22.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.3.tgz#838ae31893373222cd9062568e2192c670037e00" + integrity sha512-vrukxyW/ep8UD1UDzOYpTKQ6abgjFoeG6L+4ar9+c5TN9QnlqiOi6QK7LSR5ewm/ERyGkT/Ai6VboNrxhbr9Uw== + +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.10.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + +"@eslint-community/regexpp@^4.11.0": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + +"@eslint/config-array@^0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.18.0.tgz#37d8fe656e0d5e3dbaea7758ea56540867fd074d" + integrity sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw== dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.7.0.tgz#a1bb4b6a4e742a5ff1894b7ee76fbf884ec72bd3" + integrity sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw== + +"@eslint/eslintrc@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" + integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^10.0.1" + globals "^14.0.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@9.13.0": + version "9.13.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.13.0.tgz#c5f89bcd57eb54d5d4fa8b77693e9c28dc97e547" + integrity sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== + +"@eslint/plugin-kit@^0.2.0": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.1.tgz#cd14fe2db79fa639839dfef4105e83bad1814482" + integrity sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw== + dependencies: + levn "^0.4.1" + +"@humanfs/core@^0.19.0": + version "0.19.0" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.0.tgz#08db7a8c73bb07673d9ebd925f2dad746411fcec" + integrity sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw== + +"@humanfs/node@^0.16.5": + version "0.16.5" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.5.tgz#a9febb7e7ad2aff65890fdc630938f8d20aa84ba" + integrity sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg== + dependencies: + "@humanfs/core" "^0.19.0" + "@humanwhocodes/retry" "^0.3.0" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/retry@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" + integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew== + +"@humanwhocodes/retry@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== + +"@jsdoc/salty@^0.2.1": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@jsdoc/salty/-/salty-0.2.5.tgz#1b2fa5bb8c66485b536d86eee877c263d322f692" + integrity sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw== + dependencies: + lodash "^4.17.21" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" "@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" + integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== "@protobufjs/base64@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== "@protobufjs/codegen@^2.0.4": version "2.0.4" resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== "@protobufjs/eventemitter@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== "@protobufjs/fetch@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== dependencies: "@protobufjs/aspromise" "^1.1.1" "@protobufjs/inquire" "^1.1.0" @@ -36,2831 +162,1019 @@ "@protobufjs/float@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== "@protobufjs/inquire@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== "@protobufjs/path@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== "@protobufjs/pool@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== "@protobufjs/utf8@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== -"@types/long@^3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@types/long/-/long-3.0.32.tgz#f4e5af31e9e9b196d8e5fca8a5e2e20aa3d60b69" - -"@types/node@^8.5.5": - version "8.5.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.10.tgz#49bd3637125dea5f55d7d1e8f51efd6cb835e1f7" +"@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== -abab@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" +"@types/json-schema@^7.0.15": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" +"@types/linkify-it@*": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-3.0.2.tgz#fd2cd2edbaa7eaac7e7f3c1748b52a19143846c9" + integrity sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA== -acorn-globals@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" +"@types/markdown-it@^12.2.3": + version "12.2.3" + resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-12.2.3.tgz#0d6f6e5e413f8daaa26522904597be3d6cd93b51" + integrity sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ== dependencies: - acorn "^5.0.0" + "@types/linkify-it" "*" + "@types/mdurl" "*" -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" +"@types/mdurl@*": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-1.0.2.tgz#e2ce9d83a613bacf284c7be7d491945e39e1f8e9" + integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA== + +"@types/node@>=13.7.0": + version "17.0.39" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.39.tgz#3652d82e2a16b4ea679d5ea3143b816c91b7e113" + integrity sha512-JDU3YLlnPK3WDao6/DlXLOgSNpG13ct+CwIO17V8q0/9fWJyeMJJ/VyZ1lv8kDprihvZMydzVwf0tQOqGiY2Nw== + +"@types/node@^22.8.2": + version "22.8.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.2.tgz#8e82bb8201c0caf751dcdc61b0a262d2002d438b" + integrity sha512-NzaRNFV+FZkvK/KLCsNdTvID0SThyrs5SHB6tsD/lajr22FGC73N2QeDPM2wHtVde8mgcXuSsHQkH5cX1pbPLw== + dependencies: + undici-types "~6.19.8" + +"@typescript-eslint/eslint-plugin@^8.12.1": + version "8.12.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.1.tgz#ea39bc3c1bf9828b01e35478daede2188b471b2e" + integrity sha512-gNg/inLRcPoBsKKIe4Vv38SVSOhk4BKWNO0T56sVff33gRqtTpOsrhHtiOKD1lmIOmCtZMPaW2x/h2FlM+sCEg== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.12.1" + "@typescript-eslint/type-utils" "8.12.1" + "@typescript-eslint/utils" "8.12.1" + "@typescript-eslint/visitor-keys" "8.12.1" + graphemer "^1.4.0" + ignore "^5.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/parser@^8.12.1": + version "8.12.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.12.1.tgz#6ea637412d127eeb5726d89461ef47b152c568e7" + integrity sha512-I/I9Bg7qFa8rOgBnUUHIWTgzbB5wVkSLX+04xGUzTcJUtdq/I2uHWR9mbW6qUYJG/UmkuDcTax5JHvoEWOAHOQ== + dependencies: + "@typescript-eslint/scope-manager" "8.12.1" + "@typescript-eslint/types" "8.12.1" + "@typescript-eslint/typescript-estree" "8.12.1" + "@typescript-eslint/visitor-keys" "8.12.1" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@8.12.1": + version "8.12.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.12.1.tgz#8d1088d81786e46f714b8772c84500896899c25f" + integrity sha512-bma6sD1iViTt+y9MAwDlBdPTMCqoH/BNdcQk4rKhIZWv3eM0xHmzeSrPJA663PAqFqfpOmtdugycpr0E1mZDVA== + dependencies: + "@typescript-eslint/types" "8.12.1" + "@typescript-eslint/visitor-keys" "8.12.1" + +"@typescript-eslint/type-utils@8.12.1": + version "8.12.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.12.1.tgz#82f1c2d50e7f54e0cacde174aa397fd09946b574" + integrity sha512-zJzrvbDVjIzVKV2TGHcjembEhws8RWXJhmqfO9hS2gRXBN0gDwGhRPEdJ6AZglzfJ+YA1q09EWpSLSXjBJpIMQ== + dependencies: + "@typescript-eslint/typescript-estree" "8.12.1" + "@typescript-eslint/utils" "8.12.1" + debug "^4.3.4" + ts-api-utils "^1.3.0" + +"@typescript-eslint/types@8.12.1": + version "8.12.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.12.1.tgz#cb28d9575cf504fb297e49085c2e3f77a4e7b7e4" + integrity sha512-anMS4es5lxBe4UVcDXOkcDb3csnm5BvaNIbOFfvy/pJEohorsggdVB8MFbl5EZiEuBnZZ0ei1z7W5b6FdFiV1Q== + +"@typescript-eslint/typescript-estree@8.12.1": + version "8.12.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.1.tgz#70ea0e0cf038017edd945c2b2bd568c4c81062eb" + integrity sha512-k/o9khHOckPeDXilFTIPsP9iAYhhdMh3OsOL3i2072PNpFqhqzRHx472/0DeC8H/WZee3bZG0z2ddGRSPgeOKw== + dependencies: + "@typescript-eslint/types" "8.12.1" + "@typescript-eslint/visitor-keys" "8.12.1" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/utils@8.12.1": + version "8.12.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.12.1.tgz#937e49cf1f9696afa9e78d6e652c6fca76e821b0" + integrity sha512-sDv9yFHrhKe1WN8EYuzfhKCh/sFRupe9P+m/lZ5YgVvPoCUGHNN50IO4llSu7JAbftUM/QcCh+GeCortXPrBYQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.12.1" + "@typescript-eslint/types" "8.12.1" + "@typescript-eslint/typescript-estree" "8.12.1" + +"@typescript-eslint/visitor-keys@8.12.1": + version "8.12.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.1.tgz#d21e3c85732c4857aca9663abfade596b3f0f00d" + integrity sha512-2RwdwnNGuOQKdGjuhujQHUqBZhEuodg2sLVPvOfWktvA9sOXOVqARjOyHSyhN2LiJGKxV6c8oOcmOtRcAnEeFw== + dependencies: + "@typescript-eslint/types" "8.12.1" + eslint-visitor-keys "^3.4.3" + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.11.3: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + +acorn@^8.12.0: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + +acorn@^8.8.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== + +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - acorn "^3.0.4" + color-convert "^2.0.1" -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -acorn@^5.0.0, acorn@^5.3.0, acorn@^5.4.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -ajv-keywords@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" +bluebird@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -ajv@^4.9.1: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" + balanced-match "^1.0.0" + concat-map "0.0.1" -ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" + balanced-match "^1.0.0" -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" + fill-range "^7.0.1" -amdefine@>=0.0.4: +buffer-equal-constant-time@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-escapes@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" - -ansi-escapes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" - -ansi-regex@^2.0.0, ansi-regex@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== -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@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -ansi-styles@^3.0.0, ansi-styles@^3.1.0, ansi-styles@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" +catharsis@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.9.0.tgz#40382a168be0e6da308c277d3a2b3eb40c7d2121" + integrity sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A== dependencies: - color-convert "^1.9.0" - -any-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" + lodash "^4.17.15" -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" + ansi-styles "^4.1.0" + supports-color "^7.1.0" -app-root-path@^2.0.0: +color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" - -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: - default-require-extensions "^1.0.0" + color-name "~1.1.4" -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - -are-we-there-yet@~1.1.2: +color-name@~1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: - arr-flatten "^1.0.1" + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" -arr-flatten@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" +debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" +deep-is@^0.1.3, deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" +ecdsa-sig-formatter@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== dependencies: - array-uniq "^1.0.1" + safe-buffer "^5.0.1" -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -arrify@^1.0.0, arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" +escodegen@^1.13.0: + version "1.14.3" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" + integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" +eslint-scope@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.1.0.tgz#70214a174d4cbffbc3e8a26911d8bf51b9ae9d30" + integrity sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" +eslint-visitor-keys@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" + integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== -async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" +eslint-visitor-keys@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz#1f785cc5e81eb7534523d85922248232077d2f8c" + integrity sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg== + +eslint@^9.13.0: + version "9.13.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.13.0.tgz#7659014b7dda1ff876ecbd990f726e11c61596e6" + integrity sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.11.0" + "@eslint/config-array" "^0.18.0" + "@eslint/core" "^0.7.0" + "@eslint/eslintrc" "^3.1.0" + "@eslint/js" "9.13.0" + "@eslint/plugin-kit" "^0.2.0" + "@humanfs/node" "^0.16.5" + "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.3.1" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + escape-string-regexp "^4.0.0" + eslint-scope "^8.1.0" + eslint-visitor-keys "^4.1.0" + espree "^10.2.0" + esquery "^1.5.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^8.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + json-stable-stringify-without-jsonify "^1.0.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + text-table "^0.2.0" -async@^2.1.4: - version "2.6.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" +espree@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f" + integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww== dependencies: - lodash "^4.14.0" + acorn "^8.11.3" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.0.0" -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" +espree@^10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.2.0.tgz#f4bcead9e05b0615c968e85f83816bc386a45df6" + integrity sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g== + dependencies: + acorn "^8.12.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.1.0" -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" +espree@^9.0.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" + integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" +esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -aws4@^1.2.1, aws4@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" +esquery@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" -babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.0.0, babel-core@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.0" - debug "^2.6.8" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.7" - slash "^1.0.0" - source-map "^0.5.6" - -babel-eslint@^7.2.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" - dependencies: - babel-code-frame "^6.22.0" - babel-traverse "^6.23.1" - babel-types "^6.23.0" - babylon "^6.17.0" - -babel-generator@^6.18.0, babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-jest@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.2.2.tgz#eda38dca284e32cc5257f96a9b51351975de4e04" - dependencies: - babel-plugin-istanbul "^4.1.5" - babel-preset-jest "^22.2.0" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" - dependencies: - find-up "^2.1.0" - istanbul-lib-instrument "^1.7.5" - test-exclude "^4.1.1" - -babel-plugin-jest-hoist@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.2.0.tgz#bd34f39d652406669713b8c89e23ef25c890b993" - -babel-plugin-syntax-object-rest-spread@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - -babel-preset-jest@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.2.0.tgz#f77b43f06ef4d8547214b2e206cc76a25c3ba0e2" - dependencies: - babel-plugin-jest-hoist "^22.2.0" - babel-plugin-syntax-object-rest-spread "^6.13.0" - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.18.0, babel-types@^6.23.0, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" + estraverse "^5.2.0" -babylon@^6.17.0, babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" +estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== -bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== dependencies: - inherits "~2.0.0" + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" -bluebird@^3.5.0: - version "3.5.1" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -boolify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/boolify/-/boolify-1.0.1.tgz#b5c09e17cacd113d11b7bb3ed384cc012994d86b" +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: - hoek "2.x.x" + reusify "^1.0.4" -boom@4.x.x: - version "4.3.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: - hoek "4.x.x" + flat-cache "^4.0.0" -boom@5.x.x: - version "5.2.0" - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: - hoek "4.x.x" + to-regex-range "^5.0.1" -brace-expansion@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" + locate-path "^6.0.0" + path-exists "^4.0.0" -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" + flatted "^3.2.9" + keyv "^4.5.4" + +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -browser-process-hrtime@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -browser-resolve@^1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: - resolve "1.1.7" + is-glob "^4.0.1" -bser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: - node-int64 "^0.4.0" + is-glob "^4.0.3" -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" +glob@^8.0.0: + version "8.0.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" + integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== dependencies: - callsites "^0.2.0" + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" +graceful-fs@^4.1.9: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -camelcase-keys@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" - dependencies: - camelcase "^4.1.0" - map-obj "^2.0.0" - quick-lru "^1.0.0" +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -camelcase@^1.0.2: +http_ece@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + resolved "https://registry.yarnpkg.com/http_ece/-/http_ece-1.2.1.tgz#60c324404c477bea388e18bdd51819e988eba07e" + integrity sha512-+tzLoMYgXvicu60sVFoswTiu6BiQ6EX3DORRJQ3W2dNpNWCyZ3tcmRFZZ3jgVyw8ziWUCeUARKCkYDY6JgFx+w== -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" +ignore@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" +import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" + parent-module "^1.0.0" + resolve-from "^4.0.0" -chalk@2.3.0, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== 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" - -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + once "^1.3.0" + wrappy "1" -ci-info@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -circular-json@^0.3.1: - version "0.3.3" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -cli-cursor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: - restore-cursor "^1.0.1" + is-extglob "^2.1.1" -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - dependencies: - restore-cursor "^2.0.0" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -cli-spinners@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -cli-truncate@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: - slice-ansi "0.0.4" - string-width "^1.0.1" + argparse "^2.0.1" -cli-width@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" +js2xmlparser@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-4.0.2.tgz#2a1fdf01e90585ef2ae872a01bc169c6a8d5e60a" + integrity sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA== dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" + xmlcreate "^2.0.4" -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" +jsdoc@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-4.0.2.tgz#a1273beba964cf433ddf7a70c23fd02c3c60296e" + integrity sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg== + dependencies: + "@babel/parser" "^7.20.15" + "@jsdoc/salty" "^0.2.1" + "@types/markdown-it" "^12.2.3" + bluebird "^3.7.2" + catharsis "^0.9.0" + escape-string-regexp "^2.0.0" + js2xmlparser "^4.0.2" + klaw "^3.0.0" + markdown-it "^12.3.2" + markdown-it-anchor "^8.4.1" + marked "^4.0.10" + mkdirp "^1.0.4" + requizzle "^0.2.3" + strip-json-comments "^3.1.0" + underscore "~1.13.2" + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== -cliui@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +jsonwebtoken@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" + integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^7.5.4" + +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" +jws@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" -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" +keyv@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" -color-convert@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" +klaw@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146" + integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== dependencies: - color-name "^1.1.1" + graceful-fs "^4.1.9" -color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== dependencies: - delayed-stream "~1.0.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" -commander@^2.11.0, commander@^2.9.0: - version "2.14.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" +linkify-it@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" + integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ== + dependencies: + uc.micro "^1.0.1" -common-tags@^1.4.0: - version "1.7.2" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.7.2.tgz#24d9768c63d253a56ecff93845b44b4df1d52771" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: - babel-runtime "^6.26.0" + p-locate "^5.0.0" -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== -concat-stream@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== -content-type-parser@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" +lodash.isnumber@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== -convert-source-map@^1.4.0, convert-source-map@^1.5.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== -core-js@^2.4.0, core-js@^2.5.0: - version "2.5.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -cosmiconfig@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" - dependencies: - is-directory "^0.3.1" - js-yaml "^3.9.0" - parse-json "^4.0.0" - require-from-string "^2.0.1" +lodash.once@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== -cross-spawn@^5.0.1, cross-spawn@^5.1.0: - 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" +lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" +long@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.0.tgz#2696dadf4b4da2ce3f6f6b89186085d94d52fd61" + integrity sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w== + +long@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +markdown-it-anchor@^8.4.1: + version "8.6.4" + resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-8.6.4.tgz#affb8aa0910a504c114e9fcad53ac3a5b907b0e6" + integrity sha512-Ul4YVYZNxMJYALpKtu+ZRdrryYt/GlQ5CK+4l1bp/gWXOG2QWElt6AqF3Mih/wfUKdZbNAZVXGR73/n6U/8img== + +markdown-it@^12.3.2: + version "12.3.2" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.3.2.tgz#bf92ac92283fe983fe4de8ff8abfb5ad72cd0c90" + integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== + dependencies: + argparse "^2.0.1" + entities "~2.1.0" + linkify-it "^3.0.1" + mdurl "^1.0.1" + uc.micro "^1.0.5" + +marked@^4.0.10: + version "4.1.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.1.0.tgz#3fc6e7485f21c1ca5d6ec4a39de820e146954796" + integrity sha512-+Z6KDjSPa6/723PQYyc1axYZpYYpDnECDaU6hkaf5gqBieBkMKYReL5hteF2QizhlMbgbo8umXl/clZ67+GlsA== -cryptiles@3.x.x: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" - dependencies: - boom "5.x.x" +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== -cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.2" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -"cssstyle@>= 0.2.37 < 0.3.0": - version "0.2.37" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: - cssom "0.3.x" + braces "^3.0.2" + picomatch "^2.3.1" -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" +minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: - assert-plus "^1.0.0" - -date-fns@^1.27.2: - version "1.29.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" + brace-expansion "^1.1.7" -debug@^2.2.0, debug@^2.6.8: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" +minimatch@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" + integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== dependencies: - ms "2.0.0" + brace-expansion "^2.0.1" -debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" +minimatch@^9.0.4: + version "9.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== dependencies: - ms "2.0.0" + brace-expansion "^2.0.1" -decamelize@^1.0.0, decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +minimist@^1.2.0: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -deep-extend@~0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" - dependencies: - strip-bom "^2.0.0" +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" + wrappy "1" -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - -detect-newline@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - -diff@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" - -dlv@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.1.tgz#c79d96bfe659a5568001250ed2aaf653992bdd3f" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - dependencies: - esutils "^2.0.2" - -domexception@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - dependencies: - webidl-conversions "^4.0.2" - -ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - -elegant-spinner@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" - -error-ex@^1.2.0, error-ex@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.5.1: - version "1.10.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" - dependencies: - is-callable "^1.1.1" - is-date-object "^1.0.1" - is-symbol "^1.0.1" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -escodegen@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852" - dependencies: - esprima "^3.1.3" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.5.6" - -eslint-plugin-jest@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-20.0.3.tgz#ec15eba6ac0ab44a67ebf6e02672ca9d7e7cba29" - -eslint-scope@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint-visitor-keys@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" - -eslint@^4.0.0, eslint@^4.4.1, eslint@^4.5.0: - version "4.17.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.17.0.tgz#dc24bb51ede48df629be7031c71d9dc0ee4f3ddf" - dependencies: - ajv "^5.3.0" - babel-code-frame "^6.22.0" - chalk "^2.1.0" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" - debug "^3.1.0" - doctrine "^2.1.0" - eslint-scope "^3.7.1" - eslint-visitor-keys "^1.0.0" - espree "^3.5.2" - esquery "^1.0.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^11.0.1" - ignore "^3.3.3" - imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.9.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" - pluralize "^7.0.0" - progress "^2.0.0" - require-uncached "^1.0.3" - semver "^5.3.0" - strip-ansi "^4.0.0" - strip-json-comments "~2.0.1" - table "^4.0.1" - text-table "~0.2.0" - -espree@^3.5.2: - version "3.5.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.3.tgz#931e0af64e7fbbed26b050a29daad1fc64799fa6" - dependencies: - acorn "^5.4.0" - acorn-jsx "^3.0.0" - -esprima@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - -esprima@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" - -esquery@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" - dependencies: - estraverse "^4.0.0" - -esrecurse@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" - dependencies: - estraverse "^4.1.0" - object-assign "^4.0.1" - -estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -eventemitter3@1.x.x: - version "1.2.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" - -exec-sh@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" - dependencies: - merge "^1.1.3" - -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@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" - 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" - -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -expect@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-22.2.2.tgz#6cb6ae2eeb651a4187b9096de70333a018fab63f" - dependencies: - ansi-styles "^3.2.0" - jest-diff "^22.1.0" - jest-get-type "^22.1.0" - jest-matcher-utils "^22.2.0" - jest-message-util "^22.2.0" - jest-regex-util "^22.1.0" - -extend@~3.0.0, extend@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - -external-editor@^2.0.4: - version "2.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" - dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" - tmp "^0.0.33" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - -fast-deep-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - -fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - -fb-watchman@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" - dependencies: - bser "^2.0.0" - -figures@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" - dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fileset@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" - dependencies: - glob "^7.0.3" - minimatch "^3.0.3" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -find-parent-dir@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.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" - -flat-cache@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" - dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" - -for-in@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -form-data@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -fsevents@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.39" - -fstream-ignore@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -function-bind@^1.0.2, function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - -get-own-enumerable-property-symbols@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b" - -get-stdin@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - 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" - -glob@~7.0.6: - version "7.0.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.0.1: - version "11.3.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.3.0.tgz#e04fdb7b9796d8adac9c8f64c14837b2313378b0" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -graceful-fs@^4.1.11, graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -growly@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - -handlebars@^4.0.3: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - -har-validator@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - dependencies: - ajv "^4.9.1" - har-schema "^1.0.5" - -har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -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@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -has@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" - dependencies: - function-bind "^1.0.2" - -hawk@3.1.3, hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hawk@~6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - dependencies: - boom "4.x.x" - cryptiles "3.x.x" - hoek "4.x.x" - sntp "2.x.x" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -hoek@4.x.x: - version "4.2.0" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hosted-git-info@^2.1.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" - -html-encoding-sniffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - dependencies: - whatwg-encoding "^1.0.1" - -http-proxy@^1.16.2: - version "1.16.2" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" - dependencies: - eventemitter3 "1.x.x" - requires-port "1.x.x" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -http_ece@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/http_ece/-/http_ece-1.0.5.tgz#b60660faaf14215102d1493ea720dcd92b53372f" - dependencies: - urlsafe-base64 "~1.0.0" - -husky@^0.14.3: - version "0.14.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" - dependencies: - is-ci "^1.0.10" - normalize-path "^1.0.0" - strip-indent "^2.0.0" - -iconv-lite@0.4.19, iconv-lite@^0.4.17: - version "0.4.19" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" - -ignore@^3.2.7, ignore@^3.3.3: - version "3.3.7" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" - -import-local@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" - dependencies: - pkg-dir "^2.0.0" - resolve-cwd "^2.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - dependencies: - repeating "^2.0.0" - -indent-string@^3.0.0, indent-string@^3.1.0, indent-string@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - -inquirer@^3.0.6: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.0.4" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - -invariant@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" - dependencies: - loose-envify "^1.0.0" - -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" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - dependencies: - builtin-modules "^1.0.0" - -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" - -is-ci@^1.0.10: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" - dependencies: - ci-info "^1.0.0" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - -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-generator-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - dependencies: - is-extglob "^2.1.1" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - dependencies: - kind-of "^3.0.2" - -is-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - -is-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-0.2.0.tgz#b361311d83c6e5d726cabf5e250b0237106f5ae2" - dependencies: - symbol-observable "^0.2.2" - -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - -is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" - dependencies: - is-path-inside "^1.0.0" - -is-path-inside@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" - dependencies: - path-is-inside "^1.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - dependencies: - has "^1.0.1" - -is-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" - -is-resolvable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -istanbul-api@^1.1.14: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.1.tgz#0c60a0515eb11c7d65c6b50bba2c6e999acd8620" - dependencies: - async "^2.1.4" - fileset "^2.0.2" - istanbul-lib-coverage "^1.1.1" - istanbul-lib-hook "^1.1.0" - istanbul-lib-instrument "^1.9.1" - istanbul-lib-report "^1.1.2" - istanbul-lib-source-maps "^1.2.2" - istanbul-reports "^1.1.3" - js-yaml "^3.7.0" - mkdirp "^0.5.1" - once "^1.4.0" - -istanbul-lib-coverage@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" - -istanbul-lib-hook@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" - dependencies: - append-transform "^0.4.0" - -istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0, istanbul-lib-instrument@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e" - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.1.1" - semver "^5.3.0" - -istanbul-lib-report@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz#922be27c13b9511b979bd1587359f69798c1d425" - dependencies: - istanbul-lib-coverage "^1.1.1" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz#750578602435f28a0c04ee6d7d9e0f2960e62c1c" - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.1.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - -istanbul-reports@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.3.tgz#3b9e1e8defb6d18b1d425da8e8b32c5a163f2d10" - dependencies: - handlebars "^4.0.3" - -jest-changed-files@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.2.0.tgz#517610c4a8ca0925bdc88b0ca53bd678aa8d019e" - dependencies: - throat "^4.0.0" - -jest-cli@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.2.2.tgz#4431a93a29549da5dcb6d4a41dd03503c9198cd6" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.1" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.1.11" - import-local "^1.0.0" - is-ci "^1.0.10" - istanbul-api "^1.1.14" - istanbul-lib-coverage "^1.1.1" - istanbul-lib-instrument "^1.8.0" - istanbul-lib-source-maps "^1.2.1" - jest-changed-files "^22.2.0" - jest-config "^22.2.2" - jest-environment-jsdom "^22.2.2" - jest-get-type "^22.1.0" - jest-haste-map "^22.2.2" - jest-message-util "^22.2.0" - jest-regex-util "^22.1.0" - jest-resolve-dependencies "^22.1.0" - jest-runner "^22.2.2" - jest-runtime "^22.2.2" - jest-snapshot "^22.2.0" - jest-util "^22.2.2" - jest-worker "^22.2.2" - micromatch "^2.3.11" - node-notifier "^5.2.1" - realpath-native "^1.0.0" - rimraf "^2.5.4" - slash "^1.0.0" - string-length "^2.0.0" - strip-ansi "^4.0.0" - which "^1.2.12" - yargs "^10.0.3" - -jest-config@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.2.2.tgz#6b8ed615bc51239847d15460086f174dad4a7015" - dependencies: - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^22.2.2" - jest-environment-node "^22.2.2" - jest-get-type "^22.1.0" - jest-jasmine2 "^22.2.2" - jest-regex-util "^22.1.0" - jest-resolve "^22.2.2" - jest-util "^22.2.2" - jest-validate "^22.2.2" - pretty-format "^22.1.0" - -jest-diff@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.1.0.tgz#0fad9d96c87b453896bf939df3dc8aac6919ac38" - dependencies: - chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.1.0" - pretty-format "^22.1.0" - -jest-docblock@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.2.2.tgz#617f13edb16ec64202002b3c336cd14ae36c0631" - dependencies: - detect-newline "^2.1.0" - -jest-environment-jsdom@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.2.2.tgz#3513ccdccc2bc41daf9cdee199b7069b0d9feebc" - dependencies: - jest-mock "^22.2.0" - jest-util "^22.2.2" - jsdom "^11.5.1" - -jest-environment-node@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.2.2.tgz#570896eef2dd0f939c71bd5712ef4321958c1270" - dependencies: - jest-mock "^22.2.0" - jest-util "^22.2.2" - -jest-get-type@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" - -jest-get-type@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" - -jest-haste-map@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.2.2.tgz#9d3d5a14bd5e05ab9176979f2a5fbb4ddc80eb20" - dependencies: - fb-watchman "^2.0.0" - graceful-fs "^4.1.11" - jest-docblock "^22.2.2" - jest-worker "^22.2.2" - micromatch "^2.3.11" - sane "^2.0.0" - -jest-jasmine2@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.2.2.tgz#9065255c8f635ae9dfa33fc66068f59adf53c9aa" - dependencies: - callsites "^2.0.0" - chalk "^2.0.1" - co "^4.6.0" - expect "^22.2.2" - graceful-fs "^4.1.11" - is-generator-fn "^1.0.0" - jest-diff "^22.1.0" - jest-matcher-utils "^22.2.0" - jest-message-util "^22.2.0" - jest-snapshot "^22.2.0" - source-map-support "^0.5.0" - -jest-leak-detector@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.1.0.tgz#08376644cee07103da069baac19adb0299b772c2" - dependencies: - pretty-format "^22.1.0" - -jest-matcher-utils@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.2.0.tgz#5390f823c18c748543d463825aa8e4df0db253ca" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - pretty-format "^22.1.0" - -jest-message-util@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.2.0.tgz#84a6bb34186d8b9af7e0732fabbef63f7355f7b2" - dependencies: - "@babel/code-frame" "^7.0.0-beta.35" - chalk "^2.0.1" - micromatch "^2.3.11" - slash "^1.0.0" - stack-utils "^1.0.1" - -jest-mock@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.2.0.tgz#444b3f9488a7473adae09bc8a77294afded397a7" - -jest-regex-util@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.1.0.tgz#5daf2fe270074b6da63e5d85f1c9acc866768f53" - -jest-resolve-dependencies@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.1.0.tgz#340e4139fb13315cd43abc054e6c06136be51e31" - dependencies: - jest-regex-util "^22.1.0" - -jest-resolve@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.2.2.tgz#6f49d91e3680c86a4d5e5f72ccdab3996d1cbc19" - dependencies: - browser-resolve "^1.11.2" - chalk "^2.0.1" - -jest-runner@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.2.2.tgz#17fff27a61b63b58cf104c9cdcc0fdfccd3878ce" - dependencies: - exit "^0.1.2" - jest-config "^22.2.2" - jest-docblock "^22.2.2" - jest-haste-map "^22.2.2" - jest-jasmine2 "^22.2.2" - jest-leak-detector "^22.1.0" - jest-message-util "^22.2.0" - jest-runtime "^22.2.2" - jest-util "^22.2.2" - jest-worker "^22.2.2" - throat "^4.0.0" - -jest-runtime@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.2.2.tgz#256d0efb65deae1c23b819d88cec5ab43d7a4ed6" - dependencies: - babel-core "^6.0.0" - babel-jest "^22.2.2" - babel-plugin-istanbul "^4.1.5" - chalk "^2.0.1" - convert-source-map "^1.4.0" - exit "^0.1.2" - graceful-fs "^4.1.11" - jest-config "^22.2.2" - jest-haste-map "^22.2.2" - jest-regex-util "^22.1.0" - jest-resolve "^22.2.2" - jest-util "^22.2.2" - json-stable-stringify "^1.0.1" - micromatch "^2.3.11" - realpath-native "^1.0.0" - slash "^1.0.0" - strip-bom "3.0.0" - write-file-atomic "^2.1.0" - yargs "^10.0.3" - -jest-snapshot@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.2.0.tgz#0c0ba152d296ef70fa198cc84977a2cc269ee4cf" - dependencies: - chalk "^2.0.1" - jest-diff "^22.1.0" - jest-matcher-utils "^22.2.0" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - pretty-format "^22.1.0" - -jest-util@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.2.2.tgz#335484b6aeae0c5a1ae498401630324977fe3465" - dependencies: - callsites "^2.0.0" - chalk "^2.0.1" - graceful-fs "^4.1.11" - is-ci "^1.0.10" - jest-message-util "^22.2.0" - jest-validate "^22.2.2" - mkdirp "^0.5.1" - -jest-validate@^21.1.0: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" - dependencies: - chalk "^2.0.1" - jest-get-type "^21.2.0" - leven "^2.1.0" - pretty-format "^21.2.1" - -jest-validate@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.2.2.tgz#9cdce422c93cc28395e907ac6bbc929158d9a6ba" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^22.1.0" - -jest-worker@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.2.2.tgz#c1f5dc39976884b81f68ec50cb8532b2cbab3390" - dependencies: - merge-stream "^1.0.1" - -jest@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-22.2.2.tgz#26aca0f5e4eaa76d52f2792b14033a3d1e7be2bd" - dependencies: - import-local "^1.0.0" - jest-cli "^22.2.2" - -js-tokens@^3.0.0, js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - -js-yaml@^3.7.0, js-yaml@^3.9.0, js-yaml@^3.9.1: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - -jsdom@^11.5.1: - version "11.6.2" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.6.2.tgz#25d1ef332d48adf77fc5221fe2619967923f16bb" - dependencies: - abab "^1.0.4" - acorn "^5.3.0" - acorn-globals "^4.1.0" - array-equal "^1.0.0" - browser-process-hrtime "^0.1.2" - content-type-parser "^1.0.2" - cssom ">= 0.3.2 < 0.4.0" - cssstyle ">= 0.2.37 < 0.3.0" - domexception "^1.0.0" - escodegen "^1.9.0" - html-encoding-sniffer "^1.0.2" - left-pad "^1.2.0" - nwmatcher "^1.4.3" - parse5 "4.0.0" - pn "^1.1.0" - request "^2.83.0" - request-promise-native "^1.0.5" - sax "^1.2.4" - symbol-tree "^3.2.2" - tough-cookie "^2.3.3" - w3c-hr-time "^1.0.1" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.3" - whatwg-url "^6.4.0" - ws "^4.0.0" - xml-name-validator "^3.0.0" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - -json-parse-better-errors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz#50183cd1b2d25275de069e9e71b467ac9eab973a" - -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -kind-of@^3.0.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - dependencies: - is-buffer "^1.1.5" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -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" - -left-pad@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" - -leven@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - -levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -lint-staged@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-6.1.0.tgz#28f600c10a6cbd249ceb003118a1552e53544a93" - dependencies: - app-root-path "^2.0.0" - chalk "^2.1.0" - commander "^2.11.0" - cosmiconfig "^4.0.0" - debug "^3.1.0" - dedent "^0.7.0" - execa "^0.8.0" - find-parent-dir "^0.3.0" - is-glob "^4.0.0" - jest-validate "^21.1.0" - listr "^0.13.0" - lodash "^4.17.4" - log-symbols "^2.0.0" - minimatch "^3.0.0" - npm-which "^3.0.1" - p-map "^1.1.1" - path-is-inside "^1.0.2" - pify "^3.0.0" - staged-git-files "0.0.4" - stringify-object "^3.2.0" - -listr-silent-renderer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" - -listr-update-renderer@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - elegant-spinner "^1.0.1" - figures "^1.7.0" - indent-string "^3.0.0" - log-symbols "^1.0.2" - log-update "^1.0.2" - strip-ansi "^3.0.1" - -listr-verbose-renderer@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" - dependencies: - chalk "^1.1.3" - cli-cursor "^1.0.2" - date-fns "^1.27.2" - figures "^1.7.0" - -listr@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.13.0.tgz#20bb0ba30bae660ee84cc0503df4be3d5623887d" - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - figures "^1.7.0" - indent-string "^2.1.0" - is-observable "^0.2.0" - is-promise "^2.1.0" - is-stream "^1.1.0" - listr-silent-renderer "^1.1.1" - listr-update-renderer "^0.4.0" - listr-verbose-renderer "^0.4.0" - log-symbols "^1.0.2" - log-update "^1.0.2" - ora "^0.2.3" - p-map "^1.1.1" - rxjs "^5.4.2" - stream-to-observable "^0.2.0" - strip-ansi "^3.0.1" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.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" - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - -lodash.merge@^4.6.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54" - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - -lodash.unescape@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" - -lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.3.0: - version "4.17.5" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" - -log-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" - dependencies: - chalk "^1.0.0" - -log-symbols@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - dependencies: - chalk "^2.0.1" - -log-update@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" - dependencies: - ansi-escapes "^1.0.0" - cli-cursor "^1.0.2" - -loglevel-colored-level-prefix@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/loglevel-colored-level-prefix/-/loglevel-colored-level-prefix-1.0.0.tgz#6a40218fdc7ae15fc76c3d0f3e676c465388603e" - dependencies: - chalk "^1.1.3" - loglevel "^1.4.1" - -loglevel@^1.4.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" - -long@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -loose-envify@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - dependencies: - js-tokens "^3.0.0" - -lru-cache@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -make-plural@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/make-plural/-/make-plural-4.1.1.tgz#5658ce9d337487077daed221854c8cef9dd75749" - optionalDependencies: - minimist "^1.2.0" - -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" - dependencies: - tmpl "1.0.x" - -map-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" - -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" - -merge-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" - dependencies: - readable-stream "^2.0.1" - -merge@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - -messageformat-parser@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/messageformat-parser/-/messageformat-parser-1.1.0.tgz#13ba2250a76bbde8e0fca0dbb3475f95c594a90a" - -messageformat@^1.0.2: - version "1.1.1" - resolved "https://registry.yarnpkg.com/messageformat/-/messageformat-1.1.1.tgz#ceaa2e6c86929d4807058275a7372b1bd963bdf6" - dependencies: - glob "~7.0.6" - make-plural "^4.1.1" - messageformat-parser "^1.1.0" - nopt "~3.0.6" - reserved-words "^0.1.2" - -micromatch@^2.1.5, micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -mime-db@~1.30.0: - version "1.30.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" - -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.7: - version "2.1.17" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" - dependencies: - mime-db "~1.30.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.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - 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@^1.1.1, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -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.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - -nan@^2.3.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - -node-notifier@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" - dependencies: - growly "^1.3.0" - semver "^5.4.1" - shellwords "^0.1.1" - which "^1.3.0" - -node-pre-gyp@^0.6.39: - version "0.6.39" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" - dependencies: - detect-libc "^1.0.2" - hawk "3.1.3" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.0.2" - rc "^1.1.7" - request "2.81.0" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^2.2.1" - tar-pack "^3.4.0" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - dependencies: - abbrev "1" - osenv "^0.1.4" - -nopt@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - dependencies: - abbrev "1" - -normalize-package-data@^2.3.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" - -normalize-path@^2.0.0, normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - -npm-path@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" - dependencies: - which "^1.2.10" - -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" - dependencies: - path-key "^2.0.0" - -npm-which@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" - dependencies: - commander "^2.9.0" - npm-path "^2.0.2" - which "^1.2.10" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~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" - -nwmatcher@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" - -oauth-sign@~0.8.1, oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object-keys@^1.0.8: - version "1.0.11" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" - -object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -once@^1.3.0, once@^1.3.3, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - dependencies: - mimic-fn "^1.0.0" - -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" - -optionator@^0.8.1, optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== dependencies: deep-is "~0.1.3" - fast-levenshtein "~2.0.4" + fast-levenshtein "~2.0.6" levn "~0.3.0" prelude-ls "~1.1.2" type-check "~0.3.2" - wordwrap "~1.0.0" - -ora@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" - dependencies: - chalk "^1.1.1" - cli-cursor "^1.0.2" - cli-spinners "^0.1.2" - object-assign "^4.0.1" - -os-homedir@^1.0.0: - 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" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -osenv@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - -p-limit@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" - dependencies: - p-try "^1.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" + word-wrap "~1.2.3" -p-map@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - dependencies: - error-ex "^1.2.0" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse5@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + "@aashutoshrathi/word-wrap" "^1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: - pinkie-promise "^2.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" - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-is-inside@^1.0.1, path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + yocto-queue "^0.1.0" -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + p-limit "^3.0.2" -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: - pinkie "^2.0.0" + callsites "^3.0.0" -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - dependencies: - find-up "^2.1.0" +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -pluralize@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -pn@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -prettier-eslint-cli@^4.3.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/prettier-eslint-cli/-/prettier-eslint-cli-4.7.0.tgz#66421dd8e03ea67d6ba28d9e16b0de01559bc8ad" - dependencies: - arrify "^1.0.1" - babel-runtime "^6.23.0" - boolify "^1.0.0" - camelcase-keys "^4.1.0" - chalk "2.3.0" - common-tags "^1.4.0" - eslint "^4.5.0" - find-up "^2.1.0" - get-stdin "^5.0.1" - glob "^7.1.1" - ignore "^3.2.7" - indent-string "^3.1.0" - lodash.memoize "^4.1.2" - loglevel-colored-level-prefix "^1.0.0" - messageformat "^1.0.2" - prettier-eslint "^8.5.0" - rxjs "^5.3.0" - yargs "10.0.3" - -prettier-eslint@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-7.1.0.tgz#cba3925f90a14498bd1ebb5464c3bbba00659868" - dependencies: - common-tags "^1.4.0" - dlv "^1.1.0" - eslint "^4.5.0" - indent-string "^3.2.0" - lodash.merge "^4.6.0" - loglevel-colored-level-prefix "^1.0.0" - prettier "^1.6.0" - pretty-format "^20.0.3" - require-relative "^0.8.7" - typescript "^2.4.2" - typescript-eslint-parser "^7.0.0" - -prettier-eslint@^8.5.0: - version "8.8.1" - resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-8.8.1.tgz#38505163274742f2a0b31653c39e40f37ebd07da" - dependencies: - babel-runtime "^6.26.0" - common-tags "^1.4.0" - dlv "^1.1.0" - eslint "^4.0.0" - indent-string "^3.2.0" - lodash.merge "^4.6.0" - loglevel-colored-level-prefix "^1.0.0" - prettier "^1.7.0" - pretty-format "^22.0.3" - require-relative "^0.8.7" - typescript "^2.5.1" - typescript-eslint-parser "^11.0.0" - -prettier@^1.6.0, prettier@^1.6.1, prettier@^1.7.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.10.2.tgz#1af8356d1842276a99a5b5529c82dd9e9ad3cc93" - -pretty-format@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" - dependencies: - ansi-regex "^2.1.1" - ansi-styles "^3.0.0" - -pretty-format@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - -pretty-format@^22.0.3, pretty-format@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.1.0.tgz#2277605b40ed4529ae4db51ff62f4be817647914" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - -private@^0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - -progress@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" +protobufjs-cli@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/protobufjs-cli/-/protobufjs-cli-1.1.3.tgz#c58b8566784f0fa1aff11e8d875a31de999637fe" + integrity sha512-MqD10lqF+FMsOayFiNOdOGNlXc4iKDCf0ZQPkPR+gizYh9gqUeGTWulABUCdI+N67w5RfJ6xhgX4J8pa8qmMXQ== + dependencies: + chalk "^4.0.0" + escodegen "^1.13.0" + espree "^9.0.0" + estraverse "^5.1.0" + glob "^8.0.0" + jsdoc "^4.0.0" + minimist "^1.2.0" + semver "^7.1.2" + tmp "^0.2.1" + uglify-js "^3.7.7" -protobufjs@^6.8.0: - version "6.8.4" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.4.tgz#183f90d1c4aca5f6b34a79eaedd0d89ad21f603b" +protobufjs@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.4.0.tgz#7efe324ce9b3b61c82aae5de810d287bc08a248a" + integrity sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -2872,893 +1186,203 @@ protobufjs@^6.8.0: "@protobufjs/path" "^1.1.2" "@protobufjs/pool" "^1.1.0" "@protobufjs/utf8" "^1.1.0" - "@types/long" "^3.0.32" - "@types/node" "^8.5.5" - long "^3.2.0" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + "@types/node" ">=13.7.0" + long "^5.0.0" punycode@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - -qs@~6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" - -quick-lru@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" - -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -rc@^1.1.7: - version "1.2.5" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.5.tgz#275cd687f6e3b36cc756baa26dfee80a790301fd" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.1.4: - version "2.3.4" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -readable-stream@^2.2.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -realpath-native@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" - dependencies: - util.promisify "^1.0.0" - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - dependencies: - is-equal-shallow "^0.1.3" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - -request-promise-core@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" - dependencies: - lodash "^4.13.1" - -request-promise-native@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" - dependencies: - request-promise-core "1.1.1" - stealthy-require "^1.1.0" - tough-cookie ">=2.3.3" - -request-promise@^4.2.1: - version "4.2.2" - resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.2.2.tgz#d1ea46d654a6ee4f8ee6a4fea1018c22911904b4" - dependencies: - bluebird "^3.5.0" - request-promise-core "1.1.1" - stealthy-require "^1.1.0" - tough-cookie ">=2.3.3" - -request@2.81.0: - version "2.81.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~4.2.1" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - qs "~6.4.0" - safe-buffer "^5.0.1" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "^0.6.0" - uuid "^3.0.0" - -request@^2.81.0, request@^2.83.0: - version "2.83.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - hawk "~6.0.2" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - stringstream "~0.0.5" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.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-from-string@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.1.tgz#c545233e9d7da6616e9d59adfb39fc9f588676ff" - -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-relative@^0.8.7: - version "0.8.7" - resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" - -require-uncached@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - -requires-port@1.x.x: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - -reserved-words@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1" - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - dependencies: - resolve-from "^3.0.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - dependencies: - glob "^7.0.5" - -run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - dependencies: - is-promise "^2.1.0" - -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - -rxjs@^5.3.0, rxjs@^5.4.2: - version "5.5.6" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.6.tgz#e31fb96d6fd2ff1fd84bcea8ae9c02d007179c02" - dependencies: - symbol-observable "1.0.1" - -safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -sane@^2.0.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/sane/-/sane-2.4.1.tgz#29f991208cf28636720efdc584293e7fd66663a5" - dependencies: - anymatch "^1.3.0" - exec-sh "^0.2.0" - fb-watchman "^2.0.0" - minimatch "^3.0.2" - minimist "^1.1.1" - walker "~1.0.5" - watch "~0.18.0" - optionalDependencies: - fsevents "^1.1.1" - -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - -semver@5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - -semver@5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" +requizzle@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/requizzle/-/requizzle-0.2.3.tgz#4675c90aacafb2c036bd39ba2daa4a1cb777fded" + integrity sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ== dependencies: - shebang-regex "^1.0.0" + lodash "^4.17.14" -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -shellwords@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -signal-exit@^3.0.0, signal-exit@^3.0.2: +rimraf@^3.0.0: version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - -slice-ansi@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" - dependencies: - is-fullwidth-code-point "^2.0.0" - -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - -sntp@2.x.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" - dependencies: - hoek "4.x.x" - -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.3.tgz#2b3d5fff298cfa4d1afd7d4352d569e9a0158e76" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: - source-map "^0.6.0" + glob "^7.1.3" -source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: - amdefine ">=0.0.4" + queue-microtask "^1.2.2" -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" +safe-buffer@^5.0.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" +semver@^7.1.2: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: - spdx-license-ids "^1.0.2" - -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" - -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + lru-cache "^6.0.0" -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -sshpk@^1.7.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" +semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - -stack-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" + lru-cache "^6.0.0" -staged-git-files@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" - -stealthy-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - -stream-to-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10" +semver@^7.6.0: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== dependencies: - any-observable "^0.2.0" + lru-cache "^6.0.0" -string-length@^2.0.0: +shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" - dependencies: - astral-regex "^1.0.0" - strip-ansi "^4.0.0" - -string-width@^1.0.1, string-width@^1.0.2: - 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.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" - -string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -stringify-object@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.2.tgz#9853052e5a88fb605a44cd27445aa257ad7ffbcd" - dependencies: - get-own-enumerable-property-symbols "^2.0.1" - is-obj "^1.0.1" - is-regexp "^1.0.0" - -stringstream@~0.0.4, stringstream@~0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - -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" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: - ansi-regex "^3.0.0" + shebang-regex "^3.0.0" -strip-bom@3.0.0: +shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - dependencies: - is-utf8 "^0.2.0" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - -strip-indent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -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@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - dependencies: - has-flag "^2.0.0" - -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" - -symbol-observable@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" - -symbol-tree@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" +source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -table@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" - dependencies: - ajv "^5.2.3" - ajv-keywords "^2.1.0" - chalk "^2.1.0" - lodash "^4.17.4" - slice-ansi "1.0.0" - string-width "^2.1.1" - -tar-pack@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" - dependencies: - debug "^2.2.0" - fstream "^1.0.10" - fstream-ignore "^1.0.5" - once "^1.3.3" - readable-stream "^2.1.4" - rimraf "^2.5.1" - tar "^2.2.1" - uid-number "^0.0.6" - -tar@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -test-exclude@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" + has-flag "^4.0.0" -text-table@~0.2.0: +text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -throat@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" - -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - dependencies: - os-tmpdir "~1.0.2" - -tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - -tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" +tmp@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== dependencies: - punycode "^1.4.1" + rimraf "^3.0.0" -tr46@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: - punycode "^2.1.0" + is-number "^7.0.0" -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" +ts-api-utils@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + prelude-ls "^1.2.1" type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== dependencies: prelude-ls "~1.1.2" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - -typescript-eslint-parser@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/typescript-eslint-parser/-/typescript-eslint-parser-11.0.0.tgz#37dba6a0130dd307504aa4b4b21b0d3dc7d4e9f2" - dependencies: - lodash.unescape "4.0.1" - semver "5.4.1" - -typescript-eslint-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/typescript-eslint-parser/-/typescript-eslint-parser-7.0.0.tgz#be57d8768e37707af825e339ea2af18d7393cabb" - dependencies: - lodash.unescape "4.0.1" - semver "5.3.0" - -typescript@^2.4.2, typescript@^2.5.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.1.tgz#bb3682c2c791ac90e7c6210b26478a8da085c359" - -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -uid-number@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - -urlsafe-base64@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/urlsafe-base64/-/urlsafe-base64-1.0.0.tgz#23f89069a6c62f46cf3a1d3b00169cefb90be0c6" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -util.promisify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" - dependencies: - define-properties "^1.1.2" - object.getownpropertydescriptors "^2.0.3" - -uuid@^3.0.0, uuid@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" - -validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" - dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" +typescript@^5.6.3: + version "5.6.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" + integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== -w3c-hr-time@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" - dependencies: - browser-process-hrtime "^0.1.2" - -walker@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - dependencies: - makeerror "1.0.x" +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== -watch@~0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" - dependencies: - exec-sh "^0.2.0" - minimist "^1.2.0" +uglify-js@^3.7.7: + version "3.17.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85" + integrity sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg== -webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" +underscore@~1.13.2: + version "1.13.4" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.4.tgz#7886b46bbdf07f768e0052f1828e1dcab40c0dee" + integrity sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ== -whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3" - dependencies: - iconv-lite "0.4.19" +undici-types@~6.19.8: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== -whatwg-url@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08" +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.0" - webidl-conversions "^4.0.1" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + punycode "^2.1.0" -which@^1.2.10, which@^1.2.12, which@^1.2.9, which@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" -wide-align@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" - dependencies: - string-width "^1.0.2" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - -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" +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - dependencies: - mkdirp "^0.5.1" +xmlcreate@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/xmlcreate/-/xmlcreate-2.0.4.tgz#0c5ab0f99cdd02a81065fa9cd8f8ae87624889be" + integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== -ws@^4.0.0: +yallist@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-4.0.0.tgz#bfe1da4c08eeb9780b986e0e4d10eccd7345999f" - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - -yargs-parser@^8.0.0, yargs-parser@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" - dependencies: - camelcase "^4.1.0" - -yargs@10.0.3: - version "10.0.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.0.3.tgz#6542debd9080ad517ec5048fb454efe9e4d4aaae" - dependencies: - cliui "^3.2.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 "^8.0.0" - -yargs@^10.0.3: - version "10.1.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" - 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 "^8.1.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==