diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 143e60d..d5b870c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,8 +8,8 @@ Please explain the changes you made here. - [ ] For all _code_ changes, an entry added to the `CHANGELOG.md` file describing and linking to this PR - [ ] Tests added for new functionality, or regression tests for bug fixes added as applicable -- [ ] For public APIs, new features, etc., PR on - [docs repo](https://github.com/hypermodeinc/docs) staged and linked here +- [ ] For public APIs, new features, etc., PR on [docs repo](https://github.com/hypermodeinc/docs) + staged and linked here **Instructions** diff --git a/.github/renovate.json b/.github/renovate.json index fe39a94..2af7088 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,5 +1,5 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["local>hypermodeinc/renovate-config"], - "rangeStrategy": "widen" + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["local>hypermodeinc/renovate-config"], + "rangeStrategy": "widen" } diff --git a/.trunk/configs/.markdownlint.json b/.trunk/configs/.markdownlint.json index 449148d..469f446 100644 --- a/.trunk/configs/.markdownlint.json +++ b/.trunk/configs/.markdownlint.json @@ -1,8 +1,8 @@ { - "line-length": { "line_length": 150, "tables": false }, - "no-inline-html": false, - "no-bare-urls": false, - "no-space-in-emphasis": false, - "no-emphasis-as-heading": false, - "first-line-heading": false + "line-length": { "line_length": 150, "tables": false }, + "no-inline-html": false, + "no-bare-urls": false, + "no-space-in-emphasis": false, + "no-emphasis-as-heading": false, + "first-line-heading": false } diff --git a/.trunk/configs/eslint.config.js b/.trunk/configs/eslint.config.js deleted file mode 100644 index fd4e36e..0000000 --- a/.trunk/configs/eslint.config.js +++ /dev/null @@ -1,10 +0,0 @@ -import eslint from "@eslint/js" -import tseslint from "typescript-eslint" - -export default tseslint.config({ - files: ["**/*.ts"], - extends: [eslint.configs.recommended, ...tseslint.configs.strict], - rules: { - "@typescript-eslint/no-explicit-any": "off", - }, -}) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index bd01f6e..9eb69fb 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -3,7 +3,7 @@ version: 0.1 cli: - version: 1.22.10 + version: 1.22.12 # Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) plugins: @@ -25,19 +25,29 @@ lint: - linters: [ALL] paths: - generated/** + - linters: [prettier] + paths: + - "**/*.ts" + - "**/*.tsx" + - "**/*.js" + - "**/*.jsx" + - "**/*.css" + - "**/*.html" + - "**/*.json" enabled: - - trivy@0.59.1 + - trivy@0.61.0 - actionlint@1.7.7 - - checkov@3.2.365 + - checkov@3.2.396 - git-diff-check - markdownlint@0.44.0 - - osv-scanner@1.9.2 - - prettier@3.4.2 - - renovate@39.161.0 + - osv-scanner@2.0.1 + - prettier@3.5.3 + - biome@1.9.4 + - renovate@39.233.2 - shellcheck@0.10.0 - shfmt@3.6.0 - - trufflehog@3.88.4 - - yamllint@1.35.1 + - trufflehog@3.88.22 + - yamllint@1.37.0 actions: enabled: - trunk-announce diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 29d4338..8b89261 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["trunk.io"] + "recommendations": ["trunk.io"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 93ff3ac..0582735 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { - "editor.formatOnSave": true, - "editor.defaultFormatter": "trunk.io", - "editor.trimAutoWhitespace": true, - "trunk.autoInit": false + "editor.formatOnSave": true, + "editor.defaultFormatter": "trunk.io", + "editor.trimAutoWhitespace": true, + "trunk.autoInit": false } diff --git a/examples/simple/index.js b/examples/simple/index.js index 9cadfcb..ae7b705 100644 --- a/examples/simple/index.js +++ b/examples/simple/index.js @@ -1,93 +1,97 @@ -const dgraph = require("dgraph-js") +const dgraph = require("dgraph-js"); // Drop All - discard all data, schema and start from a clean slate. async function dropAll(dgraphClient) { - const op = new dgraph.Operation() - op.setDropAll(true) - await dgraphClient.alter(op) + const op = new dgraph.Operation(); + op.setDropAll(true); + await dgraphClient.alter(op); } // Drop All Data, but keep the schema. async function dropData(dgraphClient) { - const op = new dgraph.Operation() - op.setDropOp(dgraph.Operation.DropOp.DATA) - await dgraphClient.alter(op) + const op = new dgraph.Operation(); + op.setDropOp(dgraph.Operation.DropOp.DATA); + await dgraphClient.alter(op); } // Set schema. async function setSchema(dgraphClient) { - const schema = ` + const schema = ` name: string @index(exact) . age: int . married: bool . loc: geo . dob: datetime . friend: [uid] @reverse . - ` - const op = new dgraph.Operation() - op.setSchema(schema) - await dgraphClient.alter(op) + `; + const op = new dgraph.Operation(); + op.setSchema(schema); + await dgraphClient.alter(op); } // Create data using JSON. async function createData(dgraphClient) { - // Create a new transaction. - const txn = dgraphClient.newTxn() - try { - // Create data. - const p = { - uid: "_:alice", - name: "Alice", - age: 26, - married: true, - loc: { - type: "Point", - coordinates: [1.1, 2], - }, - dob: new Date(1980, 1, 1, 23, 0, 0, 0), - friend: [ - { - name: "Bob", - age: 24, - }, - { - name: "Charlie", - age: 29, - }, - ], - school: [ - { - name: "Crown Public School", - }, - ], - } + // Create a new transaction. + const txn = dgraphClient.newTxn(); + try { + // Create data. + const p = { + uid: "_:alice", + name: "Alice", + age: 26, + married: true, + loc: { + type: "Point", + coordinates: [1.1, 2], + }, + dob: new Date(1980, 1, 1, 23, 0, 0, 0), + friend: [ + { + name: "Bob", + age: 24, + }, + { + name: "Charlie", + age: 29, + }, + ], + school: [ + { + name: "Crown Public School", + }, + ], + }; - // Run mutation. - const mu = new dgraph.Mutation() - mu.setSetJson(p) - const response = await txn.mutate(mu) + // Run mutation. + const mu = new dgraph.Mutation(); + mu.setSetJson(p); + const response = await txn.mutate(mu); - // Commit transaction. - await txn.commit() + // Commit transaction. + await txn.commit(); - // Get uid of the outermost object (person named "Alice"). - // Response#getUidsMap() returns a map from blank node names to uids. - // For a json mutation, blank node label is used for the name of the created nodes. - console.log(`Created person named "Alice" with uid = ${response.getUidsMap().get("alice")}\n`) + // Get uid of the outermost object (person named "Alice"). + // Response#getUidsMap() returns a map from blank node names to uids. + // For a json mutation, blank node label is used for the name of the created nodes. + console.log( + `Created person named "Alice" with uid = ${response.getUidsMap().get("alice")}\n`, + ); - console.log("All created nodes (map from blank node names to uids):") - response.getUidsMap().forEach((uid, key) => console.log(`${key} => ${uid}`)) - console.log() - } finally { - // Clean up. Calling this after txn.commit() is a no-op - // and hence safe. - await txn.discard() - } + console.log("All created nodes (map from blank node names to uids):"); + response + .getUidsMap() + .forEach((uid, key) => console.log(`${key} => ${uid}`)); + console.log(); + } finally { + // Clean up. Calling this after txn.commit() is a no-op + // and hence safe. + await txn.discard(); + } } // Query for data. async function queryData(dgraphClient) { - // Run query. - const query = `query all($a: string) { + // Run query. + const query = `query all($a: string) { all(func: eq(name, $a)) { uid name @@ -103,35 +107,39 @@ async function queryData(dgraphClient) { name } } - }` - const vars = { $a: "Alice" } - const res = await dgraphClient.newTxn({ readOnly: true }).queryWithVars(query, vars) - const ppl = res.getJson() + }`; + const vars = { $a: "Alice" }; + const res = await dgraphClient + .newTxn({ readOnly: true }) + .queryWithVars(query, vars); + const ppl = res.getJson(); - // Print results. - console.log(`Number of people named "Alice": ${ppl.all.length}`) - ppl.all.forEach((person) => console.log(person)) + // Print results. + console.log(`Number of people named "Alice": ${ppl.all.length}`); + ppl.all.forEach((person) => console.log(person)); } async function main() { - const dgraphClient = await dgraph.open("dgraph://groot:password@localhost:9080") - await dropAll(dgraphClient) - await setSchema(dgraphClient) - await createData(dgraphClient) - await queryData(dgraphClient) - await dropData(dgraphClient) - await queryData(dgraphClient) - await createData(dgraphClient) - await queryData(dgraphClient) + const dgraphClient = await dgraph.open( + "dgraph://groot:password@localhost:9080", + ); + await dropAll(dgraphClient); + await setSchema(dgraphClient); + await createData(dgraphClient); + await queryData(dgraphClient); + await dropData(dgraphClient); + await queryData(dgraphClient); + await createData(dgraphClient); + await queryData(dgraphClient); - // Close the client stub. - dgraphClient.close() + // Close the client stub. + dgraphClient.close(); } main() - .then(() => { - console.log("\nDONE!") - }) - .catch((e) => { - console.log("ERROR: ", e) - }) + .then(() => { + console.log("\nDONE!"); + }) + .catch((e) => { + console.log("ERROR: ", e); + }); diff --git a/examples/simple/package.json b/examples/simple/package.json index 226957e..3283316 100644 --- a/examples/simple/package.json +++ b/examples/simple/package.json @@ -1,11 +1,11 @@ { - "name": "simple", - "dependencies": { - "dgraph-js": "^24.2.0", - "@grpc/grpc-js": "1.8.22" - }, - "scripts": { - "example": "node index.js", - "clean": "rm -fr node_modules" - } + "name": "simple", + "dependencies": { + "dgraph-js": "^24.2.0", + "@grpc/grpc-js": "1.8.22" + }, + "scripts": { + "example": "node index.js", + "clean": "rm -fr node_modules" + } } diff --git a/jest.config.ts b/jest.config.ts index 2b56501..5f2a937 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,15 +1,15 @@ module.exports = { - testEnvironment: "node", - transform: { - ".(ts|tsx)": "ts-jest", - }, - moduleFileExtensions: ["ts", "tsx", "js", "jsx"], - testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|js)x?$", - coverageDirectory: "coverage", - collectCoverageFrom: [ - "src/**/*.{ts,tsx,js,jsx}", - "!src/index.{ts,tsx,js,jsx}", - "!src/generated/**/*.{ts,tsx,js,jsx}", - "!src/**/*.d.ts", - ], -} + testEnvironment: "node", + transform: { + ".(ts|tsx)": "ts-jest", + }, + moduleFileExtensions: ["ts", "tsx", "js", "jsx"], + testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|js)x?$", + coverageDirectory: "coverage", + collectCoverageFrom: [ + "src/**/*.{ts,tsx,js,jsx}", + "!src/index.{ts,tsx,js,jsx}", + "!src/generated/**/*.{ts,tsx,js,jsx}", + "!src/**/*.d.ts", + ], +}; diff --git a/lib/client.d.ts b/lib/client.d.ts index f0b561a..944cace 100644 --- a/lib/client.d.ts +++ b/lib/client.d.ts @@ -3,26 +3,30 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" -import * as messages from "../generated/api_pb" -import { DgraphClientStub } from "./clientStub" -import { Txn, TxnOptions } from "./txn" -import * as types from "./types" +import type * as grpc from "@grpc/grpc-js"; +import type * as messages from "../generated/api_pb"; +import type { DgraphClientStub } from "./clientStub"; +import type { Txn, TxnOptions } from "./txn"; +import type * as types from "./types"; export declare class DgraphClient { - private readonly clients - private debugMode - constructor(...clients: DgraphClientStub[]) - alter( - op: messages.Operation, - metadata?: grpc.Metadata | null, - options?: grpc.CallOptions | null, - ): Promise - newTxn(txnOpts?: TxnOptions): Txn - setDebugMode(mode?: boolean): void - debug(msg: string): void - anyClient(): DgraphClientStub - close(): void + private readonly clients; + private debugMode; + constructor(...clients: DgraphClientStub[]); + alter( + op: messages.Operation, + metadata?: grpc.Metadata | null, + options?: grpc.CallOptions | null, + ): Promise; + newTxn(txnOpts?: TxnOptions): Txn; + setDebugMode(mode?: boolean): void; + debug(msg: string): void; + anyClient(): DgraphClientStub; + close(): void; } -export declare function isJwtExpired(err: any): boolean -export declare function deleteEdges(mu: types.Mutation, uid: string, ...predicates: string[]): void -export declare function open(connStr: string): Promise +export declare function isJwtExpired(err: any): boolean; +export declare function deleteEdges( + mu: types.Mutation, + uid: string, + ...predicates: string[] +): void; +export declare function open(connStr: string): Promise; diff --git a/lib/client.js b/lib/client.js index a0ee891..0888c85 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1,360 +1,377 @@ -/* - * SPDX-FileCopyrightText: © Hypermode Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict" var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value) - }) - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)) - } catch (e) { - reject(e) - } - } - function rejected(value) { - try { - step(generator["throw"](value)) - } catch (e) { - reject(e) - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected) - } - step((generator = generator.apply(thisArg, _arguments || [])).next()) - }) - } + (this && this.__awaiter) || + ((thisArg, _arguments, P, generator) => { + function adopt(value) { + return value instanceof P + ? value + : new P((resolve) => { + resolve(value); + }); + } + return new (P || (P = Promise))((resolve, reject) => { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }); var __generator = - (this && this.__generator) || - function (thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1] - return t[1] - }, - trys: [], - ops: [], - }, - f, - y, - t, - g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype) - return ( - (g.next = verb(0)), - (g["throw"] = verb(1)), - (g["return"] = verb(2)), - typeof Symbol === "function" && - (g[Symbol.iterator] = function () { - return this - }), - g - ) - function verb(n) { - return function (v) { - return step([n, v]) - } - } - function step(op) { - if (f) throw new TypeError("Generator is already executing.") - while ((g && ((g = 0), op[0] && (_ = 0)), _)) - try { - if ( - ((f = 1), - y && - (t = - op[0] & 2 - ? y["return"] - : op[0] - ? y["throw"] || ((t = y["return"]) && t.call(y), 0) - : y.next) && - !(t = t.call(y, op[1])).done) - ) - return t - if (((y = 0), t)) op = [op[0] & 2, t.value] - switch (op[0]) { - case 0: - case 1: - t = op - break - case 4: - _.label++ - return { value: op[1], done: false } - case 5: - _.label++ - y = op[1] - op = [0] - continue - case 7: - op = _.ops.pop() - _.trys.pop() - continue - default: - if ( - !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && - (op[0] === 6 || op[0] === 2) - ) { - _ = 0 - continue - } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1] - break - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1] - t = op - break - } - if (t && _.label < t[2]) { - _.label = t[2] - _.ops.push(op) - break - } - if (t[2]) _.ops.pop() - _.trys.pop() - continue - } - op = body.call(thisArg, _) - } catch (e) { - op = [6, e] - y = 0 - } finally { - f = t = 0 - } - if (op[0] & 5) throw op[1] - return { value: op[0] ? op[1] : void 0, done: true } - } - } -Object.defineProperty(exports, "__esModule", { value: true }) -exports.DgraphClient = void 0 -exports.isJwtExpired = isJwtExpired -exports.deleteEdges = deleteEdges -exports.open = open -var grpc = require("@grpc/grpc-js") -var messages = require("../generated/api_pb") -var clientStub_1 = require("./clientStub") -var errors_1 = require("./errors") -var txn_1 = require("./txn") -var types = require("./types") -var util_1 = require("./util") -var dgraphScheme = "dgraph:" -var sslModeDisable = "disable" -var sslModeRequire = "require" -var sslModeVerifyCA = "verify-ca" -var DgraphClient = (function () { - function DgraphClient() { - var clients = [] - for (var _i = 0; _i < arguments.length; _i++) { - clients[_i] = arguments[_i] - } - this.debugMode = false - if (clients.length === 0) { - throw errors_1.ERR_NO_CLIENTS - } - this.clients = clients - } - DgraphClient.prototype.alter = function (op, metadata, options) { - return __awaiter(this, void 0, void 0, function () { - var c, payload, operation, e_1, pl - var _this = this - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - this.debug("Alter request:\n".concat((0, util_1.stringifyMessage)(op))) - c = this.anyClient() - operation = function () { - return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2, c.alter(op, metadata, options)] - }) - }) - } - _a.label = 1 - case 1: - _a.trys.push([1, 3, , 8]) - return [4, operation()] - case 2: - payload = _a.sent() - return [3, 8] - case 3: - e_1 = _a.sent() - if (!(isJwtExpired(e_1) === true)) return [3, 6] - return [4, c.retryLogin(metadata, options)] - case 4: - _a.sent() - return [4, operation()] - case 5: - payload = _a.sent() - return [3, 7] - case 6: - throw e_1 - case 7: - return [3, 8] - case 8: - pl = types.createPayload(payload) - this.debug("Alter response:\n".concat((0, util_1.stringifyMessage)(pl))) - return [2, pl] - } - }) - }) - } - DgraphClient.prototype.newTxn = function (txnOpts) { - return new txn_1.Txn(this, txnOpts) - } - DgraphClient.prototype.setDebugMode = function (mode) { - if (mode === void 0) { - mode = true - } - this.debugMode = mode - } - DgraphClient.prototype.debug = function (msg) { - if (this.debugMode) { - console.log(msg) - } - } - DgraphClient.prototype.anyClient = function () { - return this.clients[Math.floor(Math.random() * this.clients.length)] - } - DgraphClient.prototype.close = function () { - this.clients.forEach(function (clientStub) { - try { - clientStub.close() - console.log("Closed client stub successfully") - } catch (error) { - console.error("Failed to close client stub:", error) - } - }) - } - return DgraphClient -})() -exports.DgraphClient = DgraphClient + (this && this.__generator) || + ((thisArg, body) => { + var _ = { + label: 0, + sent: () => { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [], + }, + f, + y, + t, + g = Object.create( + (typeof Iterator === "function" ? Iterator : Object).prototype, + ); + return ( + (g.next = verb(0)), + (g["throw"] = verb(1)), + (g["return"] = verb(2)), + typeof Symbol === "function" && + (g[Symbol.iterator] = function () { + return this; + }), + g + ); + function verb(n) { + return (v) => step([n, v]); + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while ((g && ((g = 0), op[0] && (_ = 0)), _)) + try { + if ( + ((f = 1), + y && + (t = + op[0] & 2 + ? y["return"] + : op[0] + ? y["throw"] || ((t = y["return"]) && t.call(y), 0) + : y.next) && + !(t = t.call(y, op[1])).done) + ) + return t; + if (((y = 0), t)) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if ( + !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && + (op[0] === 6 || op[0] === 2) + ) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DgraphClient = void 0; +exports.isJwtExpired = isJwtExpired; +exports.deleteEdges = deleteEdges; +exports.open = open; +var grpc = require("@grpc/grpc-js"); +var messages = require("../generated/api_pb"); +var clientStub_1 = require("./clientStub"); +var errors_1 = require("./errors"); +var txn_1 = require("./txn"); +var types = require("./types"); +var util_1 = require("./util"); +var dgraphScheme = "dgraph:"; +var sslModeDisable = "disable"; +var sslModeRequire = "require"; +var sslModeVerifyCA = "verify-ca"; +var DgraphClient = (() => { + function DgraphClient() { + var clients = []; + for (var _i = 0; _i < arguments.length; _i++) { + clients[_i] = arguments[_i]; + } + this.debugMode = false; + if (clients.length === 0) { + throw errors_1.ERR_NO_CLIENTS; + } + this.clients = clients; + } + DgraphClient.prototype.alter = function (op, metadata, options) { + return __awaiter(this, void 0, void 0, function () { + var c, payload, operation, e_1, pl; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.debug( + "Alter request:\n".concat((0, util_1.stringifyMessage)(op)), + ); + c = this.anyClient(); + operation = () => + __awaiter(_this, void 0, void 0, function () { + return __generator(this, (_a) => [ + 2, + c.alter(op, metadata, options), + ]); + }); + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 8]); + return [4, operation()]; + case 2: + payload = _a.sent(); + return [3, 8]; + case 3: + e_1 = _a.sent(); + if (!(isJwtExpired(e_1) === true)) return [3, 6]; + return [4, c.retryLogin(metadata, options)]; + case 4: + _a.sent(); + return [4, operation()]; + case 5: + payload = _a.sent(); + return [3, 7]; + case 6: + throw e_1; + case 7: + return [3, 8]; + case 8: + pl = types.createPayload(payload); + this.debug( + "Alter response:\n".concat((0, util_1.stringifyMessage)(pl)), + ); + return [2, pl]; + } + }); + }); + }; + DgraphClient.prototype.newTxn = function (txnOpts) { + return new txn_1.Txn(this, txnOpts); + }; + DgraphClient.prototype.setDebugMode = function (mode) { + if (mode === void 0) { + mode = true; + } + this.debugMode = mode; + }; + DgraphClient.prototype.debug = function (msg) { + if (this.debugMode) { + console.log(msg); + } + }; + DgraphClient.prototype.anyClient = function () { + return this.clients[Math.floor(Math.random() * this.clients.length)]; + }; + DgraphClient.prototype.close = function () { + this.clients.forEach((clientStub) => { + try { + clientStub.close(); + console.log("Closed client stub successfully"); + } catch (error) { + console.error("Failed to close client stub:", error); + } + }); + }; + return DgraphClient; +})(); +exports.DgraphClient = DgraphClient; function isJwtExpired(err) { - if (!err) { - return false - } - return (0, util_1.isUnauthenticatedError)(err) + if (!err) { + return false; + } + return (0, util_1.isUnauthenticatedError)(err); } function deleteEdges(mu, uid) { - var predicates = [] - for (var _i = 2; _i < arguments.length; _i++) { - predicates[_i - 2] = arguments[_i] - } - for (var _a = 0, predicates_1 = predicates; _a < predicates_1.length; _a++) { - var predicate = predicates_1[_a] - var nquad = new messages.NQuad() - nquad.setSubject(uid) - nquad.setPredicate(predicate) - var ov = new messages.Value() - ov.setDefaultVal("_STAR_ALL") - nquad.setObjectValue(ov) - mu.addDel(nquad) - } + var predicates = []; + for (var _i = 2; _i < arguments.length; _i++) { + predicates[_i - 2] = arguments[_i]; + } + for (var _a = 0, predicates_1 = predicates; _a < predicates_1.length; _a++) { + var predicate = predicates_1[_a]; + var nquad = new messages.NQuad(); + nquad.setSubject(uid); + nquad.setPredicate(predicate); + var ov = new messages.Value(); + ov.setDefaultVal("_STAR_ALL"); + nquad.setObjectValue(ov); + mu.addDel(nquad); + } } function addApiKeyToCredentials(baseCreds, apiKey) { - var metaCreds = grpc.credentials.createFromMetadataGenerator(function (_, callback) { - var metadata = new grpc.Metadata() - metadata.add("authorization", apiKey) - callback(null, metadata) - }) - return grpc.credentials.combineChannelCredentials(baseCreds, metaCreds) + var metaCreds = grpc.credentials.createFromMetadataGenerator( + (_, callback) => { + var metadata = new grpc.Metadata(); + metadata.add("authorization", apiKey); + callback(null, metadata); + }, + ); + return grpc.credentials.combineChannelCredentials(baseCreds, metaCreds); } function addBearerTokenToCredentials(baseCreds, bearerToken) { - var metaCreds = grpc.credentials.createFromMetadataGenerator(function (_, callback) { - var metadata = new grpc.Metadata() - metadata.add("Authorization", "Bearer ".concat(bearerToken)) - callback(null, metadata) - }) - return grpc.credentials.combineChannelCredentials(baseCreds, metaCreds) + var metaCreds = grpc.credentials.createFromMetadataGenerator( + (_, callback) => { + var metadata = new grpc.Metadata(); + metadata.add("Authorization", "Bearer ".concat(bearerToken)); + callback(null, metadata); + }, + ); + return grpc.credentials.combineChannelCredentials(baseCreds, metaCreds); } function open(connStr) { - return __awaiter(this, void 0, void 0, function () { - var parsedUrl, host, port, queryParams, sslMode, credentials, clientStub, err_1 - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - parsedUrl = new URL(connStr) - if (parsedUrl.protocol !== dgraphScheme) { - throw new Error("Invalid scheme: must start with dgraph://") - } - host = parsedUrl.hostname - port = parsedUrl.port - if (!host) { - throw new Error("Invalid connection string: hostname required") - } - if (!port) { - throw new Error("Invalid connection string: port required") - } - queryParams = {} - if (parsedUrl.searchParams) { - parsedUrl.searchParams.forEach(function (value, key) { - queryParams[key] = value - }) - } - if (queryParams.apikey && queryParams.bearertoken) { - throw new Error("Both apikey and bearertoken cannot be provided") - } - sslMode = queryParams.sslmode - if (sslMode === undefined) { - sslMode = sslModeDisable - } - switch (sslMode) { - case sslModeDisable: - credentials = grpc.credentials.createInsecure() - break - case sslModeRequire: - credentials = grpc.credentials.createSsl(null, null, null, { - checkServerIdentity: function () { - return undefined - }, - }) - break - case sslModeVerifyCA: - credentials = grpc.credentials.createSsl() - break - default: - throw new Error( - "Invalid SSL mode: ".concat( - sslMode, - " (must be one of disable, require, verify-ca)", - ), - ) - } - if (queryParams.apikey) { - credentials = addApiKeyToCredentials(credentials, queryParams.apikey) - } else if (queryParams.bearertoken) { - credentials = addBearerTokenToCredentials(credentials, queryParams.bearertoken) - } - clientStub = new clientStub_1.DgraphClientStub( - "".concat(host, ":").concat(port), - credentials, - ) - if (!(parsedUrl.username != "")) return [3, 4] - if (!(parsedUrl.password === "")) return [3, 1] - throw new Error("Invalid connection string: password required when username is provided") - case 1: - _a.trys.push([1, 3, , 4]) - return [4, clientStub.login(parsedUrl.username, parsedUrl.password)] - case 2: - _a.sent() - return [3, 4] - case 3: - err_1 = _a.sent() - throw new Error("Failed to sign in user: ".concat(err_1.message)) - case 4: - return [2, new DgraphClient(clientStub)] - } - }) - }) + return __awaiter(this, void 0, void 0, function () { + var parsedUrl, + host, + port, + queryParams, + sslMode, + credentials, + clientStub, + err_1; + return __generator(this, (_a) => { + switch (_a.label) { + case 0: + parsedUrl = new URL(connStr); + if (parsedUrl.protocol !== dgraphScheme) { + throw new Error("Invalid scheme: must start with dgraph://"); + } + host = parsedUrl.hostname; + port = parsedUrl.port; + if (!host) { + throw new Error("Invalid connection string: hostname required"); + } + if (!port) { + throw new Error("Invalid connection string: port required"); + } + queryParams = {}; + if (parsedUrl.searchParams) { + parsedUrl.searchParams.forEach((value, key) => { + queryParams[key] = value; + }); + } + if (queryParams.apikey && queryParams.bearertoken) { + throw new Error("Both apikey and bearertoken cannot be provided"); + } + sslMode = queryParams.sslmode; + if (sslMode === undefined) { + sslMode = sslModeDisable; + } + switch (sslMode) { + case sslModeDisable: + credentials = grpc.credentials.createInsecure(); + break; + case sslModeRequire: + credentials = grpc.credentials.createSsl(null, null, null, { + checkServerIdentity: () => undefined, + }); + break; + case sslModeVerifyCA: + credentials = grpc.credentials.createSsl(); + break; + default: + throw new Error( + "Invalid SSL mode: ".concat( + sslMode, + " (must be one of disable, require, verify-ca)", + ), + ); + } + if (queryParams.apikey) { + credentials = addApiKeyToCredentials( + credentials, + queryParams.apikey, + ); + } else if (queryParams.bearertoken) { + credentials = addBearerTokenToCredentials( + credentials, + queryParams.bearertoken, + ); + } + clientStub = new clientStub_1.DgraphClientStub( + "".concat(host, ":").concat(port), + credentials, + ); + if (!(parsedUrl.username != "")) return [3, 4]; + if (!(parsedUrl.password === "")) return [3, 1]; + throw new Error( + "Invalid connection string: password required when username is provided", + ); + case 1: + _a.trys.push([1, 3, , 4]); + return [4, clientStub.login(parsedUrl.username, parsedUrl.password)]; + case 2: + _a.sent(); + return [3, 4]; + case 3: + err_1 = _a.sent(); + throw new Error("Failed to sign in user: ".concat(err_1.message)); + case 4: + return [2, new DgraphClient(clientStub)]; + } + }); + }); } diff --git a/lib/clientStub.d.ts b/lib/clientStub.d.ts index d4bf5de..f3cc917 100644 --- a/lib/clientStub.d.ts +++ b/lib/clientStub.d.ts @@ -3,57 +3,64 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" -import * as messages from "../generated/api_pb" +import type * as grpc from "@grpc/grpc-js"; +import type * as messages from "../generated/api_pb"; export declare class DgraphClientStub { - private readonly stub - private accessJwt - private refreshJwt - private readonly promisified - constructor(addr?: string, credentials?: grpc.ChannelCredentials, options?: object) - login( - userid?: string, - password?: string, - refreshJwt?: string, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - loginIntoNamespace( - userid?: string, - password?: string, - namespace?: number, - refreshJwt?: string, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - alter( - op: messages.Operation, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - retryLogin(metadata?: grpc.Metadata, options?: grpc.CallOptions): Promise - query( - req: messages.Request, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - mutate( - mu: messages.Mutation, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - commitOrAbort( - ctx: messages.TxnContext, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - checkVersion( - check: messages.Check, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - waitForReady(deadline: grpc.Deadline): Promise - close(): void - grpcClient(): grpc.Client - private ensureMetadata + private readonly stub; + private accessJwt; + private refreshJwt; + private readonly promisified; + constructor( + addr?: string, + credentials?: grpc.ChannelCredentials, + options?: object, + ); + login( + userid?: string, + password?: string, + refreshJwt?: string, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + loginIntoNamespace( + userid?: string, + password?: string, + namespace?: number, + refreshJwt?: string, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + alter( + op: messages.Operation, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + retryLogin( + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + query( + req: messages.Request, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + mutate( + mu: messages.Mutation, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + commitOrAbort( + ctx: messages.TxnContext, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + checkVersion( + check: messages.Check, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + waitForReady(deadline: grpc.Deadline): Promise; + close(): void; + grpcClient(): grpc.Client; + private ensureMetadata; } diff --git a/lib/clientStub.js b/lib/clientStub.js index bfaa87f..7cd7174 100644 --- a/lib/clientStub.js +++ b/lib/clientStub.js @@ -1,294 +1,322 @@ -/* - * SPDX-FileCopyrightText: © Hypermode Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict" var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value) - }) - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)) - } catch (e) { - reject(e) - } - } - function rejected(value) { - try { - step(generator["throw"](value)) - } catch (e) { - reject(e) - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected) - } - step((generator = generator.apply(thisArg, _arguments || [])).next()) - }) - } + (this && this.__awaiter) || + ((thisArg, _arguments, P, generator) => { + function adopt(value) { + return value instanceof P + ? value + : new P((resolve) => { + resolve(value); + }); + } + return new (P || (P = Promise))((resolve, reject) => { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }); var __generator = - (this && this.__generator) || - function (thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1] - return t[1] - }, - trys: [], - ops: [], - }, - f, - y, - t, - g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype) - return ( - (g.next = verb(0)), - (g["throw"] = verb(1)), - (g["return"] = verb(2)), - typeof Symbol === "function" && - (g[Symbol.iterator] = function () { - return this - }), - g - ) - function verb(n) { - return function (v) { - return step([n, v]) - } - } - function step(op) { - if (f) throw new TypeError("Generator is already executing.") - while ((g && ((g = 0), op[0] && (_ = 0)), _)) - try { - if ( - ((f = 1), - y && - (t = - op[0] & 2 - ? y["return"] - : op[0] - ? y["throw"] || ((t = y["return"]) && t.call(y), 0) - : y.next) && - !(t = t.call(y, op[1])).done) - ) - return t - if (((y = 0), t)) op = [op[0] & 2, t.value] - switch (op[0]) { - case 0: - case 1: - t = op - break - case 4: - _.label++ - return { value: op[1], done: false } - case 5: - _.label++ - y = op[1] - op = [0] - continue - case 7: - op = _.ops.pop() - _.trys.pop() - continue - default: - if ( - !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && - (op[0] === 6 || op[0] === 2) - ) { - _ = 0 - continue - } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1] - break - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1] - t = op - break - } - if (t && _.label < t[2]) { - _.label = t[2] - _.ops.push(op) - break - } - if (t[2]) _.ops.pop() - _.trys.pop() - continue - } - op = body.call(thisArg, _) - } catch (e) { - op = [6, e] - y = 0 - } finally { - f = t = 0 - } - if (op[0] & 5) throw op[1] - return { value: op[0] ? op[1] : void 0, done: true } - } - } -Object.defineProperty(exports, "__esModule", { value: true }) -exports.DgraphClientStub = void 0 -var grpc = require("@grpc/grpc-js") -var services = require("../generated/api_grpc_pb") -var messages = require("../generated/api_pb") -var errors_1 = require("./errors") -var util_1 = require("./util") -var DgraphClientStub = (function () { - function DgraphClientStub(addr, credentials, options) { - this.accessJwt = "" - this.refreshJwt = "" - if (addr === undefined) { - addr = "localhost:9080" - } - if (credentials === undefined) { - credentials = grpc.credentials.createInsecure() - } - this.stub = new services.DgraphClient(addr, credentials, options) - this.promisified = { - login: (0, util_1.promisify3)(this.stub.login, this.stub), - alter: (0, util_1.promisify3)(this.stub.alter, this.stub), - query: (0, util_1.promisify3)(this.stub.query, this.stub), - mutate: (0, util_1.promisify3)(this.stub.mutate, this.stub), - commitOrAbort: (0, util_1.promisify3)(this.stub.commitOrAbort, this.stub), - checkVersion: (0, util_1.promisify3)(this.stub.checkVersion, this.stub), - waitForReady: (0, util_1.promisify1)(this.stub.waitForReady, this.stub), - } - } - DgraphClientStub.prototype.login = function (userid, password, refreshJwt, metadata, options) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2, this.loginIntoNamespace(userid, password, 0, refreshJwt, metadata, options)] - }) - }) - } - DgraphClientStub.prototype.loginIntoNamespace = function ( - userid, - password, - namespace, - refreshJwt, - metadata, - options, - ) { - return __awaiter(this, void 0, void 0, function () { - var req, resp, jwtResponse - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - req = new messages.LoginRequest() - if (userid !== undefined) { - req.setUserid(userid) - req.setPassword(password) - req.setNamespace(namespace) - } else if (refreshJwt !== undefined) { - req.setRefreshToken(refreshJwt) - } else { - req.setRefreshToken(this.refreshJwt) - } - return [ - 4, - this.promisified.login( - req, - this.ensureMetadata(metadata), - ensureCallOptions(options), - ), - ] - case 1: - resp = _a.sent() - jwtResponse = messages.Jwt.deserializeBinary(resp.getJson_asU8()) - this.accessJwt = jwtResponse.getAccessJwt() - this.refreshJwt = jwtResponse.getRefreshJwt() - return [2, jwtResponse] - } - }) - }) - } - DgraphClientStub.prototype.alter = function (op, metadata, options) { - return this.promisified.alter(op, this.ensureMetadata(metadata), ensureCallOptions(options)) - } - DgraphClientStub.prototype.retryLogin = function (metadata, options) { - return __awaiter(this, void 0, void 0, function () { - var req, resp, jwtResponse - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (this.refreshJwt.length === 0) { - throw errors_1.ERR_REFRESH_JWT_EMPTY - } - req = new messages.LoginRequest() - req.setRefreshToken(this.refreshJwt) - return [ - 4, - this.promisified.login( - req, - this.ensureMetadata(metadata), - ensureCallOptions(options), - ), - ] - case 1: - resp = _a.sent() - jwtResponse = messages.Jwt.deserializeBinary(resp.getJson_asU8()) - this.accessJwt = jwtResponse.getAccessJwt() - this.refreshJwt = jwtResponse.getRefreshJwt() - return [2, jwtResponse] - } - }) - }) - } - DgraphClientStub.prototype.query = function (req, metadata, options) { - return this.promisified.query(req, this.ensureMetadata(metadata), ensureCallOptions(options)) - } - DgraphClientStub.prototype.mutate = function (mu, metadata, options) { - return this.promisified.mutate(mu, this.ensureMetadata(metadata), ensureCallOptions(options)) - } - DgraphClientStub.prototype.commitOrAbort = function (ctx, metadata, options) { - return this.promisified.commitOrAbort( - ctx, - this.ensureMetadata(metadata), - ensureCallOptions(options), - ) - } - DgraphClientStub.prototype.checkVersion = function (check, metadata, options) { - return this.promisified.checkVersion( - check, - this.ensureMetadata(metadata), - ensureCallOptions(options), - ) - } - DgraphClientStub.prototype.waitForReady = function (deadline) { - return this.promisified.waitForReady(deadline) - } - DgraphClientStub.prototype.close = function () { - return this.stub.close() - } - DgraphClientStub.prototype.grpcClient = function () { - return this.stub - } - DgraphClientStub.prototype.ensureMetadata = function (metadata) { - var newMeta = metadata === undefined ? new grpc.Metadata() : metadata - if (this.accessJwt !== "") { - newMeta.set("accessJwt", this.accessJwt) - } - return newMeta - } - return DgraphClientStub -})() -exports.DgraphClientStub = DgraphClientStub + (this && this.__generator) || + ((thisArg, body) => { + var _ = { + label: 0, + sent: () => { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [], + }, + f, + y, + t, + g = Object.create( + (typeof Iterator === "function" ? Iterator : Object).prototype, + ); + return ( + (g.next = verb(0)), + (g["throw"] = verb(1)), + (g["return"] = verb(2)), + typeof Symbol === "function" && + (g[Symbol.iterator] = function () { + return this; + }), + g + ); + function verb(n) { + return (v) => step([n, v]); + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while ((g && ((g = 0), op[0] && (_ = 0)), _)) + try { + if ( + ((f = 1), + y && + (t = + op[0] & 2 + ? y["return"] + : op[0] + ? y["throw"] || ((t = y["return"]) && t.call(y), 0) + : y.next) && + !(t = t.call(y, op[1])).done) + ) + return t; + if (((y = 0), t)) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if ( + !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && + (op[0] === 6 || op[0] === 2) + ) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DgraphClientStub = void 0; +var grpc = require("@grpc/grpc-js"); +var services = require("../generated/api_grpc_pb"); +var messages = require("../generated/api_pb"); +var errors_1 = require("./errors"); +var util_1 = require("./util"); +var DgraphClientStub = (() => { + function DgraphClientStub(addr, credentials, options) { + this.accessJwt = ""; + this.refreshJwt = ""; + if (addr === undefined) { + addr = "localhost:9080"; + } + if (credentials === undefined) { + credentials = grpc.credentials.createInsecure(); + } + this.stub = new services.DgraphClient(addr, credentials, options); + this.promisified = { + login: (0, util_1.promisify3)(this.stub.login, this.stub), + alter: (0, util_1.promisify3)(this.stub.alter, this.stub), + query: (0, util_1.promisify3)(this.stub.query, this.stub), + mutate: (0, util_1.promisify3)(this.stub.mutate, this.stub), + commitOrAbort: (0, util_1.promisify3)(this.stub.commitOrAbort, this.stub), + checkVersion: (0, util_1.promisify3)(this.stub.checkVersion, this.stub), + waitForReady: (0, util_1.promisify1)(this.stub.waitForReady, this.stub), + }; + } + DgraphClientStub.prototype.login = function ( + userid, + password, + refreshJwt, + metadata, + options, + ) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [ + 2, + this.loginIntoNamespace( + userid, + password, + 0, + refreshJwt, + metadata, + options, + ), + ]; + }); + }); + }; + DgraphClientStub.prototype.loginIntoNamespace = function ( + userid, + password, + namespace, + refreshJwt, + metadata, + options, + ) { + return __awaiter(this, void 0, void 0, function () { + var req, resp, jwtResponse; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + req = new messages.LoginRequest(); + if (userid !== undefined) { + req.setUserid(userid); + req.setPassword(password); + req.setNamespace(namespace); + } else if (refreshJwt !== undefined) { + req.setRefreshToken(refreshJwt); + } else { + req.setRefreshToken(this.refreshJwt); + } + return [ + 4, + this.promisified.login( + req, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ), + ]; + case 1: + resp = _a.sent(); + jwtResponse = messages.Jwt.deserializeBinary(resp.getJson_asU8()); + this.accessJwt = jwtResponse.getAccessJwt(); + this.refreshJwt = jwtResponse.getRefreshJwt(); + return [2, jwtResponse]; + } + }); + }); + }; + DgraphClientStub.prototype.alter = function (op, metadata, options) { + return this.promisified.alter( + op, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + }; + DgraphClientStub.prototype.retryLogin = function (metadata, options) { + return __awaiter(this, void 0, void 0, function () { + var req, resp, jwtResponse; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.refreshJwt.length === 0) { + throw errors_1.ERR_REFRESH_JWT_EMPTY; + } + req = new messages.LoginRequest(); + req.setRefreshToken(this.refreshJwt); + return [ + 4, + this.promisified.login( + req, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ), + ]; + case 1: + resp = _a.sent(); + jwtResponse = messages.Jwt.deserializeBinary(resp.getJson_asU8()); + this.accessJwt = jwtResponse.getAccessJwt(); + this.refreshJwt = jwtResponse.getRefreshJwt(); + return [2, jwtResponse]; + } + }); + }); + }; + DgraphClientStub.prototype.query = function (req, metadata, options) { + return this.promisified.query( + req, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + }; + DgraphClientStub.prototype.mutate = function (mu, metadata, options) { + return this.promisified.mutate( + mu, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + }; + DgraphClientStub.prototype.commitOrAbort = function (ctx, metadata, options) { + return this.promisified.commitOrAbort( + ctx, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + }; + DgraphClientStub.prototype.checkVersion = function ( + check, + metadata, + options, + ) { + return this.promisified.checkVersion( + check, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + }; + DgraphClientStub.prototype.waitForReady = function (deadline) { + return this.promisified.waitForReady(deadline); + }; + DgraphClientStub.prototype.close = function () { + return this.stub.close(); + }; + DgraphClientStub.prototype.grpcClient = function () { + return this.stub; + }; + DgraphClientStub.prototype.ensureMetadata = function (metadata) { + var newMeta = metadata === undefined ? new grpc.Metadata() : metadata; + if (this.accessJwt !== "") { + newMeta.set("accessJwt", this.accessJwt); + } + return newMeta; + }; + return DgraphClientStub; +})(); +exports.DgraphClientStub = DgraphClientStub; function ensureCallOptions(options) { - return options === undefined - ? { - propagate_flags: grpc.propagate.DEFAULTS, - credentials: undefined, - } - : options + return options === undefined + ? { + propagate_flags: grpc.propagate.DEFAULTS, + credentials: undefined, + } + : options; } diff --git a/lib/clientStubFromSlash.d.ts b/lib/clientStubFromSlash.d.ts index 5564fce..2a7d0d8 100644 --- a/lib/clientStubFromSlash.d.ts +++ b/lib/clientStubFromSlash.d.ts @@ -3,12 +3,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { DgraphClientStub } from "./clientStub" +import type { DgraphClientStub } from "./clientStub"; export declare function clientStubFromSlashGraphQLEndpoint( - graphqlEndpoint: string, - apiKey: string, -): DgraphClientStub + graphqlEndpoint: string, + apiKey: string, +): DgraphClientStub; export declare function clientStubFromCloudEndpoint( - graphqlEndpoint: string, - apiKey: string, -): DgraphClientStub + graphqlEndpoint: string, + apiKey: string, +): DgraphClientStub; diff --git a/lib/clientStubFromSlash.js b/lib/clientStubFromSlash.js index 6bc7968..47eb749 100644 --- a/lib/clientStubFromSlash.js +++ b/lib/clientStubFromSlash.js @@ -1,33 +1,29 @@ -/* - * SPDX-FileCopyrightText: © Hypermode Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict" -Object.defineProperty(exports, "__esModule", { value: true }) -exports.clientStubFromSlashGraphQLEndpoint = clientStubFromSlashGraphQLEndpoint -exports.clientStubFromCloudEndpoint = clientStubFromCloudEndpoint -var grpc = require("@grpc/grpc-js") -var Url = require("url-parse") -var clientStub_1 = require("./clientStub") -var PORT = "443" +Object.defineProperty(exports, "__esModule", { value: true }); +exports.clientStubFromSlashGraphQLEndpoint = clientStubFromSlashGraphQLEndpoint; +exports.clientStubFromCloudEndpoint = clientStubFromCloudEndpoint; +var grpc = require("@grpc/grpc-js"); +var Url = require("url-parse"); +var clientStub_1 = require("./clientStub"); +var PORT = "443"; function clientStubFromSlashGraphQLEndpoint(graphqlEndpoint, apiKey) { - return clientStubFromCloudEndpoint(graphqlEndpoint, apiKey) + return clientStubFromCloudEndpoint(graphqlEndpoint, apiKey); } function clientStubFromCloudEndpoint(graphqlEndpoint, apiKey) { - var url = new Url(graphqlEndpoint) - var urlParts = url.host.split(".") - var firstHalf = urlParts[0] - var secondHalf = "".concat(urlParts.splice(1).join("."), ":").concat(PORT) - var backenedURL = "".concat(firstHalf, ".grpc.").concat(secondHalf) - var metaCreds = grpc.credentials.createFromMetadataGenerator(function (_, callback) { - var metadata = new grpc.Metadata() - metadata.add("authorization", apiKey) - callback(undefined, metadata) - }) - var credentials = grpc.credentials.combineChannelCredentials( - grpc.credentials.createSsl(), - metaCreds, - ) - return new clientStub_1.DgraphClientStub(backenedURL, credentials) + var url = new Url(graphqlEndpoint); + var urlParts = url.host.split("."); + var firstHalf = urlParts[0]; + var secondHalf = "".concat(urlParts.splice(1).join("."), ":").concat(PORT); + var backenedURL = "".concat(firstHalf, ".grpc.").concat(secondHalf); + var metaCreds = grpc.credentials.createFromMetadataGenerator( + (_, callback) => { + var metadata = new grpc.Metadata(); + metadata.add("authorization", apiKey); + callback(undefined, metadata); + }, + ); + var credentials = grpc.credentials.combineChannelCredentials( + grpc.credentials.createSsl(), + metaCreds, + ); + return new clientStub_1.DgraphClientStub(backenedURL, credentials); } diff --git a/lib/dgraph.d.ts b/lib/dgraph.d.ts index 2fbccb0..953e92a 100644 --- a/lib/dgraph.d.ts +++ b/lib/dgraph.d.ts @@ -3,21 +3,21 @@ * SPDX-License-Identifier: Apache-2.0 */ -export * from "./types" +export * from "./types"; export { - Operation, - Request, - TxnContext, - Check, - Version, - NQuad, - Value, - Facet, - Latency, -} from "../generated/api_pb" -export * from "./clientStub" -export * from "./client" -export * from "./clientStubFromSlash" -export * from "./txn" -export * from "./errors" -export * as grpc from "@grpc/grpc-js" + Operation, + Request, + TxnContext, + Check, + Version, + NQuad, + Value, + Facet, + Latency, +} from "../generated/api_pb"; +export * from "./clientStub"; +export * from "./client"; +export * from "./clientStubFromSlash"; +export * from "./txn"; +export * from "./errors"; +export * as grpc from "@grpc/grpc-js"; diff --git a/lib/dgraph.js b/lib/dgraph.js index 1e1003c..47f97d7 100644 --- a/lib/dgraph.js +++ b/lib/dgraph.js @@ -1,107 +1,84 @@ -/* - * SPDX-FileCopyrightText: © Hypermode Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict" var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k - var desc = Object.getOwnPropertyDescriptor(m, k) - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function () { - return m[k] - }, - } - } - Object.defineProperty(o, k2, desc) - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k - o[k2] = m[k] - }) + (this && this.__createBinding) || + (Object.create + ? (o, m, k, k2) => { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if ( + !desc || + ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) + ) { + desc = { + enumerable: true, + get: () => m[k], + }; + } + Object.defineProperty(o, k2, desc); + } + : (o, m, k, k2) => { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); var __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) - __createBinding(exports, m, p) - } -Object.defineProperty(exports, "__esModule", { value: true }) + (this && this.__exportStar) || + ((m, exports) => { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) + __createBinding(exports, m, p); + }); +Object.defineProperty(exports, "__esModule", { value: true }); exports.grpc = - exports.Latency = - exports.Facet = - exports.Value = - exports.NQuad = - exports.Version = - exports.Check = - exports.TxnContext = - exports.Request = - exports.Operation = - void 0 -__exportStar(require("./types"), exports) -var api_pb_1 = require("../generated/api_pb") + exports.Latency = + exports.Facet = + exports.Value = + exports.NQuad = + exports.Version = + exports.Check = + exports.TxnContext = + exports.Request = + exports.Operation = + void 0; +__exportStar(require("./types"), exports); +var api_pb_1 = require("../generated/api_pb"); Object.defineProperty(exports, "Operation", { - enumerable: true, - get: function () { - return api_pb_1.Operation - }, -}) + enumerable: true, + get: () => api_pb_1.Operation, +}); Object.defineProperty(exports, "Request", { - enumerable: true, - get: function () { - return api_pb_1.Request - }, -}) + enumerable: true, + get: () => api_pb_1.Request, +}); Object.defineProperty(exports, "TxnContext", { - enumerable: true, - get: function () { - return api_pb_1.TxnContext - }, -}) + enumerable: true, + get: () => api_pb_1.TxnContext, +}); Object.defineProperty(exports, "Check", { - enumerable: true, - get: function () { - return api_pb_1.Check - }, -}) + enumerable: true, + get: () => api_pb_1.Check, +}); Object.defineProperty(exports, "Version", { - enumerable: true, - get: function () { - return api_pb_1.Version - }, -}) + enumerable: true, + get: () => api_pb_1.Version, +}); Object.defineProperty(exports, "NQuad", { - enumerable: true, - get: function () { - return api_pb_1.NQuad - }, -}) + enumerable: true, + get: () => api_pb_1.NQuad, +}); Object.defineProperty(exports, "Value", { - enumerable: true, - get: function () { - return api_pb_1.Value - }, -}) + enumerable: true, + get: () => api_pb_1.Value, +}); Object.defineProperty(exports, "Facet", { - enumerable: true, - get: function () { - return api_pb_1.Facet - }, -}) + enumerable: true, + get: () => api_pb_1.Facet, +}); Object.defineProperty(exports, "Latency", { - enumerable: true, - get: function () { - return api_pb_1.Latency - }, -}) -__exportStar(require("./clientStub"), exports) -__exportStar(require("./client"), exports) -__exportStar(require("./clientStubFromSlash"), exports) -__exportStar(require("./txn"), exports) -__exportStar(require("./errors"), exports) -exports.grpc = require("@grpc/grpc-js") + enumerable: true, + get: () => api_pb_1.Latency, +}); +__exportStar(require("./clientStub"), exports); +__exportStar(require("./client"), exports); +__exportStar(require("./clientStubFromSlash"), exports); +__exportStar(require("./txn"), exports); +__exportStar(require("./errors"), exports); +exports.grpc = require("@grpc/grpc-js"); diff --git a/lib/errors.d.ts b/lib/errors.d.ts index f4c64a0..f1feb6d 100644 --- a/lib/errors.d.ts +++ b/lib/errors.d.ts @@ -3,9 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -export declare const ERR_NO_CLIENTS: Error -export declare const ERR_FINISHED: Error -export declare const ERR_ABORTED: Error -export declare const ERR_BEST_EFFORT_REQUIRED_READ_ONLY: Error -export declare const ERR_READ_ONLY: Error -export declare const ERR_REFRESH_JWT_EMPTY: Error +export declare const ERR_NO_CLIENTS: Error; +export declare const ERR_FINISHED: Error; +export declare const ERR_ABORTED: Error; +export declare const ERR_BEST_EFFORT_REQUIRED_READ_ONLY: Error; +export declare const ERR_READ_ONLY: Error; +export declare const ERR_REFRESH_JWT_EMPTY: Error; diff --git a/lib/errors.js b/lib/errors.js index c265f60..d397a7b 100644 --- a/lib/errors.js +++ b/lib/errors.js @@ -1,22 +1,22 @@ -/* - * SPDX-FileCopyrightText: © Hypermode Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict" -Object.defineProperty(exports, "__esModule", { value: true }) +Object.defineProperty(exports, "__esModule", { value: true }); exports.ERR_REFRESH_JWT_EMPTY = - exports.ERR_READ_ONLY = - exports.ERR_BEST_EFFORT_REQUIRED_READ_ONLY = - exports.ERR_ABORTED = - exports.ERR_FINISHED = - exports.ERR_NO_CLIENTS = - void 0 -exports.ERR_NO_CLIENTS = new Error("No clients provided in DgraphClient constructor") -exports.ERR_FINISHED = new Error("Transaction has already been committed or discarded") -exports.ERR_ABORTED = new Error("Transaction has been aborted. Please retry") + exports.ERR_READ_ONLY = + exports.ERR_BEST_EFFORT_REQUIRED_READ_ONLY = + exports.ERR_ABORTED = + exports.ERR_FINISHED = + exports.ERR_NO_CLIENTS = + void 0; +exports.ERR_NO_CLIENTS = new Error( + "No clients provided in DgraphClient constructor", +); +exports.ERR_FINISHED = new Error( + "Transaction has already been committed or discarded", +); +exports.ERR_ABORTED = new Error("Transaction has been aborted. Please retry"); exports.ERR_BEST_EFFORT_REQUIRED_READ_ONLY = new Error( - "Best effort only works for read-only queries", -) -exports.ERR_READ_ONLY = new Error("Readonly transaction cannot run mutations or be committed") -exports.ERR_REFRESH_JWT_EMPTY = new Error("refresh jwt should not be empty") + "Best effort only works for read-only queries", +); +exports.ERR_READ_ONLY = new Error( + "Readonly transaction cannot run mutations or be committed", +); +exports.ERR_REFRESH_JWT_EMPTY = new Error("refresh jwt should not be empty"); diff --git a/lib/index.d.ts b/lib/index.d.ts index f6d06bd..cd115e5 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -3,6 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "./dgraph" -export * from "./dgraph" -export default dgraph +import * as dgraph from "./dgraph"; +export * from "./dgraph"; +export default dgraph; diff --git a/lib/index.js b/lib/index.js index 62c5ac1..87ab521 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,37 +1,32 @@ -/* - * SPDX-FileCopyrightText: © Hypermode Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict" var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k - var desc = Object.getOwnPropertyDescriptor(m, k) - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function () { - return m[k] - }, - } - } - Object.defineProperty(o, k2, desc) - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k - o[k2] = m[k] - }) + (this && this.__createBinding) || + (Object.create + ? (o, m, k, k2) => { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if ( + !desc || + ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) + ) { + desc = { + enumerable: true, + get: () => m[k], + }; + } + Object.defineProperty(o, k2, desc); + } + : (o, m, k, k2) => { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); var __exportStar = - (this && this.__exportStar) || - function (m, exports) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) - __createBinding(exports, m, p) - } -Object.defineProperty(exports, "__esModule", { value: true }) -var dgraph = require("./dgraph") -__exportStar(require("./dgraph"), exports) -exports.default = dgraph + (this && this.__exportStar) || + ((m, exports) => { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) + __createBinding(exports, m, p); + }); +Object.defineProperty(exports, "__esModule", { value: true }); +var dgraph = require("./dgraph"); +__exportStar(require("./dgraph"), exports); +exports.default = dgraph; diff --git a/lib/txn.d.ts b/lib/txn.d.ts index b1d7995..ef34573 100644 --- a/lib/txn.d.ts +++ b/lib/txn.d.ts @@ -3,51 +3,59 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" -import * as messages from "../generated/api_pb" -import { DgraphClient } from "./client" -import * as types from "./types" +import type * as grpc from "@grpc/grpc-js"; +import type * as messages from "../generated/api_pb"; +import type { DgraphClient } from "./client"; +import type * as types from "./types"; export type TxnOptions = { - readOnly?: boolean - bestEffort?: boolean -} + readOnly?: boolean; + bestEffort?: boolean; +}; export declare class Txn { - private readonly dc - private readonly ctx - private finished - private mutated - private readonly useReadOnly - private readonly useBestEffort - constructor(dc: DgraphClient, txnOpts?: TxnOptions) - query(q: string, metadata?: grpc.Metadata, options?: grpc.CallOptions): Promise - queryWithVars( - q: string, - vars?: { - [k: string]: any - }, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - queryRDF(q: string, metadata?: grpc.Metadata, options?: grpc.CallOptions): Promise - queryRDFWithVars( - q: string, - vars?: { - [k: string]: any - }, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - mutate( - mu: types.Mutation, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - doRequest( - req: messages.Request, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - commit(metadata?: grpc.Metadata, options?: grpc.CallOptions): Promise - discard(metadata?: grpc.Metadata, options?: grpc.CallOptions): Promise - private mergeContext + private readonly dc; + private readonly ctx; + private finished; + private mutated; + private readonly useReadOnly; + private readonly useBestEffort; + constructor(dc: DgraphClient, txnOpts?: TxnOptions); + query( + q: string, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + queryWithVars( + q: string, + vars?: { + [k: string]: any; + }, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + queryRDF( + q: string, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + queryRDFWithVars( + q: string, + vars?: { + [k: string]: any; + }, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + mutate( + mu: types.Mutation, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + doRequest( + req: messages.Request, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + commit(metadata?: grpc.Metadata, options?: grpc.CallOptions): Promise; + discard(metadata?: grpc.Metadata, options?: grpc.CallOptions): Promise; + private mergeContext; } diff --git a/lib/txn.js b/lib/txn.js index 8fa5fcd..d1ef143 100644 --- a/lib/txn.js +++ b/lib/txn.js @@ -1,458 +1,467 @@ -/* - * SPDX-FileCopyrightText: © Hypermode Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict" var __assign = - (this && this.__assign) || - function () { - __assign = - Object.assign || - function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i] - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p] - } - return t - } - return __assign.apply(this, arguments) - } + (this && this.__assign) || + function () { + __assign = + Object.assign || + ((t) => { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }); + return __assign.apply(this, arguments); + }; var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value) - }) - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)) - } catch (e) { - reject(e) - } - } - function rejected(value) { - try { - step(generator["throw"](value)) - } catch (e) { - reject(e) - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected) - } - step((generator = generator.apply(thisArg, _arguments || [])).next()) - }) - } + (this && this.__awaiter) || + ((thisArg, _arguments, P, generator) => { + function adopt(value) { + return value instanceof P + ? value + : new P((resolve) => { + resolve(value); + }); + } + return new (P || (P = Promise))((resolve, reject) => { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }); var __generator = - (this && this.__generator) || - function (thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1] - return t[1] - }, - trys: [], - ops: [], - }, - f, - y, - t, - g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype) - return ( - (g.next = verb(0)), - (g["throw"] = verb(1)), - (g["return"] = verb(2)), - typeof Symbol === "function" && - (g[Symbol.iterator] = function () { - return this - }), - g - ) - function verb(n) { - return function (v) { - return step([n, v]) - } - } - function step(op) { - if (f) throw new TypeError("Generator is already executing.") - while ((g && ((g = 0), op[0] && (_ = 0)), _)) - try { - if ( - ((f = 1), - y && - (t = - op[0] & 2 - ? y["return"] - : op[0] - ? y["throw"] || ((t = y["return"]) && t.call(y), 0) - : y.next) && - !(t = t.call(y, op[1])).done) - ) - return t - if (((y = 0), t)) op = [op[0] & 2, t.value] - switch (op[0]) { - case 0: - case 1: - t = op - break - case 4: - _.label++ - return { value: op[1], done: false } - case 5: - _.label++ - y = op[1] - op = [0] - continue - case 7: - op = _.ops.pop() - _.trys.pop() - continue - default: - if ( - !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && - (op[0] === 6 || op[0] === 2) - ) { - _ = 0 - continue - } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1] - break - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1] - t = op - break - } - if (t && _.label < t[2]) { - _.label = t[2] - _.ops.push(op) - break - } - if (t[2]) _.ops.pop() - _.trys.pop() - continue - } - op = body.call(thisArg, _) - } catch (e) { - op = [6, e] - y = 0 - } finally { - f = t = 0 - } - if (op[0] & 5) throw op[1] - return { value: op[0] ? op[1] : void 0, done: true } - } - } -Object.defineProperty(exports, "__esModule", { value: true }) -exports.Txn = void 0 -var messages = require("../generated/api_pb") -var client_1 = require("./client") -var errors_1 = require("./errors") -var types = require("./types") -var util_1 = require("./util") -var Txn = (function () { - function Txn(dc, txnOpts) { - this.finished = false - this.mutated = false - this.useReadOnly = false - this.useBestEffort = false - this.dc = dc - this.ctx = new messages.TxnContext() - var defaultedTxnOpts = __assign({ readOnly: false, bestEffort: false }, txnOpts) - this.useReadOnly = defaultedTxnOpts.readOnly - this.useBestEffort = defaultedTxnOpts.bestEffort - if (this.useBestEffort && !this.useReadOnly) { - this.dc.debug( - "Client attempted to query using best-effort without setting the transaction to read-only", - ) - throw errors_1.ERR_BEST_EFFORT_REQUIRED_READ_ONLY - } - } - Txn.prototype.query = function (q, metadata, options) { - return this.queryWithVars(q, undefined, metadata, options) - } - Txn.prototype.queryWithVars = function (q, vars, metadata, options) { - return __awaiter(this, void 0, void 0, function () { - var req, varsMap_1 - return __generator(this, function (_a) { - if (this.finished) { - this.dc.debug( - "Query request (ERR_FINISHED):\nquery = ".concat(q, "\nvars = ").concat(vars), - ) - throw errors_1.ERR_FINISHED - } - req = new messages.Request() - req.setQuery(q) - req.setStartTs(this.ctx.getStartTs()) - req.setReadOnly(this.useReadOnly) - req.setBestEffort(this.useBestEffort) - if (vars !== undefined) { - varsMap_1 = req.getVarsMap() - Object.keys(vars).forEach(function (key) { - var value = vars[key] - if (typeof value === "string" || value instanceof String) { - varsMap_1.set(key, value.toString()) - } - }) - } - return [2, this.doRequest(req, metadata, options)] - }) - }) - } - Txn.prototype.queryRDF = function (q, metadata, options) { - return this.queryRDFWithVars(q, undefined, metadata, options) - } - Txn.prototype.queryRDFWithVars = function (q, vars, metadata, options) { - return __awaiter(this, void 0, void 0, function () { - var req, varsMap_2 - return __generator(this, function (_a) { - if (this.finished) { - this.dc.debug( - "Query request (ERR_FINISHED):\nquery = ".concat(q, "\nvars = ").concat(vars), - ) - throw errors_1.ERR_FINISHED - } - req = new messages.Request() - req.setQuery(q) - req.setStartTs(this.ctx.getStartTs()) - req.setReadOnly(this.useReadOnly) - req.setBestEffort(this.useBestEffort) - req.setRespFormat(messages.Request.RespFormat.RDF) - if (vars !== undefined) { - varsMap_2 = req.getVarsMap() - Object.keys(vars).forEach(function (key) { - var value = vars[key] - if (typeof value === "string" || value instanceof String) { - varsMap_2.set(key, value.toString()) - } - }) - } - return [2, this.doRequest(req, metadata, options)] - }) - }) - } - Txn.prototype.mutate = function (mu, metadata, options) { - return __awaiter(this, void 0, void 0, function () { - var req - return __generator(this, function (_a) { - req = new messages.Request() - req.setStartTs(this.ctx.getStartTs()) - req.setMutationsList([mu]) - req.setCommitNow(mu.getCommitNow()) - return [2, this.doRequest(req, metadata, options)] - }) - }) - } - Txn.prototype.doRequest = function (req, metadata, options) { - return __awaiter(this, void 0, void 0, function () { - var mutationList, resp, c, operation, _a, _b, e_1, _c, _d, _e - var _this = this - return __generator(this, function (_f) { - switch (_f.label) { - case 0: - mutationList = req.getMutationsList() - if (this.finished) { - this.dc.debug( - "Do request (ERR_FINISHED):\nquery = " - .concat(req.getQuery(), "\nvars = ") - .concat(req.getVarsMap()), - ) - this.dc.debug( - "Do request (ERR_FINISHED):\nmutation = ".concat( - (0, util_1.stringifyMessage)(mutationList[0]), - ), - ) - throw errors_1.ERR_FINISHED - } - if (mutationList.length > 0) { - if (this.useReadOnly) { - this.dc.debug( - "Do request (ERR_READ_ONLY):\nmutation = ".concat( - (0, util_1.stringifyMessage)(mutationList[0]), - ), - ) - throw errors_1.ERR_READ_ONLY - } - this.mutated = true - } - req.setStartTs(this.ctx.getStartTs()) - req.setHash(this.ctx.getHash()) - this.dc.debug("Do request:\n".concat((0, util_1.stringifyMessage)(req))) - c = this.dc.anyClient() - operation = function () { - return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2, c.query(req, metadata, options)] - }) - }) - } - _f.label = 1 - case 1: - _f.trys.push([1, 3, , 11]) - _b = (_a = types).createResponse - return [4, operation()] - case 2: - resp = _b.apply(_a, [_f.sent()]) - return [3, 11] - case 3: - e_1 = _f.sent() - if (!((0, client_1.isJwtExpired)(e_1) === true)) return [3, 6] - return [4, c.retryLogin(metadata, options)] - case 4: - _f.sent() - _d = (_c = types).createResponse - return [4, operation()] - case 5: - resp = _d.apply(_c, [_f.sent()]) - return [3, 10] - case 6: - _f.trys.push([6, 8, , 9]) - return [4, this.discard(metadata, options)] - case 7: - _f.sent() - return [3, 9] - case 8: - _e = _f.sent() - return [3, 9] - case 9: - throw (0, util_1.isAbortedError)(e_1) || (0, util_1.isConflictError)(e_1) - ? errors_1.ERR_ABORTED - : e_1 - case 10: - return [3, 11] - case 11: - if (req.getCommitNow()) { - this.finished = true - } - this.mergeContext(resp.getTxn()) - this.dc.debug("Do request:\nresponse = ".concat((0, util_1.stringifyMessage)(resp))) - return [2, resp] - } - }) - }) - } - Txn.prototype.commit = function (metadata, options) { - return __awaiter(this, void 0, void 0, function () { - var c, operation, e_2 - var _this = this - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (this.finished) { - throw errors_1.ERR_FINISHED - } - this.finished = true - if (!this.mutated) { - return [2] - } - c = this.dc.anyClient() - operation = function () { - return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2, c.commitOrAbort(this.ctx, metadata, options)] - }) - }) - } - _a.label = 1 - case 1: - _a.trys.push([1, 3, , 8]) - return [4, operation()] - case 2: - _a.sent() - return [3, 8] - case 3: - e_2 = _a.sent() - if (!((0, client_1.isJwtExpired)(e_2) === true)) return [3, 6] - return [4, c.retryLogin(metadata, options)] - case 4: - _a.sent() - return [4, operation()] - case 5: - _a.sent() - return [3, 7] - case 6: - throw (0, util_1.isAbortedError)(e_2) ? errors_1.ERR_ABORTED : e_2 - case 7: - return [3, 8] - case 8: - return [2] - } - }) - }) - } - Txn.prototype.discard = function (metadata, options) { - return __awaiter(this, void 0, void 0, function () { - var c, operation, e_3 - var _this = this - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (this.finished) { - return [2] - } - this.finished = true - if (!this.mutated) { - return [2] - } - this.ctx.setAborted(true) - c = this.dc.anyClient() - operation = function () { - return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2, c.commitOrAbort(this.ctx, metadata, options)] - }) - }) - } - _a.label = 1 - case 1: - _a.trys.push([1, 3, , 8]) - return [4, operation()] - case 2: - _a.sent() - return [3, 8] - case 3: - e_3 = _a.sent() - if (!((0, client_1.isJwtExpired)(e_3) === true)) return [3, 6] - return [4, c.retryLogin(metadata, options)] - case 4: - _a.sent() - return [4, operation()] - case 5: - _a.sent() - return [3, 7] - case 6: - throw (0, util_1.isAbortedError)(e_3) ? errors_1.ERR_ABORTED : e_3 - case 7: - return [3, 8] - case 8: - return [2] - } - }) - }) - } - Txn.prototype.mergeContext = function (src) { - if (src === undefined) { - return - } - this.ctx.setHash(src.getHash()) - if (this.ctx.getStartTs() === 0) { - this.ctx.setStartTs(src.getStartTs()) - } else if (this.ctx.getStartTs() !== src.getStartTs()) { - throw new Error("StartTs mismatch") - } - for (var _i = 0, _a = src.getKeysList(); _i < _a.length; _i++) { - var key = _a[_i] - this.ctx.addKeys(key) - } - } - return Txn -})() -exports.Txn = Txn + (this && this.__generator) || + ((thisArg, body) => { + var _ = { + label: 0, + sent: () => { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [], + }, + f, + y, + t, + g = Object.create( + (typeof Iterator === "function" ? Iterator : Object).prototype, + ); + return ( + (g.next = verb(0)), + (g["throw"] = verb(1)), + (g["return"] = verb(2)), + typeof Symbol === "function" && + (g[Symbol.iterator] = function () { + return this; + }), + g + ); + function verb(n) { + return (v) => step([n, v]); + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while ((g && ((g = 0), op[0] && (_ = 0)), _)) + try { + if ( + ((f = 1), + y && + (t = + op[0] & 2 + ? y["return"] + : op[0] + ? y["throw"] || ((t = y["return"]) && t.call(y), 0) + : y.next) && + !(t = t.call(y, op[1])).done) + ) + return t; + if (((y = 0), t)) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if ( + !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && + (op[0] === 6 || op[0] === 2) + ) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Txn = void 0; +var messages = require("../generated/api_pb"); +var client_1 = require("./client"); +var errors_1 = require("./errors"); +var types = require("./types"); +var util_1 = require("./util"); +var Txn = (() => { + function Txn(dc, txnOpts) { + this.finished = false; + this.mutated = false; + this.useReadOnly = false; + this.useBestEffort = false; + this.dc = dc; + this.ctx = new messages.TxnContext(); + var defaultedTxnOpts = __assign( + { readOnly: false, bestEffort: false }, + txnOpts, + ); + this.useReadOnly = defaultedTxnOpts.readOnly; + this.useBestEffort = defaultedTxnOpts.bestEffort; + if (this.useBestEffort && !this.useReadOnly) { + this.dc.debug( + "Client attempted to query using best-effort without setting the transaction to read-only", + ); + throw errors_1.ERR_BEST_EFFORT_REQUIRED_READ_ONLY; + } + } + Txn.prototype.query = function (q, metadata, options) { + return this.queryWithVars(q, undefined, metadata, options); + }; + Txn.prototype.queryWithVars = function (q, vars, metadata, options) { + return __awaiter(this, void 0, void 0, function () { + var req, varsMap_1; + return __generator(this, function (_a) { + if (this.finished) { + this.dc.debug( + "Query request (ERR_FINISHED):\nquery = " + .concat(q, "\nvars = ") + .concat(vars), + ); + throw errors_1.ERR_FINISHED; + } + req = new messages.Request(); + req.setQuery(q); + req.setStartTs(this.ctx.getStartTs()); + req.setReadOnly(this.useReadOnly); + req.setBestEffort(this.useBestEffort); + if (vars !== undefined) { + varsMap_1 = req.getVarsMap(); + Object.keys(vars).forEach((key) => { + var value = vars[key]; + if (typeof value === "string" || value instanceof String) { + varsMap_1.set(key, value.toString()); + } + }); + } + return [2, this.doRequest(req, metadata, options)]; + }); + }); + }; + Txn.prototype.queryRDF = function (q, metadata, options) { + return this.queryRDFWithVars(q, undefined, metadata, options); + }; + Txn.prototype.queryRDFWithVars = function (q, vars, metadata, options) { + return __awaiter(this, void 0, void 0, function () { + var req, varsMap_2; + return __generator(this, function (_a) { + if (this.finished) { + this.dc.debug( + "Query request (ERR_FINISHED):\nquery = " + .concat(q, "\nvars = ") + .concat(vars), + ); + throw errors_1.ERR_FINISHED; + } + req = new messages.Request(); + req.setQuery(q); + req.setStartTs(this.ctx.getStartTs()); + req.setReadOnly(this.useReadOnly); + req.setBestEffort(this.useBestEffort); + req.setRespFormat(messages.Request.RespFormat.RDF); + if (vars !== undefined) { + varsMap_2 = req.getVarsMap(); + Object.keys(vars).forEach((key) => { + var value = vars[key]; + if (typeof value === "string" || value instanceof String) { + varsMap_2.set(key, value.toString()); + } + }); + } + return [2, this.doRequest(req, metadata, options)]; + }); + }); + }; + Txn.prototype.mutate = function (mu, metadata, options) { + return __awaiter(this, void 0, void 0, function () { + var req; + return __generator(this, function (_a) { + req = new messages.Request(); + req.setStartTs(this.ctx.getStartTs()); + req.setMutationsList([mu]); + req.setCommitNow(mu.getCommitNow()); + return [2, this.doRequest(req, metadata, options)]; + }); + }); + }; + Txn.prototype.doRequest = function (req, metadata, options) { + return __awaiter(this, void 0, void 0, function () { + var mutationList, resp, c, operation, _a, _b, e_1, _c, _d, _e; + var _this = this; + return __generator(this, function (_f) { + switch (_f.label) { + case 0: + mutationList = req.getMutationsList(); + if (this.finished) { + this.dc.debug( + "Do request (ERR_FINISHED):\nquery = " + .concat(req.getQuery(), "\nvars = ") + .concat(req.getVarsMap()), + ); + this.dc.debug( + "Do request (ERR_FINISHED):\nmutation = ".concat( + (0, util_1.stringifyMessage)(mutationList[0]), + ), + ); + throw errors_1.ERR_FINISHED; + } + if (mutationList.length > 0) { + if (this.useReadOnly) { + this.dc.debug( + "Do request (ERR_READ_ONLY):\nmutation = ".concat( + (0, util_1.stringifyMessage)(mutationList[0]), + ), + ); + throw errors_1.ERR_READ_ONLY; + } + this.mutated = true; + } + req.setStartTs(this.ctx.getStartTs()); + req.setHash(this.ctx.getHash()); + this.dc.debug( + "Do request:\n".concat((0, util_1.stringifyMessage)(req)), + ); + c = this.dc.anyClient(); + operation = () => + __awaiter(_this, void 0, void 0, function () { + return __generator(this, (_a) => [ + 2, + c.query(req, metadata, options), + ]); + }); + _f.label = 1; + case 1: + _f.trys.push([1, 3, , 11]); + _b = (_a = types).createResponse; + return [4, operation()]; + case 2: + resp = _b.apply(_a, [_f.sent()]); + return [3, 11]; + case 3: + e_1 = _f.sent(); + if (!((0, client_1.isJwtExpired)(e_1) === true)) return [3, 6]; + return [4, c.retryLogin(metadata, options)]; + case 4: + _f.sent(); + _d = (_c = types).createResponse; + return [4, operation()]; + case 5: + resp = _d.apply(_c, [_f.sent()]); + return [3, 10]; + case 6: + _f.trys.push([6, 8, , 9]); + return [4, this.discard(metadata, options)]; + case 7: + _f.sent(); + return [3, 9]; + case 8: + _e = _f.sent(); + return [3, 9]; + case 9: + throw (0, util_1.isAbortedError)(e_1) || + (0, util_1.isConflictError)(e_1) + ? errors_1.ERR_ABORTED + : e_1; + case 10: + return [3, 11]; + case 11: + if (req.getCommitNow()) { + this.finished = true; + } + this.mergeContext(resp.getTxn()); + this.dc.debug( + "Do request:\nresponse = ".concat( + (0, util_1.stringifyMessage)(resp), + ), + ); + return [2, resp]; + } + }); + }); + }; + Txn.prototype.commit = function (metadata, options) { + return __awaiter(this, void 0, void 0, function () { + var c, operation, e_2; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.finished) { + throw errors_1.ERR_FINISHED; + } + this.finished = true; + if (!this.mutated) { + return [2]; + } + c = this.dc.anyClient(); + operation = () => + __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, c.commitOrAbort(this.ctx, metadata, options)]; + }); + }); + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 8]); + return [4, operation()]; + case 2: + _a.sent(); + return [3, 8]; + case 3: + e_2 = _a.sent(); + if (!((0, client_1.isJwtExpired)(e_2) === true)) return [3, 6]; + return [4, c.retryLogin(metadata, options)]; + case 4: + _a.sent(); + return [4, operation()]; + case 5: + _a.sent(); + return [3, 7]; + case 6: + throw (0, util_1.isAbortedError)(e_2) ? errors_1.ERR_ABORTED : e_2; + case 7: + return [3, 8]; + case 8: + return [2]; + } + }); + }); + }; + Txn.prototype.discard = function (metadata, options) { + return __awaiter(this, void 0, void 0, function () { + var c, operation, e_3; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.finished) { + return [2]; + } + this.finished = true; + if (!this.mutated) { + return [2]; + } + this.ctx.setAborted(true); + c = this.dc.anyClient(); + operation = () => + __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2, c.commitOrAbort(this.ctx, metadata, options)]; + }); + }); + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 8]); + return [4, operation()]; + case 2: + _a.sent(); + return [3, 8]; + case 3: + e_3 = _a.sent(); + if (!((0, client_1.isJwtExpired)(e_3) === true)) return [3, 6]; + return [4, c.retryLogin(metadata, options)]; + case 4: + _a.sent(); + return [4, operation()]; + case 5: + _a.sent(); + return [3, 7]; + case 6: + throw (0, util_1.isAbortedError)(e_3) ? errors_1.ERR_ABORTED : e_3; + case 7: + return [3, 8]; + case 8: + return [2]; + } + }); + }); + }; + Txn.prototype.mergeContext = function (src) { + if (src === undefined) { + return; + } + this.ctx.setHash(src.getHash()); + if (this.ctx.getStartTs() === 0) { + this.ctx.setStartTs(src.getStartTs()); + } else if (this.ctx.getStartTs() !== src.getStartTs()) { + throw new Error("StartTs mismatch"); + } + for (var _i = 0, _a = src.getKeysList(); _i < _a.length; _i++) { + var key = _a[_i]; + this.ctx.addKeys(key); + } + }; + return Txn; +})(); +exports.Txn = Txn; diff --git a/lib/types.d.ts b/lib/types.d.ts index 94da375..95a0ae3 100644 --- a/lib/types.d.ts +++ b/lib/types.d.ts @@ -3,36 +3,38 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as messages from "../generated/api_pb" +import * as messages from "../generated/api_pb"; export declare class Payload extends messages.Payload { - getData(): any - getData_asB64(): string - getData_asU8(): Uint8Array - setData(value: any): void + getData(): any; + getData_asB64(): string; + getData_asU8(): Uint8Array; + setData(value: any): void; } -export declare function createPayload(oldPayload: messages.Payload): Payload +export declare function createPayload(oldPayload: messages.Payload): Payload; export declare class Response extends messages.Response { - getJson(): any - getJson_asB64(): string - getJson_asU8(): Uint8Array - setJson(value: any): void + getJson(): any; + getJson_asB64(): string; + getJson_asU8(): Uint8Array; + setJson(value: any): void; } -export declare function createResponse(oldResponse: messages.Response): Response +export declare function createResponse( + oldResponse: messages.Response, +): Response; export declare class Mutation extends messages.Mutation { - getSetJson(): any - getSetJson_asB64(): string - getSetJson_asU8(): Uint8Array - setSetJson(value: any): void - getDeleteJson(): any - getDeleteJson_asB64(): string - getDeleteJson_asU8(): Uint8Array - setDeleteJson(value: any): void - getSetNquads(): Uint8Array | string - getSetNquads_asB64(): string - getSetNquads_asU8(): Uint8Array - setSetNquads(value: Uint8Array | string): void - getDelNquads(): Uint8Array | string - getDelNquads_asB64(): string - getDelNquads_asU8(): Uint8Array - setDelNquads(value: Uint8Array | string): void + getSetJson(): any; + getSetJson_asB64(): string; + getSetJson_asU8(): Uint8Array; + setSetJson(value: any): void; + getDeleteJson(): any; + getDeleteJson_asB64(): string; + getDeleteJson_asU8(): Uint8Array; + setDeleteJson(value: any): void; + getSetNquads(): Uint8Array | string; + getSetNquads_asB64(): string; + getSetNquads_asU8(): Uint8Array; + setSetNquads(value: Uint8Array | string): void; + getDelNquads(): Uint8Array | string; + getDelNquads_asB64(): string; + getDelNquads_asU8(): Uint8Array; + setDelNquads(value: Uint8Array | string): void; } diff --git a/lib/types.js b/lib/types.js index a5ace61..6ea182a 100644 --- a/lib/types.js +++ b/lib/types.js @@ -1,282 +1,282 @@ -/* - * SPDX-FileCopyrightText: © Hypermode Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict" var __extends = - (this && this.__extends) || - (function () { - var extendStatics = function (d, b) { - extendStatics = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (d, b) { - d.__proto__ = b - }) || - function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p] - } - return extendStatics(d, b) - } - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null") - extendStatics(d, b) - function __() { - this.constructor = d - } - d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __()) - } - })() -Object.defineProperty(exports, "__esModule", { value: true }) -exports.Mutation = exports.Response = exports.Payload = void 0 -exports.createPayload = createPayload -exports.createResponse = createResponse -var jspb = require("google-protobuf") -var messages = require("../generated/api_pb") -var util_1 = require("./util") -var Payload = (function (_super) { - __extends(Payload, _super) - function Payload() { - return (_super !== null && _super.apply(this, arguments)) || this - } - Payload.prototype.getData = function () { - var jsonStr - var value = _super.prototype.getData.call(this) - if (value instanceof Uint8Array) { - jsonStr = (0, util_1.u8ToStr)(value) - } else { - jsonStr = (0, util_1.b64ToStr)(value) - } - return (0, util_1.strToJson)(jsonStr) - } - Payload.prototype.getData_asB64 = function () { - var value = _super.prototype.getData.call(this) - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - return value - } - Payload.prototype.getData_asU8 = function () { - var value = _super.prototype.getData.call(this) - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - return value - } - Payload.prototype.setData = function (value) { - if (value instanceof Uint8Array) { - _super.prototype.setData.call(this, value) - return - } - if (typeof value === "string" || value instanceof String) { - _super.prototype.setData.call(this, value.toString()) - return - } - var jsonStr = JSON.stringify(value) - _super.prototype.setData.call(this, (0, util_1.strToU8)(jsonStr)) - } - return Payload -})(messages.Payload) -exports.Payload = Payload + (this && this.__extends) || + (() => { + var extendStatics = (d, b) => { + extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + ((d, b) => { + d.__proto__ = b; + })) || + ((d, b) => { + for (var p in b) + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + }); + return extendStatics(d, b); + }; + return (d, b) => { + if (typeof b !== "function" && b !== null) + throw new TypeError( + "Class extends value " + String(b) + " is not a constructor or null", + ); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Mutation = exports.Response = exports.Payload = void 0; +exports.createPayload = createPayload; +exports.createResponse = createResponse; +var jspb = require("google-protobuf"); +var messages = require("../generated/api_pb"); +var util_1 = require("./util"); +var Payload = ((_super) => { + __extends(Payload, _super); + function Payload() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + Payload.prototype.getData = function () { + var jsonStr; + var value = _super.prototype.getData.call(this); + if (value instanceof Uint8Array) { + jsonStr = (0, util_1.u8ToStr)(value); + } else { + jsonStr = (0, util_1.b64ToStr)(value); + } + return (0, util_1.strToJson)(jsonStr); + }; + Payload.prototype.getData_asB64 = function () { + var value = _super.prototype.getData.call(this); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + return value; + }; + Payload.prototype.getData_asU8 = function () { + var value = _super.prototype.getData.call(this); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + return value; + }; + Payload.prototype.setData = function (value) { + if (value instanceof Uint8Array) { + _super.prototype.setData.call(this, value); + return; + } + if (typeof value === "string" || value instanceof String) { + _super.prototype.setData.call(this, value.toString()); + return; + } + var jsonStr = JSON.stringify(value); + _super.prototype.setData.call(this, (0, util_1.strToU8)(jsonStr)); + }; + return Payload; +})(messages.Payload); +exports.Payload = Payload; function createPayload(oldPayload) { - return messages.Payload.deserializeBinaryFromReader( - new Payload(), - new jspb.BinaryReader(oldPayload.serializeBinary()), - ) + return messages.Payload.deserializeBinaryFromReader( + new Payload(), + new jspb.BinaryReader(oldPayload.serializeBinary()), + ); } -var Response = (function (_super) { - __extends(Response, _super) - function Response() { - return (_super !== null && _super.apply(this, arguments)) || this - } - Response.prototype.getJson = function () { - var jsonStr - var value = _super.prototype.getJson.call(this) - if (value instanceof Uint8Array) { - jsonStr = (0, util_1.u8ToStr)(value) - } else { - jsonStr = (0, util_1.b64ToStr)(value) - } - return (0, util_1.strToJson)(jsonStr) - } - Response.prototype.getJson_asB64 = function () { - var value = _super.prototype.getJson.call(this) - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - return value - } - Response.prototype.getJson_asU8 = function () { - var value = _super.prototype.getJson.call(this) - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - return value - } - Response.prototype.setJson = function (value) { - if (value instanceof Uint8Array) { - _super.prototype.setJson.call(this, value) - return - } - if (typeof value === "string" || value instanceof String) { - _super.prototype.setJson.call(this, value.toString()) - return - } - var jsonStr = JSON.stringify(value) - _super.prototype.setJson.call(this, (0, util_1.strToU8)(jsonStr)) - } - return Response -})(messages.Response) -exports.Response = Response +var Response = ((_super) => { + __extends(Response, _super); + function Response() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + Response.prototype.getJson = function () { + var jsonStr; + var value = _super.prototype.getJson.call(this); + if (value instanceof Uint8Array) { + jsonStr = (0, util_1.u8ToStr)(value); + } else { + jsonStr = (0, util_1.b64ToStr)(value); + } + return (0, util_1.strToJson)(jsonStr); + }; + Response.prototype.getJson_asB64 = function () { + var value = _super.prototype.getJson.call(this); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + return value; + }; + Response.prototype.getJson_asU8 = function () { + var value = _super.prototype.getJson.call(this); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + return value; + }; + Response.prototype.setJson = function (value) { + if (value instanceof Uint8Array) { + _super.prototype.setJson.call(this, value); + return; + } + if (typeof value === "string" || value instanceof String) { + _super.prototype.setJson.call(this, value.toString()); + return; + } + var jsonStr = JSON.stringify(value); + _super.prototype.setJson.call(this, (0, util_1.strToU8)(jsonStr)); + }; + return Response; +})(messages.Response); +exports.Response = Response; function createResponse(oldResponse) { - return messages.Response.deserializeBinaryFromReader( - new Response(), - new jspb.BinaryReader(oldResponse.serializeBinary()), - ) + return messages.Response.deserializeBinaryFromReader( + new Response(), + new jspb.BinaryReader(oldResponse.serializeBinary()), + ); } -var Mutation = (function (_super) { - __extends(Mutation, _super) - function Mutation() { - return (_super !== null && _super.apply(this, arguments)) || this - } - Mutation.prototype.getSetJson = function () { - var jsonStr - var value = _super.prototype.getSetJson.call(this) - if (value instanceof Uint8Array) { - jsonStr = (0, util_1.u8ToStr)(value) - } else { - jsonStr = (0, util_1.b64ToStr)(value) - } - return (0, util_1.strToJson)(jsonStr) - } - Mutation.prototype.getSetJson_asB64 = function () { - var value = _super.prototype.getSetJson.call(this) - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - return value - } - Mutation.prototype.getSetJson_asU8 = function () { - var value = _super.prototype.getSetJson.call(this) - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - return value - } - Mutation.prototype.setSetJson = function (value) { - if (value instanceof Uint8Array) { - _super.prototype.setSetJson.call(this, value) - return - } - if (typeof value === "string" || value instanceof String) { - _super.prototype.setSetJson.call(this, value.toString()) - return - } - var jsonStr = JSON.stringify(value) - _super.prototype.setSetJson.call(this, (0, util_1.strToU8)(jsonStr)) - } - Mutation.prototype.getDeleteJson = function () { - var jsonStr - var value = _super.prototype.getDeleteJson.call(this) - if (value instanceof Uint8Array) { - jsonStr = (0, util_1.u8ToStr)(value) - } else { - jsonStr = (0, util_1.b64ToStr)(value) - } - return (0, util_1.strToJson)(jsonStr) - } - Mutation.prototype.getDeleteJson_asB64 = function () { - var value = _super.prototype.getDeleteJson.call(this) - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - return value - } - Mutation.prototype.getDeleteJson_asU8 = function () { - var value = _super.prototype.getDeleteJson.call(this) - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - return value - } - Mutation.prototype.setDeleteJson = function (value) { - if (value instanceof Uint8Array) { - _super.prototype.setDeleteJson.call(this, value) - return - } - if (typeof value === "string" || value instanceof String) { - _super.prototype.setDeleteJson.call(this, value.toString()) - return - } - var jsonStr = JSON.stringify(value) - _super.prototype.setDeleteJson.call(this, (0, util_1.strToU8)(jsonStr)) - } - Mutation.prototype.getSetNquads = function () { - var value = _super.prototype.getSetNquads.call(this) - if (value instanceof Uint8Array) { - return (0, util_1.u8ToStr)(value) - } - return (0, util_1.b64ToStr)(value) - } - Mutation.prototype.getSetNquads_asB64 = function () { - var value = _super.prototype.getSetNquads.call(this) - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - return value - } - Mutation.prototype.getSetNquads_asU8 = function () { - var value = _super.prototype.getSetNquads.call(this) - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - return value - } - Mutation.prototype.setSetNquads = function (value) { - if (value instanceof Uint8Array) { - _super.prototype.setSetNquads.call(this, value) - return - } - if ((0, util_1.isBase64)(value)) { - _super.prototype.setSetNquads.call(this, value) - return - } - _super.prototype.setSetNquads.call(this, (0, util_1.strToB64)(value)) - } - Mutation.prototype.getDelNquads = function () { - var value = _super.prototype.getDelNquads.call(this) - if (value instanceof Uint8Array) { - return (0, util_1.u8ToStr)(value) - } - return (0, util_1.b64ToStr)(value) - } - Mutation.prototype.getDelNquads_asB64 = function () { - var value = _super.prototype.getDelNquads.call(this) - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - return value - } - Mutation.prototype.getDelNquads_asU8 = function () { - var value = _super.prototype.getDelNquads.call(this) - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - return value - } - Mutation.prototype.setDelNquads = function (value) { - if (value instanceof Uint8Array) { - _super.prototype.setDelNquads.call(this, value) - return - } - if ((0, util_1.isBase64)(value)) { - _super.prototype.setDelNquads.call(this, value) - return - } - _super.prototype.setDelNquads.call(this, (0, util_1.strToB64)(value)) - } - return Mutation -})(messages.Mutation) -exports.Mutation = Mutation +var Mutation = ((_super) => { + __extends(Mutation, _super); + function Mutation() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + Mutation.prototype.getSetJson = function () { + var jsonStr; + var value = _super.prototype.getSetJson.call(this); + if (value instanceof Uint8Array) { + jsonStr = (0, util_1.u8ToStr)(value); + } else { + jsonStr = (0, util_1.b64ToStr)(value); + } + return (0, util_1.strToJson)(jsonStr); + }; + Mutation.prototype.getSetJson_asB64 = function () { + var value = _super.prototype.getSetJson.call(this); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + return value; + }; + Mutation.prototype.getSetJson_asU8 = function () { + var value = _super.prototype.getSetJson.call(this); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + return value; + }; + Mutation.prototype.setSetJson = function (value) { + if (value instanceof Uint8Array) { + _super.prototype.setSetJson.call(this, value); + return; + } + if (typeof value === "string" || value instanceof String) { + _super.prototype.setSetJson.call(this, value.toString()); + return; + } + var jsonStr = JSON.stringify(value); + _super.prototype.setSetJson.call(this, (0, util_1.strToU8)(jsonStr)); + }; + Mutation.prototype.getDeleteJson = function () { + var jsonStr; + var value = _super.prototype.getDeleteJson.call(this); + if (value instanceof Uint8Array) { + jsonStr = (0, util_1.u8ToStr)(value); + } else { + jsonStr = (0, util_1.b64ToStr)(value); + } + return (0, util_1.strToJson)(jsonStr); + }; + Mutation.prototype.getDeleteJson_asB64 = function () { + var value = _super.prototype.getDeleteJson.call(this); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + return value; + }; + Mutation.prototype.getDeleteJson_asU8 = function () { + var value = _super.prototype.getDeleteJson.call(this); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + return value; + }; + Mutation.prototype.setDeleteJson = function (value) { + if (value instanceof Uint8Array) { + _super.prototype.setDeleteJson.call(this, value); + return; + } + if (typeof value === "string" || value instanceof String) { + _super.prototype.setDeleteJson.call(this, value.toString()); + return; + } + var jsonStr = JSON.stringify(value); + _super.prototype.setDeleteJson.call(this, (0, util_1.strToU8)(jsonStr)); + }; + Mutation.prototype.getSetNquads = function () { + var value = _super.prototype.getSetNquads.call(this); + if (value instanceof Uint8Array) { + return (0, util_1.u8ToStr)(value); + } + return (0, util_1.b64ToStr)(value); + }; + Mutation.prototype.getSetNquads_asB64 = function () { + var value = _super.prototype.getSetNquads.call(this); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + return value; + }; + Mutation.prototype.getSetNquads_asU8 = function () { + var value = _super.prototype.getSetNquads.call(this); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + return value; + }; + Mutation.prototype.setSetNquads = function (value) { + if (value instanceof Uint8Array) { + _super.prototype.setSetNquads.call(this, value); + return; + } + if ((0, util_1.isBase64)(value)) { + _super.prototype.setSetNquads.call(this, value); + return; + } + _super.prototype.setSetNquads.call(this, (0, util_1.strToB64)(value)); + }; + Mutation.prototype.getDelNquads = function () { + var value = _super.prototype.getDelNquads.call(this); + if (value instanceof Uint8Array) { + return (0, util_1.u8ToStr)(value); + } + return (0, util_1.b64ToStr)(value); + }; + Mutation.prototype.getDelNquads_asB64 = function () { + var value = _super.prototype.getDelNquads.call(this); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + return value; + }; + Mutation.prototype.getDelNquads_asU8 = function () { + var value = _super.prototype.getDelNquads.call(this); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + return value; + }; + Mutation.prototype.setDelNquads = function (value) { + if (value instanceof Uint8Array) { + _super.prototype.setDelNquads.call(this, value); + return; + } + if ((0, util_1.isBase64)(value)) { + _super.prototype.setDelNquads.call(this, value); + return; + } + _super.prototype.setDelNquads.call(this, (0, util_1.strToB64)(value)); + }; + return Mutation; +})(messages.Mutation); +exports.Mutation = Mutation; diff --git a/lib/util.d.ts b/lib/util.d.ts index e12eef2..600801e 100644 --- a/lib/util.d.ts +++ b/lib/util.d.ts @@ -3,26 +3,26 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as jspb from "google-protobuf" +import type * as jspb from "google-protobuf"; export declare function errorCode(err: any): { - valid: boolean - code: number -} -export declare function isAbortedError(err: any): boolean -export declare function isConflictError(err: any): boolean -export declare function isUnauthenticatedError(err: any): boolean + valid: boolean; + code: number; +}; +export declare function isAbortedError(err: any): boolean; +export declare function isConflictError(err: any): boolean; +export declare function isUnauthenticatedError(err: any): boolean; export declare function promisify1( - f: (arg: A, cb: (err?: Error, res?: T) => void) => void, - thisContext?: any, -): (arg: A) => Promise + f: (arg: A, cb: (err?: Error, res?: T) => void) => void, + thisContext?: any, +): (arg: A) => Promise; export declare function promisify3( - f: (argA: A, argB: B, argC: C, cb: (err?: Error, res?: T) => void) => void, - thisContext?: any, -): (argA: A, argB: B, argC: C) => Promise -export declare function stringifyMessage(msg: jspb.Message): string -export { isBase64 } from "is-base64" -export declare function strToB64(str: string): string -export declare function strToU8(str: string): Uint8Array -export declare function b64ToStr(b64Str: string): string -export declare function u8ToStr(arr: Uint8Array): string -export declare function strToJson(jsonStr: string): any + f: (argA: A, argB: B, argC: C, cb: (err?: Error, res?: T) => void) => void, + thisContext?: any, +): (argA: A, argB: B, argC: C) => Promise; +export declare function stringifyMessage(msg: jspb.Message): string; +export { isBase64 } from "is-base64"; +export declare function strToB64(str: string): string; +export declare function strToU8(str: string): Uint8Array; +export declare function b64ToStr(b64Str: string): string; +export declare function u8ToStr(arr: Uint8Array): string; +export declare function strToJson(jsonStr: string): any; diff --git a/lib/util.js b/lib/util.js index 0877662..0393235 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,103 +1,95 @@ -/* - * SPDX-FileCopyrightText: © Hypermode Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict" -Object.defineProperty(exports, "__esModule", { value: true }) -exports.isBase64 = void 0 -exports.errorCode = errorCode -exports.isAbortedError = isAbortedError -exports.isConflictError = isConflictError -exports.isUnauthenticatedError = isUnauthenticatedError -exports.promisify1 = promisify1 -exports.promisify3 = promisify3 -exports.stringifyMessage = stringifyMessage -exports.strToB64 = strToB64 -exports.strToU8 = strToU8 -exports.b64ToStr = b64ToStr -exports.u8ToStr = u8ToStr -exports.strToJson = strToJson -var grpc = require("@grpc/grpc-js") +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isBase64 = void 0; +exports.errorCode = errorCode; +exports.isAbortedError = isAbortedError; +exports.isConflictError = isConflictError; +exports.isUnauthenticatedError = isUnauthenticatedError; +exports.promisify1 = promisify1; +exports.promisify3 = promisify3; +exports.stringifyMessage = stringifyMessage; +exports.strToB64 = strToB64; +exports.strToU8 = strToU8; +exports.b64ToStr = b64ToStr; +exports.u8ToStr = u8ToStr; +exports.strToJson = strToJson; +var grpc = require("@grpc/grpc-js"); function errorCode(err) { - if ( - err === undefined || - typeof err !== "object" || - !Object.prototype.hasOwnProperty.call(err, "code") || - typeof err.code !== "number" - ) { - return { - valid: false, - code: -1, - } - } - return { - valid: true, - code: err.code, - } + if ( + err === undefined || + typeof err !== "object" || + !Object.prototype.hasOwnProperty.call(err, "code") || + typeof err.code !== "number" + ) { + return { + valid: false, + code: -1, + }; + } + return { + valid: true, + code: err.code, + }; } function isAbortedError(err) { - var ec = errorCode(err) - return ec.valid && ec.code === grpc.status.ABORTED + var ec = errorCode(err); + return ec.valid && ec.code === grpc.status.ABORTED; } function isConflictError(err) { - var ec = errorCode(err) - return ( - ec.valid && (ec.code === grpc.status.ABORTED || ec.code === grpc.status.FAILED_PRECONDITION) - ) + var ec = errorCode(err); + return ( + ec.valid && + (ec.code === grpc.status.ABORTED || + ec.code === grpc.status.FAILED_PRECONDITION) + ); } function isUnauthenticatedError(err) { - var ec = errorCode(err) - return ec.valid && ec.code === grpc.status.UNAUTHENTICATED + var ec = errorCode(err); + return ec.valid && ec.code === grpc.status.UNAUTHENTICATED; } function promisify1(f, thisContext) { - return function (arg) { - return new Promise(function (resolve, reject) { - f.call(thisContext, arg, function (err, result) { - return err !== undefined && err !== null ? reject(err) : resolve(result) - }) - }) - } + return (arg) => + new Promise((resolve, reject) => { + f.call(thisContext, arg, (err, result) => + err !== undefined && err !== null ? reject(err) : resolve(result), + ); + }); } function promisify3(f, thisContext) { - return function (argA, argB, argC) { - return new Promise(function (resolve, reject) { - f.call(thisContext, argA, argB, argC, function (err, result) { - return err !== undefined && err !== null ? reject(err) : resolve(result) - }) - }) - } + return (argA, argB, argC) => + new Promise((resolve, reject) => { + f.call(thisContext, argA, argB, argC, (err, result) => + err !== undefined && err !== null ? reject(err) : resolve(result), + ); + }); } function stringifyMessage(msg) { - return JSON.stringify(msg.toObject()) + return JSON.stringify(msg.toObject()); } -var is_base64_1 = require("is-base64") +var is_base64_1 = require("is-base64"); Object.defineProperty(exports, "isBase64", { - enumerable: true, - get: function () { - return is_base64_1.isBase64 - }, -}) + enumerable: true, + get: () => is_base64_1.isBase64, +}); function strToB64(str) { - return Buffer.from(str, "utf8").toString("base64") + return Buffer.from(str, "utf8").toString("base64"); } function strToU8(str) { - return new Uint8Array(Buffer.from(str, "utf8")) + return new Uint8Array(Buffer.from(str, "utf8")); } function b64ToStr(b64Str) { - return Buffer.from(b64Str, "base64").toString() + return Buffer.from(b64Str, "base64").toString(); } function u8ToStr(arr) { - var buf = Buffer.from(arr.buffer) - if (arr.byteLength !== arr.buffer.byteLength) { - buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength) - } - return buf.toString() + var buf = Buffer.from(arr.buffer); + if (arr.byteLength !== arr.buffer.byteLength) { + buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength); + } + return buf.toString(); } function strToJson(jsonStr) { - try { - return JSON.parse(jsonStr) - } catch (_a) { - return {} - } + try { + return JSON.parse(jsonStr); + } catch (_a) { + return {}; + } } diff --git a/package-lock.json b/package-lock.json index c2d74e8..caf798b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5789 +1,4582 @@ { - "name": "dgraph-js", - "version": "24.2.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "dgraph-js", - "version": "24.2.0", - "license": "Apache-2.0", - "dependencies": { - "@grpc/grpc-js": "^1.12.5", - "@improbable-eng/grpc-web": "^0.15.0", - "@types/url-parse": "^1.4.11", - "google-protobuf": "^3.21.4", - "is-base64": "^1.1.0", - "url-parse": "^1.5.10" - }, - "devDependencies": { - "@trunkio/launcher": "^1.3.2", - "@types/google-protobuf": "^3.15.12", - "@types/jest": "^29.2.15", - "@types/node": "^22.10.5", - "grpc-tools": "^1.12.4", - "jest": "^29.7.0", - "ts-jest": "^29.2.5", - "typescript": "^5.7.2", - "typescript-eslint": "^8.20.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", - "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", - "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helpers": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7", - "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/core/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/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator/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/@babel/helper-compilation-targets": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", - "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/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/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", - "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", - "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", - "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", - "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.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/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.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", - "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.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", - "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "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.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", - "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/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/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "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/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", - "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/object-schema": "^2.1.5", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz", - "integrity": "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", - "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0", - "peer": true - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@eslint/js": { - "version": "9.20.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz", - "integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", - "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz", - "integrity": "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/core": "^0.10.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@grpc/grpc-js": { - "version": "1.12.6", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.6.tgz", - "integrity": "sha512-JXUj6PI0oqqzTGvKtzOkxtpsyPRNsrmhh41TtIz/zEB6J+AUiZZ0dxWzcMwO9Ns5rmSPuMdghlTbUuqIM48d3Q==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/proto-loader": "^0.7.13", - "@js-sdsl/ordered-map": "^4.4.2" - }, - "engines": { - "node": ">=12.10.0" - } - }, - "node_modules/@grpc/proto-loader": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", - "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.2.5", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", - "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@improbable-eng/grpc-web": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", - "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", - "license": "Apache-2.0", - "dependencies": { - "browser-headers": "^0.4.1" - }, - "peerDependencies": { - "google-protobuf": "^3.14.0" - } - }, - "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/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@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/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/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.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "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.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@js-sdsl/ordered-map": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", - "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", - "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", - "dev": true, - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "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, - "license": "MIT", - "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, - "license": "MIT", - "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, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, - "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/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "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/@trunkio/launcher": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@trunkio/launcher/-/launcher-1.3.4.tgz", - "integrity": "sha512-4LCsFVvZtKht7EkbOq5gDsRLIBOH05ycNxm1Vrv+YzY+uOK2HueLBcLU8oejV9v01LTtWjfLJxonIgTSo7lwng==", - "dev": true, - "license": "ISC", - "dependencies": { - "semver": "^7.5.4", - "tar": "^6.2.0", - "yaml": "^2.2.0" - }, - "bin": { - "trunk": "trunk.js" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "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.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-hulKeREDdLFesGQjl96+4aoJSHY5b2GRjagzzcqCfIrWhe5vkCqIvrLbqzBaI1q94Vg8DNJZZqTR5ocdWmWclg==" - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@types/google-protobuf": { - "version": "3.15.12", - "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.12.tgz", - "integrity": "sha512-40um9QqwHjRS92qnOaDpL7RmDK15NuZYo9HihiJRbYkMQZlWnuH8AdvbMy8/o6lgLmKbDUKa+OALCltHdbOTpQ==", - "dev": true - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "29.5.14", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", - "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@types/node": { - "version": "22.13.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz", - "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.20.0" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true - }, - "node_modules/@types/url-parse": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.11.tgz", - "integrity": "sha512-FKvKIqRaykZtd4n47LbK/W/5fhQQ1X7cxxzG9A48h0BGN+S04NH7ervcCjM8tyR0lyGru83FAHSmw2ObgKoESg==" - }, - "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.23.0.tgz", - "integrity": "sha512-vBz65tJgRrA1Q5gWlRfvoH+w943dq9K1p1yDBY2pc+a1nbBLZp7fB9+Hk8DaALUbzjqlMfgaqlVPT1REJdkt/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.23.0", - "@typescript-eslint/type-utils": "8.23.0", - "@typescript-eslint/utils": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.23.0.tgz", - "integrity": "sha512-h2lUByouOXFAlMec2mILeELUbME5SZRN/7R9Cw2RD2lRQQY08MWMM+PmVVKKJNK1aIwqTo9t/0CvOxwPbRIE2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.23.0", - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/typescript-estree": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.23.0.tgz", - "integrity": "sha512-OGqo7+dXHqI7Hfm+WqkZjKjsiRtFUQHPdGMXzk5mYXhJUedO7e/Y7i8AK3MyLMgZR93TX4bIzYrfyVjLC+0VSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.23.0.tgz", - "integrity": "sha512-iIuLdYpQWZKbiH+RkCGc6iu+VwscP5rCtQ1lyQ7TYuKLrcZoeJVpcLiG8DliXVkUxirW/PWlmS+d6yD51L9jvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.23.0", - "@typescript-eslint/utils": "8.23.0", - "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.23.0.tgz", - "integrity": "sha512-1sK4ILJbCmZOTt9k4vkoulT6/y5CHJ1qUYxqpF1K/DBAd8+ZUL4LlSCxOssuH5m4rUaaN0uS0HlVPvd45zjduQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.23.0.tgz", - "integrity": "sha512-LcqzfipsB8RTvH8FX24W4UUFk1bl+0yTOf9ZA08XngFwMg4Kj8A+9hwz8Cr/ZS4KwHrmo9PJiLZkOt49vPnuvQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/visitor-keys": "8.23.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/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, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.23.0.tgz", - "integrity": "sha512-uB/+PSo6Exu02b5ZEiVtmY6RVYO7YU5xqgzTIVZwTHvvK3HsL8tZZHFaTLFtRG3CsV4A5mhOv+NZx5BlhXPyIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.23.0", - "@typescript-eslint/types": "8.23.0", - "@typescript-eslint/typescript-estree": "8.23.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.23.0.tgz", - "integrity": "sha512-oWWhcWDLwDfu++BGTZcmXWqpwtkwb5o7fxUIGksMQQDSdPW9prsSnfIOZMlsj4vBOSrcnjIUZMiIjODgGosFhQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.23.0", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/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": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, - "license": "MIT", - "peer": 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, - "peer": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.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/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "peer": 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-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-escapes/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/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dependencies": { - "@types/color-name": "^1.1.1", - "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/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/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "deprecated": "This package is no longer supported.", - "dev": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "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/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, - "license": "MIT" - }, - "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-istanbul/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/babel-plugin-istanbul/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/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.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha512-9Y0g0Q8rmSt+H33DfKv7FOc3v+iRI+o1lbzt8jGcIosYW37IIW/2XVYq5NPdmaD5NQ59Nk26Kl/vZbwW9Fr8vg==", - "dev": true - }, - "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.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-headers": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", - "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==", - "license": "Apache-2.0" - }, - "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "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.30001663", - "electron-to-chromium": "^1.5.28", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" - }, - "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, - "license": "MIT", - "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/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.30001667", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", - "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", - "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/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/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.3.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", - "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", - "dev": true - }, - "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==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "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==", - "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==" - }, - "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/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/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/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/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/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "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.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", - "dev": true, - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "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, - "peer": 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/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-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, - "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/ejs": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", - "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.34", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.34.tgz", - "integrity": "sha512-/TZAiChbAflBNjCg+VvstbcwAtIL/VdMFO3NgRFIzBjpvPzWOTIbbO8kNb6RwU4bt9TP7K+3KqBKw/lOU+Y+GA==", - "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==" - }, - "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/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "engines": { - "node": ">=6" - } - }, - "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/eslint": { - "version": "9.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.0.tgz", - "integrity": "sha512-aL4F8167Hg4IvsW89ejnpTwx+B/UQRzJPGgbIOl+4XqffWsahVVsLEWoZvnrVuwpWmnRd7XeXmQI1zlKcFDteA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.11.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.20.0", - "@eslint/plugin-kit": "^0.2.5", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.1", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.2.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/@eslint/core": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz", - "integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/eslint/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, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "acorn": "^8.14.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "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.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "peer": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "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, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "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, - "peer": 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, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "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/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/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, - "license": "MIT", - "peer": true - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "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.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/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, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "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, - "peer": true - }, - "node_modules/fastq": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", - "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", - "dev": true, - "license": "ISC", - "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": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/filelist/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, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "peer": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", - "dev": true, - "license": "ISC", - "peer": true - }, - "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/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/fs-minipass/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/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/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "deprecated": "This package is no longer supported.", - "dev": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, - "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==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "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-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/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "peer": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/google-protobuf": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", - "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==" - }, - "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/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/grpc-tools": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.13.0.tgz", - "integrity": "sha512-7CbkJ1yWPfX0nHjbYG58BQThNhbICXBZynzCUxCb3LzX5X9B3hQbRY2STiRgIEiLILlK9fgl0z0QVGwPCdXf5g==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.5" - }, - "bin": { - "grpc_tools_node_protoc": "bin/protoc.js", - "grpc_tools_node_protoc_plugin": "bin/protoc_plugin.js" - } - }, - "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-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/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "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/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/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "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, - "license": "MIT", - "peer": 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-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/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/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "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/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-base64": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-base64/-/is-base64-1.1.0.tgz", - "integrity": "sha512-Nlhg7Z2dVC4/PTvIFkgVVNvPHSO2eR/Yd0XzhGiXCXEvWnptXlXa/clQ8aePPiMuxEGcWfzWbGw2Fe3d+Y3v1g==", - "bin": { - "is_base64": "bin/is-base64", - "is-base64": "bin/is-base64" - } - }, - "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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": "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==", - "engines": { - "node": ">=8" - } - }, - "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-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-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-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/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", - "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "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/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-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-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jake": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", - "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "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-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-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-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-runtime/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/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-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/jest/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/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/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, - "license": "MIT", - "peer": 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, - "license": "MIT", - "peer": 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, - "peer": 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, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "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, - "license": "MIT", - "peer": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "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, - "peer": 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": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "peer": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" - }, - "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, - "license": "MIT" - }, - "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, - "peer": true - }, - "node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, - "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": "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/make-dir/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/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, - "license": "ISC" - }, - "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, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.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/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/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/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/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/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": 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==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true - }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, - "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/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/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "deprecated": "This package is no longer supported.", - "dev": true, - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "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/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "peer": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "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": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "peer": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "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/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, - "license": "MIT", - "peer": 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/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "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/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": "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/pkg-dir/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/pkg-dir/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/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, - "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": "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/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, - "peer": 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/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/protobufjs": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz", - "integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" - }, - "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" - } - ], - "license": "MIT" - }, - "node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "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/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==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" - }, - "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-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-cwd/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-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, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=4" - } - }, - "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/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "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" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "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/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "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/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/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/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/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/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/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": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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/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/tar": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", - "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "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/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/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/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/ts-api-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz", - "integrity": "sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/ts-jest": { - "version": "29.2.5", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", - "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "^0.2.6", - "ejs": "^3.1.10", - "fast-json-stable-stringify": "^2.1.0", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "^4.1.2", - "make-error": "^1.3.6", - "semver": "^7.6.3", - "yargs-parser": "^21.1.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": 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, - "peer": 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/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.23.0.tgz", - "integrity": "sha512-/LBRo3HrXr5LxmrdYSOCvoAMm7p2jNizNfbIpCgvG4HMsnoprRUOce/+8VJ9BDYWW68rqIENE/haVLWPeFZBVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.23.0", - "@typescript-eslint/parser": "8.23.0", - "@typescript-eslint/utils": "8.23.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "license": "MIT" - }, - "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "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.2.0", - "picocolors": "^1.1.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, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "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/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/v8-to-istanbul": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", - "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", - "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/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "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/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/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "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/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/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "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/yaml": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", - "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", - "dev": true, - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "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/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==", - "engines": { - "node": ">=12" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "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" - } - } - } + "name": "dgraph-js", + "version": "24.2.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "dgraph-js", + "version": "24.2.0", + "license": "Apache-2.0", + "dependencies": { + "@grpc/grpc-js": "^1.12.5", + "@improbable-eng/grpc-web": "^0.15.0", + "@types/url-parse": "^1.4.11", + "google-protobuf": "^3.21.4", + "is-base64": "^1.1.0", + "url-parse": "^1.5.10" + }, + "devDependencies": { + "@trunkio/launcher": "^1.3.2", + "@types/google-protobuf": "^3.15.12", + "@types/jest": "^29.2.15", + "@types/node": "^22.10.5", + "grpc-tools": "^1.12.4", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "typescript": "^5.7.2" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "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/core/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/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/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/@babel/helper-compilation-targets": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/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/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.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/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.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "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.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "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.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/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/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "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/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@grpc/grpc-js": { + "version": "1.12.6", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.6.tgz", + "integrity": "sha512-JXUj6PI0oqqzTGvKtzOkxtpsyPRNsrmhh41TtIz/zEB6J+AUiZZ0dxWzcMwO9Ns5rmSPuMdghlTbUuqIM48d3Q==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", + "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "license": "Apache-2.0", + "dependencies": { + "browser-headers": "^0.4.1" + }, + "peerDependencies": { + "google-protobuf": "^3.14.0" + } + }, + "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/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@istanbuljs/load-nyc-config/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/@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/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/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.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "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.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", + "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", + "dev": true, + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "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/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "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/@trunkio/launcher": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@trunkio/launcher/-/launcher-1.3.4.tgz", + "integrity": "sha512-4LCsFVvZtKht7EkbOq5gDsRLIBOH05ycNxm1Vrv+YzY+uOK2HueLBcLU8oejV9v01LTtWjfLJxonIgTSo7lwng==", + "dev": true, + "license": "ISC", + "dependencies": { + "semver": "^7.5.4", + "tar": "^6.2.0", + "yaml": "^2.2.0" + }, + "bin": { + "trunk": "trunk.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "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.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-hulKeREDdLFesGQjl96+4aoJSHY5b2GRjagzzcqCfIrWhe5vkCqIvrLbqzBaI1q94Vg8DNJZZqTR5ocdWmWclg==" + }, + "node_modules/@types/google-protobuf": { + "version": "3.15.12", + "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.12.tgz", + "integrity": "sha512-40um9QqwHjRS92qnOaDpL7RmDK15NuZYo9HihiJRbYkMQZlWnuH8AdvbMy8/o6lgLmKbDUKa+OALCltHdbOTpQ==", + "dev": true + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/node": { + "version": "22.13.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz", + "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "node_modules/@types/url-parse": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.11.tgz", + "integrity": "sha512-FKvKIqRaykZtd4n47LbK/W/5fhQQ1X7cxxzG9A48h0BGN+S04NH7ervcCjM8tyR0lyGru83FAHSmw2ObgKoESg==" + }, + "node_modules/@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, + "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": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.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/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-escapes/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/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dependencies": { + "@types/color-name": "^1.1.1", + "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/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/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "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/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "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-istanbul/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/babel-plugin-istanbul/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/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.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha512-9Y0g0Q8rmSt+H33DfKv7FOc3v+iRI+o1lbzt8jGcIosYW37IIW/2XVYq5NPdmaD5NQ59Nk26Kl/vZbwW9Fr8vg==", + "dev": true + }, + "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.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==", + "license": "Apache-2.0" + }, + "node_modules/browserslist": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", + "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "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.30001663", + "electron-to-chromium": "^1.5.28", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + }, + "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, + "license": "MIT", + "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/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.30001667", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", + "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/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/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.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "dev": true + }, + "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==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "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==", + "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==" + }, + "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/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/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/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/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/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "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.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": 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/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-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "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": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "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/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.34", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.34.tgz", + "integrity": "sha512-/TZAiChbAflBNjCg+VvstbcwAtIL/VdMFO3NgRFIzBjpvPzWOTIbbO8kNb6RwU4bt9TP7K+3KqBKw/lOU+Y+GA==", + "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==" + }, + "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/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "engines": { + "node": ">=6" + } + }, + "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/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/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/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/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/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/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/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, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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/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/fs-minipass/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/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/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, + "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==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "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-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/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/google-protobuf": { + "version": "3.21.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", + "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==" + }, + "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/grpc-tools": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.13.0.tgz", + "integrity": "sha512-7CbkJ1yWPfX0nHjbYG58BQThNhbICXBZynzCUxCb3LzX5X9B3hQbRY2STiRgIEiLILlK9fgl0z0QVGwPCdXf5g==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.5" + }, + "bin": { + "grpc_tools_node_protoc": "bin/protoc.js", + "grpc_tools_node_protoc_plugin": "bin/protoc_plugin.js" + } + }, + "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-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/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "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/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/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/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/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "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/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-base64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-base64/-/is-base64-1.1.0.tgz", + "integrity": "sha512-Nlhg7Z2dVC4/PTvIFkgVVNvPHSO2eR/Yd0XzhGiXCXEvWnptXlXa/clQ8aePPiMuxEGcWfzWbGw2Fe3d+Y3v1g==", + "bin": { + "is_base64": "bin/is-base64", + "is-base64": "bin/is-base64" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "engines": { + "node": ">=8" + } + }, + "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-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-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/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "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/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-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-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "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-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-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-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-runtime/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/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-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/jest/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/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/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/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "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/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/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, + "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, + "license": "MIT" + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "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": "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/make-dir/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/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, + "license": "ISC" + }, + "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/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.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/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/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/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/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/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": 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==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "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/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/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "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/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-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/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/picocolors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "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/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": "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/pkg-dir/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/pkg-dir/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/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, + "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": "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/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/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/protobufjs": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz", + "integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "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/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==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "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-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-cwd/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/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/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "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/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/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/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/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/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/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": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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/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/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "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/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/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/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/ts-jest": { + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "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/typescript": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "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.2.0", + "picocolors": "^1.1.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "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/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "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/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "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/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": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "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/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/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "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/yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "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/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==", + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "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 9c4938f..1367277 100644 --- a/package.json +++ b/package.json @@ -1,50 +1,46 @@ { - "name": "dgraph-js", - "version": "24.2.0", - "description": "Official javascript client for Dgraph", - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "https://github.com/hypermodeinc/dgraph-js.git" - }, - "bugs": { - "url": "https://github.com/hypermodeinc/dgraph-js/issues" - }, - "homepage": "https://github.com/hypermodeinc/dgraph-js#readme", - "files": [ - "lib", - "generated" - ], - "main": "lib/index.js", - "typings": "lib/index.d.ts", - "scripts": { - "rm": "rm -fr node_modules package-lock.json yarn.lock", - "build:protos:msgs": "protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --js_out=import_style=commonjs,binary:./generated/ --ts_out=service=false:./generated/ --proto_path=./protos/ api.proto", - "build:protos:srvs": "grpc_tools_node_protoc --grpc_out=grpc_js:./generated/ --proto_path=./protos/ api.proto", - "build:protos": "yarn build:protos:msgs && yarn build:protos:srvs", - "build": "tsc -p tsconfig.release.json", - "build:watch": "tsc -w -p tsconfig.release.json", - "lint": "trunk check", - "test": "jest --coverage --runInBand", - "test:watch": "jest --watch" - }, - "devDependencies": { - "@trunkio/launcher": "^1.3.2", - "@types/google-protobuf": "^3.15.12", - "@types/node": "^22.10.5", - "grpc-tools": "^1.12.4", - "jest": "^29.7.0", - "ts-jest": "^29.2.5", - "@types/jest": "^29.2.15", - "typescript": "^5.7.2", - "typescript-eslint": "^8.20.0" - }, - "dependencies": { - "@grpc/grpc-js": "^1.12.5", - "@types/url-parse": "^1.4.11", - "google-protobuf": "^3.21.4", - "@improbable-eng/grpc-web": "^0.15.0", - "is-base64": "^1.1.0", - "url-parse": "^1.5.10" - } + "name": "dgraph-js", + "version": "24.2.0", + "description": "Official javascript client for Dgraph", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/hypermodeinc/dgraph-js.git" + }, + "bugs": { + "url": "https://github.com/hypermodeinc/dgraph-js/issues" + }, + "homepage": "https://github.com/hypermodeinc/dgraph-js#readme", + "files": ["lib", "generated"], + "main": "lib/index.js", + "typings": "lib/index.d.ts", + "scripts": { + "rm": "rm -fr node_modules package-lock.json yarn.lock", + "build:protos:msgs": "protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --js_out=import_style=commonjs,binary:./generated/ --ts_out=service=false:./generated/ --proto_path=./protos/ api.proto", + "build:protos:srvs": "grpc_tools_node_protoc --grpc_out=grpc_js:./generated/ --proto_path=./protos/ api.proto", + "build:protos": "yarn build:protos:msgs && yarn build:protos:srvs", + "build": "tsc -p tsconfig.release.json", + "build:watch": "tsc -w -p tsconfig.release.json", + "lint": "trunk check", + "test": "jest --coverage --runInBand", + "test:watch": "jest --watch" + }, + "devDependencies": { + "@trunkio/launcher": "^1.3.2", + "@types/google-protobuf": "^3.15.12", + "@types/node": "^22.10.5", + "grpc-tools": "^1.12.4", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "@types/jest": "^29.2.15", + "typescript": "^5.7.2" + }, + "dependencies": { + "@grpc/grpc-js": "^1.12.5", + "@types/url-parse": "^1.4.11", + "google-protobuf": "^3.21.4", + "@improbable-eng/grpc-web": "^0.15.0", + "is-base64": "^1.1.0", + "url-parse": "^1.5.10" + } } diff --git a/src/client.ts b/src/client.ts index 16f1af5..78b23a5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -3,124 +3,124 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" +import * as grpc from "@grpc/grpc-js"; -import * as messages from "../generated/api_pb" +import * as messages from "../generated/api_pb"; -import { DgraphClientStub } from "./clientStub" -import { ERR_NO_CLIENTS } from "./errors" -import { Txn, TxnOptions } from "./txn" -import * as types from "./types" -import { isUnauthenticatedError, stringifyMessage } from "./util" +import { DgraphClientStub } from "./clientStub"; +import { ERR_NO_CLIENTS } from "./errors"; +import { Txn, type TxnOptions } from "./txn"; +import * as types from "./types"; +import { isUnauthenticatedError, stringifyMessage } from "./util"; -const dgraphScheme = "dgraph:" -const sslModeDisable = "disable" -const sslModeRequire = "require" -const sslModeVerifyCA = "verify-ca" +const dgraphScheme = "dgraph:"; +const sslModeDisable = "disable"; +const sslModeRequire = "require"; +const sslModeVerifyCA = "verify-ca"; /** * Client is a transaction aware client to a set of Dgraph server instances. */ export class DgraphClient { - private readonly clients: DgraphClientStub[] - private debugMode: boolean = false - - /** - * Creates a new Client for interacting with the Dgraph store. - * - * The client can be backed by multiple connections (to the same server, or - * multiple servers in a cluster). - */ - constructor(...clients: DgraphClientStub[]) { - if (clients.length === 0) { - throw ERR_NO_CLIENTS - } - - this.clients = clients - } - - /** - * By setting various fields of api.Operation, alter can be used to do the - * following: - * - * 1. Modify the schema. - * - * 2. Drop a predicate. - * - * 3. Drop the database. - */ - public async alter( - op: messages.Operation, - metadata?: grpc.Metadata | null, - options?: grpc.CallOptions | null, - ): Promise { - this.debug(`Alter request:\n${stringifyMessage(op)}`) - - const c = this.anyClient() - let payload: messages.Payload - const operation = async () => c.alter(op, metadata, options) - try { - payload = await operation() - } catch (e) { - if (isJwtExpired(e) === true) { - await c.retryLogin(metadata, options) - payload = await operation() - } else { - throw e - } - } - const pl: types.Payload = types.createPayload(payload) - this.debug(`Alter response:\n${stringifyMessage(pl)}`) - - return pl - } - - /** - * newTxn creates a new transaction. - */ - public newTxn(txnOpts?: TxnOptions): Txn { - return new Txn(this, txnOpts) - } - - /** - * setDebugMode switches on/off the debug mode which prints helpful debug messages - * while performing alters, queries and mutations. - */ - public setDebugMode(mode: boolean = true): void { - this.debugMode = mode - } - - /** - * debug prints a message on the console if debug mode is switched on. - */ - public debug(msg: string): void { - if (this.debugMode) { - console.log(msg) - } - } - - public anyClient(): DgraphClientStub { - return this.clients[Math.floor(Math.random() * this.clients.length)] - } - - public close(): void { - this.clients.forEach((clientStub) => { - try { - clientStub.close() // Call the close method on each client stub - console.log("Closed client stub successfully") - } catch (error) { - console.error("Failed to close client stub:", error) - } - }) - } + private readonly clients: DgraphClientStub[]; + private debugMode = false; + + /** + * Creates a new Client for interacting with the Dgraph store. + * + * The client can be backed by multiple connections (to the same server, or + * multiple servers in a cluster). + */ + constructor(...clients: DgraphClientStub[]) { + if (clients.length === 0) { + throw ERR_NO_CLIENTS; + } + + this.clients = clients; + } + + /** + * By setting various fields of api.Operation, alter can be used to do the + * following: + * + * 1. Modify the schema. + * + * 2. Drop a predicate. + * + * 3. Drop the database. + */ + public async alter( + op: messages.Operation, + metadata?: grpc.Metadata | null, + options?: grpc.CallOptions | null, + ): Promise { + this.debug(`Alter request:\n${stringifyMessage(op)}`); + + const c = this.anyClient(); + let payload: messages.Payload; + const operation = async () => c.alter(op, metadata, options); + try { + payload = await operation(); + } catch (e) { + if (isJwtExpired(e) === true) { + await c.retryLogin(metadata, options); + payload = await operation(); + } else { + throw e; + } + } + const pl: types.Payload = types.createPayload(payload); + this.debug(`Alter response:\n${stringifyMessage(pl)}`); + + return pl; + } + + /** + * newTxn creates a new transaction. + */ + public newTxn(txnOpts?: TxnOptions): Txn { + return new Txn(this, txnOpts); + } + + /** + * setDebugMode switches on/off the debug mode which prints helpful debug messages + * while performing alters, queries and mutations. + */ + public setDebugMode(mode = true): void { + this.debugMode = mode; + } + + /** + * debug prints a message on the console if debug mode is switched on. + */ + public debug(msg: string): void { + if (this.debugMode) { + console.log(msg); + } + } + + public anyClient(): DgraphClientStub { + return this.clients[Math.floor(Math.random() * this.clients.length)]; + } + + public close(): void { + this.clients.forEach((clientStub) => { + try { + clientStub.close(); // Call the close method on each client stub + console.log("Closed client stub successfully"); + } catch (error) { + console.error("Failed to close client stub:", error); + } + }); + } } // isJwtExpired returns true if the error indicates that the jwt has expired. export function isJwtExpired(err: any): boolean { - if (!err) { - return false - } - return isUnauthenticatedError(err) + if (!err) { + return false; + } + return isUnauthenticatedError(err); } /** @@ -130,113 +130,128 @@ export function isJwtExpired(err: any): boolean { * This helper function doesn't run the mutation on the server. It must be done * by the user after the function returns. */ -export function deleteEdges(mu: types.Mutation, uid: string, ...predicates: string[]): void { - for (const predicate of predicates) { - const nquad = new messages.NQuad() - nquad.setSubject(uid) - nquad.setPredicate(predicate) - - const ov = new messages.Value() - ov.setDefaultVal("_STAR_ALL") - nquad.setObjectValue(ov) - - mu.addDel(nquad) - } +export function deleteEdges( + mu: types.Mutation, + uid: string, + ...predicates: string[] +): void { + for (const predicate of predicates) { + const nquad = new messages.NQuad(); + nquad.setSubject(uid); + nquad.setPredicate(predicate); + + const ov = new messages.Value(); + ov.setDefaultVal("_STAR_ALL"); + nquad.setObjectValue(ov); + + mu.addDel(nquad); + } } function addApiKeyToCredentials( - baseCreds: grpc.ChannelCredentials, - apiKey: string, + baseCreds: grpc.ChannelCredentials, + apiKey: string, ): grpc.ChannelCredentials { - const metaCreds = grpc.credentials.createFromMetadataGenerator((_, callback) => { - const metadata = new grpc.Metadata() - metadata.add("authorization", apiKey) - callback(null, metadata) - }) - return grpc.credentials.combineChannelCredentials(baseCreds, metaCreds) + const metaCreds = grpc.credentials.createFromMetadataGenerator( + (_, callback) => { + const metadata = new grpc.Metadata(); + metadata.add("authorization", apiKey); + callback(null, metadata); + }, + ); + return grpc.credentials.combineChannelCredentials(baseCreds, metaCreds); } function addBearerTokenToCredentials( - baseCreds: grpc.ChannelCredentials, - bearerToken: string, + baseCreds: grpc.ChannelCredentials, + bearerToken: string, ): grpc.ChannelCredentials { - const metaCreds = grpc.credentials.createFromMetadataGenerator((_, callback) => { - const metadata = new grpc.Metadata() - metadata.add("Authorization", `Bearer ${bearerToken}`) - callback(null, metadata) - }) - return grpc.credentials.combineChannelCredentials(baseCreds, metaCreds) + const metaCreds = grpc.credentials.createFromMetadataGenerator( + (_, callback) => { + const metadata = new grpc.Metadata(); + metadata.add("Authorization", `Bearer ${bearerToken}`); + callback(null, metadata); + }, + ); + return grpc.credentials.combineChannelCredentials(baseCreds, metaCreds); } export async function open(connStr: string): Promise { - const parsedUrl = new URL(connStr) - if (parsedUrl.protocol !== dgraphScheme) { - throw new Error("Invalid scheme: must start with dgraph://") - } - - const host = parsedUrl.hostname - const port = parsedUrl.port - if (!host) { - throw new Error("Invalid connection string: hostname required") - } - if (!port) { - throw new Error("Invalid connection string: port required") - } - - // Parse query parameters using searchParams - const queryParams: Record = {} - if (parsedUrl.searchParams) { - parsedUrl.searchParams.forEach((value, key) => { - queryParams[key] = value - }) - } - - if (queryParams.apikey && queryParams.bearertoken) { - throw new Error("Both apikey and bearertoken cannot be provided") - } - - let sslMode = queryParams.sslmode - if (sslMode === undefined) { - sslMode = sslModeDisable - } - - let credentials - switch (sslMode) { - case sslModeDisable: - credentials = grpc.credentials.createInsecure() - break - case sslModeRequire: - credentials = grpc.credentials.createSsl(null, null, null, { - checkServerIdentity: () => undefined, // Skip certificate verification - }) - break - case sslModeVerifyCA: - credentials = grpc.credentials.createSsl() // Use system CA for verification - break - default: - throw new Error(`Invalid SSL mode: ${sslMode} (must be one of disable, require, verify-ca)`) - } - - // Add API key or Bearer token to credentials if provided - if (queryParams.apikey) { - credentials = addApiKeyToCredentials(credentials, queryParams.apikey) - } else if (queryParams.bearertoken) { - credentials = addBearerTokenToCredentials(credentials, queryParams.bearertoken) - } - - const clientStub = new DgraphClientStub(`${host}:${port}`, credentials) - - if (parsedUrl.username != "") { - if (parsedUrl.password === "") { - throw new Error("Invalid connection string: password required when username is provided") - } else { - try { - await clientStub.login(parsedUrl.username, parsedUrl.password) - } catch (err) { - throw new Error(`Failed to sign in user: ${err.message}`) - } - } - } - - return new DgraphClient(clientStub) + const parsedUrl = new URL(connStr); + if (parsedUrl.protocol !== dgraphScheme) { + throw new Error("Invalid scheme: must start with dgraph://"); + } + + const host = parsedUrl.hostname; + const port = parsedUrl.port; + if (!host) { + throw new Error("Invalid connection string: hostname required"); + } + if (!port) { + throw new Error("Invalid connection string: port required"); + } + + // Parse query parameters using searchParams + const queryParams: Record = {}; + if (parsedUrl.searchParams) { + parsedUrl.searchParams.forEach((value, key) => { + queryParams[key] = value; + }); + } + + if (queryParams.apikey && queryParams.bearertoken) { + throw new Error("Both apikey and bearertoken cannot be provided"); + } + + let sslMode = queryParams.sslmode; + if (sslMode === undefined) { + sslMode = sslModeDisable; + } + + let credentials; + switch (sslMode) { + case sslModeDisable: + credentials = grpc.credentials.createInsecure(); + break; + case sslModeRequire: + credentials = grpc.credentials.createSsl(null, null, null, { + checkServerIdentity: () => undefined, // Skip certificate verification + }); + break; + case sslModeVerifyCA: + credentials = grpc.credentials.createSsl(); // Use system CA for verification + break; + default: + throw new Error( + `Invalid SSL mode: ${sslMode} (must be one of disable, require, verify-ca)`, + ); + } + + // Add API key or Bearer token to credentials if provided + if (queryParams.apikey) { + credentials = addApiKeyToCredentials(credentials, queryParams.apikey); + } else if (queryParams.bearertoken) { + credentials = addBearerTokenToCredentials( + credentials, + queryParams.bearertoken, + ); + } + + const clientStub = new DgraphClientStub(`${host}:${port}`, credentials); + + if (parsedUrl.username != "") { + if (parsedUrl.password === "") { + throw new Error( + "Invalid connection string: password required when username is provided", + ); + } else { + try { + await clientStub.login(parsedUrl.username, parsedUrl.password); + } catch (err) { + throw new Error(`Failed to sign in user: ${err.message}`); + } + } + } + + return new DgraphClient(clientStub); } diff --git a/src/clientStub.ts b/src/clientStub.ts index 1f56a39..4ad62b4 100644 --- a/src/clientStub.ts +++ b/src/clientStub.ts @@ -3,217 +3,240 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" +import * as grpc from "@grpc/grpc-js"; -import * as services from "../generated/api_grpc_pb" -import * as messages from "../generated/api_pb" +import * as services from "../generated/api_grpc_pb"; +import * as messages from "../generated/api_pb"; -import { ERR_REFRESH_JWT_EMPTY } from "./errors" -import { promisify1, promisify3 } from "./util" +import { ERR_REFRESH_JWT_EMPTY } from "./errors"; +import { promisify1, promisify3 } from "./util"; /** * Stub is a stub/client connecting to a single dgraph server instance. */ export class DgraphClientStub { - private readonly stub: services.DgraphClient - - private accessJwt: string = "" - private refreshJwt: string = "" - - private readonly promisified: { - login( - req: messages.LoginRequest, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - - alter( - op: messages.Operation, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - - query( - req: messages.Request, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - - mutate( - mu: messages.Mutation, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - - commitOrAbort( - ctx: messages.TxnContext, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - - checkVersion( - check: messages.Check, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise - - waitForReady(deadline: grpc.Deadline): Promise - } - - constructor(addr?: string, credentials?: grpc.ChannelCredentials, options?: object) { - if (addr === undefined) { - addr = "localhost:9080" - } - if (credentials === undefined) { - credentials = grpc.credentials.createInsecure() - } - - this.stub = new services.DgraphClient(addr, credentials, options) - this.promisified = { - login: promisify3(this.stub.login, this.stub), - alter: promisify3(this.stub.alter, this.stub), - query: promisify3(this.stub.query, this.stub), - mutate: promisify3(this.stub.mutate, this.stub), - commitOrAbort: promisify3(this.stub.commitOrAbort, this.stub), - checkVersion: promisify3(this.stub.checkVersion, this.stub), - waitForReady: promisify1(this.stub.waitForReady, this.stub), - } - } - - public async login( - userid?: string, - password?: string, - refreshJwt?: string, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - return this.loginIntoNamespace(userid, password, 0, refreshJwt, metadata, options) - } - - public async loginIntoNamespace( - userid?: string, - password?: string, - namespace?: number, - refreshJwt?: string, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - const req = new messages.LoginRequest() - if (userid !== undefined) { - req.setUserid(userid) - req.setPassword(password) - req.setNamespace(namespace) - } else if (refreshJwt !== undefined) { - // Use the caller-supplied refreshJwt - req.setRefreshToken(refreshJwt) - } else { - req.setRefreshToken(this.refreshJwt) - } - const resp = await this.promisified.login( - req, - this.ensureMetadata(metadata), - ensureCallOptions(options), - ) - const jwtResponse = messages.Jwt.deserializeBinary(resp.getJson_asU8()) - this.accessJwt = jwtResponse.getAccessJwt() - this.refreshJwt = jwtResponse.getRefreshJwt() - return jwtResponse - } - - public alter( - op: messages.Operation, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - return this.promisified.alter(op, this.ensureMetadata(metadata), ensureCallOptions(options)) - } - - public async retryLogin( - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - if (this.refreshJwt.length === 0) { - throw ERR_REFRESH_JWT_EMPTY - } - const req = new messages.LoginRequest() - req.setRefreshToken(this.refreshJwt) - const resp = await this.promisified.login( - req, - this.ensureMetadata(metadata), - ensureCallOptions(options), - ) - const jwtResponse = messages.Jwt.deserializeBinary(resp.getJson_asU8()) - this.accessJwt = jwtResponse.getAccessJwt() - this.refreshJwt = jwtResponse.getRefreshJwt() - return jwtResponse - } - - public query( - req: messages.Request, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - return this.promisified.query(req, this.ensureMetadata(metadata), ensureCallOptions(options)) - } - - public mutate( - mu: messages.Mutation, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - return this.promisified.mutate(mu, this.ensureMetadata(metadata), ensureCallOptions(options)) - } - - public commitOrAbort( - ctx: messages.TxnContext, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - return this.promisified.commitOrAbort( - ctx, - this.ensureMetadata(metadata), - ensureCallOptions(options), - ) - } - - public checkVersion( - check: messages.Check, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - return this.promisified.checkVersion( - check, - this.ensureMetadata(metadata), - ensureCallOptions(options), - ) - } - - public waitForReady(deadline: grpc.Deadline): Promise { - return this.promisified.waitForReady(deadline) - } - - public close(): void { - return this.stub.close() - } - - public grpcClient(): grpc.Client { - return this.stub - } - - private ensureMetadata(metadata?: grpc.Metadata): grpc.Metadata { - const newMeta = metadata === undefined ? new grpc.Metadata() : metadata - if (this.accessJwt !== "") { - newMeta.set("accessJwt", this.accessJwt) - } - return newMeta - } + private readonly stub: services.DgraphClient; + + private accessJwt = ""; + private refreshJwt = ""; + + private readonly promisified: { + login( + req: messages.LoginRequest, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + + alter( + op: messages.Operation, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + + query( + req: messages.Request, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + + mutate( + mu: messages.Mutation, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + + commitOrAbort( + ctx: messages.TxnContext, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + + checkVersion( + check: messages.Check, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise; + + waitForReady(deadline: grpc.Deadline): Promise; + }; + + constructor( + addr?: string, + credentials?: grpc.ChannelCredentials, + options?: object, + ) { + if (addr === undefined) { + addr = "localhost:9080"; + } + if (credentials === undefined) { + credentials = grpc.credentials.createInsecure(); + } + + this.stub = new services.DgraphClient(addr, credentials, options); + this.promisified = { + login: promisify3(this.stub.login, this.stub), + alter: promisify3(this.stub.alter, this.stub), + query: promisify3(this.stub.query, this.stub), + mutate: promisify3(this.stub.mutate, this.stub), + commitOrAbort: promisify3(this.stub.commitOrAbort, this.stub), + checkVersion: promisify3(this.stub.checkVersion, this.stub), + waitForReady: promisify1(this.stub.waitForReady, this.stub), + }; + } + + public async login( + userid?: string, + password?: string, + refreshJwt?: string, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + return this.loginIntoNamespace( + userid, + password, + 0, + refreshJwt, + metadata, + options, + ); + } + + public async loginIntoNamespace( + userid?: string, + password?: string, + namespace?: number, + refreshJwt?: string, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + const req = new messages.LoginRequest(); + if (userid !== undefined) { + req.setUserid(userid); + req.setPassword(password); + req.setNamespace(namespace); + } else if (refreshJwt !== undefined) { + // Use the caller-supplied refreshJwt + req.setRefreshToken(refreshJwt); + } else { + req.setRefreshToken(this.refreshJwt); + } + const resp = await this.promisified.login( + req, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + const jwtResponse = messages.Jwt.deserializeBinary(resp.getJson_asU8()); + this.accessJwt = jwtResponse.getAccessJwt(); + this.refreshJwt = jwtResponse.getRefreshJwt(); + return jwtResponse; + } + + public alter( + op: messages.Operation, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + return this.promisified.alter( + op, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + } + + public async retryLogin( + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + if (this.refreshJwt.length === 0) { + throw ERR_REFRESH_JWT_EMPTY; + } + const req = new messages.LoginRequest(); + req.setRefreshToken(this.refreshJwt); + const resp = await this.promisified.login( + req, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + const jwtResponse = messages.Jwt.deserializeBinary(resp.getJson_asU8()); + this.accessJwt = jwtResponse.getAccessJwt(); + this.refreshJwt = jwtResponse.getRefreshJwt(); + return jwtResponse; + } + + public query( + req: messages.Request, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + return this.promisified.query( + req, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + } + + public mutate( + mu: messages.Mutation, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + return this.promisified.mutate( + mu, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + } + + public commitOrAbort( + ctx: messages.TxnContext, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + return this.promisified.commitOrAbort( + ctx, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + } + + public checkVersion( + check: messages.Check, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + return this.promisified.checkVersion( + check, + this.ensureMetadata(metadata), + ensureCallOptions(options), + ); + } + + public waitForReady(deadline: grpc.Deadline): Promise { + return this.promisified.waitForReady(deadline); + } + + public close(): void { + return this.stub.close(); + } + + public grpcClient(): grpc.Client { + return this.stub; + } + + private ensureMetadata(metadata?: grpc.Metadata): grpc.Metadata { + const newMeta = metadata === undefined ? new grpc.Metadata() : metadata; + if (this.accessJwt !== "") { + newMeta.set("accessJwt", this.accessJwt); + } + return newMeta; + } } function ensureCallOptions(options?: grpc.CallOptions): grpc.CallOptions { - return options === undefined - ? { - propagate_flags: grpc.propagate.DEFAULTS, - credentials: undefined, - } - : options + return options === undefined + ? { + propagate_flags: grpc.propagate.DEFAULTS, + credentials: undefined, + } + : options; } diff --git a/src/clientStubFromSlash.ts b/src/clientStubFromSlash.ts index a65e57f..aac4794 100644 --- a/src/clientStubFromSlash.ts +++ b/src/clientStubFromSlash.ts @@ -3,41 +3,47 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" -import * as Url from "url-parse" -import { DgraphClientStub } from "./clientStub" +import * as grpc from "@grpc/grpc-js"; +import * as Url from "url-parse"; +import { DgraphClientStub } from "./clientStub"; -const PORT = "443" +const PORT = "443"; /** * @deprecated since v21.3 and will be removed in v21.07 release. * Please use {@link clientStubFromCloudEndpoint} instead. */ -export function clientStubFromSlashGraphQLEndpoint(graphqlEndpoint: string, apiKey: string) { - return clientStubFromCloudEndpoint(graphqlEndpoint, apiKey) +export function clientStubFromSlashGraphQLEndpoint( + graphqlEndpoint: string, + apiKey: string, +) { + return clientStubFromCloudEndpoint(graphqlEndpoint, apiKey); } /** * @deprecated * Please use {@link Open} instead. */ -export function clientStubFromCloudEndpoint(graphqlEndpoint: string, apiKey: string) { - const url = new Url(graphqlEndpoint) - const urlParts = url.host.split(".") - const firstHalf = urlParts[0] - const secondHalf = `${urlParts.splice(1).join(".")}:${PORT}` - const backenedURL = `${firstHalf}.grpc.${secondHalf}` +export function clientStubFromCloudEndpoint( + graphqlEndpoint: string, + apiKey: string, +) { + const url = new Url(graphqlEndpoint); + const urlParts = url.host.split("."); + const firstHalf = urlParts[0]; + const secondHalf = `${urlParts.splice(1).join(".")}:${PORT}`; + const backenedURL = `${firstHalf}.grpc.${secondHalf}`; - const metaCreds = grpc.credentials.createFromMetadataGenerator( - (_: object, callback: (_: undefined, metadata: grpc.Metadata) => void) => { - const metadata = new grpc.Metadata() - metadata.add("authorization", apiKey) - callback(undefined, metadata) - }, - ) - const credentials = grpc.credentials.combineChannelCredentials( - grpc.credentials.createSsl(), - metaCreds, - ) - return new DgraphClientStub(backenedURL, credentials) + const metaCreds = grpc.credentials.createFromMetadataGenerator( + (_: object, callback: (_: undefined, metadata: grpc.Metadata) => void) => { + const metadata = new grpc.Metadata(); + metadata.add("authorization", apiKey); + callback(undefined, metadata); + }, + ); + const credentials = grpc.credentials.combineChannelCredentials( + grpc.credentials.createSsl(), + metaCreds, + ); + return new DgraphClientStub(backenedURL, credentials); } diff --git a/src/dgraph.ts b/src/dgraph.ts index 814cf8f..a045a7c 100644 --- a/src/dgraph.ts +++ b/src/dgraph.ts @@ -4,32 +4,32 @@ */ // Export all the required message types. -export * from "./types" +export * from "./types"; export { - Operation, - Request, - TxnContext, - Check, - Version, - NQuad, - Value, - Facet, - Latency, -} from "../generated/api_pb" + Operation, + Request, + TxnContext, + Check, + Version, + NQuad, + Value, + Facet, + Latency, +} from "../generated/api_pb"; // Export DgraphClientStub class. -export * from "./clientStub" +export * from "./clientStub"; // Export DgraphClient class and deleteEdges function. -export * from "./client" +export * from "./client"; //Export clientStubFromSlashGraphQLEndpoint function. -export * from "./clientStubFromSlash" +export * from "./clientStubFromSlash"; // Export Txn class. -export * from "./txn" +export * from "./txn"; // Export error constants. -export * from "./errors" +export * from "./errors"; -export * as grpc from "@grpc/grpc-js" +export * as grpc from "@grpc/grpc-js"; diff --git a/src/errors.ts b/src/errors.ts index bf530f2..e2bebd0 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -3,11 +3,21 @@ * SPDX-License-Identifier: Apache-2.0 */ -export const ERR_NO_CLIENTS = new Error("No clients provided in DgraphClient constructor") -export const ERR_FINISHED = new Error("Transaction has already been committed or discarded") -export const ERR_ABORTED = new Error("Transaction has been aborted. Please retry") +export const ERR_NO_CLIENTS = new Error( + "No clients provided in DgraphClient constructor", +); +export const ERR_FINISHED = new Error( + "Transaction has already been committed or discarded", +); +export const ERR_ABORTED = new Error( + "Transaction has been aborted. Please retry", +); export const ERR_BEST_EFFORT_REQUIRED_READ_ONLY = new Error( - "Best effort only works for read-only queries", -) -export const ERR_READ_ONLY = new Error("Readonly transaction cannot run mutations or be committed") -export const ERR_REFRESH_JWT_EMPTY = new Error("refresh jwt should not be empty") + "Best effort only works for read-only queries", +); +export const ERR_READ_ONLY = new Error( + "Readonly transaction cannot run mutations or be committed", +); +export const ERR_REFRESH_JWT_EMPTY = new Error( + "refresh jwt should not be empty", +); diff --git a/src/index.ts b/src/index.ts index 1f33d7a..4d3889d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "./dgraph" +import * as dgraph from "./dgraph"; -export * from "./dgraph" -export default dgraph +export * from "./dgraph"; +export default dgraph; diff --git a/src/txn.ts b/src/txn.ts index 54900bb..1e546bd 100644 --- a/src/txn.ts +++ b/src/txn.ts @@ -3,24 +3,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" +import type * as grpc from "@grpc/grpc-js"; -import * as messages from "../generated/api_pb" +import * as messages from "../generated/api_pb"; -import { DgraphClient, isJwtExpired } from "./client" +import { type DgraphClient, isJwtExpired } from "./client"; import { - ERR_ABORTED, - ERR_BEST_EFFORT_REQUIRED_READ_ONLY, - ERR_FINISHED, - ERR_READ_ONLY, -} from "./errors" -import * as types from "./types" -import { isAbortedError, isConflictError, stringifyMessage } from "./util" + ERR_ABORTED, + ERR_BEST_EFFORT_REQUIRED_READ_ONLY, + ERR_FINISHED, + ERR_READ_ONLY, +} from "./errors"; +import * as types from "./types"; +import { isAbortedError, isConflictError, stringifyMessage } from "./util"; export type TxnOptions = { - readOnly?: boolean - bestEffort?: boolean -} + readOnly?: boolean; + bestEffort?: boolean; +}; /** * Txn is a single atomic transaction. @@ -37,300 +37,312 @@ export type TxnOptions = { * after calling commit. */ export class Txn { - private readonly dc: DgraphClient - private readonly ctx: messages.TxnContext - private finished: boolean = false - private mutated: boolean = false - private readonly useReadOnly: boolean = false - private readonly useBestEffort: boolean = false - - constructor(dc: DgraphClient, txnOpts?: TxnOptions) { - this.dc = dc - this.ctx = new messages.TxnContext() - const defaultedTxnOpts = { - readOnly: false, - bestEffort: false, - ...txnOpts, - } - this.useReadOnly = defaultedTxnOpts.readOnly - this.useBestEffort = defaultedTxnOpts.bestEffort - if (this.useBestEffort && !this.useReadOnly) { - this.dc.debug( - `Client attempted to query using best-effort without setting the transaction to read-only`, - ) - throw ERR_BEST_EFFORT_REQUIRED_READ_ONLY - } - } - - /** - * query sends a query to one of the connected Dgraph instances. If no mutations - * need to be made in the same transaction, it's convenient to chain the method, - * e.g. client.newTxn().query("..."). - */ - public query( - q: string, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - return this.queryWithVars(q, undefined, metadata, options) - } - - /** - * queryWithVars is like query, but allows a variable map to be used. This can - * provide safety against injection attacks. - */ - public async queryWithVars( - q: string, - vars?: { [k: string]: any }, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - if (this.finished) { - this.dc.debug(`Query request (ERR_FINISHED):\nquery = ${q}\nvars = ${vars}`) - throw ERR_FINISHED - } - - const req = new messages.Request() - req.setQuery(q) - req.setStartTs(this.ctx.getStartTs()) - req.setReadOnly(this.useReadOnly) - req.setBestEffort(this.useBestEffort) - - if (vars !== undefined) { - const varsMap = req.getVarsMap() - Object.keys(vars).forEach((key: string) => { - const value = vars[key] - if (typeof value === "string" || value instanceof String) { - varsMap.set(key, value.toString()) - } - }) - } - - return this.doRequest(req, metadata, options) - } - - /** - * query sends a query to one of the connected Dgraph instances. If no mutations - * need to be made in the same transaction, it's convenient to chain the method, - * e.g. client.newTxn().query("..."). - */ - public queryRDF( - q: string, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - return this.queryRDFWithVars(q, undefined, metadata, options) - } - - /** - * queryRDFWithVars is like query, but allows a variable map to be used. This can - * provide safety against injection attacks. - */ - public async queryRDFWithVars( - q: string, - vars?: { [k: string]: any }, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - if (this.finished) { - this.dc.debug(`Query request (ERR_FINISHED):\nquery = ${q}\nvars = ${vars}`) - throw ERR_FINISHED - } - - const req = new messages.Request() - req.setQuery(q) - req.setStartTs(this.ctx.getStartTs()) - req.setReadOnly(this.useReadOnly) - req.setBestEffort(this.useBestEffort) - req.setRespFormat(messages.Request.RespFormat.RDF) - - if (vars !== undefined) { - const varsMap = req.getVarsMap() - Object.keys(vars).forEach((key: string) => { - const value = vars[key] - if (typeof value === "string" || value instanceof String) { - varsMap.set(key, value.toString()) - } - }) - } - - return this.doRequest(req, metadata, options) - } - - /** - * mutate allows data stored on Dgraph instances to be modified. The fields in - * Mutation come in pairs, set and delete. Mutations can either be encoded as - * JSON or as RDFs. - * - * If commitNow is set, then this call will result in the transaction being - * committed. In this case, an explicit call to commit doesn't need to - * subsequently be made. - * - * If the mutation fails, then the transaction is discarded and all future - * operations on it will fail. - */ - public async mutate( - mu: types.Mutation, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - const req = new messages.Request() - req.setStartTs(this.ctx.getStartTs()) - req.setMutationsList([mu]) - req.setCommitNow(mu.getCommitNow()) - - return this.doRequest(req, metadata, options) - } - - public async doRequest( - req: messages.Request, - metadata?: grpc.Metadata, - options?: grpc.CallOptions, - ): Promise { - const mutationList = req.getMutationsList() - if (this.finished) { - this.dc.debug( - `Do request (ERR_FINISHED):\nquery = ${req.getQuery()}\nvars = ${req.getVarsMap()}`, - ) - this.dc.debug(`Do request (ERR_FINISHED):\nmutation = ${stringifyMessage(mutationList[0])}`) - throw ERR_FINISHED - } - - if (mutationList.length > 0) { - if (this.useReadOnly) { - this.dc.debug( - `Do request (ERR_READ_ONLY):\nmutation = ${stringifyMessage(mutationList[0])}`, - ) - throw ERR_READ_ONLY - } - this.mutated = true - } - - req.setStartTs(this.ctx.getStartTs()) - req.setHash(this.ctx.getHash()) - this.dc.debug(`Do request:\n${stringifyMessage(req)}`) - - let resp: types.Response - const c = this.dc.anyClient() - const operation = async () => c.query(req, metadata, options) - try { - resp = types.createResponse(await operation()) - } catch (e) { - if (isJwtExpired(e) === true) { - await c.retryLogin(metadata, options) - resp = types.createResponse(await operation()) - } else { - // Since a mutation error occurred, the txn should no longer be used (some - // mutations could have applied but not others, but we don't know which ones). - // Discarding the transaction enforces that the user cannot use the txn further. - try { - await this.discard(metadata, options) - } catch { - // Ignore error - user should see the original error. - } - - // Transaction could be aborted(status.ABORTED) if commitNow was true, or server - // could send a message that this mutation conflicts(status.FAILED_PRECONDITION) - // with another transaction. - throw isAbortedError(e) || isConflictError(e) ? ERR_ABORTED : e - } - } - - if (req.getCommitNow()) { - this.finished = true - } - - this.mergeContext(resp.getTxn()) - this.dc.debug(`Do request:\nresponse = ${stringifyMessage(resp)}`) - - return resp - } - - /** - * commit commits any mutations that have been made in the transaction. Once - * commit has been called, the lifespan of the transaction is complete. - * - * Errors could be thrown for various reasons. Notably, ERR_ABORTED could be - * thrown if transactions that modify the same data are being run concurrently. - * It's up to the user to decide if they wish to retry. In this case, the user - * should create a new transaction. - */ - public async commit(metadata?: grpc.Metadata, options?: grpc.CallOptions): Promise { - if (this.finished) { - throw ERR_FINISHED - } - - this.finished = true - if (!this.mutated) { - return - } - - const c = this.dc.anyClient() - const operation = async () => c.commitOrAbort(this.ctx, metadata, options) - try { - await operation() - } catch (e) { - if (isJwtExpired(e) === true) { - await c.retryLogin(metadata, options) - await operation() - } else { - throw isAbortedError(e) ? ERR_ABORTED : e - } - } - } - - /** - * discard cleans up the resources associated with an uncommitted transaction - * that contains mutations. It is a no-op on transactions that have already been - * committed or don't contain mutations. Therefore it is safe (and recommended) - * to call it in a finally block. - * - * In some cases, the transaction can't be discarded, e.g. the grpc connection - * is unavailable. In these cases, the server will eventually do the transaction - * clean up. - */ - public async discard(metadata?: grpc.Metadata, options?: grpc.CallOptions): Promise { - if (this.finished) { - return - } - - this.finished = true - if (!this.mutated) { - return - } - - this.ctx.setAborted(true) - const c = this.dc.anyClient() - const operation = async () => c.commitOrAbort(this.ctx, metadata, options) - try { - await operation() - } catch (e) { - if (isJwtExpired(e) === true) { - await c.retryLogin(metadata, options) - await operation() - } else { - throw isAbortedError(e) ? ERR_ABORTED : e - } - } - } - - private mergeContext(src?: messages.TxnContext): void { - if (src === undefined) { - // This condition will be true only if the server doesn't return a txn context after a query or mutation. - return - } - - this.ctx.setHash(src.getHash()) - - if (this.ctx.getStartTs() === 0) { - this.ctx.setStartTs(src.getStartTs()) - } else if (this.ctx.getStartTs() !== src.getStartTs()) { - // This condition should never be true. - throw new Error("StartTs mismatch") - } - - for (const key of src.getKeysList()) { - this.ctx.addKeys(key) - } - } + private readonly dc: DgraphClient; + private readonly ctx: messages.TxnContext; + private finished = false; + private mutated = false; + private readonly useReadOnly: boolean = false; + private readonly useBestEffort: boolean = false; + + constructor(dc: DgraphClient, txnOpts?: TxnOptions) { + this.dc = dc; + this.ctx = new messages.TxnContext(); + const defaultedTxnOpts = { + readOnly: false, + bestEffort: false, + ...txnOpts, + }; + this.useReadOnly = defaultedTxnOpts.readOnly; + this.useBestEffort = defaultedTxnOpts.bestEffort; + if (this.useBestEffort && !this.useReadOnly) { + this.dc.debug( + `Client attempted to query using best-effort without setting the transaction to read-only`, + ); + throw ERR_BEST_EFFORT_REQUIRED_READ_ONLY; + } + } + + /** + * query sends a query to one of the connected Dgraph instances. If no mutations + * need to be made in the same transaction, it's convenient to chain the method, + * e.g. client.newTxn().query("..."). + */ + public query( + q: string, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + return this.queryWithVars(q, undefined, metadata, options); + } + + /** + * queryWithVars is like query, but allows a variable map to be used. This can + * provide safety against injection attacks. + */ + public async queryWithVars( + q: string, + vars?: { [k: string]: any }, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + if (this.finished) { + this.dc.debug( + `Query request (ERR_FINISHED):\nquery = ${q}\nvars = ${vars}`, + ); + throw ERR_FINISHED; + } + + const req = new messages.Request(); + req.setQuery(q); + req.setStartTs(this.ctx.getStartTs()); + req.setReadOnly(this.useReadOnly); + req.setBestEffort(this.useBestEffort); + + if (vars !== undefined) { + const varsMap = req.getVarsMap(); + Object.keys(vars).forEach((key: string) => { + const value = vars[key]; + if (typeof value === "string" || value instanceof String) { + varsMap.set(key, value.toString()); + } + }); + } + + return this.doRequest(req, metadata, options); + } + + /** + * query sends a query to one of the connected Dgraph instances. If no mutations + * need to be made in the same transaction, it's convenient to chain the method, + * e.g. client.newTxn().query("..."). + */ + public queryRDF( + q: string, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + return this.queryRDFWithVars(q, undefined, metadata, options); + } + + /** + * queryRDFWithVars is like query, but allows a variable map to be used. This can + * provide safety against injection attacks. + */ + public async queryRDFWithVars( + q: string, + vars?: { [k: string]: any }, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + if (this.finished) { + this.dc.debug( + `Query request (ERR_FINISHED):\nquery = ${q}\nvars = ${vars}`, + ); + throw ERR_FINISHED; + } + + const req = new messages.Request(); + req.setQuery(q); + req.setStartTs(this.ctx.getStartTs()); + req.setReadOnly(this.useReadOnly); + req.setBestEffort(this.useBestEffort); + req.setRespFormat(messages.Request.RespFormat.RDF); + + if (vars !== undefined) { + const varsMap = req.getVarsMap(); + Object.keys(vars).forEach((key: string) => { + const value = vars[key]; + if (typeof value === "string" || value instanceof String) { + varsMap.set(key, value.toString()); + } + }); + } + + return this.doRequest(req, metadata, options); + } + + /** + * mutate allows data stored on Dgraph instances to be modified. The fields in + * Mutation come in pairs, set and delete. Mutations can either be encoded as + * JSON or as RDFs. + * + * If commitNow is set, then this call will result in the transaction being + * committed. In this case, an explicit call to commit doesn't need to + * subsequently be made. + * + * If the mutation fails, then the transaction is discarded and all future + * operations on it will fail. + */ + public async mutate( + mu: types.Mutation, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + const req = new messages.Request(); + req.setStartTs(this.ctx.getStartTs()); + req.setMutationsList([mu]); + req.setCommitNow(mu.getCommitNow()); + + return this.doRequest(req, metadata, options); + } + + public async doRequest( + req: messages.Request, + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + const mutationList = req.getMutationsList(); + if (this.finished) { + this.dc.debug( + `Do request (ERR_FINISHED):\nquery = ${req.getQuery()}\nvars = ${req.getVarsMap()}`, + ); + this.dc.debug( + `Do request (ERR_FINISHED):\nmutation = ${stringifyMessage(mutationList[0])}`, + ); + throw ERR_FINISHED; + } + + if (mutationList.length > 0) { + if (this.useReadOnly) { + this.dc.debug( + `Do request (ERR_READ_ONLY):\nmutation = ${stringifyMessage(mutationList[0])}`, + ); + throw ERR_READ_ONLY; + } + this.mutated = true; + } + + req.setStartTs(this.ctx.getStartTs()); + req.setHash(this.ctx.getHash()); + this.dc.debug(`Do request:\n${stringifyMessage(req)}`); + + let resp: types.Response; + const c = this.dc.anyClient(); + const operation = async () => c.query(req, metadata, options); + try { + resp = types.createResponse(await operation()); + } catch (e) { + if (isJwtExpired(e) === true) { + await c.retryLogin(metadata, options); + resp = types.createResponse(await operation()); + } else { + // Since a mutation error occurred, the txn should no longer be used (some + // mutations could have applied but not others, but we don't know which ones). + // Discarding the transaction enforces that the user cannot use the txn further. + try { + await this.discard(metadata, options); + } catch { + // Ignore error - user should see the original error. + } + + // Transaction could be aborted(status.ABORTED) if commitNow was true, or server + // could send a message that this mutation conflicts(status.FAILED_PRECONDITION) + // with another transaction. + throw isAbortedError(e) || isConflictError(e) ? ERR_ABORTED : e; + } + } + + if (req.getCommitNow()) { + this.finished = true; + } + + this.mergeContext(resp.getTxn()); + this.dc.debug(`Do request:\nresponse = ${stringifyMessage(resp)}`); + + return resp; + } + + /** + * commit commits any mutations that have been made in the transaction. Once + * commit has been called, the lifespan of the transaction is complete. + * + * Errors could be thrown for various reasons. Notably, ERR_ABORTED could be + * thrown if transactions that modify the same data are being run concurrently. + * It's up to the user to decide if they wish to retry. In this case, the user + * should create a new transaction. + */ + public async commit( + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + if (this.finished) { + throw ERR_FINISHED; + } + + this.finished = true; + if (!this.mutated) { + return; + } + + const c = this.dc.anyClient(); + const operation = async () => c.commitOrAbort(this.ctx, metadata, options); + try { + await operation(); + } catch (e) { + if (isJwtExpired(e) === true) { + await c.retryLogin(metadata, options); + await operation(); + } else { + throw isAbortedError(e) ? ERR_ABORTED : e; + } + } + } + + /** + * discard cleans up the resources associated with an uncommitted transaction + * that contains mutations. It is a no-op on transactions that have already been + * committed or don't contain mutations. Therefore it is safe (and recommended) + * to call it in a finally block. + * + * In some cases, the transaction can't be discarded, e.g. the grpc connection + * is unavailable. In these cases, the server will eventually do the transaction + * clean up. + */ + public async discard( + metadata?: grpc.Metadata, + options?: grpc.CallOptions, + ): Promise { + if (this.finished) { + return; + } + + this.finished = true; + if (!this.mutated) { + return; + } + + this.ctx.setAborted(true); + const c = this.dc.anyClient(); + const operation = async () => c.commitOrAbort(this.ctx, metadata, options); + try { + await operation(); + } catch (e) { + if (isJwtExpired(e) === true) { + await c.retryLogin(metadata, options); + await operation(); + } else { + throw isAbortedError(e) ? ERR_ABORTED : e; + } + } + } + + private mergeContext(src?: messages.TxnContext): void { + if (src === undefined) { + // This condition will be true only if the server doesn't return a txn context after a query or mutation. + return; + } + + this.ctx.setHash(src.getHash()); + + if (this.ctx.getStartTs() === 0) { + this.ctx.setStartTs(src.getStartTs()); + } else if (this.ctx.getStartTs() !== src.getStartTs()) { + // This condition should never be true. + throw new Error("StartTs mismatch"); + } + + for (const key of src.getKeysList()) { + this.ctx.addKeys(key); + } + } } diff --git a/src/types.ts b/src/types.ts index 8270674..a02e7ad 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,11 +3,18 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as jspb from "google-protobuf" +import * as jspb from "google-protobuf"; -import * as messages from "../generated/api_pb" +import * as messages from "../generated/api_pb"; -import { b64ToStr, isBase64, strToB64, strToJson, strToU8, u8ToStr } from "./util" +import { + b64ToStr, + isBase64, + strToB64, + strToJson, + strToU8, + u8ToStr, +} from "./util"; // Alter classes. @@ -15,56 +22,56 @@ import { b64ToStr, isBase64, strToB64, strToJson, strToU8, u8ToStr } from "./uti * Payload represents the return value of an alter operation. */ export class Payload extends messages.Payload { - public getData(): any { - let jsonStr: string - const value = super.getData() - if (value instanceof Uint8Array) { - jsonStr = u8ToStr(value) - } else { - jsonStr = b64ToStr(value) - } - - return strToJson(jsonStr) - } - - public getData_asB64(): string { - const value = super.getData() - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - - return value - } - - public getData_asU8(): Uint8Array { - const value = super.getData() - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - - return value - } - - public setData(value: any): void { - if (value instanceof Uint8Array) { - super.setData(value) - return - } - if (typeof value === "string" || value instanceof String) { - super.setData(value.toString()) - return - } - - const jsonStr = JSON.stringify(value) - super.setData(strToU8(jsonStr)) - } + public getData(): any { + let jsonStr: string; + const value = super.getData(); + if (value instanceof Uint8Array) { + jsonStr = u8ToStr(value); + } else { + jsonStr = b64ToStr(value); + } + + return strToJson(jsonStr); + } + + public getData_asB64(): string { + const value = super.getData(); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + + return value; + } + + public getData_asU8(): Uint8Array { + const value = super.getData(); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + + return value; + } + + public setData(value: any): void { + if (value instanceof Uint8Array) { + super.setData(value); + return; + } + if (typeof value === "string" || value instanceof String) { + super.setData(value.toString()); + return; + } + + const jsonStr = JSON.stringify(value); + super.setData(strToU8(jsonStr)); + } } export function createPayload(oldPayload: messages.Payload): Payload { - return messages.Payload.deserializeBinaryFromReader( - new Payload(), - new jspb.BinaryReader(oldPayload.serializeBinary()), - ) + return messages.Payload.deserializeBinaryFromReader( + new Payload(), + new jspb.BinaryReader(oldPayload.serializeBinary()), + ); } // Mutation and Query classes. @@ -73,56 +80,56 @@ export function createPayload(oldPayload: messages.Payload): Payload { * Response represents the return value of a mutation or query operations. */ export class Response extends messages.Response { - public getJson(): any { - let jsonStr: string - const value = super.getJson() - if (value instanceof Uint8Array) { - jsonStr = u8ToStr(value) - } else { - jsonStr = b64ToStr(value) - } - - return strToJson(jsonStr) - } - - public getJson_asB64(): string { - const value = super.getJson() - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - - return value - } - - public getJson_asU8(): Uint8Array { - const value = super.getJson() - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - - return value - } - - public setJson(value: any): void { - if (value instanceof Uint8Array) { - super.setJson(value) - return - } - if (typeof value === "string" || value instanceof String) { - super.setJson(value.toString()) - return - } - - const jsonStr = JSON.stringify(value) - super.setJson(strToU8(jsonStr)) - } + public getJson(): any { + let jsonStr: string; + const value = super.getJson(); + if (value instanceof Uint8Array) { + jsonStr = u8ToStr(value); + } else { + jsonStr = b64ToStr(value); + } + + return strToJson(jsonStr); + } + + public getJson_asB64(): string { + const value = super.getJson(); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + + return value; + } + + public getJson_asU8(): Uint8Array { + const value = super.getJson(); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + + return value; + } + + public setJson(value: any): void { + if (value instanceof Uint8Array) { + super.setJson(value); + return; + } + if (typeof value === "string" || value instanceof String) { + super.setJson(value.toString()); + return; + } + + const jsonStr = JSON.stringify(value); + super.setJson(strToU8(jsonStr)); + } } export function createResponse(oldResponse: messages.Response): Response { - return messages.Response.deserializeBinaryFromReader( - new Response(), - new jspb.BinaryReader(oldResponse.serializeBinary()), - ) + return messages.Response.deserializeBinaryFromReader( + new Response(), + new jspb.BinaryReader(oldResponse.serializeBinary()), + ); } // Mutate classes. @@ -131,171 +138,171 @@ export function createResponse(oldResponse: messages.Response): Response { * Mutation represents the request value of a muatate operation. */ export class Mutation extends messages.Mutation { - public getSetJson(): any { - let jsonStr: string - const value = super.getSetJson() - if (value instanceof Uint8Array) { - jsonStr = u8ToStr(value) - } else { - jsonStr = b64ToStr(value) - } - - return strToJson(jsonStr) - } - - public getSetJson_asB64(): string { - const value = super.getSetJson() - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - - return value - } - - public getSetJson_asU8(): Uint8Array { - const value = super.getSetJson() - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - - return value - } - - public setSetJson(value: any): void { - if (value instanceof Uint8Array) { - super.setSetJson(value) - return - } - if (typeof value === "string" || value instanceof String) { - super.setSetJson(value.toString()) - return - } - - const jsonStr = JSON.stringify(value) - super.setSetJson(strToU8(jsonStr)) - } - - public getDeleteJson(): any { - let jsonStr: string - const value = super.getDeleteJson() - if (value instanceof Uint8Array) { - jsonStr = u8ToStr(value) - } else { - jsonStr = b64ToStr(value) - } - - return strToJson(jsonStr) - } - - public getDeleteJson_asB64(): string { - const value = super.getDeleteJson() - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - - return value - } - - public getDeleteJson_asU8(): Uint8Array { - const value = super.getDeleteJson() - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - - return value - } - - public setDeleteJson(value: any): void { - if (value instanceof Uint8Array) { - super.setDeleteJson(value) - return - } - if (typeof value === "string" || value instanceof String) { - super.setDeleteJson(value.toString()) - return - } - - const jsonStr = JSON.stringify(value) - super.setDeleteJson(strToU8(jsonStr)) - } - - public getSetNquads(): Uint8Array | string { - const value = super.getSetNquads() - if (value instanceof Uint8Array) { - return u8ToStr(value) - } - - return b64ToStr(value) - } - - public getSetNquads_asB64(): string { - const value = super.getSetNquads() - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - - return value - } - - public getSetNquads_asU8(): Uint8Array { - const value = super.getSetNquads() - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - - return value - } - - public setSetNquads(value: Uint8Array | string): void { - if (value instanceof Uint8Array) { - super.setSetNquads(value) - return - } - if (isBase64(value)) { - super.setSetNquads(value) - return - } - - super.setSetNquads(strToB64(value)) - } - - public getDelNquads(): Uint8Array | string { - const value = super.getDelNquads() - if (value instanceof Uint8Array) { - return u8ToStr(value) - } - - return b64ToStr(value) - } - - public getDelNquads_asB64(): string { - const value = super.getDelNquads() - if (value instanceof Uint8Array) { - return jspb.Message.bytesAsB64(value) - } - - return value - } - - public getDelNquads_asU8(): Uint8Array { - const value = super.getDelNquads() - if (typeof value === "string" || value instanceof String) { - return jspb.Message.bytesAsU8(value.toString()) - } - - return value - } - - public setDelNquads(value: Uint8Array | string): void { - if (value instanceof Uint8Array) { - super.setDelNquads(value) - return - } - if (isBase64(value)) { - super.setDelNquads(value) - return - } - - super.setDelNquads(strToB64(value)) - } + public getSetJson(): any { + let jsonStr: string; + const value = super.getSetJson(); + if (value instanceof Uint8Array) { + jsonStr = u8ToStr(value); + } else { + jsonStr = b64ToStr(value); + } + + return strToJson(jsonStr); + } + + public getSetJson_asB64(): string { + const value = super.getSetJson(); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + + return value; + } + + public getSetJson_asU8(): Uint8Array { + const value = super.getSetJson(); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + + return value; + } + + public setSetJson(value: any): void { + if (value instanceof Uint8Array) { + super.setSetJson(value); + return; + } + if (typeof value === "string" || value instanceof String) { + super.setSetJson(value.toString()); + return; + } + + const jsonStr = JSON.stringify(value); + super.setSetJson(strToU8(jsonStr)); + } + + public getDeleteJson(): any { + let jsonStr: string; + const value = super.getDeleteJson(); + if (value instanceof Uint8Array) { + jsonStr = u8ToStr(value); + } else { + jsonStr = b64ToStr(value); + } + + return strToJson(jsonStr); + } + + public getDeleteJson_asB64(): string { + const value = super.getDeleteJson(); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + + return value; + } + + public getDeleteJson_asU8(): Uint8Array { + const value = super.getDeleteJson(); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + + return value; + } + + public setDeleteJson(value: any): void { + if (value instanceof Uint8Array) { + super.setDeleteJson(value); + return; + } + if (typeof value === "string" || value instanceof String) { + super.setDeleteJson(value.toString()); + return; + } + + const jsonStr = JSON.stringify(value); + super.setDeleteJson(strToU8(jsonStr)); + } + + public getSetNquads(): Uint8Array | string { + const value = super.getSetNquads(); + if (value instanceof Uint8Array) { + return u8ToStr(value); + } + + return b64ToStr(value); + } + + public getSetNquads_asB64(): string { + const value = super.getSetNquads(); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + + return value; + } + + public getSetNquads_asU8(): Uint8Array { + const value = super.getSetNquads(); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + + return value; + } + + public setSetNquads(value: Uint8Array | string): void { + if (value instanceof Uint8Array) { + super.setSetNquads(value); + return; + } + if (isBase64(value)) { + super.setSetNquads(value); + return; + } + + super.setSetNquads(strToB64(value)); + } + + public getDelNquads(): Uint8Array | string { + const value = super.getDelNquads(); + if (value instanceof Uint8Array) { + return u8ToStr(value); + } + + return b64ToStr(value); + } + + public getDelNquads_asB64(): string { + const value = super.getDelNquads(); + if (value instanceof Uint8Array) { + return jspb.Message.bytesAsB64(value); + } + + return value; + } + + public getDelNquads_asU8(): Uint8Array { + const value = super.getDelNquads(); + if (typeof value === "string" || value instanceof String) { + return jspb.Message.bytesAsU8(value.toString()); + } + + return value; + } + + public setDelNquads(value: Uint8Array | string): void { + if (value instanceof Uint8Array) { + super.setDelNquads(value); + return; + } + if (isBase64(value)) { + super.setDelNquads(value); + return; + } + + super.setDelNquads(strToB64(value)); + } } diff --git a/src/util.ts b/src/util.ts index 1f50cd1..41d9e30 100644 --- a/src/util.ts +++ b/src/util.ts @@ -3,107 +3,120 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" -import * as jspb from "google-protobuf" +import * as grpc from "@grpc/grpc-js"; +import type * as jspb from "google-protobuf"; export function errorCode(err: any): { valid: boolean; code: number } { - if ( - err === undefined || - typeof err !== "object" || - !Object.prototype.hasOwnProperty.call(err, "code") || - typeof (err as { code?: any }).code !== "number" - ) { - return { - valid: false, - code: -1, - } - } - - return { - valid: true, - code: (<{ code: number }>err).code, - } + if ( + err === undefined || + typeof err !== "object" || + !Object.prototype.hasOwnProperty.call(err, "code") || + typeof (err as { code?: any }).code !== "number" + ) { + return { + valid: false, + code: -1, + }; + } + + return { + valid: true, + code: (<{ code: number }>err).code, + }; } export function isAbortedError(err: any): boolean { - const ec = errorCode(err) - return ec.valid && ec.code === grpc.status.ABORTED + const ec = errorCode(err); + return ec.valid && ec.code === grpc.status.ABORTED; } export function isConflictError(err: any): boolean { - const ec = errorCode(err) - return ( - ec.valid && (ec.code === grpc.status.ABORTED || ec.code === grpc.status.FAILED_PRECONDITION) - ) + const ec = errorCode(err); + return ( + ec.valid && + (ec.code === grpc.status.ABORTED || + ec.code === grpc.status.FAILED_PRECONDITION) + ); } export function isUnauthenticatedError(err: any): boolean { - const ec = errorCode(err) - return ec.valid && ec.code === grpc.status.UNAUTHENTICATED + const ec = errorCode(err); + return ec.valid && ec.code === grpc.status.UNAUTHENTICATED; } export function promisify1( - f: (arg: A, cb: (err?: Error, res?: T) => void) => void, - thisContext?: any, + f: (arg: A, cb: (err?: Error, res?: T) => void) => void, + thisContext?: any, ): (arg: A) => Promise { - return (arg: A) => { - return new Promise( - (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void): void => { - f.call(thisContext, arg, (err?: Error, result?: T): void => - err !== undefined && err !== null ? reject(err) : resolve(result), - ) - }, - ) - } + return (arg: A) => { + return new Promise( + ( + resolve: (value?: T | PromiseLike) => void, + reject: (reason?: any) => void, + ): void => { + f.call(thisContext, arg, (err?: Error, result?: T): void => + err !== undefined && err !== null ? reject(err) : resolve(result), + ); + }, + ); + }; } export function promisify3( - f: (argA: A, argB: B, argC: C, cb: (err?: Error, res?: T) => void) => void, - thisContext?: any, + f: (argA: A, argB: B, argC: C, cb: (err?: Error, res?: T) => void) => void, + thisContext?: any, ): (argA: A, argB: B, argC: C) => Promise { - return (argA: A, argB: B, argC: C) => { - return new Promise( - (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void): void => { - f.call(thisContext, argA, argB, argC, (err?: Error, result?: T): void => - err !== undefined && err !== null ? reject(err) : resolve(result), - ) - }, - ) - } + return (argA: A, argB: B, argC: C) => { + return new Promise( + ( + resolve: (value?: T | PromiseLike) => void, + reject: (reason?: any) => void, + ): void => { + f.call( + thisContext, + argA, + argB, + argC, + (err?: Error, result?: T): void => + err !== undefined && err !== null ? reject(err) : resolve(result), + ); + }, + ); + }; } export function stringifyMessage(msg: jspb.Message): string { - return JSON.stringify(msg.toObject()) + return JSON.stringify(msg.toObject()); } -export { isBase64 } from "is-base64" +export { isBase64 } from "is-base64"; export function strToB64(str: string): string { - return Buffer.from(str, "utf8").toString("base64") + return Buffer.from(str, "utf8").toString("base64"); } export function strToU8(str: string): Uint8Array { - return new Uint8Array(Buffer.from(str, "utf8")) + return new Uint8Array(Buffer.from(str, "utf8")); } export function b64ToStr(b64Str: string): string { - return Buffer.from(b64Str, "base64").toString() + return Buffer.from(b64Str, "base64").toString(); } export function u8ToStr(arr: Uint8Array): string { - let buf = Buffer.from(arr.buffer) - if (arr.byteLength !== arr.buffer.byteLength) { - // Respect the "view", i.e. byteOffset and byteLength, without doing a copy. - buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength) - } + let buf = Buffer.from(arr.buffer); + if (arr.byteLength !== arr.buffer.byteLength) { + // Respect the "view", i.e. byteOffset and byteLength, without doing a copy. + buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength); + } - return buf.toString() + return buf.toString(); } export function strToJson(jsonStr: string): any { - try { - return JSON.parse(jsonStr) - } catch { - return {} - } + try { + return JSON.parse(jsonStr); + } catch { + return {}; + } } diff --git a/tests/client.spec.ts b/tests/client.spec.ts index 2a05b36..507f72a 100644 --- a/tests/client.spec.ts +++ b/tests/client.spec.ts @@ -3,38 +3,38 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../src" +import * as dgraph from "../src"; -import { createClient, createClientStub } from "./helper" +import { createClient, createClientStub } from "./helper"; describe("client", () => { - describe("constructor", () => { - it("should throw no clients error if no client stubs are passed", () => { - expect.assertions(1) - - try { - new dgraph.DgraphClient() - } catch (e) { - expect(e).toBe(dgraph.ERR_NO_CLIENTS) - } - }) - - it("should handle debug mode", () => { - console.log = jest.fn() - - const msg = "test message" - const client = createClient(createClientStub()) - - client.debug(msg) - expect(console.log).not.toHaveBeenCalled() - - client.setDebugMode() - client.debug(msg) - expect(console.log).toHaveBeenCalledTimes(1) - - client.setDebugMode(false) - client.debug(msg) - expect(console.log).toHaveBeenCalledTimes(1) - }) - }) -}) + describe("constructor", () => { + it("should throw no clients error if no client stubs are passed", () => { + expect.assertions(1); + + try { + new dgraph.DgraphClient(); + } catch (e) { + expect(e).toBe(dgraph.ERR_NO_CLIENTS); + } + }); + + it("should handle debug mode", () => { + console.log = jest.fn(); + + const msg = "test message"; + const client = createClient(createClientStub()); + + client.debug(msg); + expect(console.log).not.toHaveBeenCalled(); + + client.setDebugMode(); + client.debug(msg); + expect(console.log).toHaveBeenCalledTimes(1); + + client.setDebugMode(false); + client.debug(msg); + expect(console.log).toHaveBeenCalledTimes(1); + }); + }); +}); diff --git a/tests/clientStub.spec.ts b/tests/clientStub.spec.ts index 1b00988..339d2f3 100644 --- a/tests/clientStub.spec.ts +++ b/tests/clientStub.spec.ts @@ -3,78 +3,95 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" +import * as grpc from "@grpc/grpc-js"; -import * as dgraph from "../src" +import * as dgraph from "../src"; -import { SERVER_ADDR, SERVER_CREDENTIALS, setup } from "./helper" +import { SERVER_ADDR, SERVER_CREDENTIALS, setup } from "./helper"; function validateVersionObject(version: dgraph.Version) { - const tag = version.getTag() - expect(typeof tag).toEqual("string") - expect(tag).toBeDefined() + const tag = version.getTag(); + expect(typeof tag).toEqual("string"); + expect(tag).toBeDefined(); } async function checkVersion(stub: dgraph.DgraphClientStub): Promise { - validateVersionObject(await stub.checkVersion(new dgraph.Check())) + validateVersionObject(await stub.checkVersion(new dgraph.Check())); } describe("clientStub", () => { - describe("login", () => { - it("Really should login", async () => { - const client = await setup() - const stub = client.anyClient() + describe("login", () => { + it("Really should login", async () => { + const client = await setup(); + const stub = client.anyClient(); - await expect(stub.login("groot", "password")).resolves.toBeDefined() - }) - }) + await expect(stub.login("groot", "password")).resolves.toBeDefined(); + }); + }); - describe("checkVersion", () => { - it("should check version", async () => { - const client = await setup() - await checkVersion(client.anyClient()) - }) + describe("checkVersion", () => { + it("should check version", async () => { + const client = await setup(); + await checkVersion(client.anyClient()); + }); - it("should check version with metadata", async () => { - const clientStub = new dgraph.DgraphClientStub(SERVER_ADDR, SERVER_CREDENTIALS) - validateVersionObject(await clientStub.checkVersion(new dgraph.Check(), new grpc.Metadata())) - }) + it("should check version with metadata", async () => { + const clientStub = new dgraph.DgraphClientStub( + SERVER_ADDR, + SERVER_CREDENTIALS, + ); + validateVersionObject( + await clientStub.checkVersion(new dgraph.Check(), new grpc.Metadata()), + ); + }); - it("should check version with call options", async () => { - const clientStub = new dgraph.DgraphClientStub(SERVER_ADDR, SERVER_CREDENTIALS) - const p = clientStub.checkVersion(new dgraph.Check(), undefined, { - credentials: undefined, - deadline: 0, - propagate_flags: grpc.propagate.DEFAULTS, - }) + it("should check version with call options", async () => { + const clientStub = new dgraph.DgraphClientStub( + SERVER_ADDR, + SERVER_CREDENTIALS, + ); + const p = clientStub.checkVersion(new dgraph.Check(), undefined, { + credentials: undefined, + deadline: 0, + propagate_flags: grpc.propagate.DEFAULTS, + }); - await expect(p).rejects.toBeDefined() - }) - }) + await expect(p).rejects.toBeDefined(); + }); + }); - describe("waitForReady", () => { - it("should provide a promisified version of grpc.Client#waitForReady", async () => { - const clientStub = new dgraph.DgraphClientStub(SERVER_ADDR, SERVER_CREDENTIALS) - await clientStub.waitForReady(Date.now() + 500) - await checkVersion(clientStub) - }) - }) + describe("waitForReady", () => { + it("should provide a promisified version of grpc.Client#waitForReady", async () => { + const clientStub = new dgraph.DgraphClientStub( + SERVER_ADDR, + SERVER_CREDENTIALS, + ); + await clientStub.waitForReady(Date.now() + 500); + await checkVersion(clientStub); + }); + }); - describe("close", () => { - it("should close channel", async () => { - const clientStub = new dgraph.DgraphClientStub(SERVER_ADDR, SERVER_CREDENTIALS) - clientStub.close() - const p = clientStub.checkVersion(new dgraph.Check()) - await expect(p).rejects.toBeDefined() - }) - }) + describe("close", () => { + it("should close channel", async () => { + const clientStub = new dgraph.DgraphClientStub( + SERVER_ADDR, + SERVER_CREDENTIALS, + ); + clientStub.close(); + const p = clientStub.checkVersion(new dgraph.Check()); + await expect(p).rejects.toBeDefined(); + }); + }); - describe("grpcClient", () => { - it("should close channel if grpc client is closed", async () => { - const clientStub = new dgraph.DgraphClientStub(SERVER_ADDR, SERVER_CREDENTIALS) - clientStub.grpcClient().close() - const p = clientStub.checkVersion(new dgraph.Check()) - await expect(p).rejects.toBeDefined() - }) - }) -}) + describe("grpcClient", () => { + it("should close channel if grpc client is closed", async () => { + const clientStub = new dgraph.DgraphClientStub( + SERVER_ADDR, + SERVER_CREDENTIALS, + ); + clientStub.grpcClient().close(); + const p = clientStub.checkVersion(new dgraph.Check()); + await expect(p).rejects.toBeDefined(); + }); + }); +}); diff --git a/tests/helper.ts b/tests/helper.ts index 68833b9..b19ad9d 100644 --- a/tests/helper.ts +++ b/tests/helper.ts @@ -3,68 +3,75 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" +import * as grpc from "@grpc/grpc-js"; -import * as dgraph from "../src" +import * as dgraph from "../src"; -export const SERVER_ADDR = process.env.DGRAPH_SERVER_ADDR || "localhost:9080" -export const SERVER_CREDENTIALS = grpc.credentials.createInsecure() +export const SERVER_ADDR = process.env.DGRAPH_SERVER_ADDR || "localhost:9080"; +export const SERVER_CREDENTIALS = grpc.credentials.createInsecure(); export function createClientStub(): dgraph.DgraphClientStub { - return new dgraph.DgraphClientStub(SERVER_ADDR, SERVER_CREDENTIALS) + return new dgraph.DgraphClientStub(SERVER_ADDR, SERVER_CREDENTIALS); } -export function createClient(clientStub: dgraph.DgraphClientStub): dgraph.DgraphClient { - return new dgraph.DgraphClient(clientStub) +export function createClient( + clientStub: dgraph.DgraphClientStub, +): dgraph.DgraphClient { + return new dgraph.DgraphClient(clientStub); } -export function setSchema(c: dgraph.DgraphClient, schema: string): Promise { - const op = new dgraph.Operation() - op.setSchema(schema) - return c.alter(op) +export function setSchema( + c: dgraph.DgraphClient, + schema: string, +): Promise { + const op = new dgraph.Operation(); + op.setSchema(schema); + return c.alter(op); } export function dropAll(c: dgraph.DgraphClient): Promise { - const op = new dgraph.Operation() - op.setDropAll(true) - return c.alter(op) + const op = new dgraph.Operation(); + op.setDropAll(true); + return c.alter(op); } export async function setup(): Promise { - const stub = new dgraph.DgraphClientStub(SERVER_ADDR, SERVER_CREDENTIALS) - await stub.login("groot", "password") + const stub = new dgraph.DgraphClientStub(SERVER_ADDR, SERVER_CREDENTIALS); + await stub.login("groot", "password"); - const c = new dgraph.DgraphClient(stub) + const c = new dgraph.DgraphClient(stub); - await dropAll(c) - return c + await dropAll(c); + return c; } export function wait(time: number): Promise { - return new Promise((resolve: (value?: void | PromiseLike) => void): void => { - setTimeout(resolve, time) - }) + return new Promise( + (resolve: (value?: void | PromiseLike) => void): void => { + setTimeout(resolve, time); + }, + ); } export async function tryUpsert( - client: dgraph.DgraphClient, - query: string, - mutation: dgraph.Mutation, - blankNodeLabel: string, + client: dgraph.DgraphClient, + query: string, + mutation: dgraph.Mutation, + blankNodeLabel: string, ): Promise { - const txn = client.newTxn() + const txn = client.newTxn(); - const req = new dgraph.Request() - req.setQuery(query) - req.setMutationsList([mutation]) - req.setCommitNow(true) + const req = new dgraph.Request(); + req.setQuery(query); + req.setMutationsList([mutation]); + req.setCommitNow(true); - try { - // Update account only if matching uid found. - const response = await txn.doRequest(req) - const uid = response.getUidsMap().get(blankNodeLabel) - expect(uid).not.toEqual("") - } finally { - await txn.discard() - } + try { + // Update account only if matching uid found. + const response = await txn.doRequest(req); + const uid = response.getUidsMap().get(blankNodeLabel); + expect(uid).not.toEqual(""); + } finally { + await txn.discard(); + } } diff --git a/tests/integration/acctUpsert.spec.ts b/tests/integration/acctUpsert.spec.ts index f79b239..59255cf 100644 --- a/tests/integration/acctUpsert.spec.ts +++ b/tests/integration/acctUpsert.spec.ts @@ -3,179 +3,181 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { setSchema, setup } from "../helper" +import { setSchema, setup } from "../helper"; -const concurrency = 3 -const timeout = 5 * 60 * 1000 // 5 minutes in milliseconds +const concurrency = 3; +const timeout = 5 * 60 * 1000; // 5 minutes in milliseconds -jest.setTimeout(timeout * 2) +jest.setTimeout(timeout * 2); -let client: dgraph.DgraphClient +let client: dgraph.DgraphClient; -const firsts = ["Paul", "Eric", "Jack", "John", "Martin"] -const lasts = ["Brown", "Smith", "Robinson", "Waters", "Taylor"] -const ages = [20, 25, 30, 35] +const firsts = ["Paul", "Eric", "Jack", "John", "Martin"]; +const lasts = ["Brown", "Smith", "Robinson", "Waters", "Taylor"]; +const ages = [20, 25, 30, 35]; type Account = { - first: string - last: string - age: number -} -const accounts: Account[] = [] + first: string; + last: string; + age: number; +}; +const accounts: Account[] = []; firsts.forEach((first: string): void => - lasts.forEach((last: string): void => - ages.forEach((age: number): void => { - accounts.push({ - first, - last, - age, - }) - }), - ), -) + lasts.forEach((last: string): void => + ages.forEach((age: number): void => { + accounts.push({ + first, + last, + age, + }); + }), + ), +); async function tryUpsert(account: Account): Promise { - const txn = client.newTxn() + const txn = client.newTxn(); - const q = `{ + const q = `{ find(func: eq(first, "${account.first}")) @filter(eq(last, "${account.last}") AND eq(age, "${account.age}")) { uid: _uid_ } - }` - - try { - const res = await txn.query(q) - const resJson: { - find: { uid: string }[] - } = res.getJson() - expect(resJson.find.length).toBeLessThanOrEqual(1) - - let mu: dgraph.Mutation - let uid: string - if (resJson.find.length === 1) { - uid = resJson.find[0].uid - } else { - mu = new dgraph.Mutation() - mu.setSetNquads(` + }`; + + try { + const res = await txn.query(q); + const resJson: { + find: { uid: string }[]; + } = res.getJson(); + expect(resJson.find.length).toBeLessThanOrEqual(1); + + let mu: dgraph.Mutation; + let uid: string; + if (resJson.find.length === 1) { + uid = resJson.find[0].uid; + } else { + mu = new dgraph.Mutation(); + mu.setSetNquads(` _:acct "${account.first}" . _:acct "${account.last}" . _:acct "${account.age}"^^ . - `) - - const ag = await txn.mutate(mu) - uid = ag.getUidsMap().get("acct") - expect(uid).not.toEqual("") - } - - mu = new dgraph.Mutation() - // Time used here is in milliseconds. - mu.setSetNquads(`<${uid}> "${new Date().getTime()}"^^ .`) - await txn.mutate(mu) - - await txn.commit() - } finally { - await txn.discard() - } + `); + + const ag = await txn.mutate(mu); + uid = ag.getUidsMap().get("acct"); + expect(uid).not.toEqual(""); + } + + mu = new dgraph.Mutation(); + // Time used here is in milliseconds. + mu.setSetNquads(`<${uid}> "${new Date().getTime()}"^^ .`); + await txn.mutate(mu); + + await txn.commit(); + } finally { + await txn.discard(); + } } -let startStatus = 0 // set at the start of doUpserts -let lastStatus = 0 -let cancelled = false // cancelled due to timeout +let startStatus = 0; // set at the start of doUpserts +let lastStatus = 0; +let cancelled = false; // cancelled due to timeout -let successCount = 0 -let retryCount = 0 +let successCount = 0; +let retryCount = 0; function conditionalLog(): void { - const now = new Date().getTime() - if (now - lastStatus > 1000 && !cancelled) { - console.log( - `Success: ${successCount}, Retries: ${retryCount}, Total Time: ${now - startStatus} ms`, - ) - lastStatus = now - } + const now = new Date().getTime(); + if (now - lastStatus > 1000 && !cancelled) { + console.log( + `Success: ${successCount}, Retries: ${retryCount}, Total Time: ${now - startStatus} ms`, + ); + lastStatus = now; + } } async function upsert(account: Account): Promise { - let done = false - while (!done && !cancelled) { - try { - await tryUpsert(account) - successCount += 1 - done = true - } catch (e) { - expect(e).toBe(dgraph.ERR_ABORTED) - retryCount += 1 - } - - conditionalLog() - } - - if (!done) { - throw new Error(`Timeout elapsed: ${timeout / 1000}s`) - } + let done = false; + while (!done && !cancelled) { + try { + await tryUpsert(account); + successCount += 1; + done = true; + } catch (e) { + expect(e).toBe(dgraph.ERR_ABORTED); + retryCount += 1; + } + + conditionalLog(); + } + + if (!done) { + throw new Error(`Timeout elapsed: ${timeout / 1000}s`); + } } async function doUpserts(): Promise { - const promises: Promise[] = [] - for (const account of accounts) { - for (let i = 0; i < concurrency; i += 1) { - promises.push(upsert(account)) - } - } - - startStatus = new Date().getTime() - const id = setTimeout(() => { - cancelled = true - }, timeout) - - await Promise.all(promises).then(() => { - clearTimeout(id) - }) + const promises: Promise[] = []; + for (const account of accounts) { + for (let i = 0; i < concurrency; i += 1) { + promises.push(upsert(account)); + } + } + + startStatus = new Date().getTime(); + const id = setTimeout(() => { + cancelled = true; + }, timeout); + + await Promise.all(promises).then(() => { + clearTimeout(id); + }); } async function checkIntegrity(): Promise { - const res = await client.newTxn().query(`{ + const res = await client.newTxn().query(`{ all(func: anyofterms(first, "${firsts.join(" ")}")) { first last age } - }`) - - const data: { - all: Account[] - } = res.getJson() - - const accountSet: { [key: string]: boolean } = {} - for (const account of data.all) { - expect(account.first).toBeTruthy() - expect(account.last).toBeTruthy() - expect(account.age).toBeTruthy() - accountSet[`${account.first}_${account.last}_${account.age}`] = true - } - - for (const account of accounts) { - expect(accountSet[`${account.first}_${account.last}_${account.age}`]).toBe(true) - } + }`); + + const data: { + all: Account[]; + } = res.getJson(); + + const accountSet: { [key: string]: boolean } = {}; + for (const account of data.all) { + expect(account.first).toBeTruthy(); + expect(account.last).toBeTruthy(); + expect(account.age).toBeTruthy(); + accountSet[`${account.first}_${account.last}_${account.age}`] = true; + } + + for (const account of accounts) { + expect(accountSet[`${account.first}_${account.last}_${account.age}`]).toBe( + true, + ); + } } describe("acctUpsert", () => { - it("should successfully perform upsert load test", async () => { - client = await setup() - await setSchema( - client, - ` + it("should successfully perform upsert load test", async () => { + client = await setup(); + await setSchema( + client, + ` first: string @index(term) . last: string @index(hash) . age: int @index(int) . when: int . `, - ) + ); - await doUpserts() - await checkIntegrity() - }) -}) + await doUpserts(); + await checkIntegrity(); + }); +}); diff --git a/tests/integration/acl.spec.ts b/tests/integration/acl.spec.ts index fdad3b0..bebd460 100644 --- a/tests/integration/acl.spec.ts +++ b/tests/integration/acl.spec.ts @@ -3,178 +3,185 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { fail } from "assert" -import { exec } from "child_process" -import { promisify } from "util" +import { fail } from "assert"; +import { exec } from "child_process"; +import { promisify } from "util"; -import * as dgraph from "../../src" -import { createClient, createClientStub, SERVER_ADDR, setSchema, setup, wait } from "../helper" +import * as dgraph from "../../src"; +import { + SERVER_ADDR, + createClient, + createClientStub, + setSchema, + setup, + wait, +} from "../helper"; -const JEST_TIMEOUT = 60 * 1000 // 1 minute in milliseconds -const WAIT_FOR_SIX_SECONDS = 6 * 1000 // 6 seconds in milliseconds +const JEST_TIMEOUT = 60 * 1000; // 1 minute in milliseconds +const WAIT_FOR_SIX_SECONDS = 6 * 1000; // 6 seconds in milliseconds -jest.setTimeout(JEST_TIMEOUT) +jest.setTimeout(JEST_TIMEOUT); -let client: dgraph.DgraphClient +let client: dgraph.DgraphClient; -const GUARDIAN_CREDS = "user=groot;password=password;namespace=0" -const USERID = "alice" -const USERPWD = "alicepassword" -const PRED = "name" -const DEV_GROUP = "dev" +const GUARDIAN_CREDS = "user=groot;password=password;namespace=0"; +const USERID = "alice"; +const USERPWD = "alicepassword"; +const PRED = "name"; +const DEV_GROUP = "dev"; -const execute = promisify(exec) +const execute = promisify(exec); const MUTATE_PERMISSION_DENIED = new Error(`7 PERMISSION_DENIED:\ - unauthorized to mutate following predicates: ${PRED} \n`) + unauthorized to mutate following predicates: ${PRED} \n`); const ALTER_PERMISSION_DENIED = new Error(`7 PERMISSION_DENIED:\ - unauthorized to alter following predicates: ${PRED} \n`) + unauthorized to alter following predicates: ${PRED} \n`); async function cmd(command: string) { - try { - await execute(command) - } catch (err) { - fail(`Failed to execute command:\n\t${command}\nError: ${err}`) - } + try { + await execute(command); + } catch (err) { + fail(`Failed to execute command:\n\t${command}\nError: ${err}`); + } } async function insertSampleData() { - const txn = client.newTxn() - const mu = new dgraph.Mutation() - mu.setSetNquads(` + const txn = client.newTxn(); + const mu = new dgraph.Mutation(); + mu.setSetNquads(` _:prashant <${PRED}> "Prashant" . - `) - mu.setCommitNow(true) - const res = await txn.mutate(mu) - const uid = res.getUidsMap().get("prashant") - expect(uid).toBeDefined() + `); + mu.setCommitNow(true); + const res = await txn.mutate(mu); + const uid = res.getUidsMap().get("prashant"); + expect(uid).toBeDefined(); } async function loginUser(): Promise { - const aclClientStub = createClientStub() - try { - await aclClientStub.login(USERID, USERPWD) - } catch (e) { - fail(`Login error: \tUSERID - ${USERID} \tUSERPWD - ${USERPWD}\n${e}`) - } - return createClient(aclClientStub) + const aclClientStub = createClientStub(); + try { + await aclClientStub.login(USERID, USERPWD); + } catch (e) { + fail(`Login error: \tUSERID - ${USERID} \tUSERPWD - ${USERPWD}\n${e}`); + } + return createClient(aclClientStub); } async function aclSetup() { - client = await setup() - await setSchema( - client, - ` + client = await setup(); + await setSchema( + client, + ` ${PRED}: string . `, - ) - await insertSampleData() - await addUser() - await addGroup() - await addUserToGroup() - return loginUser() + ); + await insertSampleData(); + await addUser(); + await addGroup(); + await addUserToGroup(); + return loginUser(); } async function addUser() { - const command = `dgraph acl -a '${SERVER_ADDR}' add -u '${USERID}' -p '${USERPWD}' --guardian-creds '${GUARDIAN_CREDS}'` - await cmd(command) + const command = `dgraph acl -a '${SERVER_ADDR}' add -u '${USERID}' -p '${USERPWD}' --guardian-creds '${GUARDIAN_CREDS}'`; + await cmd(command); } async function addGroup() { - const command = `dgraph acl -a '${SERVER_ADDR}' add -g '${DEV_GROUP}' --guardian-creds '${GUARDIAN_CREDS}'` - await cmd(command) + const command = `dgraph acl -a '${SERVER_ADDR}' add -g '${DEV_GROUP}' --guardian-creds '${GUARDIAN_CREDS}'`; + await cmd(command); } async function addUserToGroup() { - const command = `dgraph acl -a '${SERVER_ADDR}' mod -u '${USERID}' -l '${DEV_GROUP}' --guardian-creds '${GUARDIAN_CREDS}'` - await cmd(command) + const command = `dgraph acl -a '${SERVER_ADDR}' mod -u '${USERID}' -l '${DEV_GROUP}' --guardian-creds '${GUARDIAN_CREDS}'`; + await cmd(command); } async function changePermission(permission: number) { - const command = `dgraph acl -a '${SERVER_ADDR}' mod -g '${DEV_GROUP}' -p '${PRED}' -m '${permission}' --guardian-creds '${GUARDIAN_CREDS}'` - await cmd(command) - await wait(WAIT_FOR_SIX_SECONDS) + const command = `dgraph acl -a '${SERVER_ADDR}' mod -g '${DEV_GROUP}' -p '${PRED}' -m '${permission}' --guardian-creds '${GUARDIAN_CREDS}'`; + await cmd(command); + await wait(WAIT_FOR_SIX_SECONDS); } async function tryReading(aclClient: dgraph.DgraphClient): Promise { - const txn = aclClient.newTxn() - const res: dgraph.Response = await txn.query(`{ + const txn = aclClient.newTxn(); + const res: dgraph.Response = await txn.query(`{ me(func: has(${PRED})) { ${PRED} } - }`) - const data = res.getJson() - if (data.me === undefined) { - expect(data).toEqual({}) - return false - } else { - expect(data.me).not.toHaveLength(0) - return true - } + }`); + const data = res.getJson(); + if (data.me === undefined) { + expect(data).toEqual({}); + return false; + } else { + expect(data.me).not.toHaveLength(0); + return true; + } } async function tryWriting(aclClient: dgraph.DgraphClient): Promise { - const txn = aclClient.newTxn() - try { - const mu = new dgraph.Mutation() - mu.setSetNquads(` + const txn = aclClient.newTxn(); + try { + const mu = new dgraph.Mutation(); + mu.setSetNquads(` _:ashish <${PRED}> "Ashish" . - `) - mu.setCommitNow(true) - const res = await txn.mutate(mu) - const uid = res.getUidsMap().get("ashish") - expect(uid).toBeDefined() - return true - } catch (e) { - expect(e).toEqual(MUTATE_PERMISSION_DENIED) - return false - } + `); + mu.setCommitNow(true); + const res = await txn.mutate(mu); + const uid = res.getUidsMap().get("ashish"); + expect(uid).toBeDefined(); + return true; + } catch (e) { + expect(e).toEqual(MUTATE_PERMISSION_DENIED); + return false; + } } async function tryAltering(aclClient: dgraph.DgraphClient): Promise { - try { - const operation = new dgraph.Operation() - operation.setSchema(` + try { + const operation = new dgraph.Operation(); + operation.setSchema(` ${PRED}: string @index(exact, term) . - `) - await aclClient.alter(operation) - return true - } catch (e) { - expect(e).toEqual(ALTER_PERMISSION_DENIED) - return false - } + `); + await aclClient.alter(operation); + return true; + } catch (e) { + expect(e).toEqual(ALTER_PERMISSION_DENIED); + return false; + } } describe("ACL tests", () => { - it("has no access", async () => { - const aclClient = await aclSetup() - await changePermission(0) - await expect(tryReading(aclClient)).resolves.toBe(false) - await expect(tryWriting(aclClient)).resolves.toBe(false) - await expect(tryAltering(aclClient)).resolves.toBe(false) - }) - - it("only has read access", async () => { - const aclClient = await aclSetup() - await changePermission(4) - await expect(tryReading(aclClient)).resolves.toBe(true) - await expect(tryWriting(aclClient)).resolves.toBe(false) - await expect(tryAltering(aclClient)).resolves.toBe(false) - }) - - it("only has write access", async () => { - const aclClient = await aclSetup() - await changePermission(2) - await expect(tryReading(aclClient)).resolves.toBe(false) - await expect(tryWriting(aclClient)).resolves.toBe(true) - await expect(tryAltering(aclClient)).resolves.toBe(false) - }) - - it("only has modify access", async () => { - const aclClient = await aclSetup() - await changePermission(1) - await expect(tryReading(aclClient)).resolves.toBe(false) - await expect(tryWriting(aclClient)).resolves.toBe(false) - await expect(tryAltering(aclClient)).resolves.toBe(true) - }) -}) + it("has no access", async () => { + const aclClient = await aclSetup(); + await changePermission(0); + await expect(tryReading(aclClient)).resolves.toBe(false); + await expect(tryWriting(aclClient)).resolves.toBe(false); + await expect(tryAltering(aclClient)).resolves.toBe(false); + }); + + it("only has read access", async () => { + const aclClient = await aclSetup(); + await changePermission(4); + await expect(tryReading(aclClient)).resolves.toBe(true); + await expect(tryWriting(aclClient)).resolves.toBe(false); + await expect(tryAltering(aclClient)).resolves.toBe(false); + }); + + it("only has write access", async () => { + const aclClient = await aclSetup(); + await changePermission(2); + await expect(tryReading(aclClient)).resolves.toBe(false); + await expect(tryWriting(aclClient)).resolves.toBe(true); + await expect(tryAltering(aclClient)).resolves.toBe(false); + }); + + it("only has modify access", async () => { + const aclClient = await aclSetup(); + await changePermission(1); + await expect(tryReading(aclClient)).resolves.toBe(false); + await expect(tryWriting(aclClient)).resolves.toBe(false); + await expect(tryAltering(aclClient)).resolves.toBe(true); + }); +}); diff --git a/tests/integration/bank.spec.ts b/tests/integration/bank.spec.ts index 3107f6a..bed8824 100644 --- a/tests/integration/bank.spec.ts +++ b/tests/integration/bank.spec.ts @@ -3,154 +3,156 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" -import * as crypto from "crypto" -import { setSchema, setup, wait } from "../helper" +import * as crypto from "crypto"; +import * as dgraph from "../../src"; +import { setSchema, setup, wait } from "../helper"; -const concurrency = 5 -const totalAccounts = 100 -const totalTxns = 1000 -const initialBalance = 100 -const timeout = 5 * 60 * 1000 // 5 minutes in milliseconds +const concurrency = 5; +const totalAccounts = 100; +const totalTxns = 1000; +const initialBalance = 100; +const timeout = 5 * 60 * 1000; // 5 minutes in milliseconds -jest.setTimeout(timeout * 2) +jest.setTimeout(timeout * 2); -let client: dgraph.DgraphClient +let client: dgraph.DgraphClient; type Account = { - bal: number -} + bal: number; +}; -const uids: string[] = [] +const uids: string[] = []; async function createAccounts(): Promise { - await setSchema(client, "bal: int .") - - const accounts: Account[] = [] - for (let i = 0; i < totalAccounts; i += 1) { - accounts.push({ - bal: initialBalance, - }) - } - - const txn = client.newTxn() - const mu = new dgraph.Mutation() - mu.setSetJson(accounts) - const ag = await txn.mutate(mu) - await txn.commit() - - ag.getUidsMap().forEach((value: string): void => { - uids.push(value) - }) + await setSchema(client, "bal: int ."); + + const accounts: Account[] = []; + for (let i = 0; i < totalAccounts; i += 1) { + accounts.push({ + bal: initialBalance, + }); + } + + const txn = client.newTxn(); + const mu = new dgraph.Mutation(); + mu.setSetJson(accounts); + const ag = await txn.mutate(mu); + await txn.commit(); + + ag.getUidsMap().forEach((value: string): void => { + uids.push(value); + }); } -let startStatus = 0 // set before Promise.all -let cancelled = false -let finished = false +let startStatus = 0; // set before Promise.all +let cancelled = false; +let finished = false; -let runs = 0 -let aborts = 0 +let runs = 0; +let aborts = 0; async function runTotal(): Promise { - const res = await client.newTxn().query(`{ + const res = await client.newTxn().query(`{ var(func: uid(${uids.join(",")})) { b as bal } total() { bal: sum(val(b)) } - }`) - expect(res.getJson().total[0].bal).toBe(uids.length * initialBalance) + }`); + expect(res.getJson().total[0].bal).toBe(uids.length * initialBalance); - console.log( - `Runs: ${runs}, Aborts: ${aborts}, Total Time: ${new Date().getTime() - startStatus} ms`, - ) + console.log( + `Runs: ${runs}, Aborts: ${aborts}, Total Time: ${new Date().getTime() - startStatus} ms`, + ); } async function runTotalInLoop(): Promise { - while (!finished && !cancelled) { - try { - await runTotal() - await wait(1000) - } catch (e) { - finished = true - throw e - } - } + while (!finished && !cancelled) { + try { + await runTotal(); + await wait(1000); + } catch (e) { + finished = true; + throw e; + } + } } async function runTxn(): Promise { - let fromUid: string - let toUid: string - - while (true) { - fromUid = uids[crypto.randomInt(uids.length)] - toUid = uids[crypto.randomInt(uids.length)] - - if (fromUid !== toUid) { - break - } - } - - const txn = client.newTxn() - try { - const res = await txn.query(`{both(func: uid(${fromUid}, ${toUid})) { uid, bal }}`) - const accountsWithUid: { - uid: string - bal: number - }[] = res.getJson().both - expect(accountsWithUid).toHaveLength(2) - - accountsWithUid[0].bal += 5 - accountsWithUid[1].bal -= 5 - - const mu = new dgraph.Mutation() - mu.setSetJson(accountsWithUid) - await txn.mutate(mu) - await txn.commit() - } finally { - await txn.discard() - } + let fromUid: string; + let toUid: string; + + while (true) { + fromUid = uids[crypto.randomInt(uids.length)]; + toUid = uids[crypto.randomInt(uids.length)]; + + if (fromUid !== toUid) { + break; + } + } + + const txn = client.newTxn(); + try { + const res = await txn.query( + `{both(func: uid(${fromUid}, ${toUid})) { uid, bal }}`, + ); + const accountsWithUid: { + uid: string; + bal: number; + }[] = res.getJson().both; + expect(accountsWithUid).toHaveLength(2); + + accountsWithUid[0].bal += 5; + accountsWithUid[1].bal -= 5; + + const mu = new dgraph.Mutation(); + mu.setSetJson(accountsWithUid); + await txn.mutate(mu); + await txn.commit(); + } finally { + await txn.discard(); + } } async function runTxnInLoop(): Promise { - while (!finished && !cancelled) { - try { - await runTxn() - runs += 1 - if (runs > totalTxns) { - finished = true - return - } - } catch { - aborts += 1 - } - } - - if (!finished) { - throw new Error(`Timeout elapsed: ${timeout / 1000}s`) - } + while (!finished && !cancelled) { + try { + await runTxn(); + runs += 1; + if (runs > totalTxns) { + finished = true; + return; + } + } catch { + aborts += 1; + } + } + + if (!finished) { + throw new Error(`Timeout elapsed: ${timeout / 1000}s`); + } } describe("bank", () => { - it("should successfully perform transaction load test", async () => { - client = await setup() - await createAccounts() - - const promises = [runTotalInLoop()] - for (let i = 0; i < concurrency; i += 1) { - promises.push(runTxnInLoop()) - } - - startStatus = new Date().getTime() - const id = setTimeout(() => { - cancelled = true - }, timeout) - - await Promise.all(promises) - - if (!cancelled) { - clearTimeout(id) - } - }) -}) + it("should successfully perform transaction load test", async () => { + client = await setup(); + await createAccounts(); + + const promises = [runTotalInLoop()]; + for (let i = 0; i < concurrency; i += 1) { + promises.push(runTxnInLoop()); + } + + startStatus = new Date().getTime(); + const id = setTimeout(() => { + cancelled = true; + }, timeout); + + await Promise.all(promises); + + if (!cancelled) { + clearTimeout(id); + } + }); +}); diff --git a/tests/integration/bulkSetDelete.spec.ts b/tests/integration/bulkSetDelete.spec.ts index 6cce247..aaccb2b 100644 --- a/tests/integration/bulkSetDelete.spec.ts +++ b/tests/integration/bulkSetDelete.spec.ts @@ -3,123 +3,123 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { setSchema, setup } from "../helper" +import { setSchema, setup } from "../helper"; -let client: dgraph.DgraphClient +let client: dgraph.DgraphClient; type Profile = { - name: string - email: string - age: number -} + name: string; + email: string; + age: number; +}; const profiles: Profile[] = [ - { name: "Aman", email: "aman@dgraph.io", age: 26 }, - { name: "Animesh", email: "animesh@dgraph.io", age: 24 }, - { name: "Ashish", email: "ashish@dgraph.io", age: 26 }, - { name: "Prashant", email: "prashant@dgraph.io", age: 23 }, -] -const names: string[] = [] + { name: "Aman", email: "aman@dgraph.io", age: 26 }, + { name: "Animesh", email: "animesh@dgraph.io", age: 24 }, + { name: "Ashish", email: "ashish@dgraph.io", age: 26 }, + { name: "Prashant", email: "prashant@dgraph.io", age: 23 }, +]; +const names: string[] = []; profiles.forEach((profile: Profile): void => { - names.push(profile.name) -}) + names.push(profile.name); +}); function getMutationNquads() { - let mutationNquads = "" - profiles.forEach((profile: Profile) => { - const blankNodeLabel = `_:${profile.name.toLocaleLowerCase()}` - mutationNquads += ` + let mutationNquads = ""; + profiles.forEach((profile: Profile) => { + const blankNodeLabel = `_:${profile.name.toLocaleLowerCase()}`; + mutationNquads += ` ${blankNodeLabel} "${profile.name}" . ${blankNodeLabel} "${profile.email}" . ${blankNodeLabel} "${profile.age}"^^ . - ` - }) - return mutationNquads + `; + }); + return mutationNquads; } async function doBulkSet() { - const txn = client.newTxn() - const mu = new dgraph.Mutation() - mu.setSetNquads(getMutationNquads()) + const txn = client.newTxn(); + const mu = new dgraph.Mutation(); + mu.setSetNquads(getMutationNquads()); - const req = new dgraph.Request() - req.addMutations(mu) - req.setCommitNow(true) + const req = new dgraph.Request(); + req.addMutations(mu); + req.setCommitNow(true); - await txn.doRequest(req) + await txn.doRequest(req); - const res = await readProfiles() - expect(res).toEqual({ all: profiles }) + const res = await readProfiles(); + expect(res).toEqual({ all: profiles }); } async function readProfiles() { - const query = `query { + const query = `query { all(func: anyofterms(name, "${names.join(", ")}"), orderasc: name) { name email age } - }` - const req = new dgraph.Request() - req.setQuery(query) - const res = await client.newTxn().doRequest(req) + }`; + const req = new dgraph.Request(); + req.setQuery(query); + const res = await client.newTxn().doRequest(req); - return res.getJson() + return res.getJson(); } async function doBulkDelete() { - const txn = client.newTxn() - const query = `query { + const txn = client.newTxn(); + const query = `query { a as var(func: eq(name, "Prashant")) - }` - const mu = new dgraph.Mutation() - mu.setDelNquads(` + }`; + const mu = new dgraph.Mutation(); + mu.setDelNquads(` uid(a) * . uid(a) * . uid(a) * . - `) + `); - const req = new dgraph.Request() - req.addMutations(mu) - req.setQuery(query) - req.setCommitNow(true) + const req = new dgraph.Request(); + req.addMutations(mu); + req.setQuery(query); + req.setCommitNow(true); - await txn.doRequest(req) + await txn.doRequest(req); - const res = await readProfiles() - const tempProfiles = profiles - tempProfiles.pop() - expect(res).toEqual({ all: tempProfiles }) + const res = await readProfiles(); + const tempProfiles = profiles; + tempProfiles.pop(); + expect(res).toEqual({ all: tempProfiles }); } describe("Bulk operations using doRequest", () => { - it("successfully perform bulk set", async () => { - client = await setup() - await setSchema( - client, - ` + it("successfully perform bulk set", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . email: string @index(exact) . age: int @index(int) . `, - ) + ); - await doBulkSet() - }) + await doBulkSet(); + }); - it("successfully perform bulk delete", async () => { - client = await setup() - await setSchema( - client, - ` + it("successfully perform bulk delete", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . email: string @index(exact) . age: int @index(int) . `, - ) + ); - await doBulkSet() - await doBulkDelete() - }) -}) + await doBulkSet(); + await doBulkDelete(); + }); +}); diff --git a/tests/integration/conditionalUpsert.spec.ts b/tests/integration/conditionalUpsert.spec.ts index 4123986..70c0bc6 100644 --- a/tests/integration/conditionalUpsert.spec.ts +++ b/tests/integration/conditionalUpsert.spec.ts @@ -3,185 +3,185 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { setSchema, setup, tryUpsert } from "../helper" +import { setSchema, setup, tryUpsert } from "../helper"; -let client: dgraph.DgraphClient +let client: dgraph.DgraphClient; type Profile = { - uid?: string - name?: string - email?: string - age?: number - friend?: [Profile] -} + uid?: string; + name?: string; + email?: string; + age?: number; + friend?: [Profile]; +}; const profiles: Profile[] = [ - { uid: "_:alice", name: "Alice", email: "alice@dgraph.io", age: 25 }, - { uid: "_:bob", name: "Bob", email: "bob@dgraph.io", age: 28 }, - { - uid: "_:prashant", - name: "Prashant", - email: "prashant@dgraph.io", - age: 23, - }, -] -const names: string[] = [] + { uid: "_:alice", name: "Alice", email: "alice@dgraph.io", age: 25 }, + { uid: "_:bob", name: "Bob", email: "bob@dgraph.io", age: 28 }, + { + uid: "_:prashant", + name: "Prashant", + email: "prashant@dgraph.io", + age: 23, + }, +]; +const names: string[] = []; profiles.forEach((profile: Profile): void => { - names.push(profile.name) -}) + names.push(profile.name); +}); async function performMutation(person: Profile): Promise { - const txn = client.newTxn() + const txn = client.newTxn(); - const mu = new dgraph.Mutation() - mu.setSetJson(person) + const mu = new dgraph.Mutation(); + mu.setSetJson(person); - const res = await txn.mutate(mu) - await txn.commit() - const uid = res.getUidsMap().get(person.uid.slice(2)) - expect(uid).not.toEqual("") - return uid + const res = await txn.mutate(mu); + await txn.commit(); + const uid = res.getUidsMap().get(person.uid.slice(2)); + expect(uid).not.toEqual(""); + return uid; } async function doConditionalUpsert(): Promise { - const p1: Profile = { uid: await performMutation(profiles[0]) } - const p2: Profile = { uid: await performMutation(profiles[1]) } - const friends: [Profile] = [p1] - friends.push(p2) - const alphaProfile: Profile = { - uid: profiles[2].uid, - name: profiles[2].name, - email: profiles[2].email, - age: profiles[2].age, - friend: friends, - } - await performMutation(alphaProfile) - - const profile: Profile = { - uid: "uid(profile)", - name: "Prashant Shahi", - email: "prashant@dgraph.io", - age: 24, - } - const query = `query { + const p1: Profile = { uid: await performMutation(profiles[0]) }; + const p2: Profile = { uid: await performMutation(profiles[1]) }; + const friends: [Profile] = [p1]; + friends.push(p2); + const alphaProfile: Profile = { + uid: profiles[2].uid, + name: profiles[2].name, + email: profiles[2].email, + age: profiles[2].age, + friend: friends, + }; + await performMutation(alphaProfile); + + const profile: Profile = { + uid: "uid(profile)", + name: "Prashant Shahi", + email: "prashant@dgraph.io", + age: 24, + }; + const query = `query { profile as var(func: eq(email, "${profile.email}")) { friends as friend } - }` - const mu = new dgraph.Mutation() - mu.setCond(`@if(eq(len(friends), 2))`) - mu.setSetNquads(` + }`; + const mu = new dgraph.Mutation(); + mu.setCond(`@if(eq(len(friends), 2))`); + mu.setSetNquads(` uid(profile) "${profile.name}" . uid(profile) "${profile.email}" . uid(profile) "${profile.age}"^^ . - `) + `); - await tryUpsert(client, query, mu, profile.uid) + await tryUpsert(client, query, mu, profile.uid); } async function checkUpsertIntegrity(expectedObject: Profile): Promise { - const query = `{ + const query = `{ all(func: eq(email, "prashant@dgraph.io")) { name email age } - }` - const res = await client.newTxn().query(query) + }`; + const res = await client.newTxn().query(query); - const data: { - all: Profile[] - } = res.getJson() + const data: { + all: Profile[]; + } = res.getJson(); - const profileSet: { [key: string]: boolean } = {} - for (const profile of data.all) { - expect(profile.name).toBeTruthy() - expect(profile.email).toBeTruthy() - expect(profile.age).toBeTruthy() - profileSet[`${profile.name}_${profile.email}_${profile.age}`] = true - } + const profileSet: { [key: string]: boolean } = {}; + for (const profile of data.all) { + expect(profile.name).toBeTruthy(); + expect(profile.email).toBeTruthy(); + expect(profile.age).toBeTruthy(); + profileSet[`${profile.name}_${profile.email}_${profile.age}`] = true; + } - const receivedObject: Profile = data.all[0] + const receivedObject: Profile = data.all[0]; - expect(Object.keys(profileSet).length).toEqual(1) - expect(receivedObject).toEqual(expectedObject) + expect(Object.keys(profileSet).length).toEqual(1); + expect(receivedObject).toEqual(expectedObject); } async function doUnconditionalUpsert(): Promise { - const p1: Profile = { uid: await performMutation(profiles[0]) } - const p2: Profile = { uid: await performMutation(profiles[1]) } - const friends: [Profile] = [p1] - friends.push(p2) - const alphaProfile: Profile = { - uid: profiles[2].uid, - name: profiles[2].name, - email: profiles[2].email, - age: profiles[2].age, - friend: friends, - } - await performMutation(alphaProfile) - - const profile: Profile = { - uid: "uid(profile)", - name: "Prashant Shahi", - email: "prashant@dgraph.io", - age: 24, - } - const query = `query { + const p1: Profile = { uid: await performMutation(profiles[0]) }; + const p2: Profile = { uid: await performMutation(profiles[1]) }; + const friends: [Profile] = [p1]; + friends.push(p2); + const alphaProfile: Profile = { + uid: profiles[2].uid, + name: profiles[2].name, + email: profiles[2].email, + age: profiles[2].age, + friend: friends, + }; + await performMutation(alphaProfile); + + const profile: Profile = { + uid: "uid(profile)", + name: "Prashant Shahi", + email: "prashant@dgraph.io", + age: 24, + }; + const query = `query { profile as var(func: eq(email, "${profile.email}")) { friends as friend } - }` - const mu = new dgraph.Mutation() - mu.setCond(`@if(gt(len(friends), 2))`) - mu.setSetNquads(` + }`; + const mu = new dgraph.Mutation(); + mu.setCond(`@if(gt(len(friends), 2))`); + mu.setSetNquads(` uid(profile) "${profile.name}" . uid(profile) "${profile.email}" . uid(profile) "${profile.age}"^^ . - `) + `); - await tryUpsert(client, query, mu, profile.uid) + await tryUpsert(client, query, mu, profile.uid); } describe("conditional upsert", () => { - it("successfully perform conditional upsert", async () => { - client = await setup() - await setSchema( - client, - ` + it("successfully perform conditional upsert", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . email: string @index(exact) . age: int @index(int) . friend: [uid] @reverse . `, - ) - await doConditionalUpsert() - const expectedObject: Profile = { - name: "Prashant Shahi", - email: "prashant@dgraph.io", - age: 24, - } - await checkUpsertIntegrity(expectedObject) - }) - - it("when @if condition is false, do not perform upsert", async () => { - client = await setup() - await setSchema( - client, - ` + ); + await doConditionalUpsert(); + const expectedObject: Profile = { + name: "Prashant Shahi", + email: "prashant@dgraph.io", + age: 24, + }; + await checkUpsertIntegrity(expectedObject); + }); + + it("when @if condition is false, do not perform upsert", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . email: string @index(exact) . age: int @index(int) . friend: [uid] @reverse . `, - ) - await doUnconditionalUpsert() - const expectedObject: Profile = { - name: "Prashant", - email: "prashant@dgraph.io", - age: 23, - } - await checkUpsertIntegrity(expectedObject) - }) -}) + ); + await doUnconditionalUpsert(); + const expectedObject: Profile = { + name: "Prashant", + email: "prashant@dgraph.io", + age: 23, + }; + await checkUpsertIntegrity(expectedObject); + }); +}); diff --git a/tests/integration/conflict.spec.ts b/tests/integration/conflict.spec.ts index 5e7f445..71bf61a 100644 --- a/tests/integration/conflict.spec.ts +++ b/tests/integration/conflict.spec.ts @@ -3,61 +3,61 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { setup } from "../helper" +import { setup } from "../helper"; describe("conflict", () => { - it("aborts when TxnConflict raises exception", async () => { - const client = await setup() - - const txn1 = client.newTxn() - - let mu = new dgraph.Mutation() - mu.setSetNquads('_:alice "Alice" .') - const res = await txn1.mutate(mu) - const uid = res.getUidsMap().get("alice") - - const txn2 = client.newTxn() - mu = new dgraph.Mutation() - mu.setSetNquads(`<${uid}> "Alice" .`) - await txn2.mutate(mu) - - const p1 = txn1.commit() - await expect(p1).resolves.toBeUndefined() - - const p2 = txn2.commit() - await expect(p2).rejects.toBe(dgraph.ERR_ABORTED) - }) - - it("aborts when TxnReadOnly raises exception", async () => { - const client = await setup() - const txnOption: dgraph.TxnOptions = { - readOnly: true, - } - const txn1 = client.newTxn(txnOption) - - const mu = new dgraph.Mutation() - mu.setSetNquads('_:alice "Alice" .') - const res = txn1.mutate(mu) - await expect(res).rejects.toBe(dgraph.ERR_READ_ONLY) - }) - - it("aborts when TxnFinished raises exception", async () => { - const client = await setup() - - const txn1 = client.newTxn() - - const mu = new dgraph.Mutation() - mu.setSetNquads('_:alice "Alice" .') - const res = await txn1.mutate(mu) - const uid = res.getUidsMap().get("alice") - expect(uid).not.toBe("") - - const p1 = txn1.commit() - await expect(p1).resolves.toBeUndefined() - - const p2 = txn1.commit() - await expect(p2).rejects.toBe(dgraph.ERR_FINISHED) - }) -}) + it("aborts when TxnConflict raises exception", async () => { + const client = await setup(); + + const txn1 = client.newTxn(); + + let mu = new dgraph.Mutation(); + mu.setSetNquads('_:alice "Alice" .'); + const res = await txn1.mutate(mu); + const uid = res.getUidsMap().get("alice"); + + const txn2 = client.newTxn(); + mu = new dgraph.Mutation(); + mu.setSetNquads(`<${uid}> "Alice" .`); + await txn2.mutate(mu); + + const p1 = txn1.commit(); + await expect(p1).resolves.toBeUndefined(); + + const p2 = txn2.commit(); + await expect(p2).rejects.toBe(dgraph.ERR_ABORTED); + }); + + it("aborts when TxnReadOnly raises exception", async () => { + const client = await setup(); + const txnOption: dgraph.TxnOptions = { + readOnly: true, + }; + const txn1 = client.newTxn(txnOption); + + const mu = new dgraph.Mutation(); + mu.setSetNquads('_:alice "Alice" .'); + const res = txn1.mutate(mu); + await expect(res).rejects.toBe(dgraph.ERR_READ_ONLY); + }); + + it("aborts when TxnFinished raises exception", async () => { + const client = await setup(); + + const txn1 = client.newTxn(); + + const mu = new dgraph.Mutation(); + mu.setSetNquads('_:alice "Alice" .'); + const res = await txn1.mutate(mu); + const uid = res.getUidsMap().get("alice"); + expect(uid).not.toBe(""); + + const p1 = txn1.commit(); + await expect(p1).resolves.toBeUndefined(); + + const p2 = txn1.commit(); + await expect(p2).rejects.toBe(dgraph.ERR_FINISHED); + }); +}); diff --git a/tests/integration/connect.spec.ts b/tests/integration/connect.spec.ts index 3ef3e16..aa3793f 100644 --- a/tests/integration/connect.spec.ts +++ b/tests/integration/connect.spec.ts @@ -3,68 +3,74 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { SERVER_ADDR } from "../helper" +import { SERVER_ADDR } from "../helper"; describe("open function", () => { - it("should connect with authentication and execute a query", async () => { - const url = `dgraph://groot:password@${SERVER_ADDR}` - const client = await dgraph.open(url) - const query = ` + it("should connect with authentication and execute a query", async () => { + const url = `dgraph://groot:password@${SERVER_ADDR}`; + const client = await dgraph.open(url); + const query = ` { me(func: uid(1)) { uid } } - ` - const txn = client.newTxn({ readOnly: true }) - const response = await txn.query(query) + `; + const txn = client.newTxn({ readOnly: true }); + const response = await txn.query(query); - // Assertions - expect(response).not.toBeNull() - const parsedJson = response.getJson() // No need for JSON.parse - expect(parsedJson.me[0].uid).toBe("0x1") - client.close() - }) + // Assertions + expect(response).not.toBeNull(); + const parsedJson = response.getJson(); // No need for JSON.parse + expect(parsedJson.me[0].uid).toBe("0x1"); + client.close(); + }); - it("should throw an error for invalid scheme", async () => { - const invalidUrl = `http://${SERVER_ADDR}` - await expect(async () => dgraph.open(invalidUrl)).rejects.toThrowError( - "Invalid scheme: must start with dgraph://", - ) - }) + it("should throw an error for invalid scheme", async () => { + const invalidUrl = `http://${SERVER_ADDR}`; + await expect(async () => dgraph.open(invalidUrl)).rejects.toThrowError( + "Invalid scheme: must start with dgraph://", + ); + }); - it("should throw an error for missing hostname", async () => { - const invalidUrl = `dgraph://:9081` - await expect(async () => dgraph.open(invalidUrl)).rejects.toThrowError("Invalid URL") - }) + it("should throw an error for missing hostname", async () => { + const invalidUrl = `dgraph://:9081`; + await expect(async () => dgraph.open(invalidUrl)).rejects.toThrowError( + "Invalid URL", + ); + }); - it("should throw an error for missing port", async () => { - const invalidUrl = `dgraph://localhost` - await expect(async () => await dgraph.open(invalidUrl)).rejects.toThrowError( - "Invalid connection string: port required", - ) - }) + it("should throw an error for missing port", async () => { + const invalidUrl = `dgraph://localhost`; + await expect( + async () => await dgraph.open(invalidUrl), + ).rejects.toThrowError("Invalid connection string: port required"); + }); - it("should throw an error for username without password", async () => { - const invalidUrl = `dgraph://groot@${SERVER_ADDR}` - await expect(async () => await dgraph.open(invalidUrl)).rejects.toThrowError( - "Invalid connection string: password required when username is provided", - ) - }) + it("should throw an error for username without password", async () => { + const invalidUrl = `dgraph://groot@${SERVER_ADDR}`; + await expect( + async () => await dgraph.open(invalidUrl), + ).rejects.toThrowError( + "Invalid connection string: password required when username is provided", + ); + }); - it("should throw an error for unsupported sslmode", async () => { - const invalidUrl = `dgraph://${SERVER_ADDR}?sslmode=invalidsllmode` - await expect(async () => await dgraph.open(invalidUrl)).rejects.toThrowError( - "Invalid SSL mode: invalidsllmode (must be one of disable, require, verify-ca)", - ) - }) + it("should throw an error for unsupported sslmode", async () => { + const invalidUrl = `dgraph://${SERVER_ADDR}?sslmode=invalidsllmode`; + await expect( + async () => await dgraph.open(invalidUrl), + ).rejects.toThrowError( + "Invalid SSL mode: invalidsllmode (must be one of disable, require, verify-ca)", + ); + }); - it("should fail login with invalid credentials", async () => { - const invalidUrl = `dgraph://groot:wrongpassword@${SERVER_ADDR}` - await expect(async () => await dgraph.open(invalidUrl)).rejects.toThrowError( - "Failed to sign in user:", - ) - }) -}) + it("should fail login with invalid credentials", async () => { + const invalidUrl = `dgraph://groot:wrongpassword@${SERVER_ADDR}`; + await expect( + async () => await dgraph.open(invalidUrl), + ).rejects.toThrowError("Failed to sign in user:"); + }); +}); diff --git a/tests/integration/delete.spec.ts b/tests/integration/delete.spec.ts index da37129..65dbac5 100644 --- a/tests/integration/delete.spec.ts +++ b/tests/integration/delete.spec.ts @@ -3,145 +3,161 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { setSchema, setup } from "../helper" +import { setSchema, setup } from "../helper"; -let client: dgraph.DgraphClient +let client: dgraph.DgraphClient; async function performUpsert(mu: dgraph.Mutation, query: string, vars: object) { - const req = new dgraph.Request() - req.addMutations(mu) - req.setQuery(query) - req.setCommitNow(true) - if (vars !== undefined) { - const varsMap = req.getVarsMap() - req.setQuery(query) - Object.keys(vars).forEach((key: string) => { - varsMap.set(key, vars[key]) - }) - } - await expect(client.newTxn().doRequest(req)).resolves.toBeDefined() + const req = new dgraph.Request(); + req.addMutations(mu); + req.setQuery(query); + req.setCommitNow(true); + if (vars !== undefined) { + const varsMap = req.getVarsMap(); + req.setQuery(query); + Object.keys(vars).forEach((key: string) => { + varsMap.set(key, vars[key]); + }); + } + await expect(client.newTxn().doRequest(req)).resolves.toBeDefined(); } -async function performMutation(mu: dgraph.Mutation, blankNodeLabel: string): Promise { - mu.setCommitNow(true) - const res = await client.newTxn().mutate(mu) - const uid = res.getUidsMap().get(blankNodeLabel) - expect(uid).not.toEqual("") - return uid +async function performMutation( + mu: dgraph.Mutation, + blankNodeLabel: string, +): Promise { + mu.setCommitNow(true); + const res = await client.newTxn().mutate(mu); + const uid = res.getUidsMap().get(blankNodeLabel); + expect(uid).not.toEqual(""); + return uid; } -async function performJsonMutation(jsonObj: object, blankNodeLabel: string): Promise { - const mu = new dgraph.Mutation() - mu.setSetJson(jsonObj) - return performMutation(mu, blankNodeLabel) +async function performJsonMutation( + jsonObj: object, + blankNodeLabel: string, +): Promise { + const mu = new dgraph.Mutation(); + mu.setSetJson(jsonObj); + return performMutation(mu, blankNodeLabel); } -async function performNquadMutation(nquads: string, blankNodeLabel: string): Promise { - const mu = new dgraph.Mutation() - mu.setSetNquads(nquads) - return performMutation(mu, blankNodeLabel) +async function performNquadMutation( + nquads: string, + blankNodeLabel: string, +): Promise { + const mu = new dgraph.Mutation(); + mu.setSetNquads(nquads); + return performMutation(mu, blankNodeLabel); } -async function performNquadDeletion(nquads: string, blankNodeLabel: string): Promise { - const mu = new dgraph.Mutation() - mu.setDelNquads(nquads) - return performMutation(mu, blankNodeLabel) +async function performNquadDeletion( + nquads: string, + blankNodeLabel: string, +): Promise { + const mu = new dgraph.Mutation(); + mu.setDelNquads(nquads); + return performMutation(mu, blankNodeLabel); } -async function checkIntegrity(updatedProfile: object, query: string, vars?: object) { - const res = await client.newTxn().queryWithVars(query, vars) - const receivedObject = res.getJson().all[0] - expect(receivedObject).toEqual(updatedProfile) +async function checkIntegrity( + updatedProfile: object, + query: string, + vars?: object, +) { + const res = await client.newTxn().queryWithVars(query, vars); + const receivedObject = res.getJson().all[0]; + expect(receivedObject).toEqual(updatedProfile); } async function upsertDeletionWithVars(): Promise { - const jsonObj = { - uid: "_:prashant", - name: "Prashant", - "dgraph.type": "Person", - } - await performJsonMutation(jsonObj, "prashant") - const expectedObj = { - name: "Prashant", - } - const query = `{ + const jsonObj = { + uid: "_:prashant", + name: "Prashant", + "dgraph.type": "Person", + }; + await performJsonMutation(jsonObj, "prashant"); + const expectedObj = { + name: "Prashant", + }; + const query = `{ all(func: has(name)) { name } - }` - await checkIntegrity(expectedObj, query) - const deleteJsonObj = { - uid: "uid(user)", - } - const query2 = `query all($userName: string) { + }`; + await checkIntegrity(expectedObj, query); + const deleteJsonObj = { + uid: "uid(user)", + }; + const query2 = `query all($userName: string) { user as all(func: eq(name, $userName)) - }` - const vars = { - $userName: "Prashant", - } - const mu = new dgraph.Mutation() - mu.setDeleteJson(deleteJsonObj) - await performUpsert(mu, query2, vars) - await checkIntegrity(undefined, query) + }`; + const vars = { + $userName: "Prashant", + }; + const mu = new dgraph.Mutation(); + mu.setDeleteJson(deleteJsonObj); + await performUpsert(mu, query2, vars); + await checkIntegrity(undefined, query); } describe("delete", () => { - it("should delete node", async () => { - client = await setup() + it("should delete node", async () => { + client = await setup(); - const nquads = '_:alice "Alice" .' - const uid = await performNquadMutation(nquads, "alice") + const nquads = '_:alice "Alice" .'; + const uid = await performNquadMutation(nquads, "alice"); - const q = `{ + const q = `{ all(func: uid(${uid})) { name } - }` - const expectedJson = { - name: "Alice", - } - await checkIntegrity(expectedJson, q) - - const nquads2 = `<${uid}> * .` - await performNquadDeletion(nquads2, uid.toString()) - - const res = await client.newTxn().query(q) - expect(res.getJson().all).toHaveLength(0) - }) - - it("should delete edges", async () => { - client = await setup() - await setSchema(client, "age: int .\nmarried: bool .") - - const jsonObj = { - uid: "_:alice", - name: "Alice", - age: 26, - loc: "Riley Street", - married: true, - schools: [ - { - name: "Crown Public School", - }, - ], - friends: [ - { - name: "Bob", - age: 24, - }, - { - name: "Charlie", - age: 29, - }, - ], - } - const uid = await performJsonMutation(jsonObj, "alice") - - const expectedJson = jsonObj - delete expectedJson["uid"] - const query = `{ + }`; + const expectedJson = { + name: "Alice", + }; + await checkIntegrity(expectedJson, q); + + const nquads2 = `<${uid}> * .`; + await performNquadDeletion(nquads2, uid.toString()); + + const res = await client.newTxn().query(q); + expect(res.getJson().all).toHaveLength(0); + }); + + it("should delete edges", async () => { + client = await setup(); + await setSchema(client, "age: int .\nmarried: bool ."); + + const jsonObj = { + uid: "_:alice", + name: "Alice", + age: 26, + loc: "Riley Street", + married: true, + schools: [ + { + name: "Crown Public School", + }, + ], + friends: [ + { + name: "Bob", + age: 24, + }, + { + name: "Charlie", + age: 29, + }, + ], + }; + const uid = await performJsonMutation(jsonObj, "alice"); + + const expectedJson = jsonObj; + delete expectedJson["uid"]; + const query = `{ all(func: uid(${uid})) { name age @@ -155,30 +171,30 @@ describe("delete", () => { age } } - }` - await checkIntegrity(expectedJson, query) - - const mu = new dgraph.Mutation() - dgraph.deleteEdges(mu, uid, "friends") - mu.setCommitNow(true) - await client.newTxn().mutate(mu) - - const res = await client.newTxn().query(query) - expect(res.getJson().all[0].friends).toBeFalsy() - }) - - it("should delete a node with upsert using graphql", async () => { - client = await setup() - await setSchema( - client, - ` + }`; + await checkIntegrity(expectedJson, query); + + const mu = new dgraph.Mutation(); + dgraph.deleteEdges(mu, uid, "friends"); + mu.setCommitNow(true); + await client.newTxn().mutate(mu); + + const res = await client.newTxn().query(query); + expect(res.getJson().all[0].friends).toBeFalsy(); + }); + + it("should delete a node with upsert using graphql", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(hash) . type Person { name: string } `, - ) - await upsertDeletionWithVars() - }) -}) + ); + await upsertDeletionWithVars(); + }); +}); diff --git a/tests/integration/doRequest.spec.ts b/tests/integration/doRequest.spec.ts index b14b2b4..03ec2e5 100644 --- a/tests/integration/doRequest.spec.ts +++ b/tests/integration/doRequest.spec.ts @@ -3,94 +3,94 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { setSchema, setup } from "../helper" +import { setSchema, setup } from "../helper"; -const data = ["200", "300", "400"] -const UNKNOWN_CODE = "2 UNKNOWN" +const data = ["200", "300", "400"]; +const UNKNOWN_CODE = "2 UNKNOWN"; async function createMutation(element: object) { - const mu = new dgraph.Mutation() - mu.setSetJson(element) - return mu + const mu = new dgraph.Mutation(); + mu.setSetJson(element); + return mu; } describe("doRequest", () => { - it("insert 3Quads(mutation) and then query finishes successfully", async () => { - const client = await setup() - await setSchema(client, "name: string @index(fulltext) .") - - const uids: string[] = [] - let res: dgraph.Response - let req: dgraph.Request - for (const datum of data) { - const nquad = new dgraph.NQuad() - nquad.setSubject(`_:${datum}`) - nquad.setPredicate("name") - - const objectValue = new dgraph.Value() - objectValue.setStrVal(`ok ${datum}`) - nquad.setObjectValue(objectValue) - - const mu = new dgraph.Mutation() - mu.addSet(nquad) - - req = new dgraph.Request() - req.setMutationsList([mu]) - req.setCommitNow(true) - - res = await client.newTxn().doRequest(req) - uids.push(res.getUidsMap().get(datum)) - } - const query = `{ me(func: uid(${uids.join(",")})) { name }}` - req = new dgraph.Request() - req.setQuery(query) - res = await client.newTxn().doRequest(req) - - expect(res.getJson()).toEqual({ - me: [{ name: "ok 200" }, { name: "ok 300" }, { name: "ok 400" }], - }) - }) - - it("performs two mutations and then query finishes successfully", async () => { - const client = await setup() - await setSchema( - client, - ` + it("insert 3Quads(mutation) and then query finishes successfully", async () => { + const client = await setup(); + await setSchema(client, "name: string @index(fulltext) ."); + + const uids: string[] = []; + let res: dgraph.Response; + let req: dgraph.Request; + for (const datum of data) { + const nquad = new dgraph.NQuad(); + nquad.setSubject(`_:${datum}`); + nquad.setPredicate("name"); + + const objectValue = new dgraph.Value(); + objectValue.setStrVal(`ok ${datum}`); + nquad.setObjectValue(objectValue); + + const mu = new dgraph.Mutation(); + mu.addSet(nquad); + + req = new dgraph.Request(); + req.setMutationsList([mu]); + req.setCommitNow(true); + + res = await client.newTxn().doRequest(req); + uids.push(res.getUidsMap().get(datum)); + } + const query = `{ me(func: uid(${uids.join(",")})) { name }}`; + req = new dgraph.Request(); + req.setQuery(query); + res = await client.newTxn().doRequest(req); + + expect(res.getJson()).toEqual({ + me: [{ name: "ok 200" }, { name: "ok 300" }, { name: "ok 400" }], + }); + }); + + it("performs two mutations and then query finishes successfully", async () => { + const client = await setup(); + await setSchema( + client, + ` name: string @index(fulltext) . `, - ) - const dataSet = [{ name: `ok ${data[0]}` }, { name: `ok ${data[1]}` }] - const mu1 = await createMutation(dataSet[0]) - const mu2 = await createMutation(dataSet[1]) - const req = new dgraph.Request() - req.setMutationsList([mu1, mu2]) - req.setCommitNow(true) - const resp = client.newTxn().doRequest(req) - await expect(resp).resolves.toBeDefined() - - const query = `{ me(func: has(name), orderasc: name) { name }}` - const res = await client.newTxn().query(query) - expect(res.getJson()).toEqual({ - me: [{ name: "ok 200" }, { name: "ok 300" }], - }) - }) - - it("fails with zero mutations since either a mutation or a query is required", async () => { - const client = await setup() - await setSchema( - client, - ` + ); + const dataSet = [{ name: `ok ${data[0]}` }, { name: `ok ${data[1]}` }]; + const mu1 = await createMutation(dataSet[0]); + const mu2 = await createMutation(dataSet[1]); + const req = new dgraph.Request(); + req.setMutationsList([mu1, mu2]); + req.setCommitNow(true); + const resp = client.newTxn().doRequest(req); + await expect(resp).resolves.toBeDefined(); + + const query = `{ me(func: has(name), orderasc: name) { name }}`; + const res = await client.newTxn().query(query); + expect(res.getJson()).toEqual({ + me: [{ name: "ok 200" }, { name: "ok 300" }], + }); + }); + + it("fails with zero mutations since either a mutation or a query is required", async () => { + const client = await setup(); + await setSchema( + client, + ` name: string @index(fulltext) . `, - ) + ); - const req = new dgraph.Request() - req.setCommitNow(true) + const req = new dgraph.Request(); + req.setCommitNow(true); - const res = client.newTxn().doRequest(req) - const EMPTY_ERROR = new Error(`${UNKNOWN_CODE}: empty request`) - await expect(res).rejects.toEqual(EMPTY_ERROR) - }) -}) + const res = client.newTxn().doRequest(req); + const EMPTY_ERROR = new Error(`${UNKNOWN_CODE}: empty request`); + await expect(res).rejects.toEqual(EMPTY_ERROR); + }); +}); diff --git a/tests/integration/mutate.spec.ts b/tests/integration/mutate.spec.ts index 7d94671..1c6de28 100644 --- a/tests/integration/mutate.spec.ts +++ b/tests/integration/mutate.spec.ts @@ -3,94 +3,94 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { setSchema, setup } from "../helper" +import { setSchema, setup } from "../helper"; -const data = ["200", "300", "400"] +const data = ["200", "300", "400"]; describe("mutate", () => { - it("should insert 3Quads", async () => { - const client = await setup() - await setSchema(client, "name: string @index(fulltext) .") - - const uids: string[] = [] - let txn = client.newTxn() - try { - for (const datum of data) { - const nquad = new dgraph.NQuad() - nquad.setSubject(`_:${datum}`) - nquad.setPredicate("name") - - const ov = new dgraph.Value() - ov.setStrVal(`ok ${datum}`) - nquad.setObjectValue(ov) - - const mu = new dgraph.Mutation() - mu.addSet(nquad) - - const ag = await txn.mutate(mu) - uids.push(ag.getUidsMap().get(datum)) - } - - await txn.commit() - } finally { - await txn.discard() - } - - txn = client.newTxn() - const query = `{ me(func: uid(${uids.join(",")})) { name }}` - const res = await txn.query(query) - await txn.commit() - - expect(res.getJson()).toEqual({ - me: [{ name: "ok 200" }, { name: "ok 300" }, { name: "ok 400" }], - }) - }) - - it("should insert vector", async () => { - const client = await setup() - await setSchema( - client, - `project_discription_v: float32vector @index(hnsw(exponent: "5", metric: "euclidean")) .`, - ) - - let txn = client.newTxn() - try { - const nquad = new dgraph.NQuad() - nquad.setSubject(`0x1011`) - nquad.setPredicate("project_discription_v") - - const ov = new dgraph.Value() - const vector = new Float32Array([5.1, 5.1, 1.1]) - const uint8Array = new Uint8Array(vector.buffer) - ov.setVfloat32Val(uint8Array) - nquad.setObjectValue(ov) - - const mu = new dgraph.Mutation() - mu.addSet(nquad) - await txn.mutate(mu) - await txn.commit() - } finally { - await txn.discard() - } - - txn = client.newTxn() - const query = `query { q (func: uid(0x1011)) { + it("should insert 3Quads", async () => { + const client = await setup(); + await setSchema(client, "name: string @index(fulltext) ."); + + const uids: string[] = []; + let txn = client.newTxn(); + try { + for (const datum of data) { + const nquad = new dgraph.NQuad(); + nquad.setSubject(`_:${datum}`); + nquad.setPredicate("name"); + + const ov = new dgraph.Value(); + ov.setStrVal(`ok ${datum}`); + nquad.setObjectValue(ov); + + const mu = new dgraph.Mutation(); + mu.addSet(nquad); + + const ag = await txn.mutate(mu); + uids.push(ag.getUidsMap().get(datum)); + } + + await txn.commit(); + } finally { + await txn.discard(); + } + + txn = client.newTxn(); + const query = `{ me(func: uid(${uids.join(",")})) { name }}`; + const res = await txn.query(query); + await txn.commit(); + + expect(res.getJson()).toEqual({ + me: [{ name: "ok 200" }, { name: "ok 300" }, { name: "ok 400" }], + }); + }); + + it("should insert vector", async () => { + const client = await setup(); + await setSchema( + client, + `project_discription_v: float32vector @index(hnsw(exponent: "5", metric: "euclidean")) .`, + ); + + let txn = client.newTxn(); + try { + const nquad = new dgraph.NQuad(); + nquad.setSubject(`0x1011`); + nquad.setPredicate("project_discription_v"); + + const ov = new dgraph.Value(); + const vector = new Float32Array([5.1, 5.1, 1.1]); + const uint8Array = new Uint8Array(vector.buffer); + ov.setVfloat32Val(uint8Array); + nquad.setObjectValue(ov); + + const mu = new dgraph.Mutation(); + mu.addSet(nquad); + await txn.mutate(mu); + await txn.commit(); + } finally { + await txn.discard(); + } + + txn = client.newTxn(); + const query = `query { q (func: uid(0x1011)) { uid project_discription_v } - } ` - const res = await txn.query(query) - await txn.commit() - expect(res.getJson()).toEqual({ - q: [ - { - uid: "0x1011", - project_discription_v: [5.1, 5.1, 1.1], - }, - ], - }) - }) -}) + } `; + const res = await txn.query(query); + await txn.commit(); + expect(res.getJson()).toEqual({ + q: [ + { + uid: "0x1011", + project_discription_v: [5.1, 5.1, 1.1], + }, + ], + }); + }); +}); diff --git a/tests/integration/typeSystem.spec.ts b/tests/integration/typeSystem.spec.ts index d0003cb..66fd309 100644 --- a/tests/integration/typeSystem.spec.ts +++ b/tests/integration/typeSystem.spec.ts @@ -3,63 +3,63 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { setSchema, setup } from "../helper" +import { setSchema, setup } from "../helper"; -let client: dgraph.DgraphClient +let client: dgraph.DgraphClient; async function performMutation() { - const mu = new dgraph.Mutation() - mu.setSetNquads(` + const mu = new dgraph.Mutation(); + mu.setSetNquads(` _:prashant "Prashant" . _:prashant "23" . _:prashant "Person" . - `) - mu.setCommitNow(true) + `); + mu.setCommitNow(true); - const resp = await client.newTxn().mutate(mu) - expect(resp.getUidsMap().get("prashant")).toBeDefined() + const resp = await client.newTxn().mutate(mu); + expect(resp.getUidsMap().get("prashant")).toBeDefined(); - await expandQuery(1) + await expandQuery(1); } async function performDeletion() { - const req = new dgraph.Request() - const q = `query { + const req = new dgraph.Request(); + const q = `query { me as var(func: eq(name, "Prashant")) - }` - req.setQuery(q) + }`; + req.setQuery(q); - const mu = new dgraph.Mutation() - mu.setDelNquads(`uid(me) * * .`) - req.setMutationsList([mu]) - req.setCommitNow(true) + const mu = new dgraph.Mutation(); + mu.setDelNquads(`uid(me) * * .`); + req.setMutationsList([mu]); + req.setCommitNow(true); - const resp = await client.newTxn().doRequest(req) - const uid = resp.getUidsMap().get("uid(me)") - expect(uid).toBeUndefined() + const resp = await client.newTxn().doRequest(req); + const uid = resp.getUidsMap().get("uid(me)"); + expect(uid).toBeUndefined(); - await expandQuery(0) + await expandQuery(0); } async function expandQuery(personCount: number) { - const q = `{ + const q = `{ all(func: type(Person)) { expand(_all_) } - }` - const resp = await client.newTxn().query(q) - const data = resp.getJson() - expect(data.all.length).toEqual(personCount) + }`; + const resp = await client.newTxn().query(q); + const data = resp.getJson(); + expect(data.all.length).toEqual(personCount); } describe("Type system/directive", () => { - it("query fields expand using type system", async () => { - client = await setup() - await setSchema( - client, - ` + it("query fields expand using type system", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . age: int @index(int) . @@ -68,16 +68,16 @@ describe("Type system/directive", () => { age } `, - ) + ); - await performMutation() - }) + await performMutation(); + }); - it("performs s * * delete", async () => { - client = await setup() - await setSchema( - client, - ` + it("performs s * * delete", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . age: int @index(int) . @@ -86,9 +86,9 @@ describe("Type system/directive", () => { age } `, - ) + ); - await performMutation() - await performDeletion() - }) -}) + await performMutation(); + await performDeletion(); + }); +}); diff --git a/tests/integration/upsert.spec.ts b/tests/integration/upsert.spec.ts index 0e48622..2d23e50 100644 --- a/tests/integration/upsert.spec.ts +++ b/tests/integration/upsert.spec.ts @@ -3,427 +3,431 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../../src" +import * as dgraph from "../../src"; -import { setSchema, setup, tryUpsert } from "../helper" +import { setSchema, setup, tryUpsert } from "../helper"; -const concurrency = 3 -const FIVE_MINUTES_IN_SECONDS = 5 * 60 * 1000 // 5 minutes in milliseconds +const concurrency = 3; +const FIVE_MINUTES_IN_SECONDS = 5 * 60 * 1000; // 5 minutes in milliseconds -jest.setTimeout(FIVE_MINUTES_IN_SECONDS * 2) +jest.setTimeout(FIVE_MINUTES_IN_SECONDS * 2); -let client: dgraph.DgraphClient +let client: dgraph.DgraphClient; -const firsts = ["Paul", "Eric", "Jack", "John", "Martin"] -const lasts = ["Brown", "Smith", "Robinson", "Waters", "Taylor"] -const ages = [20, 25, 30, 35] +const firsts = ["Paul", "Eric", "Jack", "John", "Martin"]; +const lasts = ["Brown", "Smith", "Robinson", "Waters", "Taylor"]; +const ages = [20, 25, 30, 35]; type Account = { - first: string - last: string - age: number -} -const accounts: Account[] = [] + first: string; + last: string; + age: number; +}; +const accounts: Account[] = []; firsts.forEach((first: string): void => - lasts.forEach((last: string): void => - ages.forEach((age: number): void => { - accounts.push({ - first, - last, - age, - }) - }), - ), -) - -let startStatus = 0 // set at the start of doUpserts -let lastStatus = 0 -let cancelled = false // cancelled due to timeout - -let successCount = 0 -let retryCount = 0 + lasts.forEach((last: string): void => + ages.forEach((age: number): void => { + accounts.push({ + first, + last, + age, + }); + }), + ), +); + +let startStatus = 0; // set at the start of doUpserts +let lastStatus = 0; +let cancelled = false; // cancelled due to timeout + +let successCount = 0; +let retryCount = 0; function conditionalLog(): void { - const now = new Date().getTime() - if (now - lastStatus > 1000 && !cancelled) { - console.log( - `Success: ${successCount}, Retries: ${retryCount}, Total Time: ${now - startStatus} ms`, - ) - lastStatus = now - } + const now = new Date().getTime(); + if (now - lastStatus > 1000 && !cancelled) { + console.log( + `Success: ${successCount}, Retries: ${retryCount}, Total Time: ${now - startStatus} ms`, + ); + lastStatus = now; + } } async function upsert(account: Account): Promise { - let done = false - const query = `query { + let done = false; + const query = `query { account as var(func: eq(first, "${account.first}")) @filter(eq(last, "${account.last}") AND eq(age, "${account.age}")) - }` - const mu = new dgraph.Mutation() - mu.setSetNquads(` + }`; + const mu = new dgraph.Mutation(); + mu.setSetNquads(` uid(account) "${account.first}" . uid(account) "${account.last}" . uid(account) "${account.age}"^^ . - `) - const blankNodeLabel = `uid(account)` - while (!done && !cancelled) { - try { - await tryUpsert(client, query, mu, blankNodeLabel) - successCount += 1 - done = true - } catch (e) { - expect(e).toBe(dgraph.ERR_ABORTED) - retryCount += 1 - } - - conditionalLog() - } - - if (!done) { - throw new Error(`Timeout elapsed: ${FIVE_MINUTES_IN_SECONDS / 1000}s`) - } + `); + const blankNodeLabel = `uid(account)`; + while (!done && !cancelled) { + try { + await tryUpsert(client, query, mu, blankNodeLabel); + successCount += 1; + done = true; + } catch (e) { + expect(e).toBe(dgraph.ERR_ABORTED); + retryCount += 1; + } + + conditionalLog(); + } + + if (!done) { + throw new Error(`Timeout elapsed: ${FIVE_MINUTES_IN_SECONDS / 1000}s`); + } } async function doUpserts(): Promise { - const promises: Promise[] = [] - for (const account of accounts) { - for (let i = 0; i < concurrency; i += 1) { - promises.push(upsert(account)) - } - } - - startStatus = new Date().getTime() - const id = setTimeout(() => { - cancelled = true - }, FIVE_MINUTES_IN_SECONDS) - - await Promise.all(promises).then(() => { - clearTimeout(id) - }) + const promises: Promise[] = []; + for (const account of accounts) { + for (let i = 0; i < concurrency; i += 1) { + promises.push(upsert(account)); + } + } + + startStatus = new Date().getTime(); + const id = setTimeout(() => { + cancelled = true; + }, FIVE_MINUTES_IN_SECONDS); + + await Promise.all(promises).then(() => { + clearTimeout(id); + }); } async function checkIntegrity(): Promise { - const res = await client.newTxn().query(`{ + const res = await client.newTxn().query(`{ all(func: anyofterms(first, "${firsts.join(" ")}")) { first last age } - }`) - - const data: { - all: Account[] - } = res.getJson() - - const accountSet: { [key: string]: boolean } = {} - for (const account of data.all) { - expect(account.first).toBeTruthy() - expect(account.last).toBeTruthy() - expect(account.age).toBeTruthy() - accountSet[`${account.first}_${account.last}_${account.age}`] = true - } - - for (const account of accounts) { - expect(accountSet[`${account.first}_${account.last}_${account.age}`]).toBe(true) - } + }`); + + const data: { + all: Account[]; + } = res.getJson(); + + const accountSet: { [key: string]: boolean } = {}; + for (const account of data.all) { + expect(account.first).toBeTruthy(); + expect(account.last).toBeTruthy(); + expect(account.age).toBeTruthy(); + accountSet[`${account.first}_${account.last}_${account.age}`] = true; + } + + for (const account of accounts) { + expect(accountSet[`${account.first}_${account.last}_${account.age}`]).toBe( + true, + ); + } } type Profile = { - uid?: string - name: string - email: string - age: number -} + uid?: string; + name: string; + email: string; + age: number; +}; const profiles: Profile[] = [ - { name: "Alice", email: "alice@dgraph.io", age: 25 }, - { name: "Bob", email: "bob@dgraph.io", age: 28 }, - { name: "Prashant", email: "prashant@dgraph.io", age: 23 }, -] -const names: string[] = [] + { name: "Alice", email: "alice@dgraph.io", age: 25 }, + { name: "Bob", email: "bob@dgraph.io", age: 28 }, + { name: "Prashant", email: "prashant@dgraph.io", age: 23 }, +]; +const names: string[] = []; profiles.forEach((profile: Profile): void => { - names.push(profile.name) -}) + names.push(profile.name); +}); async function doUpsert(): Promise { - await performMutation(profiles[0]) - await performMutation(profiles[1]) - await performMutation(profiles[2]) - await checkMutationIntegrity(profiles) - const updatedProfile: Profile = { - name: "Prashant Shahi", - email: "prashant@dgraph.io", - age: 24, - } - await performUpsert(updatedProfile) - await checkUpsertIntegrity() + await performMutation(profiles[0]); + await performMutation(profiles[1]); + await performMutation(profiles[2]); + await checkMutationIntegrity(profiles); + const updatedProfile: Profile = { + name: "Prashant Shahi", + email: "prashant@dgraph.io", + age: 24, + }; + await performUpsert(updatedProfile); + await checkUpsertIntegrity(); } async function doInsertUpsert(): Promise { - await performMutation(profiles[0]) - await performMutation(profiles[1]) - await performMutation(profiles[2]) - const tempProfiles: Profile[] = JSON.parse(JSON.stringify(profiles)) - await checkMutationIntegrity(tempProfiles) - const updatedProfile: Profile = { - uid: "uid(profile)", - name: "Prashant Shahi", - email: "prashantshahi@dgraph.io", - age: 24, - } - await performUpsert(updatedProfile) - tempProfiles.push(updatedProfile) - await checkMutationIntegrity(tempProfiles) + await performMutation(profiles[0]); + await performMutation(profiles[1]); + await performMutation(profiles[2]); + const tempProfiles: Profile[] = JSON.parse(JSON.stringify(profiles)); + await checkMutationIntegrity(tempProfiles); + const updatedProfile: Profile = { + uid: "uid(profile)", + name: "Prashant Shahi", + email: "prashantshahi@dgraph.io", + age: 24, + }; + await performUpsert(updatedProfile); + tempProfiles.push(updatedProfile); + await checkMutationIntegrity(tempProfiles); } async function doJsonUpsert(): Promise { - await performJsonMutation(profiles[0]) - await performJsonMutation(profiles[1]) - await performJsonMutation(profiles[2]) - const tempProfiles: Profile[] = JSON.parse(JSON.stringify(profiles)) - await checkMutationIntegrity(tempProfiles) - - const updatedProfile: Profile = { - name: "Prashant Shahi", - email: "prashant@dgraph.io", - age: 24, - } - await performJsonUpsert(updatedProfile) - await checkUpsertIntegrity() - tempProfiles.pop() - tempProfiles.push(updatedProfile) - await checkMutationIntegrity(tempProfiles) + await performJsonMutation(profiles[0]); + await performJsonMutation(profiles[1]); + await performJsonMutation(profiles[2]); + const tempProfiles: Profile[] = JSON.parse(JSON.stringify(profiles)); + await checkMutationIntegrity(tempProfiles); + + const updatedProfile: Profile = { + name: "Prashant Shahi", + email: "prashant@dgraph.io", + age: 24, + }; + await performJsonUpsert(updatedProfile); + await checkUpsertIntegrity(); + tempProfiles.pop(); + tempProfiles.push(updatedProfile); + await checkMutationIntegrity(tempProfiles); } async function performJsonMutation(profile: Profile): Promise { - const txn = client.newTxn() - const mu = new dgraph.Mutation() - const blankNodeLabel = profile.name.toLocaleLowerCase() - profile.uid = `_:${blankNodeLabel}` - mu.setSetJson(profile) - - const res = await txn.mutate(mu) - await txn.commit() - const uid = res.getUidsMap().get(blankNodeLabel) - expect(uid).not.toEqual("") + const txn = client.newTxn(); + const mu = new dgraph.Mutation(); + const blankNodeLabel = profile.name.toLocaleLowerCase(); + profile.uid = `_:${blankNodeLabel}`; + mu.setSetJson(profile); + + const res = await txn.mutate(mu); + await txn.commit(); + const uid = res.getUidsMap().get(blankNodeLabel); + expect(uid).not.toEqual(""); } async function performMutation(profile: Profile): Promise { - const txn = client.newTxn() - const mu = new dgraph.Mutation() - const blankNodeLabel = `${profile.name.toLocaleLowerCase()}` + const txn = client.newTxn(); + const mu = new dgraph.Mutation(); + const blankNodeLabel = `${profile.name.toLocaleLowerCase()}`; - mu.setSetNquads(` + mu.setSetNquads(` _:${blankNodeLabel} "${profile.name}" . _:${blankNodeLabel} "${profile.email}" . _:${blankNodeLabel} "${profile.age}"^^ . - `) + `); - const res = await txn.mutate(mu) - await txn.commit() - const uid = res.getUidsMap().get(blankNodeLabel) - expect(uid).not.toEqual("") + const res = await txn.mutate(mu); + await txn.commit(); + const uid = res.getUidsMap().get(blankNodeLabel); + expect(uid).not.toEqual(""); } async function performUpsert(profile: Profile): Promise { - const query = `query { + const query = `query { profile as var(func: eq(email, "${profile.email}")) - }` - const mu = new dgraph.Mutation() - const blankNodeLabel = `uid(profile)` - mu.setSetNquads(` + }`; + const mu = new dgraph.Mutation(); + const blankNodeLabel = `uid(profile)`; + mu.setSetNquads(` ${blankNodeLabel} "${profile.name}" . ${blankNodeLabel} "${profile.email}" . ${blankNodeLabel} "${profile.age}"^^ . - `) + `); - await tryUpsert(client, query, mu, blankNodeLabel) + await tryUpsert(client, query, mu, blankNodeLabel); } async function performJsonUpsert(profile: Profile): Promise { - const query = `query { + const query = `query { profile as var(func: eq(email, "${profile.email}")) - }` - const mu = new dgraph.Mutation() - const blankNodeLabel = `uid(profile)` - profile.uid = blankNodeLabel - mu.setSetJson(profile) - const req = new dgraph.Request() - req.setQuery(query) - req.setMutationsList([mu]) - req.setCommitNow(true) - - const response = await client.newTxn().doRequest(req) - const uid = response.getUidsMap().get(blankNodeLabel) - expect(uid).not.toEqual("") + }`; + const mu = new dgraph.Mutation(); + const blankNodeLabel = `uid(profile)`; + profile.uid = blankNodeLabel; + mu.setSetJson(profile); + const req = new dgraph.Request(); + req.setQuery(query); + req.setMutationsList([mu]); + req.setCommitNow(true); + + const response = await client.newTxn().doRequest(req); + const uid = response.getUidsMap().get(blankNodeLabel); + expect(uid).not.toEqual(""); } async function checkMutationIntegrity(ourProfiles: Profile[]): Promise { - const query = `{ + const query = `{ all(func: anyofterms(name, "${names.join(" ")}")) { uid name email age } - }` - const res = await client.newTxn().query(query) - - const data: { - all: Profile[] - } = res.getJson() - - const profileSet: { [key: string]: boolean } = {} - for (const profile of data.all) { - expect(profile.name).toBeTruthy() - expect(profile.email).toBeTruthy() - expect(profile.age).toBeTruthy() - profileSet[`${profile.name}_${profile.email}_${profile.age}`] = true - } - - expect(data.all.length).toEqual(ourProfiles.length) - for (const profile of ourProfiles) { - expect(profileSet[`${profile.name}_${profile.email}_${profile.age}`]).toBe(true) - } + }`; + const res = await client.newTxn().query(query); + + const data: { + all: Profile[]; + } = res.getJson(); + + const profileSet: { [key: string]: boolean } = {}; + for (const profile of data.all) { + expect(profile.name).toBeTruthy(); + expect(profile.email).toBeTruthy(); + expect(profile.age).toBeTruthy(); + profileSet[`${profile.name}_${profile.email}_${profile.age}`] = true; + } + + expect(data.all.length).toEqual(ourProfiles.length); + for (const profile of ourProfiles) { + expect(profileSet[`${profile.name}_${profile.email}_${profile.age}`]).toBe( + true, + ); + } } async function checkUpsertIntegrity(): Promise { - const query = `{ + const query = `{ all(func: eq(email, "prashant@dgraph.io")) { name email age } - }` - const res = await client.newTxn().query(query) - - const data: { - all: Profile[] - } = res.getJson() - - const profileSet: { [key: string]: boolean } = {} - for (const profile of data.all) { - expect(profile.name).toBeTruthy() - expect(profile.email).toBeTruthy() - expect(profile.age).toBeTruthy() - profileSet[`${profile.name}_${profile.email}_${profile.age}`] = true - } - - const receivedObject: Profile = data.all[0] - const expectedObject: Profile = { - name: "Prashant Shahi", - email: "prashant@dgraph.io", - age: 24, - } - - expect(Object.keys(profileSet).length).toEqual(1) - expect(receivedObject).toEqual(expectedObject) + }`; + const res = await client.newTxn().query(query); + + const data: { + all: Profile[]; + } = res.getJson(); + + const profileSet: { [key: string]: boolean } = {}; + for (const profile of data.all) { + expect(profile.name).toBeTruthy(); + expect(profile.email).toBeTruthy(); + expect(profile.age).toBeTruthy(); + profileSet[`${profile.name}_${profile.email}_${profile.age}`] = true; + } + + const receivedObject: Profile = data.all[0]; + const expectedObject: Profile = { + name: "Prashant Shahi", + email: "prashant@dgraph.io", + age: 24, + }; + + expect(Object.keys(profileSet).length).toEqual(1); + expect(receivedObject).toEqual(expectedObject); } async function doInsertUpsertWithVars(): Promise { - await performMutation(profiles[0]) - const jsonObj = { - uid: "uid(person)", - name: "Prashant Shahi", - email: "prashantshahi@dgraph.io", - age: "24", - } - const query = `query q($email: string) { + await performMutation(profiles[0]); + const jsonObj = { + uid: "uid(person)", + name: "Prashant Shahi", + email: "prashantshahi@dgraph.io", + age: "24", + }; + const query = `query q($email: string) { person as q(func: eq(email, $email)) - }` - const vars = { - $email: "prashant@dgraph.io", - } - - const txn = client.newTxn() - const mu = new dgraph.Mutation() - mu.setSetJson(jsonObj) - - const req = new dgraph.Request() - const varsMap = req.getVarsMap() - req.setQuery(query) - Object.keys(vars).forEach((key: string) => { - varsMap.set(key, vars[key]) - }) - req.addMutations(mu) - req.setCommitNow(true) - - try { - // Update account only if matching uid found. - const response = await txn.doRequest(req) - const uid = response.getUidsMap().get("uid(person)") - expect(uid).not.toEqual("") - } finally { - await txn.discard() - } - - const updatedProfile: Profile = { - name: "Prashant Shahi", - email: "prashantshahi@dgraph.io", - age: 24, - } - const query2 = `query q($email: string) { + }`; + const vars = { + $email: "prashant@dgraph.io", + }; + + const txn = client.newTxn(); + const mu = new dgraph.Mutation(); + mu.setSetJson(jsonObj); + + const req = new dgraph.Request(); + const varsMap = req.getVarsMap(); + req.setQuery(query); + Object.keys(vars).forEach((key: string) => { + varsMap.set(key, vars[key]); + }); + req.addMutations(mu); + req.setCommitNow(true); + + try { + // Update account only if matching uid found. + const response = await txn.doRequest(req); + const uid = response.getUidsMap().get("uid(person)"); + expect(uid).not.toEqual(""); + } finally { + await txn.discard(); + } + + const updatedProfile: Profile = { + name: "Prashant Shahi", + email: "prashantshahi@dgraph.io", + age: 24, + }; + const query2 = `query q($email: string) { all(func: eq(email, $email)) { name email age } - }` - const vars2 = { - $email: "prashantshahi@dgraph.io", - } - const res = await client.newTxn().queryWithVars(query2, vars2) - const data: { - all: Profile[] - } = res.getJson() - const receivedObject: Profile = data.all[0] - expect(receivedObject).toEqual(updatedProfile) + }`; + const vars2 = { + $email: "prashantshahi@dgraph.io", + }; + const res = await client.newTxn().queryWithVars(query2, vars2); + const data: { + all: Profile[]; + } = res.getJson(); + const receivedObject: Profile = data.all[0]; + expect(receivedObject).toEqual(updatedProfile); } describe("upsert using doRequest", () => { - it("update existing data with upsert", async () => { - client = await setup() - await setSchema( - client, - ` + it("update existing data with upsert", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . email: string @index(exact) . age: int @index(int) . `, - ) - await doUpsert() - }) - - it("create new data with upsert", async () => { - client = await setup() - await setSchema( - client, - ` + ); + await doUpsert(); + }); + + it("create new data with upsert", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . email: string @index(exact) . age: int @index(int) . `, - ) - await doInsertUpsert() - }) - - it("create new data with GraphQL variables", async () => { - client = await setup() - await setSchema( - client, - ` + ); + await doInsertUpsert(); + }); + + it("create new data with GraphQL variables", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . email: string @index(exact) . age: int @index(int) . `, - ) - await doInsertUpsertWithVars() - }) - - it("successfully performs upsert loadset", async () => { - client = await setup() - await setSchema( - client, - ` + ); + await doInsertUpsertWithVars(); + }); + + it("successfully performs upsert loadset", async () => { + client = await setup(); + await setSchema( + client, + ` first: string @index(term) . last: string @index(hash) . age: int @index(int) . @@ -435,21 +439,21 @@ describe("upsert using doRequest", () => { age } `, - ) - await doUpserts() - await checkIntegrity() - }) - - it("successfully performs upsert using JSON", async () => { - client = await setup() - await setSchema( - client, - ` + ); + await doUpserts(); + await checkIntegrity(); + }); + + it("successfully performs upsert using JSON", async () => { + client = await setup(); + await setSchema( + client, + ` name: string @index(term) . email: string @index(exact) . age: int @index(int) . `, - ) - await doJsonUpsert() - }) -}) + ); + await doJsonUpsert(); + }); +}); diff --git a/tests/txn.spec.ts b/tests/txn.spec.ts index 09c5e38..dce78f7 100644 --- a/tests/txn.spec.ts +++ b/tests/txn.spec.ts @@ -3,206 +3,225 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../src" +import * as dgraph from "../src"; -import { setSchema, setup } from "./helper" +import { setSchema, setup } from "./helper"; -const timeout = 1 * 60 * 1000 // 1 minute in milliseconds +const timeout = 1 * 60 * 1000; // 1 minute in milliseconds -jest.setTimeout(timeout * 2) +jest.setTimeout(timeout * 2); -let client: dgraph.DgraphClient +let client: dgraph.DgraphClient; describe("txn", () => { - describe("queryWithVars", () => { - let uid - beforeAll(async () => { - client = await setup() - await setSchema(client, "name: string @index(exact) .") - - const mu = new dgraph.Mutation() - mu.setCommitNow(true) - mu.setSetNquads('_:alice "Alice" .') - const mutres = await client.newTxn().mutate(mu) - uid = mutres.getUidsMap().get("alice") - }) - - it("should query with variables", async () => { - let res = await client - .newTxn() - .queryWithVars("query me($a: string) { me(func: eq(name, $a)) { name }}", { - $a: "Alice", - }) - let resJson: { - me: { name: string }[] - } = res.getJson() - expect(resJson.me).toHaveLength(1) - expect(resJson.me[0].name).toEqual("Alice") - - res = await client - .newTxn() - .queryWithVars("query me($a: string) { me(func: eq(name, $a)) { name }}", { - $a: new String("Alice"), - $b: true, - }) - resJson = res.getJson() - expect(resJson.me).toHaveLength(1) - expect(resJson.me[0].name).toEqual("Alice") - }) - - it("should query with variables RDF", async () => { - let res = await client - .newTxn() - .queryRDFWithVars("query me($a: string) { me(func: eq(name, $a)) { name }}", { - $a: "Alice", - }) - let resRdf = res.getRdf_asB64() - let buff = Buffer.from(resRdf, "base64") - expect(buff.toString("utf-8")).toEqual(`<${uid}> "Alice" .\n`) - - res = await client - .newTxn() - .queryRDFWithVars("query me($a: string) { me(func: eq(name, $a)) { name }}", { - $a: new String("Alice"), - $b: true, - }) - resRdf = res.getRdf_asB64() - buff = Buffer.from(resRdf, "base64") - expect(buff.toString("utf-8")).toEqual(`<${uid}> "Alice" .\n`) - }) - - it("should ignore properties with non-string values", async () => { - const res = await client - .newTxn() - .queryWithVars("query me($a: string) { me(func: eq(name, $a)) { name }}", { - $a: 1, // non-string properties are ignored - }) - const resJson: { - me: { name: string }[] - } = res.getJson() - expect(resJson.me).toHaveLength(0) - }) - - it("should throw finished error if txn is already finished", async () => { - const txn = client.newTxn() - await txn.commit() - - const p = txn.query('{ me(func: eq(name, "Alice")) { name }}') - await expect(p).rejects.toBe(dgraph.ERR_FINISHED) - }) - - it("should succeed without increasing startTs (readOnly=true)", async () => { - const res = await client.newTxn().query('{ me(func: eq(name, "Alice")) { name }}') - const startTs = res.getTxn().getStartTs() - const res2 = await client - .newTxn({ readOnly: true }) - .query('{ me(func: eq(name, "Alice")) { name }}') - const startTs2 = res2.getTxn().getStartTs() - expect(startTs).not.toBe(startTs2) // we expect these to be different, the first query increases startTs - const res3 = await client - .newTxn({ readOnly: true }) - .query('{ me(func: eq(name, "Alice")) { name }}') - const startTs3 = res3.getTxn().getStartTs() - expect(startTs2).toBe(startTs3) // we expect these to be same, because readOnly doesn't increase startTs - }) - - it("should succeed without error (readOnly=true, bestEffort=true)", async () => { - const res = await client.newTxn().query('{ me(func: eq(name, "Alice")) { name }}') - const startTs = res.getTxn().getStartTs() - const res2 = await client - .newTxn({ readOnly: true, bestEffort: true }) - .query('{ me(func: eq(name, "Alice")) { name }}') - const startTs2 = res2.getTxn().getStartTs() - expect(startTs2).toBeGreaterThanOrEqual(startTs) - }) - - it("should throw error (readOnly=false, bestEffort=true)", () => { - const test = () => client.newTxn({ bestEffort: true }) - expect(test).toThrow(dgraph.ERR_BEST_EFFORT_REQUIRED_READ_ONLY) - }) - }) - - describe("mutate", () => { - beforeAll(async () => { - client = await setup() - await setSchema(client, "name: string @index(exact) .") - }) - - it("should throw finished error if txn is already finished", async () => { - const txn = client.newTxn() - await txn.commit() - - const mu = new dgraph.Mutation() - mu.setSetNquads('_:alice "Alice" .') - const p = txn.mutate(mu) - await expect(p).rejects.toBe(dgraph.ERR_FINISHED) - }) - - it("should throw error and discard if Stub.mutate throws an error", async () => { - const txn = client.newTxn() - - const mu = new dgraph.Mutation() - // There is an error in the mutation NQuad. - mu.setSetNquads('alice "Alice" .') - const p1 = txn.mutate(mu) - await expect(p1).rejects.toBeDefined() - - const p2 = txn.commit() - await expect(p2).rejects.toBe(dgraph.ERR_FINISHED) - }) - }) - - describe("commit", () => { - beforeAll(async () => { - client = await setup() - await setSchema(client, "name: string @index(exact) .") - }) - - it("should throw finished error if txn is already finished", async () => { - const txn = client.newTxn() - await txn.commit() - - const p = txn.commit() - await expect(p).rejects.toBe(dgraph.ERR_FINISHED) - }) - - it("should throw finished error after mutation with commitNow", async () => { - const txn = client.newTxn() - - const mu = new dgraph.Mutation() - mu.setSetNquads('_:alice "Alice" .') - mu.setCommitNow(true) - await txn.mutate(mu) - - const p = txn.commit() - await expect(p).rejects.toBe(dgraph.ERR_FINISHED) - }) - }) - - describe("discard", () => { - beforeAll(async () => { - client = await setup() - await setSchema(client, "name: string @index(exact) .") - }) - - it("should resolve and do nothing if txn is already finished", async () => { - const txn = client.newTxn() - await txn.commit() - - const p = txn.discard() - await expect(p).resolves.toBeUndefined() - }) - - it("should resolve and do nothing after mutation with commitNow", async () => { - const txn = client.newTxn() - - const mu = new dgraph.Mutation() - mu.setSetNquads('_:alice "Alice" .') - mu.setCommitNow(true) - await txn.mutate(mu) - - const p = txn.discard() - await expect(p).resolves.toBeUndefined() - }) - }) -}) + describe("queryWithVars", () => { + let uid; + beforeAll(async () => { + client = await setup(); + await setSchema(client, "name: string @index(exact) ."); + + const mu = new dgraph.Mutation(); + mu.setCommitNow(true); + mu.setSetNquads('_:alice "Alice" .'); + const mutres = await client.newTxn().mutate(mu); + uid = mutres.getUidsMap().get("alice"); + }); + + it("should query with variables", async () => { + let res = await client + .newTxn() + .queryWithVars( + "query me($a: string) { me(func: eq(name, $a)) { name }}", + { + $a: "Alice", + }, + ); + let resJson: { + me: { name: string }[]; + } = res.getJson(); + expect(resJson.me).toHaveLength(1); + expect(resJson.me[0].name).toEqual("Alice"); + + res = await client + .newTxn() + .queryWithVars( + "query me($a: string) { me(func: eq(name, $a)) { name }}", + { + $a: new String("Alice"), + $b: true, + }, + ); + resJson = res.getJson(); + expect(resJson.me).toHaveLength(1); + expect(resJson.me[0].name).toEqual("Alice"); + }); + + it("should query with variables RDF", async () => { + let res = await client + .newTxn() + .queryRDFWithVars( + "query me($a: string) { me(func: eq(name, $a)) { name }}", + { + $a: "Alice", + }, + ); + let resRdf = res.getRdf_asB64(); + let buff = Buffer.from(resRdf, "base64"); + expect(buff.toString("utf-8")).toEqual(`<${uid}> "Alice" .\n`); + + res = await client + .newTxn() + .queryRDFWithVars( + "query me($a: string) { me(func: eq(name, $a)) { name }}", + { + $a: new String("Alice"), + $b: true, + }, + ); + resRdf = res.getRdf_asB64(); + buff = Buffer.from(resRdf, "base64"); + expect(buff.toString("utf-8")).toEqual(`<${uid}> "Alice" .\n`); + }); + + it("should ignore properties with non-string values", async () => { + const res = await client + .newTxn() + .queryWithVars( + "query me($a: string) { me(func: eq(name, $a)) { name }}", + { + $a: 1, // non-string properties are ignored + }, + ); + const resJson: { + me: { name: string }[]; + } = res.getJson(); + expect(resJson.me).toHaveLength(0); + }); + + it("should throw finished error if txn is already finished", async () => { + const txn = client.newTxn(); + await txn.commit(); + + const p = txn.query('{ me(func: eq(name, "Alice")) { name }}'); + await expect(p).rejects.toBe(dgraph.ERR_FINISHED); + }); + + it("should succeed without increasing startTs (readOnly=true)", async () => { + const res = await client + .newTxn() + .query('{ me(func: eq(name, "Alice")) { name }}'); + const startTs = res.getTxn().getStartTs(); + const res2 = await client + .newTxn({ readOnly: true }) + .query('{ me(func: eq(name, "Alice")) { name }}'); + const startTs2 = res2.getTxn().getStartTs(); + expect(startTs).not.toBe(startTs2); // we expect these to be different, the first query increases startTs + const res3 = await client + .newTxn({ readOnly: true }) + .query('{ me(func: eq(name, "Alice")) { name }}'); + const startTs3 = res3.getTxn().getStartTs(); + expect(startTs2).toBe(startTs3); // we expect these to be same, because readOnly doesn't increase startTs + }); + + it("should succeed without error (readOnly=true, bestEffort=true)", async () => { + const res = await client + .newTxn() + .query('{ me(func: eq(name, "Alice")) { name }}'); + const startTs = res.getTxn().getStartTs(); + const res2 = await client + .newTxn({ readOnly: true, bestEffort: true }) + .query('{ me(func: eq(name, "Alice")) { name }}'); + const startTs2 = res2.getTxn().getStartTs(); + expect(startTs2).toBeGreaterThanOrEqual(startTs); + }); + + it("should throw error (readOnly=false, bestEffort=true)", () => { + const test = () => client.newTxn({ bestEffort: true }); + expect(test).toThrow(dgraph.ERR_BEST_EFFORT_REQUIRED_READ_ONLY); + }); + }); + + describe("mutate", () => { + beforeAll(async () => { + client = await setup(); + await setSchema(client, "name: string @index(exact) ."); + }); + + it("should throw finished error if txn is already finished", async () => { + const txn = client.newTxn(); + await txn.commit(); + + const mu = new dgraph.Mutation(); + mu.setSetNquads('_:alice "Alice" .'); + const p = txn.mutate(mu); + await expect(p).rejects.toBe(dgraph.ERR_FINISHED); + }); + + it("should throw error and discard if Stub.mutate throws an error", async () => { + const txn = client.newTxn(); + + const mu = new dgraph.Mutation(); + // There is an error in the mutation NQuad. + mu.setSetNquads('alice "Alice" .'); + const p1 = txn.mutate(mu); + await expect(p1).rejects.toBeDefined(); + + const p2 = txn.commit(); + await expect(p2).rejects.toBe(dgraph.ERR_FINISHED); + }); + }); + + describe("commit", () => { + beforeAll(async () => { + client = await setup(); + await setSchema(client, "name: string @index(exact) ."); + }); + + it("should throw finished error if txn is already finished", async () => { + const txn = client.newTxn(); + await txn.commit(); + + const p = txn.commit(); + await expect(p).rejects.toBe(dgraph.ERR_FINISHED); + }); + + it("should throw finished error after mutation with commitNow", async () => { + const txn = client.newTxn(); + + const mu = new dgraph.Mutation(); + mu.setSetNquads('_:alice "Alice" .'); + mu.setCommitNow(true); + await txn.mutate(mu); + + const p = txn.commit(); + await expect(p).rejects.toBe(dgraph.ERR_FINISHED); + }); + }); + + describe("discard", () => { + beforeAll(async () => { + client = await setup(); + await setSchema(client, "name: string @index(exact) ."); + }); + + it("should resolve and do nothing if txn is already finished", async () => { + const txn = client.newTxn(); + await txn.commit(); + + const p = txn.discard(); + await expect(p).resolves.toBeUndefined(); + }); + + it("should resolve and do nothing after mutation with commitNow", async () => { + const txn = client.newTxn(); + + const mu = new dgraph.Mutation(); + mu.setSetNquads('_:alice "Alice" .'); + mu.setCommitNow(true); + await txn.mutate(mu); + + const p = txn.discard(); + await expect(p).resolves.toBeUndefined(); + }); + }); +}); diff --git a/tests/types.spec.ts b/tests/types.spec.ts index 4eaef1c..43b5ca7 100644 --- a/tests/types.spec.ts +++ b/tests/types.spec.ts @@ -3,221 +3,221 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as dgraph from "../src" -import { b64ToStr, strToB64, strToU8, u8ToStr } from "../src/util" +import * as dgraph from "../src"; +import { b64ToStr, strToB64, strToU8, u8ToStr } from "../src/util"; -const obj = { k1: "v1" } -const setNquads = '_:alice "Alice"' -const delNquads = "<0x7569> * * ." +const obj = { k1: "v1" }; +const setNquads = '_:alice "Alice"'; +const delNquads = "<0x7569> * * ."; describe("types", () => { - describe("Payload", () => { - it("should set and get data", () => { - const p = new dgraph.Payload() - - p.setData(obj) - let o = p.getData() - expect(o).toEqual(obj) - - p.setData(strToB64(JSON.stringify(obj))) - o = p.getData() - expect(o).toEqual(obj) - - p.setData(strToU8(JSON.stringify(obj))) - o = p.getData() - expect(o).toEqual(obj) - }) - - it("should get data as b64", () => { - const p = new dgraph.Payload() - p.setData(obj) - - const b64 = p.getData_asB64() - const o = JSON.parse(b64ToStr(b64)) - expect(o).toEqual(obj) - }) - - it("should get data as u8", () => { - const p = new dgraph.Payload() - p.setData(obj) - - const u8 = p.getData_asU8() - const o = JSON.parse(u8ToStr(u8)) - expect(o).toEqual(obj) - }) - }) - - describe("Response", () => { - it("should set and get json", () => { - const p = new dgraph.Response() - - p.setJson(obj) - let o = p.getJson() - expect(o).toEqual(obj) - - p.setJson(strToB64(JSON.stringify(obj))) - o = p.getJson() - expect(o).toEqual(obj) - - p.setJson(strToU8(JSON.stringify(obj))) - o = p.getJson() - expect(o).toEqual(obj) - }) - - it("should get json as b64", () => { - const p = new dgraph.Response() - p.setJson(obj) - - const b64 = p.getJson_asB64() - const o = JSON.parse(b64ToStr(b64)) - expect(o).toEqual(obj) - }) - - it("should get json as u8", () => { - const p = new dgraph.Response() - p.setJson(obj) - - const u8 = p.getJson_asU8() - const o = JSON.parse(u8ToStr(u8)) - expect(o).toEqual(obj) - }) - }) - - describe("Mutation", () => { - it("should set and get setJson", () => { - const p = new dgraph.Mutation() - - p.setSetJson(obj) - let o = p.getSetJson() - expect(o).toEqual(obj) - - p.setSetJson(strToB64(JSON.stringify(obj))) - o = p.getSetJson() - expect(o).toEqual(obj) - - p.setSetJson(strToU8(JSON.stringify(obj))) - o = p.getSetJson() - expect(o).toEqual(obj) - }) - - it("should get setJson as b64", () => { - const p = new dgraph.Mutation() - p.setSetJson(obj) - - const b64 = p.getSetJson_asB64() - const o = JSON.parse(b64ToStr(b64)) - expect(o).toEqual(obj) - }) - - it("should get setJson as u8", () => { - const p = new dgraph.Mutation() - p.setSetJson(obj) - - const u8 = p.getSetJson_asU8() - const o = JSON.parse(u8ToStr(u8)) - expect(o).toEqual(obj) - }) - - it("should set and get deleteJson", () => { - const p = new dgraph.Mutation() - - p.setDeleteJson(obj) - let o = p.getDeleteJson() - expect(o).toEqual(obj) - - p.setDeleteJson(strToB64(JSON.stringify(obj))) - o = p.getDeleteJson() - expect(o).toEqual(obj) - - p.setDeleteJson(strToU8(JSON.stringify(obj))) - o = p.getDeleteJson() - expect(o).toEqual(obj) - }) - - it("should get deleteJson as b64", () => { - const p = new dgraph.Mutation() - p.setDeleteJson(obj) - - const b64 = p.getDeleteJson_asB64() - const o = JSON.parse(b64ToStr(b64)) - expect(o).toEqual(obj) - }) - - it("should get deleteJson as u8", () => { - const p = new dgraph.Mutation() - p.setDeleteJson(obj) - - const u8 = p.getDeleteJson_asU8() - const o = JSON.parse(u8ToStr(u8)) - expect(o).toEqual(obj) - }) - - it("should set and get setNquads", () => { - const p = new dgraph.Mutation() - - p.setSetNquads(setNquads) - let nq = p.getSetNquads() - expect(nq).toEqual(setNquads) - - p.setSetNquads(strToB64(setNquads)) - nq = p.getSetNquads() - expect(nq).toEqual(setNquads) - - p.setSetNquads(strToU8(setNquads)) - nq = p.getSetNquads() - expect(nq).toEqual(setNquads) - }) - - it("should get setNquads as b64", () => { - const p = new dgraph.Mutation() - p.setSetNquads(setNquads) - - const b64 = p.getSetNquads_asB64() - const nq = b64ToStr(b64) - expect(nq).toEqual(setNquads) - }) - - it("should get setNquads as u8", () => { - const p = new dgraph.Mutation() - p.setSetNquads(setNquads) - - const u8 = p.getSetNquads_asU8() - const nq = u8ToStr(u8) - expect(nq).toEqual(setNquads) - }) - - it("should set and get delNquads", () => { - const p = new dgraph.Mutation() - - p.setDelNquads(delNquads) - let nq = p.getDelNquads() - expect(nq).toEqual(delNquads) - - p.setDelNquads(strToB64(delNquads)) - nq = p.getDelNquads() - expect(nq).toEqual(delNquads) - - p.setDelNquads(strToU8(delNquads)) - nq = p.getDelNquads() - expect(nq).toEqual(delNquads) - }) - - it("should get delNquads as b64", () => { - const p = new dgraph.Mutation() - p.setDelNquads(delNquads) - - const b64 = p.getDelNquads_asB64() - const nq = b64ToStr(b64) - expect(nq).toEqual(delNquads) - }) - - it("should get delNquads as u8", () => { - const p = new dgraph.Mutation() - p.setDelNquads(delNquads) - - const u8 = p.getDelNquads_asU8() - const nq = u8ToStr(u8) - expect(nq).toEqual(delNquads) - }) - }) -}) + describe("Payload", () => { + it("should set and get data", () => { + const p = new dgraph.Payload(); + + p.setData(obj); + let o = p.getData(); + expect(o).toEqual(obj); + + p.setData(strToB64(JSON.stringify(obj))); + o = p.getData(); + expect(o).toEqual(obj); + + p.setData(strToU8(JSON.stringify(obj))); + o = p.getData(); + expect(o).toEqual(obj); + }); + + it("should get data as b64", () => { + const p = new dgraph.Payload(); + p.setData(obj); + + const b64 = p.getData_asB64(); + const o = JSON.parse(b64ToStr(b64)); + expect(o).toEqual(obj); + }); + + it("should get data as u8", () => { + const p = new dgraph.Payload(); + p.setData(obj); + + const u8 = p.getData_asU8(); + const o = JSON.parse(u8ToStr(u8)); + expect(o).toEqual(obj); + }); + }); + + describe("Response", () => { + it("should set and get json", () => { + const p = new dgraph.Response(); + + p.setJson(obj); + let o = p.getJson(); + expect(o).toEqual(obj); + + p.setJson(strToB64(JSON.stringify(obj))); + o = p.getJson(); + expect(o).toEqual(obj); + + p.setJson(strToU8(JSON.stringify(obj))); + o = p.getJson(); + expect(o).toEqual(obj); + }); + + it("should get json as b64", () => { + const p = new dgraph.Response(); + p.setJson(obj); + + const b64 = p.getJson_asB64(); + const o = JSON.parse(b64ToStr(b64)); + expect(o).toEqual(obj); + }); + + it("should get json as u8", () => { + const p = new dgraph.Response(); + p.setJson(obj); + + const u8 = p.getJson_asU8(); + const o = JSON.parse(u8ToStr(u8)); + expect(o).toEqual(obj); + }); + }); + + describe("Mutation", () => { + it("should set and get setJson", () => { + const p = new dgraph.Mutation(); + + p.setSetJson(obj); + let o = p.getSetJson(); + expect(o).toEqual(obj); + + p.setSetJson(strToB64(JSON.stringify(obj))); + o = p.getSetJson(); + expect(o).toEqual(obj); + + p.setSetJson(strToU8(JSON.stringify(obj))); + o = p.getSetJson(); + expect(o).toEqual(obj); + }); + + it("should get setJson as b64", () => { + const p = new dgraph.Mutation(); + p.setSetJson(obj); + + const b64 = p.getSetJson_asB64(); + const o = JSON.parse(b64ToStr(b64)); + expect(o).toEqual(obj); + }); + + it("should get setJson as u8", () => { + const p = new dgraph.Mutation(); + p.setSetJson(obj); + + const u8 = p.getSetJson_asU8(); + const o = JSON.parse(u8ToStr(u8)); + expect(o).toEqual(obj); + }); + + it("should set and get deleteJson", () => { + const p = new dgraph.Mutation(); + + p.setDeleteJson(obj); + let o = p.getDeleteJson(); + expect(o).toEqual(obj); + + p.setDeleteJson(strToB64(JSON.stringify(obj))); + o = p.getDeleteJson(); + expect(o).toEqual(obj); + + p.setDeleteJson(strToU8(JSON.stringify(obj))); + o = p.getDeleteJson(); + expect(o).toEqual(obj); + }); + + it("should get deleteJson as b64", () => { + const p = new dgraph.Mutation(); + p.setDeleteJson(obj); + + const b64 = p.getDeleteJson_asB64(); + const o = JSON.parse(b64ToStr(b64)); + expect(o).toEqual(obj); + }); + + it("should get deleteJson as u8", () => { + const p = new dgraph.Mutation(); + p.setDeleteJson(obj); + + const u8 = p.getDeleteJson_asU8(); + const o = JSON.parse(u8ToStr(u8)); + expect(o).toEqual(obj); + }); + + it("should set and get setNquads", () => { + const p = new dgraph.Mutation(); + + p.setSetNquads(setNquads); + let nq = p.getSetNquads(); + expect(nq).toEqual(setNquads); + + p.setSetNquads(strToB64(setNquads)); + nq = p.getSetNquads(); + expect(nq).toEqual(setNquads); + + p.setSetNquads(strToU8(setNquads)); + nq = p.getSetNquads(); + expect(nq).toEqual(setNquads); + }); + + it("should get setNquads as b64", () => { + const p = new dgraph.Mutation(); + p.setSetNquads(setNquads); + + const b64 = p.getSetNquads_asB64(); + const nq = b64ToStr(b64); + expect(nq).toEqual(setNquads); + }); + + it("should get setNquads as u8", () => { + const p = new dgraph.Mutation(); + p.setSetNquads(setNquads); + + const u8 = p.getSetNquads_asU8(); + const nq = u8ToStr(u8); + expect(nq).toEqual(setNquads); + }); + + it("should set and get delNquads", () => { + const p = new dgraph.Mutation(); + + p.setDelNquads(delNquads); + let nq = p.getDelNquads(); + expect(nq).toEqual(delNquads); + + p.setDelNquads(strToB64(delNquads)); + nq = p.getDelNquads(); + expect(nq).toEqual(delNquads); + + p.setDelNquads(strToU8(delNquads)); + nq = p.getDelNquads(); + expect(nq).toEqual(delNquads); + }); + + it("should get delNquads as b64", () => { + const p = new dgraph.Mutation(); + p.setDelNquads(delNquads); + + const b64 = p.getDelNquads_asB64(); + const nq = b64ToStr(b64); + expect(nq).toEqual(delNquads); + }); + + it("should get delNquads as u8", () => { + const p = new dgraph.Mutation(); + p.setDelNquads(delNquads); + + const u8 = p.getDelNquads_asU8(); + const nq = u8ToStr(u8); + expect(nq).toEqual(delNquads); + }); + }); +}); diff --git a/tests/util.spec.ts b/tests/util.spec.ts index b55f47c..2fbd3dd 100644 --- a/tests/util.spec.ts +++ b/tests/util.spec.ts @@ -3,164 +3,199 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as grpc from "@grpc/grpc-js" +import * as grpc from "@grpc/grpc-js"; // Non-exported functions. -import { isAbortedError, isBase64, isConflictError, promisify1, promisify3 } from "../src/util" - -function fnAddThisVal1(a: number, cb: (err?: Error, res?: number) => void): void { - cb(undefined, (<{ val: number }>this).val + a) +import { + isAbortedError, + isBase64, + isConflictError, + promisify1, + promisify3, +} from "../src/util"; + +function fnAddThisVal1( + a: number, + cb: (err?: Error, res?: number) => void, +): void { + cb(undefined, (<{ val: number }>this).val + a); } function fnAddThisVal3( - a: number, - b: number, - c: number, - cb: (err?: Error, res?: number) => void, + a: number, + b: number, + c: number, + cb: (err?: Error, res?: number) => void, ): void { - cb(undefined, (<{ val: number }>this).val + a + b + c) + cb(undefined, (<{ val: number }>this).val + a + b + c); } describe("util", () => { - describe("promisify1", () => { - it("should handle valid response in callback", async () => { - const f = (_: number, cb: (err?: Error, res?: number) => void) => { - cb(undefined, 2) - } - - await expect(promisify1(f, undefined)(1)).resolves.toBe(2) - }) - - it("should handle error in callback", async () => { - const e = new Error() - const f = (_: number, cb: (err?: Error, res?: number) => void) => { - cb(e) - } - - await expect(promisify1(f, undefined)(1)).rejects.toBe(e) - }) - - it("should handle error if valid response is also present in callback", async () => { - const e = new Error() - const f = (_: number, cb: (err?: Error, res?: number) => void) => { - cb(e, 2) - } - - await expect(promisify1(f, undefined)(1)).rejects.toBe(e) - }) - - it("should handle callback called without arguments", async () => { - const f = (_: number, cb: (err?: Error, res?: number) => void) => { - cb() - } - - await expect(promisify1(f, undefined)(1)).resolves.toBeUndefined() - }) - - it("should handle thisContext argument", async () => { - const o = { - val: 45, - } - - await expect(promisify1(fnAddThisVal1, o)(5)).resolves.toEqual(50) - }) - }) - - describe("promisify3", () => { - it("should handle valid response in callback", async () => { - const f = (_A: number, b: number, _C: number, cb: (err?: Error, res?: number) => void) => { - cb(undefined, b) - } - - await expect(promisify3(f, undefined)(1, 2, 3)).resolves.toBe(2) - await expect(promisify3(f, undefined)(1, 22, 3)).resolves.toBe(22) - }) - - it("should handle error in callback", async () => { - const e = new Error() - const f = (_A: number, _B: number, _C: number, cb: (err?: Error, res?: number) => void) => { - cb(e) - } - - await expect(promisify3(f, undefined)(1, 2, 3)).rejects.toBe(e) - }) - - it("should handle error if valid response is also present in callback", async () => { - const e = new Error() - const f = (_A: number, b: number, _C: number, cb: (err?: Error, res?: number) => void) => { - cb(e, b) - } - - await expect(promisify3(f, undefined)(1, 2, 3)).rejects.toBe(e) - }) - - it("should handle callback called without arguments", async () => { - const f = (_A: number, _B: number, _C: number, cb: (err?: Error, res?: number) => void) => { - cb() - } - - await expect(promisify3(f, undefined)(1, 2, 3)).resolves.toBeUndefined() - }) - - it("should handle thisContext argument", async () => { - const o = { - val: 45, - } - - await expect(promisify3(fnAddThisVal3, o)(5, 10, 15)).resolves.toEqual(75) - }) - }) - - describe("isAbortedError", () => { - it("should return false for undefined and null", () => { - expect(isAbortedError(undefined)).toBe(false) - }) - - it("should return false for objects not having code property", () => { - expect(isAbortedError(() => true)).toBe(false) - expect(isAbortedError([1, 2, 3])).toBe(false) - expect(isAbortedError({ a: 1, b: "b" })).toBe(false) - }) - - it("should return true for objects correct having correct code value", () => { - expect(isAbortedError({ code: grpc.status.ABORTED })).toBe(true) - expect(isAbortedError({ code: grpc.status.FAILED_PRECONDITION })).toBe(false) - expect(isAbortedError({ code: grpc.status.OK })).toBe(false) - }) - }) - - describe("isConflictError", () => { - it("should return false for undefined", () => { - expect(isConflictError(undefined)).toBe(false) - }) - - it("should return false for objects not having code property", () => { - expect(isConflictError(() => true)).toBe(false) - expect(isConflictError([1, 2, 3])).toBe(false) - expect(isConflictError({ a: 1, b: "b" })).toBe(false) - }) - - it("should return true for objects correct having correct code value", () => { - expect(isConflictError({ code: grpc.status.ABORTED })).toBe(true) - expect(isConflictError({ code: grpc.status.FAILED_PRECONDITION })).toBe(true) - expect(isConflictError({ code: grpc.status.OK })).toBe(false) - }) - }) - - describe("isBase64", () => { - it("should return true for valid base64 strings", () => { - expect(isBase64("")).toBe(true) - expect(isBase64("yz==")).toBe(true) - expect(isBase64("uwAxyz==")).toBe(true) - expect(isBase64("uwAxyzp=")).toBe(true) - expect(isBase64("uwAxyzp5")).toBe(true) - }) - - it("should return false for invalid base64 strings", () => { - expect(isBase64("a")).toBe(false) - expect(isBase64("abcdef")).toBe(false) - expect(isBase64("sad$")).toBe(false) - expect(isBase64("dddddd=")).toBe(false) - }) - }) -}) + describe("promisify1", () => { + it("should handle valid response in callback", async () => { + const f = (_: number, cb: (err?: Error, res?: number) => void) => { + cb(undefined, 2); + }; + + await expect(promisify1(f, undefined)(1)).resolves.toBe(2); + }); + + it("should handle error in callback", async () => { + const e = new Error(); + const f = (_: number, cb: (err?: Error, res?: number) => void) => { + cb(e); + }; + + await expect(promisify1(f, undefined)(1)).rejects.toBe(e); + }); + + it("should handle error if valid response is also present in callback", async () => { + const e = new Error(); + const f = (_: number, cb: (err?: Error, res?: number) => void) => { + cb(e, 2); + }; + + await expect(promisify1(f, undefined)(1)).rejects.toBe(e); + }); + + it("should handle callback called without arguments", async () => { + const f = (_: number, cb: (err?: Error, res?: number) => void) => { + cb(); + }; + + await expect(promisify1(f, undefined)(1)).resolves.toBeUndefined(); + }); + + it("should handle thisContext argument", async () => { + const o = { + val: 45, + }; + + await expect(promisify1(fnAddThisVal1, o)(5)).resolves.toEqual(50); + }); + }); + + describe("promisify3", () => { + it("should handle valid response in callback", async () => { + const f = ( + _A: number, + b: number, + _C: number, + cb: (err?: Error, res?: number) => void, + ) => { + cb(undefined, b); + }; + + await expect(promisify3(f, undefined)(1, 2, 3)).resolves.toBe(2); + await expect(promisify3(f, undefined)(1, 22, 3)).resolves.toBe(22); + }); + + it("should handle error in callback", async () => { + const e = new Error(); + const f = ( + _A: number, + _B: number, + _C: number, + cb: (err?: Error, res?: number) => void, + ) => { + cb(e); + }; + + await expect(promisify3(f, undefined)(1, 2, 3)).rejects.toBe(e); + }); + + it("should handle error if valid response is also present in callback", async () => { + const e = new Error(); + const f = ( + _A: number, + b: number, + _C: number, + cb: (err?: Error, res?: number) => void, + ) => { + cb(e, b); + }; + + await expect(promisify3(f, undefined)(1, 2, 3)).rejects.toBe(e); + }); + + it("should handle callback called without arguments", async () => { + const f = ( + _A: number, + _B: number, + _C: number, + cb: (err?: Error, res?: number) => void, + ) => { + cb(); + }; + + await expect(promisify3(f, undefined)(1, 2, 3)).resolves.toBeUndefined(); + }); + + it("should handle thisContext argument", async () => { + const o = { + val: 45, + }; + + await expect(promisify3(fnAddThisVal3, o)(5, 10, 15)).resolves.toEqual( + 75, + ); + }); + }); + + describe("isAbortedError", () => { + it("should return false for undefined and null", () => { + expect(isAbortedError(undefined)).toBe(false); + }); + + it("should return false for objects not having code property", () => { + expect(isAbortedError(() => true)).toBe(false); + expect(isAbortedError([1, 2, 3])).toBe(false); + expect(isAbortedError({ a: 1, b: "b" })).toBe(false); + }); + + it("should return true for objects correct having correct code value", () => { + expect(isAbortedError({ code: grpc.status.ABORTED })).toBe(true); + expect(isAbortedError({ code: grpc.status.FAILED_PRECONDITION })).toBe( + false, + ); + expect(isAbortedError({ code: grpc.status.OK })).toBe(false); + }); + }); + + describe("isConflictError", () => { + it("should return false for undefined", () => { + expect(isConflictError(undefined)).toBe(false); + }); + + it("should return false for objects not having code property", () => { + expect(isConflictError(() => true)).toBe(false); + expect(isConflictError([1, 2, 3])).toBe(false); + expect(isConflictError({ a: 1, b: "b" })).toBe(false); + }); + + it("should return true for objects correct having correct code value", () => { + expect(isConflictError({ code: grpc.status.ABORTED })).toBe(true); + expect(isConflictError({ code: grpc.status.FAILED_PRECONDITION })).toBe( + true, + ); + expect(isConflictError({ code: grpc.status.OK })).toBe(false); + }); + }); + + describe("isBase64", () => { + it("should return true for valid base64 strings", () => { + expect(isBase64("")).toBe(true); + expect(isBase64("yz==")).toBe(true); + expect(isBase64("uwAxyz==")).toBe(true); + expect(isBase64("uwAxyzp=")).toBe(true); + expect(isBase64("uwAxyzp5")).toBe(true); + }); + + it("should return false for invalid base64 strings", () => { + expect(isBase64("a")).toBe(false); + expect(isBase64("abcdef")).toBe(false); + expect(isBase64("sad$")).toBe(false); + expect(isBase64("dddddd=")).toBe(false); + }); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index 02fed3f..3630228 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,23 +1,23 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": ["es2015"], - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "alwaysStrict": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitAny": false, - "noImplicitThis": false, - "strictNullChecks": false, - "removeComments": false, - "declaration": true, - "outDir": "lib", - "baseUrl": "." - }, - "include": ["src/**/*", "tests/**/*"] + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2015"], + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "alwaysStrict": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitAny": false, + "noImplicitThis": false, + "strictNullChecks": false, + "removeComments": false, + "declaration": true, + "outDir": "lib", + "baseUrl": "." + }, + "include": ["src/**/*", "tests/**/*"] } diff --git a/tsconfig.release.json b/tsconfig.release.json index 8f1dea5..bc73190 100644 --- a/tsconfig.release.json +++ b/tsconfig.release.json @@ -1,7 +1,7 @@ { - "extends": "./tsconfig.json", - "compilerOptions": { - "removeComments": true - }, - "include": ["src/**/*"] + "extends": "./tsconfig.json", + "compilerOptions": { + "removeComments": true + }, + "include": ["src/**/*"] }