diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 6ad692a..1752d14 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 @@ -53,7 +53,6 @@ jobs: - name: Publish NPM run: | - cd dist npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 76e2458..9675041 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - name: Check out repository code @@ -38,4 +38,4 @@ jobs: - name: Unit Test run: | npm install --unsafe-perm - npm run coverage + npm run test diff --git a/.gitignore b/.gitignore index e2c76d6..c5f29c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,11 @@ node_modules -dist .tmp -package-lock.json .DS_Store .nyc_output coverage -build +.vscode + +dist/ +lib/ +build/ +types/ diff --git a/.mocharc.json b/.mocharc.json deleted file mode 100644 index ca3601d..0000000 --- a/.mocharc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "reporter": "spec", - "timeout": 60000, - "exit": true, - "require": [ - "source-map-support/register", - "ts-node/register", - "@babel/register", - "esm" - ] -} diff --git a/.mocharc.nyc.json b/.mocharc.nyc.json deleted file mode 100644 index c84ec15..0000000 --- a/.mocharc.nyc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "reporter": "spec", - "timeout": 60000, - "exit": true, - "require": [ - "source-map-support/register", - "@babel/register", - "esm" - ] -} diff --git a/.npmignore b/.npmignore index 378eac2..e9fc687 100644 --- a/.npmignore +++ b/.npmignore @@ -1 +1,58 @@ -build +# Cortex +neurons +cortex_modules +.cortex + +# Numerous always-ignore extensions +*.bak +*.patch +*.diff +*.err + +# temp file for git conflict merging +*.orig +*.log +*.rej +*.swo +*.swp +*.zip +*.vi +*~ +*.sass-cache +*.tmp.html +*.dump + +# OS or Editor folders +.DS_Store +._* +.cache +.project +.settings +.tmproj +*.esproj +*.sublime-project +*.sublime-workspace +nbproject +thumbs.db +*.iml + +# Folders to ignore +.hg +.svn +.CVS +.idea +.vscode +.gitignore +.babelrc* +.eslint* +.prettierrc* +.husky +.github +node_modules/ + +# Project files or folders to ignore +src/ +tools/ +coverage/ +specs/ +.nebula-up/ diff --git a/.swcrc b/.swcrc new file mode 100644 index 0000000..7752dbf --- /dev/null +++ b/.swcrc @@ -0,0 +1,26 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "jsc": { + "parser": { + "syntax": "typescript", + "tsx": false, + "decorators": true, + "dynamicImport": true + }, + "loose": false, + "externalHelpers": true, + "keepClassNames": false + }, + "env": { + "targets": { + "node": "17" + }, + "mode": "usage", + "coreJs": "3.33.1", + "include": ["esnext.symbol.dispose", "esnext.symbol.async-dispose"] + }, + "module": { + "type": "commonjs" + }, + "minify": false +} \ No newline at end of file diff --git a/tests/native.test.ts b/__tests__/native.test.ts similarity index 84% rename from tests/native.test.ts rename to __tests__/native.test.ts index 20c7c5f..7ee4d6f 100644 --- a/tests/native.test.ts +++ b/__tests__/native.test.ts @@ -3,17 +3,17 @@ * Created by Wu Jian Ping on - 2021/02/09. */ -import { expect } from 'chai' -import { bytesToLongLongString, hash64 } from '../dist' +import { describe, expect, test } from '@jest/globals'; +import { bytesToLongLongString, hash64 } from '../src/native' describe('native', () => { - it('bytesToLongLongString', () => { + test('bytesToLongLongString', () => { const s = '-7897618527020261406' const buffer = [146, 102, 5, 203, 5, 105, 223, 226] - expect(bytesToLongLongString(buffer)).equal(s) + expect(bytesToLongLongString(buffer)).toBe(s) }) - it('hash64', () => { + test('hash64', () => { const testData = [ { keyNo: 'f10011b64aa4e7503cd45a7fdc24387b', a: '2852836996923339651', b: '-6853534673140605817' }, { keyNo: 'f1bc319830aa4bd525b6b211fc128e5e', a: '-6331077761356739522', b: '6750279366282124699' }, @@ -29,11 +29,11 @@ describe('native', () => { { keyNo: '5608c68f0f84a28a5c8c0479ebbd69c1', a: '8004344832703457518', b: '4306029215693896848' }, { keyNo: '科技型企业', a: '-6865176517154056019', b: '8588244832922351093' } ] - + for (const sample of testData) { const data = hash64(sample.keyNo) - expect(data[0]).equal(sample.a) - expect(data[1]).equal(sample.b) + expect(data[0]).toBe(sample.a) + expect(data[1]).toBe(sample.b) } }) }) diff --git a/__tests__/nebula.test.ts b/__tests__/nebula.test.ts new file mode 100644 index 0000000..a218b0d --- /dev/null +++ b/__tests__/nebula.test.ts @@ -0,0 +1,108 @@ +/* eslint-disable max-len */ +/** + * Created by Wu Jian Ping on - 2021/06/09. + */ + +import createClient, { type ClientOption } from '../src'; +import { describe, expect, test } from '@jest/globals'; + +const defaultClientOption: ClientOption = { + servers: ['127.0.0.1:9669'], + userName: 'root', + password: 'nebula', + space: 'nebula_node', + pingInterval: 5000, + poolSize: 1 +} + +const executeCmd = async (cmd: string, clientOption = defaultClientOption) => { + const client = createClient(clientOption); + const response = await client.execute(cmd); + return { + response, + async [Symbol.asyncDispose]() { + await client.close(); + }, + }; +}; + +const testCases = [ + { + name: 'getSubgraph', + cmd: 'get subgraph with prop 2 steps from "p001" yield vertices as nodes, edges as relationships', + valid: (res: any) => { + expect(res.data?.nodes?.length).toBeGreaterThan(0); + expect(res.data?.relationships?.length).toBeGreaterThan(0); + }, + }, + { + name: 'fetProps', + cmd: 'fetch prop on company "c001" yield properties(vertex) as node', + valid: (res: any) => { + expect(res.data?.node?.length).toBeGreaterThan(0); + }, + }, + { + name: 'goFrom', + cmd: 'go from "c001" over employee yield properties($^) as a, properties($$) as b, properties(edge) as p', + valid: (res: any) => { + expect(res.data?.a?.length).toBeGreaterThan(0); + expect(res.data?.b?.length).toBeGreaterThan(0); + expect(res.data?.p?.length).toBeGreaterThan(0); + }, + }, + { + name: 'findNoloopPath', + cmd: 'find noloop path with prop from "p001" to "p002" over * yield path as p', + valid: (res: any) => { + expect(res.data?.p?.length).toBeGreaterThan(0); + }, + }, + { + name: 'returnList', + cmd: 'RETURN list[1, 2, 3] AS a', + valid: (res: any) => { + expect(res.data?.a).toStrictEqual([[1, 2, 3]]); + }, + }, + { + name: 'unwindList', + cmd: 'UNWIND list[list[1, 2, 3], list[2, 3, 4]] as a RETURN a', + valid: (res: any) => { + expect(res.data?.a).toStrictEqual([ + [1, 2, 3], + [2, 3, 4], + ]); + }, + }, + { + name: 'returnSet', + cmd: 'RETURN set{1, 2, 3} AS a', + valid: (res: any) => { + expect(res.data?.a?.length).toEqual(1); + expect(res.data?.a[0]?.length).toEqual(3); + }, + }, + { + name: 'returnMap', + cmd: 'RETURN map{a: LIST[1,2], b: SET{1,2,1}, c: "hee"} as a', + valid: (res: any) => { + expect(res.data?.a?.length).toEqual(1); + expect(res.data?.a[0]?.a).toStrictEqual([1, 2]); + expect(res.data?.a[0]?.b?.length).toEqual(2); + expect(res.data?.a[0]?.c).toEqual('hee'); + }, + }, + { + name: 'explain', + cmd: 'EXPLAIN format="dot" match (v) return v limit 3', + valid: (res: any) => {}, + }, +]; + +describe('nebula', () => testCases.forEach((testCase) => { + test(testCase.name, async () => { + await using result = await executeCmd(testCase.cmd); + testCase.valid(result.response); + }); +})); diff --git a/tests/test-data.md b/__tests__/test-data.md similarity index 100% rename from tests/test-data.md rename to __tests__/test-data.md diff --git a/__tests__/tsconfig.json b/__tests__/tsconfig.json new file mode 100644 index 0000000..435f97c --- /dev/null +++ b/__tests__/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../tsconfig.json", + "include": ["./**/*.ts"], +} \ No newline at end of file diff --git a/babel.config.json b/babel.config.json deleted file mode 100644 index d47e0d8..0000000 --- a/babel.config.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "presets": [ - [ - "@babel/env", - { - "modules": "auto", - "targets": { - "node": true - }, - "useBuiltIns": false - } - ], - [ - "@babel/preset-typescript", { - "allowNamespaces": true, - "allowDeclareFields": true - } - ] - ], - "plugins": [ - "istanbul", - "add-module-exports", - [ - "@babel/plugin-transform-runtime", - { - "absoluteRuntime": false, - "corejs": false, - "helpers": true, - "regenerator": true, - "useESModules": false - } - ], - "@babel/plugin-proposal-function-bind", - "@babel/plugin-proposal-export-default-from", - "@babel/plugin-proposal-logical-assignment-operators", - [ - "@babel/plugin-proposal-optional-chaining", { - "loose": false - } - ], - [ - "@babel/plugin-proposal-pipeline-operator", { - "proposal": "minimal" - } - ], - [ - "@babel/plugin-proposal-nullish-coalescing-operator", { - "loose": false - } - ], - "@babel/plugin-proposal-do-expressions", - - [ - "@babel/plugin-proposal-decorators", { - "legacy": true - } - ], - "@babel/plugin-proposal-function-sent", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions", - - "@babel/plugin-syntax-dynamic-import", - "@babel/plugin-syntax-import-meta", - [ - "@babel/plugin-proposal-class-properties", { - "loose": false - } - ], - "@babel/plugin-proposal-json-strings" - ], - "generatorOpts": { - "compact": false - } -} diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..f23aec6 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,10 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} */ +module.exports = { + transform: { + '^.+\\.(t|j)sx?$': ['@swc/jest'], + }, + roots: ["/src/", "/__tests__/"], + testEnvironment: 'node', + collectCoverage: true, + collectCoverageFrom: ["**/*.ts", "!**/*.d.ts", "!**/node_modules/**"], +}; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..9f75baa --- /dev/null +++ b/package-lock.json @@ -0,0 +1,10382 @@ +{ + "name": "@nebula-contrib/nebula-nodejs", + "version": "3.1.0-beta.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@nebula-contrib/nebula-nodejs", + "version": "3.1.0-beta.1", + "license": "Apache 2.0 License", + "dependencies": { + "@swc/helpers": "^0.5.3", + "bindings": "^1.5.0", + "browser-or-node": "^1.2.1", + "core-js": "^3.33.1", + "isomorphic-ws": "^4.0.1", + "lodash": "^4.17.21", + "node-addon-api": "^7.0.0", + "node-int64": "^0.4.0", + "q": "^1.5.0", + "thrift": "^0.19.0", + "ws": "^5.2.2" + }, + "devDependencies": { + "@istanbuljs/nyc-config-babel": "^3.0.0", + "@istanbuljs/nyc-config-typescript": "^1.0.1", + "@jest/globals": "^29.7.0", + "@swc/cli": "^0.1.62", + "@swc/core": "^1.3.93", + "@swc/jest": "^0.2.29", + "@types/bindings": "^1.5.2", + "@types/chai": "^4.2.18", + "@types/esm": "^3.2.0", + "@types/glob": "^7.1.3", + "@types/lodash": "^4.14.170", + "@types/node": "^14.18.63", + "@types/thrift": "^0.10.14", + "@typescript-eslint/eslint-plugin": "^4.27.0", + "@typescript-eslint/parser": "^4.27.0", + "assert": "^2.0.0", + "babel-eslint": "^10.1.0", + "chai": "^4.3.4", + "chalk": "^4.1.2", + "cowsay": "^1.5.0", + "cross-env": "^7.0.3", + "eslint": "^7.28.0", + "eslint-config-airbnb-base": "^14.2.0", + "eslint-config-semistandard": "^15.0.1", + "eslint-config-standard": "^16.0.3", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-jsdoc": "^32.3.4", + "eslint-plugin-node": "^11.0.0", + "eslint-plugin-prefer-arrow": "^1.2.2", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^5.0.0", + "esm": "^3.2.25", + "jest": "^29.7.0", + "mkdirp": "^0.5.1", + "node-gyp": "^9.4.0", + "nyc": "^15.1.0", + "open": "^7.4.2", + "rimraf": "^3.0.2", + "ts-jest": "^29.1.1", + "typescript": "^5.2.2", + "which": "^2.0.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", + "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", + "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helpers": "^7.23.2", + "@babel/parser": "^7.23.0", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.2", + "@babel/types": "^7.23.0", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", + "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", + "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.2", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", + "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/register": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.22.15.tgz", + "integrity": "sha512-V3Q3EqoQdn65RCgTLwauZaTfd1ShhwPmbBv+1dkZV/HpCGMKVyn6oFcRlI7RaKqiDQjX2Qd3AuoEguBgdjIKlg==", + "dev": true, + "peer": true, + "dependencies": { + "clone-deep": "^4.0.1", + "find-cache-dir": "^2.0.0", + "make-dir": "^2.1.0", + "pirates": "^4.0.5", + "source-map-support": "^0.5.16" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/nyc-config-babel": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/nyc-config-babel/-/nyc-config-babel-3.0.0.tgz", + "integrity": "sha512-mPnSPXfTRWCzYsT64PnuPlce6/hGMCdVVMgU2FenXipbUd+FDwUlqlTihXxpxWzcNVOp8M+L1t/kIcgoC8A7hg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "@babel/register": "*", + "babel-plugin-istanbul": ">=5" + } + }, + "node_modules/@istanbuljs/nyc-config-typescript": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-1.0.2.tgz", + "integrity": "sha512-iKGIyMoyJuFnJRSVTZ78POIRvNnwZaWIf8vG4ZS3rQq58MMDrqEX2nnzx0R28V2X8JvmKYiqY9FP2hlJsm8A0w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "nyc": ">=15" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/create-cache-key-function": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz", + "integrity": "sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==", + "dev": true, + "dependencies": { + "@jest/types": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/create-cache-key-function/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/create-cache-key-function/node_modules/@types/yargs": { + "version": "16.0.7", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.7.tgz", + "integrity": "sha512-lQcYmxWuOfJq4IncK88/nwud9rwr1F04CFc5xzk0k4oKVyz/AI35TfsXmhjf6t8zp8mpCOi17BfvuNWx+zrYkg==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", + "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@mole-inc/bin-wrapper": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@mole-inc/bin-wrapper/-/bin-wrapper-8.0.1.tgz", + "integrity": "sha512-sTGoeZnjI8N4KS+sW2AN95gDBErhAguvkw/tWdCjeM8bvxpz5lqrnd0vOJABA1A+Ic3zED7PYoLP/RANLgVotA==", + "dev": true, + "dependencies": { + "bin-check": "^4.1.0", + "bin-version-check": "^5.0.0", + "content-disposition": "^0.5.4", + "ext-name": "^5.0.0", + "file-type": "^17.1.6", + "filenamify": "^5.0.2", + "got": "^11.8.5", + "os-filter-obj": "^2.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/fs/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/fs/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@swc/cli": { + "version": "0.1.62", + "resolved": "https://registry.npmjs.org/@swc/cli/-/cli-0.1.62.tgz", + "integrity": "sha512-kOFLjKY3XH1DWLfXL1/B5MizeNorHR8wHKEi92S/Zi9Md/AK17KSqR8MgyRJ6C1fhKHvbBCl8wboyKAFXStkYw==", + "dev": true, + "dependencies": { + "@mole-inc/bin-wrapper": "^8.0.1", + "commander": "^7.1.0", + "fast-glob": "^3.2.5", + "semver": "^7.3.8", + "slash": "3.0.0", + "source-map": "^0.7.3" + }, + "bin": { + "spack": "bin/spack.js", + "swc": "bin/swc.js", + "swcx": "bin/swcx.js" + }, + "engines": { + "node": ">= 12.13" + }, + "peerDependencies": { + "@swc/core": "^1.2.66", + "chokidar": "^3.5.1" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@swc/cli/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/cli/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/cli/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@swc/core": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.94.tgz", + "integrity": "sha512-jTHn8UJOGgERKZLy8euEixVAzC/w/rUSuMlM3e7hxgap/TC595hSkuQwtkpL238dsuEPveD44GMy2A5UBtSvjg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@swc/counter": "^0.1.1", + "@swc/types": "^0.1.5" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.3.94", + "@swc/core-darwin-x64": "1.3.94", + "@swc/core-linux-arm-gnueabihf": "1.3.94", + "@swc/core-linux-arm64-gnu": "1.3.94", + "@swc/core-linux-arm64-musl": "1.3.94", + "@swc/core-linux-x64-gnu": "1.3.94", + "@swc/core-linux-x64-musl": "1.3.94", + "@swc/core-win32-arm64-msvc": "1.3.94", + "@swc/core-win32-ia32-msvc": "1.3.94", + "@swc/core-win32-x64-msvc": "1.3.94" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.94.tgz", + "integrity": "sha512-KNuE6opIy/wAXiGUWLhGWhCG3wA/AdjG6eYkv6dstrAURLaQMAoD8vDfVm8pxS8FA8Kx+0Z4QiDNPqk5aKIsqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.94.tgz", + "integrity": "sha512-HypemhyehQrLqXwfJv5ronD4BMAXdgMCP4Ei7rt3B6Ftmt9axwGvdwGiXxsYR9h1ncyxoVxN+coGxbNIhKhahw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.94.tgz", + "integrity": "sha512-KzKN54c7Y6X1db+bBVSXG4+bXmAPvXtDWk+TgwNJH4yYliOrnP/RKkHA5QZ9VFSnqJF06/sAO4kYBiL/aVQDBQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.94.tgz", + "integrity": "sha512-iAcR8Ho0Uck/SLSrgYfXkpcGOXuN5waMZO7GlL/52QODr7GJtOfZ0H1MCZLbIFkPJp/iXoJpYgym4d/qSd477Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.94.tgz", + "integrity": "sha512-VCHL1Mb9ENHx+sAeubSSg481MUeP9/PYzPPy9tfswunj/w35M+vEWflwK2dzQL9kUTFD3zcFTpAgsKnj6aX24w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.94.tgz", + "integrity": "sha512-gjq7U6clhJi0Oel2a4gwR4MbSu+THQ2hmBNVCOSA3JjPZWZTkJXaJDpnh/r7PJxKBwUDlo0VPlwiwjepAQR2Rw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.94.tgz", + "integrity": "sha512-rSylruWyeol2ujZDHmwiovupMR5ukMXivlA7DDxmQ1dFUV9HuiPknQrU5rEbI3V2V3V5RkpbEKjnADen7AeMPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.94.tgz", + "integrity": "sha512-OenDUr5MQkz506ebVQq6ezoZ3GZ26nchgf5mPnwab4gx2TEiyR9zn7MdX5LWskTmOK3+FszPbGK0B5oLK6Y5yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.94.tgz", + "integrity": "sha512-mi6NcmtJKnaiHAxLtVz+WzunscsEwPdA0j15DuiYVx06Xo+MdRLJj4eVBgVLwGD1AI3IqKs4MVVx2cD7n0h5mg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.3.94", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.94.tgz", + "integrity": "sha512-Ba0ZLcGMnqPWWF9Xa+rWhhnkpvE7XoQegMP/VCF2JIHb2ieGBC8jChO6nKRFKZjib/3wghGzxakyDQx3LDhDug==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz", + "integrity": "sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==", + "dev": true + }, + "node_modules/@swc/helpers": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.3.tgz", + "integrity": "sha512-FaruWX6KdudYloq1AHD/4nU+UsMTdNE8CKyrseXWEcgjDAbvkwJg2QGPAnfIJLIWsjZOSPLOAykK6fuYp4vp4A==", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@swc/jest": { + "version": "0.2.29", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.29.tgz", + "integrity": "sha512-8reh5RvHBsSikDC3WGCd5ZTd2BXKkyOdK7QwynrCH58jk2cQFhhHhFBg/jvnWZehUQe/EoOImLENc9/DwbBFow==", + "dev": true, + "dependencies": { + "@jest/create-cache-key-function": "^27.4.2", + "jsonc-parser": "^3.2.0" + }, + "engines": { + "npm": ">= 7.0.0" + }, + "peerDependencies": { + "@swc/core": "*" + } + }, + "node_modules/@swc/types": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", + "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==", + "dev": true + }, + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "dev": true, + "dependencies": { + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "dev": true + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.3", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.3.tgz", + "integrity": "sha512-54fjTSeSHwfan8AyHWrKbfBWiEUrNTZsUwPTDSNaaP1QDQIZbeNUg3a59E9D+375MzUw/x1vx2/0F5LBz+AeYA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.6", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.6.tgz", + "integrity": "sha512-66BXMKb/sUWbMdBNdMvajU7i/44RkrA3z/Yt1c7R5xejt8qh84iU54yUWCtm0QwGJlDcf/gg4zd/x4mpLAlb/w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.3.tgz", + "integrity": "sha512-ciwyCLeuRfxboZ4isgdNZi/tkt06m8Tw6uGbBSBgWrnnZGNXiEyM27xc/PjXGQLqlZ6ylbgHMnm7ccF9tCkOeQ==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.3", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.3.tgz", + "integrity": "sha512-Lsh766rGEFbaxMIDH7Qa+Yha8cMVI3qAK6CHt3OR0YfxOIn5Z54iHiyDRycHrBqeIiqGa20Kpsv1cavfBKkRSw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/bindings": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@types/bindings/-/bindings-1.5.3.tgz", + "integrity": "sha512-u/KebkhMlcst1X5dnj8n1DB6pjhVRe1P0k7SJT1Dv9fHfC8Y6N9Hncc/2mAE977h5oMH/ibGv0rvfgY6kS1cRQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "dev": true, + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, + "node_modules/@types/chai": { + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.9.tgz", + "integrity": "sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg==", + "dev": true + }, + "node_modules/@types/esm": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@types/esm/-/esm-3.2.1.tgz", + "integrity": "sha512-kEl28dU4KvsivGF/acxUuPY2gaLPLVbeyvCa97nGS9u2pN14uLQ6/mKtkTNJ3/8cmKzYq8vnvkC0y/zjuO78Vg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.8.tgz", + "integrity": "sha512-NhRH7YzWq8WiNKVavKPBmtLYZHxNY19Hh+az28O/phfp68CF45pMFud+ZzJ8ewnxnC5smIdF3dqFeiSUQ5I+pw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", + "integrity": "sha512-V46MYLFp08Wf2mmaBhvgjStM3tPa+2GAdy/iqoX+noX1//zje2x4XmrIU0cAwyClATsTmahbtoQ2EwP7I5WSiA==", + "dev": true + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-zONci81DZYCZjiLe0r6equvZut0b+dBRPBN5kBDjsONnutYNtJMoWQ9uR2RkL1gLG9NMTzvf+29e5RFfPbeKhQ==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.2.tgz", + "integrity": "sha512-8toY6FgdltSdONav1XtUHl4LN1yTmLza+EuDazb/fEmRNCwjyqNVIQWs2IfC74IqjHkREs/nQ2FWq5kZU9IC0w==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.3.tgz", + "integrity": "sha512-1nESsePMBlf0RPRffLZi5ujYh7IH1BWL4y9pr+Bn3cJBdxz+RTP8bUFljLz9HvzhhOSWKdyBZ4DIivdL6rvgZg==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz", + "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==", + "dev": true + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/lodash": { + "version": "4.14.200", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.200.tgz", + "integrity": "sha512-YI/M/4HRImtNf3pJgbF+W6FrXovqj+T+/HpENLTooK9PnkacBsDpeP3IpHab40CClUfhNmdM2WTNP2sa2dni5Q==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "14.18.63", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", + "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==", + "dev": true + }, + "node_modules/@types/node-int64": { + "version": "0.4.31", + "resolved": "https://registry.npmjs.org/@types/node-int64/-/node-int64-0.4.31.tgz", + "integrity": "sha512-nkuJrHfmjsE3oJzbkygfRYX1tDMhBxj5LTZzP/GIGbBze6QXM6Juz6vxh9K8Y5OJODqAciY6gxdYNRqNgxsaEA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/q": { + "version": "1.5.7", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.7.tgz", + "integrity": "sha512-HBPgtzp44867rkL+IzQ3560/E/BlobwCjeXsuKqogrcE99SKgZR4tvBBCuNJZMhUFMz26M7cjKWZg785lllwpA==", + "dev": true + }, + "node_modules/@types/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha512-/4YQT5Kp6HxUDb4yhRkm0bJ7TbjvTddqX7PZ5hz6qV3pxSo72f/6YPRo+Mu2DU307tm9IioO69l7uAwn5XNcFA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.2.tgz", + "integrity": "sha512-g7CK9nHdwjK2n0ymT2CW698FuWJRIx+RP6embAzZ2Qi8/ilIrA1Imt2LVSeHUzKvpoi7BhmmQcXz95eS0f2JXw==", + "dev": true + }, + "node_modules/@types/thrift": { + "version": "0.10.15", + "resolved": "https://registry.npmjs.org/@types/thrift/-/thrift-0.10.15.tgz", + "integrity": "sha512-3D92M0dQhyXojzV0NQpp8L5OsM3nyScAhvqe7yjng5FfnSBo2/yP2bYS4Wqk8AGBsjEAksp+VZ2720pVsjSmsA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/node-int64": "*", + "@types/q": "*" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.29", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.29.tgz", + "integrity": "sha512-nacjqA3ee9zRF/++a3FUY1suHTFKZeHba2n8WeDw9cCVdmzmHpIxyzOJBcpHvvEmS8E9KqWlSnWHUkOrkhWcvA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.2.tgz", + "integrity": "sha512-5qcvofLPbfjmBfKaLfj/+f+Sbd6pN4zl7w7VSVI5uz7m9QZTuB2aZAa2uo1wHFBNN2x6g/SoTkXmd8mQnQF2Cw==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", + "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/experimental-utils": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", + "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "debug": "^4.3.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "dev": true, + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "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" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + }, + "node_modules/arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", + "dev": true + }, + "node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/assert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/babel-eslint": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", + "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", + "deprecated": "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + }, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "eslint": ">= 4.12.1" + } + }, + "node_modules/babel-eslint/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/bin-check": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", + "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", + "dev": true, + "dependencies": { + "execa": "^0.7.0", + "executable": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-version": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-6.0.0.tgz", + "integrity": "sha512-nk5wEsP4RiKjG+vF+uG8lFsEn4d7Y6FVDamzzftSunXOoOcOOkzcWdKVlGgFFwlUQCj63SgnUkLLGF8v7lufhw==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "find-versions": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bin-version-check": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-5.1.0.tgz", + "integrity": "sha512-bYsvMqJ8yNGILLz1KP9zKLzQ6YpljV3ln1gqhuLkUtyfGi3qXKGuK2p+U4NAvjVFzDFiBBtOpCOSFNuYYEGZ5g==", + "dev": true, + "dependencies": { + "bin-version": "^6.0.0", + "semver": "^7.5.3", + "semver-truncate": "^3.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bin-version-check/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/bin-version-check/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/bin-version-check/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/bin-version/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/bin-version/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bin-version/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bin-version/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-or-node": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-1.3.0.tgz", + "integrity": "sha512-0F2z/VSnLbmEeBcUrSuDH5l0HxTXdQQzLjkmBR4cYfvg1zJrKSlmIZFqyFR8oX0NrwPhy3c3HQ6i3OxMbew4Tg==" + }, + "node_modules/browserslist": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001541", + "electron-to-chromium": "^1.4.535", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "dev": true, + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cacache/node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/cacache/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "dev": true, + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/caching-transform/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caching-transform/node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/call-bind": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.4.tgz", + "integrity": "sha512-e68w37XfAb5fL5M3NTxqKLcXRUkL2/kFlQjQjE/8jvPMBKmO5ZDycRkS/DrZRXjegOzwWzEwW88m+8r+D0PUUA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001551", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001551.tgz", + "integrity": "sha512-vtBAez47BoGMMzlbYhfXrMV1kvRF2WP/lqiMuDu1Sb4EE4LKEgjopFDSRtZfdVnslNRpOqV/woE+Xgrwj6VQlg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chai": { + "version": "4.3.10", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", + "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "peer": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/comment-parser": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.5.tgz", + "integrity": "sha512-RePCE4leIhBlmrqiYTvaqEeGYg7qpSl4etaIabKtdOQVi+mSTIBBklGUwIr79GXYnl3LpMwmDw4KeR2stNc6FA==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/core-js": { + "version": "3.33.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.1.tgz", + "integrity": "sha512-qVSq3s+d4+GsqN0teRCJtM6tdEEXyWxjzbhVrCHmBS5ZTM0FS2MOS0D13dUXAWDUN6a+lHI/N1hF9Ytz6iLl9Q==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/cowsay": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/cowsay/-/cowsay-1.5.0.tgz", + "integrity": "sha512-8Ipzr54Z8zROr/62C8f0PdhQcDusS05gKTS87xxdji8VbWefWly0k8BwGK7+VqamOrkv3eGsCkPtvlHzrhWsCA==", + "dev": true, + "dependencies": { + "get-stdin": "8.0.0", + "string-width": "~2.1.1", + "strip-final-newline": "2.0.0", + "yargs": "15.4.1" + }, + "bin": { + "cowsay": "cli.js", + "cowthink": "cli.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dedent": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-require-extensions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", + "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", + "dev": true, + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.561", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.561.tgz", + "integrity": "sha512-eS5t4ulWOBfVHdq9SW2dxEaFarj1lPjvJ8PaYMOjY0DecBaj/t4ARziL2IPpDr4atyWwjLFGQ2vo/VCgQFezVQ==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", + "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-airbnb-base": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", + "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "dev": true, + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "eslint": "^5.16.0 || ^6.8.0 || ^7.2.0", + "eslint-plugin-import": "^2.22.1" + } + }, + "node_modules/eslint-config-semistandard": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-semistandard/-/eslint-config-semistandard-15.0.1.tgz", + "integrity": "sha512-sfV+qNBWKOmF0kZJll1VH5XqOAdTmLlhbOl9WKI11d2eMEe+Kicxnpm24PQWHOqAfk5pAWU2An0LjNCXKa4Usg==", + "dev": true, + "peerDependencies": { + "eslint": ">=6.0.1", + "eslint-config-standard": ">=14.1.0", + "eslint-plugin-import": ">=2.18.0", + "eslint-plugin-node": ">=9.1.0", + "eslint-plugin-promise": ">=4.2.1", + "eslint-plugin-standard": ">=4.0.0" + } + }, + "node_modules/eslint-config-standard": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", + "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peerDependencies": { + "eslint": "^7.12.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1 || ^5.0.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-es": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "dev": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.28.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", + "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.findlastindex": "^1.2.2", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "has": "^1.0.3", + "is-core-module": "^2.13.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.6", + "object.groupby": "^1.0.0", + "object.values": "^1.1.6", + "semver": "^6.3.1", + "tsconfig-paths": "^3.14.2" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-jsdoc": { + "version": "32.3.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-32.3.4.tgz", + "integrity": "sha512-xSWfsYvffXnN0OkwLnB7MoDDDDjqcp46W7YlY1j7JyfAQBQ+WnGCfLov3gVNZjUGtK9Otj8mEhTZTqJu4QtIGA==", + "dev": true, + "dependencies": { + "comment-parser": "1.1.5", + "debug": "^4.3.1", + "jsdoctypeparser": "^9.0.0", + "lodash": "^4.17.21", + "regextras": "^0.7.1", + "semver": "^7.3.5", + "spdx-expression-parse": "^3.0.1" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/eslint-plugin-node": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "dev": true, + "dependencies": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "peerDependencies": { + "eslint": ">=5.16.0" + } + }, + "node_modules/eslint-plugin-node/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-plugin-node/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-prefer-arrow": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz", + "integrity": "sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==", + "dev": true, + "peerDependencies": { + "eslint": ">=2.0.0" + } + }, + "node_modules/eslint-plugin-promise": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz", + "integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-plugin-standard": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-5.0.0.tgz", + "integrity": "sha512-eSIXPc9wBM4BrniMzJRBm2uoVuXz2EPa+NXPk2+itrVt+r5SbKFERx/IgrK/HmfjddyKVz2f+j+7gBRvu19xLg==", + "deprecated": "standard 16.0.0 and eslint-config-standard 16.0.0 no longer require the eslint-plugin-standard package. You can remove it from your dependencies with 'npm rm eslint-plugin-standard'. More info here: https://github.com/standard/standard/issues/1316", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/eslint/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==", + "dev": true, + "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" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/execa/node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/execa/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/execa/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/execa/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + }, + "node_modules/executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "dependencies": { + "pify": "^2.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "dev": true + }, + "node_modules/ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "dev": true, + "dependencies": { + "mime-db": "^1.28.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "dev": true, + "dependencies": { + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "dependencies": { + "@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" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/file-type": { + "version": "17.1.6", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", + "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", + "dev": true, + "dependencies": { + "readable-web-to-node-stream": "^3.0.2", + "strtok3": "^7.0.0-alpha.9", + "token-types": "^5.0.0-alpha.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/filename-reserved-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-3.0.0.tgz", + "integrity": "sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/filenamify": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-5.1.1.tgz", + "integrity": "sha512-M45CbrJLGACfrPOkrTp3j2EcO9OBkKUYME0eiqOCa7i2poaklU0jhlIaMlr8ijLorT0uLAzrn3qXOp5684CkfA==", + "dev": true, + "dependencies": { + "filename-reserved-regex": "^3.0.0", + "strip-outer": "^2.0.0", + "trim-repeated": "^2.0.0" + }, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "peer": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-versions": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-5.1.0.tgz", + "integrity": "sha512-+iwzCJ7C5v5KgcBuueqVoNiHVoQpwiUK5XFLjf0affFTep+Wcw93tPvmb8tqujDNmzhBDPddnWV/qgWSXgq+Hg==", + "dev": true, + "dependencies": { + "semver-regex": "^4.0.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", + "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "dev": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/gauge/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/gauge/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "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" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, + "node_modules/hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hasha/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "dev": true, + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dev": true, + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "dev": true + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true + }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "peer": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", + "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-changed-files/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/jest-changed-files/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-changed-files/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-changed-files/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-cli/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-cli/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-cli/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/jest-cli/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-cli/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsdoctypeparser": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", + "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", + "dev": true, + "bin": { + "jsdoctypeparser": "bin/jsdoctypeparser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "peer": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "peer": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "dev": true, + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-collect/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-fetch/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-addon-api": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz", + "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==" + }, + "node_modules/node-gyp": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.4.0.tgz", + "integrity": "sha512-dMXsYP6gc9rRbejLXmTbVRYjAHw7ppswsKyMxuxJxxOHzluIO1rGp9TOQgjFJ+2MCqcOcQTOPB/8Xwhr+7s4Eg==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^11.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.13 || ^14.13 || >=16" + } + }, + "node_modules/node-gyp/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" + }, + "node_modules/node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, + "node_modules/nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dev": true, + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", + "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "dev": true, + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/nyc": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/nyc/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/nyc/node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/nyc/node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nyc/node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", + "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1" + } + }, + "node_modules/object.values": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@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" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/os-filter-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", + "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", + "dev": true, + "dependencies": { + "arch": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", + "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/peek-readable": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "peer": true, + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "peer": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "peer": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "peer": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "peer": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-dir/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz", + "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, + "node_modules/q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readable-web-to-node-stream": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", + "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", + "dev": true, + "dependencies": { + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/regextras": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz", + "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", + "dev": true, + "engines": { + "node": ">=0.1.14" + } + }, + "node_modules/release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", + "dev": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dev": true, + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "optional": true + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/semver-regex": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-4.0.5.tgz", + "integrity": "sha512-hunMQrEy1T6Jr2uEVjrAIqjwWcQTgOAcIM52C8MY1EZSD3DDNft04XzvYKPqjED65bNVVko0YI38nYeEHCX3yw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/semver-truncate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-3.0.0.tgz", + "integrity": "sha512-LJWA9kSvMolR51oDE6PN3kALBNaUdkxzAGcexw8gjMA8xr5zUqK0JiR3CgARSqanYF3Z1YHvsErb1KDgh+v7Rg==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/semver-truncate/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-truncate/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-truncate/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "peer": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dev": true, + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dev": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg==", + "dev": true, + "dependencies": { + "is-plain-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw==", + "dev": true, + "dependencies": { + "sort-keys": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "peer": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/spawn-wrap/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ssri/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-outer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-2.0.0.tgz", + "integrity": "sha512-A21Xsm1XzUkK0qK1ZrytDUvqsQWict2Cykhvi0fBQntGG5JSprESasEyV1EZ/4CiR5WB5KjzLTrP/bO37B0wPg==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strtok3": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", + "dev": true, + "dependencies": { + "@tokenizer/token": "^0.3.0", + "peek-readable": "^5.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/table": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "dev": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/table/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/thrift": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/thrift/-/thrift-0.19.0.tgz", + "integrity": "sha512-FfAeToex47DYF5UiqFiLXc0dTOQ1Dt94hdT/p1WEM8HQGOvI32jGs235QUeOvYwb1bApsTfFCa+ACDyF0fVtrg==", + "dependencies": { + "browser-or-node": "^1.2.1", + "isomorphic-ws": "^4.0.1", + "node-int64": "^0.4.0", + "q": "^1.5.0", + "ws": "^5.2.3" + }, + "engines": { + "node": ">= 10.18.0" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/token-types": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", + "dev": true, + "dependencies": { + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/trim-repeated": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-2.0.0.tgz", + "integrity": "sha512-QUHBFTJGdOwmp0tbOG505xAgOp/YliZP/6UgafFXYZ26WT1bvQmSMJUvkeVSASuJJHbqsFbynTvkd5W8RBTipg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^5.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/trim-repeated/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ts-jest": { + "version": "29.1.1", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", + "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dev": true, + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", + "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", + "integrity": "sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true + }, + "node_modules/which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/ws": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.3.tgz", + "integrity": "sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==", + "dependencies": { + "async-limiter": "~1.0.0" + } + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json index c8ed878..beb7d00 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,19 @@ { "name": "@nebula-contrib/nebula-nodejs", - "version": "3.0.3", + "version": "3.1.0-beta.1", "description": "This repository provides Nebula client API in Nodejs.", - "main": "index.js", + "main": "lib/index.js", "scripts": { - "build": "cross-env NODE_ENV=production babel-node --max-old-space-size=7168 ./tools/run build", - "clean": "babel-node ./tools/run clean", - "test": "babel-node ./tools/run test", + "build": "npm run build:addon && npm run types && npm run build:lib", + "build:lib": "swc src --out-dir lib", + "build:addon": "node tools/build-addon.mjs", + "clean": "rimraf build/* lib/* types/*", + "types": "tsc", + "test": "jest", "lint": "eslint", - "coverage": "babel-node ./tools/run coverage" + "prepublish": "npm run clean && npm run build" }, + "types": "./types", "repository": { "type": "git", "url": "git+https://github.com/nebula-contrib/nebula-node.git" @@ -21,12 +25,16 @@ }, "homepage": "https://github.com/nebula-contrib/nebula-node#readme", "dependencies": { + "@swc/helpers": "^0.5.3", "bindings": "^1.5.0", "browser-or-node": "^1.2.1", + "core-js": "^3.33.1", "isomorphic-ws": "^4.0.1", "lodash": "^4.17.21", + "node-addon-api": "^7.0.0", "node-int64": "^0.4.0", "q": "^1.5.0", + "thrift": "^0.19.0", "ws": "^5.2.2" }, "keywords": [ @@ -34,48 +42,28 @@ "nodejs nebula sdk" ], "engines": { - "node": ">=10.0.0" + "node": ">=17.0.0" }, "devDependencies": { - "@babel/cli": "^7.14.5", - "@babel/core": "^7.14.6", - "@babel/node": "^7.14.5", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-decorators": "^7.14.5", - "@babel/plugin-proposal-do-expressions": "^7.14.5", - "@babel/plugin-proposal-export-default-from": "^7.14.5", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-function-bind": "^7.14.5", - "@babel/plugin-proposal-function-sent": "^7.14.5", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.21.0", - "@babel/plugin-proposal-pipeline-operator": "^7.14.5", - "@babel/plugin-proposal-throw-expressions": "^7.14.5", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-transform-runtime": "^7.14.5", - "@babel/preset-env": "^7.14.5", - "@babel/preset-typescript": "^7.14.5", "@istanbuljs/nyc-config-babel": "^3.0.0", "@istanbuljs/nyc-config-typescript": "^1.0.1", + "@jest/globals": "^29.7.0", + "@swc/cli": "^0.1.62", + "@swc/core": "^1.3.93", + "@swc/jest": "^0.2.29", + "@types/bindings": "^1.5.2", "@types/chai": "^4.2.18", "@types/esm": "^3.2.0", "@types/glob": "^7.1.3", "@types/lodash": "^4.14.170", - "@types/mocha": "^8.2.2", - "@types/node": "^14.17.3", + "@types/node": "^14.18.63", + "@types/thrift": "^0.10.14", "@typescript-eslint/eslint-plugin": "^4.27.0", "@typescript-eslint/parser": "^4.27.0", "assert": "^2.0.0", "babel-eslint": "^10.1.0", - "babel-plugin-add-module-exports": "^1.0.4", - "babel-plugin-istanbul": "^6.0.0", - "babel-plugin-transform-typescript-metadata": "^0.3.2", "chai": "^4.3.4", - "chalk": "^4.1.1", - "core-js": "^2.6.10", + "chalk": "^4.1.2", "cowsay": "^1.5.0", "cross-env": "^7.0.3", "eslint": "^7.28.0", @@ -89,13 +77,14 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^5.0.0", "esm": "^3.2.25", + "jest": "^29.7.0", "mkdirp": "^0.5.1", - "mocha": "^8.4.0", + "node-gyp": "^9.4.0", "nyc": "^15.1.0", "open": "^7.4.2", "rimraf": "^3.0.2", - "ts-node": "^10.0.0", - "typescript": "4.1.5", + "ts-jest": "^29.1.1", + "typescript": "^5.2.2", "which": "^2.0.2" }, "publishConfig": { diff --git a/specs/README.md b/specs/README.md index 6756a75..8b4634c 100644 --- a/specs/README.md +++ b/specs/README.md @@ -5,5 +5,8 @@ [graph.thrift](https://github.com/vesoft-inc/nebula/blob/master/src/interface/graph.thrift) ```shell -thrift-0.14.1.exe -r --gen js:node graph.thrift +# thrift@0.19.0 +# https://www.apache.org/dyn/closer.cgi?path=/thrift/0.19.0/thrift-0.19.0.tar.gz +thrift --gen js:node,ts,es6,with_ns graph.thrift +thrift --gen js:node,ts,es6,with_ns common.thrift ``` diff --git a/specs/gen-nodejs/GraphService.js b/specs/gen-nodejs/GraphService.js deleted file mode 100644 index 6910cd3..0000000 --- a/specs/gen-nodejs/GraphService.js +++ /dev/null @@ -1,1498 +0,0 @@ -// -// Autogenerated by Thrift Compiler (0.14.1) -// -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -// -"use strict"; - -var thrift = require('thrift'); -var Thrift = thrift.Thrift; -var Q = thrift.Q; -var Int64 = require('node-int64'); - -var common_ttypes = require('./common_types'); - - -var ttypes = require('./graph_types'); -//HELPER FUNCTIONS AND STRUCTURES - -var GraphService_authenticate_args = function(args) { - this.username = null; - this.password = null; - if (args) { - if (args.username !== undefined && args.username !== null) { - this.username = args.username; - } - if (args.password !== undefined && args.password !== null) { - this.password = args.password; - } - } -}; -GraphService_authenticate_args.prototype = {}; -GraphService_authenticate_args.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.username = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.password = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_authenticate_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_authenticate_args'); - if (this.username !== null && this.username !== undefined) { - output.writeFieldBegin('username', Thrift.Type.STRING, 1); - output.writeString(this.username); - output.writeFieldEnd(); - } - if (this.password !== null && this.password !== undefined) { - output.writeFieldBegin('password', Thrift.Type.STRING, 2); - output.writeString(this.password); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_authenticate_result = function(args) { - this.success = null; - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.AuthResponse(args.success); - } - } -}; -GraphService_authenticate_result.prototype = {}; -GraphService_authenticate_result.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.AuthResponse(); - this.success.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_authenticate_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_authenticate_result'); - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); - this.success.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_signout_args = function(args) { - this.sessionId = null; - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - } -}; -GraphService_signout_args.prototype = {}; -GraphService_signout_args.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_signout_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_signout_args'); - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); - output.writeI64(this.sessionId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_signout_result = function(args) { -}; -GraphService_signout_result.prototype = {}; -GraphService_signout_result.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_signout_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_signout_result'); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_execute_args = function(args) { - this.sessionId = null; - this.stmt = null; - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - if (args.stmt !== undefined && args.stmt !== null) { - this.stmt = args.stmt; - } - } -}; -GraphService_execute_args.prototype = {}; -GraphService_execute_args.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.stmt = input.readBinary(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_execute_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_execute_args'); - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); - output.writeI64(this.sessionId); - output.writeFieldEnd(); - } - if (this.stmt !== null && this.stmt !== undefined) { - output.writeFieldBegin('stmt', Thrift.Type.STRING, 2); - output.writeBinary(this.stmt); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_execute_result = function(args) { - this.success = null; - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.ExecutionResponse(args.success); - } - } -}; -GraphService_execute_result.prototype = {}; -GraphService_execute_result.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.ExecutionResponse(); - this.success.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_execute_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_execute_result'); - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); - this.success.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_executeWithParameter_args = function(args) { - this.sessionId = null; - this.stmt = null; - this.parameterMap = null; - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - if (args.stmt !== undefined && args.stmt !== null) { - this.stmt = args.stmt; - } - if (args.parameterMap !== undefined && args.parameterMap !== null) { - this.parameterMap = Thrift.copyMap(args.parameterMap, [common_ttypes.Value]); - } - } -}; -GraphService_executeWithParameter_args.prototype = {}; -GraphService_executeWithParameter_args.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.stmt = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.parameterMap = {}; - var _rtmp335 = input.readMapBegin(); - var _size34 = _rtmp335.size || 0; - for (var _i36 = 0; _i36 < _size34; ++_i36) { - var key37 = null; - var val38 = null; - key37 = input.readString(); - val38 = new common_ttypes.Value(); - val38.read(input); - this.parameterMap[key37] = val38; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_executeWithParameter_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeWithParameter_args'); - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); - output.writeI64(this.sessionId); - output.writeFieldEnd(); - } - if (this.stmt !== null && this.stmt !== undefined) { - output.writeFieldBegin('stmt', Thrift.Type.STRING, 2); - output.writeBinary(this.stmt); - output.writeFieldEnd(); - } - if (this.parameterMap !== null && this.parameterMap !== undefined) { - output.writeFieldBegin('parameterMap', Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.parameterMap)); - for (var kiter39 in this.parameterMap) { - if (this.parameterMap.hasOwnProperty(kiter39)) { - var viter40 = this.parameterMap[kiter39]; - output.writeString(kiter39); - viter40.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_executeWithParameter_result = function(args) { - this.success = null; - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.ExecutionResponse(args.success); - } - } -}; -GraphService_executeWithParameter_result.prototype = {}; -GraphService_executeWithParameter_result.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.ExecutionResponse(); - this.success.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_executeWithParameter_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeWithParameter_result'); - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); - this.success.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_executeJson_args = function(args) { - this.sessionId = null; - this.stmt = null; - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - if (args.stmt !== undefined && args.stmt !== null) { - this.stmt = args.stmt; - } - } -}; -GraphService_executeJson_args.prototype = {}; -GraphService_executeJson_args.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.stmt = input.readBinary(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_executeJson_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeJson_args'); - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); - output.writeI64(this.sessionId); - output.writeFieldEnd(); - } - if (this.stmt !== null && this.stmt !== undefined) { - output.writeFieldBegin('stmt', Thrift.Type.STRING, 2); - output.writeBinary(this.stmt); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_executeJson_result = function(args) { - this.success = null; - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = args.success; - } - } -}; -GraphService_executeJson_result.prototype = {}; -GraphService_executeJson_result.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRING) { - this.success = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_executeJson_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeJson_result'); - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRING, 0); - output.writeBinary(this.success); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_executeJsonWithParameter_args = function(args) { - this.sessionId = null; - this.stmt = null; - this.parameterMap = null; - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - if (args.stmt !== undefined && args.stmt !== null) { - this.stmt = args.stmt; - } - if (args.parameterMap !== undefined && args.parameterMap !== null) { - this.parameterMap = Thrift.copyMap(args.parameterMap, [common_ttypes.Value]); - } - } -}; -GraphService_executeJsonWithParameter_args.prototype = {}; -GraphService_executeJsonWithParameter_args.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.stmt = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.parameterMap = {}; - var _rtmp342 = input.readMapBegin(); - var _size41 = _rtmp342.size || 0; - for (var _i43 = 0; _i43 < _size41; ++_i43) { - var key44 = null; - var val45 = null; - key44 = input.readBinary(); - val45 = new common_ttypes.Value(); - val45.read(input); - this.parameterMap[key44] = val45; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_executeJsonWithParameter_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeJsonWithParameter_args'); - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); - output.writeI64(this.sessionId); - output.writeFieldEnd(); - } - if (this.stmt !== null && this.stmt !== undefined) { - output.writeFieldBegin('stmt', Thrift.Type.STRING, 2); - output.writeBinary(this.stmt); - output.writeFieldEnd(); - } - if (this.parameterMap !== null && this.parameterMap !== undefined) { - output.writeFieldBegin('parameterMap', Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.parameterMap)); - for (var kiter46 in this.parameterMap) { - if (this.parameterMap.hasOwnProperty(kiter46)) { - var viter47 = this.parameterMap[kiter46]; - output.writeBinary(kiter46); - viter47.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_executeJsonWithParameter_result = function(args) { - this.success = null; - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = args.success; - } - } -}; -GraphService_executeJsonWithParameter_result.prototype = {}; -GraphService_executeJsonWithParameter_result.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRING) { - this.success = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_executeJsonWithParameter_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeJsonWithParameter_result'); - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRING, 0); - output.writeBinary(this.success); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_verifyClientVersion_args = function(args) { - this.req = null; - if (args) { - if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.VerifyClientVersionReq(args.req); - } - } -}; -GraphService_verifyClientVersion_args.prototype = {}; -GraphService_verifyClientVersion_args.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.VerifyClientVersionReq(); - this.req.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_verifyClientVersion_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_verifyClientVersion_args'); - if (this.req !== null && this.req !== undefined) { - output.writeFieldBegin('req', Thrift.Type.STRUCT, 1); - this.req.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphService_verifyClientVersion_result = function(args) { - this.success = null; - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.VerifyClientVersionResp(args.success); - } - } -}; -GraphService_verifyClientVersion_result.prototype = {}; -GraphService_verifyClientVersion_result.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.VerifyClientVersionResp(); - this.success.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -GraphService_verifyClientVersion_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_verifyClientVersion_result'); - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); - this.success.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var GraphServiceClient = exports.Client = function(output, pClass) { - this.output = output; - this.pClass = pClass; - this._seqid = 0; - this._reqs = {}; -}; -GraphServiceClient.prototype = {}; -GraphServiceClient.prototype.seqid = function() { return this._seqid; }; -GraphServiceClient.prototype.new_seqid = function() { return this._seqid += 1; }; - -GraphServiceClient.prototype.authenticate = function(username, password, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_authenticate(username, password); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_authenticate(username, password); - } -}; - -GraphServiceClient.prototype.send_authenticate = function(username, password) { - var output = new this.pClass(this.output); - var params = { - username: username, - password: password - }; - var args = new GraphService_authenticate_args(params); - try { - output.writeMessageBegin('authenticate', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); - } - catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); - } - throw e; - } -}; - -GraphServiceClient.prototype.recv_authenticate = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; - if (mtype == Thrift.MessageType.EXCEPTION) { - var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); - } - var result = new GraphService_authenticate_result(); - result.read(input); - input.readMessageEnd(); - - if (null !== result.success) { - return callback(null, result.success); - } - return callback('authenticate failed: unknown result'); -}; - -GraphServiceClient.prototype.signout = function(sessionId, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_signout(sessionId); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_signout(sessionId); - } -}; - -GraphServiceClient.prototype.send_signout = function(sessionId) { - var output = new this.pClass(this.output); - var params = { - sessionId: sessionId - }; - var args = new GraphService_signout_args(params); - try { - output.writeMessageBegin('signout', Thrift.MessageType.ONEWAY, this.seqid()); - args.write(output); - output.writeMessageEnd(); - this.output.flush(); - var callback = this._reqs[this.seqid()] || function() {}; - delete this._reqs[this.seqid()]; - callback(null); - } - catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); - } - throw e; - } -}; - -GraphServiceClient.prototype.execute = function(sessionId, stmt, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_execute(sessionId, stmt); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_execute(sessionId, stmt); - } -}; - -GraphServiceClient.prototype.send_execute = function(sessionId, stmt) { - var output = new this.pClass(this.output); - var params = { - sessionId: sessionId, - stmt: stmt - }; - var args = new GraphService_execute_args(params); - try { - output.writeMessageBegin('execute', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); - } - catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); - } - throw e; - } -}; - -GraphServiceClient.prototype.recv_execute = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; - if (mtype == Thrift.MessageType.EXCEPTION) { - var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); - } - var result = new GraphService_execute_result(); - result.read(input); - input.readMessageEnd(); - - if (null !== result.success) { - return callback(null, result.success); - } - return callback('execute failed: unknown result'); -}; - -GraphServiceClient.prototype.executeWithParameter = function(sessionId, stmt, parameterMap, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_executeWithParameter(sessionId, stmt, parameterMap); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_executeWithParameter(sessionId, stmt, parameterMap); - } -}; - -GraphServiceClient.prototype.send_executeWithParameter = function(sessionId, stmt, parameterMap) { - var output = new this.pClass(this.output); - var params = { - sessionId: sessionId, - stmt: stmt, - parameterMap: parameterMap - }; - var args = new GraphService_executeWithParameter_args(params); - try { - output.writeMessageBegin('executeWithParameter', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); - } - catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); - } - throw e; - } -}; - -GraphServiceClient.prototype.recv_executeWithParameter = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; - if (mtype == Thrift.MessageType.EXCEPTION) { - var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); - } - var result = new GraphService_executeWithParameter_result(); - result.read(input); - input.readMessageEnd(); - - if (null !== result.success) { - return callback(null, result.success); - } - return callback('executeWithParameter failed: unknown result'); -}; - -GraphServiceClient.prototype.executeJson = function(sessionId, stmt, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_executeJson(sessionId, stmt); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_executeJson(sessionId, stmt); - } -}; - -GraphServiceClient.prototype.send_executeJson = function(sessionId, stmt) { - var output = new this.pClass(this.output); - var params = { - sessionId: sessionId, - stmt: stmt - }; - var args = new GraphService_executeJson_args(params); - try { - output.writeMessageBegin('executeJson', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); - } - catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); - } - throw e; - } -}; - -GraphServiceClient.prototype.recv_executeJson = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; - if (mtype == Thrift.MessageType.EXCEPTION) { - var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); - } - var result = new GraphService_executeJson_result(); - result.read(input); - input.readMessageEnd(); - - if (null !== result.success) { - return callback(null, result.success); - } - return callback('executeJson failed: unknown result'); -}; - -GraphServiceClient.prototype.executeJsonWithParameter = function(sessionId, stmt, parameterMap, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_executeJsonWithParameter(sessionId, stmt, parameterMap); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_executeJsonWithParameter(sessionId, stmt, parameterMap); - } -}; - -GraphServiceClient.prototype.send_executeJsonWithParameter = function(sessionId, stmt, parameterMap) { - var output = new this.pClass(this.output); - var params = { - sessionId: sessionId, - stmt: stmt, - parameterMap: parameterMap - }; - var args = new GraphService_executeJsonWithParameter_args(params); - try { - output.writeMessageBegin('executeJsonWithParameter', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); - } - catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); - } - throw e; - } -}; - -GraphServiceClient.prototype.recv_executeJsonWithParameter = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; - if (mtype == Thrift.MessageType.EXCEPTION) { - var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); - } - var result = new GraphService_executeJsonWithParameter_result(); - result.read(input); - input.readMessageEnd(); - - if (null !== result.success) { - return callback(null, result.success); - } - return callback('executeJsonWithParameter failed: unknown result'); -}; - -GraphServiceClient.prototype.verifyClientVersion = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_verifyClientVersion(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_verifyClientVersion(req); - } -}; - -GraphServiceClient.prototype.send_verifyClientVersion = function(req) { - var output = new this.pClass(this.output); - var params = { - req: req - }; - var args = new GraphService_verifyClientVersion_args(params); - try { - output.writeMessageBegin('verifyClientVersion', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); - } - catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); - } - throw e; - } -}; - -GraphServiceClient.prototype.recv_verifyClientVersion = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; - if (mtype == Thrift.MessageType.EXCEPTION) { - var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); - } - var result = new GraphService_verifyClientVersion_result(); - result.read(input); - input.readMessageEnd(); - - if (null !== result.success) { - return callback(null, result.success); - } - return callback('verifyClientVersion failed: unknown result'); -}; -var GraphServiceProcessor = exports.Processor = function(handler) { - this._handler = handler; -}; -GraphServiceProcessor.prototype.process = function(input, output) { - var r = input.readMessageBegin(); - if (this['process_' + r.fname]) { - return this['process_' + r.fname].call(this, r.rseqid, input, output); - } else { - input.skip(Thrift.Type.STRUCT); - input.readMessageEnd(); - var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname); - output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid); - x.write(output); - output.writeMessageEnd(); - output.flush(); - } -}; -GraphServiceProcessor.prototype.process_authenticate = function(seqid, input, output) { - var args = new GraphService_authenticate_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.authenticate.length === 2) { - Q.fcall(this._handler.authenticate.bind(this._handler), - args.username, - args.password - ).then(function(result) { - var result_obj = new GraphService_authenticate_result({success: result}); - output.writeMessageBegin("authenticate", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("authenticate", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.authenticate(args.username, args.password, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_authenticate_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("authenticate", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("authenticate", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -GraphServiceProcessor.prototype.process_signout = function(seqid, input, output) { - var args = new GraphService_signout_args(); - args.read(input); - input.readMessageEnd(); - this._handler.signout(args.sessionId); -}; -GraphServiceProcessor.prototype.process_execute = function(seqid, input, output) { - var args = new GraphService_execute_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.execute.length === 2) { - Q.fcall(this._handler.execute.bind(this._handler), - args.sessionId, - args.stmt - ).then(function(result) { - var result_obj = new GraphService_execute_result({success: result}); - output.writeMessageBegin("execute", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("execute", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.execute(args.sessionId, args.stmt, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_execute_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("execute", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("execute", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -GraphServiceProcessor.prototype.process_executeWithParameter = function(seqid, input, output) { - var args = new GraphService_executeWithParameter_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.executeWithParameter.length === 3) { - Q.fcall(this._handler.executeWithParameter.bind(this._handler), - args.sessionId, - args.stmt, - args.parameterMap - ).then(function(result) { - var result_obj = new GraphService_executeWithParameter_result({success: result}); - output.writeMessageBegin("executeWithParameter", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("executeWithParameter", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.executeWithParameter(args.sessionId, args.stmt, args.parameterMap, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_executeWithParameter_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("executeWithParameter", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("executeWithParameter", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -GraphServiceProcessor.prototype.process_executeJson = function(seqid, input, output) { - var args = new GraphService_executeJson_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.executeJson.length === 2) { - Q.fcall(this._handler.executeJson.bind(this._handler), - args.sessionId, - args.stmt - ).then(function(result) { - var result_obj = new GraphService_executeJson_result({success: result}); - output.writeMessageBegin("executeJson", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("executeJson", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.executeJson(args.sessionId, args.stmt, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_executeJson_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("executeJson", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("executeJson", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -GraphServiceProcessor.prototype.process_executeJsonWithParameter = function(seqid, input, output) { - var args = new GraphService_executeJsonWithParameter_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.executeJsonWithParameter.length === 3) { - Q.fcall(this._handler.executeJsonWithParameter.bind(this._handler), - args.sessionId, - args.stmt, - args.parameterMap - ).then(function(result) { - var result_obj = new GraphService_executeJsonWithParameter_result({success: result}); - output.writeMessageBegin("executeJsonWithParameter", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("executeJsonWithParameter", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.executeJsonWithParameter(args.sessionId, args.stmt, args.parameterMap, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_executeJsonWithParameter_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("executeJsonWithParameter", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("executeJsonWithParameter", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -GraphServiceProcessor.prototype.process_verifyClientVersion = function(seqid, input, output) { - var args = new GraphService_verifyClientVersion_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.verifyClientVersion.length === 1) { - Q.fcall(this._handler.verifyClientVersion.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new GraphService_verifyClientVersion_result({success: result}); - output.writeMessageBegin("verifyClientVersion", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("verifyClientVersion", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.verifyClientVersion(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_verifyClientVersion_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("verifyClientVersion", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("verifyClientVersion", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; diff --git a/specs/gen-nodejs/common_types.js b/specs/gen-nodejs/common_types.js deleted file mode 100644 index 6991ac5..0000000 --- a/specs/gen-nodejs/common_types.js +++ /dev/null @@ -1,2621 +0,0 @@ -// -// Autogenerated by Thrift Compiler (0.14.1) -// -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -// -"use strict"; - -var thrift = require('thrift'); -var Thrift = thrift.Thrift; -var Q = thrift.Q; -var Int64 = require('node-int64'); - - -var ttypes = module.exports = {}; -ttypes.NullType = { - '__NULL__' : 0, - 'NaN' : 1, - 'BAD_DATA' : 2, - 'BAD_TYPE' : 3, - 'ERR_OVERFLOW' : 4, - 'UNKNOWN_PROP' : 5, - 'DIV_BY_ZERO' : 6, - 'OUT_OF_RANGE' : 7 -}; -ttypes.PropertyType = { - 'UNKNOWN' : 0, - 'BOOL' : 1, - 'INT64' : 2, - 'VID' : 3, - 'FLOAT' : 4, - 'DOUBLE' : 5, - 'STRING' : 6, - 'FIXED_STRING' : 7, - 'INT8' : 8, - 'INT16' : 9, - 'INT32' : 10, - 'TIMESTAMP' : 21, - 'DURATION' : 23, - 'DATE' : 24, - 'DATETIME' : 25, - 'TIME' : 26, - 'GEOGRAPHY' : 31 -}; -ttypes.ErrorCode = { - 'SUCCEEDED' : 0, - 'E_DISCONNECTED' : -1, - 'E_FAIL_TO_CONNECT' : -2, - 'E_RPC_FAILURE' : -3, - 'E_LEADER_CHANGED' : -4, - 'E_SPACE_NOT_FOUND' : -5, - 'E_TAG_NOT_FOUND' : -6, - 'E_EDGE_NOT_FOUND' : -7, - 'E_INDEX_NOT_FOUND' : -8, - 'E_EDGE_PROP_NOT_FOUND' : -9, - 'E_TAG_PROP_NOT_FOUND' : -10, - 'E_ROLE_NOT_FOUND' : -11, - 'E_CONFIG_NOT_FOUND' : -12, - 'E_MACHINE_NOT_FOUND' : -13, - 'E_ZONE_NOT_FOUND' : -14, - 'E_LISTENER_NOT_FOUND' : -15, - 'E_PART_NOT_FOUND' : -16, - 'E_KEY_NOT_FOUND' : -17, - 'E_USER_NOT_FOUND' : -18, - 'E_STATS_NOT_FOUND' : -19, - 'E_SERVICE_NOT_FOUND' : -20, - 'E_BACKUP_FAILED' : -24, - 'E_BACKUP_EMPTY_TABLE' : -25, - 'E_BACKUP_TABLE_FAILED' : -26, - 'E_PARTIAL_RESULT' : -27, - 'E_REBUILD_INDEX_FAILED' : -28, - 'E_INVALID_PASSWORD' : -29, - 'E_FAILED_GET_ABS_PATH' : -30, - 'E_BAD_USERNAME_PASSWORD' : -1001, - 'E_SESSION_INVALID' : -1002, - 'E_SESSION_TIMEOUT' : -1003, - 'E_SYNTAX_ERROR' : -1004, - 'E_EXECUTION_ERROR' : -1005, - 'E_STATEMENT_EMPTY' : -1006, - 'E_BAD_PERMISSION' : -1008, - 'E_SEMANTIC_ERROR' : -1009, - 'E_TOO_MANY_CONNECTIONS' : -1010, - 'E_PARTIAL_SUCCEEDED' : -1011, - 'E_NO_HOSTS' : -2001, - 'E_EXISTED' : -2002, - 'E_INVALID_HOST' : -2003, - 'E_UNSUPPORTED' : -2004, - 'E_NOT_DROP' : -2005, - 'E_BALANCER_RUNNING' : -2006, - 'E_CONFIG_IMMUTABLE' : -2007, - 'E_CONFLICT' : -2008, - 'E_INVALID_PARM' : -2009, - 'E_WRONGCLUSTER' : -2010, - 'E_ZONE_NOT_ENOUGH' : -2011, - 'E_ZONE_IS_EMPTY' : -2012, - 'E_STORE_FAILURE' : -2021, - 'E_STORE_SEGMENT_ILLEGAL' : -2022, - 'E_BAD_BALANCE_PLAN' : -2023, - 'E_BALANCED' : -2024, - 'E_NO_RUNNING_BALANCE_PLAN' : -2025, - 'E_NO_VALID_HOST' : -2026, - 'E_CORRUPTED_BALANCE_PLAN' : -2027, - 'E_NO_INVALID_BALANCE_PLAN' : -2028, - 'E_IMPROPER_ROLE' : -2030, - 'E_INVALID_PARTITION_NUM' : -2031, - 'E_INVALID_REPLICA_FACTOR' : -2032, - 'E_INVALID_CHARSET' : -2033, - 'E_INVALID_COLLATE' : -2034, - 'E_CHARSET_COLLATE_NOT_MATCH' : -2035, - 'E_SNAPSHOT_FAILURE' : -2040, - 'E_BLOCK_WRITE_FAILURE' : -2041, - 'E_REBUILD_INDEX_FAILURE' : -2042, - 'E_INDEX_WITH_TTL' : -2043, - 'E_ADD_JOB_FAILURE' : -2044, - 'E_STOP_JOB_FAILURE' : -2045, - 'E_SAVE_JOB_FAILURE' : -2046, - 'E_BALANCER_FAILURE' : -2047, - 'E_JOB_NOT_FINISHED' : -2048, - 'E_TASK_REPORT_OUT_DATE' : -2049, - 'E_JOB_NOT_IN_SPACE' : -2050, - 'E_JOB_NEED_RECOVER' : -2051, - 'E_INVALID_JOB' : -2065, - 'E_BACKUP_BUILDING_INDEX' : -2066, - 'E_BACKUP_SPACE_NOT_FOUND' : -2067, - 'E_RESTORE_FAILURE' : -2068, - 'E_SESSION_NOT_FOUND' : -2069, - 'E_LIST_CLUSTER_FAILURE' : -2070, - 'E_LIST_CLUSTER_GET_ABS_PATH_FAILURE' : -2071, - 'E_LIST_CLUSTER_NO_AGENT_FAILURE' : -2072, - 'E_QUERY_NOT_FOUND' : -2073, - 'E_AGENT_HB_FAILUE' : -2074, - 'E_CONSENSUS_ERROR' : -3001, - 'E_KEY_HAS_EXISTS' : -3002, - 'E_DATA_TYPE_MISMATCH' : -3003, - 'E_INVALID_FIELD_VALUE' : -3004, - 'E_INVALID_OPERATION' : -3005, - 'E_NOT_NULLABLE' : -3006, - 'E_FIELD_UNSET' : -3007, - 'E_OUT_OF_RANGE' : -3008, - 'E_DATA_CONFLICT_ERROR' : -3010, - 'E_WRITE_STALLED' : -3011, - 'E_IMPROPER_DATA_TYPE' : -3021, - 'E_INVALID_SPACEVIDLEN' : -3022, - 'E_INVALID_FILTER' : -3031, - 'E_INVALID_UPDATER' : -3032, - 'E_INVALID_STORE' : -3033, - 'E_INVALID_PEER' : -3034, - 'E_RETRY_EXHAUSTED' : -3035, - 'E_TRANSFER_LEADER_FAILED' : -3036, - 'E_INVALID_STAT_TYPE' : -3037, - 'E_INVALID_VID' : -3038, - 'E_NO_TRANSFORMED' : -3039, - 'E_LOAD_META_FAILED' : -3040, - 'E_FAILED_TO_CHECKPOINT' : -3041, - 'E_CHECKPOINT_BLOCKED' : -3042, - 'E_FILTER_OUT' : -3043, - 'E_INVALID_DATA' : -3044, - 'E_MUTATE_EDGE_CONFLICT' : -3045, - 'E_MUTATE_TAG_CONFLICT' : -3046, - 'E_OUTDATED_LOCK' : -3047, - 'E_INVALID_TASK_PARA' : -3051, - 'E_USER_CANCEL' : -3052, - 'E_TASK_EXECUTION_FAILED' : -3053, - 'E_PLAN_IS_KILLED' : -3060, - 'E_NO_TERM' : -3070, - 'E_OUTDATED_TERM' : -3071, - 'E_OUTDATED_EDGE' : -3072, - 'E_WRITE_WRITE_CONFLICT' : -3073, - 'E_CLIENT_SERVER_INCOMPATIBLE' : -3061, - 'E_ID_FAILED' : -3062, - 'E_RAFT_UNKNOWN_PART' : -3500, - 'E_RAFT_LOG_GAP' : -3501, - 'E_RAFT_LOG_STALE' : -3502, - 'E_RAFT_TERM_OUT_OF_DATE' : -3503, - 'E_RAFT_UNKNOWN_APPEND_LOG' : -3504, - 'E_RAFT_WAITING_SNAPSHOT' : -3511, - 'E_RAFT_SENDING_SNAPSHOT' : -3512, - 'E_RAFT_INVALID_PEER' : -3513, - 'E_RAFT_NOT_READY' : -3514, - 'E_RAFT_STOPPED' : -3515, - 'E_RAFT_BAD_ROLE' : -3516, - 'E_RAFT_WAL_FAIL' : -3521, - 'E_RAFT_HOST_STOPPED' : -3522, - 'E_RAFT_TOO_MANY_REQUESTS' : -3523, - 'E_RAFT_PERSIST_SNAPSHOT_FAILED' : -3524, - 'E_RAFT_RPC_EXCEPTION' : -3525, - 'E_RAFT_NO_WAL_FOUND' : -3526, - 'E_RAFT_HOST_PAUSED' : -3527, - 'E_RAFT_WRITE_BLOCKED' : -3528, - 'E_RAFT_BUFFER_OVERFLOW' : -3529, - 'E_RAFT_ATOMIC_OP_FAILED' : -3530, - 'E_LEADER_LEASE_FAILED' : -3531, - 'E_UNKNOWN' : -8000 -}; -var SchemaID = module.exports.SchemaID = function(args) { - this.tag_id = null; - this.edge_type = null; - if (args) { - if (args.tag_id !== undefined && args.tag_id !== null) { - this.tag_id = args.tag_id; - } - if (args.edge_type !== undefined && args.edge_type !== null) { - this.edge_type = args.edge_type; - } - } -}; -SchemaID.prototype = {}; -SchemaID.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.tag_id = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.edge_type = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -SchemaID.prototype.write = function(output) { - output.writeStructBegin('SchemaID'); - if (this.tag_id !== null && this.tag_id !== undefined) { - output.writeFieldBegin('tag_id', Thrift.Type.I32, 1); - output.writeI32(this.tag_id); - output.writeFieldEnd(); - } - if (this.edge_type !== null && this.edge_type !== undefined) { - output.writeFieldBegin('edge_type', Thrift.Type.I32, 2); - output.writeI32(this.edge_type); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Date = module.exports.Date = function(args) { - this.year = null; - this.month = null; - this.day = null; - if (args) { - if (args.year !== undefined && args.year !== null) { - this.year = args.year; - } - if (args.month !== undefined && args.month !== null) { - this.month = args.month; - } - if (args.day !== undefined && args.day !== null) { - this.day = args.day; - } - } -}; -Date.prototype = {}; -Date.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I16) { - this.year = input.readI16(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BYTE) { - this.month = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BYTE) { - this.day = input.readByte(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Date.prototype.write = function(output) { - output.writeStructBegin('Date'); - if (this.year !== null && this.year !== undefined) { - output.writeFieldBegin('year', Thrift.Type.I16, 1); - output.writeI16(this.year); - output.writeFieldEnd(); - } - if (this.month !== null && this.month !== undefined) { - output.writeFieldBegin('month', Thrift.Type.BYTE, 2); - output.writeByte(this.month); - output.writeFieldEnd(); - } - if (this.day !== null && this.day !== undefined) { - output.writeFieldBegin('day', Thrift.Type.BYTE, 3); - output.writeByte(this.day); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Time = module.exports.Time = function(args) { - this.hour = null; - this.minute = null; - this.sec = null; - this.microsec = null; - if (args) { - if (args.hour !== undefined && args.hour !== null) { - this.hour = args.hour; - } - if (args.minute !== undefined && args.minute !== null) { - this.minute = args.minute; - } - if (args.sec !== undefined && args.sec !== null) { - this.sec = args.sec; - } - if (args.microsec !== undefined && args.microsec !== null) { - this.microsec = args.microsec; - } - } -}; -Time.prototype = {}; -Time.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BYTE) { - this.hour = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BYTE) { - this.minute = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BYTE) { - this.sec = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.microsec = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Time.prototype.write = function(output) { - output.writeStructBegin('Time'); - if (this.hour !== null && this.hour !== undefined) { - output.writeFieldBegin('hour', Thrift.Type.BYTE, 1); - output.writeByte(this.hour); - output.writeFieldEnd(); - } - if (this.minute !== null && this.minute !== undefined) { - output.writeFieldBegin('minute', Thrift.Type.BYTE, 2); - output.writeByte(this.minute); - output.writeFieldEnd(); - } - if (this.sec !== null && this.sec !== undefined) { - output.writeFieldBegin('sec', Thrift.Type.BYTE, 3); - output.writeByte(this.sec); - output.writeFieldEnd(); - } - if (this.microsec !== null && this.microsec !== undefined) { - output.writeFieldBegin('microsec', Thrift.Type.I32, 4); - output.writeI32(this.microsec); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var DateTime = module.exports.DateTime = function(args) { - this.year = null; - this.month = null; - this.day = null; - this.hour = null; - this.minute = null; - this.sec = null; - this.microsec = null; - if (args) { - if (args.year !== undefined && args.year !== null) { - this.year = args.year; - } - if (args.month !== undefined && args.month !== null) { - this.month = args.month; - } - if (args.day !== undefined && args.day !== null) { - this.day = args.day; - } - if (args.hour !== undefined && args.hour !== null) { - this.hour = args.hour; - } - if (args.minute !== undefined && args.minute !== null) { - this.minute = args.minute; - } - if (args.sec !== undefined && args.sec !== null) { - this.sec = args.sec; - } - if (args.microsec !== undefined && args.microsec !== null) { - this.microsec = args.microsec; - } - } -}; -DateTime.prototype = {}; -DateTime.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I16) { - this.year = input.readI16(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BYTE) { - this.month = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BYTE) { - this.day = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BYTE) { - this.hour = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.BYTE) { - this.minute = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.BYTE) { - this.sec = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.microsec = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -DateTime.prototype.write = function(output) { - output.writeStructBegin('DateTime'); - if (this.year !== null && this.year !== undefined) { - output.writeFieldBegin('year', Thrift.Type.I16, 1); - output.writeI16(this.year); - output.writeFieldEnd(); - } - if (this.month !== null && this.month !== undefined) { - output.writeFieldBegin('month', Thrift.Type.BYTE, 2); - output.writeByte(this.month); - output.writeFieldEnd(); - } - if (this.day !== null && this.day !== undefined) { - output.writeFieldBegin('day', Thrift.Type.BYTE, 3); - output.writeByte(this.day); - output.writeFieldEnd(); - } - if (this.hour !== null && this.hour !== undefined) { - output.writeFieldBegin('hour', Thrift.Type.BYTE, 4); - output.writeByte(this.hour); - output.writeFieldEnd(); - } - if (this.minute !== null && this.minute !== undefined) { - output.writeFieldBegin('minute', Thrift.Type.BYTE, 5); - output.writeByte(this.minute); - output.writeFieldEnd(); - } - if (this.sec !== null && this.sec !== undefined) { - output.writeFieldBegin('sec', Thrift.Type.BYTE, 6); - output.writeByte(this.sec); - output.writeFieldEnd(); - } - if (this.microsec !== null && this.microsec !== undefined) { - output.writeFieldBegin('microsec', Thrift.Type.I32, 7); - output.writeI32(this.microsec); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Value = module.exports.Value = function(args) { - this.nVal = null; - this.bVal = null; - this.iVal = null; - this.fVal = null; - this.sVal = null; - this.dVal = null; - this.tVal = null; - this.dtVal = null; - this.vVal = null; - this.eVal = null; - this.pVal = null; - this.lVal = null; - this.mVal = null; - this.uVal = null; - this.gVal = null; - this.ggVal = null; - this.duVal = null; - if (args) { - if (args.nVal !== undefined && args.nVal !== null) { - this.nVal = args.nVal; - } - if (args.bVal !== undefined && args.bVal !== null) { - this.bVal = args.bVal; - } - if (args.iVal !== undefined && args.iVal !== null) { - this.iVal = args.iVal; - } - if (args.fVal !== undefined && args.fVal !== null) { - this.fVal = args.fVal; - } - if (args.sVal !== undefined && args.sVal !== null) { - this.sVal = args.sVal; - } - if (args.dVal !== undefined && args.dVal !== null) { - this.dVal = new ttypes.Date(args.dVal); - } - if (args.tVal !== undefined && args.tVal !== null) { - this.tVal = new ttypes.Time(args.tVal); - } - if (args.dtVal !== undefined && args.dtVal !== null) { - this.dtVal = new ttypes.DateTime(args.dtVal); - } - if (args.vVal !== undefined && args.vVal !== null) { - this.vVal = new ttypes.Vertex(args.vVal); - } - if (args.eVal !== undefined && args.eVal !== null) { - this.eVal = new ttypes.Edge(args.eVal); - } - if (args.pVal !== undefined && args.pVal !== null) { - this.pVal = new ttypes.Path(args.pVal); - } - if (args.lVal !== undefined && args.lVal !== null) { - this.lVal = new ttypes.NList(args.lVal); - } - if (args.mVal !== undefined && args.mVal !== null) { - this.mVal = new ttypes.NMap(args.mVal); - } - if (args.uVal !== undefined && args.uVal !== null) { - this.uVal = new ttypes.NSet(args.uVal); - } - if (args.gVal !== undefined && args.gVal !== null) { - this.gVal = new ttypes.DataSet(args.gVal); - } - if (args.ggVal !== undefined && args.ggVal !== null) { - this.ggVal = new ttypes.Geography(args.ggVal); - } - if (args.duVal !== undefined && args.duVal !== null) { - this.duVal = new ttypes.Duration(args.duVal); - } - } -}; -Value.prototype = {}; -Value.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.nVal = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.bVal = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.iVal = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.DOUBLE) { - this.fVal = input.readDouble(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.sVal = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.dVal = new ttypes.Date(); - this.dVal.read(input); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.STRUCT) { - this.tVal = new ttypes.Time(); - this.tVal.read(input); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRUCT) { - this.dtVal = new ttypes.DateTime(); - this.dtVal.read(input); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.STRUCT) { - this.vVal = new ttypes.Vertex(); - this.vVal.read(input); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRUCT) { - this.eVal = new ttypes.Edge(); - this.eVal.read(input); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRUCT) { - this.pVal = new ttypes.Path(); - this.pVal.read(input); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRUCT) { - this.lVal = new ttypes.NList(); - this.lVal.read(input); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.STRUCT) { - this.mVal = new ttypes.NMap(); - this.mVal.read(input); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.STRUCT) { - this.uVal = new ttypes.NSet(); - this.uVal.read(input); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.STRUCT) { - this.gVal = new ttypes.DataSet(); - this.gVal.read(input); - } else { - input.skip(ftype); - } - break; - case 16: - if (ftype == Thrift.Type.STRUCT) { - this.ggVal = new ttypes.Geography(); - this.ggVal.read(input); - } else { - input.skip(ftype); - } - break; - case 17: - if (ftype == Thrift.Type.STRUCT) { - this.duVal = new ttypes.Duration(); - this.duVal.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Value.prototype.write = function(output) { - output.writeStructBegin('Value'); - if (this.nVal !== null && this.nVal !== undefined) { - output.writeFieldBegin('nVal', Thrift.Type.I32, 1); - output.writeI32(this.nVal); - output.writeFieldEnd(); - } - if (this.bVal !== null && this.bVal !== undefined) { - output.writeFieldBegin('bVal', Thrift.Type.BOOL, 2); - output.writeBool(this.bVal); - output.writeFieldEnd(); - } - if (this.iVal !== null && this.iVal !== undefined) { - output.writeFieldBegin('iVal', Thrift.Type.I64, 3); - output.writeI64(this.iVal); - output.writeFieldEnd(); - } - if (this.fVal !== null && this.fVal !== undefined) { - output.writeFieldBegin('fVal', Thrift.Type.DOUBLE, 4); - output.writeDouble(this.fVal); - output.writeFieldEnd(); - } - if (this.sVal !== null && this.sVal !== undefined) { - output.writeFieldBegin('sVal', Thrift.Type.STRING, 5); - output.writeString(this.sVal); - output.writeFieldEnd(); - } - if (this.dVal !== null && this.dVal !== undefined) { - output.writeFieldBegin('dVal', Thrift.Type.STRUCT, 6); - this.dVal.write(output); - output.writeFieldEnd(); - } - if (this.tVal !== null && this.tVal !== undefined) { - output.writeFieldBegin('tVal', Thrift.Type.STRUCT, 7); - this.tVal.write(output); - output.writeFieldEnd(); - } - if (this.dtVal !== null && this.dtVal !== undefined) { - output.writeFieldBegin('dtVal', Thrift.Type.STRUCT, 8); - this.dtVal.write(output); - output.writeFieldEnd(); - } - if (this.vVal !== null && this.vVal !== undefined) { - output.writeFieldBegin('vVal', Thrift.Type.STRUCT, 9); - this.vVal.write(output); - output.writeFieldEnd(); - } - if (this.eVal !== null && this.eVal !== undefined) { - output.writeFieldBegin('eVal', Thrift.Type.STRUCT, 10); - this.eVal.write(output); - output.writeFieldEnd(); - } - if (this.pVal !== null && this.pVal !== undefined) { - output.writeFieldBegin('pVal', Thrift.Type.STRUCT, 11); - this.pVal.write(output); - output.writeFieldEnd(); - } - if (this.lVal !== null && this.lVal !== undefined) { - output.writeFieldBegin('lVal', Thrift.Type.STRUCT, 12); - this.lVal.write(output); - output.writeFieldEnd(); - } - if (this.mVal !== null && this.mVal !== undefined) { - output.writeFieldBegin('mVal', Thrift.Type.STRUCT, 13); - this.mVal.write(output); - output.writeFieldEnd(); - } - if (this.uVal !== null && this.uVal !== undefined) { - output.writeFieldBegin('uVal', Thrift.Type.STRUCT, 14); - this.uVal.write(output); - output.writeFieldEnd(); - } - if (this.gVal !== null && this.gVal !== undefined) { - output.writeFieldBegin('gVal', Thrift.Type.STRUCT, 15); - this.gVal.write(output); - output.writeFieldEnd(); - } - if (this.ggVal !== null && this.ggVal !== undefined) { - output.writeFieldBegin('ggVal', Thrift.Type.STRUCT, 16); - this.ggVal.write(output); - output.writeFieldEnd(); - } - if (this.duVal !== null && this.duVal !== undefined) { - output.writeFieldBegin('duVal', Thrift.Type.STRUCT, 17); - this.duVal.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var NList = module.exports.NList = function(args) { - this.values = null; - if (args) { - if (args.values !== undefined && args.values !== null) { - this.values = Thrift.copyList(args.values, [ttypes.Value]); - } - } -}; -NList.prototype = {}; -NList.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.values = []; - var _rtmp31 = input.readListBegin(); - var _size0 = _rtmp31.size || 0; - for (var _i2 = 0; _i2 < _size0; ++_i2) { - var elem3 = null; - elem3 = new ttypes.Value(); - elem3.read(input); - this.values.push(elem3); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -NList.prototype.write = function(output) { - output.writeStructBegin('NList'); - if (this.values !== null && this.values !== undefined) { - output.writeFieldBegin('values', Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.values.length); - for (var iter4 in this.values) { - if (this.values.hasOwnProperty(iter4)) { - iter4 = this.values[iter4]; - iter4.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var NMap = module.exports.NMap = function(args) { - this.kvs = null; - if (args) { - if (args.kvs !== undefined && args.kvs !== null) { - this.kvs = Thrift.copyMap(args.kvs, [ttypes.Value]); - } - } -}; -NMap.prototype = {}; -NMap.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.MAP) { - this.kvs = {}; - var _rtmp36 = input.readMapBegin(); - var _size5 = _rtmp36.size || 0; - for (var _i7 = 0; _i7 < _size5; ++_i7) { - var key8 = null; - var val9 = null; - key8 = input.readString(); - val9 = new ttypes.Value(); - val9.read(input); - this.kvs[key8] = val9; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -NMap.prototype.write = function(output) { - output.writeStructBegin('NMap'); - if (this.kvs !== null && this.kvs !== undefined) { - output.writeFieldBegin('kvs', Thrift.Type.MAP, 1); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.kvs)); - for (var kiter10 in this.kvs) { - if (this.kvs.hasOwnProperty(kiter10)) { - var viter11 = this.kvs[kiter10]; - output.writeString(kiter10); - viter11.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var NSet = module.exports.NSet = function(args) { - this.values = null; - if (args) { - if (args.values !== undefined && args.values !== null) { - this.values = Thrift.copyList(args.values, [ttypes.Value]); - } - } -}; -NSet.prototype = {}; -NSet.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.SET) { - this.values = []; - var _rtmp313 = input.readSetBegin(); - var _size12 = _rtmp313.size || 0; - for (var _i14 = 0; _i14 < _size12; ++_i14) { - var elem15 = null; - elem15 = new ttypes.Value(); - elem15.read(input); - this.values.push(elem15); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -NSet.prototype.write = function(output) { - output.writeStructBegin('NSet'); - if (this.values !== null && this.values !== undefined) { - output.writeFieldBegin('values', Thrift.Type.SET, 1); - output.writeSetBegin(Thrift.Type.STRUCT, this.values.length); - for (var iter16 in this.values) { - if (this.values.hasOwnProperty(iter16)) { - iter16 = this.values[iter16]; - iter16.write(output); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Row = module.exports.Row = function(args) { - this.values = null; - if (args) { - if (args.values !== undefined && args.values !== null) { - this.values = Thrift.copyList(args.values, [ttypes.Value]); - } - } -}; -Row.prototype = {}; -Row.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.values = []; - var _rtmp318 = input.readListBegin(); - var _size17 = _rtmp318.size || 0; - for (var _i19 = 0; _i19 < _size17; ++_i19) { - var elem20 = null; - elem20 = new ttypes.Value(); - elem20.read(input); - this.values.push(elem20); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Row.prototype.write = function(output) { - output.writeStructBegin('Row'); - if (this.values !== null && this.values !== undefined) { - output.writeFieldBegin('values', Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.values.length); - for (var iter21 in this.values) { - if (this.values.hasOwnProperty(iter21)) { - iter21 = this.values[iter21]; - iter21.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var DataSet = module.exports.DataSet = function(args) { - this.column_names = null; - this.rows = null; - if (args) { - if (args.column_names !== undefined && args.column_names !== null) { - this.column_names = Thrift.copyList(args.column_names, [null]); - } - if (args.rows !== undefined && args.rows !== null) { - this.rows = Thrift.copyList(args.rows, [ttypes.Row]); - } - } -}; -DataSet.prototype = {}; -DataSet.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.column_names = []; - var _rtmp323 = input.readListBegin(); - var _size22 = _rtmp323.size || 0; - for (var _i24 = 0; _i24 < _size22; ++_i24) { - var elem25 = null; - elem25 = input.readString(); - this.column_names.push(elem25); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.rows = []; - var _rtmp327 = input.readListBegin(); - var _size26 = _rtmp327.size || 0; - for (var _i28 = 0; _i28 < _size26; ++_i28) { - var elem29 = null; - elem29 = new ttypes.Row(); - elem29.read(input); - this.rows.push(elem29); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -DataSet.prototype.write = function(output) { - output.writeStructBegin('DataSet'); - if (this.column_names !== null && this.column_names !== undefined) { - output.writeFieldBegin('column_names', Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRING, this.column_names.length); - for (var iter30 in this.column_names) { - if (this.column_names.hasOwnProperty(iter30)) { - iter30 = this.column_names[iter30]; - output.writeString(iter30); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.rows !== null && this.rows !== undefined) { - output.writeFieldBegin('rows', Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.rows.length); - for (var iter31 in this.rows) { - if (this.rows.hasOwnProperty(iter31)) { - iter31 = this.rows[iter31]; - iter31.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Coordinate = module.exports.Coordinate = function(args) { - this.x = null; - this.y = null; - if (args) { - if (args.x !== undefined && args.x !== null) { - this.x = args.x; - } - if (args.y !== undefined && args.y !== null) { - this.y = args.y; - } - } -}; -Coordinate.prototype = {}; -Coordinate.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.DOUBLE) { - this.x = input.readDouble(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.DOUBLE) { - this.y = input.readDouble(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Coordinate.prototype.write = function(output) { - output.writeStructBegin('Coordinate'); - if (this.x !== null && this.x !== undefined) { - output.writeFieldBegin('x', Thrift.Type.DOUBLE, 1); - output.writeDouble(this.x); - output.writeFieldEnd(); - } - if (this.y !== null && this.y !== undefined) { - output.writeFieldBegin('y', Thrift.Type.DOUBLE, 2); - output.writeDouble(this.y); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Point = module.exports.Point = function(args) { - this.coord = null; - if (args) { - if (args.coord !== undefined && args.coord !== null) { - this.coord = new ttypes.Coordinate(args.coord); - } - } -}; -Point.prototype = {}; -Point.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.coord = new ttypes.Coordinate(); - this.coord.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Point.prototype.write = function(output) { - output.writeStructBegin('Point'); - if (this.coord !== null && this.coord !== undefined) { - output.writeFieldBegin('coord', Thrift.Type.STRUCT, 1); - this.coord.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var LineString = module.exports.LineString = function(args) { - this.coordList = null; - if (args) { - if (args.coordList !== undefined && args.coordList !== null) { - this.coordList = Thrift.copyList(args.coordList, [ttypes.Coordinate]); - } - } -}; -LineString.prototype = {}; -LineString.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.coordList = []; - var _rtmp333 = input.readListBegin(); - var _size32 = _rtmp333.size || 0; - for (var _i34 = 0; _i34 < _size32; ++_i34) { - var elem35 = null; - elem35 = new ttypes.Coordinate(); - elem35.read(input); - this.coordList.push(elem35); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -LineString.prototype.write = function(output) { - output.writeStructBegin('LineString'); - if (this.coordList !== null && this.coordList !== undefined) { - output.writeFieldBegin('coordList', Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.coordList.length); - for (var iter36 in this.coordList) { - if (this.coordList.hasOwnProperty(iter36)) { - iter36 = this.coordList[iter36]; - iter36.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Polygon = module.exports.Polygon = function(args) { - this.coordListList = null; - if (args) { - if (args.coordListList !== undefined && args.coordListList !== null) { - this.coordListList = Thrift.copyList(args.coordListList, [Thrift.copyList, ttypes.Coordinate]); - } - } -}; -Polygon.prototype = {}; -Polygon.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.coordListList = []; - var _rtmp338 = input.readListBegin(); - var _size37 = _rtmp338.size || 0; - for (var _i39 = 0; _i39 < _size37; ++_i39) { - var elem40 = null; - elem40 = []; - var _rtmp342 = input.readListBegin(); - var _size41 = _rtmp342.size || 0; - for (var _i43 = 0; _i43 < _size41; ++_i43) { - var elem44 = null; - elem44 = new ttypes.Coordinate(); - elem44.read(input); - elem40.push(elem44); - } - input.readListEnd(); - this.coordListList.push(elem40); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Polygon.prototype.write = function(output) { - output.writeStructBegin('Polygon'); - if (this.coordListList !== null && this.coordListList !== undefined) { - output.writeFieldBegin('coordListList', Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.LIST, this.coordListList.length); - for (var iter45 in this.coordListList) { - if (this.coordListList.hasOwnProperty(iter45)) { - iter45 = this.coordListList[iter45]; - output.writeListBegin(Thrift.Type.STRUCT, iter45.length); - for (var iter46 in iter45) { - if (iter45.hasOwnProperty(iter46)) { - iter46 = iter45[iter46]; - iter46.write(output); - } - } - output.writeListEnd(); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Geography = module.exports.Geography = function(args) { - this.ptVal = null; - this.lsVal = null; - this.pgVal = null; - if (args) { - if (args.ptVal !== undefined && args.ptVal !== null) { - this.ptVal = new ttypes.Point(args.ptVal); - } - if (args.lsVal !== undefined && args.lsVal !== null) { - this.lsVal = new ttypes.LineString(args.lsVal); - } - if (args.pgVal !== undefined && args.pgVal !== null) { - this.pgVal = new ttypes.Polygon(args.pgVal); - } - } -}; -Geography.prototype = {}; -Geography.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.ptVal = new ttypes.Point(); - this.ptVal.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.lsVal = new ttypes.LineString(); - this.lsVal.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.pgVal = new ttypes.Polygon(); - this.pgVal.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Geography.prototype.write = function(output) { - output.writeStructBegin('Geography'); - if (this.ptVal !== null && this.ptVal !== undefined) { - output.writeFieldBegin('ptVal', Thrift.Type.STRUCT, 1); - this.ptVal.write(output); - output.writeFieldEnd(); - } - if (this.lsVal !== null && this.lsVal !== undefined) { - output.writeFieldBegin('lsVal', Thrift.Type.STRUCT, 2); - this.lsVal.write(output); - output.writeFieldEnd(); - } - if (this.pgVal !== null && this.pgVal !== undefined) { - output.writeFieldBegin('pgVal', Thrift.Type.STRUCT, 3); - this.pgVal.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Tag = module.exports.Tag = function(args) { - this.name = null; - this.props = null; - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.props !== undefined && args.props !== null) { - this.props = Thrift.copyMap(args.props, [ttypes.Value]); - } - } -}; -Tag.prototype = {}; -Tag.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.props = {}; - var _rtmp348 = input.readMapBegin(); - var _size47 = _rtmp348.size || 0; - for (var _i49 = 0; _i49 < _size47; ++_i49) { - var key50 = null; - var val51 = null; - key50 = input.readString(); - val51 = new ttypes.Value(); - val51.read(input); - this.props[key50] = val51; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Tag.prototype.write = function(output) { - output.writeStructBegin('Tag'); - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin('name', Thrift.Type.STRING, 1); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.props !== null && this.props !== undefined) { - output.writeFieldBegin('props', Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.props)); - for (var kiter52 in this.props) { - if (this.props.hasOwnProperty(kiter52)) { - var viter53 = this.props[kiter52]; - output.writeString(kiter52); - viter53.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Vertex = module.exports.Vertex = function(args) { - this.vid = null; - this.tags = null; - if (args) { - if (args.vid !== undefined && args.vid !== null) { - this.vid = new ttypes.Value(args.vid); - } - if (args.tags !== undefined && args.tags !== null) { - this.tags = Thrift.copyList(args.tags, [ttypes.Tag]); - } - } -}; -Vertex.prototype = {}; -Vertex.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.vid = new ttypes.Value(); - this.vid.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.tags = []; - var _rtmp355 = input.readListBegin(); - var _size54 = _rtmp355.size || 0; - for (var _i56 = 0; _i56 < _size54; ++_i56) { - var elem57 = null; - elem57 = new ttypes.Tag(); - elem57.read(input); - this.tags.push(elem57); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Vertex.prototype.write = function(output) { - output.writeStructBegin('Vertex'); - if (this.vid !== null && this.vid !== undefined) { - output.writeFieldBegin('vid', Thrift.Type.STRUCT, 1); - this.vid.write(output); - output.writeFieldEnd(); - } - if (this.tags !== null && this.tags !== undefined) { - output.writeFieldBegin('tags', Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.tags.length); - for (var iter58 in this.tags) { - if (this.tags.hasOwnProperty(iter58)) { - iter58 = this.tags[iter58]; - iter58.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Edge = module.exports.Edge = function(args) { - this.src = null; - this.dst = null; - this.type = null; - this.name = null; - this.ranking = null; - this.props = null; - if (args) { - if (args.src !== undefined && args.src !== null) { - this.src = new ttypes.Value(args.src); - } - if (args.dst !== undefined && args.dst !== null) { - this.dst = new ttypes.Value(args.dst); - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.ranking !== undefined && args.ranking !== null) { - this.ranking = args.ranking; - } - if (args.props !== undefined && args.props !== null) { - this.props = Thrift.copyMap(args.props, [ttypes.Value]); - } - } -}; -Edge.prototype = {}; -Edge.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.src = new ttypes.Value(); - this.src.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.dst = new ttypes.Value(); - this.dst.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.ranking = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.MAP) { - this.props = {}; - var _rtmp360 = input.readMapBegin(); - var _size59 = _rtmp360.size || 0; - for (var _i61 = 0; _i61 < _size59; ++_i61) { - var key62 = null; - var val63 = null; - key62 = input.readString(); - val63 = new ttypes.Value(); - val63.read(input); - this.props[key62] = val63; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Edge.prototype.write = function(output) { - output.writeStructBegin('Edge'); - if (this.src !== null && this.src !== undefined) { - output.writeFieldBegin('src', Thrift.Type.STRUCT, 1); - this.src.write(output); - output.writeFieldEnd(); - } - if (this.dst !== null && this.dst !== undefined) { - output.writeFieldBegin('dst', Thrift.Type.STRUCT, 2); - this.dst.write(output); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin('type', Thrift.Type.I32, 3); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin('name', Thrift.Type.STRING, 4); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.ranking !== null && this.ranking !== undefined) { - output.writeFieldBegin('ranking', Thrift.Type.I64, 5); - output.writeI64(this.ranking); - output.writeFieldEnd(); - } - if (this.props !== null && this.props !== undefined) { - output.writeFieldBegin('props', Thrift.Type.MAP, 6); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.props)); - for (var kiter64 in this.props) { - if (this.props.hasOwnProperty(kiter64)) { - var viter65 = this.props[kiter64]; - output.writeString(kiter64); - viter65.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Step = module.exports.Step = function(args) { - this.dst = null; - this.type = null; - this.name = null; - this.ranking = null; - this.props = null; - if (args) { - if (args.dst !== undefined && args.dst !== null) { - this.dst = new ttypes.Vertex(args.dst); - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.ranking !== undefined && args.ranking !== null) { - this.ranking = args.ranking; - } - if (args.props !== undefined && args.props !== null) { - this.props = Thrift.copyMap(args.props, [ttypes.Value]); - } - } -}; -Step.prototype = {}; -Step.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.dst = new ttypes.Vertex(); - this.dst.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I64) { - this.ranking = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.MAP) { - this.props = {}; - var _rtmp367 = input.readMapBegin(); - var _size66 = _rtmp367.size || 0; - for (var _i68 = 0; _i68 < _size66; ++_i68) { - var key69 = null; - var val70 = null; - key69 = input.readString(); - val70 = new ttypes.Value(); - val70.read(input); - this.props[key69] = val70; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Step.prototype.write = function(output) { - output.writeStructBegin('Step'); - if (this.dst !== null && this.dst !== undefined) { - output.writeFieldBegin('dst', Thrift.Type.STRUCT, 1); - this.dst.write(output); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin('type', Thrift.Type.I32, 2); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin('name', Thrift.Type.STRING, 3); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.ranking !== null && this.ranking !== undefined) { - output.writeFieldBegin('ranking', Thrift.Type.I64, 4); - output.writeI64(this.ranking); - output.writeFieldEnd(); - } - if (this.props !== null && this.props !== undefined) { - output.writeFieldBegin('props', Thrift.Type.MAP, 5); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.props)); - for (var kiter71 in this.props) { - if (this.props.hasOwnProperty(kiter71)) { - var viter72 = this.props[kiter71]; - output.writeString(kiter71); - viter72.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Path = module.exports.Path = function(args) { - this.src = null; - this.steps = null; - if (args) { - if (args.src !== undefined && args.src !== null) { - this.src = new ttypes.Vertex(args.src); - } - if (args.steps !== undefined && args.steps !== null) { - this.steps = Thrift.copyList(args.steps, [ttypes.Step]); - } - } -}; -Path.prototype = {}; -Path.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.src = new ttypes.Vertex(); - this.src.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.steps = []; - var _rtmp374 = input.readListBegin(); - var _size73 = _rtmp374.size || 0; - for (var _i75 = 0; _i75 < _size73; ++_i75) { - var elem76 = null; - elem76 = new ttypes.Step(); - elem76.read(input); - this.steps.push(elem76); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Path.prototype.write = function(output) { - output.writeStructBegin('Path'); - if (this.src !== null && this.src !== undefined) { - output.writeFieldBegin('src', Thrift.Type.STRUCT, 1); - this.src.write(output); - output.writeFieldEnd(); - } - if (this.steps !== null && this.steps !== undefined) { - output.writeFieldBegin('steps', Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.steps.length); - for (var iter77 in this.steps) { - if (this.steps.hasOwnProperty(iter77)) { - iter77 = this.steps[iter77]; - iter77.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var HostAddr = module.exports.HostAddr = function(args) { - this.host = null; - this.port = null; - if (args) { - if (args.host !== undefined && args.host !== null) { - this.host = args.host; - } - if (args.port !== undefined && args.port !== null) { - this.port = args.port; - } - } -}; -HostAddr.prototype = {}; -HostAddr.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.host = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.port = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -HostAddr.prototype.write = function(output) { - output.writeStructBegin('HostAddr'); - if (this.host !== null && this.host !== undefined) { - output.writeFieldBegin('host', Thrift.Type.STRING, 1); - output.writeString(this.host); - output.writeFieldEnd(); - } - if (this.port !== null && this.port !== undefined) { - output.writeFieldBegin('port', Thrift.Type.I32, 2); - output.writeI32(this.port); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var KeyValue = module.exports.KeyValue = function(args) { - this.key = null; - this.value = null; - if (args) { - if (args.key !== undefined && args.key !== null) { - this.key = args.key; - } - if (args.value !== undefined && args.value !== null) { - this.value = args.value; - } - } -}; -KeyValue.prototype = {}; -KeyValue.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.key = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.value = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -KeyValue.prototype.write = function(output) { - output.writeStructBegin('KeyValue'); - if (this.key !== null && this.key !== undefined) { - output.writeFieldBegin('key', Thrift.Type.STRING, 1); - output.writeString(this.key); - output.writeFieldEnd(); - } - if (this.value !== null && this.value !== undefined) { - output.writeFieldBegin('value', Thrift.Type.STRING, 2); - output.writeString(this.value); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Duration = module.exports.Duration = function(args) { - this.seconds = null; - this.microseconds = null; - this.months = null; - if (args) { - if (args.seconds !== undefined && args.seconds !== null) { - this.seconds = args.seconds; - } - if (args.microseconds !== undefined && args.microseconds !== null) { - this.microseconds = args.microseconds; - } - if (args.months !== undefined && args.months !== null) { - this.months = args.months; - } - } -}; -Duration.prototype = {}; -Duration.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.seconds = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.microseconds = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.months = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Duration.prototype.write = function(output) { - output.writeStructBegin('Duration'); - if (this.seconds !== null && this.seconds !== undefined) { - output.writeFieldBegin('seconds', Thrift.Type.I64, 1); - output.writeI64(this.seconds); - output.writeFieldEnd(); - } - if (this.microseconds !== null && this.microseconds !== undefined) { - output.writeFieldBegin('microseconds', Thrift.Type.I32, 2); - output.writeI32(this.microseconds); - output.writeFieldEnd(); - } - if (this.months !== null && this.months !== undefined) { - output.writeFieldBegin('months', Thrift.Type.I32, 3); - output.writeI32(this.months); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var LogInfo = module.exports.LogInfo = function(args) { - this.log_id = null; - this.term_id = null; - if (args) { - if (args.log_id !== undefined && args.log_id !== null) { - this.log_id = args.log_id; - } - if (args.term_id !== undefined && args.term_id !== null) { - this.term_id = args.term_id; - } - } -}; -LogInfo.prototype = {}; -LogInfo.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.log_id = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.term_id = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -LogInfo.prototype.write = function(output) { - output.writeStructBegin('LogInfo'); - if (this.log_id !== null && this.log_id !== undefined) { - output.writeFieldBegin('log_id', Thrift.Type.I64, 1); - output.writeI64(this.log_id); - output.writeFieldEnd(); - } - if (this.term_id !== null && this.term_id !== undefined) { - output.writeFieldBegin('term_id', Thrift.Type.I64, 2); - output.writeI64(this.term_id); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var DirInfo = module.exports.DirInfo = function(args) { - this.root = null; - this.data = null; - if (args) { - if (args.root !== undefined && args.root !== null) { - this.root = args.root; - } - if (args.data !== undefined && args.data !== null) { - this.data = Thrift.copyList(args.data, [null]); - } - } -}; -DirInfo.prototype = {}; -DirInfo.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.root = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.data = []; - var _rtmp379 = input.readListBegin(); - var _size78 = _rtmp379.size || 0; - for (var _i80 = 0; _i80 < _size78; ++_i80) { - var elem81 = null; - elem81 = input.readString(); - this.data.push(elem81); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -DirInfo.prototype.write = function(output) { - output.writeStructBegin('DirInfo'); - if (this.root !== null && this.root !== undefined) { - output.writeFieldBegin('root', Thrift.Type.STRING, 1); - output.writeString(this.root); - output.writeFieldEnd(); - } - if (this.data !== null && this.data !== undefined) { - output.writeFieldBegin('data', Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRING, this.data.length); - for (var iter82 in this.data) { - if (this.data.hasOwnProperty(iter82)) { - iter82 = this.data[iter82]; - output.writeString(iter82); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var CheckpointInfo = module.exports.CheckpointInfo = function(args) { - this.space_id = null; - this.parts = null; - this.path = null; - if (args) { - if (args.space_id !== undefined && args.space_id !== null) { - this.space_id = args.space_id; - } - if (args.parts !== undefined && args.parts !== null) { - this.parts = Thrift.copyMap(args.parts, [ttypes.LogInfo]); - } - if (args.path !== undefined && args.path !== null) { - this.path = args.path; - } - } -}; -CheckpointInfo.prototype = {}; -CheckpointInfo.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.space_id = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.parts = {}; - var _rtmp384 = input.readMapBegin(); - var _size83 = _rtmp384.size || 0; - for (var _i85 = 0; _i85 < _size83; ++_i85) { - var key86 = null; - var val87 = null; - key86 = input.readI32(); - val87 = new ttypes.LogInfo(); - val87.read(input); - this.parts[key86] = val87; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.path = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -CheckpointInfo.prototype.write = function(output) { - output.writeStructBegin('CheckpointInfo'); - if (this.space_id !== null && this.space_id !== undefined) { - output.writeFieldBegin('space_id', Thrift.Type.I32, 1); - output.writeI32(this.space_id); - output.writeFieldEnd(); - } - if (this.parts !== null && this.parts !== undefined) { - output.writeFieldBegin('parts', Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRUCT, Thrift.objectLength(this.parts)); - for (var kiter88 in this.parts) { - if (this.parts.hasOwnProperty(kiter88)) { - var viter89 = this.parts[kiter88]; - output.writeI32(kiter88); - viter89.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.path !== null && this.path !== undefined) { - output.writeFieldBegin('path', Thrift.Type.STRING, 3); - output.writeString(this.path); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var LogEntry = module.exports.LogEntry = function(args) { - this.cluster = null; - this.log_str = null; - if (args) { - if (args.cluster !== undefined && args.cluster !== null) { - this.cluster = args.cluster; - } - if (args.log_str !== undefined && args.log_str !== null) { - this.log_str = args.log_str; - } - } -}; -LogEntry.prototype = {}; -LogEntry.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.cluster = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.log_str = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -LogEntry.prototype.write = function(output) { - output.writeStructBegin('LogEntry'); - if (this.cluster !== null && this.cluster !== undefined) { - output.writeFieldBegin('cluster', Thrift.Type.I64, 1); - output.writeI64(this.cluster); - output.writeFieldEnd(); - } - if (this.log_str !== null && this.log_str !== undefined) { - output.writeFieldBegin('log_str', Thrift.Type.STRING, 2); - output.writeString(this.log_str); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -ttypes.version = '3.0.0'; diff --git a/specs/gen-nodejs/graph_types.js b/specs/gen-nodejs/graph_types.js deleted file mode 100644 index 15b2cfc..0000000 --- a/specs/gen-nodejs/graph_types.js +++ /dev/null @@ -1,982 +0,0 @@ -// -// Autogenerated by Thrift Compiler (0.14.1) -// -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -// -"use strict"; - -var thrift = require('thrift'); -var Thrift = thrift.Thrift; -var Q = thrift.Q; -var Int64 = require('node-int64'); - -var common_ttypes = require('./common_types'); - - -var ttypes = module.exports = {}; -var ProfilingStats = module.exports.ProfilingStats = function(args) { - this.rows = null; - this.exec_duration_in_us = null; - this.total_duration_in_us = null; - this.other_stats = null; - if (args) { - if (args.rows !== undefined && args.rows !== null) { - this.rows = args.rows; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field rows is unset!'); - } - if (args.exec_duration_in_us !== undefined && args.exec_duration_in_us !== null) { - this.exec_duration_in_us = args.exec_duration_in_us; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field exec_duration_in_us is unset!'); - } - if (args.total_duration_in_us !== undefined && args.total_duration_in_us !== null) { - this.total_duration_in_us = args.total_duration_in_us; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field total_duration_in_us is unset!'); - } - if (args.other_stats !== undefined && args.other_stats !== null) { - this.other_stats = Thrift.copyMap(args.other_stats, [null]); - } - } -}; -ProfilingStats.prototype = {}; -ProfilingStats.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.rows = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.exec_duration_in_us = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.total_duration_in_us = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.MAP) { - this.other_stats = {}; - var _rtmp31 = input.readMapBegin(); - var _size0 = _rtmp31.size || 0; - for (var _i2 = 0; _i2 < _size0; ++_i2) { - var key3 = null; - var val4 = null; - key3 = input.readBinary(); - val4 = input.readBinary(); - this.other_stats[key3] = val4; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -ProfilingStats.prototype.write = function(output) { - output.writeStructBegin('ProfilingStats'); - if (this.rows !== null && this.rows !== undefined) { - output.writeFieldBegin('rows', Thrift.Type.I64, 1); - output.writeI64(this.rows); - output.writeFieldEnd(); - } - if (this.exec_duration_in_us !== null && this.exec_duration_in_us !== undefined) { - output.writeFieldBegin('exec_duration_in_us', Thrift.Type.I64, 2); - output.writeI64(this.exec_duration_in_us); - output.writeFieldEnd(); - } - if (this.total_duration_in_us !== null && this.total_duration_in_us !== undefined) { - output.writeFieldBegin('total_duration_in_us', Thrift.Type.I64, 3); - output.writeI64(this.total_duration_in_us); - output.writeFieldEnd(); - } - if (this.other_stats !== null && this.other_stats !== undefined) { - output.writeFieldBegin('other_stats', Thrift.Type.MAP, 4); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.other_stats)); - for (var kiter5 in this.other_stats) { - if (this.other_stats.hasOwnProperty(kiter5)) { - var viter6 = this.other_stats[kiter5]; - output.writeBinary(kiter5); - output.writeBinary(viter6); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var PlanNodeBranchInfo = module.exports.PlanNodeBranchInfo = function(args) { - this.is_do_branch = null; - this.condition_node_id = null; - if (args) { - if (args.is_do_branch !== undefined && args.is_do_branch !== null) { - this.is_do_branch = args.is_do_branch; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field is_do_branch is unset!'); - } - if (args.condition_node_id !== undefined && args.condition_node_id !== null) { - this.condition_node_id = args.condition_node_id; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field condition_node_id is unset!'); - } - } -}; -PlanNodeBranchInfo.prototype = {}; -PlanNodeBranchInfo.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.is_do_branch = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.condition_node_id = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -PlanNodeBranchInfo.prototype.write = function(output) { - output.writeStructBegin('PlanNodeBranchInfo'); - if (this.is_do_branch !== null && this.is_do_branch !== undefined) { - output.writeFieldBegin('is_do_branch', Thrift.Type.BOOL, 1); - output.writeBool(this.is_do_branch); - output.writeFieldEnd(); - } - if (this.condition_node_id !== null && this.condition_node_id !== undefined) { - output.writeFieldBegin('condition_node_id', Thrift.Type.I64, 2); - output.writeI64(this.condition_node_id); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var Pair = module.exports.Pair = function(args) { - this.key = null; - this.value = null; - if (args) { - if (args.key !== undefined && args.key !== null) { - this.key = args.key; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field key is unset!'); - } - if (args.value !== undefined && args.value !== null) { - this.value = args.value; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field value is unset!'); - } - } -}; -Pair.prototype = {}; -Pair.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.key = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.value = input.readBinary(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -Pair.prototype.write = function(output) { - output.writeStructBegin('Pair'); - if (this.key !== null && this.key !== undefined) { - output.writeFieldBegin('key', Thrift.Type.STRING, 1); - output.writeBinary(this.key); - output.writeFieldEnd(); - } - if (this.value !== null && this.value !== undefined) { - output.writeFieldBegin('value', Thrift.Type.STRING, 2); - output.writeBinary(this.value); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var PlanNodeDescription = module.exports.PlanNodeDescription = function(args) { - this.name = null; - this.id = null; - this.output_var = null; - this.description = null; - this.profiles = null; - this.branch_info = null; - this.dependencies = null; - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!'); - } - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!'); - } - if (args.output_var !== undefined && args.output_var !== null) { - this.output_var = args.output_var; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field output_var is unset!'); - } - if (args.description !== undefined && args.description !== null) { - this.description = Thrift.copyList(args.description, [ttypes.Pair]); - } - if (args.profiles !== undefined && args.profiles !== null) { - this.profiles = Thrift.copyList(args.profiles, [ttypes.ProfilingStats]); - } - if (args.branch_info !== undefined && args.branch_info !== null) { - this.branch_info = new ttypes.PlanNodeBranchInfo(args.branch_info); - } - if (args.dependencies !== undefined && args.dependencies !== null) { - this.dependencies = Thrift.copyList(args.dependencies, [null]); - } - } -}; -PlanNodeDescription.prototype = {}; -PlanNodeDescription.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.name = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.id = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.output_var = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.LIST) { - this.description = []; - var _rtmp38 = input.readListBegin(); - var _size7 = _rtmp38.size || 0; - for (var _i9 = 0; _i9 < _size7; ++_i9) { - var elem10 = null; - elem10 = new ttypes.Pair(); - elem10.read(input); - this.description.push(elem10); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.LIST) { - this.profiles = []; - var _rtmp312 = input.readListBegin(); - var _size11 = _rtmp312.size || 0; - for (var _i13 = 0; _i13 < _size11; ++_i13) { - var elem14 = null; - elem14 = new ttypes.ProfilingStats(); - elem14.read(input); - this.profiles.push(elem14); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.branch_info = new ttypes.PlanNodeBranchInfo(); - this.branch_info.read(input); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.LIST) { - this.dependencies = []; - var _rtmp316 = input.readListBegin(); - var _size15 = _rtmp316.size || 0; - for (var _i17 = 0; _i17 < _size15; ++_i17) { - var elem18 = null; - elem18 = input.readI64(); - this.dependencies.push(elem18); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -PlanNodeDescription.prototype.write = function(output) { - output.writeStructBegin('PlanNodeDescription'); - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin('name', Thrift.Type.STRING, 1); - output.writeBinary(this.name); - output.writeFieldEnd(); - } - if (this.id !== null && this.id !== undefined) { - output.writeFieldBegin('id', Thrift.Type.I64, 2); - output.writeI64(this.id); - output.writeFieldEnd(); - } - if (this.output_var !== null && this.output_var !== undefined) { - output.writeFieldBegin('output_var', Thrift.Type.STRING, 3); - output.writeBinary(this.output_var); - output.writeFieldEnd(); - } - if (this.description !== null && this.description !== undefined) { - output.writeFieldBegin('description', Thrift.Type.LIST, 4); - output.writeListBegin(Thrift.Type.STRUCT, this.description.length); - for (var iter19 in this.description) { - if (this.description.hasOwnProperty(iter19)) { - iter19 = this.description[iter19]; - iter19.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.profiles !== null && this.profiles !== undefined) { - output.writeFieldBegin('profiles', Thrift.Type.LIST, 5); - output.writeListBegin(Thrift.Type.STRUCT, this.profiles.length); - for (var iter20 in this.profiles) { - if (this.profiles.hasOwnProperty(iter20)) { - iter20 = this.profiles[iter20]; - iter20.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.branch_info !== null && this.branch_info !== undefined) { - output.writeFieldBegin('branch_info', Thrift.Type.STRUCT, 6); - this.branch_info.write(output); - output.writeFieldEnd(); - } - if (this.dependencies !== null && this.dependencies !== undefined) { - output.writeFieldBegin('dependencies', Thrift.Type.LIST, 7); - output.writeListBegin(Thrift.Type.I64, this.dependencies.length); - for (var iter21 in this.dependencies) { - if (this.dependencies.hasOwnProperty(iter21)) { - iter21 = this.dependencies[iter21]; - output.writeI64(iter21); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var PlanDescription = module.exports.PlanDescription = function(args) { - this.plan_node_descs = null; - this.node_index_map = null; - this.format = null; - this.optimize_time_in_us = null; - if (args) { - if (args.plan_node_descs !== undefined && args.plan_node_descs !== null) { - this.plan_node_descs = Thrift.copyList(args.plan_node_descs, [ttypes.PlanNodeDescription]); - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field plan_node_descs is unset!'); - } - if (args.node_index_map !== undefined && args.node_index_map !== null) { - this.node_index_map = Thrift.copyMap(args.node_index_map, [null]); - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field node_index_map is unset!'); - } - if (args.format !== undefined && args.format !== null) { - this.format = args.format; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field format is unset!'); - } - if (args.optimize_time_in_us !== undefined && args.optimize_time_in_us !== null) { - this.optimize_time_in_us = args.optimize_time_in_us; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field optimize_time_in_us is unset!'); - } - } -}; -PlanDescription.prototype = {}; -PlanDescription.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.plan_node_descs = []; - var _rtmp323 = input.readListBegin(); - var _size22 = _rtmp323.size || 0; - for (var _i24 = 0; _i24 < _size22; ++_i24) { - var elem25 = null; - elem25 = new ttypes.PlanNodeDescription(); - elem25.read(input); - this.plan_node_descs.push(elem25); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.node_index_map = {}; - var _rtmp327 = input.readMapBegin(); - var _size26 = _rtmp327.size || 0; - for (var _i28 = 0; _i28 < _size26; ++_i28) { - var key29 = null; - var val30 = null; - key29 = input.readI64(); - val30 = input.readI64(); - this.node_index_map[key29] = val30; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.format = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.optimize_time_in_us = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -PlanDescription.prototype.write = function(output) { - output.writeStructBegin('PlanDescription'); - if (this.plan_node_descs !== null && this.plan_node_descs !== undefined) { - output.writeFieldBegin('plan_node_descs', Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.plan_node_descs.length); - for (var iter31 in this.plan_node_descs) { - if (this.plan_node_descs.hasOwnProperty(iter31)) { - iter31 = this.plan_node_descs[iter31]; - iter31.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.node_index_map !== null && this.node_index_map !== undefined) { - output.writeFieldBegin('node_index_map', Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.I64, Thrift.Type.I64, Thrift.objectLength(this.node_index_map)); - for (var kiter32 in this.node_index_map) { - if (this.node_index_map.hasOwnProperty(kiter32)) { - var viter33 = this.node_index_map[kiter32]; - output.writeI64(kiter32); - output.writeI64(viter33); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.format !== null && this.format !== undefined) { - output.writeFieldBegin('format', Thrift.Type.STRING, 3); - output.writeBinary(this.format); - output.writeFieldEnd(); - } - if (this.optimize_time_in_us !== null && this.optimize_time_in_us !== undefined) { - output.writeFieldBegin('optimize_time_in_us', Thrift.Type.I32, 4); - output.writeI32(this.optimize_time_in_us); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var ExecutionResponse = module.exports.ExecutionResponse = function(args) { - this.error_code = null; - this.latency_in_us = null; - this.data = null; - this.space_name = null; - this.error_msg = null; - this.plan_desc = null; - this.comment = null; - if (args) { - if (args.error_code !== undefined && args.error_code !== null) { - this.error_code = args.error_code; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field error_code is unset!'); - } - if (args.latency_in_us !== undefined && args.latency_in_us !== null) { - this.latency_in_us = args.latency_in_us; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field latency_in_us is unset!'); - } - if (args.data !== undefined && args.data !== null) { - this.data = new common_ttypes.DataSet(args.data); - } - if (args.space_name !== undefined && args.space_name !== null) { - this.space_name = args.space_name; - } - if (args.error_msg !== undefined && args.error_msg !== null) { - this.error_msg = args.error_msg; - } - if (args.plan_desc !== undefined && args.plan_desc !== null) { - this.plan_desc = new ttypes.PlanDescription(args.plan_desc); - } - if (args.comment !== undefined && args.comment !== null) { - this.comment = args.comment; - } - } -}; -ExecutionResponse.prototype = {}; -ExecutionResponse.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.error_code = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.latency_in_us = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.data = new common_ttypes.DataSet(); - this.data.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.space_name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.error_msg = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.plan_desc = new ttypes.PlanDescription(); - this.plan_desc.read(input); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.STRING) { - this.comment = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -ExecutionResponse.prototype.write = function(output) { - output.writeStructBegin('ExecutionResponse'); - if (this.error_code !== null && this.error_code !== undefined) { - output.writeFieldBegin('error_code', Thrift.Type.I32, 1); - output.writeI32(this.error_code); - output.writeFieldEnd(); - } - if (this.latency_in_us !== null && this.latency_in_us !== undefined) { - output.writeFieldBegin('latency_in_us', Thrift.Type.I64, 2); - output.writeI64(this.latency_in_us); - output.writeFieldEnd(); - } - if (this.data !== null && this.data !== undefined) { - output.writeFieldBegin('data', Thrift.Type.STRUCT, 3); - this.data.write(output); - output.writeFieldEnd(); - } - if (this.space_name !== null && this.space_name !== undefined) { - output.writeFieldBegin('space_name', Thrift.Type.STRING, 4); - output.writeString(this.space_name); - output.writeFieldEnd(); - } - if (this.error_msg !== null && this.error_msg !== undefined) { - output.writeFieldBegin('error_msg', Thrift.Type.STRING, 5); - output.writeString(this.error_msg); - output.writeFieldEnd(); - } - if (this.plan_desc !== null && this.plan_desc !== undefined) { - output.writeFieldBegin('plan_desc', Thrift.Type.STRUCT, 6); - this.plan_desc.write(output); - output.writeFieldEnd(); - } - if (this.comment !== null && this.comment !== undefined) { - output.writeFieldBegin('comment', Thrift.Type.STRING, 7); - output.writeString(this.comment); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var AuthResponse = module.exports.AuthResponse = function(args) { - this.error_code = null; - this.error_msg = null; - this.session_id = null; - this.time_zone_offset_seconds = null; - this.time_zone_name = null; - if (args) { - if (args.error_code !== undefined && args.error_code !== null) { - this.error_code = args.error_code; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field error_code is unset!'); - } - if (args.error_msg !== undefined && args.error_msg !== null) { - this.error_msg = args.error_msg; - } - if (args.session_id !== undefined && args.session_id !== null) { - this.session_id = args.session_id; - } - if (args.time_zone_offset_seconds !== undefined && args.time_zone_offset_seconds !== null) { - this.time_zone_offset_seconds = args.time_zone_offset_seconds; - } - if (args.time_zone_name !== undefined && args.time_zone_name !== null) { - this.time_zone_name = args.time_zone_name; - } - } -}; -AuthResponse.prototype = {}; -AuthResponse.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.error_code = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.error_msg = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.session_id = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.time_zone_offset_seconds = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.time_zone_name = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -AuthResponse.prototype.write = function(output) { - output.writeStructBegin('AuthResponse'); - if (this.error_code !== null && this.error_code !== undefined) { - output.writeFieldBegin('error_code', Thrift.Type.I32, 1); - output.writeI32(this.error_code); - output.writeFieldEnd(); - } - if (this.error_msg !== null && this.error_msg !== undefined) { - output.writeFieldBegin('error_msg', Thrift.Type.STRING, 2); - output.writeString(this.error_msg); - output.writeFieldEnd(); - } - if (this.session_id !== null && this.session_id !== undefined) { - output.writeFieldBegin('session_id', Thrift.Type.I64, 3); - output.writeI64(this.session_id); - output.writeFieldEnd(); - } - if (this.time_zone_offset_seconds !== null && this.time_zone_offset_seconds !== undefined) { - output.writeFieldBegin('time_zone_offset_seconds', Thrift.Type.I32, 4); - output.writeI32(this.time_zone_offset_seconds); - output.writeFieldEnd(); - } - if (this.time_zone_name !== null && this.time_zone_name !== undefined) { - output.writeFieldBegin('time_zone_name', Thrift.Type.STRING, 5); - output.writeString(this.time_zone_name); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var VerifyClientVersionResp = module.exports.VerifyClientVersionResp = function(args) { - this.error_code = null; - this.error_msg = null; - if (args) { - if (args.error_code !== undefined && args.error_code !== null) { - this.error_code = args.error_code; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field error_code is unset!'); - } - if (args.error_msg !== undefined && args.error_msg !== null) { - this.error_msg = args.error_msg; - } - } -}; -VerifyClientVersionResp.prototype = {}; -VerifyClientVersionResp.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.error_code = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.error_msg = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -VerifyClientVersionResp.prototype.write = function(output) { - output.writeStructBegin('VerifyClientVersionResp'); - if (this.error_code !== null && this.error_code !== undefined) { - output.writeFieldBegin('error_code', Thrift.Type.I32, 1); - output.writeI32(this.error_code); - output.writeFieldEnd(); - } - if (this.error_msg !== null && this.error_msg !== undefined) { - output.writeFieldBegin('error_msg', Thrift.Type.STRING, 2); - output.writeString(this.error_msg); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - -var VerifyClientVersionReq = module.exports.VerifyClientVersionReq = function(args) { - this.version = '3.0.0'; - if (args) { - if (args.version !== undefined && args.version !== null) { - this.version = args.version; - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field version is unset!'); - } - } -}; -VerifyClientVersionReq.prototype = {}; -VerifyClientVersionReq.prototype.read = function(input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.version = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; - -VerifyClientVersionReq.prototype.write = function(output) { - output.writeStructBegin('VerifyClientVersionReq'); - if (this.version !== null && this.version !== undefined) { - output.writeFieldBegin('version', Thrift.Type.STRING, 1); - output.writeString(this.version); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; - diff --git a/specs/index.d.ts b/specs/index.d.ts deleted file mode 100644 index 32f101b..0000000 --- a/specs/index.d.ts +++ /dev/null @@ -1,597 +0,0 @@ -// Type definitions for thrift 0.10 -// Project: http://thrift.apache.org -// Definitions by: Kamek -// Kevin Greene -// Jesse Zhang -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// - -import * as net from 'net'; -import * as http from 'http'; -import * as https from 'https'; -import * as tls from 'tls'; -import { EventEmitter } from 'events'; - -// Thrift re-exports node-int64 and Q -import Int64 = require('node-int64'); -export { Int64 as Int64 }; -import Q = require('q'); -export { Q as Q }; - -export interface TMap { - ktype: Thrift.Type; - vtype: Thrift.Type; - size: number; -} - -export interface TMessage { - fname: string; - mtype: Thrift.MessageType; - rseqid: number; -} - -export interface TField { - fname: string; - ftype: Thrift.Type; - fid: number; -} - -export interface TList { - etype: Thrift.Type; - size: number; -} - -export interface TSet { - etype: Thrift.Type; - size: number; -} - -export interface TStruct { - fname: string; -} - -export interface TStructLike { - read(input: TProtocol): void; - write(output: TProtocol): void; -} - -export interface TTransport { - commitPosition(): void; - rollbackPosition(): void; - isOpen(): boolean; - open(): boolean; - close(): boolean; - setCurrSeqId(seqId: number): void; - ensureAvailable(len: number): void; - read(len: number): Buffer; - readByte(): number; - readI16(): number; - readI32(): number; - readDouble(): number; - readString(): string; - write(buf: Buffer | string): void; - flush(): void; -} - -export interface TProtocol { - flush(): void; - writeMessageBegin(name: string, type: Thrift.MessageType, seqid: number): void; - writeMessageEnd(): void; - writeStructBegin(name: string): void; - writeStructEnd(): void; - writeFieldBegin(name: string, type: Thrift.Type, id: number): void; - writeFieldEnd(): void; - writeFieldStop(): void; - writeMapBegin(ktype: Thrift.Type, vtype: Thrift.Type, size: number): void; - writeMapEnd(): void; - writeListBegin(etype: Thrift.Type, size: number): void; - writeListEnd(): void; - writeSetBegin(etype: Thrift.Type, size: number): void; - writeSetEnd(): void; - writeBool(bool: boolean): void; - writeByte(b: number): void; - writeI16(i16: number): void; - writeI32(i32: number): void; - writeI64(i64: number | Int64): void; - writeDouble(dbl: number): void; - writeString(arg: string | Buffer): void; - writeBinary(arg: string | Buffer): void; - readMessageBegin(): TMessage; - readMessageEnd(): void; - readStructBegin(): TStruct; - readStructEnd(): void; - readFieldBegin(): TField; - readFieldEnd(): void; - readMapBegin(): TMap; - readMapEnd(): void; - readListBegin(): TList; - readListEnd(): void; - readSetBegin(): TSet; - readSetEnd(): void; - readBool(): boolean; - readByte(): number; - readI16(): number; - readI32(): number; - readI64(): Int64; - readDouble(): number; - readBinary(): Buffer; - readString(): string; - getTransport(): TTransport; - skip(type: Thrift.Type): void; -} - -export interface HttpHeaders { - [name: string]: number | string | string[] | undefined; -} - -export interface SeqId2Service { - [seqid: number]: string; -} - -export class Connection extends EventEmitter { - seqId2Service: SeqId2Service; - connection: net.Socket; - ssl: boolean; - options: ConnectOptions; - transport: TTransport; - protocol: TProtocol; - offline_queue: Buffer[]; - connected: boolean; - constructor(stream: net.Socket, options?: ConnectOptions); - end(): void; - destroy(): void; - initialize_retry_vars(): void; - write(data: Buffer): void; - connection_gone(): void; -} - -export class HttpConnection extends EventEmitter { - options: ConnectOptions; - host: string; - port: number; - https: boolean; - transport: TTransport; - protocol: TProtocol; - constructor(host: string, port: number, options?: ConnectOptions); - responseCallback(response: http.IncomingMessage): void; - write(data: Buffer): void; -} - -export class XHRConnection extends EventEmitter { - seqId2Service: SeqId2Service; - options: ConnectOptions; - wpos: number; - rpos: number; - useCORS: boolean; - send_buf: string; - recv_buf: string; - transport: TTransport; - protocol: TProtocol; - headers: HttpHeaders; - constructor(host: string, port: number, options?: ConnectOptions); - getXmlHttpRequestObject(): XMLHttpRequest; - flush(): void; - setRecvBuffer(buf: string): void; - isOpen(): boolean; - open(): void; - close(): void; - read(len: number): string; - readAll(): string; - write(buf: string): void; - getSendBuffer(): string; -} - -export interface WSOptions { - host: string; - port: number; - path: string; - headers: HttpHeaders; -} - -export class WSConnection extends EventEmitter { - seqId2Service: SeqId2Service; - options: ConnectOptions; - host: string; - port: number; - secure: boolean; - transport: TTransport; - protocol: TProtocol; - path: string; - send_pending: Buffer[]; - wsOptions: WSOptions; - constructor(host: string, port: number, options?: ConnectOptions); - isOpen(): boolean; - open(): void; - close(): void; - uri(): string; - write(data: Buffer): void; -} - -export class Multiplexer { - createClient(serviceName: string, client: TClientConstructor, connection: Connection): TClient; -} - -export class MultiplexedProcessor { - constructor(stream?: any, options?: any); - process(input: TProtocol, output: TProtocol): void; -} - -export type TTransportCallback = - (msg?: Buffer, seqid?: number) => void; - -export interface ServiceMap { - [uri: string]: ServerOptions; -} - -export interface ServiceOptions { - transport?: TTransportConstructor; - protocol?: TProtocolConstructor; - processor?: { new(handler: THandler): TProcessor }; - handler?: THandler; -} - -export interface ServerOptions extends ServiceOptions { - cors?: string[]; - files?: string; - headers?: HttpHeaders; - services?: ServiceMap; - tls?: tls.TlsOptions; -} - -export interface ConnectOptions { - transport?: TTransportConstructor; - protocol?: TProtocolConstructor; - path?: string; - headers?: HttpHeaders; - https?: boolean; - debug?: boolean; - max_attempts?: number; - retry_max_delay?: number; - connect_timeout?: number; - timeout?: number; - nodeOptions?: http.RequestOptions | https.RequestOptions; -} - -export interface WSConnectOptions { - transport?: TTransportConstructor; - protocol?: TProtocolConstructor; - path?: string; - headers?: HttpHeaders; - secure?: boolean; - wsOptions?: WSOptions; -} - -export type TClientConstructor = - { new(output: TTransport, pClass: { new(trans: TTransport): TProtocol }): TClient; } | - { Client: { new(output: TTransport, pClass: { new(trans: TTransport): TProtocol }): TClient; } }; - -export type TProcessorConstructor = - { new(handler: THandler): TProcessor } | - { Processor: { new(handler: THandler): TProcessor } }; - -export interface WebServerOptions { - services: { - [path: string]: { - processor: TProcessorConstructor; - handler: THandler; - } - }; -} - -export function createConnection(host: string | undefined, port: number, options?: ConnectOptions): Connection; -export function createSSLConnection(host: string | undefined, port: number, options?: ConnectOptions): Connection; -export function createHttpConnection(host: string | undefined, port: number, options?: ConnectOptions): HttpConnection; -export function createXHRConnection(host: string | undefined, port: number, options?: ConnectOptions): XHRConnection; -export function createWSConnection(host: string | undefined, port: number, options?: WSConnectOptions): WSConnection; - -export function createXHRClient( - client: TClientConstructor, - connection: XHRConnection -): TClient; - -export function createHttpClient( - client: TClientConstructor, - connection: HttpConnection -): TClient; - -export function createWSClient( - client: TClientConstructor, - connection: WSConnection -): TClient; - -export function createStdIOClient( - client: TClientConstructor, - connection: Connection -): TClient; - -export function createClient( - client: TClientConstructor, - connection: Connection -): TClient; - -// THandler is going to be a hash of user-defined functions for prcessing RPC calls -export function createServer( - processor: TProcessorConstructor, - handler: THandler, - options?: ServerOptions -): http.Server | tls.Server; - -// tslint:disable-next-line no-unnecessary-generics -export function createWebServer(options: WebServerOptions): http.Server | tls.Server; - -export class TBufferedTransport implements TTransport { - constructor(buffer?: Buffer, callback?: TTransportCallback); - static receiver(callback: (trans: TBufferedTransport, seqid: number) => void, seqid: number): (data: Buffer) => void; - commitPosition(): void; - rollbackPosition(): void; - isOpen(): boolean; - open(): boolean; - close(): boolean; - setCurrSeqId(seqId: number): void; - ensureAvailable(len: number): void; - read(len: number): Buffer; - readByte(): number; - readI16(): number; - readI32(): number; - readDouble(): number; - readString(): string; - write(buf: Buffer | string): void; - flush(): void; -} - -export class TFramedTransport implements TTransport { - constructor(buffer?: Buffer, callback?: TTransportCallback); - static receiver(callback: (trans: TFramedTransport, seqid: number) => void, seqid: number): (data: Buffer) => void; - commitPosition(): void; - rollbackPosition(): void; - isOpen(): boolean; - open(): boolean; - close(): boolean; - setCurrSeqId(seqId: number): void; - ensureAvailable(len: number): void; - read(len: number): Buffer; - readByte(): number; - readI16(): number; - readI32(): number; - readDouble(): number; - readString(): string; - write(buf: Buffer | string): void; - flush(): void; -} - -export interface TTransportConstructor { - new(buffer?: Buffer, callback?: TTransportCallback): TTransport; -} - -export class TBinaryProtocol implements TProtocol { - constructor(trans: TTransport, strictRead?: boolean, strictWrite?: boolean); - flush(): void; - writeMessageBegin(name: string, type: Thrift.MessageType, seqid: number): void; - writeMessageEnd(): void; - writeStructBegin(name: string): void; - writeStructEnd(): void; - writeFieldBegin(name: string, type: Thrift.Type, id: number): void; - writeFieldEnd(): void; - writeFieldStop(): void; - writeMapBegin(ktype: Thrift.Type, vtype: Thrift.Type, size: number): void; - writeMapEnd(): void; - writeListBegin(etype: Thrift.Type, size: number): void; - writeListEnd(): void; - writeSetBegin(etype: Thrift.Type, size: number): void; - writeSetEnd(): void; - writeBool(bool: boolean): void; - writeByte(b: number): void; - writeI16(i16: number): void; - writeI32(i32: number): void; - writeI64(i64: number | Int64): void; - writeDouble(dbl: number): void; - writeString(arg: string | Buffer): void; - writeBinary(arg: string | Buffer): void; - readMessageBegin(): TMessage; - readMessageEnd(): void; - readStructBegin(): TStruct; - readStructEnd(): void; - readFieldBegin(): TField; - readFieldEnd(): void; - readMapBegin(): TMap; - readMapEnd(): void; - readListBegin(): TList; - readListEnd(): void; - readSetBegin(): TSet; - readSetEnd(): void; - readBool(): boolean; - readByte(): number; - readI16(): number; - readI32(): number; - readI64(): Int64; - readDouble(): number; - readBinary(): Buffer; - readString(): string; - getTransport(): TTransport; - skip(type: Thrift.Type): void; -} - -export class TJSONProtocol implements TProtocol { - constructor(trans: TTransport); - flush(): void; - writeMessageBegin(name: string, type: Thrift.MessageType, seqid: number): void; - writeMessageEnd(): void; - writeStructBegin(name: string): void; - writeStructEnd(): void; - writeFieldBegin(name: string, type: Thrift.Type, id: number): void; - writeFieldEnd(): void; - writeFieldStop(): void; - writeMapBegin(ktype: Thrift.Type, vtype: Thrift.Type, size: number): void; - writeMapEnd(): void; - writeListBegin(etype: Thrift.Type, size: number): void; - writeListEnd(): void; - writeSetBegin(etype: Thrift.Type, size: number): void; - writeSetEnd(): void; - writeBool(bool: boolean): void; - writeByte(b: number): void; - writeI16(i16: number): void; - writeI32(i32: number): void; - writeI64(i64: number | Int64): void; - writeDouble(dbl: number): void; - writeString(arg: string | Buffer): void; - writeBinary(arg: string | Buffer): void; - readMessageBegin(): TMessage; - readMessageEnd(): void; - readStructBegin(): TStruct; - readStructEnd(): void; - readFieldBegin(): TField; - readFieldEnd(): void; - readMapBegin(): TMap; - readMapEnd(): void; - readListBegin(): TList; - readListEnd(): void; - readSetBegin(): TSet; - readSetEnd(): void; - readBool(): boolean; - readByte(): number; - readI16(): number; - readI32(): number; - readI64(): Int64; - readDouble(): number; - readBinary(): Buffer; - readString(): string; - getTransport(): TTransport; - skip(type: Thrift.Type): void; -} - -export class TCompactProtocol implements TProtocol { - constructor(trans: TTransport); - flush(): void; - writeMessageBegin(name: string, type: Thrift.MessageType, seqid: number): void; - writeMessageEnd(): void; - writeStructBegin(name: string): void; - writeStructEnd(): void; - writeFieldBegin(name: string, type: Thrift.Type, id: number): void; - writeFieldEnd(): void; - writeFieldStop(): void; - writeMapBegin(ktype: Thrift.Type, vtype: Thrift.Type, size: number): void; - writeMapEnd(): void; - writeListBegin(etype: Thrift.Type, size: number): void; - writeListEnd(): void; - writeSetBegin(etype: Thrift.Type, size: number): void; - writeSetEnd(): void; - writeBool(bool: boolean): void; - writeByte(b: number): void; - writeI16(i16: number): void; - writeI32(i32: number): void; - writeI64(i64: number | Int64): void; - writeDouble(dbl: number): void; - writeString(arg: string | Buffer): void; - writeBinary(arg: string | Buffer): void; - readMessageBegin(): TMessage; - readMessageEnd(): void; - readStructBegin(): TStruct; - readStructEnd(): void; - readFieldBegin(): TField; - readFieldEnd(): void; - readMapBegin(): TMap; - readMapEnd(): void; - readListBegin(): TList; - readListEnd(): void; - readSetBegin(): TSet; - readSetEnd(): void; - readBool(): boolean; - readByte(): number; - readI16(): number; - readI32(): number; - readI64(): Int64; - readDouble(): number; - readBinary(): Buffer; - readString(): string; - getTransport(): TTransport; - skip(type: Thrift.Type): void; -} - -export interface TProtocolConstructor { - new(trans: TTransport, strictRead?: boolean, strictWrite?: boolean): TProtocol; -} - -// thrift.js -export namespace Thrift { - enum Type { - STOP = 0, - VOID = 1, - BOOL = 2, - BYTE = 3, - I08 = 3, - DOUBLE = 4, - I16 = 6, - I32 = 8, - I64 = 10, - STRING = 11, - UTF7 = 11, - STRUCT = 12, - MAP = 13, - SET = 14, - LIST = 15, - UTF8 = 16, - UTF16 = 17 - } - - enum MessageType { - CALL = 1, - REPLY = 2, - EXCEPTION = 3, - ONEWAY = 4 - } - - class TException extends Error { - name: string; - message: string; - - constructor(message: string); - - getMessage(): string; - } - - enum TApplicationExceptionType { - UNKNOWN = 0, - UNKNOWN_METHOD = 1, - INVALID_MESSAGE_TYPE = 2, - WRONG_METHOD_NAME = 3, - BAD_SEQUENCE_ID = 4, - MISSING_RESULT = 5, - INTERNAL_ERROR = 6, - PROTOCOL_ERROR = 7, - INVALID_TRANSFORM = 8, - INVALID_PROTOCOL = 9, - UNSUPPORTED_CLIENT_TYPE = 10 - } - - class TApplicationException extends TException { - message: string; - code: number; - - constructor(type?: TApplicationExceptionType, message?: string); - read(input: TProtocol): void; - write(output: TProtocol): void; - getCode(): number; - } - - enum TProtocolExceptionType { - UNKNOWN = 0, - INVALID_DATA = 1, - NEGATIVE_SIZE = 2, - SIZE_LIMIT = 3, - BAD_VERSION = 4, - NOT_IMPLEMENTED = 5, - DEPTH_LIMIT = 6 - } - - class TProtocolException implements Error { - name: string; - message: string; - type: TProtocolExceptionType; - - constructor(type: TProtocolExceptionType, message: string); - } - - function objectLength(obj: any): number; -} diff --git a/specs/thrift-0.14.1.exe b/specs/thrift-0.14.1.exe deleted file mode 100644 index 28d086b..0000000 Binary files a/specs/thrift-0.14.1.exe and /dev/null differ diff --git a/src/native/addon.cc b/src/native/addon.cc index d60276d..161f035 100644 --- a/src/native/addon.cc +++ b/src/native/addon.cc @@ -1,96 +1,99 @@ -/** - * Created by Wu Jian Ping on - 2021/06/15. - */ - -#include +#include #include "./MurmurHash3.h" -namespace addon +Napi::Value BytesToLongLongString(const Napi::CallbackInfo &info) { - using v8::Array; - using v8::Context; - using v8::Exception; - using v8::Function; - using v8::FunctionCallbackInfo; - using v8::Integer; - using v8::Isolate; - using v8::Local; - using v8::Null; - using v8::Number; - using v8::Object; - using v8::String; - using v8::Undefined; - using v8::Value; - - void BytesToLongLongString(const FunctionCallbackInfo &args) + Napi::Env env = info.Env(); + + if (info.Length() != 1) { - Isolate *isolate = args.GetIsolate(); + Napi::TypeError::New(env, "Wrong number of arguments") + .ThrowAsJavaScriptException(); + return env.Null(); + } - unsigned char b0 = args[0].As()->Value(); - unsigned char b1 = args[1].As()->Value(); - unsigned char b2 = args[2].As()->Value(); - unsigned char b3 = args[3].As()->Value(); - unsigned char b4 = args[4].As()->Value(); - unsigned char b5 = args[5].As()->Value(); - unsigned char b6 = args[6].As()->Value(); - unsigned char b7 = args[7].As()->Value(); + if (!info[0].IsArray()) + { + Napi::TypeError::New(env, "Wrong arguments type").ThrowAsJavaScriptException(); + return env.Null(); + } - unsigned char chars[8] = {b0, b1, b2, b3, b4, b5, b6, b7}; + Napi::Array arr = info[0].As(); + if (arr.Length() != 8) + { + Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException(); + return env.Null(); + } - long long value = *(((long long *)chars)); + unsigned char chars[8]; + for (unsigned int i = 0; i < 8; i++) + { + if (!arr.Get(i).IsNumber()) + { + Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException(); + return env.Null(); + } + chars[i] = arr.Get(i).As().Uint32Value(); + } - // printf("v: %lld\n", value); + long long value = *(((long long *)chars)); - // long long range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 - char str[24]; - sprintf(str, "%lld", value); + // printf("v: %lld\n", value); - args.GetReturnValue().Set(String::NewFromUtf8( - isolate, str) - .ToLocalChecked()); - } + // long long range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + char str[24]; + sprintf(str, "%lld", value); - void Hash64(const FunctionCallbackInfo &args) + return Napi::String::New(env, str); +} + +Napi::Value Hash64(const Napi::CallbackInfo &info) +{ + Napi::Env env = info.Env(); + + if (info.Length() != 1) { - Isolate *isolate = args.GetIsolate(); - Local context = isolate->GetCurrentContext(); + Napi::TypeError::New(env, "Wrong number of arguments") + .ThrowAsJavaScriptException(); + return env.Null(); + } - long long out[2]; + if (!info[0].IsString()) + { + Napi::TypeError::New(env, "Wrong arguments type").ThrowAsJavaScriptException(); + return env.Null(); + } - Local key = Local::Cast(args[0]); + Napi::String key = info[0].As(); - v8::String::Utf8Value str(isolate, key); + long long out[2]; + + const std::string str = key.Utf8Value(); + int length = str.length(); - char *c_str = *str; - int length = strlen(c_str); + MurmurHash3_x64_128((void *)str.c_str(), length, 0, &out); - MurmurHash3_x64_128((void *)c_str, length, 0, &out); + // long long range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + char str0[24]; + char str1[24]; - // long long range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 - char str0[24]; - char str1[24]; + sprintf(str0, "%lld", out[0]); + sprintf(str1, "%lld", out[1]); - sprintf(str0, "%lld", out[0]); - sprintf(str1, "%lld", out[1]); + Napi::Array array = Napi::Array::New(env, 2); - Local array = Array::New(isolate, 2); - array->Set(context, Integer::New(isolate, 0), String::NewFromUtf8(isolate, str0).ToLocalChecked()); - array->Set(context, Integer::New(isolate, 1), String::NewFromUtf8(isolate, str1).ToLocalChecked()); - args.GetReturnValue().Set(array); - } + array.Set((uint32_t)0, Napi::String::New(env, str0)); + array.Set((uint32_t)1, Napi::String::New(env, str1)); - // setup exports - void Init(Local exports) - { - NODE_SET_METHOD(exports, "bytesToLongLongString", BytesToLongLongString); - NODE_SET_METHOD(exports, "hash64", Hash64); - } + return array; +} - // init module - // 下面这种方式在worker里面报Module did not self-register错误 - // NODE_MODULE(NODE_GYP_MODULE_NAME, Init) - NODE_MODULE_INIT() - { - Init(exports); - } +Napi::Object Init(Napi::Env env, Napi::Object exports) +{ + // exports.Set(Napi::String::New(env, "add"), Napi::Function::New(env, Add)); + exports.Set(Napi::String::New(env, "bytesToLongLongString"), Napi::Function::New(env, BytesToLongLongString)); + exports.Set(Napi::String::New(env, "hash64"), Napi::Function::New(env, Hash64)); + return exports; } + +NODE_API_MODULE(addon, Init) diff --git a/src/binding.gyp b/src/native/binding.gyp similarity index 68% rename from src/binding.gyp rename to src/native/binding.gyp index 11992e7..ca0476a 100644 --- a/src/binding.gyp +++ b/src/native/binding.gyp @@ -2,7 +2,7 @@ "targets": [ { "target_name": "addon", - "sources": [ "native/addon.cc", "native/MurmurHash3.cc"], + "sources": [ "./addon.cc", "./MurmurHash3.cc"], "cflags!": [ "-fno-exceptions", "-Wno-implicit-fallthrough", @@ -17,7 +17,10 @@ "-Wno-cast-function-type", "-Wno-attributes" ], - 'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ] + "include_dirs": [ + " { - const tmp = _.reverse(buffer) - return addon.bytesToLongLongString(...tmp) -} +export const bytesToLongLongString = (buffer: number[]): string => { + return addon.bytesToLongLongString(buffer.reverse()); +}; -const hash64 = (key: string): string[] => { - return addon.hash64(key) -} - -export default { - bytesToLongLongString, - hash64 -} - -export { - bytesToLongLongString, - hash64 -} +export const hash64 = (key: string): string[] => { + return addon.hash64(key); +}; diff --git a/src/nebula/Connection.ts b/src/nebula/Connection.ts index c66581d..7aef40e 100644 --- a/src/nebula/Connection.ts +++ b/src/nebula/Connection.ts @@ -3,18 +3,19 @@ */ import _ from 'lodash' -import thrift from '../thrift' +import thrift from 'thrift' import { EventEmitter } from 'events' -import GraphService from './interface/GraphService' +import Int64 from 'node-int64' import { ConnectionOption, ConnectionInfo, Task } from './types' -import parser from './parser' +import { traverse } from './parser' import NebulaError from './NebulaError' +import * as GraphService from './services/GraphService' export default class Connection extends EventEmitter { private connectionOption: ConnectionOption; private connection: thrift.Connection; - private client: GraphService.Client; - private sessionId: Buffer; + private client: InstanceType; + private sessionId: Int64; public connectionId: string; // 是否完成执行命令前所有操作 public isReady = false; @@ -78,7 +79,7 @@ export default class Connection extends EventEmitter { if (response.error_code !== 0) { throw new NebulaError(response.error_code, response.error_msg) } - this.sessionId = response.session_id + this.sessionId = new Int64(response.session_id.buffer) this.emit('authorized', { sender: this }) @@ -143,7 +144,7 @@ export default class Connection extends EventEmitter { const timer = setTimeout(() => { resolve(false) }, timeout) this .client - .execute(this.sessionId, 'YIELD 1') + .execute(this.sessionId, Buffer.from('YIELD 1', 'utf-8')) .then(response => { clearTimeout(timer) resolve(response.error_code === 0) @@ -187,7 +188,7 @@ export default class Connection extends EventEmitter { response.metrics.execute = elapsed if (!task.returnOriginalData) { - return parser.traverse(response) + return traverse(response) } return Promise.resolve(response) }) diff --git a/src/nebula/index.ts b/src/nebula/index.ts index 48bc704..971ea78 100644 --- a/src/nebula/index.ts +++ b/src/nebula/index.ts @@ -5,7 +5,7 @@ import Client from './Client' import Connection from './Connection' import { ConnectionOption, ClientOption } from './types' -import parser from './parser' +import * as parser from './parser' const createClient = (option: ClientOption): Client => new Client(option) diff --git a/src/nebula/interface/GraphService.js b/src/nebula/interface/GraphService.js deleted file mode 100644 index 7069964..0000000 --- a/src/nebula/interface/GraphService.js +++ /dev/null @@ -1,1468 +0,0 @@ -// -// Autogenerated by Thrift Compiler (0.14.1) -// -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -// -'use strict' - -const thrift = require('../../thrift') -const Thrift = thrift.Thrift -const Q = thrift.Q -const Int64 = require('node-int64') - -const common_ttypes = require('./common_types') - - -const ttypes = require('./graph_types') -// HELPER FUNCTIONS AND STRUCTURES - -const GraphService_authenticate_args = function(args) { - this.username = null - this.password = null - if (args) { - if (args.username !== undefined && args.username !== null) { - this.username = args.username - } - if (args.password !== undefined && args.password !== null) { - this.password = args.password - } - } -} -GraphService_authenticate_args.prototype = {} -GraphService_authenticate_args.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.username = input.readString() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.password = input.readString() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_authenticate_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_authenticate_args') - if (this.username !== null && this.username !== undefined) { - output.writeFieldBegin('username', Thrift.Type.STRING, 1) - output.writeString(this.username) - output.writeFieldEnd() - } - if (this.password !== null && this.password !== undefined) { - output.writeFieldBegin('password', Thrift.Type.STRING, 2) - output.writeString(this.password) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_authenticate_result = function(args) { - this.success = null - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.AuthResponse(args.success) - } - } -} -GraphService_authenticate_result.prototype = {} -GraphService_authenticate_result.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.AuthResponse() - this.success.read(input) - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_authenticate_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_authenticate_result') - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRUCT, 0) - this.success.write(output) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_signout_args = function(args) { - this.sessionId = null - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId - } - } -} -GraphService_signout_args.prototype = {} -GraphService_signout_args.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_signout_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_signout_args') - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1) - output.writeI64(this.sessionId) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_signout_result = function(args) { -} -GraphService_signout_result.prototype = {} -GraphService_signout_result.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - if (ftype == Thrift.Type.STOP) { - break - } - input.skip(ftype) - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_signout_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_signout_result') - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_execute_args = function(args) { - this.sessionId = null - this.stmt = null - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId - } - if (args.stmt !== undefined && args.stmt !== null) { - this.stmt = args.stmt - } - } -} -GraphService_execute_args.prototype = {} -GraphService_execute_args.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.stmt = input.readBinary() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_execute_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_execute_args') - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1) - output.writeI64(this.sessionId) - output.writeFieldEnd() - } - if (this.stmt !== null && this.stmt !== undefined) { - output.writeFieldBegin('stmt', Thrift.Type.STRING, 2) - output.writeBinary(this.stmt) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_execute_result = function(args) { - this.success = null - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.ExecutionResponse(args.success) - } - } -} -GraphService_execute_result.prototype = {} -GraphService_execute_result.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.ExecutionResponse() - this.success.read(input) - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_execute_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_execute_result') - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRUCT, 0) - this.success.write(output) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_executeWithParameter_args = function(args) { - this.sessionId = null - this.stmt = null - this.parameterMap = null - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId - } - if (args.stmt !== undefined && args.stmt !== null) { - this.stmt = args.stmt - } - if (args.parameterMap !== undefined && args.parameterMap !== null) { - this.parameterMap = Thrift.copyMap(args.parameterMap, [common_ttypes.Value]) - } - } -} -GraphService_executeWithParameter_args.prototype = {} -GraphService_executeWithParameter_args.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.stmt = input.readBinary() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.MAP) { - this.parameterMap = {} - const _rtmp335 = input.readMapBegin() - const _size34 = _rtmp335.size || 0 - for (let _i36 = 0; _i36 < _size34; ++_i36) { - let key37 = null - let val38 = null - key37 = input.readString() - val38 = new common_ttypes.Value() - val38.read(input) - this.parameterMap[key37] = val38 - } - input.readMapEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_executeWithParameter_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeWithParameter_args') - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1) - output.writeI64(this.sessionId) - output.writeFieldEnd() - } - if (this.stmt !== null && this.stmt !== undefined) { - output.writeFieldBegin('stmt', Thrift.Type.STRING, 2) - output.writeBinary(this.stmt) - output.writeFieldEnd() - } - if (this.parameterMap !== null && this.parameterMap !== undefined) { - output.writeFieldBegin('parameterMap', Thrift.Type.MAP, 3) - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.parameterMap)) - for (const kiter39 in this.parameterMap) { - if (this.parameterMap.hasOwnProperty(kiter39)) { - const viter40 = this.parameterMap[kiter39] - output.writeString(kiter39) - viter40.write(output) - } - } - output.writeMapEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_executeWithParameter_result = function(args) { - this.success = null - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.ExecutionResponse(args.success) - } - } -} -GraphService_executeWithParameter_result.prototype = {} -GraphService_executeWithParameter_result.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.ExecutionResponse() - this.success.read(input) - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_executeWithParameter_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeWithParameter_result') - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRUCT, 0) - this.success.write(output) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_executeJson_args = function(args) { - this.sessionId = null - this.stmt = null - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId - } - if (args.stmt !== undefined && args.stmt !== null) { - this.stmt = args.stmt - } - } -} -GraphService_executeJson_args.prototype = {} -GraphService_executeJson_args.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.stmt = input.readBinary() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_executeJson_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeJson_args') - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1) - output.writeI64(this.sessionId) - output.writeFieldEnd() - } - if (this.stmt !== null && this.stmt !== undefined) { - output.writeFieldBegin('stmt', Thrift.Type.STRING, 2) - output.writeBinary(this.stmt) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_executeJson_result = function(args) { - this.success = null - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = args.success - } - } -} -GraphService_executeJson_result.prototype = {} -GraphService_executeJson_result.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRING) { - this.success = input.readBinary() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_executeJson_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeJson_result') - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRING, 0) - output.writeBinary(this.success) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_executeJsonWithParameter_args = function(args) { - this.sessionId = null - this.stmt = null - this.parameterMap = null - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId - } - if (args.stmt !== undefined && args.stmt !== null) { - this.stmt = args.stmt - } - if (args.parameterMap !== undefined && args.parameterMap !== null) { - this.parameterMap = Thrift.copyMap(args.parameterMap, [common_ttypes.Value]) - } - } -} -GraphService_executeJsonWithParameter_args.prototype = {} -GraphService_executeJsonWithParameter_args.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.sessionId = input.readI64() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.stmt = input.readBinary() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.MAP) { - this.parameterMap = {} - const _rtmp342 = input.readMapBegin() - const _size41 = _rtmp342.size || 0 - for (let _i43 = 0; _i43 < _size41; ++_i43) { - let key44 = null - let val45 = null - key44 = input.readBinary() - val45 = new common_ttypes.Value() - val45.read(input) - this.parameterMap[key44] = val45 - } - input.readMapEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_executeJsonWithParameter_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeJsonWithParameter_args') - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin('sessionId', Thrift.Type.I64, 1) - output.writeI64(this.sessionId) - output.writeFieldEnd() - } - if (this.stmt !== null && this.stmt !== undefined) { - output.writeFieldBegin('stmt', Thrift.Type.STRING, 2) - output.writeBinary(this.stmt) - output.writeFieldEnd() - } - if (this.parameterMap !== null && this.parameterMap !== undefined) { - output.writeFieldBegin('parameterMap', Thrift.Type.MAP, 3) - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.parameterMap)) - for (const kiter46 in this.parameterMap) { - if (this.parameterMap.hasOwnProperty(kiter46)) { - const viter47 = this.parameterMap[kiter46] - output.writeBinary(kiter46) - viter47.write(output) - } - } - output.writeMapEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_executeJsonWithParameter_result = function(args) { - this.success = null - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = args.success - } - } -} -GraphService_executeJsonWithParameter_result.prototype = {} -GraphService_executeJsonWithParameter_result.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRING) { - this.success = input.readBinary() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_executeJsonWithParameter_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_executeJsonWithParameter_result') - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRING, 0) - output.writeBinary(this.success) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_verifyClientVersion_args = function(args) { - this.req = null - if (args) { - if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.VerifyClientVersionReq(args.req) - } - } -} -GraphService_verifyClientVersion_args.prototype = {} -GraphService_verifyClientVersion_args.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.VerifyClientVersionReq() - this.req.read(input) - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_verifyClientVersion_args.prototype.write = function(output) { - output.writeStructBegin('GraphService_verifyClientVersion_args') - if (this.req !== null && this.req !== undefined) { - output.writeFieldBegin('req', Thrift.Type.STRUCT, 1) - this.req.write(output) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -const GraphService_verifyClientVersion_result = function(args) { - this.success = null - if (args) { - if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.VerifyClientVersionResp(args.success) - } - } -} -GraphService_verifyClientVersion_result.prototype = {} -GraphService_verifyClientVersion_result.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 0: - if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.VerifyClientVersionResp() - this.success.read(input) - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -GraphService_verifyClientVersion_result.prototype.write = function(output) { - output.writeStructBegin('GraphService_verifyClientVersion_result') - if (this.success !== null && this.success !== undefined) { - output.writeFieldBegin('success', Thrift.Type.STRUCT, 0) - this.success.write(output) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -exports.Client = GraphServiceClient -function GraphServiceClient(output, pClass) { - this.output = output - this.pClass = pClass - this._seqid = 0 - this._reqs = {} -} -GraphServiceClient.prototype = {} -GraphServiceClient.prototype.seqid = function() { return this._seqid } -GraphServiceClient.prototype.new_seqid = function() { return this._seqid += 1 } - -GraphServiceClient.prototype.authenticate = function(username, password, callback) { - this._seqid = this.new_seqid() - if (callback === undefined) { - const _defer = Q.defer() - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error) - } else { - _defer.resolve(result) - } - } - this.send_authenticate(username, password) - return _defer.promise - } else { - this._reqs[this.seqid()] = callback - this.send_authenticate(username, password) - } -} - -GraphServiceClient.prototype.send_authenticate = function(username, password) { - const output = new this.pClass(this.output) - const params = { - username: username, - password: password - } - const args = new GraphService_authenticate_args(params) - try { - output.writeMessageBegin('authenticate', Thrift.MessageType.CALL, this.seqid()) - args.write(output) - output.writeMessageEnd() - return this.output.flush() - } catch (e) { - delete this._reqs[this.seqid()] - if (typeof output.reset === 'function') { - output.reset() - } - throw e - } -} - -GraphServiceClient.prototype.recv_authenticate = function(input, mtype, rseqid) { - const callback = this._reqs[rseqid] || function() {} - delete this._reqs[rseqid] - if (mtype == Thrift.MessageType.EXCEPTION) { - const x = new Thrift.TApplicationException() - x.read(input) - input.readMessageEnd() - return callback(x) - } - const result = new GraphService_authenticate_result() - result.read(input) - input.readMessageEnd() - - if (result.success !== null) { - return callback(null, result.success) - } - return callback('authenticate failed: unknown result') -} - -GraphServiceClient.prototype.signout = function(sessionId, callback) { - this._seqid = this.new_seqid() - if (callback === undefined) { - const _defer = Q.defer() - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error) - } else { - _defer.resolve(result) - } - } - this.send_signout(sessionId) - return _defer.promise - } else { - this._reqs[this.seqid()] = callback - this.send_signout(sessionId) - } -} - -GraphServiceClient.prototype.send_signout = function(sessionId) { - const output = new this.pClass(this.output) - const params = { - sessionId: sessionId - } - const args = new GraphService_signout_args(params) - try { - output.writeMessageBegin('signout', Thrift.MessageType.ONEWAY, this.seqid()) - args.write(output) - output.writeMessageEnd() - this.output.flush() - const callback = this._reqs[this.seqid()] || function() {} - delete this._reqs[this.seqid()] - callback(null) - } catch (e) { - delete this._reqs[this.seqid()] - if (typeof output.reset === 'function') { - output.reset() - } - throw e - } -} - -GraphServiceClient.prototype.execute = function(sessionId, stmt, callback) { - this._seqid = this.new_seqid() - if (callback === undefined) { - const _defer = Q.defer() - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error) - } else { - _defer.resolve(result) - } - } - this.send_execute(sessionId, stmt) - return _defer.promise - } else { - this._reqs[this.seqid()] = callback - this.send_execute(sessionId, stmt) - } -} - -GraphServiceClient.prototype.send_execute = function(sessionId, stmt) { - const output = new this.pClass(this.output) - const params = { - sessionId: sessionId, - stmt: stmt - } - const args = new GraphService_execute_args(params) - try { - output.writeMessageBegin('execute', Thrift.MessageType.CALL, this.seqid()) - args.write(output) - output.writeMessageEnd() - return this.output.flush() - } catch (e) { - delete this._reqs[this.seqid()] - if (typeof output.reset === 'function') { - output.reset() - } - throw e - } -} - -GraphServiceClient.prototype.recv_execute = function(input, mtype, rseqid) { - const callback = this._reqs[rseqid] || function() {} - delete this._reqs[rseqid] - if (mtype == Thrift.MessageType.EXCEPTION) { - const x = new Thrift.TApplicationException() - x.read(input) - input.readMessageEnd() - return callback(x) - } - const result = new GraphService_execute_result() - result.read(input) - input.readMessageEnd() - - if (result.success !== null) { - return callback(null, result.success) - } - return callback('execute failed: unknown result') -} - -GraphServiceClient.prototype.executeWithParameter = function(sessionId, stmt, parameterMap, callback) { - this._seqid = this.new_seqid() - if (callback === undefined) { - const _defer = Q.defer() - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error) - } else { - _defer.resolve(result) - } - } - this.send_executeWithParameter(sessionId, stmt, parameterMap) - return _defer.promise - } else { - this._reqs[this.seqid()] = callback - this.send_executeWithParameter(sessionId, stmt, parameterMap) - } -} - -GraphServiceClient.prototype.send_executeWithParameter = function(sessionId, stmt, parameterMap) { - const output = new this.pClass(this.output) - const params = { - sessionId: sessionId, - stmt: stmt, - parameterMap: parameterMap - } - const args = new GraphService_executeWithParameter_args(params) - try { - output.writeMessageBegin('executeWithParameter', Thrift.MessageType.CALL, this.seqid()) - args.write(output) - output.writeMessageEnd() - return this.output.flush() - } catch (e) { - delete this._reqs[this.seqid()] - if (typeof output.reset === 'function') { - output.reset() - } - throw e - } -} - -GraphServiceClient.prototype.recv_executeWithParameter = function(input, mtype, rseqid) { - const callback = this._reqs[rseqid] || function() {} - delete this._reqs[rseqid] - if (mtype == Thrift.MessageType.EXCEPTION) { - const x = new Thrift.TApplicationException() - x.read(input) - input.readMessageEnd() - return callback(x) - } - const result = new GraphService_executeWithParameter_result() - result.read(input) - input.readMessageEnd() - - if (result.success !== null) { - return callback(null, result.success) - } - return callback('executeWithParameter failed: unknown result') -} - -GraphServiceClient.prototype.executeJson = function(sessionId, stmt, callback) { - this._seqid = this.new_seqid() - if (callback === undefined) { - const _defer = Q.defer() - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error) - } else { - _defer.resolve(result) - } - } - this.send_executeJson(sessionId, stmt) - return _defer.promise - } else { - this._reqs[this.seqid()] = callback - this.send_executeJson(sessionId, stmt) - } -} - -GraphServiceClient.prototype.send_executeJson = function(sessionId, stmt) { - const output = new this.pClass(this.output) - const params = { - sessionId: sessionId, - stmt: stmt - } - const args = new GraphService_executeJson_args(params) - try { - output.writeMessageBegin('executeJson', Thrift.MessageType.CALL, this.seqid()) - args.write(output) - output.writeMessageEnd() - return this.output.flush() - } catch (e) { - delete this._reqs[this.seqid()] - if (typeof output.reset === 'function') { - output.reset() - } - throw e - } -} - -GraphServiceClient.prototype.recv_executeJson = function(input, mtype, rseqid) { - const callback = this._reqs[rseqid] || function() {} - delete this._reqs[rseqid] - if (mtype == Thrift.MessageType.EXCEPTION) { - const x = new Thrift.TApplicationException() - x.read(input) - input.readMessageEnd() - return callback(x) - } - const result = new GraphService_executeJson_result() - result.read(input) - input.readMessageEnd() - - if (result.success !== null) { - return callback(null, result.success) - } - return callback('executeJson failed: unknown result') -} - -GraphServiceClient.prototype.executeJsonWithParameter = function(sessionId, stmt, parameterMap, callback) { - this._seqid = this.new_seqid() - if (callback === undefined) { - const _defer = Q.defer() - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error) - } else { - _defer.resolve(result) - } - } - this.send_executeJsonWithParameter(sessionId, stmt, parameterMap) - return _defer.promise - } else { - this._reqs[this.seqid()] = callback - this.send_executeJsonWithParameter(sessionId, stmt, parameterMap) - } -} - -GraphServiceClient.prototype.send_executeJsonWithParameter = function(sessionId, stmt, parameterMap) { - const output = new this.pClass(this.output) - const params = { - sessionId: sessionId, - stmt: stmt, - parameterMap: parameterMap - } - const args = new GraphService_executeJsonWithParameter_args(params) - try { - output.writeMessageBegin('executeJsonWithParameter', Thrift.MessageType.CALL, this.seqid()) - args.write(output) - output.writeMessageEnd() - return this.output.flush() - } catch (e) { - delete this._reqs[this.seqid()] - if (typeof output.reset === 'function') { - output.reset() - } - throw e - } -} - -GraphServiceClient.prototype.recv_executeJsonWithParameter = function(input, mtype, rseqid) { - const callback = this._reqs[rseqid] || function() {} - delete this._reqs[rseqid] - if (mtype == Thrift.MessageType.EXCEPTION) { - const x = new Thrift.TApplicationException() - x.read(input) - input.readMessageEnd() - return callback(x) - } - const result = new GraphService_executeJsonWithParameter_result() - result.read(input) - input.readMessageEnd() - - if (result.success !== null) { - return callback(null, result.success) - } - return callback('executeJsonWithParameter failed: unknown result') -} - -GraphServiceClient.prototype.verifyClientVersion = function(req, callback) { - this._seqid = this.new_seqid() - if (callback === undefined) { - const _defer = Q.defer() - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error) - } else { - _defer.resolve(result) - } - } - this.send_verifyClientVersion(req) - return _defer.promise - } else { - this._reqs[this.seqid()] = callback - this.send_verifyClientVersion(req) - } -} - -GraphServiceClient.prototype.send_verifyClientVersion = function(req) { - const output = new this.pClass(this.output) - const params = { - req: req - } - const args = new GraphService_verifyClientVersion_args(params) - try { - output.writeMessageBegin('verifyClientVersion', Thrift.MessageType.CALL, this.seqid()) - args.write(output) - output.writeMessageEnd() - return this.output.flush() - } catch (e) { - delete this._reqs[this.seqid()] - if (typeof output.reset === 'function') { - output.reset() - } - throw e - } -} - -GraphServiceClient.prototype.recv_verifyClientVersion = function(input, mtype, rseqid) { - const callback = this._reqs[rseqid] || function() {} - delete this._reqs[rseqid] - if (mtype == Thrift.MessageType.EXCEPTION) { - const x = new Thrift.TApplicationException() - x.read(input) - input.readMessageEnd() - return callback(x) - } - const result = new GraphService_verifyClientVersion_result() - result.read(input) - input.readMessageEnd() - - if (result.success !== null) { - return callback(null, result.success) - } - return callback('verifyClientVersion failed: unknown result') -} - -exports.Processor = GraphServiceProcessor - -function GraphServiceProcessor(handler) { - this._handler = handler -} - -GraphServiceProcessor.prototype.process = function(input, output) { - const r = input.readMessageBegin() - if (this['process_' + r.fname]) { - return this['process_' + r.fname].call(this, r.rseqid, input, output) - } else { - input.skip(Thrift.Type.STRUCT) - input.readMessageEnd() - const x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname) - output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid) - x.write(output) - output.writeMessageEnd() - output.flush() - } -} -GraphServiceProcessor.prototype.process_authenticate = function(seqid, input, output) { - const args = new GraphService_authenticate_args() - args.read(input) - input.readMessageEnd() - if (this._handler.authenticate.length === 2) { - Q.fcall(this._handler.authenticate.bind(this._handler), - args.username, - args.password - ).then(function(result) { - const result_obj = new GraphService_authenticate_result({ success: result }) - output.writeMessageBegin('authenticate', Thrift.MessageType.REPLY, seqid) - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }).catch(function (err) { - let result - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('authenticate', Thrift.MessageType.EXCEPTION, seqid) - result.write(output) - output.writeMessageEnd() - output.flush() - }) - } else { - this._handler.authenticate(args.username, args.password, function (err, result) { - let result_obj - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_authenticate_result((err !== null || typeof err === 'undefined') ? err : { success: result }) - output.writeMessageBegin('authenticate', Thrift.MessageType.REPLY, seqid) - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('authenticate', Thrift.MessageType.EXCEPTION, seqid) - } - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }) - } -} -GraphServiceProcessor.prototype.process_signout = function(seqid, input, output) { - const args = new GraphService_signout_args() - args.read(input) - input.readMessageEnd() - this._handler.signout(args.sessionId) -} -GraphServiceProcessor.prototype.process_execute = function(seqid, input, output) { - const args = new GraphService_execute_args() - args.read(input) - input.readMessageEnd() - if (this._handler.execute.length === 2) { - Q.fcall(this._handler.execute.bind(this._handler), - args.sessionId, - args.stmt - ).then(function(result) { - const result_obj = new GraphService_execute_result({ success: result }) - output.writeMessageBegin('execute', Thrift.MessageType.REPLY, seqid) - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }).catch(function (err) { - let result - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('execute', Thrift.MessageType.EXCEPTION, seqid) - result.write(output) - output.writeMessageEnd() - output.flush() - }) - } else { - this._handler.execute(args.sessionId, args.stmt, function (err, result) { - let result_obj - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_execute_result((err !== null || typeof err === 'undefined') ? err : { success: result }) - output.writeMessageBegin('execute', Thrift.MessageType.REPLY, seqid) - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('execute', Thrift.MessageType.EXCEPTION, seqid) - } - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }) - } -} -GraphServiceProcessor.prototype.process_executeWithParameter = function(seqid, input, output) { - const args = new GraphService_executeWithParameter_args() - args.read(input) - input.readMessageEnd() - if (this._handler.executeWithParameter.length === 3) { - Q.fcall(this._handler.executeWithParameter.bind(this._handler), - args.sessionId, - args.stmt, - args.parameterMap - ).then(function(result) { - const result_obj = new GraphService_executeWithParameter_result({ success: result }) - output.writeMessageBegin('executeWithParameter', Thrift.MessageType.REPLY, seqid) - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }).catch(function (err) { - let result - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('executeWithParameter', Thrift.MessageType.EXCEPTION, seqid) - result.write(output) - output.writeMessageEnd() - output.flush() - }) - } else { - this._handler.executeWithParameter(args.sessionId, args.stmt, args.parameterMap, function (err, result) { - let result_obj - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_executeWithParameter_result((err !== null || typeof err === 'undefined') ? err : { success: result }) - output.writeMessageBegin('executeWithParameter', Thrift.MessageType.REPLY, seqid) - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('executeWithParameter', Thrift.MessageType.EXCEPTION, seqid) - } - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }) - } -} -GraphServiceProcessor.prototype.process_executeJson = function(seqid, input, output) { - const args = new GraphService_executeJson_args() - args.read(input) - input.readMessageEnd() - if (this._handler.executeJson.length === 2) { - Q.fcall(this._handler.executeJson.bind(this._handler), - args.sessionId, - args.stmt - ).then(function(result) { - const result_obj = new GraphService_executeJson_result({ success: result }) - output.writeMessageBegin('executeJson', Thrift.MessageType.REPLY, seqid) - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }).catch(function (err) { - let result - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('executeJson', Thrift.MessageType.EXCEPTION, seqid) - result.write(output) - output.writeMessageEnd() - output.flush() - }) - } else { - this._handler.executeJson(args.sessionId, args.stmt, function (err, result) { - let result_obj - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_executeJson_result((err !== null || typeof err === 'undefined') ? err : { success: result }) - output.writeMessageBegin('executeJson', Thrift.MessageType.REPLY, seqid) - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('executeJson', Thrift.MessageType.EXCEPTION, seqid) - } - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }) - } -} -GraphServiceProcessor.prototype.process_executeJsonWithParameter = function(seqid, input, output) { - const args = new GraphService_executeJsonWithParameter_args() - args.read(input) - input.readMessageEnd() - if (this._handler.executeJsonWithParameter.length === 3) { - Q.fcall(this._handler.executeJsonWithParameter.bind(this._handler), - args.sessionId, - args.stmt, - args.parameterMap - ).then(function(result) { - const result_obj = new GraphService_executeJsonWithParameter_result({ success: result }) - output.writeMessageBegin('executeJsonWithParameter', Thrift.MessageType.REPLY, seqid) - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }).catch(function (err) { - let result - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('executeJsonWithParameter', Thrift.MessageType.EXCEPTION, seqid) - result.write(output) - output.writeMessageEnd() - output.flush() - }) - } else { - this._handler.executeJsonWithParameter(args.sessionId, args.stmt, args.parameterMap, function (err, result) { - let result_obj - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_executeJsonWithParameter_result((err !== null || typeof err === 'undefined') ? err : { success: result }) - output.writeMessageBegin('executeJsonWithParameter', Thrift.MessageType.REPLY, seqid) - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('executeJsonWithParameter', Thrift.MessageType.EXCEPTION, seqid) - } - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }) - } -} -GraphServiceProcessor.prototype.process_verifyClientVersion = function(seqid, input, output) { - const args = new GraphService_verifyClientVersion_args() - args.read(input) - input.readMessageEnd() - if (this._handler.verifyClientVersion.length === 1) { - Q.fcall(this._handler.verifyClientVersion.bind(this._handler), - args.req - ).then(function(result) { - const result_obj = new GraphService_verifyClientVersion_result({ success: result }) - output.writeMessageBegin('verifyClientVersion', Thrift.MessageType.REPLY, seqid) - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }).catch(function (err) { - let result - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('verifyClientVersion', Thrift.MessageType.EXCEPTION, seqid) - result.write(output) - output.writeMessageEnd() - output.flush() - }) - } else { - this._handler.verifyClientVersion(args.req, function (err, result) { - let result_obj - if ((err === null || typeof err === 'undefined')) { - result_obj = new GraphService_verifyClientVersion_result((err !== null || typeof err === 'undefined') ? err : { success: result }) - output.writeMessageBegin('verifyClientVersion', Thrift.MessageType.REPLY, seqid) - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message) - output.writeMessageBegin('verifyClientVersion', Thrift.MessageType.EXCEPTION, seqid) - } - result_obj.write(output) - output.writeMessageEnd() - output.flush() - }) - } -} diff --git a/src/nebula/interface/common_types.js b/src/nebula/interface/common_types.js deleted file mode 100644 index 265a737..0000000 --- a/src/nebula/interface/common_types.js +++ /dev/null @@ -1,2622 +0,0 @@ -// -// Autogenerated by Thrift Compiler (0.14.1) -// -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -// -'use strict' - -const thrift = require('../../thrift') -const Thrift = thrift.Thrift -const Q = thrift.Q -const Int64 = require('node-int64') - - -const ttypes = module.exports = {} -ttypes.NullType = { - __NULL__: 0, - NaN: 1, - BAD_DATA: 2, - BAD_TYPE: 3, - ERR_OVERFLOW: 4, - UNKNOWN_PROP: 5, - DIV_BY_ZERO: 6, - OUT_OF_RANGE: 7 -} -ttypes.PropertyType = { - UNKNOWN: 0, - BOOL: 1, - INT64: 2, - VID: 3, - FLOAT: 4, - DOUBLE: 5, - STRING: 6, - FIXED_STRING: 7, - INT8: 8, - INT16: 9, - INT32: 10, - TIMESTAMP: 21, - DURATION: 23, - DATE: 24, - DATETIME: 25, - TIME: 26, - GEOGRAPHY: 31 -} -ttypes.ErrorCode = { - SUCCEEDED: 0, - E_DISCONNECTED: -1, - E_FAIL_TO_CONNECT: -2, - E_RPC_FAILURE: -3, - E_LEADER_CHANGED: -4, - E_SPACE_NOT_FOUND: -5, - E_TAG_NOT_FOUND: -6, - E_EDGE_NOT_FOUND: -7, - E_INDEX_NOT_FOUND: -8, - E_EDGE_PROP_NOT_FOUND: -9, - E_TAG_PROP_NOT_FOUND: -10, - E_ROLE_NOT_FOUND: -11, - E_CONFIG_NOT_FOUND: -12, - E_MACHINE_NOT_FOUND: -13, - E_ZONE_NOT_FOUND: -14, - E_LISTENER_NOT_FOUND: -15, - E_PART_NOT_FOUND: -16, - E_KEY_NOT_FOUND: -17, - E_USER_NOT_FOUND: -18, - E_STATS_NOT_FOUND: -19, - E_SERVICE_NOT_FOUND: -20, - E_BACKUP_FAILED: -24, - E_BACKUP_EMPTY_TABLE: -25, - E_BACKUP_TABLE_FAILED: -26, - E_PARTIAL_RESULT: -27, - E_REBUILD_INDEX_FAILED: -28, - E_INVALID_PASSWORD: -29, - E_FAILED_GET_ABS_PATH: -30, - E_BAD_USERNAME_PASSWORD: -1001, - E_SESSION_INVALID: -1002, - E_SESSION_TIMEOUT: -1003, - E_SYNTAX_ERROR: -1004, - E_EXECUTION_ERROR: -1005, - E_STATEMENT_EMPTY: -1006, - E_BAD_PERMISSION: -1008, - E_SEMANTIC_ERROR: -1009, - E_TOO_MANY_CONNECTIONS: -1010, - E_PARTIAL_SUCCEEDED: -1011, - E_NO_HOSTS: -2001, - E_EXISTED: -2002, - E_INVALID_HOST: -2003, - E_UNSUPPORTED: -2004, - E_NOT_DROP: -2005, - E_BALANCER_RUNNING: -2006, - E_CONFIG_IMMUTABLE: -2007, - E_CONFLICT: -2008, - E_INVALID_PARM: -2009, - E_WRONGCLUSTER: -2010, - E_ZONE_NOT_ENOUGH: -2011, - E_ZONE_IS_EMPTY: -2012, - E_STORE_FAILURE: -2021, - E_STORE_SEGMENT_ILLEGAL: -2022, - E_BAD_BALANCE_PLAN: -2023, - E_BALANCED: -2024, - E_NO_RUNNING_BALANCE_PLAN: -2025, - E_NO_VALID_HOST: -2026, - E_CORRUPTED_BALANCE_PLAN: -2027, - E_NO_INVALID_BALANCE_PLAN: -2028, - E_IMPROPER_ROLE: -2030, - E_INVALID_PARTITION_NUM: -2031, - E_INVALID_REPLICA_FACTOR: -2032, - E_INVALID_CHARSET: -2033, - E_INVALID_COLLATE: -2034, - E_CHARSET_COLLATE_NOT_MATCH: -2035, - E_SNAPSHOT_FAILURE: -2040, - E_BLOCK_WRITE_FAILURE: -2041, - E_REBUILD_INDEX_FAILURE: -2042, - E_INDEX_WITH_TTL: -2043, - E_ADD_JOB_FAILURE: -2044, - E_STOP_JOB_FAILURE: -2045, - E_SAVE_JOB_FAILURE: -2046, - E_BALANCER_FAILURE: -2047, - E_JOB_NOT_FINISHED: -2048, - E_TASK_REPORT_OUT_DATE: -2049, - E_JOB_NOT_IN_SPACE: -2050, - E_JOB_NEED_RECOVER: -2051, - E_INVALID_JOB: -2065, - E_BACKUP_BUILDING_INDEX: -2066, - E_BACKUP_SPACE_NOT_FOUND: -2067, - E_RESTORE_FAILURE: -2068, - E_SESSION_NOT_FOUND: -2069, - E_LIST_CLUSTER_FAILURE: -2070, - E_LIST_CLUSTER_GET_ABS_PATH_FAILURE: -2071, - E_LIST_CLUSTER_NO_AGENT_FAILURE: -2072, - E_QUERY_NOT_FOUND: -2073, - E_AGENT_HB_FAILUE: -2074, - E_CONSENSUS_ERROR: -3001, - E_KEY_HAS_EXISTS: -3002, - E_DATA_TYPE_MISMATCH: -3003, - E_INVALID_FIELD_VALUE: -3004, - E_INVALID_OPERATION: -3005, - E_NOT_NULLABLE: -3006, - E_FIELD_UNSET: -3007, - E_OUT_OF_RANGE: -3008, - E_DATA_CONFLICT_ERROR: -3010, - E_WRITE_STALLED: -3011, - E_IMPROPER_DATA_TYPE: -3021, - E_INVALID_SPACEVIDLEN: -3022, - E_INVALID_FILTER: -3031, - E_INVALID_UPDATER: -3032, - E_INVALID_STORE: -3033, - E_INVALID_PEER: -3034, - E_RETRY_EXHAUSTED: -3035, - E_TRANSFER_LEADER_FAILED: -3036, - E_INVALID_STAT_TYPE: -3037, - E_INVALID_VID: -3038, - E_NO_TRANSFORMED: -3039, - E_LOAD_META_FAILED: -3040, - E_FAILED_TO_CHECKPOINT: -3041, - E_CHECKPOINT_BLOCKED: -3042, - E_FILTER_OUT: -3043, - E_INVALID_DATA: -3044, - E_MUTATE_EDGE_CONFLICT: -3045, - E_MUTATE_TAG_CONFLICT: -3046, - E_OUTDATED_LOCK: -3047, - E_INVALID_TASK_PARA: -3051, - E_USER_CANCEL: -3052, - E_TASK_EXECUTION_FAILED: -3053, - E_PLAN_IS_KILLED: -3060, - E_NO_TERM: -3070, - E_OUTDATED_TERM: -3071, - E_OUTDATED_EDGE: -3072, - E_WRITE_WRITE_CONFLICT: -3073, - E_CLIENT_SERVER_INCOMPATIBLE: -3061, - E_ID_FAILED: -3062, - E_RAFT_UNKNOWN_PART: -3500, - E_RAFT_LOG_GAP: -3501, - E_RAFT_LOG_STALE: -3502, - E_RAFT_TERM_OUT_OF_DATE: -3503, - E_RAFT_UNKNOWN_APPEND_LOG: -3504, - E_RAFT_WAITING_SNAPSHOT: -3511, - E_RAFT_SENDING_SNAPSHOT: -3512, - E_RAFT_INVALID_PEER: -3513, - E_RAFT_NOT_READY: -3514, - E_RAFT_STOPPED: -3515, - E_RAFT_BAD_ROLE: -3516, - E_RAFT_WAL_FAIL: -3521, - E_RAFT_HOST_STOPPED: -3522, - E_RAFT_TOO_MANY_REQUESTS: -3523, - E_RAFT_PERSIST_SNAPSHOT_FAILED: -3524, - E_RAFT_RPC_EXCEPTION: -3525, - E_RAFT_NO_WAL_FOUND: -3526, - E_RAFT_HOST_PAUSED: -3527, - E_RAFT_WRITE_BLOCKED: -3528, - E_RAFT_BUFFER_OVERFLOW: -3529, - E_RAFT_ATOMIC_OP_FAILED: -3530, - E_LEADER_LEASE_FAILED: -3531, - E_UNKNOWN: -8000 -} - -module.exports.SchemaID = SchemaID - -function SchemaID(args) { - this.tag_id = null - this.edge_type = null - if (args) { - if (args.tag_id !== undefined && args.tag_id !== null) { - this.tag_id = args.tag_id - } - if (args.edge_type !== undefined && args.edge_type !== null) { - this.edge_type = args.edge_type - } - } -} -SchemaID.prototype = {} -SchemaID.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.tag_id = input.readI32() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.I32) { - this.edge_type = input.readI32() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -SchemaID.prototype.write = function(output) { - output.writeStructBegin('SchemaID') - if (this.tag_id !== null && this.tag_id !== undefined) { - output.writeFieldBegin('tag_id', Thrift.Type.I32, 1) - output.writeI32(this.tag_id) - output.writeFieldEnd() - } - if (this.edge_type !== null && this.edge_type !== undefined) { - output.writeFieldBegin('edge_type', Thrift.Type.I32, 2) - output.writeI32(this.edge_type) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Date = Date - -function Date(args) { - this.year = null - this.month = null - this.day = null - if (args) { - if (args.year !== undefined && args.year !== null) { - this.year = args.year - } - if (args.month !== undefined && args.month !== null) { - this.month = args.month - } - if (args.day !== undefined && args.day !== null) { - this.day = args.day - } - } -} -Date.prototype = {} -Date.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I16) { - this.year = input.readI16() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.BYTE) { - this.month = input.readByte() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.BYTE) { - this.day = input.readByte() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Date.prototype.write = function(output) { - output.writeStructBegin('Date') - if (this.year !== null && this.year !== undefined) { - output.writeFieldBegin('year', Thrift.Type.I16, 1) - output.writeI16(this.year) - output.writeFieldEnd() - } - if (this.month !== null && this.month !== undefined) { - output.writeFieldBegin('month', Thrift.Type.BYTE, 2) - output.writeByte(this.month) - output.writeFieldEnd() - } - if (this.day !== null && this.day !== undefined) { - output.writeFieldBegin('day', Thrift.Type.BYTE, 3) - output.writeByte(this.day) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Time = Time - -function Time(args) { - this.hour = null - this.minute = null - this.sec = null - this.microsec = null - if (args) { - if (args.hour !== undefined && args.hour !== null) { - this.hour = args.hour - } - if (args.minute !== undefined && args.minute !== null) { - this.minute = args.minute - } - if (args.sec !== undefined && args.sec !== null) { - this.sec = args.sec - } - if (args.microsec !== undefined && args.microsec !== null) { - this.microsec = args.microsec - } - } -} -Time.prototype = {} -Time.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BYTE) { - this.hour = input.readByte() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.BYTE) { - this.minute = input.readByte() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.BYTE) { - this.sec = input.readByte() - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.I32) { - this.microsec = input.readI32() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Time.prototype.write = function(output) { - output.writeStructBegin('Time') - if (this.hour !== null && this.hour !== undefined) { - output.writeFieldBegin('hour', Thrift.Type.BYTE, 1) - output.writeByte(this.hour) - output.writeFieldEnd() - } - if (this.minute !== null && this.minute !== undefined) { - output.writeFieldBegin('minute', Thrift.Type.BYTE, 2) - output.writeByte(this.minute) - output.writeFieldEnd() - } - if (this.sec !== null && this.sec !== undefined) { - output.writeFieldBegin('sec', Thrift.Type.BYTE, 3) - output.writeByte(this.sec) - output.writeFieldEnd() - } - if (this.microsec !== null && this.microsec !== undefined) { - output.writeFieldBegin('microsec', Thrift.Type.I32, 4) - output.writeI32(this.microsec) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.DateTime = DateTime - -function DateTime(args) { - this.year = null - this.month = null - this.day = null - this.hour = null - this.minute = null - this.sec = null - this.microsec = null - if (args) { - if (args.year !== undefined && args.year !== null) { - this.year = args.year - } - if (args.month !== undefined && args.month !== null) { - this.month = args.month - } - if (args.day !== undefined && args.day !== null) { - this.day = args.day - } - if (args.hour !== undefined && args.hour !== null) { - this.hour = args.hour - } - if (args.minute !== undefined && args.minute !== null) { - this.minute = args.minute - } - if (args.sec !== undefined && args.sec !== null) { - this.sec = args.sec - } - if (args.microsec !== undefined && args.microsec !== null) { - this.microsec = args.microsec - } - } -} -DateTime.prototype = {} -DateTime.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I16) { - this.year = input.readI16() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.BYTE) { - this.month = input.readByte() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.BYTE) { - this.day = input.readByte() - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.BYTE) { - this.hour = input.readByte() - } else { - input.skip(ftype) - } - break - case 5: - if (ftype == Thrift.Type.BYTE) { - this.minute = input.readByte() - } else { - input.skip(ftype) - } - break - case 6: - if (ftype == Thrift.Type.BYTE) { - this.sec = input.readByte() - } else { - input.skip(ftype) - } - break - case 7: - if (ftype == Thrift.Type.I32) { - this.microsec = input.readI32() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -DateTime.prototype.write = function(output) { - output.writeStructBegin('DateTime') - if (this.year !== null && this.year !== undefined) { - output.writeFieldBegin('year', Thrift.Type.I16, 1) - output.writeI16(this.year) - output.writeFieldEnd() - } - if (this.month !== null && this.month !== undefined) { - output.writeFieldBegin('month', Thrift.Type.BYTE, 2) - output.writeByte(this.month) - output.writeFieldEnd() - } - if (this.day !== null && this.day !== undefined) { - output.writeFieldBegin('day', Thrift.Type.BYTE, 3) - output.writeByte(this.day) - output.writeFieldEnd() - } - if (this.hour !== null && this.hour !== undefined) { - output.writeFieldBegin('hour', Thrift.Type.BYTE, 4) - output.writeByte(this.hour) - output.writeFieldEnd() - } - if (this.minute !== null && this.minute !== undefined) { - output.writeFieldBegin('minute', Thrift.Type.BYTE, 5) - output.writeByte(this.minute) - output.writeFieldEnd() - } - if (this.sec !== null && this.sec !== undefined) { - output.writeFieldBegin('sec', Thrift.Type.BYTE, 6) - output.writeByte(this.sec) - output.writeFieldEnd() - } - if (this.microsec !== null && this.microsec !== undefined) { - output.writeFieldBegin('microsec', Thrift.Type.I32, 7) - output.writeI32(this.microsec) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Value = Value - -function Value(args) { - this.nVal = null - this.bVal = null - this.iVal = null - this.fVal = null - this.sVal = null - this.dVal = null - this.tVal = null - this.dtVal = null - this.vVal = null - this.eVal = null - this.pVal = null - this.lVal = null - this.mVal = null - this.uVal = null - this.gVal = null - this.ggVal = null - this.duVal = null - if (args) { - if (args.nVal !== undefined && args.nVal !== null) { - this.nVal = args.nVal - } - if (args.bVal !== undefined && args.bVal !== null) { - this.bVal = args.bVal - } - if (args.iVal !== undefined && args.iVal !== null) { - this.iVal = args.iVal - } - if (args.fVal !== undefined && args.fVal !== null) { - this.fVal = args.fVal - } - if (args.sVal !== undefined && args.sVal !== null) { - this.sVal = args.sVal - } - if (args.dVal !== undefined && args.dVal !== null) { - this.dVal = new ttypes.Date(args.dVal) - } - if (args.tVal !== undefined && args.tVal !== null) { - this.tVal = new ttypes.Time(args.tVal) - } - if (args.dtVal !== undefined && args.dtVal !== null) { - this.dtVal = new ttypes.DateTime(args.dtVal) - } - if (args.vVal !== undefined && args.vVal !== null) { - this.vVal = new ttypes.Vertex(args.vVal) - } - if (args.eVal !== undefined && args.eVal !== null) { - this.eVal = new ttypes.Edge(args.eVal) - } - if (args.pVal !== undefined && args.pVal !== null) { - this.pVal = new ttypes.Path(args.pVal) - } - if (args.lVal !== undefined && args.lVal !== null) { - this.lVal = new ttypes.NList(args.lVal) - } - if (args.mVal !== undefined && args.mVal !== null) { - this.mVal = new ttypes.NMap(args.mVal) - } - if (args.uVal !== undefined && args.uVal !== null) { - this.uVal = new ttypes.NSet(args.uVal) - } - if (args.gVal !== undefined && args.gVal !== null) { - this.gVal = new ttypes.DataSet(args.gVal) - } - if (args.ggVal !== undefined && args.ggVal !== null) { - this.ggVal = new ttypes.Geography(args.ggVal) - } - if (args.duVal !== undefined && args.duVal !== null) { - this.duVal = new ttypes.Duration(args.duVal) - } - } -} -Value.prototype = {} -Value.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.nVal = input.readI32() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.BOOL) { - this.bVal = input.readBool() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.I64) { - this.iVal = input.readI64() - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.DOUBLE) { - this.fVal = input.readDouble() - } else { - input.skip(ftype) - } - break - case 5: - if (ftype == Thrift.Type.STRING) { - this.sVal = input.readString() - } else { - input.skip(ftype) - } - break - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.dVal = new ttypes.Date() - this.dVal.read(input) - } else { - input.skip(ftype) - } - break - case 7: - if (ftype == Thrift.Type.STRUCT) { - this.tVal = new ttypes.Time() - this.tVal.read(input) - } else { - input.skip(ftype) - } - break - case 8: - if (ftype == Thrift.Type.STRUCT) { - this.dtVal = new ttypes.DateTime() - this.dtVal.read(input) - } else { - input.skip(ftype) - } - break - case 9: - if (ftype == Thrift.Type.STRUCT) { - this.vVal = new ttypes.Vertex() - this.vVal.read(input) - } else { - input.skip(ftype) - } - break - case 10: - if (ftype == Thrift.Type.STRUCT) { - this.eVal = new ttypes.Edge() - this.eVal.read(input) - } else { - input.skip(ftype) - } - break - case 11: - if (ftype == Thrift.Type.STRUCT) { - this.pVal = new ttypes.Path() - this.pVal.read(input) - } else { - input.skip(ftype) - } - break - case 12: - if (ftype == Thrift.Type.STRUCT) { - this.lVal = new ttypes.NList() - this.lVal.read(input) - } else { - input.skip(ftype) - } - break - case 13: - if (ftype == Thrift.Type.STRUCT) { - this.mVal = new ttypes.NMap() - this.mVal.read(input) - } else { - input.skip(ftype) - } - break - case 14: - if (ftype == Thrift.Type.STRUCT) { - this.uVal = new ttypes.NSet() - this.uVal.read(input) - } else { - input.skip(ftype) - } - break - case 15: - if (ftype == Thrift.Type.STRUCT) { - this.gVal = new ttypes.DataSet() - this.gVal.read(input) - } else { - input.skip(ftype) - } - break - case 16: - if (ftype == Thrift.Type.STRUCT) { - this.ggVal = new ttypes.Geography() - this.ggVal.read(input) - } else { - input.skip(ftype) - } - break - case 17: - if (ftype == Thrift.Type.STRUCT) { - this.duVal = new ttypes.Duration() - this.duVal.read(input) - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Value.prototype.write = function(output) { - output.writeStructBegin('Value') - if (this.nVal !== null && this.nVal !== undefined) { - output.writeFieldBegin('nVal', Thrift.Type.I32, 1) - output.writeI32(this.nVal) - output.writeFieldEnd() - } - if (this.bVal !== null && this.bVal !== undefined) { - output.writeFieldBegin('bVal', Thrift.Type.BOOL, 2) - output.writeBool(this.bVal) - output.writeFieldEnd() - } - if (this.iVal !== null && this.iVal !== undefined) { - output.writeFieldBegin('iVal', Thrift.Type.I64, 3) - output.writeI64(this.iVal) - output.writeFieldEnd() - } - if (this.fVal !== null && this.fVal !== undefined) { - output.writeFieldBegin('fVal', Thrift.Type.DOUBLE, 4) - output.writeDouble(this.fVal) - output.writeFieldEnd() - } - if (this.sVal !== null && this.sVal !== undefined) { - output.writeFieldBegin('sVal', Thrift.Type.STRING, 5) - output.writeString(this.sVal) - output.writeFieldEnd() - } - if (this.dVal !== null && this.dVal !== undefined) { - output.writeFieldBegin('dVal', Thrift.Type.STRUCT, 6) - this.dVal.write(output) - output.writeFieldEnd() - } - if (this.tVal !== null && this.tVal !== undefined) { - output.writeFieldBegin('tVal', Thrift.Type.STRUCT, 7) - this.tVal.write(output) - output.writeFieldEnd() - } - if (this.dtVal !== null && this.dtVal !== undefined) { - output.writeFieldBegin('dtVal', Thrift.Type.STRUCT, 8) - this.dtVal.write(output) - output.writeFieldEnd() - } - if (this.vVal !== null && this.vVal !== undefined) { - output.writeFieldBegin('vVal', Thrift.Type.STRUCT, 9) - this.vVal.write(output) - output.writeFieldEnd() - } - if (this.eVal !== null && this.eVal !== undefined) { - output.writeFieldBegin('eVal', Thrift.Type.STRUCT, 10) - this.eVal.write(output) - output.writeFieldEnd() - } - if (this.pVal !== null && this.pVal !== undefined) { - output.writeFieldBegin('pVal', Thrift.Type.STRUCT, 11) - this.pVal.write(output) - output.writeFieldEnd() - } - if (this.lVal !== null && this.lVal !== undefined) { - output.writeFieldBegin('lVal', Thrift.Type.STRUCT, 12) - this.lVal.write(output) - output.writeFieldEnd() - } - if (this.mVal !== null && this.mVal !== undefined) { - output.writeFieldBegin('mVal', Thrift.Type.STRUCT, 13) - this.mVal.write(output) - output.writeFieldEnd() - } - if (this.uVal !== null && this.uVal !== undefined) { - output.writeFieldBegin('uVal', Thrift.Type.STRUCT, 14) - this.uVal.write(output) - output.writeFieldEnd() - } - if (this.gVal !== null && this.gVal !== undefined) { - output.writeFieldBegin('gVal', Thrift.Type.STRUCT, 15) - this.gVal.write(output) - output.writeFieldEnd() - } - if (this.ggVal !== null && this.ggVal !== undefined) { - output.writeFieldBegin('ggVal', Thrift.Type.STRUCT, 16) - this.ggVal.write(output) - output.writeFieldEnd() - } - if (this.duVal !== null && this.duVal !== undefined) { - output.writeFieldBegin('duVal', Thrift.Type.STRUCT, 17) - this.duVal.write(output) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.NList = NList - -function NList(args) { - this.values = null - if (args) { - if (args.values !== undefined && args.values !== null) { - this.values = Thrift.copyList(args.values, [ttypes.Value]) - } - } -} -NList.prototype = {} -NList.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.values = [] - const _rtmp31 = input.readListBegin() - const _size0 = _rtmp31.size || 0 - for (let _i2 = 0; _i2 < _size0; ++_i2) { - let elem3 = null - elem3 = new ttypes.Value() - elem3.read(input) - this.values.push(elem3) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -NList.prototype.write = function(output) { - output.writeStructBegin('NList') - if (this.values !== null && this.values !== undefined) { - output.writeFieldBegin('values', Thrift.Type.LIST, 1) - output.writeListBegin(Thrift.Type.STRUCT, this.values.length) - for (let iter4 in this.values) { - if (this.values.hasOwnProperty(iter4)) { - iter4 = this.values[iter4] - iter4.write(output) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.NMap = NMap - -function NMap(args) { - this.kvs = null - if (args) { - if (args.kvs !== undefined && args.kvs !== null) { - this.kvs = Thrift.copyMap(args.kvs, [ttypes.Value]) - } - } -} -NMap.prototype = {} -NMap.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.MAP) { - this.kvs = {} - const _rtmp36 = input.readMapBegin() - const _size5 = _rtmp36.size || 0 - for (let _i7 = 0; _i7 < _size5; ++_i7) { - let key8 = null - let val9 = null - key8 = input.readString() - val9 = new ttypes.Value() - val9.read(input) - this.kvs[key8] = val9 - } - input.readMapEnd() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -NMap.prototype.write = function(output) { - output.writeStructBegin('NMap') - if (this.kvs !== null && this.kvs !== undefined) { - output.writeFieldBegin('kvs', Thrift.Type.MAP, 1) - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.kvs)) - for (const kiter10 in this.kvs) { - if (this.kvs.hasOwnProperty(kiter10)) { - const viter11 = this.kvs[kiter10] - output.writeString(kiter10) - viter11.write(output) - } - } - output.writeMapEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.NSet = NSet - -function NSet(args) { - this.values = null - if (args) { - if (args.values !== undefined && args.values !== null) { - this.values = Thrift.copyList(args.values, [ttypes.Value]) - } - } -} -NSet.prototype = {} -NSet.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.SET) { - this.values = [] - const _rtmp313 = input.readSetBegin() - const _size12 = _rtmp313.size || 0 - for (let _i14 = 0; _i14 < _size12; ++_i14) { - let elem15 = null - elem15 = new ttypes.Value() - elem15.read(input) - this.values.push(elem15) - } - input.readSetEnd() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -NSet.prototype.write = function(output) { - output.writeStructBegin('NSet') - if (this.values !== null && this.values !== undefined) { - output.writeFieldBegin('values', Thrift.Type.SET, 1) - output.writeSetBegin(Thrift.Type.STRUCT, this.values.length) - for (let iter16 in this.values) { - if (this.values.hasOwnProperty(iter16)) { - iter16 = this.values[iter16] - iter16.write(output) - } - } - output.writeSetEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Row = Row - -function Row(args) { - this.values = null - if (args) { - if (args.values !== undefined && args.values !== null) { - this.values = Thrift.copyList(args.values, [ttypes.Value]) - } - } -} -Row.prototype = {} -Row.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.values = [] - const _rtmp318 = input.readListBegin() - const _size17 = _rtmp318.size || 0 - for (let _i19 = 0; _i19 < _size17; ++_i19) { - let elem20 = null - elem20 = new ttypes.Value() - elem20.read(input) - this.values.push(elem20) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Row.prototype.write = function(output) { - output.writeStructBegin('Row') - if (this.values !== null && this.values !== undefined) { - output.writeFieldBegin('values', Thrift.Type.LIST, 1) - output.writeListBegin(Thrift.Type.STRUCT, this.values.length) - for (let iter21 in this.values) { - if (this.values.hasOwnProperty(iter21)) { - iter21 = this.values[iter21] - iter21.write(output) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.DataSet = DataSet - -function DataSet(args) { - this.column_names = null - this.rows = null - if (args) { - if (args.column_names !== undefined && args.column_names !== null) { - this.column_names = Thrift.copyList(args.column_names, [null]) - } - if (args.rows !== undefined && args.rows !== null) { - this.rows = Thrift.copyList(args.rows, [ttypes.Row]) - } - } -} -DataSet.prototype = {} -DataSet.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.column_names = [] - const _rtmp323 = input.readListBegin() - const _size22 = _rtmp323.size || 0 - for (let _i24 = 0; _i24 < _size22; ++_i24) { - let elem25 = null - elem25 = input.readString() - this.column_names.push(elem25) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.LIST) { - this.rows = [] - const _rtmp327 = input.readListBegin() - const _size26 = _rtmp327.size || 0 - for (let _i28 = 0; _i28 < _size26; ++_i28) { - let elem29 = null - elem29 = new ttypes.Row() - elem29.read(input) - this.rows.push(elem29) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -DataSet.prototype.write = function(output) { - output.writeStructBegin('DataSet') - if (this.column_names !== null && this.column_names !== undefined) { - output.writeFieldBegin('column_names', Thrift.Type.LIST, 1) - output.writeListBegin(Thrift.Type.STRING, this.column_names.length) - for (let iter30 in this.column_names) { - if (this.column_names.hasOwnProperty(iter30)) { - iter30 = this.column_names[iter30] - output.writeString(iter30) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - if (this.rows !== null && this.rows !== undefined) { - output.writeFieldBegin('rows', Thrift.Type.LIST, 2) - output.writeListBegin(Thrift.Type.STRUCT, this.rows.length) - for (let iter31 in this.rows) { - if (this.rows.hasOwnProperty(iter31)) { - iter31 = this.rows[iter31] - iter31.write(output) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Coordinate = Coordinate - -function Coordinate(args) { - this.x = null - this.y = null - if (args) { - if (args.x !== undefined && args.x !== null) { - this.x = args.x - } - if (args.y !== undefined && args.y !== null) { - this.y = args.y - } - } -} -Coordinate.prototype = {} -Coordinate.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.DOUBLE) { - this.x = input.readDouble() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.DOUBLE) { - this.y = input.readDouble() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Coordinate.prototype.write = function(output) { - output.writeStructBegin('Coordinate') - if (this.x !== null && this.x !== undefined) { - output.writeFieldBegin('x', Thrift.Type.DOUBLE, 1) - output.writeDouble(this.x) - output.writeFieldEnd() - } - if (this.y !== null && this.y !== undefined) { - output.writeFieldBegin('y', Thrift.Type.DOUBLE, 2) - output.writeDouble(this.y) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Point = Point - -function Point(args) { - this.coord = null - if (args) { - if (args.coord !== undefined && args.coord !== null) { - this.coord = new ttypes.Coordinate(args.coord) - } - } -} -Point.prototype = {} -Point.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.coord = new ttypes.Coordinate() - this.coord.read(input) - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Point.prototype.write = function(output) { - output.writeStructBegin('Point') - if (this.coord !== null && this.coord !== undefined) { - output.writeFieldBegin('coord', Thrift.Type.STRUCT, 1) - this.coord.write(output) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.LineString = LineString - -function LineString(args) { - this.coordList = null - if (args) { - if (args.coordList !== undefined && args.coordList !== null) { - this.coordList = Thrift.copyList(args.coordList, [ttypes.Coordinate]) - } - } -} -LineString.prototype = {} -LineString.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.coordList = [] - const _rtmp333 = input.readListBegin() - const _size32 = _rtmp333.size || 0 - for (let _i34 = 0; _i34 < _size32; ++_i34) { - let elem35 = null - elem35 = new ttypes.Coordinate() - elem35.read(input) - this.coordList.push(elem35) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -LineString.prototype.write = function(output) { - output.writeStructBegin('LineString') - if (this.coordList !== null && this.coordList !== undefined) { - output.writeFieldBegin('coordList', Thrift.Type.LIST, 1) - output.writeListBegin(Thrift.Type.STRUCT, this.coordList.length) - for (let iter36 in this.coordList) { - if (this.coordList.hasOwnProperty(iter36)) { - iter36 = this.coordList[iter36] - iter36.write(output) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Polygon = Polygon - -function Polygon(args) { - this.coordListList = null - if (args) { - if (args.coordListList !== undefined && args.coordListList !== null) { - this.coordListList = Thrift.copyList(args.coordListList, [Thrift.copyList, ttypes.Coordinate]) - } - } -} -Polygon.prototype = {} -Polygon.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.coordListList = [] - const _rtmp338 = input.readListBegin() - const _size37 = _rtmp338.size || 0 - for (let _i39 = 0; _i39 < _size37; ++_i39) { - let elem40 = null - elem40 = [] - const _rtmp342 = input.readListBegin() - const _size41 = _rtmp342.size || 0 - for (let _i43 = 0; _i43 < _size41; ++_i43) { - let elem44 = null - elem44 = new ttypes.Coordinate() - elem44.read(input) - elem40.push(elem44) - } - input.readListEnd() - this.coordListList.push(elem40) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Polygon.prototype.write = function(output) { - output.writeStructBegin('Polygon') - if (this.coordListList !== null && this.coordListList !== undefined) { - output.writeFieldBegin('coordListList', Thrift.Type.LIST, 1) - output.writeListBegin(Thrift.Type.LIST, this.coordListList.length) - for (let iter45 in this.coordListList) { - if (this.coordListList.hasOwnProperty(iter45)) { - iter45 = this.coordListList[iter45] - output.writeListBegin(Thrift.Type.STRUCT, iter45.length) - for (let iter46 in iter45) { - if (iter45.hasOwnProperty(iter46)) { - iter46 = iter45[iter46] - iter46.write(output) - } - } - output.writeListEnd() - } - } - output.writeListEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Geography = Geography - -function Geography(args) { - this.ptVal = null - this.lsVal = null - this.pgVal = null - if (args) { - if (args.ptVal !== undefined && args.ptVal !== null) { - this.ptVal = new ttypes.Point(args.ptVal) - } - if (args.lsVal !== undefined && args.lsVal !== null) { - this.lsVal = new ttypes.LineString(args.lsVal) - } - if (args.pgVal !== undefined && args.pgVal !== null) { - this.pgVal = new ttypes.Polygon(args.pgVal) - } - } -} -Geography.prototype = {} -Geography.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.ptVal = new ttypes.Point() - this.ptVal.read(input) - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.lsVal = new ttypes.LineString() - this.lsVal.read(input) - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.pgVal = new ttypes.Polygon() - this.pgVal.read(input) - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Geography.prototype.write = function(output) { - output.writeStructBegin('Geography') - if (this.ptVal !== null && this.ptVal !== undefined) { - output.writeFieldBegin('ptVal', Thrift.Type.STRUCT, 1) - this.ptVal.write(output) - output.writeFieldEnd() - } - if (this.lsVal !== null && this.lsVal !== undefined) { - output.writeFieldBegin('lsVal', Thrift.Type.STRUCT, 2) - this.lsVal.write(output) - output.writeFieldEnd() - } - if (this.pgVal !== null && this.pgVal !== undefined) { - output.writeFieldBegin('pgVal', Thrift.Type.STRUCT, 3) - this.pgVal.write(output) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Tag = Tag - -function Tag(args) { - this.name = null - this.props = null - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name - } - if (args.props !== undefined && args.props !== null) { - this.props = Thrift.copyMap(args.props, [ttypes.Value]) - } - } -} -Tag.prototype = {} -Tag.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.MAP) { - this.props = {} - const _rtmp348 = input.readMapBegin() - const _size47 = _rtmp348.size || 0 - for (let _i49 = 0; _i49 < _size47; ++_i49) { - let key50 = null - let val51 = null - key50 = input.readString() - val51 = new ttypes.Value() - val51.read(input) - this.props[key50] = val51 - } - input.readMapEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Tag.prototype.write = function(output) { - output.writeStructBegin('Tag') - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin('name', Thrift.Type.STRING, 1) - output.writeString(this.name) - output.writeFieldEnd() - } - if (this.props !== null && this.props !== undefined) { - output.writeFieldBegin('props', Thrift.Type.MAP, 2) - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.props)) - for (const kiter52 in this.props) { - if (this.props.hasOwnProperty(kiter52)) { - const viter53 = this.props[kiter52] - output.writeString(kiter52) - viter53.write(output) - } - } - output.writeMapEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Vertex = Vertex - -function Vertex(args) { - this.vid = null - this.tags = null - if (args) { - if (args.vid !== undefined && args.vid !== null) { - this.vid = new ttypes.Value(args.vid) - } - if (args.tags !== undefined && args.tags !== null) { - this.tags = Thrift.copyList(args.tags, [ttypes.Tag]) - } - } -} -Vertex.prototype = {} -Vertex.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.vid = new ttypes.Value() - this.vid.read(input) - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.LIST) { - this.tags = [] - const _rtmp355 = input.readListBegin() - const _size54 = _rtmp355.size || 0 - for (let _i56 = 0; _i56 < _size54; ++_i56) { - let elem57 = null - elem57 = new ttypes.Tag() - elem57.read(input) - this.tags.push(elem57) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Vertex.prototype.write = function(output) { - output.writeStructBegin('Vertex') - if (this.vid !== null && this.vid !== undefined) { - output.writeFieldBegin('vid', Thrift.Type.STRUCT, 1) - this.vid.write(output) - output.writeFieldEnd() - } - if (this.tags !== null && this.tags !== undefined) { - output.writeFieldBegin('tags', Thrift.Type.LIST, 2) - output.writeListBegin(Thrift.Type.STRUCT, this.tags.length) - for (let iter58 in this.tags) { - if (this.tags.hasOwnProperty(iter58)) { - iter58 = this.tags[iter58] - iter58.write(output) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Edge = Edge - -function Edge(args) { - this.src = null - this.dst = null - this.type = null - this.name = null - this.ranking = null - this.props = null - if (args) { - if (args.src !== undefined && args.src !== null) { - this.src = new ttypes.Value(args.src) - } - if (args.dst !== undefined && args.dst !== null) { - this.dst = new ttypes.Value(args.dst) - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name - } - if (args.ranking !== undefined && args.ranking !== null) { - this.ranking = args.ranking - } - if (args.props !== undefined && args.props !== null) { - this.props = Thrift.copyMap(args.props, [ttypes.Value]) - } - } -} -Edge.prototype = {} -Edge.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.src = new ttypes.Value() - this.src.read(input) - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.dst = new ttypes.Value() - this.dst.read(input) - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32() - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString() - } else { - input.skip(ftype) - } - break - case 5: - if (ftype == Thrift.Type.I64) { - this.ranking = input.readI64() - } else { - input.skip(ftype) - } - break - case 6: - if (ftype == Thrift.Type.MAP) { - this.props = {} - const _rtmp360 = input.readMapBegin() - const _size59 = _rtmp360.size || 0 - for (let _i61 = 0; _i61 < _size59; ++_i61) { - let key62 = null - let val63 = null - key62 = input.readString() - val63 = new ttypes.Value() - val63.read(input) - this.props[key62] = val63 - } - input.readMapEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Edge.prototype.write = function(output) { - output.writeStructBegin('Edge') - if (this.src !== null && this.src !== undefined) { - output.writeFieldBegin('src', Thrift.Type.STRUCT, 1) - this.src.write(output) - output.writeFieldEnd() - } - if (this.dst !== null && this.dst !== undefined) { - output.writeFieldBegin('dst', Thrift.Type.STRUCT, 2) - this.dst.write(output) - output.writeFieldEnd() - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin('type', Thrift.Type.I32, 3) - output.writeI32(this.type) - output.writeFieldEnd() - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin('name', Thrift.Type.STRING, 4) - output.writeString(this.name) - output.writeFieldEnd() - } - if (this.ranking !== null && this.ranking !== undefined) { - output.writeFieldBegin('ranking', Thrift.Type.I64, 5) - output.writeI64(this.ranking) - output.writeFieldEnd() - } - if (this.props !== null && this.props !== undefined) { - output.writeFieldBegin('props', Thrift.Type.MAP, 6) - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.props)) - for (const kiter64 in this.props) { - if (this.props.hasOwnProperty(kiter64)) { - const viter65 = this.props[kiter64] - output.writeString(kiter64) - viter65.write(output) - } - } - output.writeMapEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Step = Step - -function Step(args) { - this.dst = null - this.type = null - this.name = null - this.ranking = null - this.props = null - if (args) { - if (args.dst !== undefined && args.dst !== null) { - this.dst = new ttypes.Vertex(args.dst) - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name - } - if (args.ranking !== undefined && args.ranking !== null) { - this.ranking = args.ranking - } - if (args.props !== undefined && args.props !== null) { - this.props = Thrift.copyMap(args.props, [ttypes.Value]) - } - } -} -Step.prototype = {} -Step.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.dst = new ttypes.Vertex() - this.dst.read(input) - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString() - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.I64) { - this.ranking = input.readI64() - } else { - input.skip(ftype) - } - break - case 5: - if (ftype == Thrift.Type.MAP) { - this.props = {} - const _rtmp367 = input.readMapBegin() - const _size66 = _rtmp367.size || 0 - for (let _i68 = 0; _i68 < _size66; ++_i68) { - let key69 = null - let val70 = null - key69 = input.readString() - val70 = new ttypes.Value() - val70.read(input) - this.props[key69] = val70 - } - input.readMapEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Step.prototype.write = function(output) { - output.writeStructBegin('Step') - if (this.dst !== null && this.dst !== undefined) { - output.writeFieldBegin('dst', Thrift.Type.STRUCT, 1) - this.dst.write(output) - output.writeFieldEnd() - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin('type', Thrift.Type.I32, 2) - output.writeI32(this.type) - output.writeFieldEnd() - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin('name', Thrift.Type.STRING, 3) - output.writeString(this.name) - output.writeFieldEnd() - } - if (this.ranking !== null && this.ranking !== undefined) { - output.writeFieldBegin('ranking', Thrift.Type.I64, 4) - output.writeI64(this.ranking) - output.writeFieldEnd() - } - if (this.props !== null && this.props !== undefined) { - output.writeFieldBegin('props', Thrift.Type.MAP, 5) - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.props)) - for (const kiter71 in this.props) { - if (this.props.hasOwnProperty(kiter71)) { - const viter72 = this.props[kiter71] - output.writeString(kiter71) - viter72.write(output) - } - } - output.writeMapEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Path = Path - -function Path(args) { - this.src = null - this.steps = null - if (args) { - if (args.src !== undefined && args.src !== null) { - this.src = new ttypes.Vertex(args.src) - } - if (args.steps !== undefined && args.steps !== null) { - this.steps = Thrift.copyList(args.steps, [ttypes.Step]) - } - } -} -Path.prototype = {} -Path.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.src = new ttypes.Vertex() - this.src.read(input) - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.LIST) { - this.steps = [] - const _rtmp374 = input.readListBegin() - const _size73 = _rtmp374.size || 0 - for (let _i75 = 0; _i75 < _size73; ++_i75) { - let elem76 = null - elem76 = new ttypes.Step() - elem76.read(input) - this.steps.push(elem76) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Path.prototype.write = function(output) { - output.writeStructBegin('Path') - if (this.src !== null && this.src !== undefined) { - output.writeFieldBegin('src', Thrift.Type.STRUCT, 1) - this.src.write(output) - output.writeFieldEnd() - } - if (this.steps !== null && this.steps !== undefined) { - output.writeFieldBegin('steps', Thrift.Type.LIST, 2) - output.writeListBegin(Thrift.Type.STRUCT, this.steps.length) - for (let iter77 in this.steps) { - if (this.steps.hasOwnProperty(iter77)) { - iter77 = this.steps[iter77] - iter77.write(output) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.HostAddr = HostAddr - -function HostAddr(args) { - this.host = null - this.port = null - if (args) { - if (args.host !== undefined && args.host !== null) { - this.host = args.host - } - if (args.port !== undefined && args.port !== null) { - this.port = args.port - } - } -} -HostAddr.prototype = {} -HostAddr.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.host = input.readString() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.I32) { - this.port = input.readI32() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -HostAddr.prototype.write = function(output) { - output.writeStructBegin('HostAddr') - if (this.host !== null && this.host !== undefined) { - output.writeFieldBegin('host', Thrift.Type.STRING, 1) - output.writeString(this.host) - output.writeFieldEnd() - } - if (this.port !== null && this.port !== undefined) { - output.writeFieldBegin('port', Thrift.Type.I32, 2) - output.writeI32(this.port) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.KeyValue = KeyValue - -function KeyValue(args) { - this.key = null - this.value = null - if (args) { - if (args.key !== undefined && args.key !== null) { - this.key = args.key - } - if (args.value !== undefined && args.value !== null) { - this.value = args.value - } - } -} -KeyValue.prototype = {} -KeyValue.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.key = input.readString() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.value = input.readString() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -KeyValue.prototype.write = function(output) { - output.writeStructBegin('KeyValue') - if (this.key !== null && this.key !== undefined) { - output.writeFieldBegin('key', Thrift.Type.STRING, 1) - output.writeString(this.key) - output.writeFieldEnd() - } - if (this.value !== null && this.value !== undefined) { - output.writeFieldBegin('value', Thrift.Type.STRING, 2) - output.writeString(this.value) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Duration = Duration - -function Duration(args) { - this.seconds = null - this.microseconds = null - this.months = null - if (args) { - if (args.seconds !== undefined && args.seconds !== null) { - this.seconds = args.seconds - } - if (args.microseconds !== undefined && args.microseconds !== null) { - this.microseconds = args.microseconds - } - if (args.months !== undefined && args.months !== null) { - this.months = args.months - } - } -} -Duration.prototype = {} -Duration.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.seconds = input.readI64() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.I32) { - this.microseconds = input.readI32() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.I32) { - this.months = input.readI32() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Duration.prototype.write = function(output) { - output.writeStructBegin('Duration') - if (this.seconds !== null && this.seconds !== undefined) { - output.writeFieldBegin('seconds', Thrift.Type.I64, 1) - output.writeI64(this.seconds) - output.writeFieldEnd() - } - if (this.microseconds !== null && this.microseconds !== undefined) { - output.writeFieldBegin('microseconds', Thrift.Type.I32, 2) - output.writeI32(this.microseconds) - output.writeFieldEnd() - } - if (this.months !== null && this.months !== undefined) { - output.writeFieldBegin('months', Thrift.Type.I32, 3) - output.writeI32(this.months) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.LogInfo = LogInfo - -function LogInfo(args) { - this.log_id = null - this.term_id = null - if (args) { - if (args.log_id !== undefined && args.log_id !== null) { - this.log_id = args.log_id - } - if (args.term_id !== undefined && args.term_id !== null) { - this.term_id = args.term_id - } - } -} -LogInfo.prototype = {} -LogInfo.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.log_id = input.readI64() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.I64) { - this.term_id = input.readI64() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -LogInfo.prototype.write = function(output) { - output.writeStructBegin('LogInfo') - if (this.log_id !== null && this.log_id !== undefined) { - output.writeFieldBegin('log_id', Thrift.Type.I64, 1) - output.writeI64(this.log_id) - output.writeFieldEnd() - } - if (this.term_id !== null && this.term_id !== undefined) { - output.writeFieldBegin('term_id', Thrift.Type.I64, 2) - output.writeI64(this.term_id) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.DirInfo = DirInfo - -function DirInfo(args) { - this.root = null - this.data = null - if (args) { - if (args.root !== undefined && args.root !== null) { - this.root = args.root - } - if (args.data !== undefined && args.data !== null) { - this.data = Thrift.copyList(args.data, [null]) - } - } -} -DirInfo.prototype = {} -DirInfo.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.root = input.readString() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.LIST) { - this.data = [] - const _rtmp379 = input.readListBegin() - const _size78 = _rtmp379.size || 0 - for (let _i80 = 0; _i80 < _size78; ++_i80) { - let elem81 = null - elem81 = input.readString() - this.data.push(elem81) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -DirInfo.prototype.write = function(output) { - output.writeStructBegin('DirInfo') - if (this.root !== null && this.root !== undefined) { - output.writeFieldBegin('root', Thrift.Type.STRING, 1) - output.writeString(this.root) - output.writeFieldEnd() - } - if (this.data !== null && this.data !== undefined) { - output.writeFieldBegin('data', Thrift.Type.LIST, 2) - output.writeListBegin(Thrift.Type.STRING, this.data.length) - for (let iter82 in this.data) { - if (this.data.hasOwnProperty(iter82)) { - iter82 = this.data[iter82] - output.writeString(iter82) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.CheckpointInfo = CheckpointInfo - -function CheckpointInfo(args) { - this.space_id = null - this.parts = null - this.path = null - if (args) { - if (args.space_id !== undefined && args.space_id !== null) { - this.space_id = args.space_id - } - if (args.parts !== undefined && args.parts !== null) { - this.parts = Thrift.copyMap(args.parts, [ttypes.LogInfo]) - } - if (args.path !== undefined && args.path !== null) { - this.path = args.path - } - } -} -CheckpointInfo.prototype = {} -CheckpointInfo.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.space_id = input.readI32() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.MAP) { - this.parts = {} - const _rtmp384 = input.readMapBegin() - const _size83 = _rtmp384.size || 0 - for (let _i85 = 0; _i85 < _size83; ++_i85) { - let key86 = null - let val87 = null - key86 = input.readI32() - val87 = new ttypes.LogInfo() - val87.read(input) - this.parts[key86] = val87 - } - input.readMapEnd() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.STRING) { - this.path = input.readString() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -CheckpointInfo.prototype.write = function(output) { - output.writeStructBegin('CheckpointInfo') - if (this.space_id !== null && this.space_id !== undefined) { - output.writeFieldBegin('space_id', Thrift.Type.I32, 1) - output.writeI32(this.space_id) - output.writeFieldEnd() - } - if (this.parts !== null && this.parts !== undefined) { - output.writeFieldBegin('parts', Thrift.Type.MAP, 2) - output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRUCT, Thrift.objectLength(this.parts)) - for (const kiter88 in this.parts) { - if (this.parts.hasOwnProperty(kiter88)) { - const viter89 = this.parts[kiter88] - output.writeI32(kiter88) - viter89.write(output) - } - } - output.writeMapEnd() - output.writeFieldEnd() - } - if (this.path !== null && this.path !== undefined) { - output.writeFieldBegin('path', Thrift.Type.STRING, 3) - output.writeString(this.path) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.LogEntry = LogEntry - -function LogEntry(args) { - this.cluster = null - this.log_str = null - if (args) { - if (args.cluster !== undefined && args.cluster !== null) { - this.cluster = args.cluster - } - if (args.log_str !== undefined && args.log_str !== null) { - this.log_str = args.log_str - } - } -} -LogEntry.prototype = {} -LogEntry.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.cluster = input.readI64() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.log_str = input.readString() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -LogEntry.prototype.write = function(output) { - output.writeStructBegin('LogEntry') - if (this.cluster !== null && this.cluster !== undefined) { - output.writeFieldBegin('cluster', Thrift.Type.I64, 1) - output.writeI64(this.cluster) - output.writeFieldEnd() - } - if (this.log_str !== null && this.log_str !== undefined) { - output.writeFieldBegin('log_str', Thrift.Type.STRING, 2) - output.writeString(this.log_str) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -ttypes.version = '3.0.0' diff --git a/src/nebula/interface/graph_types.js b/src/nebula/interface/graph_types.js deleted file mode 100644 index 60cef6c..0000000 --- a/src/nebula/interface/graph_types.js +++ /dev/null @@ -1,983 +0,0 @@ -// -// Autogenerated by Thrift Compiler (0.14.1) -// -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -// -'use strict' - -const thrift = require('../../thrift') -const Thrift = thrift.Thrift -const Q = thrift.Q -const Int64 = require('node-int64') - -const common_ttypes = require('./common_types') - - -const ttypes = module.exports = {} - -module.exports.ProfilingStats = ProfilingStats - -function ProfilingStats(args) { - this.rows = null - this.exec_duration_in_us = null - this.total_duration_in_us = null - this.other_stats = null - if (args) { - if (args.rows !== undefined && args.rows !== null) { - this.rows = args.rows - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field rows is unset!') - } - if (args.exec_duration_in_us !== undefined && args.exec_duration_in_us !== null) { - this.exec_duration_in_us = args.exec_duration_in_us - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field exec_duration_in_us is unset!') - } - if (args.total_duration_in_us !== undefined && args.total_duration_in_us !== null) { - this.total_duration_in_us = args.total_duration_in_us - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field total_duration_in_us is unset!') - } - if (args.other_stats !== undefined && args.other_stats !== null) { - this.other_stats = Thrift.copyMap(args.other_stats, [null]) - } - } -} -ProfilingStats.prototype = {} -ProfilingStats.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.rows = input.readI64() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.I64) { - this.exec_duration_in_us = input.readI64() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.I64) { - this.total_duration_in_us = input.readI64() - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.MAP) { - this.other_stats = {} - const _rtmp31 = input.readMapBegin() - const _size0 = _rtmp31.size || 0 - for (let _i2 = 0; _i2 < _size0; ++_i2) { - let key3 = null - let val4 = null - key3 = input.readBinary() - val4 = input.readBinary() - this.other_stats[key3] = val4 - } - input.readMapEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -ProfilingStats.prototype.write = function(output) { - output.writeStructBegin('ProfilingStats') - if (this.rows !== null && this.rows !== undefined) { - output.writeFieldBegin('rows', Thrift.Type.I64, 1) - output.writeI64(this.rows) - output.writeFieldEnd() - } - if (this.exec_duration_in_us !== null && this.exec_duration_in_us !== undefined) { - output.writeFieldBegin('exec_duration_in_us', Thrift.Type.I64, 2) - output.writeI64(this.exec_duration_in_us) - output.writeFieldEnd() - } - if (this.total_duration_in_us !== null && this.total_duration_in_us !== undefined) { - output.writeFieldBegin('total_duration_in_us', Thrift.Type.I64, 3) - output.writeI64(this.total_duration_in_us) - output.writeFieldEnd() - } - if (this.other_stats !== null && this.other_stats !== undefined) { - output.writeFieldBegin('other_stats', Thrift.Type.MAP, 4) - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.other_stats)) - for (const kiter5 in this.other_stats) { - if (this.other_stats.hasOwnProperty(kiter5)) { - const viter6 = this.other_stats[kiter5] - output.writeBinary(kiter5) - output.writeBinary(viter6) - } - } - output.writeMapEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.PlanNodeBranchInfo = PlanNodeBranchInfo - -function PlanNodeBranchInfo(args) { - this.is_do_branch = null - this.condition_node_id = null - if (args) { - if (args.is_do_branch !== undefined && args.is_do_branch !== null) { - this.is_do_branch = args.is_do_branch - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field is_do_branch is unset!') - } - if (args.condition_node_id !== undefined && args.condition_node_id !== null) { - this.condition_node_id = args.condition_node_id - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field condition_node_id is unset!') - } - } -} -PlanNodeBranchInfo.prototype = {} -PlanNodeBranchInfo.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.is_do_branch = input.readBool() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.I64) { - this.condition_node_id = input.readI64() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -PlanNodeBranchInfo.prototype.write = function(output) { - output.writeStructBegin('PlanNodeBranchInfo') - if (this.is_do_branch !== null && this.is_do_branch !== undefined) { - output.writeFieldBegin('is_do_branch', Thrift.Type.BOOL, 1) - output.writeBool(this.is_do_branch) - output.writeFieldEnd() - } - if (this.condition_node_id !== null && this.condition_node_id !== undefined) { - output.writeFieldBegin('condition_node_id', Thrift.Type.I64, 2) - output.writeI64(this.condition_node_id) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.Pair = Pair - -function Pair(args) { - this.key = null - this.value = null - if (args) { - if (args.key !== undefined && args.key !== null) { - this.key = args.key - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field key is unset!') - } - if (args.value !== undefined && args.value !== null) { - this.value = args.value - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field value is unset!') - } - } -} -Pair.prototype = {} -Pair.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.key = input.readBinary() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.value = input.readBinary() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -Pair.prototype.write = function(output) { - output.writeStructBegin('Pair') - if (this.key !== null && this.key !== undefined) { - output.writeFieldBegin('key', Thrift.Type.STRING, 1) - output.writeBinary(this.key) - output.writeFieldEnd() - } - if (this.value !== null && this.value !== undefined) { - output.writeFieldBegin('value', Thrift.Type.STRING, 2) - output.writeBinary(this.value) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.PlanNodeDescription = PlanNodeDescription - -function PlanNodeDescription(args) { - this.name = null - this.id = null - this.output_var = null - this.description = null - this.profiles = null - this.branch_info = null - this.dependencies = null - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!') - } - if (args.id !== undefined && args.id !== null) { - this.id = args.id - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!') - } - if (args.output_var !== undefined && args.output_var !== null) { - this.output_var = args.output_var - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field output_var is unset!') - } - if (args.description !== undefined && args.description !== null) { - this.description = Thrift.copyList(args.description, [ttypes.Pair]) - } - if (args.profiles !== undefined && args.profiles !== null) { - this.profiles = Thrift.copyList(args.profiles, [ttypes.ProfilingStats]) - } - if (args.branch_info !== undefined && args.branch_info !== null) { - this.branch_info = new ttypes.PlanNodeBranchInfo(args.branch_info) - } - if (args.dependencies !== undefined && args.dependencies !== null) { - this.dependencies = Thrift.copyList(args.dependencies, [null]) - } - } -} -PlanNodeDescription.prototype = {} -PlanNodeDescription.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.name = input.readBinary() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.I64) { - this.id = input.readI64() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.STRING) { - this.output_var = input.readBinary() - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.LIST) { - this.description = [] - const _rtmp38 = input.readListBegin() - const _size7 = _rtmp38.size || 0 - for (let _i9 = 0; _i9 < _size7; ++_i9) { - let elem10 = null - elem10 = new ttypes.Pair() - elem10.read(input) - this.description.push(elem10) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - case 5: - if (ftype == Thrift.Type.LIST) { - this.profiles = [] - const _rtmp312 = input.readListBegin() - const _size11 = _rtmp312.size || 0 - for (let _i13 = 0; _i13 < _size11; ++_i13) { - let elem14 = null - elem14 = new ttypes.ProfilingStats() - elem14.read(input) - this.profiles.push(elem14) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.branch_info = new ttypes.PlanNodeBranchInfo() - this.branch_info.read(input) - } else { - input.skip(ftype) - } - break - case 7: - if (ftype == Thrift.Type.LIST) { - this.dependencies = [] - const _rtmp316 = input.readListBegin() - const _size15 = _rtmp316.size || 0 - for (let _i17 = 0; _i17 < _size15; ++_i17) { - let elem18 = null - elem18 = input.readI64() - this.dependencies.push(elem18) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -PlanNodeDescription.prototype.write = function(output) { - output.writeStructBegin('PlanNodeDescription') - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin('name', Thrift.Type.STRING, 1) - output.writeBinary(this.name) - output.writeFieldEnd() - } - if (this.id !== null && this.id !== undefined) { - output.writeFieldBegin('id', Thrift.Type.I64, 2) - output.writeI64(this.id) - output.writeFieldEnd() - } - if (this.output_var !== null && this.output_var !== undefined) { - output.writeFieldBegin('output_var', Thrift.Type.STRING, 3) - output.writeBinary(this.output_var) - output.writeFieldEnd() - } - if (this.description !== null && this.description !== undefined) { - output.writeFieldBegin('description', Thrift.Type.LIST, 4) - output.writeListBegin(Thrift.Type.STRUCT, this.description.length) - for (let iter19 in this.description) { - if (this.description.hasOwnProperty(iter19)) { - iter19 = this.description[iter19] - iter19.write(output) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - if (this.profiles !== null && this.profiles !== undefined) { - output.writeFieldBegin('profiles', Thrift.Type.LIST, 5) - output.writeListBegin(Thrift.Type.STRUCT, this.profiles.length) - for (let iter20 in this.profiles) { - if (this.profiles.hasOwnProperty(iter20)) { - iter20 = this.profiles[iter20] - iter20.write(output) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - if (this.branch_info !== null && this.branch_info !== undefined) { - output.writeFieldBegin('branch_info', Thrift.Type.STRUCT, 6) - this.branch_info.write(output) - output.writeFieldEnd() - } - if (this.dependencies !== null && this.dependencies !== undefined) { - output.writeFieldBegin('dependencies', Thrift.Type.LIST, 7) - output.writeListBegin(Thrift.Type.I64, this.dependencies.length) - for (let iter21 in this.dependencies) { - if (this.dependencies.hasOwnProperty(iter21)) { - iter21 = this.dependencies[iter21] - output.writeI64(iter21) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.PlanDescription = PlanDescription - -function PlanDescription(args) { - this.plan_node_descs = null - this.node_index_map = null - this.format = null - this.optimize_time_in_us = null - if (args) { - if (args.plan_node_descs !== undefined && args.plan_node_descs !== null) { - this.plan_node_descs = Thrift.copyList(args.plan_node_descs, [ttypes.PlanNodeDescription]) - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field plan_node_descs is unset!') - } - if (args.node_index_map !== undefined && args.node_index_map !== null) { - this.node_index_map = Thrift.copyMap(args.node_index_map, [null]) - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field node_index_map is unset!') - } - if (args.format !== undefined && args.format !== null) { - this.format = args.format - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field format is unset!') - } - if (args.optimize_time_in_us !== undefined && args.optimize_time_in_us !== null) { - this.optimize_time_in_us = args.optimize_time_in_us - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field optimize_time_in_us is unset!') - } - } -} -PlanDescription.prototype = {} -PlanDescription.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.plan_node_descs = [] - const _rtmp323 = input.readListBegin() - const _size22 = _rtmp323.size || 0 - for (let _i24 = 0; _i24 < _size22; ++_i24) { - let elem25 = null - elem25 = new ttypes.PlanNodeDescription() - elem25.read(input) - this.plan_node_descs.push(elem25) - } - input.readListEnd() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.MAP) { - this.node_index_map = {} - const _rtmp327 = input.readMapBegin() - const _size26 = _rtmp327.size || 0 - for (let _i28 = 0; _i28 < _size26; ++_i28) { - let key29 = null - let val30 = null - key29 = input.readI64() - val30 = input.readI64() - this.node_index_map[key29] = val30 - } - input.readMapEnd() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.STRING) { - this.format = input.readBinary() - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.I32) { - this.optimize_time_in_us = input.readI32() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -PlanDescription.prototype.write = function(output) { - output.writeStructBegin('PlanDescription') - if (this.plan_node_descs !== null && this.plan_node_descs !== undefined) { - output.writeFieldBegin('plan_node_descs', Thrift.Type.LIST, 1) - output.writeListBegin(Thrift.Type.STRUCT, this.plan_node_descs.length) - for (let iter31 in this.plan_node_descs) { - if (this.plan_node_descs.hasOwnProperty(iter31)) { - iter31 = this.plan_node_descs[iter31] - iter31.write(output) - } - } - output.writeListEnd() - output.writeFieldEnd() - } - if (this.node_index_map !== null && this.node_index_map !== undefined) { - output.writeFieldBegin('node_index_map', Thrift.Type.MAP, 2) - output.writeMapBegin(Thrift.Type.I64, Thrift.Type.I64, Thrift.objectLength(this.node_index_map)) - for (const kiter32 in this.node_index_map) { - if (this.node_index_map.hasOwnProperty(kiter32)) { - const viter33 = this.node_index_map[kiter32] - output.writeI64(kiter32) - output.writeI64(viter33) - } - } - output.writeMapEnd() - output.writeFieldEnd() - } - if (this.format !== null && this.format !== undefined) { - output.writeFieldBegin('format', Thrift.Type.STRING, 3) - output.writeBinary(this.format) - output.writeFieldEnd() - } - if (this.optimize_time_in_us !== null && this.optimize_time_in_us !== undefined) { - output.writeFieldBegin('optimize_time_in_us', Thrift.Type.I32, 4) - output.writeI32(this.optimize_time_in_us) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.ExecutionResponse = ExecutionResponse - -function ExecutionResponse(args) { - this.error_code = null - this.latency_in_us = null - this.data = null - this.space_name = null - this.error_msg = null - this.plan_desc = null - this.comment = null - if (args) { - if (args.error_code !== undefined && args.error_code !== null) { - this.error_code = args.error_code - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field error_code is unset!') - } - if (args.latency_in_us !== undefined && args.latency_in_us !== null) { - this.latency_in_us = args.latency_in_us - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field latency_in_us is unset!') - } - if (args.data !== undefined && args.data !== null) { - this.data = new common_ttypes.DataSet(args.data) - } - if (args.space_name !== undefined && args.space_name !== null) { - this.space_name = args.space_name - } - if (args.error_msg !== undefined && args.error_msg !== null) { - this.error_msg = args.error_msg - } - if (args.plan_desc !== undefined && args.plan_desc !== null) { - this.plan_desc = new ttypes.PlanDescription(args.plan_desc) - } - if (args.comment !== undefined && args.comment !== null) { - this.comment = args.comment - } - } -} -ExecutionResponse.prototype = {} -ExecutionResponse.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.error_code = input.readI32() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.I64) { - this.latency_in_us = input.readI64() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.data = new common_ttypes.DataSet() - this.data.read(input) - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.STRING) { - this.space_name = input.readString() - } else { - input.skip(ftype) - } - break - case 5: - if (ftype == Thrift.Type.STRING) { - this.error_msg = input.readString() - } else { - input.skip(ftype) - } - break - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.plan_desc = new ttypes.PlanDescription() - this.plan_desc.read(input) - } else { - input.skip(ftype) - } - break - case 7: - if (ftype == Thrift.Type.STRING) { - this.comment = input.readString() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -ExecutionResponse.prototype.write = function(output) { - output.writeStructBegin('ExecutionResponse') - if (this.error_code !== null && this.error_code !== undefined) { - output.writeFieldBegin('error_code', Thrift.Type.I32, 1) - output.writeI32(this.error_code) - output.writeFieldEnd() - } - if (this.latency_in_us !== null && this.latency_in_us !== undefined) { - output.writeFieldBegin('latency_in_us', Thrift.Type.I64, 2) - output.writeI64(this.latency_in_us) - output.writeFieldEnd() - } - if (this.data !== null && this.data !== undefined) { - output.writeFieldBegin('data', Thrift.Type.STRUCT, 3) - this.data.write(output) - output.writeFieldEnd() - } - if (this.space_name !== null && this.space_name !== undefined) { - output.writeFieldBegin('space_name', Thrift.Type.STRING, 4) - output.writeString(this.space_name) - output.writeFieldEnd() - } - if (this.error_msg !== null && this.error_msg !== undefined) { - output.writeFieldBegin('error_msg', Thrift.Type.STRING, 5) - output.writeString(this.error_msg) - output.writeFieldEnd() - } - if (this.plan_desc !== null && this.plan_desc !== undefined) { - output.writeFieldBegin('plan_desc', Thrift.Type.STRUCT, 6) - this.plan_desc.write(output) - output.writeFieldEnd() - } - if (this.comment !== null && this.comment !== undefined) { - output.writeFieldBegin('comment', Thrift.Type.STRING, 7) - output.writeString(this.comment) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.AuthResponse = AuthResponse - -function AuthResponse(args) { - this.error_code = null - this.error_msg = null - this.session_id = null - this.time_zone_offset_seconds = null - this.time_zone_name = null - if (args) { - if (args.error_code !== undefined && args.error_code !== null) { - this.error_code = args.error_code - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field error_code is unset!') - } - if (args.error_msg !== undefined && args.error_msg !== null) { - this.error_msg = args.error_msg - } - if (args.session_id !== undefined && args.session_id !== null) { - this.session_id = args.session_id - } - if (args.time_zone_offset_seconds !== undefined && args.time_zone_offset_seconds !== null) { - this.time_zone_offset_seconds = args.time_zone_offset_seconds - } - if (args.time_zone_name !== undefined && args.time_zone_name !== null) { - this.time_zone_name = args.time_zone_name - } - } -} -AuthResponse.prototype = {} -AuthResponse.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.error_code = input.readI32() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.error_msg = input.readString() - } else { - input.skip(ftype) - } - break - case 3: - if (ftype == Thrift.Type.I64) { - this.session_id = input.readI64() - } else { - input.skip(ftype) - } - break - case 4: - if (ftype == Thrift.Type.I32) { - this.time_zone_offset_seconds = input.readI32() - } else { - input.skip(ftype) - } - break - case 5: - if (ftype == Thrift.Type.STRING) { - this.time_zone_name = input.readString() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -AuthResponse.prototype.write = function(output) { - output.writeStructBegin('AuthResponse') - if (this.error_code !== null && this.error_code !== undefined) { - output.writeFieldBegin('error_code', Thrift.Type.I32, 1) - output.writeI32(this.error_code) - output.writeFieldEnd() - } - if (this.error_msg !== null && this.error_msg !== undefined) { - output.writeFieldBegin('error_msg', Thrift.Type.STRING, 2) - output.writeString(this.error_msg) - output.writeFieldEnd() - } - if (this.session_id !== null && this.session_id !== undefined) { - output.writeFieldBegin('session_id', Thrift.Type.I64, 3) - output.writeI64(this.session_id) - output.writeFieldEnd() - } - if (this.time_zone_offset_seconds !== null && this.time_zone_offset_seconds !== undefined) { - output.writeFieldBegin('time_zone_offset_seconds', Thrift.Type.I32, 4) - output.writeI32(this.time_zone_offset_seconds) - output.writeFieldEnd() - } - if (this.time_zone_name !== null && this.time_zone_name !== undefined) { - output.writeFieldBegin('time_zone_name', Thrift.Type.STRING, 5) - output.writeString(this.time_zone_name) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.VerifyClientVersionResp = VerifyClientVersionResp - -function VerifyClientVersionResp(args) { - this.error_code = null - this.error_msg = null - if (args) { - if (args.error_code !== undefined && args.error_code !== null) { - this.error_code = args.error_code - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field error_code is unset!') - } - if (args.error_msg !== undefined && args.error_msg !== null) { - this.error_msg = args.error_msg - } - } -} -VerifyClientVersionResp.prototype = {} -VerifyClientVersionResp.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.error_code = input.readI32() - } else { - input.skip(ftype) - } - break - case 2: - if (ftype == Thrift.Type.STRING) { - this.error_msg = input.readString() - } else { - input.skip(ftype) - } - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -VerifyClientVersionResp.prototype.write = function(output) { - output.writeStructBegin('VerifyClientVersionResp') - if (this.error_code !== null && this.error_code !== undefined) { - output.writeFieldBegin('error_code', Thrift.Type.I32, 1) - output.writeI32(this.error_code) - output.writeFieldEnd() - } - if (this.error_msg !== null && this.error_msg !== undefined) { - output.writeFieldBegin('error_msg', Thrift.Type.STRING, 2) - output.writeString(this.error_msg) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - -module.exports.VerifyClientVersionReq = VerifyClientVersionReq - -function VerifyClientVersionReq(args) { - this.version = '3.0.0' - if (args) { - if (args.version !== undefined && args.version !== null) { - this.version = args.version - } else { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field version is unset!') - } - } -} -VerifyClientVersionReq.prototype = {} -VerifyClientVersionReq.prototype.read = function(input) { - input.readStructBegin() - while (true) { - const ret = input.readFieldBegin() - const ftype = ret.ftype - const fid = ret.fid - if (ftype == Thrift.Type.STOP) { - break - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.version = input.readString() - } else { - input.skip(ftype) - } - break - case 0: - input.skip(ftype) - break - default: - input.skip(ftype) - } - input.readFieldEnd() - } - input.readStructEnd() -} - -VerifyClientVersionReq.prototype.write = function(output) { - output.writeStructBegin('VerifyClientVersionReq') - if (this.version !== null && this.version !== undefined) { - output.writeFieldBegin('version', Thrift.Type.STRING, 1) - output.writeString(this.version) - output.writeFieldEnd() - } - output.writeFieldStop() - output.writeStructEnd() -} - diff --git a/src/nebula/parser/dataset.ts b/src/nebula/parser/dataset.ts deleted file mode 100644 index a3dedf6..0000000 --- a/src/nebula/parser/dataset.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ - -/* - * Created by Wu Jian Ping on - 2022/06/07. - */ - -export default (obj: any, propName: string): any => { - return obj[propName] -} diff --git a/src/nebula/parser/edge.ts b/src/nebula/parser/edge.ts deleted file mode 100644 index 45384ac..0000000 --- a/src/nebula/parser/edge.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -/** - * Created by Wu Jian Ping on - 2021/06/10. - */ - -export default (obj: any, propName: string): any => { - return obj[propName] -} diff --git a/src/nebula/parser/index.ts b/src/nebula/parser/index.ts index 2d3ac5e..fe607e9 100644 --- a/src/nebula/parser/index.ts +++ b/src/nebula/parser/index.ts @@ -6,7 +6,7 @@ import _traverse from './traverse' -const traverse = (obj: any): Promise => { +export const traverse = (obj: any): Promise => { return new Promise((resolve, reject) => { setImmediate(() => { try { @@ -18,6 +18,4 @@ const traverse = (obj: any): Promise => { }) } -export default { - traverse -} + diff --git a/src/nebula/parser/list.ts b/src/nebula/parser/list.ts deleted file mode 100644 index 23a8743..0000000 --- a/src/nebula/parser/list.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ - -/** - * Created by Wu Jian Ping on - 2021/06/10. - */ - -export default (obj: any, propName: string): any => { - return obj[propName].values || [] -} - diff --git a/src/nebula/parser/map.ts b/src/nebula/parser/map.ts deleted file mode 100644 index a7fc517..0000000 --- a/src/nebula/parser/map.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ - -/* - * Created by Wu Jian Ping on - 2022/06/07. - */ - -export default (obj: any, propName: string): any => { - return obj[propName].kvs || {} -} diff --git a/src/nebula/parser/path.ts b/src/nebula/parser/path.ts deleted file mode 100644 index 2c95e93..0000000 --- a/src/nebula/parser/path.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ - -/** - * Created by Wu Jian Ping on - 2021/06/10. - */ - -export default (obj: any, propName: string): any => { - return obj[propName] -} - diff --git a/src/nebula/parser/set.ts b/src/nebula/parser/set.ts deleted file mode 100644 index 24a9a37..0000000 --- a/src/nebula/parser/set.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ - -/* - * Created by Wu Jian Ping on - 2022/06/07. - */ - -export default (obj: any, propName: string): any => { - return obj[propName].values || [] -} diff --git a/src/nebula/parser/traverse.ts b/src/nebula/parser/traverse.ts index 66d96af..9cd85ec 100644 --- a/src/nebula/parser/traverse.ts +++ b/src/nebula/parser/traverse.ts @@ -3,118 +3,93 @@ * Created by Wu Jian Ping on - 2021/06/09. */ -import Int64 from 'node-int64' -import _ from 'lodash' -import datasetParser from './dataset' -import edgeParser from './edge' -import listParser from './list' -import mapParser from './map' -import native from '../../native' -import pathParser from './path' -import setParser from './set' -import utils from './utils' -import valueParse from './value' -import vertexParser from './vertex' +import Int64 from 'node-int64'; +import _ from 'lodash'; +import { + getNebulaValueTypeName, + isNebulaValue, + NebulaDataParserList, +} from './utils'; +import * as native from '../../native'; const getNebulaValue = (obj: any): any => { - if (utils.isNebulaValue(obj)) { - const propName = utils.getNebulaValueTypeName(obj) - if (propName) { - if (utils.isNebulaValueTypeName(propName)) { - return valueParse(obj, propName) - } else if (utils.isNebulaNListTypeName(propName)) { - return listParser(obj, propName) - } else if (utils.isNebulaVertexTypeName(propName)) { - return vertexParser(obj, propName) - } else if (utils.isNebulaEdgeTypeName(propName)) { - return edgeParser(obj, propName) - } else if (utils.isNebulaPathTypeName(propName)) { - return pathParser(obj, propName) - } else if (utils.isNebulaNMapTypeName(propName)) { - return mapParser(obj, propName) - } else if (utils.isNebulaNSetTypeName(propName)) { - return setParser(obj, propName) - } else if (utils.isNebulaNDataSetTypeName(propName)) { - return datasetParser(obj, propName) - } else { - return { - [propName]: obj[propName] - } - } - } - return null + if (!isNebulaValue(obj)) { + return obj; } - return obj -} + + const propName = getNebulaValueTypeName(obj); + const parser = NebulaDataParserList.find((parser) => parser.match(propName)); + return parser ? parser.parse(obj, propName) : null; +}; const convert = (entity: any): any => { if (_.isFunction(entity)) { - return undefined - } else if (utils.isNebulaValue(entity)) { - const obj = getNebulaValue(entity) + return undefined; + } else if (isNebulaValue(entity)) { + const obj = getNebulaValue(entity); if (_.isDate(entity)) { - return entity + return entity; } else if (_.isArray(obj) || _.isPlainObject || _.isObject(obj)) { - return convert(obj) + return convert(obj); } - return obj + return obj; } else if (_.isArray(entity)) { - const out = [] - _.forEach(entity, o => { - out.push(convert(o)) - }) - return out + const out = []; + _.forEach(entity, (o) => { + out.push(convert(o)); + }); + return out; } else if (_.isPlainObject(entity)) { - const out = {} - const keys = _.keys(entity) - _.forEach(keys, key => { - const o = entity[key] - out[key] = convert(o) - }) - return out + const out = {}; + const keys = _.keys(entity); + _.forEach(keys, (key) => { + const o = entity[key]; + out[key] = convert(o); + }); + return out; } else if (entity instanceof Int64) { if (isFinite(entity.valueOf())) { - return +entity.toString() + return +entity.toString(); } else { if (entity.buffer) { - return native.bytesToLongLongString(entity.buffer as any) + return native.bytesToLongLongString(entity.buffer as any); } - return entity.toOctetString() + return entity.toOctetString(); } } else if (_.isDate(entity)) { - return entity + return entity; } else if (_.isObject(entity)) { - return convert(_.toPlainObject(entity)) + return convert(_.toPlainObject(entity)); } else { - return entity + return entity; } -} +}; const traverse = (obj: any): any => { - const start = Date.now() - const result = convert(obj) - const columns = result?.data?.column_names - const rows = result?.data?.rows + const start = Date.now(); + const result = convert(obj); + const columns = result?.data?.column_names; + const rows = result?.data?.rows; if (columns && rows) { - const entity = {} - _.forEach(columns, c => { - entity[c] = [] - }) + const entity = {}; + _.forEach(columns, (c) => { + entity[c] = []; + }); - _.forEach(rows, row => { + _.forEach(rows, (row) => { _.forEach(columns, (c, i) => { - entity[c].push(row.values[i]) - }) - }) + entity[c].push(row.values[i]); + }); + }); - result.data = entity + result.data = entity; } - const end = Date.now() - result.metrics = result.metrics ?? { execute: 0, traverse: 0 } - result.metrics.traverse = end - start + const end = Date.now(); + result.metrics = result.metrics ?? { execute: 0, traverse: 0 }; + result.metrics.traverse = end - start; - return result -} + return result; +}; -export default traverse +export default traverse; diff --git a/src/nebula/parser/utils.ts b/src/nebula/parser/utils.ts index dd43d41..c4cb760 100644 --- a/src/nebula/parser/utils.ts +++ b/src/nebula/parser/utils.ts @@ -3,10 +3,22 @@ * Created by Wu Jian Ping on - 2021/06/10. */ -import { NebulaValue } from '../types' -import _ from 'lodash' +import Int64 from 'node-int64'; +import { bytesToLongLongString } from '../../native'; +import { NebulaValue } from '../types'; -const NebulaValueTypeNames = [ +/** + * - nVal: NullType + * - bVal: bool + * - iVal: i64 + * - fVal: double + * - sVal: string + * - dVal: Date + * - tVal: Time + * - dtVal: DateTime + * - gVal: DataSet + */ +const NebulaValueTypeNameSet = new Set([ 'nVal', 'bVal', 'iVal', @@ -15,58 +27,72 @@ const NebulaValueTypeNames = [ 'dVal', 'tVal', 'dtVal', - 'gVal' -] - -const getNebulaValueTypeName = (obj: NebulaValue): string => { - return _.findKey(obj, o => o !== null) -} - -const isNebulaValue = (obj: any): boolean => { - return obj && obj.nVal !== undefined -} - -const isNebulaValueTypeName = (propName: string): boolean => { - return _.includes(NebulaValueTypeNames, propName) -} - -const isNebulaNListTypeName = (propName: string): boolean => { - return propName === 'lVal' -} - -const isNebulaVertexTypeName = (propName: string): boolean => { - return propName === 'vVal' -} - -const isNebulaEdgeTypeName = (propName: string): boolean => { - return propName === 'eVal' -} + 'gVal', +]); -const isNebulaPathTypeName = (propName: string): boolean => { - return propName === 'pVal' -} -const isNebulaNMapTypeName = (propName: string): boolean => { - return propName === 'mVal' +export const getNebulaValueTypeName = (obj: NebulaValue): string => { + return _.findKey(obj, o => o !== null) } -const isNebulaNSetTypeName = (propName: string): boolean => { - return propName === 'uVal' -} +export const isNebulaValue = (obj: any): boolean => { + return obj?.nVal !== undefined; +}; -const isNebulaNDataSetTypeName = (propName: string): boolean => { - return propName === 'gVal' -} +const valueParser = (obj: NebulaValue, prop: string) => { + // for i64 + const v = obj[prop]; + if (!(v instanceof Int64)) { + return v; + } + if (isFinite(v.valueOf())) { + return +v.toString(); + } + if (v.buffer) { + return bytesToLongLongString(v.buffer as any); + } + return v.toOctetString(); +}; -export default { - isNebulaValueTypeName, - isNebulaNListTypeName, - isNebulaVertexTypeName, - isNebulaEdgeTypeName, - isNebulaPathTypeName, - isNebulaValue, - isNebulaNMapTypeName, - isNebulaNSetTypeName, - isNebulaNDataSetTypeName, - getNebulaValueTypeName -} +export const NebulaDataParserList = [ + { + name: 'NebulaValue', + match: (prop: string) => NebulaValueTypeNameSet.has(prop), + parse: valueParser, + }, + { + name: 'NebulaNList', + match: (prop: string) => prop === 'lVal', + parse: (obj: NebulaValue, prop: string) => obj[prop].values || [], + }, + { + name: 'NebulaVertex', + match: (prop: string) => prop === 'vVal', + parse: (obj: NebulaValue, prop: string) => obj[prop], + }, + { + name: 'NebulaEdge', + match: (prop: string) => prop === 'eVal', + parse: (obj: NebulaValue, prop: string) => obj[prop], + }, + { + name: 'NebulaPath', + match: (prop: string) => prop === 'pVal', + parse: (obj: NebulaValue, prop: string) => obj[prop], + }, + { + name: 'NebulaNMap', + match: (prop: string) => prop === 'mVal', + parse: (obj: NebulaValue, prop: string) => obj[prop].kvs || {}, + }, + { + name: 'NebulaNSet', + match: (prop: string) => prop === 'uVal', + parse: (obj: NebulaValue, prop: string) => obj[prop].values || [], + }, + { + name: 'NebulaNDataSet', + match: (prop: string) => prop === 'gVal', + parse: (obj: NebulaValue, prop: string) => obj[prop], + }, +]; diff --git a/src/nebula/parser/value.ts b/src/nebula/parser/value.ts deleted file mode 100644 index 24a03e4..0000000 --- a/src/nebula/parser/value.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -/** - * Created by Wu Jian Ping on - 2021/06/10. - */ - -import Int64 from 'node-int64' -import native from '../../native' - -export default (obj: any, propName: string): any => { - // for i64 - const v = obj[propName] - if (v instanceof Int64) { - if (isFinite(v.valueOf())) { - return +v.toString() - } else { - if (v.buffer) { - return native.bytesToLongLongString(v.buffer as any) - } - return v.toOctetString() - } - } - return v -} diff --git a/src/nebula/parser/vertex.ts b/src/nebula/parser/vertex.ts deleted file mode 100644 index 2c95e93..0000000 --- a/src/nebula/parser/vertex.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ - -/** - * Created by Wu Jian Ping on - 2021/06/10. - */ - -export default (obj: any, propName: string): any => { - return obj[propName] -} - diff --git a/src/nebula/services/GraphService.d.ts b/src/nebula/services/GraphService.d.ts new file mode 100644 index 0000000..119e07d --- /dev/null +++ b/src/nebula/services/GraphService.d.ts @@ -0,0 +1,73 @@ +// +// Autogenerated by Thrift Compiler (0.19.0) +// +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// + +import thrift = require('thrift'); +import Thrift = thrift.Thrift; +import Q = thrift.Q; +import Int64 = require('node-int64'); +import common_ttypes = require('./common_types'); + + +import ttypes = require('./graph_types'); +import ProfilingStats = ttypes.ProfilingStats +import PlanNodeBranchInfo = ttypes.PlanNodeBranchInfo +import Pair = ttypes.Pair +import PlanNodeDescription = ttypes.PlanNodeDescription +import PlanDescription = ttypes.PlanDescription +import ExecutionResponse = ttypes.ExecutionResponse +import AuthResponse = ttypes.AuthResponse +import VerifyClientVersionResp = ttypes.VerifyClientVersionResp +import VerifyClientVersionReq = ttypes.VerifyClientVersionReq + +declare class Client { + private output: thrift.TTransport; + private pClass: thrift.TProtocol; + private _seqid: number; + + constructor(output: thrift.TTransport, pClass: { new(trans: thrift.TTransport): thrift.TProtocol }); + + authenticate(username: string, password: string): Promise; + + authenticate(username: string, password: string, callback?: (error: void, response: AuthResponse)=>void): void; + + signout(sessionId: Int64): Promise; + + signout(sessionId: Int64, callback?: (error: void, response: void)=>void): void; + + execute(sessionId: Int64, stmt: Buffer): Promise; + + execute(sessionId: Int64, stmt: Buffer, callback?: (error: void, response: ExecutionResponse)=>void): void; + + executeWithParameter(sessionId: Int64, stmt: Buffer, parameterMap: { [k: string]: common_ttypes.Value; }): Promise; + + executeWithParameter(sessionId: Int64, stmt: Buffer, parameterMap: { [k: string]: common_ttypes.Value; }, callback?: (error: void, response: ExecutionResponse)=>void): void; + + executeJson(sessionId: Int64, stmt: Buffer): Promise; + + executeJson(sessionId: Int64, stmt: Buffer, callback?: (error: void, response: Buffer)=>void): void; + + executeJsonWithParameter(sessionId: Int64, stmt: Buffer, parameterMap: any): Promise; + + executeJsonWithParameter(sessionId: Int64, stmt: Buffer, parameterMap: any, callback?: (error: void, response: Buffer)=>void): void; + + verifyClientVersion(req: VerifyClientVersionReq): Promise; + + verifyClientVersion(req: VerifyClientVersionReq, callback?: (error: void, response: VerifyClientVersionResp)=>void): void; + } + +declare class Processor { + private _handler: object; + + constructor(handler: object); + process(input: thrift.TProtocol, output: thrift.TProtocol): void; + process_authenticate(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_signout(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_execute(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_executeWithParameter(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_executeJson(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_executeJsonWithParameter(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_verifyClientVersion(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; +} diff --git a/src/nebula/services/GraphService.js b/src/nebula/services/GraphService.js new file mode 100644 index 0000000..9def4d1 --- /dev/null +++ b/src/nebula/services/GraphService.js @@ -0,0 +1,1470 @@ +// +// Autogenerated by Thrift Compiler (0.19.0) +// +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// +const thrift = require('thrift'); +const Thrift = thrift.Thrift; +const Int64 = require('node-int64'); + +const common_ttypes = require('./common_types'); + + +const ttypes = require('./graph_types'); +//HELPER FUNCTIONS AND STRUCTURES + +const GraphService_authenticate_args = class { + constructor(args) { + this.username = null; + this.password = null; + if (args) { + if (args.username !== undefined && args.username !== null) { + this.username = args.username; + } + if (args.password !== undefined && args.password !== null) { + this.password = args.password; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRING) { + this.username = input.readString(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.password = input.readString(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_authenticate_args'); + if (this.username !== null && this.username !== undefined) { + output.writeFieldBegin('username', Thrift.Type.STRING, 1); + output.writeString(this.username); + output.writeFieldEnd(); + } + if (this.password !== null && this.password !== undefined) { + output.writeFieldBegin('password', Thrift.Type.STRING, 2); + output.writeString(this.password); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_authenticate_result = class { + constructor(args) { + this.success = null; + if (args) { + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.AuthResponse(args.success); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 0: + if (ftype == Thrift.Type.STRUCT) { + this.success = new ttypes.AuthResponse(); + this.success.read(input); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_authenticate_result'); + if (this.success !== null && this.success !== undefined) { + output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); + this.success.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_signout_args = class { + constructor(args) { + this.sessionId = null; + if (args) { + if (args.sessionId !== undefined && args.sessionId !== null) { + this.sessionId = args.sessionId; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I64) { + this.sessionId = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_signout_args'); + if (this.sessionId !== null && this.sessionId !== undefined) { + output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); + output.writeI64(this.sessionId); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_signout_result = class { + constructor(args) { + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + if (ftype == Thrift.Type.STOP) { + break; + } + input.skip(ftype); + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_signout_result'); + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_execute_args = class { + constructor(args) { + this.sessionId = null; + this.stmt = null; + if (args) { + if (args.sessionId !== undefined && args.sessionId !== null) { + this.sessionId = args.sessionId; + } + if (args.stmt !== undefined && args.stmt !== null) { + this.stmt = args.stmt; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I64) { + this.sessionId = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.stmt = input.readBinary(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_execute_args'); + if (this.sessionId !== null && this.sessionId !== undefined) { + output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); + output.writeI64(this.sessionId); + output.writeFieldEnd(); + } + if (this.stmt !== null && this.stmt !== undefined) { + output.writeFieldBegin('stmt', Thrift.Type.STRING, 2); + output.writeBinary(this.stmt); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_execute_result = class { + constructor(args) { + this.success = null; + if (args) { + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.ExecutionResponse(args.success); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 0: + if (ftype == Thrift.Type.STRUCT) { + this.success = new ttypes.ExecutionResponse(); + this.success.read(input); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_execute_result'); + if (this.success !== null && this.success !== undefined) { + output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); + this.success.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_executeWithParameter_args = class { + constructor(args) { + this.sessionId = null; + this.stmt = null; + this.parameterMap = null; + if (args) { + if (args.sessionId !== undefined && args.sessionId !== null) { + this.sessionId = args.sessionId; + } + if (args.stmt !== undefined && args.stmt !== null) { + this.stmt = args.stmt; + } + if (args.parameterMap !== undefined && args.parameterMap !== null) { + this.parameterMap = Thrift.copyMap(args.parameterMap, [common_ttypes.Value]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I64) { + this.sessionId = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.stmt = input.readBinary(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.MAP) { + this.parameterMap = {}; + const _rtmp335 = input.readMapBegin(); + const _size34 = _rtmp335.size || 0; + for (let _i36 = 0; _i36 < _size34; ++_i36) { + let key37 = null; + let val38 = null; + key37 = input.readString(); + val38 = new common_ttypes.Value(); + val38.read(input); + this.parameterMap[key37] = val38; + } + input.readMapEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_executeWithParameter_args'); + if (this.sessionId !== null && this.sessionId !== undefined) { + output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); + output.writeI64(this.sessionId); + output.writeFieldEnd(); + } + if (this.stmt !== null && this.stmt !== undefined) { + output.writeFieldBegin('stmt', Thrift.Type.STRING, 2); + output.writeBinary(this.stmt); + output.writeFieldEnd(); + } + if (this.parameterMap !== null && this.parameterMap !== undefined) { + output.writeFieldBegin('parameterMap', Thrift.Type.MAP, 3); + output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.parameterMap)); + for (let kiter39 in this.parameterMap) { + if (this.parameterMap.hasOwnProperty(kiter39)) { + let viter40 = this.parameterMap[kiter39]; + output.writeString(kiter39); + viter40.write(output); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_executeWithParameter_result = class { + constructor(args) { + this.success = null; + if (args) { + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.ExecutionResponse(args.success); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 0: + if (ftype == Thrift.Type.STRUCT) { + this.success = new ttypes.ExecutionResponse(); + this.success.read(input); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_executeWithParameter_result'); + if (this.success !== null && this.success !== undefined) { + output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); + this.success.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_executeJson_args = class { + constructor(args) { + this.sessionId = null; + this.stmt = null; + if (args) { + if (args.sessionId !== undefined && args.sessionId !== null) { + this.sessionId = args.sessionId; + } + if (args.stmt !== undefined && args.stmt !== null) { + this.stmt = args.stmt; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I64) { + this.sessionId = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.stmt = input.readBinary(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_executeJson_args'); + if (this.sessionId !== null && this.sessionId !== undefined) { + output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); + output.writeI64(this.sessionId); + output.writeFieldEnd(); + } + if (this.stmt !== null && this.stmt !== undefined) { + output.writeFieldBegin('stmt', Thrift.Type.STRING, 2); + output.writeBinary(this.stmt); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_executeJson_result = class { + constructor(args) { + this.success = null; + if (args) { + if (args.success !== undefined && args.success !== null) { + this.success = args.success; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 0: + if (ftype == Thrift.Type.STRING) { + this.success = input.readBinary(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_executeJson_result'); + if (this.success !== null && this.success !== undefined) { + output.writeFieldBegin('success', Thrift.Type.STRING, 0); + output.writeBinary(this.success); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_executeJsonWithParameter_args = class { + constructor(args) { + this.sessionId = null; + this.stmt = null; + this.parameterMap = null; + if (args) { + if (args.sessionId !== undefined && args.sessionId !== null) { + this.sessionId = args.sessionId; + } + if (args.stmt !== undefined && args.stmt !== null) { + this.stmt = args.stmt; + } + if (args.parameterMap !== undefined && args.parameterMap !== null) { + this.parameterMap = Thrift.copyMap(args.parameterMap, [common_ttypes.Value]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I64) { + this.sessionId = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.stmt = input.readBinary(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.MAP) { + this.parameterMap = {}; + const _rtmp342 = input.readMapBegin(); + const _size41 = _rtmp342.size || 0; + for (let _i43 = 0; _i43 < _size41; ++_i43) { + let key44 = null; + let val45 = null; + key44 = input.readBinary(); + val45 = new common_ttypes.Value(); + val45.read(input); + this.parameterMap[key44] = val45; + } + input.readMapEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_executeJsonWithParameter_args'); + if (this.sessionId !== null && this.sessionId !== undefined) { + output.writeFieldBegin('sessionId', Thrift.Type.I64, 1); + output.writeI64(this.sessionId); + output.writeFieldEnd(); + } + if (this.stmt !== null && this.stmt !== undefined) { + output.writeFieldBegin('stmt', Thrift.Type.STRING, 2); + output.writeBinary(this.stmt); + output.writeFieldEnd(); + } + if (this.parameterMap !== null && this.parameterMap !== undefined) { + output.writeFieldBegin('parameterMap', Thrift.Type.MAP, 3); + output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.parameterMap)); + for (let kiter46 in this.parameterMap) { + if (this.parameterMap.hasOwnProperty(kiter46)) { + let viter47 = this.parameterMap[kiter46]; + output.writeBinary(kiter46); + viter47.write(output); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_executeJsonWithParameter_result = class { + constructor(args) { + this.success = null; + if (args) { + if (args.success !== undefined && args.success !== null) { + this.success = args.success; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 0: + if (ftype == Thrift.Type.STRING) { + this.success = input.readBinary(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_executeJsonWithParameter_result'); + if (this.success !== null && this.success !== undefined) { + output.writeFieldBegin('success', Thrift.Type.STRING, 0); + output.writeBinary(this.success); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_verifyClientVersion_args = class { + constructor(args) { + this.req = null; + if (args) { + if (args.req !== undefined && args.req !== null) { + this.req = new ttypes.VerifyClientVersionReq(args.req); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRUCT) { + this.req = new ttypes.VerifyClientVersionReq(); + this.req.read(input); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_verifyClientVersion_args'); + if (this.req !== null && this.req !== undefined) { + output.writeFieldBegin('req', Thrift.Type.STRUCT, 1); + this.req.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphService_verifyClientVersion_result = class { + constructor(args) { + this.success = null; + if (args) { + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.VerifyClientVersionResp(args.success); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 0: + if (ftype == Thrift.Type.STRUCT) { + this.success = new ttypes.VerifyClientVersionResp(); + this.success.read(input); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('GraphService_verifyClientVersion_result'); + if (this.success !== null && this.success !== undefined) { + output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); + this.success.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const GraphServiceClient = exports.Client = class GraphServiceClient { + constructor(output, pClass) { + this.output = output; + this.pClass = pClass; + this._seqid = 0; + this._reqs = {}; + } + seqid () { return this._seqid; } + new_seqid () { return this._seqid += 1; } + + authenticate (username, password) { + this._seqid = this.new_seqid(); + const self = this; + return new Promise((resolve, reject) => { + self._reqs[self.seqid()] = (error, result) => { + return error ? reject(error) : resolve(result); + }; + self.send_authenticate(username, password); + }); + } + + send_authenticate (username, password) { + const output = new this.pClass(this.output); + const params = { + username: username, + password: password + }; + const args = new GraphService_authenticate_args(params); + try { + output.writeMessageBegin('authenticate', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); + } + catch (e) { + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); + } + throw e; + } + } + + recv_authenticate (input, mtype, rseqid) { + const callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; + if (mtype == Thrift.MessageType.EXCEPTION) { + const x = new Thrift.TApplicationException(); + x.read(input); + input.readMessageEnd(); + return callback(x); + } + const result = new GraphService_authenticate_result(); + result.read(input); + input.readMessageEnd(); + + if (null !== result.success) { + return callback(null, result.success); + } + return callback('authenticate failed: unknown result'); + } + + signout (sessionId) { + this._seqid = this.new_seqid(); + const self = this; + return new Promise((resolve, reject) => { + self._reqs[self.seqid()] = (error, result) => { + return error ? reject(error) : resolve(result); + }; + self.send_signout(sessionId); + }); + } + + send_signout (sessionId) { + const output = new this.pClass(this.output); + const params = { + sessionId: sessionId + }; + const args = new GraphService_signout_args(params); + try { + output.writeMessageBegin('signout', Thrift.MessageType.ONEWAY, this.seqid()); + args.write(output); + output.writeMessageEnd(); + this.output.flush(); + const callback = this._reqs[this.seqid()] || function() {}; + delete this._reqs[this.seqid()]; + callback(null); + } + catch (e) { + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); + } + throw e; + } + } + + execute (sessionId, stmt) { + this._seqid = this.new_seqid(); + const self = this; + return new Promise((resolve, reject) => { + self._reqs[self.seqid()] = (error, result) => { + return error ? reject(error) : resolve(result); + }; + self.send_execute(sessionId, stmt); + }); + } + + send_execute (sessionId, stmt) { + const output = new this.pClass(this.output); + const params = { + sessionId: sessionId, + stmt: stmt + }; + const args = new GraphService_execute_args(params); + try { + output.writeMessageBegin('execute', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); + } + catch (e) { + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); + } + throw e; + } + } + + recv_execute (input, mtype, rseqid) { + const callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; + if (mtype == Thrift.MessageType.EXCEPTION) { + const x = new Thrift.TApplicationException(); + x.read(input); + input.readMessageEnd(); + return callback(x); + } + const result = new GraphService_execute_result(); + result.read(input); + input.readMessageEnd(); + + if (null !== result.success) { + return callback(null, result.success); + } + return callback('execute failed: unknown result'); + } + + executeWithParameter (sessionId, stmt, parameterMap) { + this._seqid = this.new_seqid(); + const self = this; + return new Promise((resolve, reject) => { + self._reqs[self.seqid()] = (error, result) => { + return error ? reject(error) : resolve(result); + }; + self.send_executeWithParameter(sessionId, stmt, parameterMap); + }); + } + + send_executeWithParameter (sessionId, stmt, parameterMap) { + const output = new this.pClass(this.output); + const params = { + sessionId: sessionId, + stmt: stmt, + parameterMap: parameterMap + }; + const args = new GraphService_executeWithParameter_args(params); + try { + output.writeMessageBegin('executeWithParameter', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); + } + catch (e) { + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); + } + throw e; + } + } + + recv_executeWithParameter (input, mtype, rseqid) { + const callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; + if (mtype == Thrift.MessageType.EXCEPTION) { + const x = new Thrift.TApplicationException(); + x.read(input); + input.readMessageEnd(); + return callback(x); + } + const result = new GraphService_executeWithParameter_result(); + result.read(input); + input.readMessageEnd(); + + if (null !== result.success) { + return callback(null, result.success); + } + return callback('executeWithParameter failed: unknown result'); + } + + executeJson (sessionId, stmt) { + this._seqid = this.new_seqid(); + const self = this; + return new Promise((resolve, reject) => { + self._reqs[self.seqid()] = (error, result) => { + return error ? reject(error) : resolve(result); + }; + self.send_executeJson(sessionId, stmt); + }); + } + + send_executeJson (sessionId, stmt) { + const output = new this.pClass(this.output); + const params = { + sessionId: sessionId, + stmt: stmt + }; + const args = new GraphService_executeJson_args(params); + try { + output.writeMessageBegin('executeJson', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); + } + catch (e) { + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); + } + throw e; + } + } + + recv_executeJson (input, mtype, rseqid) { + const callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; + if (mtype == Thrift.MessageType.EXCEPTION) { + const x = new Thrift.TApplicationException(); + x.read(input); + input.readMessageEnd(); + return callback(x); + } + const result = new GraphService_executeJson_result(); + result.read(input); + input.readMessageEnd(); + + if (null !== result.success) { + return callback(null, result.success); + } + return callback('executeJson failed: unknown result'); + } + + executeJsonWithParameter (sessionId, stmt, parameterMap) { + this._seqid = this.new_seqid(); + const self = this; + return new Promise((resolve, reject) => { + self._reqs[self.seqid()] = (error, result) => { + return error ? reject(error) : resolve(result); + }; + self.send_executeJsonWithParameter(sessionId, stmt, parameterMap); + }); + } + + send_executeJsonWithParameter (sessionId, stmt, parameterMap) { + const output = new this.pClass(this.output); + const params = { + sessionId: sessionId, + stmt: stmt, + parameterMap: parameterMap + }; + const args = new GraphService_executeJsonWithParameter_args(params); + try { + output.writeMessageBegin('executeJsonWithParameter', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); + } + catch (e) { + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); + } + throw e; + } + } + + recv_executeJsonWithParameter (input, mtype, rseqid) { + const callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; + if (mtype == Thrift.MessageType.EXCEPTION) { + const x = new Thrift.TApplicationException(); + x.read(input); + input.readMessageEnd(); + return callback(x); + } + const result = new GraphService_executeJsonWithParameter_result(); + result.read(input); + input.readMessageEnd(); + + if (null !== result.success) { + return callback(null, result.success); + } + return callback('executeJsonWithParameter failed: unknown result'); + } + + verifyClientVersion (req) { + this._seqid = this.new_seqid(); + const self = this; + return new Promise((resolve, reject) => { + self._reqs[self.seqid()] = (error, result) => { + return error ? reject(error) : resolve(result); + }; + self.send_verifyClientVersion(req); + }); + } + + send_verifyClientVersion (req) { + const output = new this.pClass(this.output); + const params = { + req: req + }; + const args = new GraphService_verifyClientVersion_args(params); + try { + output.writeMessageBegin('verifyClientVersion', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); + } + catch (e) { + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); + } + throw e; + } + } + + recv_verifyClientVersion (input, mtype, rseqid) { + const callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; + if (mtype == Thrift.MessageType.EXCEPTION) { + const x = new Thrift.TApplicationException(); + x.read(input); + input.readMessageEnd(); + return callback(x); + } + const result = new GraphService_verifyClientVersion_result(); + result.read(input); + input.readMessageEnd(); + + if (null !== result.success) { + return callback(null, result.success); + } + return callback('verifyClientVersion failed: unknown result'); + } +}; +const GraphServiceProcessor = exports.Processor = class GraphServiceProcessor { + constructor(handler) { + this._handler = handler; + } + process (input, output) { + const r = input.readMessageBegin(); + if (this['process_' + r.fname]) { + return this['process_' + r.fname].call(this, r.rseqid, input, output); + } else { + input.skip(Thrift.Type.STRUCT); + input.readMessageEnd(); + const x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname); + output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid); + x.write(output); + output.writeMessageEnd(); + output.flush(); + } + } + process_authenticate (seqid, input, output) { + const args = new GraphService_authenticate_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.authenticate.length === 2) { + new Promise((resolve) => resolve(this._handler.authenticate.bind(this._handler)( + args.username, + args.password + ))).then(result => { + const result_obj = new GraphService_authenticate_result({success: result}); + output.writeMessageBegin("authenticate", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(err => { + let result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("authenticate", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.authenticate(args.username, args.password, (err, result) => { + let result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new GraphService_authenticate_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("authenticate", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("authenticate", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } + } + process_signout (seqid, input, output) { + const args = new GraphService_signout_args(); + args.read(input); + input.readMessageEnd(); + this._handler.signout(args.sessionId); + } + process_execute (seqid, input, output) { + const args = new GraphService_execute_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.execute.length === 2) { + new Promise((resolve) => resolve(this._handler.execute.bind(this._handler)( + args.sessionId, + args.stmt + ))).then(result => { + const result_obj = new GraphService_execute_result({success: result}); + output.writeMessageBegin("execute", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(err => { + let result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("execute", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.execute(args.sessionId, args.stmt, (err, result) => { + let result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new GraphService_execute_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("execute", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("execute", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } + } + process_executeWithParameter (seqid, input, output) { + const args = new GraphService_executeWithParameter_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.executeWithParameter.length === 3) { + new Promise((resolve) => resolve(this._handler.executeWithParameter.bind(this._handler)( + args.sessionId, + args.stmt, + args.parameterMap + ))).then(result => { + const result_obj = new GraphService_executeWithParameter_result({success: result}); + output.writeMessageBegin("executeWithParameter", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(err => { + let result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("executeWithParameter", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.executeWithParameter(args.sessionId, args.stmt, args.parameterMap, (err, result) => { + let result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new GraphService_executeWithParameter_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("executeWithParameter", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("executeWithParameter", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } + } + process_executeJson (seqid, input, output) { + const args = new GraphService_executeJson_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.executeJson.length === 2) { + new Promise((resolve) => resolve(this._handler.executeJson.bind(this._handler)( + args.sessionId, + args.stmt + ))).then(result => { + const result_obj = new GraphService_executeJson_result({success: result}); + output.writeMessageBegin("executeJson", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(err => { + let result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("executeJson", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.executeJson(args.sessionId, args.stmt, (err, result) => { + let result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new GraphService_executeJson_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("executeJson", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("executeJson", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } + } + process_executeJsonWithParameter (seqid, input, output) { + const args = new GraphService_executeJsonWithParameter_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.executeJsonWithParameter.length === 3) { + new Promise((resolve) => resolve(this._handler.executeJsonWithParameter.bind(this._handler)( + args.sessionId, + args.stmt, + args.parameterMap + ))).then(result => { + const result_obj = new GraphService_executeJsonWithParameter_result({success: result}); + output.writeMessageBegin("executeJsonWithParameter", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(err => { + let result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("executeJsonWithParameter", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.executeJsonWithParameter(args.sessionId, args.stmt, args.parameterMap, (err, result) => { + let result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new GraphService_executeJsonWithParameter_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("executeJsonWithParameter", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("executeJsonWithParameter", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } + } + process_verifyClientVersion (seqid, input, output) { + const args = new GraphService_verifyClientVersion_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.verifyClientVersion.length === 1) { + new Promise((resolve) => resolve(this._handler.verifyClientVersion.bind(this._handler)( + args.req + ))).then(result => { + const result_obj = new GraphService_verifyClientVersion_result({success: result}); + output.writeMessageBegin("verifyClientVersion", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(err => { + let result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyClientVersion", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.verifyClientVersion(args.req, (err, result) => { + let result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new GraphService_verifyClientVersion_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("verifyClientVersion", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyClientVersion", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } + } +}; diff --git a/src/nebula/services/common_types.d.ts b/src/nebula/services/common_types.d.ts new file mode 100644 index 0000000..dfd6871 --- /dev/null +++ b/src/nebula/services/common_types.d.ts @@ -0,0 +1,409 @@ +// +// Autogenerated by Thrift Compiler (0.19.0) +// +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// +import thrift = require('thrift'); +import Thrift = thrift.Thrift; +import Q = thrift.Q; +import Int64 = require('node-int64'); + + +declare enum NullType { + __NULL__ = 0, + NaN = 1, + BAD_DATA = 2, + BAD_TYPE = 3, + ERR_OVERFLOW = 4, + UNKNOWN_PROP = 5, + DIV_BY_ZERO = 6, + OUT_OF_RANGE = 7, +} + +declare enum PropertyType { + UNKNOWN = 0, + BOOL = 1, + INT64 = 2, + VID = 3, + FLOAT = 4, + DOUBLE = 5, + STRING = 6, + FIXED_STRING = 7, + INT8 = 8, + INT16 = 9, + INT32 = 10, + TIMESTAMP = 21, + DURATION = 23, + DATE = 24, + DATETIME = 25, + TIME = 26, + GEOGRAPHY = 31, +} + +declare enum ErrorCode { + SUCCEEDED = 0, + E_DISCONNECTED = -1, + E_FAIL_TO_CONNECT = -2, + E_RPC_FAILURE = -3, + E_LEADER_CHANGED = -4, + E_SPACE_NOT_FOUND = -5, + E_TAG_NOT_FOUND = -6, + E_EDGE_NOT_FOUND = -7, + E_INDEX_NOT_FOUND = -8, + E_EDGE_PROP_NOT_FOUND = -9, + E_TAG_PROP_NOT_FOUND = -10, + E_ROLE_NOT_FOUND = -11, + E_CONFIG_NOT_FOUND = -12, + E_MACHINE_NOT_FOUND = -13, + E_ZONE_NOT_FOUND = -14, + E_LISTENER_NOT_FOUND = -15, + E_PART_NOT_FOUND = -16, + E_KEY_NOT_FOUND = -17, + E_USER_NOT_FOUND = -18, + E_STATS_NOT_FOUND = -19, + E_SERVICE_NOT_FOUND = -20, + E_BACKUP_FAILED = -24, + E_BACKUP_EMPTY_TABLE = -25, + E_BACKUP_TABLE_FAILED = -26, + E_PARTIAL_RESULT = -27, + E_REBUILD_INDEX_FAILED = -28, + E_INVALID_PASSWORD = -29, + E_FAILED_GET_ABS_PATH = -30, + E_BAD_USERNAME_PASSWORD = -1001, + E_SESSION_INVALID = -1002, + E_SESSION_TIMEOUT = -1003, + E_SYNTAX_ERROR = -1004, + E_EXECUTION_ERROR = -1005, + E_STATEMENT_EMPTY = -1006, + E_BAD_PERMISSION = -1008, + E_SEMANTIC_ERROR = -1009, + E_TOO_MANY_CONNECTIONS = -1010, + E_PARTIAL_SUCCEEDED = -1011, + E_NO_HOSTS = -2001, + E_EXISTED = -2002, + E_INVALID_HOST = -2003, + E_UNSUPPORTED = -2004, + E_NOT_DROP = -2005, + E_BALANCER_RUNNING = -2006, + E_CONFIG_IMMUTABLE = -2007, + E_CONFLICT = -2008, + E_INVALID_PARM = -2009, + E_WRONGCLUSTER = -2010, + E_ZONE_NOT_ENOUGH = -2011, + E_ZONE_IS_EMPTY = -2012, + E_STORE_FAILURE = -2021, + E_STORE_SEGMENT_ILLEGAL = -2022, + E_BAD_BALANCE_PLAN = -2023, + E_BALANCED = -2024, + E_NO_RUNNING_BALANCE_PLAN = -2025, + E_NO_VALID_HOST = -2026, + E_CORRUPTED_BALANCE_PLAN = -2027, + E_NO_INVALID_BALANCE_PLAN = -2028, + E_IMPROPER_ROLE = -2030, + E_INVALID_PARTITION_NUM = -2031, + E_INVALID_REPLICA_FACTOR = -2032, + E_INVALID_CHARSET = -2033, + E_INVALID_COLLATE = -2034, + E_CHARSET_COLLATE_NOT_MATCH = -2035, + E_SNAPSHOT_FAILURE = -2040, + E_BLOCK_WRITE_FAILURE = -2041, + E_REBUILD_INDEX_FAILURE = -2042, + E_INDEX_WITH_TTL = -2043, + E_ADD_JOB_FAILURE = -2044, + E_STOP_JOB_FAILURE = -2045, + E_SAVE_JOB_FAILURE = -2046, + E_BALANCER_FAILURE = -2047, + E_JOB_NOT_FINISHED = -2048, + E_TASK_REPORT_OUT_DATE = -2049, + E_JOB_NOT_IN_SPACE = -2050, + E_JOB_NEED_RECOVER = -2051, + E_INVALID_JOB = -2065, + E_BACKUP_BUILDING_INDEX = -2066, + E_BACKUP_SPACE_NOT_FOUND = -2067, + E_RESTORE_FAILURE = -2068, + E_SESSION_NOT_FOUND = -2069, + E_LIST_CLUSTER_FAILURE = -2070, + E_LIST_CLUSTER_GET_ABS_PATH_FAILURE = -2071, + E_LIST_CLUSTER_NO_AGENT_FAILURE = -2072, + E_QUERY_NOT_FOUND = -2073, + E_AGENT_HB_FAILUE = -2074, + E_CONSENSUS_ERROR = -3001, + E_KEY_HAS_EXISTS = -3002, + E_DATA_TYPE_MISMATCH = -3003, + E_INVALID_FIELD_VALUE = -3004, + E_INVALID_OPERATION = -3005, + E_NOT_NULLABLE = -3006, + E_FIELD_UNSET = -3007, + E_OUT_OF_RANGE = -3008, + E_DATA_CONFLICT_ERROR = -3010, + E_WRITE_STALLED = -3011, + E_IMPROPER_DATA_TYPE = -3021, + E_INVALID_SPACEVIDLEN = -3022, + E_INVALID_FILTER = -3031, + E_INVALID_UPDATER = -3032, + E_INVALID_STORE = -3033, + E_INVALID_PEER = -3034, + E_RETRY_EXHAUSTED = -3035, + E_TRANSFER_LEADER_FAILED = -3036, + E_INVALID_STAT_TYPE = -3037, + E_INVALID_VID = -3038, + E_NO_TRANSFORMED = -3039, + E_LOAD_META_FAILED = -3040, + E_FAILED_TO_CHECKPOINT = -3041, + E_CHECKPOINT_BLOCKED = -3042, + E_FILTER_OUT = -3043, + E_INVALID_DATA = -3044, + E_MUTATE_EDGE_CONFLICT = -3045, + E_MUTATE_TAG_CONFLICT = -3046, + E_OUTDATED_LOCK = -3047, + E_INVALID_TASK_PARA = -3051, + E_USER_CANCEL = -3052, + E_TASK_EXECUTION_FAILED = -3053, + E_PLAN_IS_KILLED = -3060, + E_NO_TERM = -3070, + E_OUTDATED_TERM = -3071, + E_OUTDATED_EDGE = -3072, + E_WRITE_WRITE_CONFLICT = -3073, + E_CLIENT_SERVER_INCOMPATIBLE = -3061, + E_ID_FAILED = -3062, + E_RAFT_UNKNOWN_PART = -3500, + E_RAFT_LOG_GAP = -3501, + E_RAFT_LOG_STALE = -3502, + E_RAFT_TERM_OUT_OF_DATE = -3503, + E_RAFT_UNKNOWN_APPEND_LOG = -3504, + E_RAFT_WAITING_SNAPSHOT = -3511, + E_RAFT_SENDING_SNAPSHOT = -3512, + E_RAFT_INVALID_PEER = -3513, + E_RAFT_NOT_READY = -3514, + E_RAFT_STOPPED = -3515, + E_RAFT_BAD_ROLE = -3516, + E_RAFT_WAL_FAIL = -3521, + E_RAFT_HOST_STOPPED = -3522, + E_RAFT_TOO_MANY_REQUESTS = -3523, + E_RAFT_PERSIST_SNAPSHOT_FAILED = -3524, + E_RAFT_RPC_EXCEPTION = -3525, + E_RAFT_NO_WAL_FOUND = -3526, + E_RAFT_HOST_PAUSED = -3527, + E_RAFT_WRITE_BLOCKED = -3528, + E_RAFT_BUFFER_OVERFLOW = -3529, + E_RAFT_ATOMIC_OP_FAILED = -3530, + E_LEADER_LEASE_FAILED = -3531, + E_UNKNOWN = -8000, +} + +declare class SchemaID { + public tag_id?: number; + public edge_type?: number; + + constructor(args?: { tag_id?: number; edge_type?: number; }); + } + +declare class Date { + public year: number; + public month: any; + public day: any; + + constructor(args?: { year: number; month: any; day: any; }); + } + +declare class Time { + public hour: any; + public minute: any; + public sec: any; + public microsec: number; + + constructor(args?: { hour: any; minute: any; sec: any; microsec: number; }); + } + +declare class DateTime { + public year: number; + public month: any; + public day: any; + public hour: any; + public minute: any; + public sec: any; + public microsec: number; + + constructor(args?: { year: number; month: any; day: any; hour: any; minute: any; sec: any; microsec: number; }); + } + +declare class Value { + public nVal?: NullType; + public bVal?: boolean; + public iVal?: Int64; + public fVal?: number; + public sVal?: string; + public dVal?: Date; + public tVal?: Time; + public dtVal?: DateTime; + public vVal?: Vertex; + public eVal?: Edge; + public pVal?: Path; + public lVal?: NList; + public mVal?: NMap; + public uVal?: NSet; + public gVal?: DataSet; + public ggVal?: Geography; + public duVal?: Duration; + + constructor(args?: { nVal?: NullType; bVal?: boolean; iVal?: Int64; fVal?: number; sVal?: string; dVal?: Date; tVal?: Time; dtVal?: DateTime; vVal?: Vertex; eVal?: Edge; pVal?: Path; lVal?: NList; mVal?: NMap; uVal?: NSet; gVal?: DataSet; ggVal?: Geography; duVal?: Duration; }); + } + +declare class NList { + public values: Value[]; + + constructor(args?: { values: Value[]; }); + } + +declare class NMap { + public kvs: { [k: string]: Value; }; + + constructor(args?: { kvs: { [k: string]: Value; }; }); + } + +declare class NSet { + public values: Value[]; + + constructor(args?: { values: Value[]; }); + } + +declare class Row { + public values: Value[]; + + constructor(args?: { values: Value[]; }); + } + +declare class DataSet { + public column_names: string[]; + public rows: Row[]; + + constructor(args?: { column_names: string[]; rows: Row[]; }); + } + +declare class Coordinate { + public x: number; + public y: number; + + constructor(args?: { x: number; y: number; }); + } + +declare class Point { + public coord: Coordinate; + + constructor(args?: { coord: Coordinate; }); + } + +declare class LineString { + public coordList: Coordinate[]; + + constructor(args?: { coordList: Coordinate[]; }); + } + +declare class Polygon { + public coordListList: Coordinate[][]; + + constructor(args?: { coordListList: Coordinate[][]; }); + } + +declare class Geography { + public ptVal?: Point; + public lsVal?: LineString; + public pgVal?: Polygon; + + constructor(args?: { ptVal?: Point; lsVal?: LineString; pgVal?: Polygon; }); + } + +declare class Tag { + public name: string; + public props: { [k: string]: Value; }; + + constructor(args?: { name: string; props: { [k: string]: Value; }; }); + } + +declare class Vertex { + public vid: Value; + public tags: Tag[]; + + constructor(args?: { vid: Value; tags: Tag[]; }); + } + +declare class Edge { + public src: Value; + public dst: Value; + public type: number; + public name: string; + public ranking: Int64; + public props: { [k: string]: Value; }; + + constructor(args?: { src: Value; dst: Value; type: number; name: string; ranking: Int64; props: { [k: string]: Value; }; }); + } + +declare class Step { + public dst: Vertex; + public type: number; + public name: string; + public ranking: Int64; + public props: { [k: string]: Value; }; + + constructor(args?: { dst: Vertex; type: number; name: string; ranking: Int64; props: { [k: string]: Value; }; }); + } + +declare class Path { + public src: Vertex; + public steps: Step[]; + + constructor(args?: { src: Vertex; steps: Step[]; }); + } + +declare class HostAddr { + public host: string; + public port: number; + + constructor(args?: { host: string; port: number; }); + } + +declare class KeyValue { + public key: string; + public value: string; + + constructor(args?: { key: string; value: string; }); + } + +declare class Duration { + public seconds: Int64; + public microseconds: number; + public months: number; + + constructor(args?: { seconds: Int64; microseconds: number; months: number; }); + } + +declare class LogInfo { + public log_id: Int64; + public term_id: Int64; + + constructor(args?: { log_id: Int64; term_id: Int64; }); + } + +declare class DirInfo { + public root: string; + public data: string[]; + + constructor(args?: { root: string; data: string[]; }); + } + +declare class CheckpointInfo { + public space_id: number; + public parts: { [k: number]: LogInfo; }; + public path: string; + + constructor(args?: { space_id: number; parts: { [k: number]: LogInfo; }; path: string; }); + } + +declare class LogEntry { + public cluster: Int64; + public log_str: string; + + constructor(args?: { cluster: Int64; log_str: string; }); + } + +declare const version: string; diff --git a/src/nebula/services/common_types.js b/src/nebula/services/common_types.js new file mode 100644 index 0000000..44883e7 --- /dev/null +++ b/src/nebula/services/common_types.js @@ -0,0 +1,2845 @@ +// +// Autogenerated by Thrift Compiler (0.19.0) +// +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// +const thrift = require('thrift'); +const Thrift = thrift.Thrift; +const Int64 = require('node-int64'); + + +const ttypes = module.exports = {}; +ttypes.NullType = { + '0' : '__NULL__', + '__NULL__' : 0, + '1' : 'NaN', + 'NaN' : 1, + '2' : 'BAD_DATA', + 'BAD_DATA' : 2, + '3' : 'BAD_TYPE', + 'BAD_TYPE' : 3, + '4' : 'ERR_OVERFLOW', + 'ERR_OVERFLOW' : 4, + '5' : 'UNKNOWN_PROP', + 'UNKNOWN_PROP' : 5, + '6' : 'DIV_BY_ZERO', + 'DIV_BY_ZERO' : 6, + '7' : 'OUT_OF_RANGE', + 'OUT_OF_RANGE' : 7 +}; +ttypes.PropertyType = { + '0' : 'UNKNOWN', + 'UNKNOWN' : 0, + '1' : 'BOOL', + 'BOOL' : 1, + '2' : 'INT64', + 'INT64' : 2, + '3' : 'VID', + 'VID' : 3, + '4' : 'FLOAT', + 'FLOAT' : 4, + '5' : 'DOUBLE', + 'DOUBLE' : 5, + '6' : 'STRING', + 'STRING' : 6, + '7' : 'FIXED_STRING', + 'FIXED_STRING' : 7, + '8' : 'INT8', + 'INT8' : 8, + '9' : 'INT16', + 'INT16' : 9, + '10' : 'INT32', + 'INT32' : 10, + '21' : 'TIMESTAMP', + 'TIMESTAMP' : 21, + '23' : 'DURATION', + 'DURATION' : 23, + '24' : 'DATE', + 'DATE' : 24, + '25' : 'DATETIME', + 'DATETIME' : 25, + '26' : 'TIME', + 'TIME' : 26, + '31' : 'GEOGRAPHY', + 'GEOGRAPHY' : 31 +}; +ttypes.ErrorCode = { + '0' : 'SUCCEEDED', + 'SUCCEEDED' : 0, + '-1' : 'E_DISCONNECTED', + 'E_DISCONNECTED' : -1, + '-2' : 'E_FAIL_TO_CONNECT', + 'E_FAIL_TO_CONNECT' : -2, + '-3' : 'E_RPC_FAILURE', + 'E_RPC_FAILURE' : -3, + '-4' : 'E_LEADER_CHANGED', + 'E_LEADER_CHANGED' : -4, + '-5' : 'E_SPACE_NOT_FOUND', + 'E_SPACE_NOT_FOUND' : -5, + '-6' : 'E_TAG_NOT_FOUND', + 'E_TAG_NOT_FOUND' : -6, + '-7' : 'E_EDGE_NOT_FOUND', + 'E_EDGE_NOT_FOUND' : -7, + '-8' : 'E_INDEX_NOT_FOUND', + 'E_INDEX_NOT_FOUND' : -8, + '-9' : 'E_EDGE_PROP_NOT_FOUND', + 'E_EDGE_PROP_NOT_FOUND' : -9, + '-10' : 'E_TAG_PROP_NOT_FOUND', + 'E_TAG_PROP_NOT_FOUND' : -10, + '-11' : 'E_ROLE_NOT_FOUND', + 'E_ROLE_NOT_FOUND' : -11, + '-12' : 'E_CONFIG_NOT_FOUND', + 'E_CONFIG_NOT_FOUND' : -12, + '-13' : 'E_MACHINE_NOT_FOUND', + 'E_MACHINE_NOT_FOUND' : -13, + '-14' : 'E_ZONE_NOT_FOUND', + 'E_ZONE_NOT_FOUND' : -14, + '-15' : 'E_LISTENER_NOT_FOUND', + 'E_LISTENER_NOT_FOUND' : -15, + '-16' : 'E_PART_NOT_FOUND', + 'E_PART_NOT_FOUND' : -16, + '-17' : 'E_KEY_NOT_FOUND', + 'E_KEY_NOT_FOUND' : -17, + '-18' : 'E_USER_NOT_FOUND', + 'E_USER_NOT_FOUND' : -18, + '-19' : 'E_STATS_NOT_FOUND', + 'E_STATS_NOT_FOUND' : -19, + '-20' : 'E_SERVICE_NOT_FOUND', + 'E_SERVICE_NOT_FOUND' : -20, + '-24' : 'E_BACKUP_FAILED', + 'E_BACKUP_FAILED' : -24, + '-25' : 'E_BACKUP_EMPTY_TABLE', + 'E_BACKUP_EMPTY_TABLE' : -25, + '-26' : 'E_BACKUP_TABLE_FAILED', + 'E_BACKUP_TABLE_FAILED' : -26, + '-27' : 'E_PARTIAL_RESULT', + 'E_PARTIAL_RESULT' : -27, + '-28' : 'E_REBUILD_INDEX_FAILED', + 'E_REBUILD_INDEX_FAILED' : -28, + '-29' : 'E_INVALID_PASSWORD', + 'E_INVALID_PASSWORD' : -29, + '-30' : 'E_FAILED_GET_ABS_PATH', + 'E_FAILED_GET_ABS_PATH' : -30, + '-1001' : 'E_BAD_USERNAME_PASSWORD', + 'E_BAD_USERNAME_PASSWORD' : -1001, + '-1002' : 'E_SESSION_INVALID', + 'E_SESSION_INVALID' : -1002, + '-1003' : 'E_SESSION_TIMEOUT', + 'E_SESSION_TIMEOUT' : -1003, + '-1004' : 'E_SYNTAX_ERROR', + 'E_SYNTAX_ERROR' : -1004, + '-1005' : 'E_EXECUTION_ERROR', + 'E_EXECUTION_ERROR' : -1005, + '-1006' : 'E_STATEMENT_EMPTY', + 'E_STATEMENT_EMPTY' : -1006, + '-1008' : 'E_BAD_PERMISSION', + 'E_BAD_PERMISSION' : -1008, + '-1009' : 'E_SEMANTIC_ERROR', + 'E_SEMANTIC_ERROR' : -1009, + '-1010' : 'E_TOO_MANY_CONNECTIONS', + 'E_TOO_MANY_CONNECTIONS' : -1010, + '-1011' : 'E_PARTIAL_SUCCEEDED', + 'E_PARTIAL_SUCCEEDED' : -1011, + '-2001' : 'E_NO_HOSTS', + 'E_NO_HOSTS' : -2001, + '-2002' : 'E_EXISTED', + 'E_EXISTED' : -2002, + '-2003' : 'E_INVALID_HOST', + 'E_INVALID_HOST' : -2003, + '-2004' : 'E_UNSUPPORTED', + 'E_UNSUPPORTED' : -2004, + '-2005' : 'E_NOT_DROP', + 'E_NOT_DROP' : -2005, + '-2006' : 'E_BALANCER_RUNNING', + 'E_BALANCER_RUNNING' : -2006, + '-2007' : 'E_CONFIG_IMMUTABLE', + 'E_CONFIG_IMMUTABLE' : -2007, + '-2008' : 'E_CONFLICT', + 'E_CONFLICT' : -2008, + '-2009' : 'E_INVALID_PARM', + 'E_INVALID_PARM' : -2009, + '-2010' : 'E_WRONGCLUSTER', + 'E_WRONGCLUSTER' : -2010, + '-2011' : 'E_ZONE_NOT_ENOUGH', + 'E_ZONE_NOT_ENOUGH' : -2011, + '-2012' : 'E_ZONE_IS_EMPTY', + 'E_ZONE_IS_EMPTY' : -2012, + '-2021' : 'E_STORE_FAILURE', + 'E_STORE_FAILURE' : -2021, + '-2022' : 'E_STORE_SEGMENT_ILLEGAL', + 'E_STORE_SEGMENT_ILLEGAL' : -2022, + '-2023' : 'E_BAD_BALANCE_PLAN', + 'E_BAD_BALANCE_PLAN' : -2023, + '-2024' : 'E_BALANCED', + 'E_BALANCED' : -2024, + '-2025' : 'E_NO_RUNNING_BALANCE_PLAN', + 'E_NO_RUNNING_BALANCE_PLAN' : -2025, + '-2026' : 'E_NO_VALID_HOST', + 'E_NO_VALID_HOST' : -2026, + '-2027' : 'E_CORRUPTED_BALANCE_PLAN', + 'E_CORRUPTED_BALANCE_PLAN' : -2027, + '-2028' : 'E_NO_INVALID_BALANCE_PLAN', + 'E_NO_INVALID_BALANCE_PLAN' : -2028, + '-2030' : 'E_IMPROPER_ROLE', + 'E_IMPROPER_ROLE' : -2030, + '-2031' : 'E_INVALID_PARTITION_NUM', + 'E_INVALID_PARTITION_NUM' : -2031, + '-2032' : 'E_INVALID_REPLICA_FACTOR', + 'E_INVALID_REPLICA_FACTOR' : -2032, + '-2033' : 'E_INVALID_CHARSET', + 'E_INVALID_CHARSET' : -2033, + '-2034' : 'E_INVALID_COLLATE', + 'E_INVALID_COLLATE' : -2034, + '-2035' : 'E_CHARSET_COLLATE_NOT_MATCH', + 'E_CHARSET_COLLATE_NOT_MATCH' : -2035, + '-2040' : 'E_SNAPSHOT_FAILURE', + 'E_SNAPSHOT_FAILURE' : -2040, + '-2041' : 'E_BLOCK_WRITE_FAILURE', + 'E_BLOCK_WRITE_FAILURE' : -2041, + '-2042' : 'E_REBUILD_INDEX_FAILURE', + 'E_REBUILD_INDEX_FAILURE' : -2042, + '-2043' : 'E_INDEX_WITH_TTL', + 'E_INDEX_WITH_TTL' : -2043, + '-2044' : 'E_ADD_JOB_FAILURE', + 'E_ADD_JOB_FAILURE' : -2044, + '-2045' : 'E_STOP_JOB_FAILURE', + 'E_STOP_JOB_FAILURE' : -2045, + '-2046' : 'E_SAVE_JOB_FAILURE', + 'E_SAVE_JOB_FAILURE' : -2046, + '-2047' : 'E_BALANCER_FAILURE', + 'E_BALANCER_FAILURE' : -2047, + '-2048' : 'E_JOB_NOT_FINISHED', + 'E_JOB_NOT_FINISHED' : -2048, + '-2049' : 'E_TASK_REPORT_OUT_DATE', + 'E_TASK_REPORT_OUT_DATE' : -2049, + '-2050' : 'E_JOB_NOT_IN_SPACE', + 'E_JOB_NOT_IN_SPACE' : -2050, + '-2051' : 'E_JOB_NEED_RECOVER', + 'E_JOB_NEED_RECOVER' : -2051, + '-2065' : 'E_INVALID_JOB', + 'E_INVALID_JOB' : -2065, + '-2066' : 'E_BACKUP_BUILDING_INDEX', + 'E_BACKUP_BUILDING_INDEX' : -2066, + '-2067' : 'E_BACKUP_SPACE_NOT_FOUND', + 'E_BACKUP_SPACE_NOT_FOUND' : -2067, + '-2068' : 'E_RESTORE_FAILURE', + 'E_RESTORE_FAILURE' : -2068, + '-2069' : 'E_SESSION_NOT_FOUND', + 'E_SESSION_NOT_FOUND' : -2069, + '-2070' : 'E_LIST_CLUSTER_FAILURE', + 'E_LIST_CLUSTER_FAILURE' : -2070, + '-2071' : 'E_LIST_CLUSTER_GET_ABS_PATH_FAILURE', + 'E_LIST_CLUSTER_GET_ABS_PATH_FAILURE' : -2071, + '-2072' : 'E_LIST_CLUSTER_NO_AGENT_FAILURE', + 'E_LIST_CLUSTER_NO_AGENT_FAILURE' : -2072, + '-2073' : 'E_QUERY_NOT_FOUND', + 'E_QUERY_NOT_FOUND' : -2073, + '-2074' : 'E_AGENT_HB_FAILUE', + 'E_AGENT_HB_FAILUE' : -2074, + '-3001' : 'E_CONSENSUS_ERROR', + 'E_CONSENSUS_ERROR' : -3001, + '-3002' : 'E_KEY_HAS_EXISTS', + 'E_KEY_HAS_EXISTS' : -3002, + '-3003' : 'E_DATA_TYPE_MISMATCH', + 'E_DATA_TYPE_MISMATCH' : -3003, + '-3004' : 'E_INVALID_FIELD_VALUE', + 'E_INVALID_FIELD_VALUE' : -3004, + '-3005' : 'E_INVALID_OPERATION', + 'E_INVALID_OPERATION' : -3005, + '-3006' : 'E_NOT_NULLABLE', + 'E_NOT_NULLABLE' : -3006, + '-3007' : 'E_FIELD_UNSET', + 'E_FIELD_UNSET' : -3007, + '-3008' : 'E_OUT_OF_RANGE', + 'E_OUT_OF_RANGE' : -3008, + '-3010' : 'E_DATA_CONFLICT_ERROR', + 'E_DATA_CONFLICT_ERROR' : -3010, + '-3011' : 'E_WRITE_STALLED', + 'E_WRITE_STALLED' : -3011, + '-3021' : 'E_IMPROPER_DATA_TYPE', + 'E_IMPROPER_DATA_TYPE' : -3021, + '-3022' : 'E_INVALID_SPACEVIDLEN', + 'E_INVALID_SPACEVIDLEN' : -3022, + '-3031' : 'E_INVALID_FILTER', + 'E_INVALID_FILTER' : -3031, + '-3032' : 'E_INVALID_UPDATER', + 'E_INVALID_UPDATER' : -3032, + '-3033' : 'E_INVALID_STORE', + 'E_INVALID_STORE' : -3033, + '-3034' : 'E_INVALID_PEER', + 'E_INVALID_PEER' : -3034, + '-3035' : 'E_RETRY_EXHAUSTED', + 'E_RETRY_EXHAUSTED' : -3035, + '-3036' : 'E_TRANSFER_LEADER_FAILED', + 'E_TRANSFER_LEADER_FAILED' : -3036, + '-3037' : 'E_INVALID_STAT_TYPE', + 'E_INVALID_STAT_TYPE' : -3037, + '-3038' : 'E_INVALID_VID', + 'E_INVALID_VID' : -3038, + '-3039' : 'E_NO_TRANSFORMED', + 'E_NO_TRANSFORMED' : -3039, + '-3040' : 'E_LOAD_META_FAILED', + 'E_LOAD_META_FAILED' : -3040, + '-3041' : 'E_FAILED_TO_CHECKPOINT', + 'E_FAILED_TO_CHECKPOINT' : -3041, + '-3042' : 'E_CHECKPOINT_BLOCKED', + 'E_CHECKPOINT_BLOCKED' : -3042, + '-3043' : 'E_FILTER_OUT', + 'E_FILTER_OUT' : -3043, + '-3044' : 'E_INVALID_DATA', + 'E_INVALID_DATA' : -3044, + '-3045' : 'E_MUTATE_EDGE_CONFLICT', + 'E_MUTATE_EDGE_CONFLICT' : -3045, + '-3046' : 'E_MUTATE_TAG_CONFLICT', + 'E_MUTATE_TAG_CONFLICT' : -3046, + '-3047' : 'E_OUTDATED_LOCK', + 'E_OUTDATED_LOCK' : -3047, + '-3051' : 'E_INVALID_TASK_PARA', + 'E_INVALID_TASK_PARA' : -3051, + '-3052' : 'E_USER_CANCEL', + 'E_USER_CANCEL' : -3052, + '-3053' : 'E_TASK_EXECUTION_FAILED', + 'E_TASK_EXECUTION_FAILED' : -3053, + '-3060' : 'E_PLAN_IS_KILLED', + 'E_PLAN_IS_KILLED' : -3060, + '-3070' : 'E_NO_TERM', + 'E_NO_TERM' : -3070, + '-3071' : 'E_OUTDATED_TERM', + 'E_OUTDATED_TERM' : -3071, + '-3072' : 'E_OUTDATED_EDGE', + 'E_OUTDATED_EDGE' : -3072, + '-3073' : 'E_WRITE_WRITE_CONFLICT', + 'E_WRITE_WRITE_CONFLICT' : -3073, + '-3061' : 'E_CLIENT_SERVER_INCOMPATIBLE', + 'E_CLIENT_SERVER_INCOMPATIBLE' : -3061, + '-3062' : 'E_ID_FAILED', + 'E_ID_FAILED' : -3062, + '-3500' : 'E_RAFT_UNKNOWN_PART', + 'E_RAFT_UNKNOWN_PART' : -3500, + '-3501' : 'E_RAFT_LOG_GAP', + 'E_RAFT_LOG_GAP' : -3501, + '-3502' : 'E_RAFT_LOG_STALE', + 'E_RAFT_LOG_STALE' : -3502, + '-3503' : 'E_RAFT_TERM_OUT_OF_DATE', + 'E_RAFT_TERM_OUT_OF_DATE' : -3503, + '-3504' : 'E_RAFT_UNKNOWN_APPEND_LOG', + 'E_RAFT_UNKNOWN_APPEND_LOG' : -3504, + '-3511' : 'E_RAFT_WAITING_SNAPSHOT', + 'E_RAFT_WAITING_SNAPSHOT' : -3511, + '-3512' : 'E_RAFT_SENDING_SNAPSHOT', + 'E_RAFT_SENDING_SNAPSHOT' : -3512, + '-3513' : 'E_RAFT_INVALID_PEER', + 'E_RAFT_INVALID_PEER' : -3513, + '-3514' : 'E_RAFT_NOT_READY', + 'E_RAFT_NOT_READY' : -3514, + '-3515' : 'E_RAFT_STOPPED', + 'E_RAFT_STOPPED' : -3515, + '-3516' : 'E_RAFT_BAD_ROLE', + 'E_RAFT_BAD_ROLE' : -3516, + '-3521' : 'E_RAFT_WAL_FAIL', + 'E_RAFT_WAL_FAIL' : -3521, + '-3522' : 'E_RAFT_HOST_STOPPED', + 'E_RAFT_HOST_STOPPED' : -3522, + '-3523' : 'E_RAFT_TOO_MANY_REQUESTS', + 'E_RAFT_TOO_MANY_REQUESTS' : -3523, + '-3524' : 'E_RAFT_PERSIST_SNAPSHOT_FAILED', + 'E_RAFT_PERSIST_SNAPSHOT_FAILED' : -3524, + '-3525' : 'E_RAFT_RPC_EXCEPTION', + 'E_RAFT_RPC_EXCEPTION' : -3525, + '-3526' : 'E_RAFT_NO_WAL_FOUND', + 'E_RAFT_NO_WAL_FOUND' : -3526, + '-3527' : 'E_RAFT_HOST_PAUSED', + 'E_RAFT_HOST_PAUSED' : -3527, + '-3528' : 'E_RAFT_WRITE_BLOCKED', + 'E_RAFT_WRITE_BLOCKED' : -3528, + '-3529' : 'E_RAFT_BUFFER_OVERFLOW', + 'E_RAFT_BUFFER_OVERFLOW' : -3529, + '-3530' : 'E_RAFT_ATOMIC_OP_FAILED', + 'E_RAFT_ATOMIC_OP_FAILED' : -3530, + '-3531' : 'E_LEADER_LEASE_FAILED', + 'E_LEADER_LEASE_FAILED' : -3531, + '-8000' : 'E_UNKNOWN', + 'E_UNKNOWN' : -8000 +}; +const SchemaID = module.exports.SchemaID = class { + constructor(args) { + this.tag_id = null; + this.edge_type = null; + if (args) { + if (args.tag_id !== undefined && args.tag_id !== null) { + this.tag_id = args.tag_id; + } + if (args.edge_type !== undefined && args.edge_type !== null) { + this.edge_type = args.edge_type; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I32) { + this.tag_id = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.I32) { + this.edge_type = input.readI32(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('SchemaID'); + if (this.tag_id !== null && this.tag_id !== undefined) { + output.writeFieldBegin('tag_id', Thrift.Type.I32, 1); + output.writeI32(this.tag_id); + output.writeFieldEnd(); + } + if (this.edge_type !== null && this.edge_type !== undefined) { + output.writeFieldBegin('edge_type', Thrift.Type.I32, 2); + output.writeI32(this.edge_type); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Date = module.exports.Date = class { + constructor(args) { + this.year = null; + this.month = null; + this.day = null; + if (args) { + if (args.year !== undefined && args.year !== null) { + this.year = args.year; + } + if (args.month !== undefined && args.month !== null) { + this.month = args.month; + } + if (args.day !== undefined && args.day !== null) { + this.day = args.day; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I16) { + this.year = input.readI16(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.BYTE) { + this.month = input.readByte(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.BYTE) { + this.day = input.readByte(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Date'); + if (this.year !== null && this.year !== undefined) { + output.writeFieldBegin('year', Thrift.Type.I16, 1); + output.writeI16(this.year); + output.writeFieldEnd(); + } + if (this.month !== null && this.month !== undefined) { + output.writeFieldBegin('month', Thrift.Type.BYTE, 2); + output.writeByte(this.month); + output.writeFieldEnd(); + } + if (this.day !== null && this.day !== undefined) { + output.writeFieldBegin('day', Thrift.Type.BYTE, 3); + output.writeByte(this.day); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Time = module.exports.Time = class { + constructor(args) { + this.hour = null; + this.minute = null; + this.sec = null; + this.microsec = null; + if (args) { + if (args.hour !== undefined && args.hour !== null) { + this.hour = args.hour; + } + if (args.minute !== undefined && args.minute !== null) { + this.minute = args.minute; + } + if (args.sec !== undefined && args.sec !== null) { + this.sec = args.sec; + } + if (args.microsec !== undefined && args.microsec !== null) { + this.microsec = args.microsec; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.BYTE) { + this.hour = input.readByte(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.BYTE) { + this.minute = input.readByte(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.BYTE) { + this.sec = input.readByte(); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.I32) { + this.microsec = input.readI32(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Time'); + if (this.hour !== null && this.hour !== undefined) { + output.writeFieldBegin('hour', Thrift.Type.BYTE, 1); + output.writeByte(this.hour); + output.writeFieldEnd(); + } + if (this.minute !== null && this.minute !== undefined) { + output.writeFieldBegin('minute', Thrift.Type.BYTE, 2); + output.writeByte(this.minute); + output.writeFieldEnd(); + } + if (this.sec !== null && this.sec !== undefined) { + output.writeFieldBegin('sec', Thrift.Type.BYTE, 3); + output.writeByte(this.sec); + output.writeFieldEnd(); + } + if (this.microsec !== null && this.microsec !== undefined) { + output.writeFieldBegin('microsec', Thrift.Type.I32, 4); + output.writeI32(this.microsec); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const DateTime = module.exports.DateTime = class { + constructor(args) { + this.year = null; + this.month = null; + this.day = null; + this.hour = null; + this.minute = null; + this.sec = null; + this.microsec = null; + if (args) { + if (args.year !== undefined && args.year !== null) { + this.year = args.year; + } + if (args.month !== undefined && args.month !== null) { + this.month = args.month; + } + if (args.day !== undefined && args.day !== null) { + this.day = args.day; + } + if (args.hour !== undefined && args.hour !== null) { + this.hour = args.hour; + } + if (args.minute !== undefined && args.minute !== null) { + this.minute = args.minute; + } + if (args.sec !== undefined && args.sec !== null) { + this.sec = args.sec; + } + if (args.microsec !== undefined && args.microsec !== null) { + this.microsec = args.microsec; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I16) { + this.year = input.readI16(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.BYTE) { + this.month = input.readByte(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.BYTE) { + this.day = input.readByte(); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.BYTE) { + this.hour = input.readByte(); + } else { + input.skip(ftype); + } + break; + case 5: + if (ftype == Thrift.Type.BYTE) { + this.minute = input.readByte(); + } else { + input.skip(ftype); + } + break; + case 6: + if (ftype == Thrift.Type.BYTE) { + this.sec = input.readByte(); + } else { + input.skip(ftype); + } + break; + case 7: + if (ftype == Thrift.Type.I32) { + this.microsec = input.readI32(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('DateTime'); + if (this.year !== null && this.year !== undefined) { + output.writeFieldBegin('year', Thrift.Type.I16, 1); + output.writeI16(this.year); + output.writeFieldEnd(); + } + if (this.month !== null && this.month !== undefined) { + output.writeFieldBegin('month', Thrift.Type.BYTE, 2); + output.writeByte(this.month); + output.writeFieldEnd(); + } + if (this.day !== null && this.day !== undefined) { + output.writeFieldBegin('day', Thrift.Type.BYTE, 3); + output.writeByte(this.day); + output.writeFieldEnd(); + } + if (this.hour !== null && this.hour !== undefined) { + output.writeFieldBegin('hour', Thrift.Type.BYTE, 4); + output.writeByte(this.hour); + output.writeFieldEnd(); + } + if (this.minute !== null && this.minute !== undefined) { + output.writeFieldBegin('minute', Thrift.Type.BYTE, 5); + output.writeByte(this.minute); + output.writeFieldEnd(); + } + if (this.sec !== null && this.sec !== undefined) { + output.writeFieldBegin('sec', Thrift.Type.BYTE, 6); + output.writeByte(this.sec); + output.writeFieldEnd(); + } + if (this.microsec !== null && this.microsec !== undefined) { + output.writeFieldBegin('microsec', Thrift.Type.I32, 7); + output.writeI32(this.microsec); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Value = module.exports.Value = class { + constructor(args) { + this.nVal = null; + this.bVal = null; + this.iVal = null; + this.fVal = null; + this.sVal = null; + this.dVal = null; + this.tVal = null; + this.dtVal = null; + this.vVal = null; + this.eVal = null; + this.pVal = null; + this.lVal = null; + this.mVal = null; + this.uVal = null; + this.gVal = null; + this.ggVal = null; + this.duVal = null; + if (args) { + if (args.nVal !== undefined && args.nVal !== null) { + this.nVal = args.nVal; + } + if (args.bVal !== undefined && args.bVal !== null) { + this.bVal = args.bVal; + } + if (args.iVal !== undefined && args.iVal !== null) { + this.iVal = args.iVal; + } + if (args.fVal !== undefined && args.fVal !== null) { + this.fVal = args.fVal; + } + if (args.sVal !== undefined && args.sVal !== null) { + this.sVal = args.sVal; + } + if (args.dVal !== undefined && args.dVal !== null) { + this.dVal = new ttypes.Date(args.dVal); + } + if (args.tVal !== undefined && args.tVal !== null) { + this.tVal = new ttypes.Time(args.tVal); + } + if (args.dtVal !== undefined && args.dtVal !== null) { + this.dtVal = new ttypes.DateTime(args.dtVal); + } + if (args.vVal !== undefined && args.vVal !== null) { + this.vVal = new ttypes.Vertex(args.vVal); + } + if (args.eVal !== undefined && args.eVal !== null) { + this.eVal = new ttypes.Edge(args.eVal); + } + if (args.pVal !== undefined && args.pVal !== null) { + this.pVal = new ttypes.Path(args.pVal); + } + if (args.lVal !== undefined && args.lVal !== null) { + this.lVal = new ttypes.NList(args.lVal); + } + if (args.mVal !== undefined && args.mVal !== null) { + this.mVal = new ttypes.NMap(args.mVal); + } + if (args.uVal !== undefined && args.uVal !== null) { + this.uVal = new ttypes.NSet(args.uVal); + } + if (args.gVal !== undefined && args.gVal !== null) { + this.gVal = new ttypes.DataSet(args.gVal); + } + if (args.ggVal !== undefined && args.ggVal !== null) { + this.ggVal = new ttypes.Geography(args.ggVal); + } + if (args.duVal !== undefined && args.duVal !== null) { + this.duVal = new ttypes.Duration(args.duVal); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I32) { + this.nVal = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.BOOL) { + this.bVal = input.readBool(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.I64) { + this.iVal = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.DOUBLE) { + this.fVal = input.readDouble(); + } else { + input.skip(ftype); + } + break; + case 5: + if (ftype == Thrift.Type.STRING) { + this.sVal = input.readString(); + } else { + input.skip(ftype); + } + break; + case 6: + if (ftype == Thrift.Type.STRUCT) { + this.dVal = new ttypes.Date(); + this.dVal.read(input); + } else { + input.skip(ftype); + } + break; + case 7: + if (ftype == Thrift.Type.STRUCT) { + this.tVal = new ttypes.Time(); + this.tVal.read(input); + } else { + input.skip(ftype); + } + break; + case 8: + if (ftype == Thrift.Type.STRUCT) { + this.dtVal = new ttypes.DateTime(); + this.dtVal.read(input); + } else { + input.skip(ftype); + } + break; + case 9: + if (ftype == Thrift.Type.STRUCT) { + this.vVal = new ttypes.Vertex(); + this.vVal.read(input); + } else { + input.skip(ftype); + } + break; + case 10: + if (ftype == Thrift.Type.STRUCT) { + this.eVal = new ttypes.Edge(); + this.eVal.read(input); + } else { + input.skip(ftype); + } + break; + case 11: + if (ftype == Thrift.Type.STRUCT) { + this.pVal = new ttypes.Path(); + this.pVal.read(input); + } else { + input.skip(ftype); + } + break; + case 12: + if (ftype == Thrift.Type.STRUCT) { + this.lVal = new ttypes.NList(); + this.lVal.read(input); + } else { + input.skip(ftype); + } + break; + case 13: + if (ftype == Thrift.Type.STRUCT) { + this.mVal = new ttypes.NMap(); + this.mVal.read(input); + } else { + input.skip(ftype); + } + break; + case 14: + if (ftype == Thrift.Type.STRUCT) { + this.uVal = new ttypes.NSet(); + this.uVal.read(input); + } else { + input.skip(ftype); + } + break; + case 15: + if (ftype == Thrift.Type.STRUCT) { + this.gVal = new ttypes.DataSet(); + this.gVal.read(input); + } else { + input.skip(ftype); + } + break; + case 16: + if (ftype == Thrift.Type.STRUCT) { + this.ggVal = new ttypes.Geography(); + this.ggVal.read(input); + } else { + input.skip(ftype); + } + break; + case 17: + if (ftype == Thrift.Type.STRUCT) { + this.duVal = new ttypes.Duration(); + this.duVal.read(input); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Value'); + if (this.nVal !== null && this.nVal !== undefined) { + output.writeFieldBegin('nVal', Thrift.Type.I32, 1); + output.writeI32(this.nVal); + output.writeFieldEnd(); + } + if (this.bVal !== null && this.bVal !== undefined) { + output.writeFieldBegin('bVal', Thrift.Type.BOOL, 2); + output.writeBool(this.bVal); + output.writeFieldEnd(); + } + if (this.iVal !== null && this.iVal !== undefined) { + output.writeFieldBegin('iVal', Thrift.Type.I64, 3); + output.writeI64(this.iVal); + output.writeFieldEnd(); + } + if (this.fVal !== null && this.fVal !== undefined) { + output.writeFieldBegin('fVal', Thrift.Type.DOUBLE, 4); + output.writeDouble(this.fVal); + output.writeFieldEnd(); + } + if (this.sVal !== null && this.sVal !== undefined) { + output.writeFieldBegin('sVal', Thrift.Type.STRING, 5); + output.writeString(this.sVal); + output.writeFieldEnd(); + } + if (this.dVal !== null && this.dVal !== undefined) { + output.writeFieldBegin('dVal', Thrift.Type.STRUCT, 6); + this.dVal.write(output); + output.writeFieldEnd(); + } + if (this.tVal !== null && this.tVal !== undefined) { + output.writeFieldBegin('tVal', Thrift.Type.STRUCT, 7); + this.tVal.write(output); + output.writeFieldEnd(); + } + if (this.dtVal !== null && this.dtVal !== undefined) { + output.writeFieldBegin('dtVal', Thrift.Type.STRUCT, 8); + this.dtVal.write(output); + output.writeFieldEnd(); + } + if (this.vVal !== null && this.vVal !== undefined) { + output.writeFieldBegin('vVal', Thrift.Type.STRUCT, 9); + this.vVal.write(output); + output.writeFieldEnd(); + } + if (this.eVal !== null && this.eVal !== undefined) { + output.writeFieldBegin('eVal', Thrift.Type.STRUCT, 10); + this.eVal.write(output); + output.writeFieldEnd(); + } + if (this.pVal !== null && this.pVal !== undefined) { + output.writeFieldBegin('pVal', Thrift.Type.STRUCT, 11); + this.pVal.write(output); + output.writeFieldEnd(); + } + if (this.lVal !== null && this.lVal !== undefined) { + output.writeFieldBegin('lVal', Thrift.Type.STRUCT, 12); + this.lVal.write(output); + output.writeFieldEnd(); + } + if (this.mVal !== null && this.mVal !== undefined) { + output.writeFieldBegin('mVal', Thrift.Type.STRUCT, 13); + this.mVal.write(output); + output.writeFieldEnd(); + } + if (this.uVal !== null && this.uVal !== undefined) { + output.writeFieldBegin('uVal', Thrift.Type.STRUCT, 14); + this.uVal.write(output); + output.writeFieldEnd(); + } + if (this.gVal !== null && this.gVal !== undefined) { + output.writeFieldBegin('gVal', Thrift.Type.STRUCT, 15); + this.gVal.write(output); + output.writeFieldEnd(); + } + if (this.ggVal !== null && this.ggVal !== undefined) { + output.writeFieldBegin('ggVal', Thrift.Type.STRUCT, 16); + this.ggVal.write(output); + output.writeFieldEnd(); + } + if (this.duVal !== null && this.duVal !== undefined) { + output.writeFieldBegin('duVal', Thrift.Type.STRUCT, 17); + this.duVal.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const NList = module.exports.NList = class { + constructor(args) { + this.values = null; + if (args) { + if (args.values !== undefined && args.values !== null) { + this.values = Thrift.copyList(args.values, [ttypes.Value]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.LIST) { + this.values = []; + const _rtmp31 = input.readListBegin(); + const _size0 = _rtmp31.size || 0; + for (let _i2 = 0; _i2 < _size0; ++_i2) { + let elem3 = null; + elem3 = new ttypes.Value(); + elem3.read(input); + this.values.push(elem3); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('NList'); + if (this.values !== null && this.values !== undefined) { + output.writeFieldBegin('values', Thrift.Type.LIST, 1); + output.writeListBegin(Thrift.Type.STRUCT, this.values.length); + for (let iter4 in this.values) { + if (this.values.hasOwnProperty(iter4)) { + iter4 = this.values[iter4]; + iter4.write(output); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const NMap = module.exports.NMap = class { + constructor(args) { + this.kvs = null; + if (args) { + if (args.kvs !== undefined && args.kvs !== null) { + this.kvs = Thrift.copyMap(args.kvs, [ttypes.Value]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.MAP) { + this.kvs = {}; + const _rtmp36 = input.readMapBegin(); + const _size5 = _rtmp36.size || 0; + for (let _i7 = 0; _i7 < _size5; ++_i7) { + let key8 = null; + let val9 = null; + key8 = input.readString(); + val9 = new ttypes.Value(); + val9.read(input); + this.kvs[key8] = val9; + } + input.readMapEnd(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('NMap'); + if (this.kvs !== null && this.kvs !== undefined) { + output.writeFieldBegin('kvs', Thrift.Type.MAP, 1); + output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.kvs)); + for (let kiter10 in this.kvs) { + if (this.kvs.hasOwnProperty(kiter10)) { + let viter11 = this.kvs[kiter10]; + output.writeString(kiter10); + viter11.write(output); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const NSet = module.exports.NSet = class { + constructor(args) { + this.values = null; + if (args) { + if (args.values !== undefined && args.values !== null) { + this.values = Thrift.copyList(args.values, [ttypes.Value]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.SET) { + this.values = []; + const _rtmp313 = input.readSetBegin(); + const _size12 = _rtmp313.size || 0; + for (let _i14 = 0; _i14 < _size12; ++_i14) { + let elem15 = null; + elem15 = new ttypes.Value(); + elem15.read(input); + this.values.push(elem15); + } + input.readSetEnd(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('NSet'); + if (this.values !== null && this.values !== undefined) { + output.writeFieldBegin('values', Thrift.Type.SET, 1); + output.writeSetBegin(Thrift.Type.STRUCT, this.values.length); + for (let iter16 in this.values) { + if (this.values.hasOwnProperty(iter16)) { + iter16 = this.values[iter16]; + iter16.write(output); + } + } + output.writeSetEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Row = module.exports.Row = class { + constructor(args) { + this.values = null; + if (args) { + if (args.values !== undefined && args.values !== null) { + this.values = Thrift.copyList(args.values, [ttypes.Value]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.LIST) { + this.values = []; + const _rtmp318 = input.readListBegin(); + const _size17 = _rtmp318.size || 0; + for (let _i19 = 0; _i19 < _size17; ++_i19) { + let elem20 = null; + elem20 = new ttypes.Value(); + elem20.read(input); + this.values.push(elem20); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Row'); + if (this.values !== null && this.values !== undefined) { + output.writeFieldBegin('values', Thrift.Type.LIST, 1); + output.writeListBegin(Thrift.Type.STRUCT, this.values.length); + for (let iter21 in this.values) { + if (this.values.hasOwnProperty(iter21)) { + iter21 = this.values[iter21]; + iter21.write(output); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const DataSet = module.exports.DataSet = class { + constructor(args) { + this.column_names = null; + this.rows = null; + if (args) { + if (args.column_names !== undefined && args.column_names !== null) { + this.column_names = Thrift.copyList(args.column_names, [null]); + } + if (args.rows !== undefined && args.rows !== null) { + this.rows = Thrift.copyList(args.rows, [ttypes.Row]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.LIST) { + this.column_names = []; + const _rtmp323 = input.readListBegin(); + const _size22 = _rtmp323.size || 0; + for (let _i24 = 0; _i24 < _size22; ++_i24) { + let elem25 = null; + elem25 = input.readString(); + this.column_names.push(elem25); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.LIST) { + this.rows = []; + const _rtmp327 = input.readListBegin(); + const _size26 = _rtmp327.size || 0; + for (let _i28 = 0; _i28 < _size26; ++_i28) { + let elem29 = null; + elem29 = new ttypes.Row(); + elem29.read(input); + this.rows.push(elem29); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('DataSet'); + if (this.column_names !== null && this.column_names !== undefined) { + output.writeFieldBegin('column_names', Thrift.Type.LIST, 1); + output.writeListBegin(Thrift.Type.STRING, this.column_names.length); + for (let iter30 in this.column_names) { + if (this.column_names.hasOwnProperty(iter30)) { + iter30 = this.column_names[iter30]; + output.writeString(iter30); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + if (this.rows !== null && this.rows !== undefined) { + output.writeFieldBegin('rows', Thrift.Type.LIST, 2); + output.writeListBegin(Thrift.Type.STRUCT, this.rows.length); + for (let iter31 in this.rows) { + if (this.rows.hasOwnProperty(iter31)) { + iter31 = this.rows[iter31]; + iter31.write(output); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Coordinate = module.exports.Coordinate = class { + constructor(args) { + this.x = null; + this.y = null; + if (args) { + if (args.x !== undefined && args.x !== null) { + this.x = args.x; + } + if (args.y !== undefined && args.y !== null) { + this.y = args.y; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.DOUBLE) { + this.x = input.readDouble(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.DOUBLE) { + this.y = input.readDouble(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Coordinate'); + if (this.x !== null && this.x !== undefined) { + output.writeFieldBegin('x', Thrift.Type.DOUBLE, 1); + output.writeDouble(this.x); + output.writeFieldEnd(); + } + if (this.y !== null && this.y !== undefined) { + output.writeFieldBegin('y', Thrift.Type.DOUBLE, 2); + output.writeDouble(this.y); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Point = module.exports.Point = class { + constructor(args) { + this.coord = null; + if (args) { + if (args.coord !== undefined && args.coord !== null) { + this.coord = new ttypes.Coordinate(args.coord); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRUCT) { + this.coord = new ttypes.Coordinate(); + this.coord.read(input); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Point'); + if (this.coord !== null && this.coord !== undefined) { + output.writeFieldBegin('coord', Thrift.Type.STRUCT, 1); + this.coord.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const LineString = module.exports.LineString = class { + constructor(args) { + this.coordList = null; + if (args) { + if (args.coordList !== undefined && args.coordList !== null) { + this.coordList = Thrift.copyList(args.coordList, [ttypes.Coordinate]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.LIST) { + this.coordList = []; + const _rtmp333 = input.readListBegin(); + const _size32 = _rtmp333.size || 0; + for (let _i34 = 0; _i34 < _size32; ++_i34) { + let elem35 = null; + elem35 = new ttypes.Coordinate(); + elem35.read(input); + this.coordList.push(elem35); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('LineString'); + if (this.coordList !== null && this.coordList !== undefined) { + output.writeFieldBegin('coordList', Thrift.Type.LIST, 1); + output.writeListBegin(Thrift.Type.STRUCT, this.coordList.length); + for (let iter36 in this.coordList) { + if (this.coordList.hasOwnProperty(iter36)) { + iter36 = this.coordList[iter36]; + iter36.write(output); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Polygon = module.exports.Polygon = class { + constructor(args) { + this.coordListList = null; + if (args) { + if (args.coordListList !== undefined && args.coordListList !== null) { + this.coordListList = Thrift.copyList(args.coordListList, [Thrift.copyList, ttypes.Coordinate]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.LIST) { + this.coordListList = []; + const _rtmp338 = input.readListBegin(); + const _size37 = _rtmp338.size || 0; + for (let _i39 = 0; _i39 < _size37; ++_i39) { + let elem40 = null; + elem40 = []; + const _rtmp342 = input.readListBegin(); + const _size41 = _rtmp342.size || 0; + for (let _i43 = 0; _i43 < _size41; ++_i43) { + let elem44 = null; + elem44 = new ttypes.Coordinate(); + elem44.read(input); + elem40.push(elem44); + } + input.readListEnd(); + this.coordListList.push(elem40); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Polygon'); + if (this.coordListList !== null && this.coordListList !== undefined) { + output.writeFieldBegin('coordListList', Thrift.Type.LIST, 1); + output.writeListBegin(Thrift.Type.LIST, this.coordListList.length); + for (let iter45 in this.coordListList) { + if (this.coordListList.hasOwnProperty(iter45)) { + iter45 = this.coordListList[iter45]; + output.writeListBegin(Thrift.Type.STRUCT, iter45.length); + for (let iter46 in iter45) { + if (iter45.hasOwnProperty(iter46)) { + iter46 = iter45[iter46]; + iter46.write(output); + } + } + output.writeListEnd(); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Geography = module.exports.Geography = class { + constructor(args) { + this.ptVal = null; + this.lsVal = null; + this.pgVal = null; + if (args) { + if (args.ptVal !== undefined && args.ptVal !== null) { + this.ptVal = new ttypes.Point(args.ptVal); + } + if (args.lsVal !== undefined && args.lsVal !== null) { + this.lsVal = new ttypes.LineString(args.lsVal); + } + if (args.pgVal !== undefined && args.pgVal !== null) { + this.pgVal = new ttypes.Polygon(args.pgVal); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRUCT) { + this.ptVal = new ttypes.Point(); + this.ptVal.read(input); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRUCT) { + this.lsVal = new ttypes.LineString(); + this.lsVal.read(input); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.STRUCT) { + this.pgVal = new ttypes.Polygon(); + this.pgVal.read(input); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Geography'); + if (this.ptVal !== null && this.ptVal !== undefined) { + output.writeFieldBegin('ptVal', Thrift.Type.STRUCT, 1); + this.ptVal.write(output); + output.writeFieldEnd(); + } + if (this.lsVal !== null && this.lsVal !== undefined) { + output.writeFieldBegin('lsVal', Thrift.Type.STRUCT, 2); + this.lsVal.write(output); + output.writeFieldEnd(); + } + if (this.pgVal !== null && this.pgVal !== undefined) { + output.writeFieldBegin('pgVal', Thrift.Type.STRUCT, 3); + this.pgVal.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Tag = module.exports.Tag = class { + constructor(args) { + this.name = null; + this.props = null; + if (args) { + if (args.name !== undefined && args.name !== null) { + this.name = args.name; + } + if (args.props !== undefined && args.props !== null) { + this.props = Thrift.copyMap(args.props, [ttypes.Value]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRING) { + this.name = input.readString(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.MAP) { + this.props = {}; + const _rtmp348 = input.readMapBegin(); + const _size47 = _rtmp348.size || 0; + for (let _i49 = 0; _i49 < _size47; ++_i49) { + let key50 = null; + let val51 = null; + key50 = input.readString(); + val51 = new ttypes.Value(); + val51.read(input); + this.props[key50] = val51; + } + input.readMapEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Tag'); + if (this.name !== null && this.name !== undefined) { + output.writeFieldBegin('name', Thrift.Type.STRING, 1); + output.writeString(this.name); + output.writeFieldEnd(); + } + if (this.props !== null && this.props !== undefined) { + output.writeFieldBegin('props', Thrift.Type.MAP, 2); + output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.props)); + for (let kiter52 in this.props) { + if (this.props.hasOwnProperty(kiter52)) { + let viter53 = this.props[kiter52]; + output.writeString(kiter52); + viter53.write(output); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Vertex = module.exports.Vertex = class { + constructor(args) { + this.vid = null; + this.tags = null; + if (args) { + if (args.vid !== undefined && args.vid !== null) { + this.vid = new ttypes.Value(args.vid); + } + if (args.tags !== undefined && args.tags !== null) { + this.tags = Thrift.copyList(args.tags, [ttypes.Tag]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRUCT) { + this.vid = new ttypes.Value(); + this.vid.read(input); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.LIST) { + this.tags = []; + const _rtmp355 = input.readListBegin(); + const _size54 = _rtmp355.size || 0; + for (let _i56 = 0; _i56 < _size54; ++_i56) { + let elem57 = null; + elem57 = new ttypes.Tag(); + elem57.read(input); + this.tags.push(elem57); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Vertex'); + if (this.vid !== null && this.vid !== undefined) { + output.writeFieldBegin('vid', Thrift.Type.STRUCT, 1); + this.vid.write(output); + output.writeFieldEnd(); + } + if (this.tags !== null && this.tags !== undefined) { + output.writeFieldBegin('tags', Thrift.Type.LIST, 2); + output.writeListBegin(Thrift.Type.STRUCT, this.tags.length); + for (let iter58 in this.tags) { + if (this.tags.hasOwnProperty(iter58)) { + iter58 = this.tags[iter58]; + iter58.write(output); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Edge = module.exports.Edge = class { + constructor(args) { + this.src = null; + this.dst = null; + this.type = null; + this.name = null; + this.ranking = null; + this.props = null; + if (args) { + if (args.src !== undefined && args.src !== null) { + this.src = new ttypes.Value(args.src); + } + if (args.dst !== undefined && args.dst !== null) { + this.dst = new ttypes.Value(args.dst); + } + if (args.type !== undefined && args.type !== null) { + this.type = args.type; + } + if (args.name !== undefined && args.name !== null) { + this.name = args.name; + } + if (args.ranking !== undefined && args.ranking !== null) { + this.ranking = args.ranking; + } + if (args.props !== undefined && args.props !== null) { + this.props = Thrift.copyMap(args.props, [ttypes.Value]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRUCT) { + this.src = new ttypes.Value(); + this.src.read(input); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRUCT) { + this.dst = new ttypes.Value(); + this.dst.read(input); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.I32) { + this.type = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.STRING) { + this.name = input.readString(); + } else { + input.skip(ftype); + } + break; + case 5: + if (ftype == Thrift.Type.I64) { + this.ranking = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 6: + if (ftype == Thrift.Type.MAP) { + this.props = {}; + const _rtmp360 = input.readMapBegin(); + const _size59 = _rtmp360.size || 0; + for (let _i61 = 0; _i61 < _size59; ++_i61) { + let key62 = null; + let val63 = null; + key62 = input.readString(); + val63 = new ttypes.Value(); + val63.read(input); + this.props[key62] = val63; + } + input.readMapEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Edge'); + if (this.src !== null && this.src !== undefined) { + output.writeFieldBegin('src', Thrift.Type.STRUCT, 1); + this.src.write(output); + output.writeFieldEnd(); + } + if (this.dst !== null && this.dst !== undefined) { + output.writeFieldBegin('dst', Thrift.Type.STRUCT, 2); + this.dst.write(output); + output.writeFieldEnd(); + } + if (this.type !== null && this.type !== undefined) { + output.writeFieldBegin('type', Thrift.Type.I32, 3); + output.writeI32(this.type); + output.writeFieldEnd(); + } + if (this.name !== null && this.name !== undefined) { + output.writeFieldBegin('name', Thrift.Type.STRING, 4); + output.writeString(this.name); + output.writeFieldEnd(); + } + if (this.ranking !== null && this.ranking !== undefined) { + output.writeFieldBegin('ranking', Thrift.Type.I64, 5); + output.writeI64(this.ranking); + output.writeFieldEnd(); + } + if (this.props !== null && this.props !== undefined) { + output.writeFieldBegin('props', Thrift.Type.MAP, 6); + output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.props)); + for (let kiter64 in this.props) { + if (this.props.hasOwnProperty(kiter64)) { + let viter65 = this.props[kiter64]; + output.writeString(kiter64); + viter65.write(output); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Step = module.exports.Step = class { + constructor(args) { + this.dst = null; + this.type = null; + this.name = null; + this.ranking = null; + this.props = null; + if (args) { + if (args.dst !== undefined && args.dst !== null) { + this.dst = new ttypes.Vertex(args.dst); + } + if (args.type !== undefined && args.type !== null) { + this.type = args.type; + } + if (args.name !== undefined && args.name !== null) { + this.name = args.name; + } + if (args.ranking !== undefined && args.ranking !== null) { + this.ranking = args.ranking; + } + if (args.props !== undefined && args.props !== null) { + this.props = Thrift.copyMap(args.props, [ttypes.Value]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRUCT) { + this.dst = new ttypes.Vertex(); + this.dst.read(input); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.I32) { + this.type = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.STRING) { + this.name = input.readString(); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.I64) { + this.ranking = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 5: + if (ftype == Thrift.Type.MAP) { + this.props = {}; + const _rtmp367 = input.readMapBegin(); + const _size66 = _rtmp367.size || 0; + for (let _i68 = 0; _i68 < _size66; ++_i68) { + let key69 = null; + let val70 = null; + key69 = input.readString(); + val70 = new ttypes.Value(); + val70.read(input); + this.props[key69] = val70; + } + input.readMapEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Step'); + if (this.dst !== null && this.dst !== undefined) { + output.writeFieldBegin('dst', Thrift.Type.STRUCT, 1); + this.dst.write(output); + output.writeFieldEnd(); + } + if (this.type !== null && this.type !== undefined) { + output.writeFieldBegin('type', Thrift.Type.I32, 2); + output.writeI32(this.type); + output.writeFieldEnd(); + } + if (this.name !== null && this.name !== undefined) { + output.writeFieldBegin('name', Thrift.Type.STRING, 3); + output.writeString(this.name); + output.writeFieldEnd(); + } + if (this.ranking !== null && this.ranking !== undefined) { + output.writeFieldBegin('ranking', Thrift.Type.I64, 4); + output.writeI64(this.ranking); + output.writeFieldEnd(); + } + if (this.props !== null && this.props !== undefined) { + output.writeFieldBegin('props', Thrift.Type.MAP, 5); + output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.props)); + for (let kiter71 in this.props) { + if (this.props.hasOwnProperty(kiter71)) { + let viter72 = this.props[kiter71]; + output.writeString(kiter71); + viter72.write(output); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Path = module.exports.Path = class { + constructor(args) { + this.src = null; + this.steps = null; + if (args) { + if (args.src !== undefined && args.src !== null) { + this.src = new ttypes.Vertex(args.src); + } + if (args.steps !== undefined && args.steps !== null) { + this.steps = Thrift.copyList(args.steps, [ttypes.Step]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRUCT) { + this.src = new ttypes.Vertex(); + this.src.read(input); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.LIST) { + this.steps = []; + const _rtmp374 = input.readListBegin(); + const _size73 = _rtmp374.size || 0; + for (let _i75 = 0; _i75 < _size73; ++_i75) { + let elem76 = null; + elem76 = new ttypes.Step(); + elem76.read(input); + this.steps.push(elem76); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Path'); + if (this.src !== null && this.src !== undefined) { + output.writeFieldBegin('src', Thrift.Type.STRUCT, 1); + this.src.write(output); + output.writeFieldEnd(); + } + if (this.steps !== null && this.steps !== undefined) { + output.writeFieldBegin('steps', Thrift.Type.LIST, 2); + output.writeListBegin(Thrift.Type.STRUCT, this.steps.length); + for (let iter77 in this.steps) { + if (this.steps.hasOwnProperty(iter77)) { + iter77 = this.steps[iter77]; + iter77.write(output); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const HostAddr = module.exports.HostAddr = class { + constructor(args) { + this.host = null; + this.port = null; + if (args) { + if (args.host !== undefined && args.host !== null) { + this.host = args.host; + } + if (args.port !== undefined && args.port !== null) { + this.port = args.port; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRING) { + this.host = input.readString(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.I32) { + this.port = input.readI32(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('HostAddr'); + if (this.host !== null && this.host !== undefined) { + output.writeFieldBegin('host', Thrift.Type.STRING, 1); + output.writeString(this.host); + output.writeFieldEnd(); + } + if (this.port !== null && this.port !== undefined) { + output.writeFieldBegin('port', Thrift.Type.I32, 2); + output.writeI32(this.port); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const KeyValue = module.exports.KeyValue = class { + constructor(args) { + this.key = null; + this.value = null; + if (args) { + if (args.key !== undefined && args.key !== null) { + this.key = args.key; + } + if (args.value !== undefined && args.value !== null) { + this.value = args.value; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRING) { + this.key = input.readString(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.value = input.readString(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('KeyValue'); + if (this.key !== null && this.key !== undefined) { + output.writeFieldBegin('key', Thrift.Type.STRING, 1); + output.writeString(this.key); + output.writeFieldEnd(); + } + if (this.value !== null && this.value !== undefined) { + output.writeFieldBegin('value', Thrift.Type.STRING, 2); + output.writeString(this.value); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Duration = module.exports.Duration = class { + constructor(args) { + this.seconds = null; + this.microseconds = null; + this.months = null; + if (args) { + if (args.seconds !== undefined && args.seconds !== null) { + this.seconds = args.seconds; + } + if (args.microseconds !== undefined && args.microseconds !== null) { + this.microseconds = args.microseconds; + } + if (args.months !== undefined && args.months !== null) { + this.months = args.months; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I64) { + this.seconds = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.I32) { + this.microseconds = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.I32) { + this.months = input.readI32(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Duration'); + if (this.seconds !== null && this.seconds !== undefined) { + output.writeFieldBegin('seconds', Thrift.Type.I64, 1); + output.writeI64(this.seconds); + output.writeFieldEnd(); + } + if (this.microseconds !== null && this.microseconds !== undefined) { + output.writeFieldBegin('microseconds', Thrift.Type.I32, 2); + output.writeI32(this.microseconds); + output.writeFieldEnd(); + } + if (this.months !== null && this.months !== undefined) { + output.writeFieldBegin('months', Thrift.Type.I32, 3); + output.writeI32(this.months); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const LogInfo = module.exports.LogInfo = class { + constructor(args) { + this.log_id = null; + this.term_id = null; + if (args) { + if (args.log_id !== undefined && args.log_id !== null) { + this.log_id = args.log_id; + } + if (args.term_id !== undefined && args.term_id !== null) { + this.term_id = args.term_id; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I64) { + this.log_id = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.I64) { + this.term_id = input.readI64(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('LogInfo'); + if (this.log_id !== null && this.log_id !== undefined) { + output.writeFieldBegin('log_id', Thrift.Type.I64, 1); + output.writeI64(this.log_id); + output.writeFieldEnd(); + } + if (this.term_id !== null && this.term_id !== undefined) { + output.writeFieldBegin('term_id', Thrift.Type.I64, 2); + output.writeI64(this.term_id); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const DirInfo = module.exports.DirInfo = class { + constructor(args) { + this.root = null; + this.data = null; + if (args) { + if (args.root !== undefined && args.root !== null) { + this.root = args.root; + } + if (args.data !== undefined && args.data !== null) { + this.data = Thrift.copyList(args.data, [null]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRING) { + this.root = input.readString(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.LIST) { + this.data = []; + const _rtmp379 = input.readListBegin(); + const _size78 = _rtmp379.size || 0; + for (let _i80 = 0; _i80 < _size78; ++_i80) { + let elem81 = null; + elem81 = input.readString(); + this.data.push(elem81); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('DirInfo'); + if (this.root !== null && this.root !== undefined) { + output.writeFieldBegin('root', Thrift.Type.STRING, 1); + output.writeString(this.root); + output.writeFieldEnd(); + } + if (this.data !== null && this.data !== undefined) { + output.writeFieldBegin('data', Thrift.Type.LIST, 2); + output.writeListBegin(Thrift.Type.STRING, this.data.length); + for (let iter82 in this.data) { + if (this.data.hasOwnProperty(iter82)) { + iter82 = this.data[iter82]; + output.writeString(iter82); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const CheckpointInfo = module.exports.CheckpointInfo = class { + constructor(args) { + this.space_id = null; + this.parts = null; + this.path = null; + if (args) { + if (args.space_id !== undefined && args.space_id !== null) { + this.space_id = args.space_id; + } + if (args.parts !== undefined && args.parts !== null) { + this.parts = Thrift.copyMap(args.parts, [ttypes.LogInfo]); + } + if (args.path !== undefined && args.path !== null) { + this.path = args.path; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I32) { + this.space_id = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.MAP) { + this.parts = {}; + const _rtmp384 = input.readMapBegin(); + const _size83 = _rtmp384.size || 0; + for (let _i85 = 0; _i85 < _size83; ++_i85) { + let key86 = null; + let val87 = null; + key86 = input.readI32(); + val87 = new ttypes.LogInfo(); + val87.read(input); + this.parts[key86] = val87; + } + input.readMapEnd(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.STRING) { + this.path = input.readString(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('CheckpointInfo'); + if (this.space_id !== null && this.space_id !== undefined) { + output.writeFieldBegin('space_id', Thrift.Type.I32, 1); + output.writeI32(this.space_id); + output.writeFieldEnd(); + } + if (this.parts !== null && this.parts !== undefined) { + output.writeFieldBegin('parts', Thrift.Type.MAP, 2); + output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRUCT, Thrift.objectLength(this.parts)); + for (let kiter88 in this.parts) { + if (this.parts.hasOwnProperty(kiter88)) { + let viter89 = this.parts[kiter88]; + output.writeI32(kiter88); + viter89.write(output); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } + if (this.path !== null && this.path !== undefined) { + output.writeFieldBegin('path', Thrift.Type.STRING, 3); + output.writeString(this.path); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const LogEntry = module.exports.LogEntry = class { + constructor(args) { + this.cluster = null; + this.log_str = null; + if (args) { + if (args.cluster !== undefined && args.cluster !== null) { + this.cluster = args.cluster; + } + if (args.log_str !== undefined && args.log_str !== null) { + this.log_str = args.log_str; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I64) { + this.cluster = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.log_str = input.readString(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('LogEntry'); + if (this.cluster !== null && this.cluster !== undefined) { + output.writeFieldBegin('cluster', Thrift.Type.I64, 1); + output.writeI64(this.cluster); + output.writeFieldEnd(); + } + if (this.log_str !== null && this.log_str !== undefined) { + output.writeFieldBegin('log_str', Thrift.Type.STRING, 2); + output.writeString(this.log_str); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +ttypes.version = '3.0.0'; diff --git a/src/nebula/services/graph_types.d.ts b/src/nebula/services/graph_types.d.ts new file mode 100644 index 0000000..0140482 --- /dev/null +++ b/src/nebula/services/graph_types.d.ts @@ -0,0 +1,91 @@ +// +// Autogenerated by Thrift Compiler (0.19.0) +// +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// +import thrift = require('thrift'); +import Thrift = thrift.Thrift; +import Q = thrift.Q; +import Int64 = require('node-int64'); +import common_ttypes = require('./common_types'); + + + +declare class ProfilingStats { + public rows: Int64; + public exec_duration_in_us: Int64; + public total_duration_in_us: Int64; + public other_stats?: any; + + constructor(args?: { rows: Int64; exec_duration_in_us: Int64; total_duration_in_us: Int64; other_stats?: any; }); + } + +declare class PlanNodeBranchInfo { + public is_do_branch: boolean; + public condition_node_id: Int64; + + constructor(args?: { is_do_branch: boolean; condition_node_id: Int64; }); + } + +declare class Pair { + public key: Buffer; + public value: Buffer; + + constructor(args?: { key: Buffer; value: Buffer; }); + } + +declare class PlanNodeDescription { + public name: Buffer; + public id: Int64; + public output_var: Buffer; + public description?: Pair[]; + public profiles?: ProfilingStats[]; + public branch_info?: PlanNodeBranchInfo; + public dependencies?: Int64[]; + + constructor(args?: { name: Buffer; id: Int64; output_var: Buffer; description?: Pair[]; profiles?: ProfilingStats[]; branch_info?: PlanNodeBranchInfo; dependencies?: Int64[]; }); + } + +declare class PlanDescription { + public plan_node_descs: PlanNodeDescription[]; + public node_index_map: any; + public format: Buffer; + public optimize_time_in_us: number; + + constructor(args?: { plan_node_descs: PlanNodeDescription[]; node_index_map: any; format: Buffer; optimize_time_in_us: number; }); + } + +declare class ExecutionResponse { + public error_code: common_ttypes.ErrorCode; + public latency_in_us: Int64; + public data?: common_ttypes.DataSet; + public space_name?: string; + public error_msg?: string; + public plan_desc?: PlanDescription; + public comment?: string; + + constructor(args?: { error_code: common_ttypes.ErrorCode; latency_in_us: Int64; data?: common_ttypes.DataSet; space_name?: string; error_msg?: string; plan_desc?: PlanDescription; comment?: string; }); + } + +declare class AuthResponse { + public error_code: common_ttypes.ErrorCode; + public error_msg?: string; + public session_id?: Int64; + public time_zone_offset_seconds?: number; + public time_zone_name?: string; + + constructor(args?: { error_code: common_ttypes.ErrorCode; error_msg?: string; session_id?: Int64; time_zone_offset_seconds?: number; time_zone_name?: string; }); + } + +declare class VerifyClientVersionResp { + public error_code: common_ttypes.ErrorCode; + public error_msg?: string; + + constructor(args?: { error_code: common_ttypes.ErrorCode; error_msg?: string; }); + } + +declare class VerifyClientVersionReq { + public version?: string; + + constructor(args?: { version?: string; }); + } diff --git a/src/nebula/services/graph_types.js b/src/nebula/services/graph_types.js new file mode 100644 index 0000000..6ab180e --- /dev/null +++ b/src/nebula/services/graph_types.js @@ -0,0 +1,997 @@ +// +// Autogenerated by Thrift Compiler (0.19.0) +// +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// +const thrift = require('thrift'); +const Thrift = thrift.Thrift; +const Int64 = require('node-int64'); + +const common_ttypes = require('./common_types'); + + +const ttypes = module.exports = {}; +const ProfilingStats = module.exports.ProfilingStats = class { + constructor(args) { + this.rows = null; + this.exec_duration_in_us = null; + this.total_duration_in_us = null; + this.other_stats = null; + if (args) { + if (args.rows !== undefined && args.rows !== null) { + this.rows = args.rows; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field rows is unset!'); + } + if (args.exec_duration_in_us !== undefined && args.exec_duration_in_us !== null) { + this.exec_duration_in_us = args.exec_duration_in_us; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field exec_duration_in_us is unset!'); + } + if (args.total_duration_in_us !== undefined && args.total_duration_in_us !== null) { + this.total_duration_in_us = args.total_duration_in_us; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field total_duration_in_us is unset!'); + } + if (args.other_stats !== undefined && args.other_stats !== null) { + this.other_stats = Thrift.copyMap(args.other_stats, [null]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I64) { + this.rows = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.I64) { + this.exec_duration_in_us = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.I64) { + this.total_duration_in_us = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.MAP) { + this.other_stats = {}; + const _rtmp31 = input.readMapBegin(); + const _size0 = _rtmp31.size || 0; + for (let _i2 = 0; _i2 < _size0; ++_i2) { + let key3 = null; + let val4 = null; + key3 = input.readBinary(); + val4 = input.readBinary(); + this.other_stats[key3] = val4; + } + input.readMapEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('ProfilingStats'); + if (this.rows !== null && this.rows !== undefined) { + output.writeFieldBegin('rows', Thrift.Type.I64, 1); + output.writeI64(this.rows); + output.writeFieldEnd(); + } + if (this.exec_duration_in_us !== null && this.exec_duration_in_us !== undefined) { + output.writeFieldBegin('exec_duration_in_us', Thrift.Type.I64, 2); + output.writeI64(this.exec_duration_in_us); + output.writeFieldEnd(); + } + if (this.total_duration_in_us !== null && this.total_duration_in_us !== undefined) { + output.writeFieldBegin('total_duration_in_us', Thrift.Type.I64, 3); + output.writeI64(this.total_duration_in_us); + output.writeFieldEnd(); + } + if (this.other_stats !== null && this.other_stats !== undefined) { + output.writeFieldBegin('other_stats', Thrift.Type.MAP, 4); + output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.other_stats)); + for (let kiter5 in this.other_stats) { + if (this.other_stats.hasOwnProperty(kiter5)) { + let viter6 = this.other_stats[kiter5]; + output.writeBinary(kiter5); + output.writeBinary(viter6); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const PlanNodeBranchInfo = module.exports.PlanNodeBranchInfo = class { + constructor(args) { + this.is_do_branch = null; + this.condition_node_id = null; + if (args) { + if (args.is_do_branch !== undefined && args.is_do_branch !== null) { + this.is_do_branch = args.is_do_branch; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field is_do_branch is unset!'); + } + if (args.condition_node_id !== undefined && args.condition_node_id !== null) { + this.condition_node_id = args.condition_node_id; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field condition_node_id is unset!'); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.BOOL) { + this.is_do_branch = input.readBool(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.I64) { + this.condition_node_id = input.readI64(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('PlanNodeBranchInfo'); + if (this.is_do_branch !== null && this.is_do_branch !== undefined) { + output.writeFieldBegin('is_do_branch', Thrift.Type.BOOL, 1); + output.writeBool(this.is_do_branch); + output.writeFieldEnd(); + } + if (this.condition_node_id !== null && this.condition_node_id !== undefined) { + output.writeFieldBegin('condition_node_id', Thrift.Type.I64, 2); + output.writeI64(this.condition_node_id); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const Pair = module.exports.Pair = class { + constructor(args) { + this.key = null; + this.value = null; + if (args) { + if (args.key !== undefined && args.key !== null) { + this.key = args.key; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field key is unset!'); + } + if (args.value !== undefined && args.value !== null) { + this.value = args.value; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field value is unset!'); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRING) { + this.key = input.readBinary(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.value = input.readBinary(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('Pair'); + if (this.key !== null && this.key !== undefined) { + output.writeFieldBegin('key', Thrift.Type.STRING, 1); + output.writeBinary(this.key); + output.writeFieldEnd(); + } + if (this.value !== null && this.value !== undefined) { + output.writeFieldBegin('value', Thrift.Type.STRING, 2); + output.writeBinary(this.value); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const PlanNodeDescription = module.exports.PlanNodeDescription = class { + constructor(args) { + this.name = null; + this.id = null; + this.output_var = null; + this.description = null; + this.profiles = null; + this.branch_info = null; + this.dependencies = null; + if (args) { + if (args.name !== undefined && args.name !== null) { + this.name = args.name; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!'); + } + if (args.id !== undefined && args.id !== null) { + this.id = args.id; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!'); + } + if (args.output_var !== undefined && args.output_var !== null) { + this.output_var = args.output_var; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field output_var is unset!'); + } + if (args.description !== undefined && args.description !== null) { + this.description = Thrift.copyList(args.description, [ttypes.Pair]); + } + if (args.profiles !== undefined && args.profiles !== null) { + this.profiles = Thrift.copyList(args.profiles, [ttypes.ProfilingStats]); + } + if (args.branch_info !== undefined && args.branch_info !== null) { + this.branch_info = new ttypes.PlanNodeBranchInfo(args.branch_info); + } + if (args.dependencies !== undefined && args.dependencies !== null) { + this.dependencies = Thrift.copyList(args.dependencies, [null]); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRING) { + this.name = input.readBinary(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.I64) { + this.id = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.STRING) { + this.output_var = input.readBinary(); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.LIST) { + this.description = []; + const _rtmp38 = input.readListBegin(); + const _size7 = _rtmp38.size || 0; + for (let _i9 = 0; _i9 < _size7; ++_i9) { + let elem10 = null; + elem10 = new ttypes.Pair(); + elem10.read(input); + this.description.push(elem10); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + case 5: + if (ftype == Thrift.Type.LIST) { + this.profiles = []; + const _rtmp312 = input.readListBegin(); + const _size11 = _rtmp312.size || 0; + for (let _i13 = 0; _i13 < _size11; ++_i13) { + let elem14 = null; + elem14 = new ttypes.ProfilingStats(); + elem14.read(input); + this.profiles.push(elem14); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + case 6: + if (ftype == Thrift.Type.STRUCT) { + this.branch_info = new ttypes.PlanNodeBranchInfo(); + this.branch_info.read(input); + } else { + input.skip(ftype); + } + break; + case 7: + if (ftype == Thrift.Type.LIST) { + this.dependencies = []; + const _rtmp316 = input.readListBegin(); + const _size15 = _rtmp316.size || 0; + for (let _i17 = 0; _i17 < _size15; ++_i17) { + let elem18 = null; + elem18 = input.readI64(); + this.dependencies.push(elem18); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('PlanNodeDescription'); + if (this.name !== null && this.name !== undefined) { + output.writeFieldBegin('name', Thrift.Type.STRING, 1); + output.writeBinary(this.name); + output.writeFieldEnd(); + } + if (this.id !== null && this.id !== undefined) { + output.writeFieldBegin('id', Thrift.Type.I64, 2); + output.writeI64(this.id); + output.writeFieldEnd(); + } + if (this.output_var !== null && this.output_var !== undefined) { + output.writeFieldBegin('output_var', Thrift.Type.STRING, 3); + output.writeBinary(this.output_var); + output.writeFieldEnd(); + } + if (this.description !== null && this.description !== undefined) { + output.writeFieldBegin('description', Thrift.Type.LIST, 4); + output.writeListBegin(Thrift.Type.STRUCT, this.description.length); + for (let iter19 in this.description) { + if (this.description.hasOwnProperty(iter19)) { + iter19 = this.description[iter19]; + iter19.write(output); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + if (this.profiles !== null && this.profiles !== undefined) { + output.writeFieldBegin('profiles', Thrift.Type.LIST, 5); + output.writeListBegin(Thrift.Type.STRUCT, this.profiles.length); + for (let iter20 in this.profiles) { + if (this.profiles.hasOwnProperty(iter20)) { + iter20 = this.profiles[iter20]; + iter20.write(output); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + if (this.branch_info !== null && this.branch_info !== undefined) { + output.writeFieldBegin('branch_info', Thrift.Type.STRUCT, 6); + this.branch_info.write(output); + output.writeFieldEnd(); + } + if (this.dependencies !== null && this.dependencies !== undefined) { + output.writeFieldBegin('dependencies', Thrift.Type.LIST, 7); + output.writeListBegin(Thrift.Type.I64, this.dependencies.length); + for (let iter21 in this.dependencies) { + if (this.dependencies.hasOwnProperty(iter21)) { + iter21 = this.dependencies[iter21]; + output.writeI64(iter21); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const PlanDescription = module.exports.PlanDescription = class { + constructor(args) { + this.plan_node_descs = null; + this.node_index_map = null; + this.format = null; + this.optimize_time_in_us = null; + if (args) { + if (args.plan_node_descs !== undefined && args.plan_node_descs !== null) { + this.plan_node_descs = Thrift.copyList(args.plan_node_descs, [ttypes.PlanNodeDescription]); + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field plan_node_descs is unset!'); + } + if (args.node_index_map !== undefined && args.node_index_map !== null) { + this.node_index_map = Thrift.copyMap(args.node_index_map, [null]); + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field node_index_map is unset!'); + } + if (args.format !== undefined && args.format !== null) { + this.format = args.format; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field format is unset!'); + } + if (args.optimize_time_in_us !== undefined && args.optimize_time_in_us !== null) { + this.optimize_time_in_us = args.optimize_time_in_us; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field optimize_time_in_us is unset!'); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.LIST) { + this.plan_node_descs = []; + const _rtmp323 = input.readListBegin(); + const _size22 = _rtmp323.size || 0; + for (let _i24 = 0; _i24 < _size22; ++_i24) { + let elem25 = null; + elem25 = new ttypes.PlanNodeDescription(); + elem25.read(input); + this.plan_node_descs.push(elem25); + } + input.readListEnd(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.MAP) { + this.node_index_map = {}; + const _rtmp327 = input.readMapBegin(); + const _size26 = _rtmp327.size || 0; + for (let _i28 = 0; _i28 < _size26; ++_i28) { + let key29 = null; + let val30 = null; + key29 = input.readI64(); + val30 = input.readI64(); + this.node_index_map[key29] = val30; + } + input.readMapEnd(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.STRING) { + this.format = input.readBinary(); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.I32) { + this.optimize_time_in_us = input.readI32(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('PlanDescription'); + if (this.plan_node_descs !== null && this.plan_node_descs !== undefined) { + output.writeFieldBegin('plan_node_descs', Thrift.Type.LIST, 1); + output.writeListBegin(Thrift.Type.STRUCT, this.plan_node_descs.length); + for (let iter31 in this.plan_node_descs) { + if (this.plan_node_descs.hasOwnProperty(iter31)) { + iter31 = this.plan_node_descs[iter31]; + iter31.write(output); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + } + if (this.node_index_map !== null && this.node_index_map !== undefined) { + output.writeFieldBegin('node_index_map', Thrift.Type.MAP, 2); + output.writeMapBegin(Thrift.Type.I64, Thrift.Type.I64, Thrift.objectLength(this.node_index_map)); + for (let kiter32 in this.node_index_map) { + if (this.node_index_map.hasOwnProperty(kiter32)) { + let viter33 = this.node_index_map[kiter32]; + output.writeI64(kiter32); + output.writeI64(viter33); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } + if (this.format !== null && this.format !== undefined) { + output.writeFieldBegin('format', Thrift.Type.STRING, 3); + output.writeBinary(this.format); + output.writeFieldEnd(); + } + if (this.optimize_time_in_us !== null && this.optimize_time_in_us !== undefined) { + output.writeFieldBegin('optimize_time_in_us', Thrift.Type.I32, 4); + output.writeI32(this.optimize_time_in_us); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const ExecutionResponse = module.exports.ExecutionResponse = class { + constructor(args) { + this.error_code = null; + this.latency_in_us = null; + this.data = null; + this.space_name = null; + this.error_msg = null; + this.plan_desc = null; + this.comment = null; + if (args) { + if (args.error_code !== undefined && args.error_code !== null) { + this.error_code = args.error_code; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field error_code is unset!'); + } + if (args.latency_in_us !== undefined && args.latency_in_us !== null) { + this.latency_in_us = args.latency_in_us; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field latency_in_us is unset!'); + } + if (args.data !== undefined && args.data !== null) { + this.data = new common_ttypes.DataSet(args.data); + } + if (args.space_name !== undefined && args.space_name !== null) { + this.space_name = args.space_name; + } + if (args.error_msg !== undefined && args.error_msg !== null) { + this.error_msg = args.error_msg; + } + if (args.plan_desc !== undefined && args.plan_desc !== null) { + this.plan_desc = new ttypes.PlanDescription(args.plan_desc); + } + if (args.comment !== undefined && args.comment !== null) { + this.comment = args.comment; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I32) { + this.error_code = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.I64) { + this.latency_in_us = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.STRUCT) { + this.data = new common_ttypes.DataSet(); + this.data.read(input); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.STRING) { + this.space_name = input.readString(); + } else { + input.skip(ftype); + } + break; + case 5: + if (ftype == Thrift.Type.STRING) { + this.error_msg = input.readString(); + } else { + input.skip(ftype); + } + break; + case 6: + if (ftype == Thrift.Type.STRUCT) { + this.plan_desc = new ttypes.PlanDescription(); + this.plan_desc.read(input); + } else { + input.skip(ftype); + } + break; + case 7: + if (ftype == Thrift.Type.STRING) { + this.comment = input.readString(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('ExecutionResponse'); + if (this.error_code !== null && this.error_code !== undefined) { + output.writeFieldBegin('error_code', Thrift.Type.I32, 1); + output.writeI32(this.error_code); + output.writeFieldEnd(); + } + if (this.latency_in_us !== null && this.latency_in_us !== undefined) { + output.writeFieldBegin('latency_in_us', Thrift.Type.I64, 2); + output.writeI64(this.latency_in_us); + output.writeFieldEnd(); + } + if (this.data !== null && this.data !== undefined) { + output.writeFieldBegin('data', Thrift.Type.STRUCT, 3); + this.data.write(output); + output.writeFieldEnd(); + } + if (this.space_name !== null && this.space_name !== undefined) { + output.writeFieldBegin('space_name', Thrift.Type.STRING, 4); + output.writeString(this.space_name); + output.writeFieldEnd(); + } + if (this.error_msg !== null && this.error_msg !== undefined) { + output.writeFieldBegin('error_msg', Thrift.Type.STRING, 5); + output.writeString(this.error_msg); + output.writeFieldEnd(); + } + if (this.plan_desc !== null && this.plan_desc !== undefined) { + output.writeFieldBegin('plan_desc', Thrift.Type.STRUCT, 6); + this.plan_desc.write(output); + output.writeFieldEnd(); + } + if (this.comment !== null && this.comment !== undefined) { + output.writeFieldBegin('comment', Thrift.Type.STRING, 7); + output.writeString(this.comment); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const AuthResponse = module.exports.AuthResponse = class { + constructor(args) { + this.error_code = null; + this.error_msg = null; + this.session_id = null; + this.time_zone_offset_seconds = null; + this.time_zone_name = null; + if (args) { + if (args.error_code !== undefined && args.error_code !== null) { + this.error_code = args.error_code; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field error_code is unset!'); + } + if (args.error_msg !== undefined && args.error_msg !== null) { + this.error_msg = args.error_msg; + } + if (args.session_id !== undefined && args.session_id !== null) { + this.session_id = args.session_id; + } + if (args.time_zone_offset_seconds !== undefined && args.time_zone_offset_seconds !== null) { + this.time_zone_offset_seconds = args.time_zone_offset_seconds; + } + if (args.time_zone_name !== undefined && args.time_zone_name !== null) { + this.time_zone_name = args.time_zone_name; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I32) { + this.error_code = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.error_msg = input.readString(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.I64) { + this.session_id = input.readI64(); + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.I32) { + this.time_zone_offset_seconds = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 5: + if (ftype == Thrift.Type.STRING) { + this.time_zone_name = input.readString(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('AuthResponse'); + if (this.error_code !== null && this.error_code !== undefined) { + output.writeFieldBegin('error_code', Thrift.Type.I32, 1); + output.writeI32(this.error_code); + output.writeFieldEnd(); + } + if (this.error_msg !== null && this.error_msg !== undefined) { + output.writeFieldBegin('error_msg', Thrift.Type.STRING, 2); + output.writeString(this.error_msg); + output.writeFieldEnd(); + } + if (this.session_id !== null && this.session_id !== undefined) { + output.writeFieldBegin('session_id', Thrift.Type.I64, 3); + output.writeI64(this.session_id); + output.writeFieldEnd(); + } + if (this.time_zone_offset_seconds !== null && this.time_zone_offset_seconds !== undefined) { + output.writeFieldBegin('time_zone_offset_seconds', Thrift.Type.I32, 4); + output.writeI32(this.time_zone_offset_seconds); + output.writeFieldEnd(); + } + if (this.time_zone_name !== null && this.time_zone_name !== undefined) { + output.writeFieldBegin('time_zone_name', Thrift.Type.STRING, 5); + output.writeString(this.time_zone_name); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const VerifyClientVersionResp = module.exports.VerifyClientVersionResp = class { + constructor(args) { + this.error_code = null; + this.error_msg = null; + if (args) { + if (args.error_code !== undefined && args.error_code !== null) { + this.error_code = args.error_code; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field error_code is unset!'); + } + if (args.error_msg !== undefined && args.error_msg !== null) { + this.error_msg = args.error_msg; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.I32) { + this.error_code = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.error_msg = input.readString(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('VerifyClientVersionResp'); + if (this.error_code !== null && this.error_code !== undefined) { + output.writeFieldBegin('error_code', Thrift.Type.I32, 1); + output.writeI32(this.error_code); + output.writeFieldEnd(); + } + if (this.error_msg !== null && this.error_msg !== undefined) { + output.writeFieldBegin('error_msg', Thrift.Type.STRING, 2); + output.writeString(this.error_msg); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; +const VerifyClientVersionReq = module.exports.VerifyClientVersionReq = class { + constructor(args) { + this.version = '3.0.0'; + if (args) { + if (args.version !== undefined && args.version !== null) { + this.version = args.version; + } else { + throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field version is unset!'); + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.STRING) { + this.version = input.readString(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('VerifyClientVersionReq'); + if (this.version !== null && this.version !== undefined) { + output.writeFieldBegin('version', Thrift.Type.STRING, 1); + output.writeString(this.version); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + +}; diff --git a/src/nebula/types.ts b/src/nebula/types.ts index 5b80574..dd81576 100644 --- a/src/nebula/types.ts +++ b/src/nebula/types.ts @@ -4,7 +4,7 @@ import { AsyncResource } from 'async_hooks' -interface ConnectionOption { +export interface ConnectionOption { host: string; port: number; userName: string; @@ -12,12 +12,12 @@ interface ConnectionOption { space: string; } -interface Endpoint { +export interface Endpoint { host: string; port: number } -interface ClientOption { +export interface ClientOption { // nebula服务器列表 servers: string[] | Endpoint[]; // 用户名 @@ -36,7 +36,7 @@ interface ClientOption { pingInterval?: number; } -interface ConnectionInfo { +export interface ConnectionInfo { connectionId: string; host: string; port: number; @@ -44,7 +44,27 @@ interface ConnectionInfo { isReady: boolean; } -interface NebulaValue { + +/** + * - nVal: NullType + * - bVal: bool + * - iVal: i64 + * - fVal: double + * - sVal: string + * - dVal: Date + * - tVal: Time + * - dtVal: DateTime + * - vVal: Vertex + * - eVal: Edge + * - pVal: Path + * - lVal: NList + * - mVal: NMap + * - uVal: NSet + * - gVal: DataSet + * - ggVal: Geography + * - duVal: Duration + */ +export interface NebulaValue { nVal: any; bVal: any; iVal: any; @@ -63,12 +83,12 @@ interface NebulaValue { uVal: any; gVal: any; } -interface Metrics { +export interface Metrics { execute: number; traverse: number; } -interface Task { +export interface Task { command: string; returnOriginalData: boolean; resolve: (value: any) => void; @@ -76,13 +96,3 @@ interface Task { asyncResource?: AsyncResource; executingTimer?: NodeJS.Timeout; } - -export { - Endpoint, - ClientOption, - ConnectionOption, - NebulaValue, - Metrics, - Task, - ConnectionInfo -} diff --git a/src/thrift/binary.js b/src/thrift/binary.js deleted file mode 100644 index 9813ffd..0000000 --- a/src/thrift/binary.js +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var POW_8 = Math.pow(2, 8); -var POW_16 = Math.pow(2, 16); -var POW_24 = Math.pow(2, 24); -var POW_32 = Math.pow(2, 32); -var POW_40 = Math.pow(2, 40); -var POW_48 = Math.pow(2, 48); -var POW_52 = Math.pow(2, 52); -var POW_1022 = Math.pow(2, 1022); - -exports.readByte = function(b){ - return b > 127 ? b-256 : b; -}; - -exports.readI16 = function(buff, off) { - off = off || 0; - var v = buff[off + 1]; - v += buff[off] << 8; - if (buff[off] & 128) { - v -= POW_16; - } - return v; -}; - -exports.readI32 = function(buff, off) { - off = off || 0; - var v = buff[off + 3]; - v += buff[off + 2] << 8; - v += buff[off + 1] << 16; - v += buff[off] * POW_24; - if (buff[off] & 0x80) { - v -= POW_32; - } - return v; -}; - -exports.writeI16 = function(buff, v) { - buff[1] = v & 0xff; - v >>= 8; - buff[0] = v & 0xff; - return buff; -}; - -exports.writeI32 = function(buff, v) { - buff[3] = v & 0xff; - v >>= 8; - buff[2] = v & 0xff; - v >>= 8; - buff[1] = v & 0xff; - v >>= 8; - buff[0] = v & 0xff; - return buff; -}; - -exports.readDouble = function(buff, off) { - off = off || 0; - var signed = buff[off] & 0x80; - var e = (buff[off+1] & 0xF0) >> 4; - e += (buff[off] & 0x7F) << 4; - - var m = buff[off+7]; - m += buff[off+6] << 8; - m += buff[off+5] << 16; - m += buff[off+4] * POW_24; - m += buff[off+3] * POW_32; - m += buff[off+2] * POW_40; - m += (buff[off+1] & 0x0F) * POW_48; - - switch (e) { - case 0: - e = -1022; - break; - case 2047: - return m ? NaN : (signed ? -Infinity : Infinity); - default: - m += POW_52; - e -= 1023; - } - - if (signed) { - m *= -1; - } - - return m * Math.pow(2, e - 52); -}; - -/* - * Based on code from the jspack module: - * http://code.google.com/p/jspack/ - */ -exports.writeDouble = function(buff, v) { - var m, e, c; - - buff[0] = (v < 0 ? 0x80 : 0x00); - - v = Math.abs(v); - if (v !== v) { - // NaN, use QNaN IEEE format - m = 2251799813685248; - e = 2047; - } else if (v === Infinity) { - m = 0; - e = 2047; - } else { - e = Math.floor(Math.log(v) / Math.LN2); - c = Math.pow(2, -e); - if (v * c < 1) { - e--; - c *= 2; - } - - if (e + 1023 >= 2047) - { - // Overflow - m = 0; - e = 2047; - } - else if (e + 1023 >= 1) - { - // Normalized - term order matters, as Math.pow(2, 52-e) and v*Math.pow(2, 52) can overflow - m = (v*c-1) * POW_52; - e += 1023; - } - else - { - // Denormalized - also catches the '0' case, somewhat by chance - m = (v * POW_1022) * POW_52; - e = 0; - } - } - - buff[1] = (e << 4) & 0xf0; - buff[0] |= (e >> 4) & 0x7f; - - buff[7] = m & 0xff; - m = Math.floor(m / POW_8); - buff[6] = m & 0xff; - m = Math.floor(m / POW_8); - buff[5] = m & 0xff; - m = Math.floor(m / POW_8); - buff[4] = m & 0xff; - m >>= 8; - buff[3] = m & 0xff; - m >>= 8; - buff[2] = m & 0xff; - m >>= 8; - buff[1] |= m & 0x0f; - - return buff; -}; diff --git a/src/thrift/binary_protocol.js b/src/thrift/binary_protocol.js deleted file mode 100644 index af8836c..0000000 --- a/src/thrift/binary_protocol.js +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var log = require('./log'); -var binary = require('./binary'); -var Int64 = require('node-int64'); -var Thrift = require('./thrift'); -var Type = Thrift.Type; - -module.exports = TBinaryProtocol; - -// JavaScript supports only numeric doubles, therefore even hex values are always signed. -// The largest integer value which can be represented in JavaScript is +/-2^53. -// Bitwise operations convert numbers to 32 bit integers but perform sign extension -// upon assigning values back to variables. -var VERSION_MASK = -65536, // 0xffff0000 - VERSION_1 = -2147418112, // 0x80010000 - TYPE_MASK = 0x000000ff; - -TBinaryProtocol.VERSION_MASK = VERSION_MASK; -TBinaryProtocol.VERSION_1 = VERSION_1; -TBinaryProtocol.TYPE_MASK = TYPE_MASK - -function TBinaryProtocol(trans, strictRead, strictWrite) { - this.trans = trans; - this.strictRead = (strictRead !== undefined ? strictRead : false); - this.strictWrite = (strictWrite !== undefined ? strictWrite : true); - this._seqid = null; -}; - -TBinaryProtocol.prototype.flush = function() { - return this.trans.flush(); -}; - -TBinaryProtocol.prototype.writeMessageBegin = function(name, type, seqid) { - if (this.strictWrite) { - this.writeI32(VERSION_1 | type); - this.writeString(name); - this.writeI32(seqid); - } else { - this.writeString(name); - this.writeByte(type); - this.writeI32(seqid); - } - // Record client seqid to find callback again - if (this._seqid !== null) { - log.warning('SeqId already set', { 'name': name }); - } else { - this._seqid = seqid; - this.trans.setCurrSeqId(seqid); - } -}; - -TBinaryProtocol.prototype.writeMessageEnd = function() { - if (this._seqid !== null) { - this._seqid = null; - } else { - log.warning('No seqid to unset'); - } -}; - -TBinaryProtocol.prototype.writeStructBegin = function(name) { -}; - -TBinaryProtocol.prototype.writeStructEnd = function() { -}; - -TBinaryProtocol.prototype.writeFieldBegin = function(name, type, id) { - this.writeByte(type); - this.writeI16(id); -}; - -TBinaryProtocol.prototype.writeFieldEnd = function() { -}; - -TBinaryProtocol.prototype.writeFieldStop = function() { - this.writeByte(Type.STOP); -}; - -TBinaryProtocol.prototype.writeMapBegin = function(ktype, vtype, size) { - this.writeByte(ktype); - this.writeByte(vtype); - this.writeI32(size); -}; - -TBinaryProtocol.prototype.writeMapEnd = function() { -}; - -TBinaryProtocol.prototype.writeListBegin = function(etype, size) { - this.writeByte(etype); - this.writeI32(size); -}; - -TBinaryProtocol.prototype.writeListEnd = function() { -}; - -TBinaryProtocol.prototype.writeSetBegin = function(etype, size) { - this.writeByte(etype); - this.writeI32(size); -}; - -TBinaryProtocol.prototype.writeSetEnd = function() { -}; - -TBinaryProtocol.prototype.writeBool = function(bool) { - if (bool) { - this.writeByte(1); - } else { - this.writeByte(0); - } -}; - -TBinaryProtocol.prototype.writeByte = function(b) { - this.trans.write(new Buffer([b])); -}; - -TBinaryProtocol.prototype.writeI16 = function(i16) { - this.trans.write(binary.writeI16(new Buffer(2), i16)); -}; - -TBinaryProtocol.prototype.writeI32 = function(i32) { - this.trans.write(binary.writeI32(new Buffer(4), i32)); -}; - -TBinaryProtocol.prototype.writeI64 = function(i64) { - if (i64.buffer) { - this.trans.write(i64.buffer); - } else { - this.trans.write(new Int64(i64).buffer); - } -}; - -TBinaryProtocol.prototype.writeDouble = function(dub) { - this.trans.write(binary.writeDouble(new Buffer(8), dub)); -}; - -TBinaryProtocol.prototype.writeStringOrBinary = function(name, encoding, arg) { - if (typeof(arg) === 'string') { - this.writeI32(Buffer.byteLength(arg, encoding)); - this.trans.write(new Buffer(arg, encoding)); - } else if ((arg instanceof Buffer) || - (Object.prototype.toString.call(arg) == '[object Uint8Array]')) { - // Buffers in Node.js under Browserify may extend UInt8Array instead of - // defining a new object. We detect them here so we can write them - // correctly - this.writeI32(arg.length); - this.trans.write(arg); - } else { - throw new Error(name + ' called without a string/Buffer argument: ' + arg); - } -}; - -TBinaryProtocol.prototype.writeString = function(arg) { - this.writeStringOrBinary('writeString', 'utf8', arg); -}; - -TBinaryProtocol.prototype.writeBinary = function(arg) { - this.writeStringOrBinary('writeBinary', 'binary', arg); -}; - -TBinaryProtocol.prototype.readMessageBegin = function() { - var sz = this.readI32(); - var type, name, seqid; - - if (sz < 0) { - var version = sz & VERSION_MASK; - if (version != VERSION_1) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.BAD_VERSION, "Bad version in readMessageBegin: " + sz); - } - type = sz & TYPE_MASK; - name = this.readString(); - seqid = this.readI32(); - } else { - if (this.strictRead) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.BAD_VERSION, "No protocol version header"); - } - name = this.trans.read(sz); - type = this.readByte(); - seqid = this.readI32(); - } - return {fname: name, mtype: type, rseqid: seqid}; -}; - -TBinaryProtocol.prototype.readMessageEnd = function() { -}; - -TBinaryProtocol.prototype.readStructBegin = function() { - return {fname: ''}; -}; - -TBinaryProtocol.prototype.readStructEnd = function() { -}; - -TBinaryProtocol.prototype.readFieldBegin = function() { - var type = this.readByte(); - if (type == Type.STOP) { - return {fname: null, ftype: type, fid: 0}; - } - var id = this.readI16(); - return {fname: null, ftype: type, fid: id}; -}; - -TBinaryProtocol.prototype.readFieldEnd = function() { -}; - -TBinaryProtocol.prototype.readMapBegin = function() { - var ktype = this.readByte(); - var vtype = this.readByte(); - var size = this.readI32(); - return {ktype: ktype, vtype: vtype, size: size}; -}; - -TBinaryProtocol.prototype.readMapEnd = function() { -}; - -TBinaryProtocol.prototype.readListBegin = function() { - var etype = this.readByte(); - var size = this.readI32(); - return {etype: etype, size: size}; -}; - -TBinaryProtocol.prototype.readListEnd = function() { -}; - -TBinaryProtocol.prototype.readSetBegin = function() { - var etype = this.readByte(); - var size = this.readI32(); - return {etype: etype, size: size}; -}; - -TBinaryProtocol.prototype.readSetEnd = function() { -}; - -TBinaryProtocol.prototype.readBool = function() { - var b = this.readByte(); - if (b === 0) { - return false; - } - return true; -}; - -TBinaryProtocol.prototype.readByte = function() { - return this.trans.readByte(); -}; - -TBinaryProtocol.prototype.readI16 = function() { - return this.trans.readI16(); -}; - -TBinaryProtocol.prototype.readI32 = function() { - return this.trans.readI32(); -}; - -TBinaryProtocol.prototype.readI64 = function() { - var buff = this.trans.read(8); - return new Int64(buff); -}; - -TBinaryProtocol.prototype.readDouble = function() { - return this.trans.readDouble(); -}; - -TBinaryProtocol.prototype.readBinary = function() { - var len = this.readI32(); - if (len === 0) { - return new Buffer(0); - } - - if (len < 0) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.NEGATIVE_SIZE, "Negative binary size"); - } - return this.trans.read(len); -}; - -TBinaryProtocol.prototype.readString = function() { - var len = this.readI32(); - if (len === 0) { - return ""; - } - - if (len < 0) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.NEGATIVE_SIZE, "Negative string size"); - } - return this.trans.readString(len); -}; - -TBinaryProtocol.prototype.getTransport = function() { - return this.trans; -}; - -TBinaryProtocol.prototype.skip = function(type) { - switch (type) { - case Type.BOOL: - this.readBool(); - break; - case Type.BYTE: - this.readByte(); - break; - case Type.I16: - this.readI16(); - break; - case Type.I32: - this.readI32(); - break; - case Type.I64: - this.readI64(); - break; - case Type.DOUBLE: - this.readDouble(); - break; - case Type.STRING: - this.readString(); - break; - case Type.STRUCT: - this.readStructBegin(); - while (true) { - var r = this.readFieldBegin(); - if (r.ftype === Type.STOP) { - break; - } - this.skip(r.ftype); - this.readFieldEnd(); - } - this.readStructEnd(); - break; - case Type.MAP: - var mapBegin = this.readMapBegin(); - for (var i = 0; i < mapBegin.size; ++i) { - this.skip(mapBegin.ktype); - this.skip(mapBegin.vtype); - } - this.readMapEnd(); - break; - case Type.SET: - var setBegin = this.readSetBegin(); - for (var i2 = 0; i2 < setBegin.size; ++i2) { - this.skip(setBegin.etype); - } - this.readSetEnd(); - break; - case Type.LIST: - var listBegin = this.readListBegin(); - for (var i3 = 0; i3 < listBegin.size; ++i3) { - this.skip(listBegin.etype); - } - this.readListEnd(); - break; - default: - throw new Error("Invalid type: " + type); - } -}; diff --git a/src/thrift/browser.js b/src/thrift/browser.js deleted file mode 100644 index 0b06f0f..0000000 --- a/src/thrift/browser.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -exports.Thrift = require('./thrift'); - -var wsConnection = require('./ws_connection'); -exports.WSConnection = wsConnection.WSConnection; -exports.createWSConnection = wsConnection.createWSConnection; -exports.createWSClient = wsConnection.createWSClient; - -var xhrConnection = require('./xhr_connection'); -exports.XHRConnection = xhrConnection.XHRConnection; -exports.createXHRConnection = xhrConnection.createXHRConnection; -exports.createXHRClient = xhrConnection.createXHRClient; - - -exports.Int64 = require('node-int64'); -exports.Q = require('q'); - -var mpxProtocol = require('./multiplexed_protocol'); -exports.Multiplexer = mpxProtocol.Multiplexer; - -/* - * Export transport and protocol so they can be used outside of a - * cassandra/server context - */ -exports.TBufferedTransport = require('./buffered_transport'); -exports.TFramedTransport = require('./framed_transport'); -exports.TWebSocketTransport = require('./ws_transport'); - -exports.Protocol = require('./json_protocol'); -exports.TJSONProtocol = require('./json_protocol'); -exports.TBinaryProtocol = require('./binary_protocol'); -exports.TCompactProtocol = require('./compact_protocol'); diff --git a/src/thrift/buffered_transport.js b/src/thrift/buffered_transport.js deleted file mode 100644 index 113e216..0000000 --- a/src/thrift/buffered_transport.js +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var binary = require('./binary'); -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); -var THeaderTransport = require('./header_transport'); - -module.exports = TBufferedTransport; - -function TBufferedTransport(buffer, callback) { - this.defaultReadBufferSize = 1024; - this.writeBufferSize = 512; // Soft Limit - this.inBuf = new Buffer(this.defaultReadBufferSize); - this.readCursor = 0; - this.writeCursor = 0; // for input buffer - this.outBuffers = []; - this.outCount = 0; - this.onFlush = callback; -}; - -TBufferedTransport.prototype = new THeaderTransport(); - -TBufferedTransport.prototype.reset = function() { - this.inBuf = new Buffer(this.defaultReadBufferSize); - this.readCursor = 0; - this.writeCursor = 0; - this.outBuffers = []; - this.outCount = 0; -} - -TBufferedTransport.receiver = function(callback, seqid) { - var reader = new TBufferedTransport(); - - return function(data) { - if (reader.writeCursor + data.length > reader.inBuf.length) { - var buf = new Buffer(reader.writeCursor + data.length); - reader.inBuf.copy(buf, 0, 0, reader.writeCursor); - reader.inBuf = buf; - } - data.copy(reader.inBuf, reader.writeCursor, 0); - reader.writeCursor += data.length; - - callback(reader, seqid); - }; -}; - - -TBufferedTransport.prototype.commitPosition = function(){ - var unreadSize = this.writeCursor - this.readCursor; - var bufSize = (unreadSize * 2 > this.defaultReadBufferSize) ? - unreadSize * 2 : this.defaultReadBufferSize; - var buf = new Buffer(bufSize); - if (unreadSize > 0) { - this.inBuf.copy(buf, 0, this.readCursor, this.writeCursor); - } - this.readCursor = 0; - this.writeCursor = unreadSize; - this.inBuf = buf; -}; - -TBufferedTransport.prototype.rollbackPosition = function(){ - this.readCursor = 0; -} - - // TODO: Implement open/close support -TBufferedTransport.prototype.isOpen = function() { - return true; -}; - -TBufferedTransport.prototype.open = function() { -}; - -TBufferedTransport.prototype.close = function() { -}; - - // Set the seqid of the message in the client - // So that callbacks can be found -TBufferedTransport.prototype.setCurrSeqId = function(seqid) { - this._seqid = seqid; -}; - -TBufferedTransport.prototype.ensureAvailable = function(len) { - if (this.readCursor + len > this.writeCursor) { - throw new InputBufferUnderrunError(); - } -}; - -TBufferedTransport.prototype.read = function(len) { - this.ensureAvailable(len); - var buf = new Buffer(len); - this.inBuf.copy(buf, 0, this.readCursor, this.readCursor + len); - this.readCursor += len; - return buf; -}; - -TBufferedTransport.prototype.readByte = function() { - this.ensureAvailable(1); - return binary.readByte(this.inBuf[this.readCursor++]); -}; - -TBufferedTransport.prototype.readI16 = function() { - this.ensureAvailable(2); - var i16 = binary.readI16(this.inBuf, this.readCursor); - this.readCursor += 2; - return i16; -}; - -TBufferedTransport.prototype.readI32 = function() { - this.ensureAvailable(4); - var i32 = binary.readI32(this.inBuf, this.readCursor); - this.readCursor += 4; - return i32; -}; - -TBufferedTransport.prototype.readDouble = function() { - this.ensureAvailable(8); - var d = binary.readDouble(this.inBuf, this.readCursor); - this.readCursor += 8; - return d; -}; - -TBufferedTransport.prototype.readString = function(len) { - this.ensureAvailable(len); - var str = this.inBuf.toString('utf8', this.readCursor, this.readCursor + len); - this.readCursor += len; - return str; -}; - -TBufferedTransport.prototype.borrow = function() { - var obj = {buf: this.inBuf, readIndex: this.readCursor, writeIndex: this.writeCursor}; - return obj; -}; - -TBufferedTransport.prototype.consume = function(bytesConsumed) { - this.readCursor += bytesConsumed; -}; - -TBufferedTransport.prototype.write = function(buf) { - if (typeof(buf) === "string") { - buf = new Buffer(buf, 'utf8'); - } - this.outBuffers.push(buf); - this.outCount += buf.length; -}; - -TBufferedTransport.prototype.flush = function() { - // If the seqid of the callback is available pass it to the onFlush - // Then remove the current seqid - var seqid = this._seqid; - this._seqid = null; - - if (this.outCount < 1) { - return; - } - - var msg = new Buffer(this.outCount), - pos = 0; - this.outBuffers.forEach(function(buf) { - buf.copy(msg, pos, 0); - pos += buf.length; - }); - - if (this.onFlush) { - // Passing seqid through this call to get it to the connection - this.onFlush(msg, seqid); - } - - this.outBuffers = []; - this.outCount = 0; -} diff --git a/src/thrift/compact_protocol.js b/src/thrift/compact_protocol.js deleted file mode 100644 index 302a88d..0000000 --- a/src/thrift/compact_protocol.js +++ /dev/null @@ -1,915 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var log = require('./log'); -var Int64 = require('node-int64'); -var Thrift = require('./thrift'); -var Type = Thrift.Type; - -module.exports = TCompactProtocol; - -var POW_8 = Math.pow(2, 8); -var POW_24 = Math.pow(2, 24); -var POW_32 = Math.pow(2, 32); -var POW_40 = Math.pow(2, 40); -var POW_48 = Math.pow(2, 48); -var POW_52 = Math.pow(2, 52); -var POW_1022 = Math.pow(2, 1022); - -/** - * Constructor Function for the Compact Protocol. - * @constructor - * @param {object} [trans] - The underlying transport to read/write. - * @classdesc The Apache Thrift Protocol layer performs serialization - * of base types, the compact protocol serializes data in binary - * form with minimal space used for scalar values. - */ -function TCompactProtocol(trans) { - this.trans = trans; - this.lastField_ = []; - this.lastFieldId_ = 0; - this.string_limit_ = 0; - this.string_buf_ = null; - this.string_buf_size_ = 0; - this.container_limit_ = 0; - this.booleanField_ = { - name: null, - hasBoolValue: false - }; - this.boolValue_ = { - hasBoolValue: false, - boolValue: false - }; -}; - - -// -// Compact Protocol Constants -// - -/** - * Compact Protocol ID number. - * @readonly - * @const {number} PROTOCOL_ID - */ -TCompactProtocol.PROTOCOL_ID = -126; //1000 0010 - -/** - * Compact Protocol version number. - * @readonly - * @const {number} VERSION_N - */ -TCompactProtocol.VERSION_N = 1; - -/** - * Compact Protocol version mask for combining protocol version and message type in one byte. - * @readonly - * @const {number} VERSION_MASK - */ -TCompactProtocol.VERSION_MASK = 0x1f; //0001 1111 - -/** - * Compact Protocol message type mask for combining protocol version and message type in one byte. - * @readonly - * @const {number} TYPE_MASK - */ -TCompactProtocol.TYPE_MASK = -32; //1110 0000 - -/** - * Compact Protocol message type bits for ensuring message type bit size. - * @readonly - * @const {number} TYPE_BITS - */ -TCompactProtocol.TYPE_BITS = 7; //0000 0111 - -/** - * Compact Protocol message type shift amount for combining protocol version and message type in one byte. - * @readonly - * @const {number} TYPE_SHIFT_AMOUNT - */ -TCompactProtocol.TYPE_SHIFT_AMOUNT = 5; - -/** - * Compact Protocol type IDs used to keep type data within one nibble. - * @readonly - * @property {number} CT_STOP - End of a set of fields. - * @property {number} CT_BOOLEAN_TRUE - Flag for Boolean field with true value (packed field and value). - * @property {number} CT_BOOLEAN_FALSE - Flag for Boolean field with false value (packed field and value). - * @property {number} CT_BYTE - Signed 8 bit integer. - * @property {number} CT_I16 - Signed 16 bit integer. - * @property {number} CT_I32 - Signed 32 bit integer. - * @property {number} CT_I64 - Signed 64 bit integer (2^53 max in JavaScript). - * @property {number} CT_DOUBLE - 64 bit IEEE 854 floating point. - * @property {number} CT_BINARY - Array of bytes (used for strings also). - * @property {number} CT_LIST - A collection type (unordered). - * @property {number} CT_SET - A collection type (unordered and without repeated values). - * @property {number} CT_MAP - A collection type (map/associative-array/dictionary). - * @property {number} CT_STRUCT - A multifield type. - */ -TCompactProtocol.Types = { - CT_STOP: 0x00, - CT_BOOLEAN_TRUE: 0x01, - CT_BOOLEAN_FALSE: 0x02, - CT_BYTE: 0x03, - CT_I16: 0x04, - CT_I32: 0x05, - CT_I64: 0x06, - CT_DOUBLE: 0x07, - CT_BINARY: 0x08, - CT_LIST: 0x09, - CT_SET: 0x0A, - CT_MAP: 0x0B, - CT_STRUCT: 0x0C -}; - -/** - * Array mapping Compact type IDs to standard Thrift type IDs. - * @readonly - */ -TCompactProtocol.TTypeToCType = [ - TCompactProtocol.Types.CT_STOP, // T_STOP - 0, // unused - TCompactProtocol.Types.CT_BOOLEAN_TRUE, // T_BOOL - TCompactProtocol.Types.CT_BYTE, // T_BYTE - TCompactProtocol.Types.CT_DOUBLE, // T_DOUBLE - 0, // unused - TCompactProtocol.Types.CT_I16, // T_I16 - 0, // unused - TCompactProtocol.Types.CT_I32, // T_I32 - 0, // unused - TCompactProtocol.Types.CT_I64, // T_I64 - TCompactProtocol.Types.CT_BINARY, // T_STRING - TCompactProtocol.Types.CT_STRUCT, // T_STRUCT - TCompactProtocol.Types.CT_MAP, // T_MAP - TCompactProtocol.Types.CT_SET, // T_SET - TCompactProtocol.Types.CT_LIST, // T_LIST -]; - - -// -// Compact Protocol Utilities -// - -/** - * Returns the underlying transport layer. - * @return {object} The underlying transport layer. - */TCompactProtocol.prototype.getTransport = function() { - return this.trans; -}; - -/** - * Lookup a Compact Protocol Type value for a given Thrift Type value. - * N.B. Used only internally. - * @param {number} ttype - Thrift type value - * @returns {number} Compact protocol type value - */ -TCompactProtocol.prototype.getCompactType = function(ttype) { - return TCompactProtocol.TTypeToCType[ttype]; -}; - -/** - * Lookup a Thrift Type value for a given Compact Protocol Type value. - * N.B. Used only internally. - * @param {number} type - Compact Protocol type value - * @returns {number} Thrift Type value - */ -TCompactProtocol.prototype.getTType = function(type) { - switch (type) { - case Type.STOP: - return Type.STOP; - case TCompactProtocol.Types.CT_BOOLEAN_FALSE: - case TCompactProtocol.Types.CT_BOOLEAN_TRUE: - return Type.BOOL; - case TCompactProtocol.Types.CT_BYTE: - return Type.BYTE; - case TCompactProtocol.Types.CT_I16: - return Type.I16; - case TCompactProtocol.Types.CT_I32: - return Type.I32; - case TCompactProtocol.Types.CT_I64: - return Type.I64; - case TCompactProtocol.Types.CT_DOUBLE: - return Type.DOUBLE; - case TCompactProtocol.Types.CT_BINARY: - return Type.STRING; - case TCompactProtocol.Types.CT_LIST: - return Type.LIST; - case TCompactProtocol.Types.CT_SET: - return Type.SET; - case TCompactProtocol.Types.CT_MAP: - return Type.MAP; - case TCompactProtocol.Types.CT_STRUCT: - return Type.STRUCT; - default: - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.INVALID_DATA, "Unknown type: " + type); - } - return Type.STOP; -}; - - -// -// Compact Protocol write operations -// - -/** - * Send any buffered bytes to the end point. - */ -TCompactProtocol.prototype.flush = function() { - return this.trans.flush(); -}; - -/** - * Writes an RPC message header - * @param {string} name - The method name for the message. - * @param {number} type - The type of message (CALL, REPLY, EXCEPTION, ONEWAY). - * @param {number} seqid - The call sequence number (if any). - */ -TCompactProtocol.prototype.writeMessageBegin = function(name, type, seqid) { - this.writeByte(TCompactProtocol.PROTOCOL_ID); - this.writeByte((TCompactProtocol.VERSION_N & TCompactProtocol.VERSION_MASK) | - ((type << TCompactProtocol.TYPE_SHIFT_AMOUNT) & TCompactProtocol.TYPE_MASK)); - this.writeVarint32(seqid); - this.writeString(name); - - // Record client seqid to find callback again - if (this._seqid) { - log.warning('SeqId already set', { 'name': name }); - } else { - this._seqid = seqid; - this.trans.setCurrSeqId(seqid); - } -}; - -TCompactProtocol.prototype.writeMessageEnd = function() { -}; - -TCompactProtocol.prototype.writeStructBegin = function(name) { - this.lastField_.push(this.lastFieldId_); - this.lastFieldId_ = 0; -}; - -TCompactProtocol.prototype.writeStructEnd = function() { - this.lastFieldId_ = this.lastField_.pop(); -}; - -/** - * Writes a struct field header - * @param {string} name - The field name (not written with the compact protocol). - * @param {number} type - The field data type (a normal Thrift field Type). - * @param {number} id - The IDL field Id. - */ -TCompactProtocol.prototype.writeFieldBegin = function(name, type, id) { - if (type != Type.BOOL) { - return this.writeFieldBeginInternal(name, type, id, -1); - } - - this.booleanField_.name = name; - this.booleanField_.fieldType = type; - this.booleanField_.fieldId = id; -}; - -TCompactProtocol.prototype.writeFieldEnd = function() { -}; - -TCompactProtocol.prototype.writeFieldStop = function() { - this.writeByte(TCompactProtocol.Types.CT_STOP); -}; - -/** - * Writes a map collection header - * @param {number} keyType - The Thrift type of the map keys. - * @param {number} valType - The Thrift type of the map values. - * @param {number} size - The number of k/v pairs in the map. - */ -TCompactProtocol.prototype.writeMapBegin = function(keyType, valType, size) { - if (size === 0) { - this.writeByte(0); - } else { - this.writeVarint32(size); - this.writeByte(this.getCompactType(keyType) << 4 | this.getCompactType(valType)); - } -}; - -TCompactProtocol.prototype.writeMapEnd = function() { -}; - -/** - * Writes a list collection header - * @param {number} elemType - The Thrift type of the list elements. - * @param {number} size - The number of elements in the list. - */ -TCompactProtocol.prototype.writeListBegin = function(elemType, size) { - this.writeCollectionBegin(elemType, size); -}; - -TCompactProtocol.prototype.writeListEnd = function() { -}; - -/** - * Writes a set collection header - * @param {number} elemType - The Thrift type of the set elements. - * @param {number} size - The number of elements in the set. - */ -TCompactProtocol.prototype.writeSetBegin = function(elemType, size) { - this.writeCollectionBegin(elemType, size); -}; - -TCompactProtocol.prototype.writeSetEnd = function() { -}; - -TCompactProtocol.prototype.writeBool = function(value) { - if (this.booleanField_.name !== null) { - // we haven't written the field header yet - this.writeFieldBeginInternal(this.booleanField_.name, - this.booleanField_.fieldType, - this.booleanField_.fieldId, - (value ? TCompactProtocol.Types.CT_BOOLEAN_TRUE - : TCompactProtocol.Types.CT_BOOLEAN_FALSE)); - this.booleanField_.name = null; - } else { - // we're not part of a field, so just write the value - this.writeByte((value ? TCompactProtocol.Types.CT_BOOLEAN_TRUE - : TCompactProtocol.Types.CT_BOOLEAN_FALSE)); - } -}; - -TCompactProtocol.prototype.writeByte = function(b) { - this.trans.write(new Buffer([b])); -}; - -TCompactProtocol.prototype.writeI16 = function(i16) { - this.writeVarint32(this.i32ToZigzag(i16)); -}; - -TCompactProtocol.prototype.writeI32 = function(i32) { - this.writeVarint32(this.i32ToZigzag(i32)); -}; - -TCompactProtocol.prototype.writeI64 = function(i64) { - this.writeVarint64(this.i64ToZigzag(i64)); -}; - -// Little-endian, unlike TBinaryProtocol -TCompactProtocol.prototype.writeDouble = function(v) { - var buff = new Buffer(8); - var m, e, c; - - buff[7] = (v < 0 ? 0x80 : 0x00); - - v = Math.abs(v); - if (v !== v) { - // NaN, use QNaN IEEE format - m = 2251799813685248; - e = 2047; - } else if (v === Infinity) { - m = 0; - e = 2047; - } else { - e = Math.floor(Math.log(v) / Math.LN2); - c = Math.pow(2, -e); - if (v * c < 1) { - e--; - c *= 2; - } - - if (e + 1023 >= 2047) - { - // Overflow - m = 0; - e = 2047; - } - else if (e + 1023 >= 1) - { - // Normalized - term order matters, as Math.pow(2, 52-e) and v*Math.pow(2, 52) can overflow - m = (v*c-1) * POW_52; - e += 1023; - } - else - { - // Denormalized - also catches the '0' case, somewhat by chance - m = (v * POW_1022) * POW_52; - e = 0; - } - } - - buff[6] = (e << 4) & 0xf0; - buff[7] |= (e >> 4) & 0x7f; - - buff[0] = m & 0xff; - m = Math.floor(m / POW_8); - buff[1] = m & 0xff; - m = Math.floor(m / POW_8); - buff[2] = m & 0xff; - m = Math.floor(m / POW_8); - buff[3] = m & 0xff; - m >>= 8; - buff[4] = m & 0xff; - m >>= 8; - buff[5] = m & 0xff; - m >>= 8; - buff[6] |= m & 0x0f; - - this.trans.write(buff); -}; - -TCompactProtocol.prototype.writeStringOrBinary = function(name, encoding, arg) { - if (typeof arg === 'string') { - this.writeVarint32(Buffer.byteLength(arg, encoding)) ; - this.trans.write(new Buffer(arg, encoding)); - } else if (arg instanceof Buffer || - Object.prototype.toString.call(arg) == '[object Uint8Array]') { - // Buffers in Node.js under Browserify may extend UInt8Array instead of - // defining a new object. We detect them here so we can write them - // correctly - this.writeVarint32(arg.length); - this.trans.write(arg); - } else { - throw new Error(name + ' called without a string/Buffer argument: ' + arg); - } -}; - -TCompactProtocol.prototype.writeString = function(arg) { - this.writeStringOrBinary('writeString', 'utf8', arg); -}; - -TCompactProtocol.prototype.writeBinary = function(arg) { - this.writeStringOrBinary('writeBinary', 'binary', arg); -}; - - -// -// Compact Protocol internal write methods -// - -TCompactProtocol.prototype.writeFieldBeginInternal = function(name, - fieldType, - fieldId, - typeOverride) { - //If there's a type override, use that. - var typeToWrite = (typeOverride == -1 ? this.getCompactType(fieldType) : typeOverride); - //Check if we can delta encode the field id - if (fieldId > this.lastFieldId_ && fieldId - this.lastFieldId_ <= 15) { - //Include the type delta with the field ID - this.writeByte((fieldId - this.lastFieldId_) << 4 | typeToWrite); - } else { - //Write separate type and ID values - this.writeByte(typeToWrite); - this.writeI16(fieldId); - } - this.lastFieldId_ = fieldId; -}; - -TCompactProtocol.prototype.writeCollectionBegin = function(elemType, size) { - if (size <= 14) { - //Combine size and type in one byte if possible - this.writeByte(size << 4 | this.getCompactType(elemType)); - } else { - this.writeByte(0xf0 | this.getCompactType(elemType)); - this.writeVarint32(size); - } -}; - -/** - * Write an i32 as a varint. Results in 1-5 bytes on the wire. - */ -TCompactProtocol.prototype.writeVarint32 = function(n) { - var buf = new Buffer(5); - var wsize = 0; - while (true) { - if ((n & ~0x7F) === 0) { - buf[wsize++] = n; - break; - } else { - buf[wsize++] = ((n & 0x7F) | 0x80); - n = n >>> 7; - } - } - var wbuf = new Buffer(wsize); - buf.copy(wbuf,0,0,wsize); - this.trans.write(wbuf); -}; - -/** - * Write an i64 as a varint. Results in 1-10 bytes on the wire. - * N.B. node-int64 is always big endian - */ -TCompactProtocol.prototype.writeVarint64 = function(n) { - if (typeof n === "number"){ - n = new Int64(n); - } - if (! (n instanceof Int64)) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.INVALID_DATA, "Expected Int64 or Number, found: " + n); - } - - var buf = new Buffer(10); - var wsize = 0; - var hi = n.buffer.readUInt32BE(0, true); - var lo = n.buffer.readUInt32BE(4, true); - var mask = 0; - while (true) { - if (((lo & ~0x7F) === 0) && (hi === 0)) { - buf[wsize++] = lo; - break; - } else { - buf[wsize++] = ((lo & 0x7F) | 0x80); - mask = hi << 25; - lo = lo >>> 7; - hi = hi >>> 7; - lo = lo | mask; - } - } - var wbuf = new Buffer(wsize); - buf.copy(wbuf,0,0,wsize); - this.trans.write(wbuf); -}; - -/** - * Convert l into a zigzag long. This allows negative numbers to be - * represented compactly as a varint. - */ -TCompactProtocol.prototype.i64ToZigzag = function(l) { - if (typeof l === 'string') { - l = new Int64(parseInt(l, 10)); - } else if (typeof l === 'number') { - l = new Int64(l); - } - if (! (l instanceof Int64)) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.INVALID_DATA, "Expected Int64 or Number, found: " + l); - } - var hi = l.buffer.readUInt32BE(0, true); - var lo = l.buffer.readUInt32BE(4, true); - var sign = hi >>> 31; - hi = ((hi << 1) | (lo >>> 31)) ^ ((!!sign) ? 0xFFFFFFFF : 0); - lo = (lo << 1) ^ ((!!sign) ? 0xFFFFFFFF : 0); - return new Int64(hi, lo); -}; - -/** - * Convert n into a zigzag int. This allows negative numbers to be - * represented compactly as a varint. - */ -TCompactProtocol.prototype.i32ToZigzag = function(n) { - return (n << 1) ^ ((n & 0x80000000) ? 0xFFFFFFFF : 0); -}; - - -// -// Compact Protocol read operations -// - -TCompactProtocol.prototype.readMessageBegin = function() { - //Read protocol ID - var protocolId = this.trans.readByte(); - if (protocolId != TCompactProtocol.PROTOCOL_ID) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.BAD_VERSION, "Bad protocol identifier " + protocolId); - } - - //Read Version and Type - var versionAndType = this.trans.readByte(); - var version = (versionAndType & TCompactProtocol.VERSION_MASK); - if (version != TCompactProtocol.VERSION_N) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.BAD_VERSION, "Bad protocol version " + version); - } - var type = ((versionAndType >> TCompactProtocol.TYPE_SHIFT_AMOUNT) & TCompactProtocol.TYPE_BITS); - - //Read SeqId - var seqid = this.readVarint32(); - - //Read name - var name = this.readString(); - - return {fname: name, mtype: type, rseqid: seqid}; -}; - -TCompactProtocol.prototype.readMessageEnd = function() { -}; - -TCompactProtocol.prototype.readStructBegin = function() { - this.lastField_.push(this.lastFieldId_); - this.lastFieldId_ = 0; - return {fname: ''}; -}; - -TCompactProtocol.prototype.readStructEnd = function() { - this.lastFieldId_ = this.lastField_.pop(); -}; - -TCompactProtocol.prototype.readFieldBegin = function() { - var fieldId = 0; - var b = this.trans.readByte(b); - var type = (b & 0x0f); - - if (type == TCompactProtocol.Types.CT_STOP) { - return {fname: null, ftype: Thrift.Type.STOP, fid: 0}; - } - - //Mask off the 4 MSB of the type header to check for field id delta. - var modifier = ((b & 0x000000f0) >>> 4); - if (modifier === 0) { - //If not a delta read the field id. - fieldId = this.readI16(); - } else { - //Recover the field id from the delta - fieldId = (this.lastFieldId_ + modifier); - } - var fieldType = this.getTType(type); - - //Boolean are encoded with the type - if (type == TCompactProtocol.Types.CT_BOOLEAN_TRUE || - type == TCompactProtocol.Types.CT_BOOLEAN_FALSE) { - this.boolValue_.hasBoolValue = true; - this.boolValue_.boolValue = - (type == TCompactProtocol.Types.CT_BOOLEAN_TRUE ? true : false); - } - - //Save the new field for the next delta computation. - this.lastFieldId_ = fieldId; - return {fname: null, ftype: fieldType, fid: fieldId}; -}; - -TCompactProtocol.prototype.readFieldEnd = function() { -}; - -TCompactProtocol.prototype.readMapBegin = function() { - var msize = this.readVarint32(); - if (msize < 0) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.NEGATIVE_SIZE, "Negative map size"); - } - - var kvType = 0; - if (msize !== 0) { - kvType = this.trans.readByte(); - } - - var keyType = this.getTType((kvType & 0xf0) >>> 4); - var valType = this.getTType(kvType & 0xf); - return {ktype: keyType, vtype: valType, size: msize}; -}; - -TCompactProtocol.prototype.readMapEnd = function() { -}; - -TCompactProtocol.prototype.readListBegin = function() { - var size_and_type = this.trans.readByte(); - - var lsize = (size_and_type >>> 4) & 0x0000000f; - if (lsize == 15) { - lsize = this.readVarint32(); - } - - if (lsize < 0) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.NEGATIVE_SIZE, "Negative list size"); - } - - var elemType = this.getTType(size_and_type & 0x0000000f); - - return {etype: elemType, size: lsize}; -}; - -TCompactProtocol.prototype.readListEnd = function() { -}; - -TCompactProtocol.prototype.readSetBegin = function() { - return this.readListBegin(); -}; - -TCompactProtocol.prototype.readSetEnd = function() { -}; - -TCompactProtocol.prototype.readBool = function() { - var value = false; - var rsize = 0; - if (this.boolValue_.hasBoolValue === true) { - value = this.boolValue_.boolValue; - this.boolValue_.hasBoolValue = false; - } else { - var res = this.trans.readByte(); - rsize = res.rsize; - value = (res.value == TCompactProtocol.Types.CT_BOOLEAN_TRUE); - } - return value; -}; - -TCompactProtocol.prototype.readByte = function() { - return this.trans.readByte(); -}; - -TCompactProtocol.prototype.readI16 = function() { - return this.readI32(); -}; - -TCompactProtocol.prototype.readI32 = function() { - return this.zigzagToI32(this.readVarint32()); -}; - -TCompactProtocol.prototype.readI64 = function() { - return this.zigzagToI64(this.readVarint64()); -}; - -// Little-endian, unlike TBinaryProtocol -TCompactProtocol.prototype.readDouble = function() { - var buff = this.trans.read(8); - var off = 0; - - var signed = buff[off + 7] & 0x80; - var e = (buff[off+6] & 0xF0) >> 4; - e += (buff[off+7] & 0x7F) << 4; - - var m = buff[off]; - m += buff[off+1] << 8; - m += buff[off+2] << 16; - m += buff[off+3] * POW_24; - m += buff[off+4] * POW_32; - m += buff[off+5] * POW_40; - m += (buff[off+6] & 0x0F) * POW_48; - - switch (e) { - case 0: - e = -1022; - break; - case 2047: - return m ? NaN : (signed ? -Infinity : Infinity); - default: - m += POW_52; - e -= 1023; - } - - if (signed) { - m *= -1; - } - - return m * Math.pow(2, e - 52); -}; - -TCompactProtocol.prototype.readBinary = function() { - var size = this.readVarint32(); - if (size === 0) { - return new Buffer(0); - } - - if (size < 0) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.NEGATIVE_SIZE, "Negative binary size"); - } - return this.trans.read(size); -}; - -TCompactProtocol.prototype.readString = function() { - var size = this.readVarint32(); - // Catch empty string case - if (size === 0) { - return ""; - } - - // Catch error cases - if (size < 0) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.NEGATIVE_SIZE, "Negative string size"); - } - return this.trans.readString(size); -}; - - -// -// Compact Protocol internal read operations -// - -/** - * Read an i32 from the wire as a varint. The MSB of each byte is set - * if there is another byte to follow. This can read up to 5 bytes. - */ -TCompactProtocol.prototype.readVarint32 = function() { - return this.readVarint64().toNumber(); -}; - -/** - * Read an i64 from the wire as a proper varint. The MSB of each byte is set - * if there is another byte to follow. This can read up to 10 bytes. - */ -TCompactProtocol.prototype.readVarint64 = function() { - var rsize = 0; - var lo = 0; - var hi = 0; - var shift = 0; - while (true) { - var b = this.trans.readByte(); - rsize ++; - if (shift <= 25) { - lo = lo | ((b & 0x7f) << shift); - } else if (25 < shift && shift < 32) { - lo = lo | ((b & 0x7f) << shift); - hi = hi | ((b & 0x7f) >>> (32-shift)); - } else { - hi = hi | ((b & 0x7f) << (shift-32)); - } - shift += 7; - if (!(b & 0x80)) { - break; - } - if (rsize >= 10) { - throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.INVALID_DATA, "Variable-length int over 10 bytes."); - } - } - return new Int64(hi, lo); -}; - -/** - * Convert from zigzag int to int. - */ -TCompactProtocol.prototype.zigzagToI32 = function(n) { - return (n >>> 1) ^ (-1 * (n & 1)); -}; - -/** - * Convert from zigzag long to long. - */ -TCompactProtocol.prototype.zigzagToI64 = function(n) { - var hi = n.buffer.readUInt32BE(0, true); - var lo = n.buffer.readUInt32BE(4, true); - - var neg = new Int64(hi & 0, lo & 1); - neg._2scomp(); - var hi_neg = neg.buffer.readUInt32BE(0, true); - var lo_neg = neg.buffer.readUInt32BE(4, true); - - var hi_lo = (hi << 31); - hi = (hi >>> 1) ^ (hi_neg); - lo = ((lo >>> 1) | hi_lo) ^ (lo_neg); - return new Int64(hi, lo); -}; - -TCompactProtocol.prototype.skip = function(type) { - switch (type) { - case Type.BOOL: - this.readBool(); - break; - case Type.BYTE: - this.readByte(); - break; - case Type.I16: - this.readI16(); - break; - case Type.I32: - this.readI32(); - break; - case Type.I64: - this.readI64(); - break; - case Type.DOUBLE: - this.readDouble(); - break; - case Type.STRING: - this.readString(); - break; - case Type.STRUCT: - this.readStructBegin(); - while (true) { - var r = this.readFieldBegin(); - if (r.ftype === Type.STOP) { - break; - } - this.skip(r.ftype); - this.readFieldEnd(); - } - this.readStructEnd(); - break; - case Type.MAP: - var mapBegin = this.readMapBegin(); - for (var i = 0; i < mapBegin.size; ++i) { - this.skip(mapBegin.ktype); - this.skip(mapBegin.vtype); - } - this.readMapEnd(); - break; - case Type.SET: - var setBegin = this.readSetBegin(); - for (var i2 = 0; i2 < setBegin.size; ++i2) { - this.skip(setBegin.etype); - } - this.readSetEnd(); - break; - case Type.LIST: - var listBegin = this.readListBegin(); - for (var i3 = 0; i3 < listBegin.size; ++i3) { - this.skip(listBegin.etype); - } - this.readListEnd(); - break; - default: - throw new Error("Invalid type: " + type); - } -}; diff --git a/src/thrift/connection.js b/src/thrift/connection.js deleted file mode 100644 index 561ee10..0000000 --- a/src/thrift/connection.js +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var util = require('util'); -var EventEmitter = require('events').EventEmitter; -var constants = require('constants'); -var net = require('net'); -var tls = require('tls'); -var thrift = require('./thrift'); -var log = require('./log'); - -var TBufferedTransport = require('./buffered_transport'); -var TBinaryProtocol = require('./binary_protocol'); -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); - -var createClient = require('./create_client'); - -var binary = require('./binary'); - -var Connection = exports.Connection = function(stream, options) { - var self = this; - EventEmitter.call(this); - - this.seqId2Service = {}; - this.connection = stream; - this.ssl = (stream.encrypted); - this.options = options || {}; - this.transport = this.options.transport || TBufferedTransport; - this.protocol = this.options.protocol || TBinaryProtocol; - this.offline_queue = []; - this.connected = false; - this.forceClose = false; - this.initialize_retry_vars(); - - this._debug = this.options.debug || false; - if (this.options.max_attempts && - !isNaN(this.options.max_attempts) && - this.options.max_attempts > 0) { - this.max_attempts = +this.options.max_attempts; - } - this.retry_max_delay = null; - if (this.options.retry_max_delay !== undefined && - !isNaN(this.options.retry_max_delay) && - this.options.retry_max_delay > 0) { - this.retry_max_delay = this.options.retry_max_delay; - } - this.connect_timeout = false; - if (this.options.connect_timeout && - !isNaN(this.options.connect_timeout) && - this.options.connect_timeout > 0) { - this.connect_timeout = +this.options.connect_timeout; - } - - this.connection.addListener(this.ssl ? "secureConnect" : "connect", function() { - self.connected = true; - - this.setTimeout(self.options.timeout || 0); - this.setNoDelay(); - this.frameLeft = 0; - this.framePos = 0; - this.frame = null; - self.initialize_retry_vars(); - self.flush_offline_queue(); - - self.emit("connect"); - }); - - this.connection.addListener("error", function(err) { - // Only emit the error if no-one else is listening on the connection - // or if someone is listening on us, because Node turns unhandled - // 'error' events into exceptions. - if (self.connection.listeners('error').length === 1 || - self.listeners('error').length > 0) { - self.emit("error", err); - } - }); - - // Add a close listener - this.connection.addListener("close", function() { - self.connection_gone(); // handle close event. try to reconnect - }); - - this.connection.addListener("timeout", function() { - self.emit("timeout"); - }); - - this.connection.addListener("data", self.transport.receiver(function(transport_with_data) { - var message = new self.protocol(transport_with_data); - try { - while (true) { - var header = message.readMessageBegin(); - var dummy_seqid = header.rseqid * -1; - var client = self.client; - //The Multiplexed Protocol stores a hash of seqid to service names - // in seqId2Service. If the SeqId is found in the hash we need to - // lookup the appropriate client for this call. - // The connection.client object is a single client object when not - // multiplexing, when using multiplexing it is a service name keyed - // hash of client objects. - //NOTE: The 2 way interdependencies between protocols, transports, - // connections and clients in the Node.js implementation are irregular - // and make the implementation difficult to extend and maintain. We - // should bring this stuff inline with typical thrift I/O stack - // operation soon. - // --ra - var service_name = self.seqId2Service[header.rseqid]; - if (service_name) { - client = self.client[service_name]; - } - /*jshint -W083 */ - client._reqs[dummy_seqid] = function(err, success){ - transport_with_data.commitPosition(); - - var callback = client._reqs[header.rseqid]; - delete client._reqs[header.rseqid]; - if (service_name) { - delete self.seqId2Service[header.rseqid]; - } - if (callback) { - callback(err, success); - } - }; - /*jshint +W083 */ - - if(client['recv_' + header.fname]) { - client['recv_' + header.fname](message, header.mtype, dummy_seqid); - } else { - delete client._reqs[dummy_seqid]; - self.emit("error", - new thrift.TApplicationException(thrift.TApplicationExceptionType.WRONG_METHOD_NAME, - "Received a response to an unknown RPC function")); - } - } - } - catch (e) { - if (e instanceof InputBufferUnderrunError) { - transport_with_data.rollbackPosition(); - } - else { - self.emit('error', e); - } - } - })); -}; -util.inherits(Connection, EventEmitter); - -Connection.prototype.end = function() { - this.forceClose = true - this.connection.end(); -}; - -Connection.prototype.destroy = function() { - this.connection.destroy(); -}; - -Connection.prototype.initialize_retry_vars = function () { - this.retry_timer = null; - this.retry_totaltime = 0; - this.retry_delay = 150; - this.retry_backoff = 1.7; - this.attempts = 0; -}; - -Connection.prototype.flush_offline_queue = function () { - var self = this; - var offline_queue = this.offline_queue; - - // Reset offline queue - this.offline_queue = []; - // Attempt to write queued items - offline_queue.forEach(function(data) { - self.write(data); - }); -}; - -Connection.prototype.write = function(data) { - if (!this.connected) { - this.offline_queue.push(data); - return; - } - this.connection.write(data); -}; - -Connection.prototype.connection_gone = function () { - var self = this; - this.connected = false; - - if(this.forceClose){ - if (this.retry_timer) { - clearTimeout(this.retry_timer); - this.retry_timer = null; - } - self.emit("close"); - return; - } - - // If a retry is already in progress, just let that happen - if (this.retry_timer) { - return; - } - // We cannot reconnect a secure socket. - if (!this.max_attempts || this.ssl) { - self.emit("close"); - return; - } - - if (this.retry_max_delay !== null && this.retry_delay >= this.retry_max_delay) { - this.retry_delay = this.retry_max_delay; - } else { - this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff); - } - - log.debug("Retry connection in " + this.retry_delay + " ms"); - - if (this.max_attempts && this.attempts >= this.max_attempts) { - this.retry_timer = null; - console.error("thrift: Couldn't get thrift connection after " + this.max_attempts + " attempts."); - self.emit("close"); - return; - } - - this.attempts += 1; - this.emit("reconnecting", { - delay: self.retry_delay, - attempt: self.attempts - }); - - this.retry_timer = setTimeout(function () { - // if (self.connection.destroyed) { - // self.retry_timer = null; - // return; - // } - - log.debug("Retrying connection..."); - - self.retry_totaltime += self.retry_delay; - - if (self.connect_timeout && self.retry_totaltime >= self.connect_timeout) { - self.retry_timer = null; - console.error("thrift: Couldn't get thrift connection after " + self.retry_totaltime + "ms."); - self.emit("close"); - return; - } - - if (self.path !== undefined) { - self.connection.connect(self.path); - } else { - self.connection.connect(self.port, self.host); - } - self.retry_timer = null; - }, this.retry_delay); -}; - -exports.createConnection = function(host, port, options) { - var stream = net.createConnection( { - port: port, - host: host, - timeout: options.connect_timeout || options.timeout || 0 - }); - var connection = new Connection(stream, options); - connection.host = host; - connection.port = port; - - return connection; -}; - -exports.createUDSConnection = function(path, options) { - var stream = net.createConnection(path); - var connection = new Connection(stream, options); - connection.path = path; - - return connection; -}; - -exports.createSSLConnection = function(host, port, options) { - if (!('secureProtocol' in options) && !('secureOptions' in options)) { - options.secureProtocol = "SSLv23_method"; - options.secureOptions = constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3; - } - - var stream = tls.connect(port, host, options); - var connection = new Connection(stream, options); - connection.host = host; - connection.port = port; - - return connection; -}; - - -exports.createClient = createClient; - -var child_process = require('child_process'); -var StdIOConnection = exports.StdIOConnection = function(command, options) { - var command_parts = command.split(' '); - command = command_parts[0]; - var args = command_parts.splice(1,command_parts.length -1); - var child = this.child = child_process.spawn(command,args); - - var self = this; - EventEmitter.call(this); - - this.connection = child.stdin; - this.options = options || {}; - this.transport = this.options.transport || TBufferedTransport; - this.protocol = this.options.protocol || TBinaryProtocol; - this.offline_queue = []; - - if (log.getLogLevel() === 'debug') { - this.child.stderr.on('data', function (err) { - log.debug(err.toString(), 'CHILD ERROR'); - }); - - this.child.on('exit', function (code,signal) { - log.debug(code + ':' + signal, 'CHILD EXITED'); - }); - } - - this.frameLeft = 0; - this.framePos = 0; - this.frame = null; - this.connected = true; - - self.flush_offline_queue(); - - this.connection.addListener("error", function(err) { - self.emit("error", err); - }); - - // Add a close listener - this.connection.addListener("close", function() { - self.emit("close"); - }); - - child.stdout.addListener("data", self.transport.receiver(function(transport_with_data) { - var message = new self.protocol(transport_with_data); - try { - var header = message.readMessageBegin(); - var dummy_seqid = header.rseqid * -1; - var client = self.client; - client._reqs[dummy_seqid] = function(err, success){ - transport_with_data.commitPosition(); - - var callback = client._reqs[header.rseqid]; - delete client._reqs[header.rseqid]; - if (callback) { - callback(err, success); - } - }; - client['recv_' + header.fname](message, header.mtype, dummy_seqid); - } - catch (e) { - if (e instanceof InputBufferUnderrunError) { - transport_with_data.rollbackPosition(); - } - else { - throw e; - } - } - })); -}; - -util.inherits(StdIOConnection, EventEmitter); - -StdIOConnection.prototype.end = function() { - this.connection.end(); -}; - -StdIOConnection.prototype.flush_offline_queue = function () { - var self = this; - var offline_queue = this.offline_queue; - - // Reset offline queue - this.offline_queue = []; - // Attempt to write queued items - offline_queue.forEach(function(data) { - self.write(data); - }); -}; - -StdIOConnection.prototype.write = function(data) { - if (!this.connected) { - this.offline_queue.push(data); - return; - } - this.connection.write(data); -}; - -exports.createStdIOConnection = function(command,options){ - return new StdIOConnection(command,options); -}; - -exports.createStdIOClient = createClient; diff --git a/src/thrift/create_client.js b/src/thrift/create_client.js deleted file mode 100644 index d6b77a8..0000000 --- a/src/thrift/create_client.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -module.exports = createClient; - -/** - * Creates a new client object for the specified Thrift service. - * @param {object} ServiceClient - The module containing the generated service client - * @param {Connection} Connection - The connection to use. - * @returns {object} The client object. - */ -function createClient(ServiceClient, connection) { - // TODO validate required options and throw otherwise - if (ServiceClient.Client) { - ServiceClient = ServiceClient.Client; - } - // TODO detangle these initialization calls - // creating "client" requires - // - new service client instance - // - // New service client instance requires - // - new transport instance - // - protocol class reference - // - // New transport instance requires - // - Buffer to use (or none) - // - Callback to call on flush - - // Wrap the write method - var writeCb = function(buf, seqid) { - connection.write(buf, seqid); - }; - var transport = new connection.transport(undefined, writeCb); - var client = new ServiceClient(transport, connection.protocol); - transport.client = client; - connection.client = client; - return client; -}; diff --git a/src/thrift/framed_transport.js b/src/thrift/framed_transport.js deleted file mode 100644 index 4dbd615..0000000 --- a/src/thrift/framed_transport.js +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var binary = require('./binary'); -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); -var THeaderTransport = require('./header_transport'); - -module.exports = TFramedTransport; - -function TFramedTransport(buffer, callback) { - this.inBuf = buffer || new Buffer(0); - this.outBuffers = []; - this.outCount = 0; - this.readPos = 0; - this.onFlush = callback; -}; - -TFramedTransport.prototype = new THeaderTransport(); - -// TFramedTransport.receiver = function(callback, seqid) { -// var residual = null; - -// return function(data) { -// // Prepend any residual data from our previous read -// if (residual) { -// data = Buffer.concat([residual, data]); -// residual = null; -// } - -// // framed transport -// while (data.length) { -// if (data.length < 4) { -// // Not enough bytes to continue, save and resume on next packet -// residual = data; -// return; -// } -// var frameSize = binary.readI32(data, 0); -// if (data.length < 4 + frameSize) { -// // Not enough bytes to continue, save and resume on next packet -// residual = data; -// return; -// } - -// var frame = data.slice(4, 4 + frameSize); -// residual = data.slice(4 + frameSize); - -// callback(new TFramedTransport(frame), seqid); - -// data = residual; -// residual = null; -// } -// }; -// }; - -TFramedTransport.receiver = function(callback, seqid) { - var residual = []; - - return function(data) { - // 将接受到的数据存入缓冲区 - for(var i = 0; i < data.length; ++i) { - residual.push(data[i]) - } - - while (residual.length > 0) { - // 标识包大小的数据块尚未接收完成,没有的情况下跳出循环等待数据 - if (residual.length < 4) { - return; - } - // 获取单个数据包大小 - var frameSize = binary.readI32(Buffer.from(residual.slice(0, 4)), 0); - // 看一下缓冲区是否包含完整数据包,没有的情况下跳出循环等待数据 - if (residual.length < 4 + frameSize) { - return; - } - - // 移除前面4个字节:这部分数据是用来标识是标识数据包长度的 - residual.splice(0, 4) - // 根据数据包大小,从缓冲区读取对应大小的数据 - var frame = Buffer.from(residual.splice(0, frameSize)); - // 控制权交给协议层 - callback(new TFramedTransport(frame), seqid); - } - }; -}; - -TFramedTransport.prototype.commitPosition = function(){}, -TFramedTransport.prototype.rollbackPosition = function(){}, - - // TODO: Implement open/close support -TFramedTransport.prototype.isOpen = function() { - return true; -}; -TFramedTransport.prototype.open = function() {}; -TFramedTransport.prototype.close = function() {}; - - // Set the seqid of the message in the client - // So that callbacks can be found -TFramedTransport.prototype.setCurrSeqId = function(seqid) { - this._seqid = seqid; -}; - -TFramedTransport.prototype.ensureAvailable = function(len) { - if (this.readPos + len > this.inBuf.length) { - throw new InputBufferUnderrunError(); - } -}; - -TFramedTransport.prototype.read = function(len) { // this function will be used for each frames. - this.ensureAvailable(len); - var end = this.readPos + len; - - if (this.inBuf.length < end) { - throw new Error('read(' + len + ') failed - not enough data'); - } - - var buf = this.inBuf.slice(this.readPos, end); - this.readPos = end; - return buf; -}; - -TFramedTransport.prototype.readByte = function() { - this.ensureAvailable(1); - return binary.readByte(this.inBuf[this.readPos++]); -}; - -TFramedTransport.prototype.readI16 = function() { - this.ensureAvailable(2); - var i16 = binary.readI16(this.inBuf, this.readPos); - this.readPos += 2; - return i16; -}; - -TFramedTransport.prototype.readI32 = function() { - this.ensureAvailable(4); - var i32 = binary.readI32(this.inBuf, this.readPos); - this.readPos += 4; - return i32; -}; - -TFramedTransport.prototype.readDouble = function() { - this.ensureAvailable(8); - var d = binary.readDouble(this.inBuf, this.readPos); - this.readPos += 8; - return d; -}; - -TFramedTransport.prototype.readString = function(len) { - this.ensureAvailable(len); - var str = this.inBuf.toString('utf8', this.readPos, this.readPos + len); - this.readPos += len; - return str; -}; - -TFramedTransport.prototype.borrow = function() { - return { - buf: this.inBuf, - readIndex: this.readPos, - writeIndex: this.inBuf.length - }; -}; - -TFramedTransport.prototype.consume = function(bytesConsumed) { - this.readPos += bytesConsumed; -}; - -TFramedTransport.prototype.write = function(buf, encoding) { - if (typeof(buf) === "string") { - buf = new Buffer(buf, encoding || 'utf8'); - } - this.outBuffers.push(buf); - this.outCount += buf.length; -}; - -TFramedTransport.prototype.flush = function() { - // If the seqid of the callback is available pass it to the onFlush - // Then remove the current seqid - var seqid = this._seqid; - this._seqid = null; - - var out = new Buffer(this.outCount), - pos = 0; - this.outBuffers.forEach(function(buf) { - buf.copy(out, pos, 0); - pos += buf.length; - }); - - if (this.onFlush) { - // TODO: optimize this better, allocate one buffer instead of both: - var msg = new Buffer(out.length + 4); - binary.writeI32(msg, out.length); - out.copy(msg, 4, 0, out.length); - if (this.onFlush) { - // Passing seqid through this call to get it to the connection - this.onFlush(msg, seqid); - } - } - - this.outBuffers = []; - this.outCount = 0; -}; diff --git a/src/thrift/header_protocol.js b/src/thrift/header_protocol.js deleted file mode 100644 index 8971751..0000000 --- a/src/thrift/header_protocol.js +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var util = require('util'); -var TBinaryProtocol = require('./binary_protocol'); -var TCompactProtocol = require('./compact_protocol'); -var THeaderTransport = require('./header_transport'); - -var ProtocolMap = {}; -ProtocolMap[THeaderTransport.SubprotocolId.BINARY] = TBinaryProtocol; -ProtocolMap[THeaderTransport.SubprotocolId.COMPACT] = TCompactProtocol; - -module.exports = THeaderProtocol; - -function THeaderProtocolError(message) { - Error.call(this); - if (Error.captureStackTrace !== undefined) { - Error.captureStackTrace(this, this.constructor); - } - this.name = this.constructor.name; - this.message = message; -} - -util.inherits(THeaderProtocolError, Error); - -/** - * A framed protocol with headers. - * - * THeaderProtocol frames other Thrift protocols and adds support for - * optional out-of-band headers. The currently supported subprotocols are - * TBinaryProtocol and TCompactProtocol. It can currently only be used with - * transports that inherit THeaderTransport. - * - * THeaderProtocol does not currently support THTTPServer, TNonblockingServer, - * or TProcessPoolServer. - * - * See doc/specs/HeaderFormat.md for details of the wire format. - */ -function THeaderProtocol(trans) { - if (!(trans instanceof THeaderTransport)) { - throw new THeaderProtocolError( - 'Only transports that inherit THeaderTransport can be' + - ' used with THeaderProtocol' - ); - } - this.trans = trans; - this.setProtocol(); -}; - -THeaderProtocol.prototype.flush = function() { - // Headers must be written prior to flushing because because - // you need to calculate the length of the payload for the length - // field of the header - this.trans.writeHeaders(); - return this.trans.flush(); -}; - -THeaderProtocol.prototype.writeMessageBegin = function(name, type, seqid) { - return this.protocol.writeMessageBegin(name, type, seqid); -}; - -THeaderProtocol.prototype.writeMessageEnd = function() { - return this.protocol.writeMessageEnd(); -}; - -THeaderProtocol.prototype.writeStructBegin = function(name) { - return this.protocol.writeStructBegin(name); -}; - -THeaderProtocol.prototype.writeStructEnd = function() { - return this.protocol.writeStructEnd(); -}; - -THeaderProtocol.prototype.writeFieldBegin = function(name, type, id) { - return this.protocol.writeFieldBegin(name, type, id); -} - -THeaderProtocol.prototype.writeFieldEnd = function() { - return this.protocol.writeFieldEnd(); -}; - -THeaderProtocol.prototype.writeFieldStop = function() { - return this.protocol.writeFieldStop(); -}; - -THeaderProtocol.prototype.writeMapBegin = function(ktype, vtype, size) { - return this.protocol.writeMapBegin(ktype, vtype, size); -}; - -THeaderProtocol.prototype.writeMapEnd = function() { - return this.protocol.writeMapEnd(); -}; - -THeaderProtocol.prototype.writeListBegin = function(etype, size) { - return this.protocol.writeListBegin(etype, size); -}; - -THeaderProtocol.prototype.writeListEnd = function() { - return this.protocol.writeListEnd(); -}; - -THeaderProtocol.prototype.writeSetBegin = function(etype, size) { - return this.protocol.writeSetBegin(etype, size); -}; - -THeaderProtocol.prototype.writeSetEnd = function() { - return this.protocol.writeSetEnd(); -}; - -THeaderProtocol.prototype.writeBool = function(b) { - return this.protocol.writeBool(b); -}; - -THeaderProtocol.prototype.writeByte = function(b) { - return this.protocol.writeByte(b); -}; - -THeaderProtocol.prototype.writeI16 = function(i16) { - return this.protocol.writeI16(i16); -}; - -THeaderProtocol.prototype.writeI32 = function(i32) { - return this.protocol.writeI32(i32); -}; - -THeaderProtocol.prototype.writeI64 = function(i64) { - return this.protocol.writeI64(i64); -}; - -THeaderProtocol.prototype.writeDouble = function(dub) { - return this.protocol.writeDouble(dub); -}; - -THeaderProtocol.prototype.writeStringOrBinary = function(name, encoding, arg) { - return this.protocol.writeStringOrBinary(name, encoding, arg); -}; - -THeaderProtocol.prototype.writeString = function(arg) { - return this.protocol.writeString(arg); -}; - -THeaderProtocol.prototype.writeBinary = function(arg) { - return this.protocol.writeBinary(arg); -}; - -THeaderProtocol.prototype.readMessageBegin = function() { - this.trans.readHeaders(); - this.setProtocol(); - return this.protocol.readMessageBegin(); -}; - -THeaderProtocol.prototype.readMessageEnd = function() { - return this.protocol.readMessageEnd(); -}; - -THeaderProtocol.prototype.readStructBegin = function() { - return this.protocol.readStructBegin(); -}; - -THeaderProtocol.prototype.readStructEnd = function() { - return this.protocol.readStructEnd(); -}; - -THeaderProtocol.prototype.readFieldBegin = function() { - return this.protocol.readFieldBegin(); -}; - -THeaderProtocol.prototype.readFieldEnd = function() { - return this.protocol.readFieldEnd(); -}; - -THeaderProtocol.prototype.readMapBegin = function() { - return this.protocol.readMapBegin(); -}; - -THeaderProtocol.prototype.readMapEnd = function() { - return this.protocol.readMapEnd(); -}; - -THeaderProtocol.prototype.readListBegin = function() { - return this.protocol.readListBegin(); -}; - -THeaderProtocol.prototype.readListEnd = function() { - return this.protocol.readListEnd(); -}; - -THeaderProtocol.prototype.readSetBegin = function() { - return this.protocol.readSetBegin(); -}; - -THeaderProtocol.prototype.readSetEnd = function() { - return this.protocol.readSetEnd(); -}; - -THeaderProtocol.prototype.readBool = function() { - return this.protocol.readBool(); -}; - -THeaderProtocol.prototype.readByte = function() { - return this.protocol.readByte(); -}; - -THeaderProtocol.prototype.readI16 = function() { - return this.protocol.readI16(); -}; - -THeaderProtocol.prototype.readI32 = function() { - return this.protocol.readI32(); -}; - -THeaderProtocol.prototype.readI64 = function() { - return this.protocol.readI64(); -}; - -THeaderProtocol.prototype.readDouble = function() { - return this.protocol.readDouble(); -}; - -THeaderProtocol.prototype.readBinary = function() { - return this.protocol.readBinary(); -}; - -THeaderProtocol.prototype.readString = function() { - return this.protocol.readString(); -}; - -THeaderProtocol.prototype.getTransport = function() { - return this.trans; -}; - -THeaderProtocol.prototype.skip = function(type) { - return this.protocol.skip(type); -}; - -THeaderProtocol.prototype.setProtocol = function(subProtocolId) { - var subProtocolId = this.trans.getProtocolId(); - if (!ProtocolMap[subProtocolId]) { - throw new THeaderProtocolError('Headers not supported for protocol ' + subProtocolId); - } - - this.protocol = new ProtocolMap[subProtocolId](this.trans); -}; diff --git a/src/thrift/header_transport.js b/src/thrift/header_transport.js deleted file mode 100644 index ec8624b..0000000 --- a/src/thrift/header_transport.js +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var util = require('util'); -var TCompactProtocol = require('./compact_protocol'); -var TBinaryProtocol = require('./binary_protocol'); -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); - -function THeaderTransportError(message) { - Error.call(this); - if (Error.captureStackTrace !== undefined) { - Error.captureStackTrace(this, this.constructor); - } - this.name = this.constructor.name; - this.message = message; -} - -util.inherits(THeaderTransportError, Error); - -module.exports = THeaderTransport; - -// from HeaderFormat.md -var COMPACT_PROTOCOL_OFFSET = 0; -var COMPACT_PROTOCOL_VERSION_OFFSET = 1; -var FRAME_SIZE_OFFSET = 0; -var HEADER_MAGIC_OFFSET = 32 / 8; -var FLAGS_OFFSET = 48 / 8; -var SEQID_OFFSET = 64 / 8; -var HEADER_SIZE_OFFSET = 96 / 8; -var HEADER_START_OFFSET = 112 / 8; - -var HEADER_MAGIC = 0x0FFF; - -var TINFO_HEADER_KEY_VALUE_TYPE = 0x01; -var MAX_FRAME_SIZE = 0x3FFFFFFF; - - // A helper class for reading/writing varints. Uses - // TCompactProtocol under the hood -function VarintHelper(readBuffer) { - var TBufferedTransport = require('./buffered_transport'); - this.outputBuffer = null; - var _this = this; - this.transport = new TBufferedTransport(null, function(output) { - _this.outputBuffer = output; - }); - - this.transport.inBuf = readBuffer || Buffer.alloc(0); - this.transport.writeCursor = this.transport.inBuf.length; - this.protocol = new TCompactProtocol(this.transport); -}; - -VarintHelper.prototype.readVarint32 = function() { - return this.protocol.readVarint32(); -}; - -VarintHelper.prototype.writeVarint32 = function(i) { - this.protocol.writeVarint32(i); -}; - -VarintHelper.prototype.readString = function() { - return this.protocol.readString(); -}; - -VarintHelper.prototype.writeString = function(str) { - this.protocol.writeString(str); -} - -VarintHelper.prototype.getOutCount = function() { - return this.transport.outCount; -}; - -VarintHelper.prototype.write = function(str) { - this.transport.write(str); -}; - -VarintHelper.prototype.toBuffer = function() { - this.transport.flush(); - return this.outputBuffer; -}; - -// from lib/cpp/src/thrift/protocol/TProtocolTypes.h -THeaderTransport.SubprotocolId = { - BINARY: 0, - JSON: 1, - COMPACT: 2, -}; - -/** - An abstract transport used as a prototype for other transports - to enable reading/writing theaders. This should NOT be used as a standalone transport - The methods in this transport are called by THeaderProtocol, which will call readHeaders/writeHeaders - in the read/writeMessageBegin methods and parse/write headers to/from a request - prior to reading/writing. - - The reason this is not a standalone transport type is because different transport types - have their own individual static receiver methods that are called prior to instantiation. - There doesn't seem to be a way for THeaderTransport to know which receiver method to use - without reworking the server API. - - For reading headers from a request, the parsed headers can be retrieved via - getReadHeader. Similarly, you can set headers to be written on the client via - setWriteHeader. - */ -function THeaderTransport() { - this.maxFrameSize = MAX_FRAME_SIZE; - this.protocolId = THeaderTransport.SubprotocolId.BINARY; - this.rheaders = {}; - this.wheaders = {}; - this.inBuf = Buffer.alloc(0); - this.outCount = 0; - this.flags = null; - this.seqid = 0; - this.shouldWriteHeaders = true; -}; - -var validateHeaders = function(key, value) { - if (typeof key !== 'string' || typeof value !== 'string') { - throw new THeaderTransportError('Header key and values must be strings'); - } -}; - -var validateProtocolId = function(protocolId) { - var protocols = Object.keys(THeaderTransport.SubprotocolId); - for (var i = 0; i < protocols.length; i++) { - if (protocolId === THeaderTransport.SubprotocolId[protocols[i]]) return true; - } - - throw new Error(protocolId + ' is not a valid protocol id'); -}; - -THeaderTransport.prototype.setSeqId = function(seqid) { - this.seqid = seqid; -}; - -THeaderTransport.prototype.getSeqId = function(seqid) { - return this.seqid; -}; - -THeaderTransport.prototype.setFlags = function(flags) { - this.flags = flags; -}; - -THeaderTransport.prototype.getReadHeaders = function() { - return this.rheaders; -}; - -THeaderTransport.prototype.setReadHeader = function(key, value) { - validateHeaders(key, value); - this.rheaders[key] = value; -}; - -THeaderTransport.prototype.clearReadHeaders = function() { - this.rheaders = {}; -}; - -THeaderTransport.prototype.getWriteHeaders = function() { - return this.wheaders; -}; - -THeaderTransport.prototype.setWriteHeader = function(key, value) { - validateHeaders(key, value); - this.wheaders[key] = value; -}; - -THeaderTransport.prototype.clearWriteHeaders = function() { - this.wheaders = {}; -}; - -THeaderTransport.prototype.setMaxFrameSize = function(frameSize) { - this.maxFrameSize = frameSize; -}; - -THeaderTransport.prototype.setProtocolId = function(protocolId) { - validateProtocolId(protocolId); - this.protocolId = protocolId; -}; - -THeaderTransport.prototype.getProtocolId = function() { - return this.protocolId; -}; - -var isUnframedBinary = function(readBuffer) { - var version = readBuffer.readInt32BE(); - return (version & TBinaryProtocol.VERSION_MASK) === TBinaryProtocol.VERSION_1; -} - -var isUnframedCompact = function(readBuffer) { - var protocolId = readBuffer.readInt8(COMPACT_PROTOCOL_OFFSET); - var version = readBuffer.readInt8(COMPACT_PROTOCOL_VERSION_OFFSET); - return protocolId === TCompactProtocol.PROTOCOL_ID && - (version & TCompactProtocol.VERSION_MASK) === TCompactProtocol.VERSION_N; -} - -THeaderTransport.prototype.readHeaders = function() { - var readBuffer = this.inBuf; - - var isUnframed = false; - if (isUnframedBinary(readBuffer)) { - this.setProtocolId(THeaderTransport.SubprotocolId.BINARY); - isUnframed = true; - } - - if (isUnframedCompact(readBuffer)) { - this.setProtocolId(THeaderTransport.SubprotocolId.COMPACT); - isUnframed = true; - } - - if (isUnframed) { - this.shouldWriteHeaders = false; - return; - } - - var frameSize = readBuffer.readInt32BE(FRAME_SIZE_OFFSET); - if (frameSize > this.maxFrameSize) { - throw new THeaderTransportError('Frame exceeds maximum frame size'); - } - - var headerMagic = readBuffer.readInt16BE(HEADER_MAGIC_OFFSET); - this.shouldWriteHeaders = headerMagic === HEADER_MAGIC; - if (!this.shouldWriteHeaders) { - return; - } - - this.setFlags(readBuffer.readInt16BE(FLAGS_OFFSET)); - this.setSeqId(readBuffer.readInt32BE(SEQID_OFFSET)); - var headerSize = readBuffer.readInt16BE(HEADER_SIZE_OFFSET) * 4; - var endOfHeaders = HEADER_START_OFFSET + headerSize; - if (endOfHeaders > readBuffer.length) { - throw new THeaderTransportError('Header size is greater than frame size'); - } - - var headerBuffer = Buffer.alloc(headerSize); - readBuffer.copy(headerBuffer, 0, HEADER_START_OFFSET, endOfHeaders); - - var varintHelper = new VarintHelper(headerBuffer); - this.setProtocolId(varintHelper.readVarint32()); - var transformCount = varintHelper.readVarint32(); - if (transformCount > 0) { - throw new THeaderTransportError('Transforms are not yet supported'); - } - - while (true) { - try { - var headerType = varintHelper.readVarint32(); - if (headerType !== TINFO_HEADER_KEY_VALUE_TYPE) { - break; - } - - var numberOfHeaders = varintHelper.readVarint32(); - for (var i = 0; i < numberOfHeaders; i++) { - var key = varintHelper.readString(); - var value = varintHelper.readString(); - this.setReadHeader(key, value); - } - } catch (e) { - if (e instanceof InputBufferUnderrunError) { - break; - } - throw e; - } - } - - // moves the read cursor past the headers - this.read(endOfHeaders); - return this.getReadHeaders(); -}; - -THeaderTransport.prototype.writeHeaders = function() { - // only write headers on the server if the client contained headers - if (!this.shouldWriteHeaders) { - return; - } - var headers = this.getWriteHeaders(); - - var varintWriter = new VarintHelper(); - varintWriter.writeVarint32(this.protocolId); - varintWriter.writeVarint32(0); // transforms not supported - - // writing info header key values - var headerKeys = Object.keys(headers); - if (headerKeys.length > 0) { - varintWriter.writeVarint32(TINFO_HEADER_KEY_VALUE_TYPE); - varintWriter.writeVarint32(headerKeys.length); - for (var i = 0; i < headerKeys.length; i++) { - var key = headerKeys[i]; - var value = headers[key]; - - varintWriter.writeString(key); - varintWriter.writeString(value); - } - } - var headerSizeWithoutPadding = varintWriter.getOutCount(); - var paddingNeeded = (4 - (headerSizeWithoutPadding % 4)) % 4; - - var headerSize = Buffer.alloc(2); - headerSize.writeInt16BE(Math.floor((headerSizeWithoutPadding + paddingNeeded) / 4)); - - var paddingBuffer = Buffer.alloc(paddingNeeded); - paddingBuffer.fill(0x00); - varintWriter.write(paddingBuffer); - var headerContentBuffer = varintWriter.toBuffer(); - var frameSize = Buffer.alloc(4); - frameSize.writeInt32BE(10 + this.outCount + headerContentBuffer.length); - var headerMagic = Buffer.alloc(2); - headerMagic.writeInt16BE(HEADER_MAGIC); - - // flags are not yet supported, so write a zero - var flags = Buffer.alloc(2); - flags.writeInt16BE(0); - - var seqid = Buffer.alloc(4); - seqid.writeInt32BE(this.getSeqId()); - - var headerBuffer = Buffer.concat([ - frameSize, - headerMagic, - flags, - seqid, - headerSize, - headerContentBuffer, - ]); - - this.outBuffers.unshift(headerBuffer); - this.outCount += headerBuffer.length; -}; diff --git a/src/thrift/http_connection.js b/src/thrift/http_connection.js deleted file mode 100644 index 17e0d0c..0000000 --- a/src/thrift/http_connection.js +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var util = require('util'); -var http = require('http'); -var https = require('https'); -var EventEmitter = require('events').EventEmitter; -var thrift = require('./thrift'); - -var TBufferedTransport = require('./buffered_transport'); -var TBinaryProtocol = require('./binary_protocol'); -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); - -var createClient = require('./create_client'); - -/** - * @class - * @name ConnectOptions - * @property {string} transport - The Thrift layered transport to use (TBufferedTransport, etc). - * @property {string} protocol - The Thrift serialization protocol to use (TBinaryProtocol, etc.). - * @property {string} path - The URL path to POST to (e.g. "/", "/mySvc", "/thrift/quoteSvc", etc.). - * @property {object} headers - A standard Node.js header hash, an object hash containing key/value - * pairs where the key is the header name string and the value is the header value string. - * @property {boolean} https - True causes the connection to use https, otherwise http is used. - * @property {object} nodeOptions - Options passed on to node. - * @example - * //Use a connection that requires ssl/tls, closes the connection after each request, - * // uses the buffered transport layer, uses the JSON protocol and directs RPC traffic - * // to https://thrift.example.com:9090/hello - * var thrift = require('thrift'); - * var options = { - * transport: thrift.TBufferedTransport, - * protocol: thrift.TJSONProtocol, - * path: "/hello", - * headers: {"Connection": "close"}, - * https: true - * }; - * var con = thrift.createHttpConnection("thrift.example.com", 9090, options); - * var client = thrift.createHttpClient(myService, connection); - * client.myServiceFunction(); - */ - -/** - * Initializes a Thrift HttpConnection instance (use createHttpConnection() rather than - * instantiating directly). - * @constructor - * @param {ConnectOptions} options - The configuration options to use. - * @throws {error} Exceptions other than InputBufferUnderrunError are rethrown - * @event {error} The "error" event is fired when a Node.js error event occurs during - * request or response processing, in which case the node error is passed on. An "error" - * event may also be fired when the connection can not map a response back to the - * appropriate client (an internal error), generating a TApplicationException. - * @classdesc HttpConnection objects provide Thrift end point transport - * semantics implemented over the Node.js http.request() method. - * @see {@link createHttpConnection} - */ -var HttpConnection = exports.HttpConnection = function(options) { - //Initialize the emitter base object - EventEmitter.call(this); - - //Set configuration - var self = this; - this.options = options || {}; - this.host = this.options.host; - this.port = this.options.port; - this.socketPath = this.options.socketPath; - this.https = this.options.https || false; - this.transport = this.options.transport || TBufferedTransport; - this.protocol = this.options.protocol || TBinaryProtocol; - - //Prepare Node.js options - this.nodeOptions = { - host: this.host, - port: this.port, - socketPath: this.socketPath, - path: this.options.path || '/', - method: 'POST', - headers: this.options.headers || {}, - responseType: this.options.responseType || null - }; - for (var attrname in this.options.nodeOptions) { - this.nodeOptions[attrname] = this.options.nodeOptions[attrname]; - } - /*jshint -W069 */ - if (! this.nodeOptions.headers['Connection']) { - this.nodeOptions.headers['Connection'] = 'keep-alive'; - } - /*jshint +W069 */ - - //The sequence map is used to map seqIDs back to the - // calling client in multiplexed scenarios - this.seqId2Service = {}; - - function decodeCallback(transport_with_data) { - var proto = new self.protocol(transport_with_data); - try { - while (true) { - var header = proto.readMessageBegin(); - var dummy_seqid = header.rseqid * -1; - var client = self.client; - //The Multiplexed Protocol stores a hash of seqid to service names - // in seqId2Service. If the SeqId is found in the hash we need to - // lookup the appropriate client for this call. - // The client var is a single client object when not multiplexing, - // when using multiplexing it is a service name keyed hash of client - // objects. - //NOTE: The 2 way interdependencies between protocols, transports, - // connections and clients in the Node.js implementation are irregular - // and make the implementation difficult to extend and maintain. We - // should bring this stuff inline with typical thrift I/O stack - // operation soon. - // --ra - var service_name = self.seqId2Service[header.rseqid]; - if (service_name) { - client = self.client[service_name]; - delete self.seqId2Service[header.rseqid]; - } - /*jshint -W083 */ - client._reqs[dummy_seqid] = function(err, success){ - transport_with_data.commitPosition(); - var clientCallback = client._reqs[header.rseqid]; - delete client._reqs[header.rseqid]; - if (clientCallback) { - process.nextTick(function() { - clientCallback(err, success); - }); - } - }; - /*jshint +W083 */ - if(client['recv_' + header.fname]) { - client['recv_' + header.fname](proto, header.mtype, dummy_seqid); - } else { - delete client._reqs[dummy_seqid]; - self.emit("error", - new thrift.TApplicationException( - thrift.TApplicationExceptionType.WRONG_METHOD_NAME, - "Received a response to an unknown RPC function")); - } - } - } - catch (e) { - if (e instanceof InputBufferUnderrunError) { - transport_with_data.rollbackPosition(); - } else { - self.emit('error', e); - } - } - } - - - //Response handler - ////////////////////////////////////////////////// - this.responseCallback = function(response) { - var data = []; - var dataLen = 0; - - if (response.statusCode !== 200) { - this.emit("error", new THTTPException(response)); - } - - response.on('error', function (e) { - self.emit("error", e); - }); - - // When running directly under node, chunk will be a buffer, - // however, when running in a Browser (e.g. Browserify), chunk - // will be a string or an ArrayBuffer. - response.on('data', function (chunk) { - if ((typeof chunk == 'string') || - (Object.prototype.toString.call(chunk) == '[object Uint8Array]')) { - // Wrap ArrayBuffer/string in a Buffer so data[i].copy will work - data.push(new Buffer(chunk)); - } else { - data.push(chunk); - } - dataLen += chunk.length; - }); - - response.on('end', function(){ - var buf = new Buffer(dataLen); - for (var i=0, len=data.length, pos=0; i -// Kevin Greene -// Jesse Zhang -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// - -import * as net from 'net'; -import * as http from 'http'; -import * as https from 'https'; -import * as tls from 'tls'; -import { EventEmitter } from 'events'; - -// Thrift re-exports node-int64 and Q -import Int64 = require('node-int64'); -export { Int64 as Int64 }; -import Q = require('q'); -export { Q as Q }; - -export interface TMap { - ktype: Thrift.Type; - vtype: Thrift.Type; - size: number; -} - -export interface TMessage { - fname: string; - mtype: Thrift.MessageType; - rseqid: number; -} - -export interface TField { - fname: string; - ftype: Thrift.Type; - fid: number; -} - -export interface TList { - etype: Thrift.Type; - size: number; -} - -export interface TSet { - etype: Thrift.Type; - size: number; -} - -export interface TStruct { - fname: string; -} - -export interface TStructLike { - read(input: TProtocol): void; - write(output: TProtocol): void; -} - -export interface TTransport { - commitPosition(): void; - rollbackPosition(): void; - isOpen(): boolean; - open(): boolean; - close(): boolean; - setCurrSeqId(seqId: number): void; - ensureAvailable(len: number): void; - read(len: number): Buffer; - readByte(): number; - readI16(): number; - readI32(): number; - readDouble(): number; - readString(): string; - write(buf: Buffer | string): void; - flush(): void; -} - -export interface TProtocol { - flush(): void; - writeMessageBegin(name: string, type: Thrift.MessageType, seqid: number): void; - writeMessageEnd(): void; - writeStructBegin(name: string): void; - writeStructEnd(): void; - writeFieldBegin(name: string, type: Thrift.Type, id: number): void; - writeFieldEnd(): void; - writeFieldStop(): void; - writeMapBegin(ktype: Thrift.Type, vtype: Thrift.Type, size: number): void; - writeMapEnd(): void; - writeListBegin(etype: Thrift.Type, size: number): void; - writeListEnd(): void; - writeSetBegin(etype: Thrift.Type, size: number): void; - writeSetEnd(): void; - writeBool(bool: boolean): void; - writeByte(b: number): void; - writeI16(i16: number): void; - writeI32(i32: number): void; - writeI64(i64: number | Int64): void; - writeDouble(dbl: number): void; - writeString(arg: string | Buffer): void; - writeBinary(arg: string | Buffer): void; - readMessageBegin(): TMessage; - readMessageEnd(): void; - readStructBegin(): TStruct; - readStructEnd(): void; - readFieldBegin(): TField; - readFieldEnd(): void; - readMapBegin(): TMap; - readMapEnd(): void; - readListBegin(): TList; - readListEnd(): void; - readSetBegin(): TSet; - readSetEnd(): void; - readBool(): boolean; - readByte(): number; - readI16(): number; - readI32(): number; - readI64(): Int64; - readDouble(): number; - readBinary(): Buffer; - readString(): string; - getTransport(): TTransport; - skip(type: Thrift.Type): void; -} - -export interface HttpHeaders { - [name: string]: number | string | string[] | undefined; -} - -export interface SeqId2Service { - [seqid: number]: string; -} - -export class Connection extends EventEmitter { - seqId2Service: SeqId2Service; - connection: net.Socket; - ssl: boolean; - options: ConnectOptions; - transport: TTransport; - protocol: TProtocol; - offline_queue: Buffer[]; - connected: boolean; - constructor(stream: net.Socket, options?: ConnectOptions); - end(): void; - destroy(): void; - initialize_retry_vars(): void; - write(data: Buffer): void; - connection_gone(): void; -} - -export class HttpConnection extends EventEmitter { - options: ConnectOptions; - host: string; - port: number; - https: boolean; - transport: TTransport; - protocol: TProtocol; - constructor(host: string, port: number, options?: ConnectOptions); - responseCallback(response: http.IncomingMessage): void; - write(data: Buffer): void; -} - -export class XHRConnection extends EventEmitter { - seqId2Service: SeqId2Service; - options: ConnectOptions; - wpos: number; - rpos: number; - useCORS: boolean; - send_buf: string; - recv_buf: string; - transport: TTransport; - protocol: TProtocol; - headers: HttpHeaders; - constructor(host: string, port: number, options?: ConnectOptions); - getXmlHttpRequestObject(): XMLHttpRequest; - flush(): void; - setRecvBuffer(buf: string): void; - isOpen(): boolean; - open(): void; - close(): void; - read(len: number): string; - readAll(): string; - write(buf: string): void; - getSendBuffer(): string; -} - -export interface WSOptions { - host: string; - port: number; - path: string; - headers: HttpHeaders; -} - -export class WSConnection extends EventEmitter { - seqId2Service: SeqId2Service; - options: ConnectOptions; - host: string; - port: number; - secure: boolean; - transport: TTransport; - protocol: TProtocol; - path: string; - send_pending: Buffer[]; - wsOptions: WSOptions; - constructor(host: string, port: number, options?: ConnectOptions); - isOpen(): boolean; - open(): void; - close(): void; - uri(): string; - write(data: Buffer): void; -} - -export class Multiplexer { - createClient(serviceName: string, client: TClientConstructor, connection: Connection): TClient; -} - -export class MultiplexedProcessor { - constructor(stream?: any, options?: any); - process(input: TProtocol, output: TProtocol): void; -} - -export type TTransportCallback = - (msg?: Buffer, seqid?: number) => void; - -export interface ServiceMap { - [uri: string]: ServerOptions; -} - -export interface ServiceOptions { - transport?: TTransportConstructor; - protocol?: TProtocolConstructor; - processor?: { new(handler: THandler): TProcessor }; - handler?: THandler; -} - -export interface ServerOptions extends ServiceOptions { - cors?: string[]; - files?: string; - headers?: HttpHeaders; - services?: ServiceMap; - tls?: tls.TlsOptions; -} - -export interface ConnectOptions { - transport?: TTransportConstructor; - protocol?: TProtocolConstructor; - path?: string; - headers?: HttpHeaders; - https?: boolean; - debug?: boolean; - max_attempts?: number; - retry_max_delay?: number; - connect_timeout?: number; - timeout?: number; - nodeOptions?: http.RequestOptions | https.RequestOptions; -} - -export interface WSConnectOptions { - transport?: TTransportConstructor; - protocol?: TProtocolConstructor; - path?: string; - headers?: HttpHeaders; - secure?: boolean; - wsOptions?: WSOptions; -} - -export type TClientConstructor = - { new(output: TTransport, pClass: { new(trans: TTransport): TProtocol }): TClient; } | - { Client: { new(output: TTransport, pClass: { new(trans: TTransport): TProtocol }): TClient; } }; - -export type TProcessorConstructor = - { new(handler: THandler): TProcessor } | - { Processor: { new(handler: THandler): TProcessor } }; - -export interface WebServerOptions { - services: { - [path: string]: { - processor: TProcessorConstructor; - handler: THandler; - } - }; -} - -export function createConnection(host: string | undefined, port: number, options?: ConnectOptions): Connection; -export function createSSLConnection(host: string | undefined, port: number, options?: ConnectOptions): Connection; -export function createHttpConnection(host: string | undefined, port: number, options?: ConnectOptions): HttpConnection; -export function createXHRConnection(host: string | undefined, port: number, options?: ConnectOptions): XHRConnection; -export function createWSConnection(host: string | undefined, port: number, options?: WSConnectOptions): WSConnection; - -export function createXHRClient( - client: TClientConstructor, - connection: XHRConnection -): TClient; - -export function createHttpClient( - client: TClientConstructor, - connection: HttpConnection -): TClient; - -export function createWSClient( - client: TClientConstructor, - connection: WSConnection -): TClient; - -export function createStdIOClient( - client: TClientConstructor, - connection: Connection -): TClient; - -export function createClient( - client: TClientConstructor, - connection: Connection -): TClient; - -// THandler is going to be a hash of user-defined functions for prcessing RPC calls -export function createServer( - processor: TProcessorConstructor, - handler: THandler, - options?: ServerOptions -): http.Server | tls.Server; - -// tslint:disable-next-line no-unnecessary-generics -export function createWebServer(options: WebServerOptions): http.Server | tls.Server; - -export class TBufferedTransport implements TTransport { - constructor(buffer?: Buffer, callback?: TTransportCallback); - static receiver(callback: (trans: TBufferedTransport, seqid: number) => void, seqid: number): (data: Buffer) => void; - commitPosition(): void; - rollbackPosition(): void; - isOpen(): boolean; - open(): boolean; - close(): boolean; - setCurrSeqId(seqId: number): void; - ensureAvailable(len: number): void; - read(len: number): Buffer; - readByte(): number; - readI16(): number; - readI32(): number; - readDouble(): number; - readString(): string; - write(buf: Buffer | string): void; - flush(): void; -} - -export class TFramedTransport implements TTransport { - constructor(buffer?: Buffer, callback?: TTransportCallback); - static receiver(callback: (trans: TFramedTransport, seqid: number) => void, seqid: number): (data: Buffer) => void; - commitPosition(): void; - rollbackPosition(): void; - isOpen(): boolean; - open(): boolean; - close(): boolean; - setCurrSeqId(seqId: number): void; - ensureAvailable(len: number): void; - read(len: number): Buffer; - readByte(): number; - readI16(): number; - readI32(): number; - readDouble(): number; - readString(): string; - write(buf: Buffer | string): void; - flush(): void; -} - -export interface TTransportConstructor { - new(buffer?: Buffer, callback?: TTransportCallback): TTransport; -} - -export class TBinaryProtocol implements TProtocol { - constructor(trans: TTransport, strictRead?: boolean, strictWrite?: boolean); - flush(): void; - writeMessageBegin(name: string, type: Thrift.MessageType, seqid: number): void; - writeMessageEnd(): void; - writeStructBegin(name: string): void; - writeStructEnd(): void; - writeFieldBegin(name: string, type: Thrift.Type, id: number): void; - writeFieldEnd(): void; - writeFieldStop(): void; - writeMapBegin(ktype: Thrift.Type, vtype: Thrift.Type, size: number): void; - writeMapEnd(): void; - writeListBegin(etype: Thrift.Type, size: number): void; - writeListEnd(): void; - writeSetBegin(etype: Thrift.Type, size: number): void; - writeSetEnd(): void; - writeBool(bool: boolean): void; - writeByte(b: number): void; - writeI16(i16: number): void; - writeI32(i32: number): void; - writeI64(i64: number | Int64): void; - writeDouble(dbl: number): void; - writeString(arg: string | Buffer): void; - writeBinary(arg: string | Buffer): void; - readMessageBegin(): TMessage; - readMessageEnd(): void; - readStructBegin(): TStruct; - readStructEnd(): void; - readFieldBegin(): TField; - readFieldEnd(): void; - readMapBegin(): TMap; - readMapEnd(): void; - readListBegin(): TList; - readListEnd(): void; - readSetBegin(): TSet; - readSetEnd(): void; - readBool(): boolean; - readByte(): number; - readI16(): number; - readI32(): number; - readI64(): Int64; - readDouble(): number; - readBinary(): Buffer; - readString(): string; - getTransport(): TTransport; - skip(type: Thrift.Type): void; -} - -export class TJSONProtocol implements TProtocol { - constructor(trans: TTransport); - flush(): void; - writeMessageBegin(name: string, type: Thrift.MessageType, seqid: number): void; - writeMessageEnd(): void; - writeStructBegin(name: string): void; - writeStructEnd(): void; - writeFieldBegin(name: string, type: Thrift.Type, id: number): void; - writeFieldEnd(): void; - writeFieldStop(): void; - writeMapBegin(ktype: Thrift.Type, vtype: Thrift.Type, size: number): void; - writeMapEnd(): void; - writeListBegin(etype: Thrift.Type, size: number): void; - writeListEnd(): void; - writeSetBegin(etype: Thrift.Type, size: number): void; - writeSetEnd(): void; - writeBool(bool: boolean): void; - writeByte(b: number): void; - writeI16(i16: number): void; - writeI32(i32: number): void; - writeI64(i64: number | Int64): void; - writeDouble(dbl: number): void; - writeString(arg: string | Buffer): void; - writeBinary(arg: string | Buffer): void; - readMessageBegin(): TMessage; - readMessageEnd(): void; - readStructBegin(): TStruct; - readStructEnd(): void; - readFieldBegin(): TField; - readFieldEnd(): void; - readMapBegin(): TMap; - readMapEnd(): void; - readListBegin(): TList; - readListEnd(): void; - readSetBegin(): TSet; - readSetEnd(): void; - readBool(): boolean; - readByte(): number; - readI16(): number; - readI32(): number; - readI64(): Int64; - readDouble(): number; - readBinary(): Buffer; - readString(): string; - getTransport(): TTransport; - skip(type: Thrift.Type): void; -} - -export class TCompactProtocol implements TProtocol { - constructor(trans: TTransport); - flush(): void; - writeMessageBegin(name: string, type: Thrift.MessageType, seqid: number): void; - writeMessageEnd(): void; - writeStructBegin(name: string): void; - writeStructEnd(): void; - writeFieldBegin(name: string, type: Thrift.Type, id: number): void; - writeFieldEnd(): void; - writeFieldStop(): void; - writeMapBegin(ktype: Thrift.Type, vtype: Thrift.Type, size: number): void; - writeMapEnd(): void; - writeListBegin(etype: Thrift.Type, size: number): void; - writeListEnd(): void; - writeSetBegin(etype: Thrift.Type, size: number): void; - writeSetEnd(): void; - writeBool(bool: boolean): void; - writeByte(b: number): void; - writeI16(i16: number): void; - writeI32(i32: number): void; - writeI64(i64: number | Int64): void; - writeDouble(dbl: number): void; - writeString(arg: string | Buffer): void; - writeBinary(arg: string | Buffer): void; - readMessageBegin(): TMessage; - readMessageEnd(): void; - readStructBegin(): TStruct; - readStructEnd(): void; - readFieldBegin(): TField; - readFieldEnd(): void; - readMapBegin(): TMap; - readMapEnd(): void; - readListBegin(): TList; - readListEnd(): void; - readSetBegin(): TSet; - readSetEnd(): void; - readBool(): boolean; - readByte(): number; - readI16(): number; - readI32(): number; - readI64(): Int64; - readDouble(): number; - readBinary(): Buffer; - readString(): string; - getTransport(): TTransport; - skip(type: Thrift.Type): void; -} - -export interface TProtocolConstructor { - new(trans: TTransport, strictRead?: boolean, strictWrite?: boolean): TProtocol; -} - -// thrift.js -export namespace Thrift { - enum Type { - STOP = 0, - VOID = 1, - BOOL = 2, - BYTE = 3, - I08 = 3, - DOUBLE = 4, - I16 = 6, - I32 = 8, - I64 = 10, - STRING = 11, - UTF7 = 11, - STRUCT = 12, - MAP = 13, - SET = 14, - LIST = 15, - UTF8 = 16, - UTF16 = 17 - } - - enum MessageType { - CALL = 1, - REPLY = 2, - EXCEPTION = 3, - ONEWAY = 4 - } - - class TException extends Error { - name: string; - message: string; - - constructor(message: string); - - getMessage(): string; - } - - enum TApplicationExceptionType { - UNKNOWN = 0, - UNKNOWN_METHOD = 1, - INVALID_MESSAGE_TYPE = 2, - WRONG_METHOD_NAME = 3, - BAD_SEQUENCE_ID = 4, - MISSING_RESULT = 5, - INTERNAL_ERROR = 6, - PROTOCOL_ERROR = 7, - INVALID_TRANSFORM = 8, - INVALID_PROTOCOL = 9, - UNSUPPORTED_CLIENT_TYPE = 10 - } - - class TApplicationException extends TException { - message: string; - code: number; - - constructor(type?: TApplicationExceptionType, message?: string); - read(input: TProtocol): void; - write(output: TProtocol): void; - getCode(): number; - } - - enum TProtocolExceptionType { - UNKNOWN = 0, - INVALID_DATA = 1, - NEGATIVE_SIZE = 2, - SIZE_LIMIT = 3, - BAD_VERSION = 4, - NOT_IMPLEMENTED = 5, - DEPTH_LIMIT = 6 - } - - class TProtocolException implements Error { - name: string; - message: string; - type: TProtocolExceptionType; - - constructor(type: TProtocolExceptionType, message: string); - } - - function objectLength(obj: any): number; -} diff --git a/src/thrift/index.js b/src/thrift/index.js deleted file mode 100644 index 00f2174..0000000 --- a/src/thrift/index.js +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -exports.Thrift = require('./thrift'); - -var log = require('./log'); -exports.setLogFunc = log.setLogFunc; -exports.setLogLevel = log.setLogLevel; -exports.getLogLevel = log.getLogLevel; - -var connection = require('./connection'); -exports.Connection = connection.Connection; -exports.createClient = connection.createClient; -exports.createConnection = connection.createConnection; -exports.createUDSConnection = connection.createUDSConnection; -exports.createSSLConnection = connection.createSSLConnection; -exports.createStdIOClient = connection.createStdIOClient; -exports.createStdIOConnection = connection.createStdIOConnection; - -var httpConnection = require('./http_connection'); -exports.HttpConnection = httpConnection.HttpConnection; -exports.createHttpConnection = httpConnection.createHttpConnection; -exports.createHttpUDSConnection = httpConnection.createHttpUDSConnection; -exports.createHttpClient = httpConnection.createHttpClient; - -var wsConnection = require('./ws_connection'); -exports.WSConnection = wsConnection.WSConnection; -exports.createWSConnection = wsConnection.createWSConnection; -exports.createWSClient = wsConnection.createWSClient; - -var xhrConnection = require('./xhr_connection'); -exports.XHRConnection = xhrConnection.XHRConnection; -exports.createXHRConnection = xhrConnection.createXHRConnection; -exports.createXHRClient = xhrConnection.createXHRClient; - -var server = require('./server'); -exports.createServer = server.createServer; -exports.createMultiplexServer = server.createMultiplexServer; - -var web_server = require('./web_server'); -exports.createWebServer = web_server.createWebServer; - -exports.Int64 = require('node-int64'); -exports.Q = require('q'); - -var mpxProcessor = require('./multiplexed_processor'); -var mpxProtocol = require('./multiplexed_protocol'); -exports.MultiplexedProcessor = mpxProcessor.MultiplexedProcessor; -exports.Multiplexer = mpxProtocol.Multiplexer; - -/* - * Export transport and protocol so they can be used outside of a - * cassandra/server context - */ -exports.TBufferedTransport = require('./buffered_transport'); -exports.TFramedTransport = require('./framed_transport'); - -exports.TJSONProtocol = require('./json_protocol'); -exports.TBinaryProtocol = require('./binary_protocol'); -exports.TCompactProtocol = require('./compact_protocol'); -exports.THeaderProtocol = require('./header_protocol'); diff --git a/src/thrift/input_buffer_underrun_error.js b/src/thrift/input_buffer_underrun_error.js deleted file mode 100644 index e424540..0000000 --- a/src/thrift/input_buffer_underrun_error.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var util = require("util"); - -module.exports = InputBufferUnderrunError; - -function InputBufferUnderrunError(message) { - Error.call(this); - if (Error.captureStackTrace !== undefined) { - Error.captureStackTrace(this, this.constructor); - } - this.name = this.constructor.name; - this.message = message; -}; - -util.inherits(InputBufferUnderrunError, Error); diff --git a/src/thrift/int64_util.js b/src/thrift/int64_util.js deleted file mode 100644 index e8d707d..0000000 --- a/src/thrift/int64_util.js +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var Int64 = require('node-int64'); - -var Int64Util = module.exports = {}; - -var POW2_24 = Math.pow(2, 24); -var POW2_31 = Math.pow(2, 31); -var POW2_32 = Math.pow(2, 32); -var POW10_11 = Math.pow(10, 11); - -Int64Util.toDecimalString = function(i64) { - var b = i64.buffer; - var o = i64.offset; - if ((!b[o] && !(b[o + 1] & 0xe0)) || - (!~b[o] && !~(b[o + 1] & 0xe0))) { - // The magnitude is small enough. - return i64.toString(); - } else { - var negative = b[o] & 0x80; - if (negative) { - // 2's complement - var incremented = false; - var buffer = new Buffer(8); - for (var i = 7; i >= 0; --i) { - buffer[i] = (~b[o + i] + (incremented ? 0 : 1)) & 0xff; - incremented |= b[o + i]; - } - b = buffer; - } - var high2 = b[o + 1] + (b[o] << 8); - // Lesser 11 digits with exceeding values but is under 53 bits capacity. - var low = b[o + 7] + (b[o + 6] << 8) + (b[o + 5] << 16) - + b[o + 4] * POW2_24 // Bit shift renders 32th bit as sign, so use multiplication - + (b[o + 3] + (b[o + 2] << 8)) * POW2_32 + high2 * 74976710656; // The literal is 2^48 % 10^11 - // 12th digit and greater. - var high = Math.floor(low / POW10_11) + high2 * 2814; // The literal is 2^48 / 10^11 - // Make it exactly 11 with leading zeros. - low = ('00000000000' + String(low % POW10_11)).slice(-11); - return (negative ? '-' : '') + String(high) + low; - } -}; - -Int64Util.fromDecimalString = function(text) { - var negative = text.charAt(0) === '-'; - if (text.length < (negative ? 17 : 16)) { - // The magnitude is smaller than 2^53. - return new Int64(+text); - } else if (text.length > (negative ? 20 : 19)) { - throw new RangeError('Too many digits for Int64: ' + text); - } else { - // Most significant (up to 5) digits - var high5 = +text.slice(negative ? 1 : 0, -15); - var low = +text.slice(-15) + high5 * 2764472320; // The literal is 10^15 % 2^32 - var high = Math.floor(low / POW2_32) + high5 * 232830; // The literal is 10^15 / 2^&32 - low = low % POW2_32; - if (high >= POW2_31 && - !(negative && high == POW2_31 && low == 0) // Allow minimum Int64 - ) { - throw new RangeError('The magnitude is too large for Int64.'); - } - if (negative) { - // 2's complement - high = ~high; - if (low === 0) { - high = (high + 1) & 0xffffffff; - } else { - low = ~low + 1; - } - high = 0x80000000 | high; - } - return new Int64(high, low); - } -}; diff --git a/src/thrift/json_parse.js b/src/thrift/json_parse.js deleted file mode 100644 index 93b0bf2..0000000 --- a/src/thrift/json_parse.js +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Imported from Douglas Crockford's reference implementation with minimum modification - * to handle Int64. - * - * https://github.com/douglascrockford/JSON-js/blob/c98948ae1944a28e2e8ebc3717894e580aeaaa05/json_parse.js - * - * Original license header: - * - * json_parse.js - * 2015-05-02 - * Public Domain. - * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - */ - - -/*jslint for */ - -/*property - at, b, call, charAt, f, fromCharCode, hasOwnProperty, message, n, name, - prototype, push, r, t, text -*/ - -var Int64 = require('node-int64'); -var Int64Util = require('./int64_util'); - -var json_parse = module.exports = (function () { - "use strict"; - -// This is a function that can parse a JSON text, producing a JavaScript -// data structure. It is a simple, recursive descent parser. It does not use -// eval or regular expressions, so it can be used as a model for implementing -// a JSON parser in other languages. - -// We are defining the function inside of another function to avoid creating -// global variables. - - var at, // The index of the current character - ch, // The current character - escapee = { - '"': '"', - '\\': '\\', - '/': '/', - b: '\b', - f: '\f', - n: '\n', - r: '\r', - t: '\t' - }, - text, - - error = function (m) { - -// Call error when something is wrong. - - throw new SyntaxError(m); - }, - - next = function (c) { - -// If a c parameter is provided, verify that it matches the current character. - - if (c && c !== ch) { - error("Expected '" + c + "' instead of '" + ch + "'"); - } - -// Get the next character. When there are no more characters, -// return the empty string. - - ch = text.charAt(at); - at += 1; - return ch; - }, - - number = function () { - -// Parse a number value. - - var number, - string = ''; - - if (ch === '-') { - string = '-'; - next('-'); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - if (ch === '.') { - string += '.'; - while (next() && ch >= '0' && ch <= '9') { - string += ch; - } - } - if (ch === 'e' || ch === 'E') { - string += ch; - next(); - if (ch === '-' || ch === '+') { - string += ch; - next(); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - } - number = +string; - if (!isFinite(number)) { - error("Bad number"); - } else if (number >= Int64.MAX_INT || number <= Int64.MIN_INT) { - // Return raw string for further process in TJSONProtocol - return string; - } else { - return number; - } - }, - - string = function () { - -// Parse a string value. - - var hex, - i, - string = '', - uffff; - -// When parsing for string values, we must look for " and \ characters. - - if (ch === '"') { - while (next()) { - if (ch === '"') { - next(); - return string; - } - if (ch === '\\') { - next(); - if (ch === 'u') { - uffff = 0; - for (i = 0; i < 4; i += 1) { - hex = parseInt(next(), 16); - if (!isFinite(hex)) { - break; - } - uffff = uffff * 16 + hex; - } - string += String.fromCharCode(uffff); - } else if (typeof escapee[ch] === 'string') { - string += escapee[ch]; - } else { - break; - } - } else { - string += ch; - } - } - } - error("Bad string"); - }, - - white = function () { - -// Skip whitespace. - - while (ch && ch <= ' ') { - next(); - } - }, - - word = function () { - -// true, false, or null. - - switch (ch) { - case 't': - next('t'); - next('r'); - next('u'); - next('e'); - return true; - case 'f': - next('f'); - next('a'); - next('l'); - next('s'); - next('e'); - return false; - case 'n': - next('n'); - next('u'); - next('l'); - next('l'); - return null; - } - error("Unexpected '" + ch + "'"); - }, - - value, // Place holder for the value function. - - array = function () { - -// Parse an array value. - - var array = []; - - if (ch === '[') { - next('['); - white(); - if (ch === ']') { - next(']'); - return array; // empty array - } - while (ch) { - array.push(value()); - white(); - if (ch === ']') { - next(']'); - return array; - } - next(','); - white(); - } - } - error("Bad array"); - }, - - object = function () { - -// Parse an object value. - - var key, - object = {}; - - if (ch === '{') { - next('{'); - white(); - if (ch === '}') { - next('}'); - return object; // empty object - } - while (ch) { - key = string(); - white(); - next(':'); - if (Object.hasOwnProperty.call(object, key)) { - error('Duplicate key "' + key + '"'); - } - object[key] = value(); - white(); - if (ch === '}') { - next('}'); - return object; - } - next(','); - white(); - } - } - error("Bad object"); - }; - - value = function () { - -// Parse a JSON value. It could be an object, an array, a string, a number, -// or a word. - - white(); - switch (ch) { - case '{': - return object(); - case '[': - return array(); - case '"': - return string(); - case '-': - return number(); - default: - return ch >= '0' && ch <= '9' - ? number() - : word(); - } - }; - -// Return the json_parse function. It will have access to all of the above -// functions and variables. - - return function (source) { - var result; - - text = source; - at = 0; - ch = ' '; - result = value(); - white(); - if (ch) { - error("Syntax error"); - } - - return result; - }; -}()); diff --git a/src/thrift/json_protocol.js b/src/thrift/json_protocol.js deleted file mode 100644 index 7e2b7c9..0000000 --- a/src/thrift/json_protocol.js +++ /dev/null @@ -1,799 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var Int64 = require('node-int64'); -var Thrift = require('./thrift'); -var Type = Thrift.Type; -var util = require("util"); - -var Int64Util = require('./int64_util'); -var json_parse = require('./json_parse'); - -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); - -module.exports = TJSONProtocol; - -/** - * Initializes a Thrift JSON protocol instance. - * @constructor - * @param {Thrift.Transport} trans - The transport to serialize to/from. - * @classdesc Apache Thrift Protocols perform serialization which enables cross - * language RPC. The Protocol type is the JavaScript browser implementation - * of the Apache Thrift TJSONProtocol. - * @example - * var protocol = new Thrift.Protocol(transport); - */ -function TJSONProtocol(trans) { - this.tstack = []; - this.tpos = []; - this.trans = trans; -}; - -/** - * Thrift IDL type Id to string mapping. - * @readonly - * @see {@link Thrift.Type} - */ -TJSONProtocol.Type = {}; -TJSONProtocol.Type[Type.BOOL] = '"tf"'; -TJSONProtocol.Type[Type.BYTE] = '"i8"'; -TJSONProtocol.Type[Type.I16] = '"i16"'; -TJSONProtocol.Type[Type.I32] = '"i32"'; -TJSONProtocol.Type[Type.I64] = '"i64"'; -TJSONProtocol.Type[Type.DOUBLE] = '"dbl"'; -TJSONProtocol.Type[Type.STRUCT] = '"rec"'; -TJSONProtocol.Type[Type.STRING] = '"str"'; -TJSONProtocol.Type[Type.MAP] = '"map"'; -TJSONProtocol.Type[Type.LIST] = '"lst"'; -TJSONProtocol.Type[Type.SET] = '"set"'; - -/** - * Thrift IDL type string to Id mapping. - * @readonly - * @see {@link Thrift.Type} - */ -TJSONProtocol.RType = {}; -TJSONProtocol.RType.tf = Type.BOOL; -TJSONProtocol.RType.i8 = Type.BYTE; -TJSONProtocol.RType.i16 = Type.I16; -TJSONProtocol.RType.i32 = Type.I32; -TJSONProtocol.RType.i64 = Type.I64; -TJSONProtocol.RType.dbl = Type.DOUBLE; -TJSONProtocol.RType.rec = Type.STRUCT; -TJSONProtocol.RType.str = Type.STRING; -TJSONProtocol.RType.map = Type.MAP; -TJSONProtocol.RType.lst = Type.LIST; -TJSONProtocol.RType.set = Type.SET; - -/** - * The TJSONProtocol version number. - * @readonly - * @const {number} Version - * @memberof Thrift.Protocol - */ -TJSONProtocol.Version = 1; - -TJSONProtocol.prototype.flush = function() { - this.writeToTransportIfStackIsFlushable(); - return this.trans.flush(); -}; - -TJSONProtocol.prototype.writeToTransportIfStackIsFlushable = function() { - if (this.tstack.length === 1) { - this.trans.write(this.tstack.pop()); - } -}; - -/** - * Serializes the beginning of a Thrift RPC message. - * @param {string} name - The service method to call. - * @param {Thrift.MessageType} messageType - The type of method call. - * @param {number} seqid - The sequence number of this call (always 0 in Apache Thrift). - */ -TJSONProtocol.prototype.writeMessageBegin = function(name, messageType, seqid) { - this.tstack.push([TJSONProtocol.Version, '"' + name + '"', messageType, seqid]); -}; - -/** - * Serializes the end of a Thrift RPC message. - */ -TJSONProtocol.prototype.writeMessageEnd = function() { - var obj = this.tstack.pop(); - - this.wobj = this.tstack.pop(); - this.wobj.push(obj); - - this.wbuf = '[' + this.wobj.join(',') + ']'; - - // we assume there is nothing more to come so we write - this.trans.write(this.wbuf); -}; - -/** - * Serializes the beginning of a struct. - * @param {string} name - The name of the struct. - */ -TJSONProtocol.prototype.writeStructBegin = function(name) { - this.tpos.push(this.tstack.length); - this.tstack.push({}); -}; - -/** - * Serializes the end of a struct. - */ -TJSONProtocol.prototype.writeStructEnd = function() { - var p = this.tpos.pop(); - var struct = this.tstack[p]; - var str = '{'; - var first = true; - for (var key in struct) { - if (first) { - first = false; - } else { - str += ','; - } - - str += key + ':' + struct[key]; - } - - str += '}'; - this.tstack[p] = str; - - this.writeToTransportIfStackIsFlushable(); -}; - -/** - * Serializes the beginning of a struct field. - * @param {string} name - The name of the field. - * @param {Thrift.Protocol.Type} fieldType - The data type of the field. - * @param {number} fieldId - The field's unique identifier. - */ -TJSONProtocol.prototype.writeFieldBegin = function(name, fieldType, fieldId) { - this.tpos.push(this.tstack.length); - this.tstack.push({ 'fieldId': '"' + - fieldId + '"', 'fieldType': TJSONProtocol.Type[fieldType] - }); -}; - -/** - * Serializes the end of a field. - */ -TJSONProtocol.prototype.writeFieldEnd = function() { - var value = this.tstack.pop(); - var fieldInfo = this.tstack.pop(); - - if (':' + value === ":[object Object]") { - this.tstack[this.tstack.length - 1][fieldInfo.fieldId] = '{' + - fieldInfo.fieldType + ':' + JSON.stringify(value) + '}'; - } else { - this.tstack[this.tstack.length - 1][fieldInfo.fieldId] = '{' + - fieldInfo.fieldType + ':' + value + '}'; - } - this.tpos.pop(); - - this.writeToTransportIfStackIsFlushable(); -}; - -/** - * Serializes the end of the set of fields for a struct. - */ -TJSONProtocol.prototype.writeFieldStop = function() { -}; - -/** - * Serializes the beginning of a map collection. - * @param {Thrift.Type} keyType - The data type of the key. - * @param {Thrift.Type} valType - The data type of the value. - * @param {number} [size] - The number of elements in the map (ignored). - */ -TJSONProtocol.prototype.writeMapBegin = function(keyType, valType, size) { - //size is invalid, we'll set it on end. - this.tpos.push(this.tstack.length); - this.tstack.push([TJSONProtocol.Type[keyType], TJSONProtocol.Type[valType], 0]); -}; - -/** - * Serializes the end of a map. - */ -TJSONProtocol.prototype.writeMapEnd = function() { - var p = this.tpos.pop(); - - if (p == this.tstack.length) { - return; - } - - if ((this.tstack.length - p - 1) % 2 !== 0) { - this.tstack.push(''); - } - - var size = (this.tstack.length - p - 1) / 2; - - this.tstack[p][this.tstack[p].length - 1] = size; - - var map = '}'; - var first = true; - while (this.tstack.length > p + 1) { - var v = this.tstack.pop(); - var k = this.tstack.pop(); - if (first) { - first = false; - } else { - map = ',' + map; - } - - if (! isNaN(k)) { k = '"' + k + '"'; } //json "keys" need to be strings - map = k + ':' + v + map; - } - map = '{' + map; - - this.tstack[p].push(map); - this.tstack[p] = '[' + this.tstack[p].join(',') + ']'; - - this.writeToTransportIfStackIsFlushable(); -}; - -/** - * Serializes the beginning of a list collection. - * @param {Thrift.Type} elemType - The data type of the elements. - * @param {number} size - The number of elements in the list. - */ -TJSONProtocol.prototype.writeListBegin = function(elemType, size) { - this.tpos.push(this.tstack.length); - this.tstack.push([TJSONProtocol.Type[elemType], size]); -}; - -/** - * Serializes the end of a list. - */ -TJSONProtocol.prototype.writeListEnd = function() { - var p = this.tpos.pop(); - - while (this.tstack.length > p + 1) { - var tmpVal = this.tstack[p + 1]; - this.tstack.splice(p + 1, 1); - this.tstack[p].push(tmpVal); - } - - this.tstack[p] = '[' + this.tstack[p].join(',') + ']'; - - this.writeToTransportIfStackIsFlushable(); -}; - -/** - * Serializes the beginning of a set collection. - * @param {Thrift.Type} elemType - The data type of the elements. - * @param {number} size - The number of elements in the list. - */ -TJSONProtocol.prototype.writeSetBegin = function(elemType, size) { - this.tpos.push(this.tstack.length); - this.tstack.push([TJSONProtocol.Type[elemType], size]); -}; - -/** - * Serializes the end of a set. - */ -TJSONProtocol.prototype.writeSetEnd = function() { - var p = this.tpos.pop(); - - while (this.tstack.length > p + 1) { - var tmpVal = this.tstack[p + 1]; - this.tstack.splice(p + 1, 1); - this.tstack[p].push(tmpVal); - } - - this.tstack[p] = '[' + this.tstack[p].join(',') + ']'; - - this.writeToTransportIfStackIsFlushable(); -}; - -/** Serializes a boolean */ -TJSONProtocol.prototype.writeBool = function(bool) { - this.tstack.push(bool ? 1 : 0); -}; - -/** Serializes a number */ -TJSONProtocol.prototype.writeByte = function(byte) { - this.tstack.push(byte); -}; - -/** Serializes a number */ -TJSONProtocol.prototype.writeI16 = function(i16) { - this.tstack.push(i16); -}; - -/** Serializes a number */ -TJSONProtocol.prototype.writeI32 = function(i32) { - this.tstack.push(i32); -}; - -/** Serializes a number */ -TJSONProtocol.prototype.writeI64 = function(i64) { - if (i64 instanceof Int64) { - this.tstack.push(Int64Util.toDecimalString(i64)); - } else { - this.tstack.push(i64); - } -}; - -/** Serializes a number */ -TJSONProtocol.prototype.writeDouble = function(dub) { - this.tstack.push(dub); -}; - -/** Serializes a string */ -TJSONProtocol.prototype.writeString = function(arg) { - // We do not encode uri components for wire transfer: - if (arg === null) { - this.tstack.push(null); - } else { - if (typeof arg === 'string') { - var str = arg; - } else if (arg instanceof Buffer) { - var str = arg.toString('utf8'); - } else { - throw new Error('writeString called without a string/Buffer argument: ' + arg); - } - - // concat may be slower than building a byte buffer - var escapedString = ''; - for (var i = 0; i < str.length; i++) { - var ch = str.charAt(i); // a single double quote: " - if (ch === '\"') { - escapedString += '\\\"'; // write out as: \" - } else if (ch === '\\') { // a single backslash: \ - escapedString += '\\\\'; // write out as: \\ - /* Currently escaped forward slashes break TJSONProtocol. - * As it stands, we can simply pass forward slashes into - * our strings across the wire without being escaped. - * I think this is the protocol's bug, not thrift.js - * } else if(ch === '/') { // a single forward slash: / - * escapedString += '\\/'; // write out as \/ - * } - */ - } else if (ch === '\b') { // a single backspace: invisible - escapedString += '\\b'; // write out as: \b" - } else if (ch === '\f') { // a single formfeed: invisible - escapedString += '\\f'; // write out as: \f" - } else if (ch === '\n') { // a single newline: invisible - escapedString += '\\n'; // write out as: \n" - } else if (ch === '\r') { // a single return: invisible - escapedString += '\\r'; // write out as: \r" - } else if (ch === '\t') { // a single tab: invisible - escapedString += '\\t'; // write out as: \t" - } else { - escapedString += ch; // Else it need not be escaped - } - } - this.tstack.push('"' + escapedString + '"'); - } -}; - -/** Serializes a string */ -TJSONProtocol.prototype.writeBinary = function(arg) { - if (typeof arg === 'string') { - var buf = new Buffer(arg, 'binary'); - } else if (arg instanceof Buffer || - Object.prototype.toString.call(arg) == '[object Uint8Array]') { - var buf = arg; - } else { - throw new Error('writeBinary called without a string/Buffer argument: ' + arg); - } - this.tstack.push('"' + buf.toString('base64') + '"'); -}; - -/** - * @class - * @name AnonReadMessageBeginReturn - * @property {string} fname - The name of the service method. - * @property {Thrift.MessageType} mtype - The type of message call. - * @property {number} rseqid - The sequence number of the message (0 in Thrift RPC). - */ -/** - * Deserializes the beginning of a message. - * @returns {AnonReadMessageBeginReturn} - */ -TJSONProtocol.prototype.readMessageBegin = function() { - this.rstack = []; - this.rpos = []; - - //Borrow the inbound transport buffer and ensure data is present/consistent - var transBuf = this.trans.borrow(); - if (transBuf.readIndex >= transBuf.writeIndex) { - throw new InputBufferUnderrunError(); - } - var cursor = transBuf.readIndex; - - if (transBuf.buf[cursor] !== 0x5B) { //[ - throw new Error("Malformed JSON input, no opening bracket"); - } - - //Parse a single message (there may be several in the buffer) - // TODO: Handle characters using multiple code units - cursor++; - var openBracketCount = 1; - var inString = false; - for (; cursor < transBuf.writeIndex; cursor++) { - var chr = transBuf.buf[cursor]; - //we use hexa charcode here because data[i] returns an int and not a char - if (inString) { - if (chr === 0x22) { //" - inString = false; - } else if (chr === 0x5C) { //\ - //escaped character, skip - cursor += 1; - } - } else { - if (chr === 0x5B) { //[ - openBracketCount += 1; - } else if (chr === 0x5D) { //] - openBracketCount -= 1; - if (openBracketCount === 0) { - //end of json message detected - break; - } - } else if (chr === 0x22) { //" - inString = true; - } - } - } - - if (openBracketCount !== 0) { - // Missing closing bracket. Can be buffer underrun. - throw new InputBufferUnderrunError(); - } - - //Reconstitute the JSON object and conume the necessary bytes - this.robj = json_parse(transBuf.buf.slice(transBuf.readIndex, cursor+1).toString()); - this.trans.consume(cursor + 1 - transBuf.readIndex); - - //Verify the protocol version - var version = this.robj.shift(); - if (version != TJSONProtocol.Version) { - throw new Error('Wrong thrift protocol version: ' + version); - } - - //Objectify the thrift message {name/type/sequence-number} for return - // and then save the JSON object in rstack - var r = {}; - r.fname = this.robj.shift(); - r.mtype = this.robj.shift(); - r.rseqid = this.robj.shift(); - this.rstack.push(this.robj.shift()); - return r; -}; - -/** Deserializes the end of a message. */ -TJSONProtocol.prototype.readMessageEnd = function() { -}; - -/** - * Deserializes the beginning of a struct. - * @param {string} [name] - The name of the struct (ignored) - * @returns {object} - An object with an empty string fname property - */ -TJSONProtocol.prototype.readStructBegin = function() { - var r = {}; - r.fname = ''; - - //incase this is an array of structs - if (this.rstack[this.rstack.length - 1] instanceof Array) { - this.rstack.push(this.rstack[this.rstack.length - 1].shift()); - } - - return r; -}; - -/** Deserializes the end of a struct. */ -TJSONProtocol.prototype.readStructEnd = function() { - this.rstack.pop(); -}; - -/** - * @class - * @name AnonReadFieldBeginReturn - * @property {string} fname - The name of the field (always ''). - * @property {Thrift.Type} ftype - The data type of the field. - * @property {number} fid - The unique identifier of the field. - */ -/** - * Deserializes the beginning of a field. - * @returns {AnonReadFieldBeginReturn} - */ -TJSONProtocol.prototype.readFieldBegin = function() { - var r = {}; - - var fid = -1; - var ftype = Type.STOP; - - //get a fieldId - for (var f in (this.rstack[this.rstack.length - 1])) { - if (f === null) { - continue; - } - - fid = parseInt(f, 10); - this.rpos.push(this.rstack.length); - - var field = this.rstack[this.rstack.length - 1][fid]; - - //remove so we don't see it again - delete this.rstack[this.rstack.length - 1][fid]; - - this.rstack.push(field); - - break; - } - - if (fid != -1) { - //should only be 1 of these but this is the only - //way to match a key - for (var i in (this.rstack[this.rstack.length - 1])) { - if (TJSONProtocol.RType[i] === null) { - continue; - } - - ftype = TJSONProtocol.RType[i]; - this.rstack[this.rstack.length - 1] = this.rstack[this.rstack.length - 1][i]; - } - } - - r.fname = ''; - r.ftype = ftype; - r.fid = fid; - - return r; -}; - -/** Deserializes the end of a field. */ -TJSONProtocol.prototype.readFieldEnd = function() { - var pos = this.rpos.pop(); - - //get back to the right place in the stack - while (this.rstack.length > pos) { - this.rstack.pop(); - } -}; - -/** - * @class - * @name AnonReadMapBeginReturn - * @property {Thrift.Type} ktype - The data type of the key. - * @property {Thrift.Type} vtype - The data type of the value. - * @property {number} size - The number of elements in the map. - */ -/** - * Deserializes the beginning of a map. - * @returns {AnonReadMapBeginReturn} - */ -TJSONProtocol.prototype.readMapBegin = function() { - var map = this.rstack.pop(); - var first = map.shift(); - if (first instanceof Array) { - this.rstack.push(map); - map = first; - first = map.shift(); - } - - var r = {}; - r.ktype = TJSONProtocol.RType[first]; - r.vtype = TJSONProtocol.RType[map.shift()]; - r.size = map.shift(); - - - this.rpos.push(this.rstack.length); - this.rstack.push(map.shift()); - - return r; -}; - -/** Deserializes the end of a map. */ -TJSONProtocol.prototype.readMapEnd = function() { - this.readFieldEnd(); -}; - -/** - * @class - * @name AnonReadColBeginReturn - * @property {Thrift.Type} etype - The data type of the element. - * @property {number} size - The number of elements in the collection. - */ -/** - * Deserializes the beginning of a list. - * @returns {AnonReadColBeginReturn} - */ -TJSONProtocol.prototype.readListBegin = function() { - var list = this.rstack[this.rstack.length - 1]; - - var r = {}; - r.etype = TJSONProtocol.RType[list.shift()]; - r.size = list.shift(); - - this.rpos.push(this.rstack.length); - this.rstack.push(list.shift()); - - return r; -}; - -/** Deserializes the end of a list. */ -TJSONProtocol.prototype.readListEnd = function() { - var pos = this.rpos.pop() - 2; - var st = this.rstack; - st.pop(); - if (st instanceof Array && st.length > pos && st[pos].length > 0) { - st.push(st[pos].shift()); - } -}; - -/** - * Deserializes the beginning of a set. - * @returns {AnonReadColBeginReturn} - */ -TJSONProtocol.prototype.readSetBegin = function() { - return this.readListBegin(); -}; - -/** Deserializes the end of a set. */ -TJSONProtocol.prototype.readSetEnd = function() { - return this.readListEnd(); -}; - -TJSONProtocol.prototype.readBool = function() { - return this.readValue() == '1'; -}; - -TJSONProtocol.prototype.readByte = function() { - return this.readI32(); -}; - -TJSONProtocol.prototype.readI16 = function() { - return this.readI32(); -}; - -TJSONProtocol.prototype.readI32 = function(f) { - return +this.readValue(); -} - -/** Returns the next value found in the protocol buffer */ -TJSONProtocol.prototype.readValue = function(f) { - if (f === undefined) { - f = this.rstack[this.rstack.length - 1]; - } - - var r = {}; - - if (f instanceof Array) { - if (f.length === 0) { - r.value = undefined; - } else { - r.value = f.shift(); - } - } else if (!(f instanceof Int64) && f instanceof Object) { - for (var i in f) { - if (i === null) { - continue; - } - this.rstack.push(f[i]); - delete f[i]; - - r.value = i; - break; - } - } else { - r.value = f; - this.rstack.pop(); - } - - return r.value; -}; - -TJSONProtocol.prototype.readI64 = function() { - var n = this.readValue() - if (typeof n === 'string') { - // Assuming no one is sending in 1.11111e+33 format - return Int64Util.fromDecimalString(n); - } else { - return new Int64(n); - } -}; - -TJSONProtocol.prototype.readDouble = function() { - return this.readI32(); -}; - -TJSONProtocol.prototype.readBinary = function() { - return new Buffer(this.readValue(), 'base64'); -}; - -TJSONProtocol.prototype.readString = function() { - return this.readValue(); -}; - -/** - * Returns the underlying transport. - * @readonly - * @returns {Thrift.Transport} The underlying transport. - */ -TJSONProtocol.prototype.getTransport = function() { - return this.trans; -}; - -/** - * Method to arbitrarily skip over data - */ -TJSONProtocol.prototype.skip = function(type) { - switch (type) { - case Type.BOOL: - this.readBool(); - break; - case Type.BYTE: - this.readByte(); - break; - case Type.I16: - this.readI16(); - break; - case Type.I32: - this.readI32(); - break; - case Type.I64: - this.readI64(); - break; - case Type.DOUBLE: - this.readDouble(); - break; - case Type.STRING: - this.readString(); - break; - case Type.STRUCT: - this.readStructBegin(); - while (true) { - var r = this.readFieldBegin(); - if (r.ftype === Type.STOP) { - break; - } - this.skip(r.ftype); - this.readFieldEnd(); - } - this.readStructEnd(); - break; - case Type.MAP: - var mapBegin = this.readMapBegin(); - for (var i = 0; i < mapBegin.size; ++i) { - this.skip(mapBegin.ktype); - this.skip(mapBegin.vtype); - } - this.readMapEnd(); - break; - case Type.SET: - var setBegin = this.readSetBegin(); - for (var i2 = 0; i2 < setBegin.size; ++i2) { - this.skip(setBegin.etype); - } - this.readSetEnd(); - break; - case Type.LIST: - var listBegin = this.readListBegin(); - for (var i3 = 0; i3 < listBegin.size; ++i3) { - this.skip(listBegin.etype); - } - this.readListEnd(); - break; - default: - throw new Error("Invalid type: " + type); - } -}; diff --git a/src/thrift/log.js b/src/thrift/log.js deleted file mode 100644 index 053e813..0000000 --- a/src/thrift/log.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var util = require('util'); - -var disabled = function () {}; -var logFunc = console.log; -var logLevel = 'error'; // default level - -function factory(level) { - return function () { - // better use spread syntax, but due to compatibility, - // use legacy method here. - var args = ['thrift: [' + level + '] '].concat(Array.from(arguments)); - return logFunc(util.format.apply(null, args)); - }; -} - -var trace = disabled; -var debug = disabled; -var error = disabled; -var warning = disabled; -var info = disabled; - -exports.setLogFunc = function (func) { - logFunc = func; -}; - -var setLogLevel = exports.setLogLevel = function (level) { - trace = debug = error = warning = info = disabled; - logLevel = level; - switch (logLevel) { - case 'trace': - trace = factory('TRACE'); - case 'debug': - debug = factory('DEBUG'); - case 'error': - error = factory('ERROR'); - case 'warning': - warning = factory('WARN'); - case 'info': - info = factory('INFO'); - } -}; - -// set default -setLogLevel(logLevel); - -exports.getLogLevel = function () { - return logLevel; -}; - -exports.trace = function () { - return trace.apply(null, arguments); -}; - -exports.debug = function () { - return debug.apply(null, arguments); -}; - -exports.error = function () { - return error.apply(null, arguments); -}; - -exports.warning = function () { - return warning.apply(null, arguments); -}; - -exports.info = function () { - return info.apply(null, arguments); -}; diff --git a/src/thrift/multiplexed_processor.js b/src/thrift/multiplexed_processor.js deleted file mode 100644 index 67b62f7..0000000 --- a/src/thrift/multiplexed_processor.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var Thrift = require('./thrift'); - -exports.MultiplexedProcessor = MultiplexedProcessor; - -function MultiplexedProcessor(stream, options) { - this.services = {}; -}; - -MultiplexedProcessor.prototype.registerProcessor = function(name, handler) { - this.services[name] = handler; -}; - -MultiplexedProcessor.prototype.process = function(inp, out) { - var begin = inp.readMessageBegin(); - - if (begin.mtype != Thrift.MessageType.CALL && begin.mtype != Thrift.MessageType.ONEWAY) { - throw new Thrift.TException('TMultiplexedProcessor: Unexpected message type'); - } - - var p = begin.fname.split(':'); - var sname = p[0]; - var fname = p[1]; - - if (! (sname in this.services)) { - throw new Thrift.TException('TMultiplexedProcessor: Unknown service: ' + sname); - } - - //construct a proxy object which stubs the readMessageBegin - //for the service - var inpProxy = {}; - - for (var attr in inp) { - inpProxy[attr] = inp[attr]; - } - - inpProxy.readMessageBegin = function() { - return { - fname: fname, - mtype: begin.mtype, - rseqid: begin.rseqid - }; - }; - - this.services[sname].process(inpProxy, out); -}; diff --git a/src/thrift/multiplexed_protocol.js b/src/thrift/multiplexed_protocol.js deleted file mode 100644 index d078aa2..0000000 --- a/src/thrift/multiplexed_protocol.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var util = require('util'); -var Thrift = require('./thrift'); - -exports.Multiplexer = Multiplexer; - -function Wrapper(serviceName, protocol, connection) { - - function MultiplexProtocol(trans, strictRead, strictWrite) { - protocol.call(this, trans, strictRead, strictWrite); - }; - - util.inherits(MultiplexProtocol, protocol); - - MultiplexProtocol.prototype.writeMessageBegin = function(name, type, seqid) { - if (type == Thrift.MessageType.CALL || type == Thrift.MessageType.ONEWAY) { - connection.seqId2Service[seqid] = serviceName; - MultiplexProtocol.super_.prototype.writeMessageBegin.call(this, - serviceName + ":" + name, - type, - seqid); - } else { - MultiplexProtocol.super_.prototype.writeMessageBegin.call(this, name, type, seqid); - } - }; - - return MultiplexProtocol; -}; - -function Multiplexer() { - this.seqid = 0; -}; - -Multiplexer.prototype.createClient = function(serviceName, ServiceClient, connection) { - if (ServiceClient.Client) { - ServiceClient = ServiceClient.Client; - } - var writeCb = function(buf, seqid) { - connection.write(buf,seqid); - }; - var transport = new connection.transport(undefined, writeCb); - var protocolWrapper = new Wrapper(serviceName, connection.protocol, connection); - var client = new ServiceClient(transport, protocolWrapper); - var self = this; - client.new_seqid = function() { - self.seqid += 1; - return self.seqid; - }; - - if (typeof connection.client !== 'object') { - connection.client = {}; - } - connection.client[serviceName] = client; - - return client; -}; diff --git a/src/thrift/protocol.js b/src/thrift/protocol.js deleted file mode 100644 index a70ebe2..0000000 --- a/src/thrift/protocol.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -module.exports.TBinaryProtocol = require('./binary_protocol'); -module.exports.TCompactProtocol = require('./compact_protocol'); -module.exports.TJSONProtocol = require('./json_protocol'); diff --git a/src/thrift/server.js b/src/thrift/server.js deleted file mode 100644 index 16b74ea..0000000 --- a/src/thrift/server.js +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var constants = require('constants'); -var net = require('net'); -var tls = require('tls'); - -var TBufferedTransport = require('./buffered_transport'); -var TBinaryProtocol = require('./binary_protocol'); -var THeaderProtocol = require('./header_protocol'); -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); - -/** - * Create a Thrift server which can serve one or multiple services. - * @param {object} processor - A normal or multiplexedProcessor (must - * be preconstructed with the desired handler). - * @param {ServerOptions} options - Optional additional server configuration. - * @returns {object} - The Apache Thrift Multiplex Server. - */ -exports.createMultiplexServer = function(processor, options) { - var transport = (options && options.transport) ? options.transport : TBufferedTransport; - var protocol = (options && options.protocol) ? options.protocol : TBinaryProtocol; - - function serverImpl(stream) { - var self = this; - stream.on('error', function(err) { - self.emit('error', err); - }); - stream.on('data', transport.receiver(function(transportWithData) { - var input = new protocol(transportWithData); - var outputCb = function(buf) { - try { - stream.write(buf); - } catch (err) { - self.emit('error', err); - stream.end(); - } - }; - - var output = new protocol(new transport(undefined, outputCb)); - // Read and write need to be performed on the same transport - // for THeaderProtocol because we should only respond with - // headers if the request contains headers - if (protocol === THeaderProtocol) { - output = input; - output.trans.onFlush = outputCb; - } - - try { - do { - processor.process(input, output); - transportWithData.commitPosition(); - } while (true); - } catch (err) { - if (err instanceof InputBufferUnderrunError) { - //The last data in the buffer was not a complete message, wait for the rest - transportWithData.rollbackPosition(); - } - else if (err.message === "Invalid type: undefined") { - //No more data in the buffer - //This trap is a bit hackish - //The next step to improve the node behavior here is to have - // the compiler generated process method throw a more explicit - // error when the network buffer is empty (regardles of the - // protocol/transport stack in use) and replace this heuristic. - // Also transports should probably not force upper layers to - // manage their buffer positions (i.e. rollbackPosition() and - // commitPosition() should be eliminated in lieu of a transport - // encapsulated buffer management strategy.) - transportWithData.rollbackPosition(); - } - else { - //Unexpected error - self.emit('error', err); - stream.end(); - } - } - })); - - stream.on('end', function() { - stream.end(); - }); - } - - if (options && options.tls) { - if (!('secureProtocol' in options.tls) && !('secureOptions' in options.tls)) { - options.tls.secureProtocol = "SSLv23_method"; - options.tls.secureOptions = constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3; - } - return tls.createServer(options.tls, serverImpl); - } else { - return net.createServer(serverImpl); - } -}; - -/** - * Create a single service Apache Thrift server. - * @param {object} processor - A service class or processor function. - * @param {ServerOptions} options - Optional additional server configuration. - * @returns {object} - The Apache Thrift Multiplex Server. - */ -exports.createServer = function(processor, handler, options) { - if (processor.Processor) { - processor = processor.Processor; - } - return exports.createMultiplexServer(new processor(handler), options); -}; diff --git a/src/thrift/thrift.js b/src/thrift/thrift.js deleted file mode 100644 index f728eac..0000000 --- a/src/thrift/thrift.js +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var util = require('util'); - -var Type = exports.Type = { - STOP: 0, - VOID: 1, - BOOL: 2, - BYTE: 3, - I08: 3, - DOUBLE: 4, - I16: 6, - I32: 8, - I64: 10, - STRING: 11, - UTF7: 11, - STRUCT: 12, - MAP: 13, - SET: 14, - LIST: 15, - UTF8: 16, - UTF16: 17 -}; - -exports.MessageType = { - CALL: 1, - REPLY: 2, - EXCEPTION: 3, - ONEWAY: 4 -}; - -exports.TException = TException; - -function TException(message) { - Error.call(this); - if (Error.captureStackTrace !== undefined) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = this.constructor.name; - this.message = message; -}; -util.inherits(TException, Error); - -var TApplicationExceptionType = exports.TApplicationExceptionType = { - UNKNOWN: 0, - UNKNOWN_METHOD: 1, - INVALID_MESSAGE_TYPE: 2, - WRONG_METHOD_NAME: 3, - BAD_SEQUENCE_ID: 4, - MISSING_RESULT: 5, - INTERNAL_ERROR: 6, - PROTOCOL_ERROR: 7, - INVALID_TRANSFORM: 8, - INVALID_PROTOCOL: 9, - UNSUPPORTED_CLIENT_TYPE: 10 -}; - -exports.TApplicationException = TApplicationException; - -function TApplicationException(type, message) { - TException.call(this); - if (Error.captureStackTrace !== undefined) { - Error.captureStackTrace(this, this.constructor); - } - - this.type = type || TApplicationExceptionType.UNKNOWN; - this.name = this.constructor.name; - this.message = message; -}; -util.inherits(TApplicationException, TException); - -TApplicationException.prototype.read = function(input) { - var ftype; - var ret = input.readStructBegin('TApplicationException'); - - while(1){ - ret = input.readFieldBegin(); - if(ret.ftype == Type.STOP) - break; - - switch(ret.fid){ - case 1: - if( ret.ftype == Type.STRING ){ - ret = input.readString(); - this.message = ret; - } else { - ret = input.skip(ret.ftype); - } - break; - case 2: - if( ret.ftype == Type.I32 ){ - ret = input.readI32(); - this.type = ret; - } else { - ret = input.skip(ret.ftype); - } - break; - default: - ret = input.skip(ret.ftype); - break; - } - input.readFieldEnd(); - } - input.readStructEnd(); -}; - -TApplicationException.prototype.write = function(output){ - output.writeStructBegin('TApplicationException'); - - if (this.message) { - output.writeFieldBegin('message', Type.STRING, 1); - output.writeString(this.message); - output.writeFieldEnd(); - } - - if (this.code) { - output.writeFieldBegin('type', Type.I32, 2); - output.writeI32(this.code); - output.writeFieldEnd(); - } - - output.writeFieldStop(); - output.writeStructEnd(); -}; - -var TProtocolExceptionType = exports.TProtocolExceptionType = { - UNKNOWN: 0, - INVALID_DATA: 1, - NEGATIVE_SIZE: 2, - SIZE_LIMIT: 3, - BAD_VERSION: 4, - NOT_IMPLEMENTED: 5, - DEPTH_LIMIT: 6 -}; - - -exports.TProtocolException = TProtocolException; - -function TProtocolException(type, message) { - Error.call(this); - if (Error.captureStackTrace !== undefined) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = this.constructor.name; - this.type = type; - this.message = message; -}; -util.inherits(TProtocolException, Error); - -exports.objectLength = function(obj) { - return Object.keys(obj).length; -}; - -exports.inherits = function(constructor, superConstructor) { - util.inherits(constructor, superConstructor); -}; - -var copyList, copyMap; - -copyList = function(lst, types) { - - if (!lst) {return lst; } - - var type; - - if (types.shift === undefined) { - type = types; - } - else { - type = types[0]; - } - var Type = type; - - var len = lst.length, result = [], i, val; - for (i = 0; i < len; i++) { - val = lst[i]; - if (type === null) { - result.push(val); - } - else if (type === copyMap || type === copyList) { - result.push(type(val, types.slice(1))); - } - else { - result.push(new Type(val)); - } - } - return result; -}; - -copyMap = function(obj, types){ - - if (!obj) {return obj; } - - var type; - - if (types.shift === undefined) { - type = types; - } - else { - type = types[0]; - } - var Type = type; - - var result = {}, val; - for(var prop in obj) { - if(obj.hasOwnProperty(prop)) { - val = obj[prop]; - if (type === null) { - result[prop] = val; - } - else if (type === copyMap || type === copyList) { - result[prop] = type(val, types.slice(1)); - } - else { - result[prop] = new Type(val); - } - } - } - return result; -}; - -module.exports.copyMap = copyMap; -module.exports.copyList = copyList; diff --git a/src/thrift/transport.js b/src/thrift/transport.js deleted file mode 100644 index 59daa98..0000000 --- a/src/thrift/transport.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -module.exports.TBufferedTransport = require('./buffered_transport'); -module.exports.TFramedTransport = require('./framed_transport'); -module.exports.InputBufferUnderrunError = require('./input_buffer_underrun_error'); diff --git a/src/thrift/web_server.js b/src/thrift/web_server.js deleted file mode 100644 index a33f47a..0000000 --- a/src/thrift/web_server.js +++ /dev/null @@ -1,567 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var http = require('http'); -var https = require('https'); -var url = require("url"); -var path = require("path"); -var fs = require("fs"); -var crypto = require("crypto"); -var log = require('./log'); - -var MultiplexedProcessor = require('./multiplexed_processor').MultiplexedProcessor; - -var TBufferedTransport = require('./buffered_transport'); -var TBinaryProtocol = require('./binary_protocol'); -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); - -// WSFrame constructor and prototype -///////////////////////////////////////////////////////////////////// - -/** Apache Thrift RPC Web Socket Transport - * Frame layout conforming to RFC 6455 circa 12/2011 - * - * Theoretical frame size limit is 4GB*4GB, however the Node Buffer - * limit is 1GB as of v0.10. The frame length encoding is also - * configured for a max of 4GB presently and needs to be adjusted - * if Node/Browsers become capabile of > 4GB frames. - * - * - FIN is 1 if the message is complete - * - RSV1/2/3 are always 0 - * - Opcode is 1(TEXT) for TJSONProtocol and 2(BIN) for TBinaryProtocol - * - Mask Present bit is 1 sending to-server and 0 sending to-client - * - Payload Len: - * + If < 126: then represented directly - * + If >=126: but within range of an unsigned 16 bit integer - * then Payload Len is 126 and the two following bytes store - * the length - * + Else: Payload Len is 127 and the following 8 bytes store the - * length as an unsigned 64 bit integer - * - Masking key is a 32 bit key only present when sending to the server - * - Payload follows the masking key or length - * - * 0 1 2 3 - * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - * +-+-+-+-+-------+-+-------------+-------------------------------+ - * |F|R|R|R| opcode|M| Payload len | Extended payload length | - * |I|S|S|S| (4) |A| (7) | (16/64) | - * |N|V|V|V| |S| | (if payload len==126/127) | - * | |1|2|3| |K| | | - * +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + - * | Extended payload length continued, if payload len == 127 | - * + - - - - - - - - - - - - - - - +-------------------------------+ - * | |Masking-key, if MASK set to 1 | - * +-------------------------------+-------------------------------+ - * | Masking-key (continued) | Payload Data | - * +-------------------------------- - - - - - - - - - - - - - - - + - * : Payload Data continued ... : - * + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - * | Payload Data continued ... | - * +---------------------------------------------------------------+ - */ -var wsFrame = { - /** Encodes a WebSocket frame - * - * @param {Buffer} data - The raw data to encode - * @param {Buffer} mask - The mask to apply when sending to server, null for no mask - * @param {Boolean} binEncoding - True for binary encoding, false for text encoding - * @returns {Buffer} - The WebSocket frame, ready to send - */ - encode: function(data, mask, binEncoding) { - var frame = new Buffer(wsFrame.frameSizeFromData(data, mask)); - //Byte 0 - FIN & OPCODE - frame[0] = wsFrame.fin.FIN + - (binEncoding ? wsFrame.frameOpCodes.BIN : wsFrame.frameOpCodes.TEXT); - //Byte 1 or 1-3 or 1-9 - MASK FLAG & SIZE - var payloadOffset = 2; - if (data.length < 0x7E) { - frame[1] = data.length + (mask ? wsFrame.mask.TO_SERVER : wsFrame.mask.TO_CLIENT); - } else if (data.length < 0xFFFF) { - frame[1] = 0x7E + (mask ? wsFrame.mask.TO_SERVER : wsFrame.mask.TO_CLIENT); - frame.writeUInt16BE(data.length, 2, true); - payloadOffset = 4; - } else { - frame[1] = 0x7F + (mask ? wsFrame.mask.TO_SERVER : wsFrame.mask.TO_CLIENT); - frame.writeUInt32BE(0, 2, true); - frame.writeUInt32BE(data.length, 6, true); - payloadOffset = 10; - } - //MASK - if (mask) { - mask.copy(frame, payloadOffset, 0, 4); - payloadOffset += 4; - } - //Payload - data.copy(frame, payloadOffset); - if (mask) { - wsFrame.applyMask(frame.slice(payloadOffset), frame.slice(payloadOffset-4,payloadOffset)); - } - return frame; - }, - - /** - * @class - * @name WSDecodeResult - * @property {Buffer} data - The decoded data for the first ATRPC message - * @property {Buffer} mask - The frame mask - * @property {Boolean} binEncoding - True if binary (TBinaryProtocol), - * False if text (TJSONProtocol) - * @property {Buffer} nextFrame - Multiple ATRPC messages may be sent in a - * single WebSocket frame, this Buffer contains - * any bytes remaining to be decoded - * @property {Boolean} FIN - True is the message is complete - */ - - /** Decodes a WebSocket frame - * - * @param {Buffer} frame - The raw inbound frame, if this is a continuation - * frame it must have a mask property with the mask. - * @returns {WSDecodeResult} - The decoded payload - * - * @see {@link WSDecodeResult} - */ - decode: function(frame) { - var result = { - data: null, - mask: null, - binEncoding: false, - nextFrame: null, - FIN: true - }; - - //Byte 0 - FIN & OPCODE - if (wsFrame.fin.FIN != (frame[0] & wsFrame.fin.FIN)) { - result.FIN = false; - } - result.binEncoding = (wsFrame.frameOpCodes.BIN == (frame[0] & wsFrame.frameOpCodes.BIN)); - //Byte 1 or 1-3 or 1-9 - SIZE - var lenByte = (frame[1] & 0x0000007F); - var len = lenByte; - var dataOffset = 2; - if (lenByte == 0x7E) { - len = frame.readUInt16BE(2); - dataOffset = 4; - } else if (lenByte == 0x7F) { - len = frame.readUInt32BE(6); - dataOffset = 10; - } - //MASK - if (wsFrame.mask.TO_SERVER == (frame[1] & wsFrame.mask.TO_SERVER)) { - result.mask = new Buffer(4); - frame.copy(result.mask, 0, dataOffset, dataOffset + 4); - dataOffset += 4; - } - //Payload - result.data = new Buffer(len); - frame.copy(result.data, 0, dataOffset, dataOffset+len); - if (result.mask) { - wsFrame.applyMask(result.data, result.mask); - } - //Next Frame - if (frame.length > dataOffset+len) { - result.nextFrame = new Buffer(frame.length - (dataOffset+len)); - frame.copy(result.nextFrame, 0, dataOffset+len, frame.length); - } - //Don't forward control frames - if (frame[0] & wsFrame.frameOpCodes.FINCTRL) { - result.data = null; - } - - return result; - }, - - /** Masks/Unmasks data - * - * @param {Buffer} data - data to mask/unmask in place - * @param {Buffer} mask - the mask - */ - applyMask: function(data, mask){ - //TODO: look into xoring words at a time - var dataLen = data.length; - var maskLen = mask.length; - for (var i = 0; i < dataLen; i++) { - data[i] = data[i] ^ mask[i%maskLen]; - } - }, - - /** Computes frame size on the wire from data to be sent - * - * @param {Buffer} data - data.length is the assumed payload size - * @param {Boolean} mask - true if a mask will be sent (TO_SERVER) - */ - frameSizeFromData: function(data, mask) { - var headerSize = 10; - if (data.length < 0x7E) { - headerSize = 2; - } else if (data.length < 0xFFFF) { - headerSize = 4; - } - return headerSize + data.length + (mask ? 4 : 0); - }, - - frameOpCodes: { - CONT: 0x00, - TEXT: 0x01, - BIN: 0x02, - CTRL: 0x80 - }, - - mask: { - TO_SERVER: 0x80, - TO_CLIENT: 0x00 - }, - - fin: { - CONT: 0x00, - FIN: 0x80 - } -}; - - -// createWebServer constructor and options -///////////////////////////////////////////////////////////////////// - -/** - * @class - * @name ServerOptions - * @property {array} cors - Array of CORS origin strings to permit requests from. - * @property {string} files - Path to serve static files from, if absent or "" - * static file service is disabled. - * @property {object} headers - An object hash mapping header strings to header value - * strings, these headers are transmitted in response to - * static file GET operations. - * @property {object} services - An object hash mapping service URI strings - * to ServiceOptions objects - * @property {object} tls - Node.js TLS options (see: nodejs.org/api/tls.html), - * if not present or null regular http is used, - * at least a key and a cert must be defined to use SSL/TLS - * @see {@link ServiceOptions} - */ - -/** - * @class - * @name ServiceOptions - * @property {object} transport - The layered transport to use (defaults - * to TBufferedTransport). - * @property {object} protocol - The serialization Protocol to use (defaults to - * TBinaryProtocol). - * @property {object} processor - The Thrift Service class/processor generated - * by the IDL Compiler for the service (the "cls" - * key can also be used for this attribute). - * @property {object} handler - The handler methods for the Thrift Service. - */ - -/** - * Create a Thrift server which can serve static files and/or one or - * more Thrift Services. - * @param {ServerOptions} options - The server configuration. - * @returns {object} - The Apache Thrift Web Server. - */ -exports.createWebServer = function(options) { - var baseDir = options.files; - var contentTypesByExtension = { - '.txt': 'text/plain', - '.html': 'text/html', - '.css': 'text/css', - '.xml': 'application/xml', - '.json': 'application/json', - '.js': 'application/javascript', - '.jpg': 'image/jpeg', - '.jpeg': 'image/jpeg', - '.gif': 'image/gif', - '.png': 'image/png', - '.svg': 'image/svg+xml' - }; - - //Setup all of the services - var services = options.services; - for (var uri in services) { - var svcObj = services[uri]; - - //Setup the processor - if (svcObj.processor instanceof MultiplexedProcessor) { - //Multiplex processors have pre embedded processor/handler pairs, save as is - svcObj.processor = svcObj.processor; - } else { - //For historical reasons Node.js supports processors passed in directly or via the - // IDL Compiler generated class housing the processor. Also, the options property - // for a Processor has been called both cls and processor at different times. We - // support any of the four possibilities here. - var processor = (svcObj.processor) ? (svcObj.processor.Processor || svcObj.processor) : - (svcObj.cls.Processor || svcObj.cls); - //Processors can be supplied as constructed objects with handlers already embedded, - // if a handler is provided we construct a new processor, if not we use the processor - // object directly - if (svcObj.handler) { - svcObj.processor = new processor(svcObj.handler); - } else { - svcObj.processor = processor; - } - } - svcObj.transport = svcObj.transport ? svcObj.transport : TBufferedTransport; - svcObj.protocol = svcObj.protocol ? svcObj.protocol : TBinaryProtocol; - } - - //Verify CORS requirements - function VerifyCORSAndSetHeaders(request, response) { - if (request.headers.origin && options.cors) { - if (options.cors["*"] || options.cors[request.headers.origin]) { - //Allow, origin allowed - response.setHeader("access-control-allow-origin", request.headers.origin); - response.setHeader("access-control-allow-methods", "GET, POST, OPTIONS"); - response.setHeader("access-control-allow-headers", "content-type, accept"); - response.setHeader("access-control-max-age", "60"); - return true; - } else { - //Disallow, origin denied - return false; - } - } - //Allow, CORS is not in use - return true; - } - - - //Handle OPTIONS method (CORS) - /////////////////////////////////////////////////// - function processOptions(request, response) { - if (VerifyCORSAndSetHeaders(request, response)) { - response.writeHead("204", "No Content", {"content-length": 0}); - } else { - response.writeHead("403", "Origin " + request.headers.origin + " not allowed", {}); - } - response.end(); - } - - - //Handle POST methods (TXHRTransport) - /////////////////////////////////////////////////// - function processPost(request, response) { - //Lookup service - var uri = url.parse(request.url).pathname; - var svc = services[uri]; - if (!svc) { - response.writeHead("403", "No Apache Thrift Service at " + uri, {}); - response.end(); - return; - } - - //Verify CORS requirements - if (!VerifyCORSAndSetHeaders(request, response)) { - response.writeHead("403", "Origin " + request.headers.origin + " not allowed", {}); - response.end(); - return; - } - - //Process XHR payload - request.on('data', svc.transport.receiver(function(transportWithData) { - var input = new svc.protocol(transportWithData); - var output = new svc.protocol(new svc.transport(undefined, function(buf) { - try { - response.writeHead(200); - response.end(buf); - } catch (err) { - response.writeHead(500); - response.end(); - } - })); - - try { - svc.processor.process(input, output); - transportWithData.commitPosition(); - } catch (err) { - if (err instanceof InputBufferUnderrunError) { - transportWithData.rollbackPosition(); - } else { - response.writeHead(500); - response.end(); - } - } - })); - } - - - //Handle GET methods (Static Page Server) - /////////////////////////////////////////////////// - function processGet(request, response) { - //Undefined or empty base directory means do not serve static files - if (!baseDir || "" === baseDir) { - response.writeHead(404); - response.end(); - return; - } - - //Verify CORS requirements - if (!VerifyCORSAndSetHeaders(request, response)) { - response.writeHead("403", "Origin " + request.headers.origin + " not allowed", {}); - response.end(); - return; - } - - //Locate the file requested and send it - var uri = url.parse(request.url).pathname; - var filename = path.resolve(path.join(baseDir, uri)); - - //Ensure the basedir path is not able to be escaped - if (filename.indexOf(baseDir) != 0) { - response.writeHead(400, "Invalid request path", {}); - response.end(); - return; - } - - fs.exists(filename, function(exists) { - if(!exists) { - response.writeHead(404); - response.end(); - return; - } - - if (fs.statSync(filename).isDirectory()) { - filename += '/index.html'; - } - - fs.readFile(filename, "binary", function(err, file) { - if (err) { - response.writeHead(500); - response.end(err + "\n"); - return; - } - var headers = {}; - var contentType = contentTypesByExtension[path.extname(filename)]; - if (contentType) { - headers["Content-Type"] = contentType; - } - for (var k in options.headers) { - headers[k] = options.headers[k]; - } - response.writeHead(200, headers); - response.write(file, "binary"); - response.end(); - }); - }); - } - - - //Handle WebSocket calls (TWebSocketTransport) - /////////////////////////////////////////////////// - function processWS(data, socket, svc, binEncoding) { - svc.transport.receiver(function(transportWithData) { - var input = new svc.protocol(transportWithData); - var output = new svc.protocol(new svc.transport(undefined, function(buf) { - try { - var frame = wsFrame.encode(buf, null, binEncoding); - socket.write(frame); - } catch (err) { - //TODO: Add better error processing - } - })); - - try { - svc.processor.process(input, output); - transportWithData.commitPosition(); - } - catch (err) { - if (err instanceof InputBufferUnderrunError) { - transportWithData.rollbackPosition(); - } - else { - //TODO: Add better error processing - } - } - })(data); - } - - //Create the server (HTTP or HTTPS) - var server = null; - if (options.tls) { - server = https.createServer(options.tls); - } else { - server = http.createServer(); - } - - //Wire up listeners for upgrade(to WebSocket) & request methods for: - // - GET static files, - // - POST XHR Thrift services - // - OPTIONS CORS requests - server.on('request', function(request, response) { - if (request.method === 'POST') { - processPost(request, response); - } else if (request.method === 'GET') { - processGet(request, response); - } else if (request.method === 'OPTIONS') { - processOptions(request, response); - } else { - response.writeHead(500); - response.end(); - } - }).on('upgrade', function(request, socket, head) { - //Lookup service - var svc; - try { - svc = services[Object.keys(services)[0]]; - } catch(e) { - socket.write("HTTP/1.1 403 No Apache Thrift Service available\r\n\r\n"); - return; - } - //Perform upgrade - var hash = crypto.createHash("sha1"); - hash.update(request.headers['sec-websocket-key'] + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"); - socket.write("HTTP/1.1 101 Switching Protocols\r\n" + - "Upgrade: websocket\r\n" + - "Connection: Upgrade\r\n" + - "Sec-WebSocket-Accept: " + hash.digest("base64") + "\r\n" + - "Sec-WebSocket-Origin: " + request.headers.origin + "\r\n" + - "Sec-WebSocket-Location: ws://" + request.headers.host + request.url + "\r\n" + - "\r\n"); - //Handle WebSocket traffic - var data = null; - socket.on('data', function(frame) { - try { - while (frame) { - var result = wsFrame.decode(frame); - //Prepend any existing decoded data - if (data) { - if (result.data) { - var newData = new Buffer(data.length + result.data.length); - data.copy(newData); - result.data.copy(newData, data.length); - result.data = newData; - } else { - result.data = data; - } - data = null; - } - //If this completes a message process it - if (result.FIN) { - processWS(result.data, socket, svc, result.binEncoding); - } else { - data = result.data; - } - //Prepare next frame for decoding (if any) - frame = result.nextFrame; - } - } catch(e) { - log.error('TWebSocketTransport Exception: ' + e); - socket.destroy(); - } - }); - }); - - //Return the server - return server; -}; diff --git a/src/thrift/ws_connection.js b/src/thrift/ws_connection.js deleted file mode 100644 index 8ee8f6e..0000000 --- a/src/thrift/ws_connection.js +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var util = require('util'); -var WebSocket = require('isomorphic-ws'); -var EventEmitter = require("events").EventEmitter; -var thrift = require('./thrift'); - -var TBufferedTransport = require('./buffered_transport'); -var TJSONProtocol = require('./json_protocol'); -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); - -var createClient = require('./create_client'); -var jsEnv = require('browser-or-node'); -exports.WSConnection = WSConnection; - -/** - * @class - * @name WSConnectOptions - * @property {string} transport - The Thrift layered transport to use (TBufferedTransport, etc). - * @property {string} protocol - The Thrift serialization protocol to use (TJSONProtocol, etc.). - * @property {string} path - The URL path to connect to (e.g. "/", "/mySvc", "/thrift/quoteSvc", etc.). - * @property {object} headers - A standard Node.js header hash, an object hash containing key/value - * pairs where the key is the header name string and the value is the header value string. - * @property {boolean} secure - True causes the connection to use wss, otherwise ws is used. - * @property {object} wsOptions - Options passed on to WebSocket. - * @example - * //Use a secured websocket connection - * // uses the buffered transport layer, uses the JSON protocol and directs RPC traffic - * // to wss://thrift.example.com:9090/hello - * var thrift = require('thrift'); - * var options = { - * transport: thrift.TBufferedTransport, - * protocol: thrift.TJSONProtocol, - * path: "/hello", - * secure: true - * }; - * var con = thrift.createWSConnection("thrift.example.com", 9090, options); - * con.open() - * var client = thrift.createWSClient(myService, connection); - * client.myServiceFunction(); - * con.close() - */ - -/** - * Initializes a Thrift WSConnection instance (use createWSConnection() rather than - * instantiating directly). - * @constructor - * @param {string} host - The host name or IP to connect to. - * @param {number} port - The TCP port to connect to. - * @param {WSConnectOptions} options - The configuration options to use. - * @throws {error} Exceptions other than ttransport.InputBufferUnderrunError are rethrown - * @event {error} The "error" event is fired when a Node.js error event occurs during - * request or response processing, in which case the node error is passed on. An "error" - * event may also be fired when the connection can not map a response back to the - * appropriate client (an internal error), generating a TApplicationException. - * @classdesc WSConnection objects provide Thrift end point transport - * semantics implemented using Websockets. - * @see {@link createWSConnection} - */ -function WSConnection(host, port, options) { - //Initialize the emitter base object - EventEmitter.call(this); - - //Set configuration - this.options = options || {}; - this.host = host; - this.port = port; - this.secure = this.options.secure || false; - this.transport = this.options.transport || TBufferedTransport; - this.protocol = this.options.protocol || TJSONProtocol; - this.path = this.options.path; - this.send_pending = []; - - //The sequence map is used to map seqIDs back to the - // calling client in multiplexed scenarios - this.seqId2Service = {}; - - //Prepare WebSocket options - this.wsOptions = { - host: this.host, - port: this.port || 80, - path: this.options.path || '/', - headers: this.options.headers || {} - }; - for (var attrname in this.options.wsOptions) { - this.wsOptions[attrname] = this.options.wsOptions[attrname]; - } -}; -util.inherits(WSConnection, EventEmitter); - -WSConnection.prototype.__reset = function() { - this.socket = null; //The web socket - this.send_pending = []; //Buffers/Callback pairs waiting to be sent -}; - -WSConnection.prototype.__onOpen = function() { - this.emit("open"); - if (this.send_pending.length > 0) { - //If the user made calls before the connection was fully - //open, send them now - this.send_pending.forEach(function(data) { - this.socket.send(data); - }, this); - this.send_pending = []; - } -}; - -WSConnection.prototype.__onClose = function(evt) { - this.emit("close"); - this.__reset(); -}; - -WSConnection.prototype.__decodeCallback = function(transport_with_data) { - var proto = new this.protocol(transport_with_data); - try { - while (true) { - var header = proto.readMessageBegin(); - var dummy_seqid = header.rseqid * -1; - var client = this.client; - //The Multiplexed Protocol stores a hash of seqid to service names - // in seqId2Service. If the SeqId is found in the hash we need to - // lookup the appropriate client for this call. - // The client var is a single client object when not multiplexing, - // when using multiplexing it is a service name keyed hash of client - // objects. - //NOTE: The 2 way interdependencies between protocols, transports, - // connections and clients in the Node.js implementation are irregular - // and make the implementation difficult to extend and maintain. We - // should bring this stuff inline with typical thrift I/O stack - // operation soon. - // --ra - var service_name = this.seqId2Service[header.rseqid]; - if (service_name) { - client = this.client[service_name]; - delete this.seqId2Service[header.rseqid]; - } - /*jshint -W083 */ - client._reqs[dummy_seqid] = function(err, success) { - transport_with_data.commitPosition(); - var clientCallback = client._reqs[header.rseqid]; - delete client._reqs[header.rseqid]; - if (clientCallback) { - clientCallback(err, success); - } - }; - /*jshint +W083 */ - if (client['recv_' + header.fname]) { - client['recv_' + header.fname](proto, header.mtype, dummy_seqid); - } else { - delete client._reqs[dummy_seqid]; - this.emit("error", - new thrift.TApplicationException( - thrift.TApplicationExceptionType.WRONG_METHOD_NAME, - "Received a response to an unknown RPC function")); - } - } - } catch (e) { - if (e instanceof InputBufferUnderrunError) { - transport_with_data.rollbackPosition(); - } else { - throw e; - } - } -}; - -WSConnection.prototype.__onData = function(data) { - if (Object.prototype.toString.call(data) === "[object ArrayBuffer]") { - data = new Uint8Array(data); - } - var buf = new Buffer(data); - this.transport.receiver(this.__decodeCallback.bind(this))(buf); - -}; - -WSConnection.prototype.__onMessage = function(evt) { - this.__onData(evt.data); -}; - -WSConnection.prototype.__onError = function(evt) { - this.emit("error", evt); - this.socket.close(); -}; - -/** - * Returns true if the transport is open - * @readonly - * @returns {boolean} - */ -WSConnection.prototype.isOpen = function() { - return this.socket && this.socket.readyState === this.socket.OPEN; -}; - -/** - * Opens the transport connection - */ -WSConnection.prototype.open = function() { - //If OPEN/CONNECTING/CLOSING ignore additional opens - if (this.socket && this.socket.readyState !== this.socket.CLOSED) { - return; - } - //If there is no socket or the socket is closed: - if (jsEnv.isBrowser) { - this.socket = new WebSocket(this.uri()); - } else { - this.socket = new WebSocket(this.uri(), "", this.wsOptions); - } - this.socket.binaryType = 'arraybuffer'; - this.socket.onopen = this.__onOpen.bind(this); - this.socket.onmessage = this.__onMessage.bind(this); - this.socket.onerror = this.__onError.bind(this); - this.socket.onclose = this.__onClose.bind(this); -}; - -/** - * Closes the transport connection - */ -WSConnection.prototype.close = function() { - this.socket.close(); -}; - -/** - * Return URI for the connection - * @returns {string} URI - */ -WSConnection.prototype.uri = function() { - var schema = this.secure ? 'wss' : 'ws'; - var port = ''; - var path = this.path || '/'; - var host = this.host; - - // avoid port if default for schema - if (this.port && (('wss' === schema && this.port !== 443) || - ('ws' === schema && this.port !== 80))) { - port = ':' + this.port; - } - - return schema + '://' + host + port + path; -}; - -/** - * Writes Thrift message data to the connection - * @param {Buffer} data - A Node.js Buffer containing the data to write - * @returns {void} No return value. - * @event {error} the "error" event is raised upon request failure passing the - * Node.js error object to the listener. - */ -WSConnection.prototype.write = function(data) { - if (this.isOpen()) { - //Send data and register a callback to invoke the client callback - this.socket.send(data); - } else { - //Queue the send to go out __onOpen - this.send_pending.push(data); - } -}; - -/** - * Creates a new WSConnection object, used by Thrift clients to connect - * to Thrift HTTP based servers. - * @param {string} host - The host name or IP to connect to. - * @param {number} port - The TCP port to connect to. - * @param {WSConnectOptions} options - The configuration options to use. - * @returns {WSConnection} The connection object. - * @see {@link WSConnectOptions} - */ -exports.createWSConnection = function(host, port, options) { - return new WSConnection(host, port, options); -}; - -exports.createWSClient = createClient; diff --git a/src/thrift/ws_transport.js b/src/thrift/ws_transport.js deleted file mode 100644 index 4cf62b9..0000000 --- a/src/thrift/ws_transport.js +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var log = require('./log'); - -module.exports = TWebSocketTransport; - -/** - * Constructor Function for the WebSocket transport. - * @constructor - * @param {string} [url] - The URL to connect to. - * @classdesc The Apache Thrift Transport layer performs byte level I/O - * between RPC clients and servers. The JavaScript TWebSocketTransport object - * uses the WebSocket protocol. Target servers must implement WebSocket. - * (see: node.js example server_http.js). - * @example - * var transport = new Thrift.TWebSocketTransport("http://localhost:8585"); - */ -function TWebSocketTransport(url) { - this.__reset(url); -}; - - -TWebSocketTransport.prototype.__reset = function(url) { - this.url = url; //Where to connect - this.socket = null; //The web socket - this.callbacks = []; //Pending callbacks - this.send_pending = []; //Buffers/Callback pairs waiting to be sent - this.send_buf = ''; //Outbound data, immutable until sent - this.recv_buf = ''; //Inbound data - this.rb_wpos = 0; //Network write position in receive buffer - this.rb_rpos = 0; //Client read position in receive buffer -}; - -/** - * Sends the current WS request and registers callback. The async - * parameter is ignored (WS flush is always async) and the callback - * function parameter is required. - * @param {object} async - Ignored. - * @param {object} callback - The client completion callback. - * @returns {undefined|string} Nothing (undefined) - */ -TWebSocketTransport.prototype.flush = function(async, callback) { - var self = this; - if (this.isOpen()) { - //Send data and register a callback to invoke the client callback - this.socket.send(this.send_buf); - this.callbacks.push((function() { - var clientCallback = callback; - return function(msg) { - self.setRecvBuffer(msg); - clientCallback(); - }; - }())); - } else { - //Queue the send to go out __onOpen - this.send_pending.push({ - buf: this.send_buf, - cb: callback - }); - } -}; - -TWebSocketTransport.prototype.__onOpen = function() { - var self = this; - if (this.send_pending.length > 0) { - //If the user made calls before the connection was fully - //open, send them now - this.send_pending.forEach(function(elem) { - self.socket.send(elem.buf); - self.callbacks.push((function() { - var clientCallback = elem.cb; - return function(msg) { - self.setRecvBuffer(msg); - clientCallback(); - }; - }())); - }); - this.send_pending = []; - } -}; - -TWebSocketTransport.prototype.__onClose = function(evt) { - this.__reset(this.url); -}; - -TWebSocketTransport.prototype.__onMessage = function(evt) { - if (this.callbacks.length) { - this.callbacks.shift()(evt.data); - } -}; - -TWebSocketTransport.prototype.__onError = function(evt) { - log.error('websocket: ' + evt.toString()); - this.socket.close(); -}; - -/** - * Sets the buffer to use when receiving server responses. - * @param {string} buf - The buffer to receive server responses. - */ -TWebSocketTransport.prototype.setRecvBuffer = function(buf) { - this.recv_buf = buf; - this.recv_buf_sz = this.recv_buf.length; - this.wpos = this.recv_buf.length; - this.rpos = 0; -}; - -/** - * Returns true if the transport is open - * @readonly - * @returns {boolean} - */ -TWebSocketTransport.prototype.isOpen = function() { - return this.socket && this.socket.readyState == this.socket.OPEN; -}; - -/** - * Opens the transport connection - */ -TWebSocketTransport.prototype.open = function() { - //If OPEN/CONNECTING/CLOSING ignore additional opens - if (this.socket && this.socket.readyState != this.socket.CLOSED) { - return; - } - //If there is no socket or the socket is closed: - this.socket = new WebSocket(this.url); - this.socket.onopen = this.__onOpen.bind(this); - this.socket.onmessage = this.__onMessage.bind(this); - this.socket.onerror = this.__onError.bind(this); - this.socket.onclose = this.__onClose.bind(this); -}; - -/** - * Closes the transport connection - */ -TWebSocketTransport.prototype.close = function() { - this.socket.close(); -}; - -/** - * Returns the specified number of characters from the response - * buffer. - * @param {number} len - The number of characters to return. - * @returns {string} Characters sent by the server. - */ -TWebSocketTransport.prototype.read = function(len) { - var avail = this.wpos - this.rpos; - - if (avail === 0) { - return ''; - } - - var give = len; - - if (avail < len) { - give = avail; - } - - var ret = this.read_buf.substr(this.rpos, give); - this.rpos += give; - - //clear buf when complete? - return ret; -}; - -/** - * Returns the entire response buffer. - * @returns {string} Characters sent by the server. - */ -TWebSocketTransport.prototype.readAll = function() { - return this.recv_buf; -}; - -/** - * Sets the send buffer to buf. - * @param {string} buf - The buffer to send. - */ -TWebSocketTransport.prototype.write = function(buf) { - this.send_buf = buf; -}; - -/** - * Returns the send buffer. - * @readonly - * @returns {string} The send buffer. - */ -TWebSocketTransport.prototype.getSendBuffer = function() { - return this.send_buf; -}; diff --git a/src/thrift/xhr_connection.js b/src/thrift/xhr_connection.js deleted file mode 100644 index 6459c90..0000000 --- a/src/thrift/xhr_connection.js +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -var util = require('util'); -var EventEmitter = require("events").EventEmitter; -var thrift = require('./thrift'); - -var TBufferedTransport = require('./buffered_transport'); -var TJSONProtocol = require('./json_protocol'); -var InputBufferUnderrunError = require('./input_buffer_underrun_error'); - -var createClient = require('./create_client'); - -exports.XHRConnection = XHRConnection; - -/** - * Constructor Function for the XHR Connection. - * If you do not specify a host and port then XHRConnection will default to the - * host and port of the page from which this javascript is served. - * @constructor - * @param {string} [url] - The URL to connect to. - * @classdesc TXHRConnection objects provide Thrift end point transport - * semantics implemented using XHR. - * @example - * var transport = new Thrift.TXHRConnection('localhost', 9099, {}); - */ -function XHRConnection(host, port, options) { - this.options = options || {}; - this.wpos = 0; - this.rpos = 0; - this.useCORS = (options && options.useCORS); - this.send_buf = ''; - this.recv_buf = ''; - this.transport = options.transport || TBufferedTransport; - this.protocol = options.protocol || TJSONProtocol; - this.headers = options.headers || {}; - - host = host || window.location.host; - port = port || window.location.port; - var prefix = options.https ? 'https://' : 'http://'; - var path = options.path || '/'; - - if (port === '') { - port = undefined; - } - - if (!port || port === 80 || port === '80') { - this.url = prefix + host + path; - } else { - this.url = prefix + host + ':' + port + path; - } - - //The sequence map is used to map seqIDs back to the - // calling client in multiplexed scenarios - this.seqId2Service = {}; -}; - -util.inherits(XHRConnection, EventEmitter); - -/** -* Gets the browser specific XmlHttpRequest Object. -* @returns {object} the browser XHR interface object -*/ -XHRConnection.prototype.getXmlHttpRequestObject = function() { - try { return new XMLHttpRequest(); } catch (e1) { } - try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch (e2) { } - try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch (e3) { } - - throw "Your browser doesn't support XHR."; -}; - -/** - * Sends the current XRH request if the transport was created with a URL - * and the async parameter is false. If the transport was not created with - * a URL, or the async parameter is True and no callback is provided, or - * the URL is an empty string, the current send buffer is returned. - * @param {object} async - If true the current send buffer is returned. - * @param {object} callback - Optional async completion callback - * @returns {undefined|string} Nothing or the current send buffer. - * @throws {string} If XHR fails. - */ -XHRConnection.prototype.flush = function() { - var self = this; - if (this.url === undefined || this.url === '') { - return this.send_buf; - } - - var xreq = this.getXmlHttpRequestObject(); - - if (xreq.overrideMimeType) { - xreq.overrideMimeType('application/json'); - } - - xreq.onreadystatechange = function() { - if (this.readyState == 4 && this.status == 200) { - self.setRecvBuffer(this.responseText); - } - }; - - xreq.open('POST', this.url, true); - - Object.keys(this.headers).forEach(function(headerKey) { - xreq.setRequestHeader(headerKey, self.headers[headerKey]); - }); - - xreq.send(this.send_buf); -}; - -/** - * Sets the buffer to provide the protocol when deserializing. - * @param {string} buf - The buffer to supply the protocol. - */ -XHRConnection.prototype.setRecvBuffer = function(buf) { - this.recv_buf = buf; - this.recv_buf_sz = this.recv_buf.length; - this.wpos = this.recv_buf.length; - this.rpos = 0; - - if (Object.prototype.toString.call(buf) == "[object ArrayBuffer]") { - var data = new Uint8Array(buf); - } - var thing = new Buffer(data || buf); - - this.transport.receiver(this.__decodeCallback.bind(this))(thing); - -}; - -XHRConnection.prototype.__decodeCallback = function(transport_with_data) { - var proto = new this.protocol(transport_with_data); - try { - while (true) { - var header = proto.readMessageBegin(); - var dummy_seqid = header.rseqid * -1; - var client = this.client; - //The Multiplexed Protocol stores a hash of seqid to service names - // in seqId2Service. If the SeqId is found in the hash we need to - // lookup the appropriate client for this call. - // The client var is a single client object when not multiplexing, - // when using multiplexing it is a service name keyed hash of client - // objects. - //NOTE: The 2 way interdependencies between protocols, transports, - // connections and clients in the Node.js implementation are irregular - // and make the implementation difficult to extend and maintain. We - // should bring this stuff inline with typical thrift I/O stack - // operation soon. - // --ra - var service_name = this.seqId2Service[header.rseqid]; - if (service_name) { - client = this.client[service_name]; - delete this.seqId2Service[header.rseqid]; - } - /*jshint -W083 */ - client._reqs[dummy_seqid] = function(err, success) { - transport_with_data.commitPosition(); - var clientCallback = client._reqs[header.rseqid]; - delete client._reqs[header.rseqid]; - if (clientCallback) { - clientCallback(err, success); - } - }; - /*jshint +W083 */ - if (client['recv_' + header.fname]) { - client['recv_' + header.fname](proto, header.mtype, dummy_seqid); - } else { - delete client._reqs[dummy_seqid]; - this.emit("error", - new thrift.TApplicationException( - thrift.TApplicationExceptionType.WRONG_METHOD_NAME, - "Received a response to an unknown RPC function")); - } - } - } catch (e) { - if (e instanceof InputBufferUnderrunError) { - transport_with_data.rollbackPosition(); - } else { - throw e; - } - } -}; - -/** - * Returns true if the transport is open, XHR always returns true. - * @readonly - * @returns {boolean} Always True. - */ -XHRConnection.prototype.isOpen = function() { - return true; -}; - -/** - * Opens the transport connection, with XHR this is a nop. - */ -XHRConnection.prototype.open = function() {}; - -/** - * Closes the transport connection, with XHR this is a nop. - */ -XHRConnection.prototype.close = function() {}; - -/** - * Returns the specified number of characters from the response - * buffer. - * @param {number} len - The number of characters to return. - * @returns {string} Characters sent by the server. - */ -XHRConnection.prototype.read = function(len) { - var avail = this.wpos - this.rpos; - - if (avail === 0) { - return ''; - } - - var give = len; - - if (avail < len) { - give = avail; - } - - var ret = this.read_buf.substr(this.rpos, give); - this.rpos += give; - - //clear buf when complete? - return ret; -}; - -/** - * Returns the entire response buffer. - * @returns {string} Characters sent by the server. - */ -XHRConnection.prototype.readAll = function() { - return this.recv_buf; -}; - -/** - * Sets the send buffer to buf. - * @param {string} buf - The buffer to send. - */ -XHRConnection.prototype.write = function(buf) { - this.send_buf = buf; - this.flush(); -}; - -/** - * Returns the send buffer. - * @readonly - * @returns {string} The send buffer. - */ -XHRConnection.prototype.getSendBuffer = function() { - return this.send_buf; -}; - -/** - * Creates a new TXHRTransport object, used by Thrift clients to connect - * to Thrift HTTP based servers. - * @param {string} host - The host name or IP to connect to. - * @param {number} port - The TCP port to connect to. - * @param {XHRConnectOptions} options - The configuration options to use. - * @returns {XHRConnection} The connection object. - * @see {@link XHRConnectOptions} - */ -exports.createXHRConnection = function(host, port, options) { - return new XHRConnection(host, port, options); -}; - -exports.createXHRClient = createClient; diff --git a/tests/nebula.test.ts b/tests/nebula.test.ts deleted file mode 100644 index 23b2ecc..0000000 --- a/tests/nebula.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* eslint-disable max-len */ -/** - * Created by Wu Jian Ping on - 2021/06/09. - */ - -import createClient, { ClientOption } from '../dist' - -import { expect } from 'chai' - -const nebulaServer: ClientOption = { - servers: ['127.0.0.1:9669'], - userName: 'root', - password: 'nebula', - space: 'nebula_node', - pingInterval: 5000, - poolSize: 1 -} - -const commands = { - cmd1: 'get subgraph with prop 2 steps from "p001" yield vertices as nodes, edges as relationships', - cmd2: 'fetch prop on company "c001" yield properties(vertex) as node', - cmd3: 'go from "c001" over employee yield properties($^) as a, properties($$) as b, properties(edge) as p', - cmd4: 'find noloop path with prop from "p001" to "p002" over * yield path as p', - cmd5: 'RETURN list[1, 2, 3] AS a', - cmd6: 'UNWIND list[list[1, 2, 3], list[2, 3, 4]] as a RETURN a', - cmd7: 'RETURN set{1, 2, 3} AS a', - cmd8: 'RETURN map{a: LIST[1,2], b: SET{1,2,1}, c: "hee"} as a' -} - -describe('nebula', () => { - it('test-case-1', async () => { - const client = createClient(nebulaServer) - const response1 = await client.execute(commands.cmd1) - - expect(response1.data?.nodes?.length).greaterThan(0) - expect(response1.data?.relationships?.length).greaterThan(0) - - await client.close() - }) - - it('test-case-2', async () => { - const client = createClient(nebulaServer) - - const response1 = await client.execute(commands.cmd2) - - expect(response1.data?.node?.length).greaterThan(0) - - await client.close() - }) - - it('test-case-3', async () => { - const client = createClient(nebulaServer) - - const response1 = await client.execute(commands.cmd3) - - expect(response1.data?.a?.length).greaterThan(0) - expect(response1.data?.b?.length).greaterThan(0) - expect(response1.data?.p?.length).greaterThan(0) - - await client.close() - }) - - it('test-case-4', async () => { - const client = createClient(nebulaServer) - - const response1 = await client.execute(commands.cmd4) - - expect(response1.data?.p?.length).greaterThan(0) - - await client.close() - }) - - it('test-case-5-list', async () => { - const client = createClient(nebulaServer) - - const response1 = await client.execute(commands.cmd5) - - expect(response1.data?.a).deep.equal([[1, 2, 3]]) - - await client.close() - }) - - it('test-case-6-list', async () => { - const client = createClient(nebulaServer) - - const response1 = await client.execute(commands.cmd6) - - expect(response1.data?.a).deep.equal([[1, 2, 3], [2, 3, 4]]) - - await client.close() - }) - - it('test-case-7-set', async () => { - const client = createClient(nebulaServer) - - const response1 = await client.execute(commands.cmd7) - - expect(response1.data?.a?.length).to.equal(1) - expect(response1.data?.a[0]?.length).to.equal(3) - - await client.close() - }) - - it('test-case-8-map', async () => { - const client = createClient(nebulaServer) - - const response1 = await client.execute(commands.cmd8) - - expect(response1.data?.a?.length).to.equal(1) - expect(response1.data?.a[0]?.a).to.deep.equal([1, 2]) - expect(response1.data?.a[0]?.b?.length).to.equal(2) - expect(response1.data?.a[0]?.c).to.equal('hee') - - await client.close() - }) - - after(async () => { - process.exit() - }) -}) diff --git a/tools/build-addon.mjs b/tools/build-addon.mjs new file mode 100644 index 0000000..8908c5c --- /dev/null +++ b/tools/build-addon.mjs @@ -0,0 +1,18 @@ +import { execSync } from 'node:child_process'; +import path from 'node:path'; +import fs from 'node:fs' +import chalk from 'chalk'; + +const __dirname = new URL('.', import.meta.url).pathname; + +const cwd = path.resolve(__dirname, '../src/native/'); +console.log(chalk.blue('Building native module...')); +execSync('npx node-gyp rebuild', { cwd }); +console.log(chalk.green('Built native module successfully.')); + +const addonPath = path.resolve(cwd, 'build'); +const newPath = path.resolve(__dirname, '../build'); +if (fs.existsSync(newPath)) { + fs.rmSync(newPath, { recursive: true, force: true }); +} +fs.renameSync(addonPath, newPath); diff --git a/tools/build.js b/tools/build.js deleted file mode 100644 index 4a870e2..0000000 --- a/tools/build.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Created by Wu Jian Ping on - 2021/01/07. - */ - -import _ from 'lodash' -import path from 'path' -import glob from 'glob' -import fs from 'fs' - -import run from './run' -import { getBuildStage0Dir, getBuildTsConfigFile, runNpmCli, getBuildStage1Dir, getModuleDistDir } from './libs/utils' -import clean, { cleanTemp } from './clean' -import { copyFile, makeDir } from './libs/fs' -import { copyDeclarationFiles, copyMarkdown, copyNative, copyThrift, generatePackageJson, copyNpmIngoreFile } from './copy' - -const fsPromise = fs.promises - -const buildStage0 = { - name: 'stage-0', - func: async () => { - const buildDir = getBuildStage0Dir() - await makeDir(buildDir) - const tsConfigFile = path.join(getBuildStage0Dir(), '.tsconfig.json') - await copyFile(getBuildTsConfigFile(), tsConfigFile) - - await runNpmCli('tsc', - [ - '--project', - tsConfigFile, - '--outDir', - buildDir - ] - ) - } -} - -const buildStage1 = { - name: 'stage-1', - func: async () => { - await runNpmCli('babel', [ - getBuildStage0Dir(), - '-d', - getBuildStage1Dir(), - '--config-file', - './tools/configs/babel.config.json', - '--source-maps', - '--no-babelrc' - ]) - } -} - -const buildStage2 = { - name: 'stage-2', - func: async () => { - const sourceMaps = glob.sync(path.join(getModuleDistDir(), '**', '*.js.map')) - - const tasks = _.map(sourceMaps, async file => { - const content = await fsPromise.readFile(file, { encoding: 'utf-8' }) - const obj = JSON.parse(content) - if (_.isArray(obj?.sources) && obj.sources.length > 0) { - obj.sources = _.map(obj.sources, o => path.basename(o)) - await fsPromise.writeFile(file, JSON.stringify(obj)) - } - }) - - await Promise.all(tasks) - } -} - -const build = { - name: 'build', - func: async () => { - // clean - await run(clean) - - // stage-0: tsc - await run(buildStage0) - - // stage-1: babel - await run(buildStage1) - - // copy ts declaration files - await run(copyDeclarationFiles) - - // copy markdown file(s) - await run(copyMarkdown) - - // copy native source code - await run(copyNative) - - // copy modified thrift - await run(copyThrift) - - // generate package.json - await run(generatePackageJson) - - // fix source map for compatible with source-map-support module - await run(buildStage2) - - // build native module - await runNpmCli('node-gyp', ['rebuild'], { cwd: getModuleDistDir() }, true) - - // add npm ignore file - await run(copyNpmIngoreFile) - - // clean .tmp - await cleanTemp() - } -} - -export { - buildStage0, - buildStage1, - buildStage2, - build -} - -export default build diff --git a/tools/clean.js b/tools/clean.js deleted file mode 100644 index 8575045..0000000 --- a/tools/clean.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Created by Wu Jian Ping on - 2021/01/07. - */ - -import { cleanDir } from './libs/fs' -import { getCacheDir } from './libs/utils' - -const cleanDist = async () => { - await cleanDir('./dist', { - nosort: true, - dot: true - }) -} - -const cleanTemp = async () => { - await cleanDir('./.tmp', { - nosort: true, - dot: true - }) -} - -const cleanCache = async () => { - await cleanDir(getCacheDir(), { - nosort: true, - dot: true - }) -} - -const cleanNYC = async () => { - await cleanDir('./coverage', { - nosort: true, - dot: true - }) - - await cleanDir('./.nyc_output', { - nosort: true, - dot: true - }) -} - -const clean = async () => { - await cleanTemp() - await cleanDist() - await cleanCache() - await cleanNYC() -} - -export { - cleanTemp, - cleanDist, - cleanCache -} - -export default { - name: 'clean', - func: clean -} diff --git a/tools/configs/babel.config.json b/tools/configs/babel.config.json deleted file mode 100644 index c36b44b..0000000 --- a/tools/configs/babel.config.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "presets": [ - [ - "@babel/env", - { - "modules": "auto", - "debug": false, - "targets": { - "node": true - }, - "useBuiltIns": "usage", - "corejs": { - "version": 2, - "proposals": true - } - } - ], - [ - "@babel/preset-typescript", - { - "allowNamespaces": true, - "allowDeclareFields": true - } - ] - ], - "plugins": [ - "add-module-exports", - "@babel/plugin-proposal-function-bind", - "@babel/plugin-proposal-export-default-from", - "@babel/plugin-proposal-logical-assignment-operators", - [ - "@babel/plugin-proposal-optional-chaining", - { - "loose": false - } - ], - [ - "@babel/plugin-proposal-pipeline-operator", - { - "proposal": "minimal" - } - ], - [ - "@babel/plugin-proposal-nullish-coalescing-operator", - { - "loose": false - } - ], - "@babel/plugin-proposal-do-expressions", - [ - "@babel/plugin-proposal-decorators", - { - "legacy": true - } - ], - "@babel/plugin-proposal-function-sent", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions", - "@babel/plugin-syntax-dynamic-import", - "@babel/plugin-syntax-import-meta", - [ - "@babel/plugin-proposal-class-properties", - { - "loose": false - } - ], - "@babel/plugin-proposal-json-strings" - ], - "generatorOpts": { - "comments": false - } -} diff --git a/tools/configs/build.tsconfig.json b/tools/configs/build.tsconfig.json deleted file mode 100644 index eddf9fc..0000000 --- a/tools/configs/build.tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "include": ["../../src/**/*"], - "compileOnSave": false, - "compilerOptions": { - "module": "esnext", - "declaration": true, - "target": "es2020", - "lib": ["es6"], - "skipLibCheck": true, - "sourceMap": true, - "allowJs": true, - "jsx": "preserve", - "moduleResolution": "node", - "noImplicitAny": false, - "allowSyntheticDefaultImports": true, - "noUnusedParameters": false, - "preserveConstEnums": true, - "experimentalDecorators": true, - "newLine": "lf" - }, - "exclude": [ - "node_modules", - "../../src/thrift/*" - ] -} diff --git a/tools/configs/coverage.tsconfig.json b/tools/configs/coverage.tsconfig.json deleted file mode 100644 index f3acfe0..0000000 --- a/tools/configs/coverage.tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "include": ["../tests/*.test.ts", "../../src/*"], - "compileOnSave": false, - "compilerOptions": { - "module": "esnext", - "declaration": true, - "target": "es2020", - "lib": ["es6"], - "skipLibCheck": true, - "sourceMap": true, - "allowJs": true, - "jsx": "preserve", - "moduleResolution": "node", - "noImplicitAny": false, - "allowSyntheticDefaultImports": true, - "noUnusedParameters": false, - "preserveConstEnums": true, - "experimentalDecorators": true, - "newLine": "lf" - }, - "exclude": [ - "node_modules" - ] -} diff --git a/tools/copy.js b/tools/copy.js deleted file mode 100644 index cb9e508..0000000 --- a/tools/copy.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Created by Wu Jian Ping on - 2021/01/07. - */ - -import { makeDir, copyDir, writeFile, copyFile } from './libs/fs' -import { getModuleDir, getModuleDistDir, getBuildStage0Dir, getModuleSourceDir } from './libs/utils' -import path from 'path' -import _ from 'lodash' - -/** - * copy declaration files - */ -const copyDeclarationFiles = { - name: 'copy declaration filelse(s)', - func: async () => { - await makeDir(getModuleDistDir()) - // declaration files generated at stage-0 - await copyDir(getBuildStage0Dir(), getModuleDistDir(), '**/*.d.ts') - } -} - -/** - * copy markdown - */ -const copyMarkdown = { - name: 'copy markdown file(s)', - func: async () => { - await makeDir(getModuleDistDir()) - await copyDir(getModuleDir(), getModuleDistDir(), '*.md') - } -} - -const copyNative = { - name: 'copy C++ source file(s)', - func: async () => { - await makeDir(getModuleDistDir()) - await copyDir(getModuleSourceDir(), getModuleDistDir(), 'binding.gyp') - await copyDir(getModuleSourceDir(), getModuleDistDir(), '**/*.cc') - await copyDir(getModuleSourceDir(), getModuleDistDir(), '**/*.h') - await copyDir(getModuleSourceDir(), getModuleDistDir(), '**/*.cpp') - } -} - -const copyThrift = { - name: 'copy thrift', - func: async () => { - await makeDir(getModuleDistDir()) - await copyDir(path.join(getModuleSourceDir(), 'thrift'), path.join(getModuleDistDir(), 'thrift')) - } -} - -const generatePackageJson = { - name: 'generate package.json', - func: async () => { - await makeDir(getModuleDistDir()) - const packageJson = require('../package.json') - await writeFile(path.join(getModuleDistDir(), 'package.json'), JSON.stringify(_.omit(packageJson, ['scripts', 'devDependencies']), null, 2)) - } -} - -const copyNpmIngoreFile = { - name: 'copy npm ignore file', - func: async () => { - await makeDir(getModuleDistDir()) - await copyFile(path.join(process.cwd(), '.npmignore'), path.join(getModuleDistDir(), '.npmignore')) - } -} - -export { - copyDeclarationFiles, - copyMarkdown, - copyNative, - copyThrift, - generatePackageJson, - copyNpmIngoreFile -} diff --git a/tools/coverage.js b/tools/coverage.js deleted file mode 100644 index dc5967d..0000000 --- a/tools/coverage.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Created by Wu Jian Ping on - 2021/03/04. - */ - -import { cleanDir, copyDir, copyFile, makeDir } from './libs/fs' -import { cowsay2, getConverageTsConfigFile, getModuleDir, getModuleDistDir, getModuleSourceDir, getModuleTempDir, runNpmCli } from './libs/utils' - -import build from './build' -import glob from 'glob' -// import open from 'open' -import path from 'path' -import run from './run' - -const cleanNYC = async () => { - await cleanDir('./coverage', { - nosort: true, - dot: true - }) - - await cleanDir('./.nyc_output', { - nosort: true, - dot: true - }) -} - -const tsc = async () => { - const buildDir = getModuleTempDir() - await makeDir(buildDir) - const tsConfigFile = path.join(buildDir, '.tsconfig.json') - await copyFile(getConverageTsConfigFile(), tsConfigFile) - - await runNpmCli('tsc', - [ - '--project', - tsConfigFile, - '--outDir', - path.join(buildDir, 'tests') - ], - { cwd: getModuleDir() }) -} - -const coverage = { - name: 'coverage', - func: async () => { - cowsay2('Starting generate coverage report...') - - await cleanNYC() - await run(build) - await tsc() - await copyDir(getModuleDistDir(), path.join(getModuleTempDir(), 'dist')) - await copyDir(getModuleSourceDir(), path.join(getModuleTempDir(), 'dist'), '**/*.ts') - const files = glob.sync(path.join(getModuleTempDir(), 'tests', '*.test.js')) - - await runNpmCli('nyc', [ - '--silent', - 'mocha', - `--config=${path.join(process.cwd(), '.mocharc.nyc.json')}`, - ...files - ]) - - await runNpmCli('nyc', ['report']) - - // open(path.join(process.cwd(), 'coverage', 'index.html')) - - return Promise.resolve() - } -} - -export default coverage diff --git a/tools/libs/fs.js b/tools/libs/fs.js deleted file mode 100644 index 05b8ad6..0000000 --- a/tools/libs/fs.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Created by Wu Jian Ping on - 2021/01/07. - */ - -import fs from 'fs' -import path from 'path' -import glob from 'glob' -import mkdirp from 'mkdirp' -import rimraf from 'rimraf' - -const readFile = file => new Promise((resolve, reject) => { - fs.readFile(file, 'utf8', (err, data) => (err ? reject(err) : resolve(data))) -}) - -const writeFile = (file, contents) => new Promise((resolve, reject) => { - fs.writeFile(file, contents, 'utf8', err => (err ? reject(err) : resolve())) -}) - -const copyFile = (source, target) => new Promise((resolve, reject) => { - const stats = fs.statSync(source) - if (stats && stats.isDirectory()) { // if dir return - resolve() - return - } - - let cbCalled = false - - function done(err) { - if (!cbCalled) { - cbCalled = true - if (err) { - reject(err) - } else { - resolve() - } - } - } - - const rd = fs.createReadStream(source) - rd.on('error', err => done(err)) - const wr = fs.createWriteStream(target) - wr.on('error', err => done(err)) - wr.on('close', err => done(err)) - rd.pipe(wr) -}) - -const readDir = (pattern, options) => new Promise((resolve, reject) => glob(pattern, options, (err, result) => (err ? reject(err) : resolve(result)))) - -const makeDir = name => new Promise((resolve, reject) => { - mkdirp(name, err => (err ? reject(err) : resolve())) -}) - -const copyDir = async (source, target, parten = '**/*.*') => { - const dirs = await readDir(parten, { - cwd: source, - nosort: true, - dot: true - }) - await Promise.all(dirs.map(async (dir) => { - const from = path.resolve(source, dir) - const to = path.resolve(target, dir) - await makeDir(path.dirname(to)) - await copyFile(from, to) - })) -} - -const cleanDir = (pattern, options) => new Promise((resolve, reject) => rimraf(pattern, { - glob: options -}, (err, result) => (err ? reject(err) : resolve(result)))) - -export { - readFile, - writeFile, - copyFile, - readDir, - makeDir, - copyDir, - cleanDir -} - -export default { - readFile, - writeFile, - copyFile, - readDir, - makeDir, - copyDir, - cleanDir -} diff --git a/tools/libs/utils.js b/tools/libs/utils.js deleted file mode 100644 index 8c38c67..0000000 --- a/tools/libs/utils.js +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Created by Wu Jian Ping on - 2021/01/06. - */ - -import chalk from 'chalk' -import path from 'path' -import { spawn } from 'child_process' -import _ from 'lodash' -import which from 'which' -import cowsay from 'cowsay' - -const formatTime = (time) => { - return time.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, '[$1] ') -} - -const print = (msg, colorFunc) => { - if (_.isString(msg) && msg) { - if (msg.endsWith('\r\n')) { - msg = msg.substr(0, msg.length - 2) - } - if (msg.endsWith('\n')) { - msg = msg.substr(0, msg.length - 1) - } - msg = msg.replace(/\r\n/ig, '\n') - } - msg = (msg ?? '').toString() - const messageList = _.split(msg, '\n') - for (let i = 0; i < messageList.length; ++i) { - if (messageList[i]) { - console.log(`${formatTime(new Date())}${colorFunc(messageList[i])}`) //eslint-disable-line - } - } -} - -/** - * logger - */ -const logger = { - success: (msg) => { - print(msg, chalk.greenBright) - }, - error: (msg) => { - print(msg, chalk.redBright) - }, - info: (msg) => { - print(msg, chalk.blueBright) - }, - debug: (msg) => { - print(msg, chalk.yellowBright) - } -} - -/** - * get command path - * @param {String} cliName - */ -const getNpmCli = cliName => { - const cmd = process.platform === 'win32' ? `${cliName}.cmd` : cliName - return path.join(process.cwd(), 'node_modules', '.bin', cmd) -} - -const getModuleDir = () => { - return process.cwd() -} - -const getModuleSourceDir = () => { - return path.join(getModuleDir(), 'src') -} - -const getModuleDistDir = () => { - return path.join(getModuleDir(), 'dist') -} - -const getModuleTempDir = () => { - return path.join(getModuleDir(), '.tmp') -} - -const getBuildStageDir = (stage) => { - return path.join(getModuleDir(), '.tmp', stage) -} - -const getBuildStage0Dir = () => { - return getBuildStageDir('stage-0') -} - -const getBuildStage1Dir = () => { - return getModuleDistDir() -} - -const getBuildTsConfigFile = () => { - return path.join(process.cwd(), 'tools', 'configs', 'build.tsconfig.json') -} - -const getConverageTsConfigFile = () => { - return path.join(process.cwd(), 'tools', 'configs', 'coverage.tsconfig.json') -} - -const runNpmCli = (cli, params, options = {}, global = false, silence = false, ignoreExitCode = false) => { - return new Promise((resolve, reject) => { - let bin = '' - - if (global) { - bin = path.basename(which.sync(cli)) - // bin = which.sync(cli) - } else { - bin = getNpmCli(cli) - } - - if (!silence) { - options.stdio = 'inherit' - } - - const exec = spawn(bin, params, options) - - exec.on('close', (code) => { - if (ignoreExitCode) { - resolve() - } else { - if (code === 0) { - resolve() - } else { - reject(new Error(`child process exited with code ${code}`)) - } - } - }) - }) -} - -// get babel cache dir -const getCacheDir = () => { - return path.join(process.cwd(), 'node_modules', '.cache') -} - -const cowsay2 = message => { - console.log(cowsay.say({ // eslint-disable-line - text: message - })) -} - - -export default { - logger, - getNpmCli, - getModuleDir, - getModuleSourceDir, - getModuleDistDir, - getModuleTempDir, - getBuildTsConfigFile, - getConverageTsConfigFile, - getBuildStageDir, - getBuildStage0Dir, - getBuildStage1Dir, - runNpmCli, - getCacheDir, - cowsay2 -} - -export { - logger, - getNpmCli, - getModuleDir, - getModuleSourceDir, - getModuleDistDir, - getModuleTempDir, - getBuildTsConfigFile, - getConverageTsConfigFile, - getBuildStageDir, - getBuildStage0Dir, - getBuildStage1Dir, - runNpmCli, - getCacheDir, - cowsay2 -} diff --git a/tools/run.js b/tools/run.js deleted file mode 100644 index 442cf7f..0000000 --- a/tools/run.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Created by Wu Jian Ping on 2017/3/20. - **/ - -import { logger } from './libs/utils' - -function run(task, options) { - const start = new Date() - logger.info(`Starting '${task.name}${options ? ` (${JSON.stringify(options)})` : ''}'...`) - return task.func(options).then(() => { - const end = new Date() - const time = end.getTime() - start.getTime() - logger.success(`Finished '${task.name}${options ? ` (${JSON.stringify(options)})` : ''}' after ${time} ms`) - }) -} - -if (require.main === module && process.argv.length > 2) { - delete require.cache[__filename] - const module = require(`./${process.argv[2]}.js`) - let task = module - if (task.default) { - task = module.default - } - run(task).catch((err) => { - logger.error(err.stack || err) // eslint-disable-line - process.exit(1) - }) -} - -export default run diff --git a/tools/test.js b/tools/test.js deleted file mode 100644 index 1684ff8..0000000 --- a/tools/test.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Created by Wu Jian Ping on - 2021/01/11. - */ - -import { getModuleDir, runNpmCli, cowsay2 } from './libs/utils' -import path from 'path' -import fs from 'fs' -import glob from 'glob' - -const test = { - name: 'test', - func: async () => { - const currentTestsDir = getModuleDir() - - if (fs.existsSync(currentTestsDir)) { - const files = glob.sync(path.join(currentTestsDir, 'tests', '**', '*.test.*')) - if (files.length > 0) { - cowsay2('Start testing...') - - await runNpmCli('mocha', [ - ...files - ]) - } - } - } -} - -export default test diff --git a/tsconfig.json b/tsconfig.json index cbbe6c0..b9feac1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,18 +1,18 @@ { "compileOnSave": false, "compilerOptions": { - "outDir": "build", - "module": "esnext", - "target": "es6", - "lib": [ - "es6" - ], + "module": "ESNext", + "target": "ESNext", "sourceMap": true, "allowJs": true, "jsx": "preserve", + "declaration": true, + "declarationDir": "types", + "emitDeclarationOnly": true, "skipLibCheck": true, - "moduleResolution": "node", + "moduleResolution": "Node", "noImplicitAny": false, + "esModuleInterop": true, "allowSyntheticDefaultImports": true, "noUnusedLocals": true, "noUnusedParameters": false, @@ -21,6 +21,9 @@ "experimentalDecorators": true, "newLine": "lf" }, + "include": [ + "src/**/*" + ], "exclude": [ "node_modules" ]