From 821172f8ea63733fca8e1ee6790224d314658cd3 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 12:21:43 +0530 Subject: [PATCH 01/23] Add a test for CLI commands --- jest.config.js | 6 + package.json | 7 +- test/cli.test.ts | 28 + tsconfig.json | 4 +- yarn.lock | 1988 +++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 2026 insertions(+), 7 deletions(-) create mode 100644 jest.config.js create mode 100644 test/cli.test.ts diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..a09d20d --- /dev/null +++ b/jest.config.js @@ -0,0 +1,6 @@ +/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + setupFiles: ["dotenv/config"] +}; diff --git a/package.json b/package.json index 259d73d..0d2fe56 100644 --- a/package.json +++ b/package.json @@ -7,21 +7,26 @@ "license": "UNLICENSED", "devDependencies": { "@types/fs-extra": "^9.0.13", + "@types/jest": "^27.4.1", "@types/js-yaml": "^4.0.5", "@types/lodash": "^4.14.182", "@types/node": "^17.0.25", "@types/yargs": "^17.0.10", + "jest": "29.0.0", + "ts-jest": "^29.0.2", + "dotenv": "^16.3.2", "typescript": "^4.6.3" }, "dependencies": { - "fs-extra": "^10.1.0", "@cerc-io/laconic-sdk": "^0.1.14", + "fs-extra": "^10.1.0", "js-yaml": "^3.14.1", "lodash": "^4.17.21", "lodash-clean": "^2.2.3", "yargs": "^17.4.1" }, "scripts": { + "test": "jest --runInBand --verbose --testPathPattern=test", "lint": "eslint .", "clean": "rm -rf ./dist", "build": "tsc" diff --git a/test/cli.test.ts b/test/cli.test.ts new file mode 100644 index 0000000..a0f512c --- /dev/null +++ b/test/cli.test.ts @@ -0,0 +1,28 @@ +import { spawnSync } from 'child_process'; + +describe('Test laconic CLI commands', () => { + beforeAll(async () => { + // TODO: Install laconic binary (create symlink in path) + // TODO: Create a temp directory to run the tests in and cd into that + }); + + afterAll(async () => { + // TODO: Cleanup temp dir + }); + + test('laconic', async () => { + const result = spawnSync('laconic'); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + // Expect error with usage string + expect(output).toBe(''); + expect(errorOutput).toContain('laconic '); + expect(result.status).toBe(1); + }); + + describe('laconic ', () => { + // TODO: Test subcommands + }); +}); diff --git a/tsconfig.json b/tsconfig.json index 77a55a9..7e6e42a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -97,5 +97,7 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } + }, + "include": ["src"], + "exclude": ["test"] } diff --git a/yarn.lock b/yarn.lock index 4523d33..eb1e460 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,301 @@ # yarn lockfile v1 +"@ampproject/remapping@^2.2.0": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" + integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" + integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== + dependencies: + "@babel/highlight" "^7.23.4" + chalk "^2.4.2" + +"@babel/compat-data@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" + integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== + +"@babel/core@^7.11.6", "@babel/core@^7.12.3": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.7.tgz#4d8016e06a14b5f92530a13ed0561730b5c6483f" + integrity sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.23.7" + "@babel/parser" "^7.23.6" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.7" + "@babel/types" "^7.23.6" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.23.6", "@babel/generator@^7.7.2": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e" + integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== + dependencies: + "@babel/types" "^7.23.6" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + +"@babel/helper-compilation-targets@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" + integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== + dependencies: + "@babel/compat-data" "^7.23.5" + "@babel/helper-validator-option" "^7.23.5" + browserslist "^4.22.2" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== + +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== + dependencies: + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" + +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-module-imports@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" + integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== + dependencies: + "@babel/types" "^7.22.15" + +"@babel/helper-module-transforms@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" + integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.20" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== + +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" + integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== + +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/helper-validator-option@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" + integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== + +"@babel/helpers@^7.23.7": + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.8.tgz#fc6b2d65b16847fd50adddbd4232c76378959e34" + integrity sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ== + dependencies: + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.7" + "@babel/types" "^7.23.6" + +"@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b" + integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.8.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-import-meta@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.7.2": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473" + integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-typescript@^7.7.2": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz#24f460c85dbbc983cd2b9c4994178bcc01df958f" + integrity sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/template@^7.22.15", "@babel/template@^7.3.3": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@babel/traverse@^7.23.7": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.7.tgz#9a7bf285c928cb99b5ead19c3b1ce5b310c9c305" + integrity sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.6" + "@babel/types" "^7.23.6" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.3.3": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.6.tgz#be33fdb151e1f5a56877d704492c240fc71c7ccd" + integrity sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg== + dependencies: + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + "@cerc-io/laconic-sdk@^0.1.14": version "0.1.14" resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Flaconic-sdk/-/0.1.14/laconic-sdk-0.1.14.tgz#67a255133c8907657878270f02b7084e11e23736" @@ -435,6 +730,246 @@ cborg "^1.5.4" multiformats "^9.5.4" +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + 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" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== + 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" + +"@jest/core@^29.0.0", "@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== + 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" + +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== + dependencies: + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== + dependencies: + jest-get-type "^29.6.3" + +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== + dependencies: + expect "^29.7.0" + jest-snapshot "^29.7.0" + +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== + 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" + +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" + +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== + 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" + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== + dependencies: + "@jridgewell/trace-mapping" "^0.3.18" + callsites "^3.0.0" + graceful-fs "^4.2.9" + +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== + dependencies: + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== + dependencies: + "@jest/test-result" "^29.7.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + slash "^3.0.0" + +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== + 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" + +"@jest/types@^29.0.0", "@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== + 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" + +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.22" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz#72a621e5de59f5f1ef792d0793a82ee20f645e4c" + integrity sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@metamask/eth-sig-util@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" @@ -456,6 +991,25 @@ resolved "https://registry.yarnpkg.com/@octetstream/promisify/-/promisify-2.0.2.tgz#29ac3bd7aefba646db670227f895d812c1a19615" integrity sha512-7XHoRB61hxsz8lBQrjC1tq/3OEIgpvGWg6DKAdwi7WRzruwkmsdwmOoUXbU4Dtd4RSOMDwed0SkP3y8UlMt1Bg== +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + +"@sinonjs/commons@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== + dependencies: + "@sinonjs/commons" "^3.0.0" + "@tharsis/address-converter@^0.1.7": version "0.1.7" resolved "https://registry.yarnpkg.com/@tharsis/address-converter/-/address-converter-0.1.7.tgz#c13c4d09f30a5b908e795626a5c4c92f8120d954" @@ -506,6 +1060,39 @@ link-module-alias "^1.2.0" shx "^0.3.4" +"@types/babel__core@^7.1.14": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.8" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" + integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.5.tgz#7b7502be0aa80cc4ef22978846b983edaafcd4dd" + integrity sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ== + dependencies: + "@babel/types" "^7.20.7" + "@types/bn.js@^4.11.3": version "4.11.6" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" @@ -525,6 +1112,40 @@ resolved "https://registry.yarnpkg.com/@types/google-protobuf/-/google-protobuf-3.15.5.tgz#644b2be0f5613b1f822c70c73c6b0e0b5b5fa2ad" integrity sha512-6bgv24B+A2bo9AfzReeg5StdiijKzwwnRflA8RLd1V4Yv995LeTmo0z69/MPbBDFSiZWdZHQygLo/ccXhMEDgw== +"@types/graceful-fs@^4.1.3": + version "4.1.9" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" + integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== + dependencies: + "@types/node" "*" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== + +"@types/istanbul-lib-report@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" + integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" + integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@^27.4.1": + version "27.5.2" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c" + integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== + dependencies: + jest-matcher-utils "^27.0.0" + pretty-format "^27.0.0" + "@types/js-yaml@^4.0.5": version "4.0.5" resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138" @@ -564,6 +1185,11 @@ dependencies: "@types/node" "*" +"@types/stack-utils@^2.0.0": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" + integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== + "@types/yargs-parser@*": version "21.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" @@ -576,11 +1202,25 @@ dependencies: "@types/yargs-parser" "*" +"@types/yargs@^17.0.8": + version "17.0.32" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" + integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== + dependencies: + "@types/yargs-parser" "*" + aes-js@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -593,13 +1233,26 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +anymatch@^3.0.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -614,6 +1267,66 @@ axios@^0.26.1: dependencies: follow-redirects "^1.14.8" +babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== + 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" + +babel-plugin-istanbul@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + 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" + +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.1.14" + "@types/babel__traverse" "^7.0.6" + +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + 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" + +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== + dependencies: + babel-plugin-jest-hoist "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -698,6 +1411,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -715,6 +1435,23 @@ browserify-aes@^1.2.0: inherits "^2.0.1" safe-buffer "^5.0.1" +browserslist@^4.22.2: + version "4.22.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b" + integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== + dependencies: + caniuse-lite "^1.0.30001565" + electron-to-chromium "^1.4.601" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -731,6 +1468,18 @@ bs58check@<3.0.0, bs58check@^2.1.1, bs58check@^2.1.2: create-hash "^1.1.0" safe-buffer "^5.1.2" +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" @@ -744,6 +1493,26 @@ buffer@6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001565: + version "1.0.30001579" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz#45c065216110f46d6274311a4b3fcf6278e0852a" + integrity sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA== + canonical-json@^0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/canonical-json/-/canonical-json-0.0.4.tgz#6579c072c3db5c477ec41dc978fbf2b8f41074a3" @@ -754,7 +1523,7 @@ cborg@^1.5.4, cborg@^1.6.0: resolved "https://registry.yarnpkg.com/cborg/-/cborg-1.9.1.tgz#9ea2f7b1745048e7db51e78d54e8a9a0e4f64a11" integrity sha512-6xKRdJ89ncwEXJGx9rFMRBNp72UqgYSGt2a88rqsvCLda4OuhRlh3xD2nu+ufrw6h9l94K0cnvyD4WEGpKtRtw== -chalk@^2.4.1: +chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -763,6 +1532,24 @@ chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +ci-info@^3.2.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -771,6 +1558,11 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +cjs-module-lexer@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" + integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -780,11 +1572,25 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -co@4.6.0: +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + 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" + +co@4.6.0, co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= +collect-v8-coverage@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -814,6 +1620,11 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -837,6 +1648,28 @@ create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + 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" + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypto-addr-codec@^0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz#e16cea892730178fe25a38f6d15b680cab3124ae" @@ -850,6 +1683,48 @@ crypto-addr-codec@^0.1.7: safe-buffer "^5.2.0" sha3 "^2.1.1" +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +dedent@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff" + integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" + integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== + +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + +dotenv@^16.3.2: + version "16.4.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.0.tgz#ac21c3fcaad2e7832a1cd0c0e4e8e52225ecda0e" + integrity sha512-WvImr5kpN5NGNn7KaDjJnLTh5rDVLZiDf/YLA8T1ZEZEBZNEDOE+mnkS0PVjPax8ZxBP5zC5SLMB3/9VV5de9g== + +electron-to-chromium@^1.4.601: + version "1.4.643" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.643.tgz#081a20c5534db91e66ef094f68624960f674768f" + integrity sha512-QHscvvS7gt155PtoRC0dR2ilhL8E9LHhfTQEq1uD5AL0524rBLAwpAREFH06f87/e45B9XkR6Ki5dbhbCsVEIg== + elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -863,11 +1738,23 @@ elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5 minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -878,6 +1765,11 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -991,11 +1883,69 @@ evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + 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" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== + 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" + +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + follow-redirects@^1.14.8: version "1.14.9" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" @@ -1015,16 +1965,41 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +fsevents@^2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + glob@^7.0.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" @@ -1037,6 +2012,23 @@ glob@^7.0.0: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + google-protobuf@^3.19.4: version "3.20.1" resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.20.1.tgz#1b255c2b59bcda7c399df46c65206aa3c7a0ce8b" @@ -1047,6 +2039,11 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== +graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graphql.js@^0.6.8: version "0.6.8" resolved "https://registry.yarnpkg.com/graphql.js/-/graphql.js-0.6.8.tgz#5c2e57311b5e74c6665ff9394394bc76f273542f" @@ -1057,6 +2054,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -1081,6 +2083,13 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasown@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + dependencies: + function-bind "^1.1.2" + hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -1090,11 +2099,34 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1113,6 +2145,18 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-core-module@^2.13.0: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + is-core-module@^2.8.1: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" @@ -1125,11 +2169,467 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + is-hex-prefixed@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-instrument@^5.0.4: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + 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" + +istanbul-lib-instrument@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz#71e87707e8041428732518c6fb5211761753fbdf" + integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.1.3: + version "3.1.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" + integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== + dependencies: + execa "^5.0.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + 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" + +jest-cli@^29.0.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== + 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" + +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== + 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" + +jest-diff@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" + integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== + dependencies: + chalk "^4.0.0" + diff-sequences "^27.5.1" + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== + dependencies: + detect-newline "^3.0.0" + +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== + 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" + +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + 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" + +jest-get-type@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" + integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== + +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== + +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== + 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" + optionalDependencies: + fsevents "^2.3.2" + +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== + dependencies: + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-matcher-utils@^27.0.0: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" + integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== + dependencies: + chalk "^4.0.0" + jest-diff "^27.5.1" + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== + dependencies: + chalk "^4.0.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== + 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" + +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-util "^29.7.0" + +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== + +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== + dependencies: + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" + +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== + 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" + +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== + 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" + +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + 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" + +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== + 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" + +jest-util@^29.0.0, jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== + 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" + +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== + 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" + +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== + 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" + +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== + dependencies: + "@types/node" "*" + jest-util "^29.7.0" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jest@29.0.0: + version "29.0.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.0.0.tgz#0614bce40ffd3a1a19a30c8a2c66d19103712001" + integrity sha512-9uz4Tclskb8WrfRXqu66FsFCFoyYctwWXpruKwnD95FZqkyoEAA1oGH53HUn7nQx7uEgZTKdNl/Yo6DqqU+XMg== + dependencies: + "@jest/core" "^29.0.0" + "@jest/types" "^29.0.0" + import-local "^3.0.2" + jest-cli "^29.0.0" + js-sha256@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" @@ -1140,7 +2640,12 @@ js-sha3@0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -js-yaml@^3.14.1: +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1, js-yaml@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -1148,6 +2653,21 @@ js-yaml@^3.14.1: argparse "^1.0.7" esprima "^4.0.0" +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -1176,6 +2696,16 @@ keccak@^3.0.0: node-gyp-build "^4.2.0" readable-stream "^3.6.0" +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + libsodium-wrappers@^0.7.6: version "0.7.10" resolved "https://registry.yarnpkg.com/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz#13ced44cacb0fc44d6ac9ce67d725956089ce733" @@ -1188,6 +2718,11 @@ libsodium@^0.7.0: resolved "https://registry.yarnpkg.com/libsodium/-/libsodium-0.7.10.tgz#c2429a7e4c0836f879d701fec2c8a208af024159" integrity sha512-eY+z7hDrDKxkAK+QKZVNv92A5KYkxfvIshtBJkmg5TSiCnYqZP3i9OO9whE79Pwgm4jGaoHgkM4ao/b9Cyu4zQ== +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + link-module-alias@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/link-module-alias/-/link-module-alias-1.2.0.tgz#6a3b7b014cfe18b2759a1222fffce6a40fc120e4" @@ -1195,6 +2730,13 @@ link-module-alias@^1.2.0: dependencies: chalk "^2.4.1" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + lodash-clean@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/lodash-clean/-/lodash-clean-2.2.3.tgz#eb72801ba9ebfb2771bed3cc971d9e7835a78611" @@ -1202,11 +2744,23 @@ lodash-clean@^2.2.3: dependencies: lodash "^4.17.21" +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -1214,6 +2768,25 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +make-error@1.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -1223,6 +2796,24 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -1233,7 +2824,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -minimatch@^3.0.4: +minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -1245,6 +2836,11 @@ minimist@^1.2.3: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + multiformats@^9.5.4: version "9.6.4" resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.6.4.tgz#5dce1f11a407dbb69aa612cb7e5076069bb759ca" @@ -1255,6 +2851,11 @@ nan@^2.13.2: resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + node-addon-api@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" @@ -1265,6 +2866,16 @@ node-gyp-build@^4.2.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.4.0.tgz#42e99687ce87ddeaf3a10b99dc06abc11021f3f4" integrity sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ== +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + node-yaml@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/node-yaml/-/node-yaml-4.0.1.tgz#3675d27c275fbea9c02e2b0faa18bb1699444cb3" @@ -1274,6 +2885,18 @@ node-yaml@^4.0.1: junk "3.1.0" promise-fs "2.1.1" +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -1281,11 +2904,64 @@ once@^1.3.0: dependencies: wrappy "1" +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + 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" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -1302,6 +2978,46 @@ pbkdf2@^3.0.17, pbkdf2@^3.0.9: safe-buffer "^5.0.1" sha.js "^2.4.8" +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +pretty-format@^27.0.0, pretty-format@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== + dependencies: + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + promise-fs@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/promise-fs/-/promise-fs-2.1.1.tgz#0b725a592c165ff16157d1f13640ba390637e557" @@ -1309,6 +3025,19 @@ promise-fs@2.1.1: dependencies: "@octetstream/promisify" "2.0.2" +prompts@^2.0.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +pure-rand@^6.0.0: + version "6.0.4" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.4.tgz#50b737f6a925468679bff00ad20eade53f37d5c7" + integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== + randombytes@^2.0.1, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -1316,6 +3045,16 @@ randombytes@^2.0.1, randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" +react-is@^17.0.1: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + +react-is@^18.0.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" @@ -1342,6 +3081,23 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve.exports@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== + resolve@^1.1.6: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" @@ -1351,6 +3107,15 @@ resolve@^1.1.6: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.20.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + ripemd160-min@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" @@ -1390,6 +3155,11 @@ secp256k1@^4.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + semver@^7.3.5: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" @@ -1397,6 +3167,13 @@ semver@^7.3.5: dependencies: lru-cache "^6.0.0" +semver@^7.5.3, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -1417,6 +3194,18 @@ sha3@^2.1.1, sha3@^2.1.4: dependencies: buffer "6.0.3" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + shelljs@^0.8.5: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" @@ -1434,11 +3223,54 @@ shx@^0.3.4: minimist "^1.2.3" shelljs "^0.8.5" +signal-exit@^3.0.3, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== +stack-utils@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -1462,6 +3294,16 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + strip-hex-prefix@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" @@ -1469,6 +3311,11 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -1476,11 +3323,34 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + tiny-secp256k1@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz#7e224d2bee8ab8283f284e40e6b4acb74ffe047c" @@ -1492,6 +3362,37 @@ tiny-secp256k1@^1.1.6: elliptic "^6.4.0" nan "^2.13.2" +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +ts-jest@^29.0.2: + version "29.1.2" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.2.tgz#7613d8c81c43c8cb312c6904027257e814c40e09" + integrity sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^29.0.0" + json5 "^2.2.3" + lodash.memoize "4.x" + make-error "1.x" + semver "^7.5.3" + yargs-parser "^21.0.1" + tweetnacl-util@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" @@ -1502,6 +3403,16 @@ tweetnacl@^1.0.3: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + typeforce@^1.11.5: version "1.18.0" resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc" @@ -1517,11 +3428,42 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= +v8-to-istanbul@^9.0.1: + version "9.2.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" + integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + wif@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704" @@ -1543,6 +3485,14 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +write-file-atomic@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + ws@7.4.6: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" @@ -1553,6 +3503,11 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" @@ -1563,6 +3518,24 @@ yargs-parser@^21.0.0: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== +yargs-parser@^21.0.1, yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + 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" + yargs@^17.4.1: version "17.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.4.1.tgz#ebe23284207bb75cee7c408c33e722bfb27b5284" @@ -1575,3 +3548,8 @@ yargs@^17.4.1: string-width "^4.2.3" y18n "^5.0.5" yargs-parser "^21.0.0" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -- 2.45.2 From 055f903ce2206c3ac783fb68c9c12015709876c4 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 12:47:38 +0530 Subject: [PATCH 02/23] Add a test for status command --- test/cli.test.ts | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index a0f512c..aa96e70 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -4,6 +4,7 @@ describe('Test laconic CLI commands', () => { beforeAll(async () => { // TODO: Install laconic binary (create symlink in path) // TODO: Create a temp directory to run the tests in and cd into that + // TODO: Create the required config }); afterAll(async () => { @@ -22,7 +23,44 @@ describe('Test laconic CLI commands', () => { expect(result.status).toBe(1); }); + // TODO: Test subcommands describe('laconic ', () => { - // TODO: Test subcommands + test('laconic cns', async () => { + const result = spawnSync('laconic', ['cns']); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + // Expect error with usage string + expect(output).toBe(''); + expect(errorOutput).toContain('laconic cns'); + expect(errorOutput).toContain('CNS tools'); + expect(errorOutput).toContain('Commands:'); + expect(result.status).toBe(1); + }); + + describe('laconic cns ', () => { + test('laconic cns status', async () => { + const result = spawnSync('laconic', ['cns', 'status']); + + const output = result.stdout.toString().trim(); + const outputObj = JSON.parse(output); + const errorOutput = result.stderr.toString().trim(); + + // Expect output object to have CNS status props + expect(outputObj).toHaveProperty('version'); + expect(outputObj).toHaveProperty('node'); + expect(outputObj).toHaveProperty('node.network', 'laconic_9000-1'); + expect(outputObj).toHaveProperty('sync'); + expect(outputObj).toHaveProperty('validator'); + expect(outputObj).toHaveProperty('validators'); + expect(outputObj).toHaveProperty('num_peers'); + expect(outputObj).toHaveProperty('peers'); + expect(outputObj).toHaveProperty('disk_usage'); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + }); + }); }); }); -- 2.45.2 From abe91956154c5de1795d334203b2ae985cad04ea Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 14:32:12 +0530 Subject: [PATCH 03/23] Add tests for bond create and list commands --- test/cli.test.ts | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/test/cli.test.ts b/test/cli.test.ts index aa96e70..6ed0af6 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -61,6 +61,46 @@ describe('Test laconic CLI commands', () => { expect(errorOutput).toBe(''); expect(result.status).toBe(0); }); + + describe('laconic cns bond ', () => { + let createdBondId: string; + + test('laconic cns bond create', async () => { + const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', 'aphoton', '--quantity', '1000000000', '--gas', '200000', '--fees', '200000aphoton']); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = JSON.parse(output); + + // Expect output object to resultant bond id + expect(outputObj).toHaveProperty('bondId'); + createdBondId = outputObj.bondId; + }); + + test('laconic cns bond list', async () => { + const result = spawnSync('laconic', ['cns', 'bond', 'list']); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expect output object to an array of bonds + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toHaveProperty('id', createdBondId); + expect(outputObj[0]).toHaveProperty('owner'); + expect(outputObj[0]).toHaveProperty('balance'); + }); + }); }); }); }); -- 2.45.2 From 395e8bddee9ab5e2eabc30f9501f5e116b7226f9 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 16:42:28 +0530 Subject: [PATCH 04/23] Add a script to run tests and update gitea workflow --- .gitea/workflows/test.yml | 43 ++++++++++++++++++++++++-------------- .github/workflows/test.yml | 1 + docker-compose.yml | 21 ++++++++----------- package.json | 2 +- test/run-tests.sh | 29 +++++++++++++++++++++++++ 5 files changed, 67 insertions(+), 29 deletions(-) create mode 100755 test/run-tests.sh diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 6dc7a5c..021a1b6 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -12,34 +12,45 @@ env: DOCKER_HOST: unix:///var/run/dind.sock jobs: - sdk_tests: + cli_tests: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] steps: - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies and build + run: yarn && yarn build + - name: Install registry-cli + run: yarn global add file:$PWD + - name: Log CLI version + run: laconic --version + - name: Checkout laconicd uses: actions/checkout@v3 with: - path: "./laconicd/" + path: "/tmp/laconicd/" repository: cerc-io/laconicd fetch-depth: 0 ref: main - name: Environment run: ls -tlh && env - - name: Start dockerd - run: | - dockerd -H $DOCKER_HOST --userland-proxy=false & - sleep 5 - - name: build registry-cli container - run: docker build -t cerc/laconic-registry-cli:local-test --build-arg CERC_NPM_URL=https://git.vdb.to/api/packages/cerc-io/npm/ --build-arg CERC_NPM_AUTH_TOKEN="${{ secrets.CICD_PUBLISH_TOKEN }}" . - - name: build containers scripts - working-directory: laconicd/tests/sdk_tests + + - name: Build laconicd container + working-directory: /tmp/laconicd/tests/sdk_tests run: ./build-laconicd-container.sh - - name: start laconicd container - working-directory: laconicd/tests/sdk_tests + - name: Start laconicd container + env: + TEST_AUCTION_ENABLED: true run: docker compose up laconicd -d - - name: Run registry-cli demo commands in registry-cli container - run : ls -tla - - name: stop containers - working-directory: laconicd/tests/sdk_tests + - name: Run registry-cli tests + run: ./test/run-tests.sh + + - name: Stop containers run: docker compose down diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e238e86..dd07de6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,3 +1,4 @@ +# TODO: Remove name: Tests on: pull_request: diff --git a/docker-compose.yml b/docker-compose.yml index 7469649..7886836 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,28 +1,25 @@ services: laconicd: restart: unless-stopped - image: cerc-io/laconicd:local-test + image: cerc/laconicd:local command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"] + environment: + - TEST_AUCTION_ENABLED + - TEST_REGISTRY_EXPIRY + - LOGLEVEL volumes: - - laconicd/init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh + - /tmp/laconicd/init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh healthcheck: test: ["CMD", "curl", "-v", "http://127.0.0.1:6060"] interval: 1s timeout: 5s retries: 30 ports: - - "6060" - - "26657" - - "26656" - - "9473" - - "8545" - - "8546" - - "9090" - - "9091" - - "1317" + - "9473:9473" + - "1317:1317" cli-test-runner: - image: cerc/laconic-registry-cli:local-test + image: cerc/laconic-registry-cli:local depends_on: laconicd: condition: service_healthy diff --git a/package.json b/package.json index 0d2fe56..552d6c4 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "yargs": "^17.4.1" }, "scripts": { - "test": "jest --runInBand --verbose --testPathPattern=test", + "test": "jest --runInBand --verbose test/cli.test.ts", "lint": "eslint .", "clean": "rm -rf ./dist", "build": "tsc" diff --git a/test/run-tests.sh b/test/run-tests.sh new file mode 100755 index 0000000..572e250 --- /dev/null +++ b/test/run-tests.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Get the key from laconicd +laconicd_key=$(yes | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe) + +# Set parameters for the test suite +cosmos_chain_id=laconic_9000-1 +laconicd_rest_endpoint=http://127.0.0.1:1317 +laconicd_gql_endpoint=http://127.0.0.1:9473/api + +# Create the required config +config_file="config.yml" +config=$(cat < "$config_file" + +# Wait for the laconid endpoint to come up +docker compose exec laconicd sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api" + +# Run tests +yarn test -- 2.45.2 From 7bbba3ec743d667517ce1fb3d37b395a30da37d2 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 17:02:22 +0530 Subject: [PATCH 05/23] Explicitly set npm registry-url --- .gitea/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 021a1b6..38bd1af 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -23,6 +23,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org/' - name: Install dependencies and build run: yarn && yarn build -- 2.45.2 From 39e9c3362287c3a270d6d1ad363b1c0188cfe59c Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 17:08:25 +0530 Subject: [PATCH 06/23] Add a step to download yarn --- .gitea/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 38bd1af..fac8496 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -19,11 +19,14 @@ jobs: node-version: [18.x] steps: - uses: actions/checkout@v3 + - name: Download yarn + run: | + curl -fsSL -o /usr/local/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.21/yarn-1.22.21.js + chmod +x /usr/local/bin/yarn - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - registry-url: 'https://registry.npmjs.org/' - name: Install dependencies and build run: yarn && yarn build -- 2.45.2 From 92a9f8b0345a9e4259cd45f3da8aa6778f143a18 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 17:13:19 +0530 Subject: [PATCH 07/23] Add a step to set registry --- .gitea/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index fac8496..cdf1ff2 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -27,6 +27,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - name: Set registry + run: npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/ - name: Install dependencies and build run: yarn && yarn build -- 2.45.2 From 55854afbab3a67348ea72a50eef509d5db50a400 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 17:18:26 +0530 Subject: [PATCH 08/23] Update laconicd path --- .gitea/workflows/test.yml | 4 ++-- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index cdf1ff2..352a909 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -40,7 +40,7 @@ jobs: - name: Checkout laconicd uses: actions/checkout@v3 with: - path: "/tmp/laconicd/" + path: "./laconicd/" repository: cerc-io/laconicd fetch-depth: 0 ref: main @@ -48,7 +48,7 @@ jobs: run: ls -tlh && env - name: Build laconicd container - working-directory: /tmp/laconicd/tests/sdk_tests + working-directory: ./laconicd/tests/sdk_tests run: ./build-laconicd-container.sh - name: Start laconicd container env: diff --git a/docker-compose.yml b/docker-compose.yml index 7886836..4b614af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: - TEST_REGISTRY_EXPIRY - LOGLEVEL volumes: - - /tmp/laconicd/init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh + - ./laconicd/init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh healthcheck: test: ["CMD", "curl", "-v", "http://127.0.0.1:6060"] interval: 1s -- 2.45.2 From 0221d75b866fcb29d835da3de88440f8ca30ec88 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 18:22:03 +0530 Subject: [PATCH 09/23] Add tests for commands to fetch bond --- test/cli.test.ts | 88 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 72 insertions(+), 16 deletions(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index 6ed0af6..095c46a 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -1,16 +1,6 @@ import { spawnSync } from 'child_process'; describe('Test laconic CLI commands', () => { - beforeAll(async () => { - // TODO: Install laconic binary (create symlink in path) - // TODO: Create a temp directory to run the tests in and cd into that - // TODO: Create the required config - }); - - afterAll(async () => { - // TODO: Cleanup temp dir - }); - test('laconic', async () => { const result = spawnSync('laconic'); @@ -52,6 +42,7 @@ describe('Test laconic CLI commands', () => { expect(outputObj).toHaveProperty('node'); expect(outputObj).toHaveProperty('node.network', 'laconic_9000-1'); expect(outputObj).toHaveProperty('sync'); + expect(Number(outputObj.sync.latest_block_height)).toBeGreaterThan(0); expect(outputObj).toHaveProperty('validator'); expect(outputObj).toHaveProperty('validators'); expect(outputObj).toHaveProperty('num_peers'); @@ -63,10 +54,12 @@ describe('Test laconic CLI commands', () => { }); describe('laconic cns bond ', () => { - let createdBondId: string; + const bondBalance = 1000000000; + let bondId: string; + let bondOwner: string; test('laconic cns bond create', async () => { - const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', 'aphoton', '--quantity', '1000000000', '--gas', '200000', '--fees', '200000aphoton']); + const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', 'aphoton', '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', '200000aphoton']); const output = result.stdout.toString().trim(); const errorOutput = result.stderr.toString().trim(); @@ -79,7 +72,8 @@ describe('Test laconic CLI commands', () => { // Expect output object to resultant bond id expect(outputObj).toHaveProperty('bondId'); - createdBondId = outputObj.bondId; + + bondId = outputObj.bondId; }); test('laconic cns bond list', async () => { @@ -94,13 +88,75 @@ describe('Test laconic CLI commands', () => { expect(output.length).toBeGreaterThan(0); const outputObj = Array.from(JSON.parse(output)); - // Expect output object to an array of bonds + // Expected bond + const expectedBond = getExpectedBond({ id: bondId, balance: bondBalance }); + expect(outputObj.length).toEqual(1); - expect(outputObj[0]).toHaveProperty('id', createdBondId); expect(outputObj[0]).toHaveProperty('owner'); - expect(outputObj[0]).toHaveProperty('balance'); + expect(outputObj[0]).toMatchObject(expectedBond); + + bondOwner = outputObj[0].owner; + }); + + test('laconic cns bond list --owner ', async () => { + const result = spawnSync('laconic', ['cns', 'bond', 'list', '--owner', bondOwner]); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expected bond + const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toEqual(expectedBond); + }); + + test('laconic cns bond get --id ', async () => { + const result = spawnSync('laconic', ['cns', 'bond', 'get', '--id', bondId]); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expected bond + const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toEqual(expectedBond); }); }); }); }); }); + +// Helper methods + +function getExpectedBond(params: { id: string, balance: number, owner?: string }): any { + const bond: any = { + id: params.id, + balance: [ + { + type: "aphoton", + quantity: params.balance + } + ] + }; + + // Add owner only if passed + if (params.owner) { + bond.owner = params.owner; + } + + return bond; +} -- 2.45.2 From a971b10cf57337bfd2a89bdf8772ed95b1bc74f1 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 18:56:35 +0530 Subject: [PATCH 10/23] Pass fixturenet account address in env --- test/cli.test.ts | 25 ++++++++++--------------- test/run-tests.sh | 5 ++++- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index 095c46a..2541fce 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -1,3 +1,4 @@ +import assert from 'assert'; import { spawnSync } from 'child_process'; describe('Test laconic CLI commands', () => { @@ -30,6 +31,9 @@ describe('Test laconic CLI commands', () => { }); describe('laconic cns ', () => { + const existingAccount = process.env.EXISTING_ACCOUNT; + assert(existingAccount, 'EXISTING_ACCOUNT not set in env'); + test('laconic cns status', async () => { const result = spawnSync('laconic', ['cns', 'status']); @@ -55,8 +59,8 @@ describe('Test laconic CLI commands', () => { describe('laconic cns bond ', () => { const bondBalance = 1000000000; + const bondOwner = existingAccount; let bondId: string; - let bondOwner: string; test('laconic cns bond create', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', 'aphoton', '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', '200000aphoton']); @@ -89,13 +93,10 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected bond - const expectedBond = getExpectedBond({ id: bondId, balance: bondBalance }); + const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); expect(outputObj.length).toEqual(1); - expect(outputObj[0]).toHaveProperty('owner'); - expect(outputObj[0]).toMatchObject(expectedBond); - - bondOwner = outputObj[0].owner; + expect(outputObj[0]).toEqual(expectedBond); }); test('laconic cns bond list --owner ', async () => { @@ -142,9 +143,10 @@ describe('Test laconic CLI commands', () => { // Helper methods -function getExpectedBond(params: { id: string, balance: number, owner?: string }): any { - const bond: any = { +function getExpectedBond(params: { id: string, owner: string, balance: number}): any { + return { id: params.id, + owner: params.owner, balance: [ { type: "aphoton", @@ -152,11 +154,4 @@ function getExpectedBond(params: { id: string, balance: number, owner?: string } } ] }; - - // Add owner only if passed - if (params.owner) { - bond.owner = params.owner; - } - - return bond; } diff --git a/test/run-tests.sh b/test/run-tests.sh index 572e250..1ec0755 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -3,6 +3,9 @@ # Get the key from laconicd laconicd_key=$(yes | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe) +# Get the fixturenet account address +laconicd_account_address=$(docker compose exec laconicd laconicd keys list | awk '/- address:/ {print $3}') + # Set parameters for the test suite cosmos_chain_id=laconic_9000-1 laconicd_rest_endpoint=http://127.0.0.1:1317 @@ -26,4 +29,4 @@ echo "$config" > "$config_file" docker compose exec laconicd sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api" # Run tests -yarn test +EXISTING_ACCOUNT=$laconicd_account_address yarn test -- 2.45.2 From 75493f05e386ece741121c800e8b12aa049aba11 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 24 Jan 2024 19:10:49 +0530 Subject: [PATCH 11/23] Add test for command to fetch account details --- test/cli.test.ts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/test/cli.test.ts b/test/cli.test.ts index 2541fce..dda9afa 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -31,6 +31,7 @@ describe('Test laconic CLI commands', () => { }); describe('laconic cns ', () => { + const initialAccountBalance = Number('100000000000000000000000000'); const existingAccount = process.env.EXISTING_ACCOUNT; assert(existingAccount, 'EXISTING_ACCOUNT not set in env'); @@ -137,6 +138,38 @@ describe('Test laconic CLI commands', () => { expect(outputObj[0]).toEqual(expectedBond); }); }); + + describe('laconic cns account ', () => { + test('laconic cns account get --address ', async () => { + const result = spawnSync('laconic', ['cns', 'account', 'get', '--address', existingAccount]); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expected account + const expectedAccount = { + address: existingAccount, + number: 0, + sequence: 2, + balance: [ + { + type: "aphoton" + } + ] + }; + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toMatchObject(expectedAccount); + expect(Number(outputObj[0].balance[0].quantity)).toBeGreaterThan(0); + expect(Number(outputObj[0].balance[0].quantity)).toBeLessThan(initialAccountBalance); + }); + }); }); }); }); -- 2.45.2 From 4036d33d7a4320f615097c739acb6677eda38d86 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 09:56:33 +0530 Subject: [PATCH 12/23] Refactor and add test for command to send balance --- .gitea/workflows/test.yml | 2 - test/cli.test.ts | 300 ++++++++++++++++++++++---------------- test/run-tests.sh | 2 + 3 files changed, 179 insertions(+), 125 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 352a909..e4cdb02 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -34,8 +34,6 @@ jobs: run: yarn && yarn build - name: Install registry-cli run: yarn global add file:$PWD - - name: Log CLI version - run: laconic --version - name: Checkout laconicd uses: actions/checkout@v3 diff --git a/test/cli.test.ts b/test/cli.test.ts index dda9afa..d9b68b3 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -1,6 +1,8 @@ import assert from 'assert'; import { spawnSync } from 'child_process'; +const TOKEN_TYPE = 'aphoton'; + describe('Test laconic CLI commands', () => { test('laconic', async () => { const result = spawnSync('laconic'); @@ -14,161 +16,213 @@ describe('Test laconic CLI commands', () => { expect(result.status).toBe(1); }); - // TODO: Test subcommands - describe('laconic ', () => { - test('laconic cns', async () => { - const result = spawnSync('laconic', ['cns']); + test('laconic cns', async () => { + const result = spawnSync('laconic', ['cns']); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + // Expect error with usage string + expect(output).toBe(''); + expect(errorOutput).toContain('laconic cns'); + expect(errorOutput).toContain('CNS tools'); + expect(errorOutput).toContain('Commands:'); + expect(result.status).toBe(1); + }); + + describe('laconic CNS commands', () => { + const initialAccountBalance = Number('100000000000000000000000000'); + // let accountSequence = 0; + const existingAccount = process.env.EXISTING_ACCOUNT; + assert(existingAccount, 'EXISTING_ACCOUNT not set in env'); + + const secondAccount = 'ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu'; + + + test('laconic cns status', async () => { + const result = spawnSync('laconic', ['cns', 'status']); const output = result.stdout.toString().trim(); + const outputObj = JSON.parse(output); const errorOutput = result.stderr.toString().trim(); - // Expect error with usage string - expect(output).toBe(''); - expect(errorOutput).toContain('laconic cns'); - expect(errorOutput).toContain('CNS tools'); - expect(errorOutput).toContain('Commands:'); - expect(result.status).toBe(1); + // Expect output object to have CNS status props + expect(outputObj).toHaveProperty('version'); + expect(outputObj).toHaveProperty('node'); + expect(outputObj).toHaveProperty('node.network', 'laconic_9000-1'); + expect(outputObj).toHaveProperty('sync'); + expect(Number(outputObj.sync.latest_block_height)).toBeGreaterThan(0); + expect(outputObj).toHaveProperty('validator'); + expect(outputObj).toHaveProperty('validators'); + expect(outputObj).toHaveProperty('num_peers'); + expect(outputObj).toHaveProperty('peers'); + expect(outputObj).toHaveProperty('disk_usage'); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); }); - describe('laconic cns ', () => { - const initialAccountBalance = Number('100000000000000000000000000'); - const existingAccount = process.env.EXISTING_ACCOUNT; - assert(existingAccount, 'EXISTING_ACCOUNT not set in env'); + describe('Bond operations', () => { + const bondBalance = 1000000000; + const bondOwner = existingAccount; + let bondId = 'de88ffab68af143da5d3ba2cf86f468ac4ac2efaa005e4d2fbce5fde85cbaa3e'; + // let bondId: string; - test('laconic cns status', async () => { - const result = spawnSync('laconic', ['cns', 'status']); + test('laconic cns bond create', async () => { + const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); + // accountSequence++; const output = result.stdout.toString().trim(); - const outputObj = JSON.parse(output); const errorOutput = result.stderr.toString().trim(); - // Expect output object to have CNS status props - expect(outputObj).toHaveProperty('version'); - expect(outputObj).toHaveProperty('node'); - expect(outputObj).toHaveProperty('node.network', 'laconic_9000-1'); - expect(outputObj).toHaveProperty('sync'); - expect(Number(outputObj.sync.latest_block_height)).toBeGreaterThan(0); - expect(outputObj).toHaveProperty('validator'); - expect(outputObj).toHaveProperty('validators'); - expect(outputObj).toHaveProperty('num_peers'); - expect(outputObj).toHaveProperty('peers'); - expect(outputObj).toHaveProperty('disk_usage'); - expect(errorOutput).toBe(''); expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = JSON.parse(output); + + // Expect output object to resultant bond id + expect(outputObj).toHaveProperty('bondId'); + + bondId = outputObj.bondId; }); - describe('laconic cns bond ', () => { - const bondBalance = 1000000000; - const bondOwner = existingAccount; - let bondId: string; + test('laconic cns bond list', async () => { + const result = spawnSync('laconic', ['cns', 'bond', 'list']); - test('laconic cns bond create', async () => { - const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', 'aphoton', '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', '200000aphoton']); + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); - expect(output.length).toBeGreaterThan(0); - const outputObj = JSON.parse(output); + // Expected bond + const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); - // Expect output object to resultant bond id - expect(outputObj).toHaveProperty('bondId'); - - bondId = outputObj.bondId; - }); - - test('laconic cns bond list', async () => { - const result = spawnSync('laconic', ['cns', 'bond', 'list']); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); - - // Expected bond - const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); - - expect(outputObj.length).toEqual(1); - expect(outputObj[0]).toEqual(expectedBond); - }); - - test('laconic cns bond list --owner ', async () => { - const result = spawnSync('laconic', ['cns', 'bond', 'list', '--owner', bondOwner]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); - - // Expected bond - const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); - - expect(outputObj.length).toEqual(1); - expect(outputObj[0]).toEqual(expectedBond); - }); - - test('laconic cns bond get --id ', async () => { - const result = spawnSync('laconic', ['cns', 'bond', 'get', '--id', bondId]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); - - // Expected bond - const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); - - expect(outputObj.length).toEqual(1); - expect(outputObj[0]).toEqual(expectedBond); - }); + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toEqual(expectedBond); }); - describe('laconic cns account ', () => { - test('laconic cns account get --address ', async () => { - const result = spawnSync('laconic', ['cns', 'account', 'get', '--address', existingAccount]); + test('laconic cns bond list --owner ', async () => { + const result = spawnSync('laconic', ['cns', 'bond', 'list', '--owner', bondOwner]); - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); - // Expected account - const expectedAccount = { + // Expected bond + const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toEqual(expectedBond); + }); + + test('laconic cns bond get --id ', async () => { + const result = spawnSync('laconic', ['cns', 'bond', 'get', '--id', bondId]); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expected bond + const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toEqual(expectedBond); + }); + }); + + describe('Account and tokens operations', () => { + let balanceBeforeSend: number; + + test('laconic cns account get --address ', async () => { + const result = spawnSync('laconic', ['cns', 'account', 'get', '--address', existingAccount]); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expected account + const expectedAccount = { + address: existingAccount, + number: 0, + sequence: 2, + balance: [ + { + type: TOKEN_TYPE + } + ] + }; + balanceBeforeSend = Number(outputObj[0].balance[0].quantity); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toMatchObject(expectedAccount); + expect(balanceBeforeSend).toBeGreaterThan(0); + expect(balanceBeforeSend).toBeLessThan(initialAccountBalance); + }); + + test('laconic cns tokens send --address --type --quantity ', async () => { + const sendAmount = 1000000000; + const balanceAfterSend = balanceBeforeSend - sendAmount; + + const result = spawnSync('laconic', ['cns', 'tokens', 'send', '--address', secondAccount, '--type', TOKEN_TYPE, '--quantity', sendAmount.toString()]); + // accountSequence++; + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expected acconts + const expectedAccounts = [ + { address: existingAccount, number: 0, - sequence: 2, + sequence: 3, balance: [ { - type: "aphoton" + type: TOKEN_TYPE, + quantity: balanceAfterSend } ] - }; + }, + { + address: secondAccount, + pubKey: null, + sequence: 0, + balance: [ + { + type: TOKEN_TYPE, + quantity: sendAmount + } + ] + }, + ]; - expect(outputObj.length).toEqual(1); - expect(outputObj[0]).toMatchObject(expectedAccount); - expect(Number(outputObj[0].balance[0].quantity)).toBeGreaterThan(0); - expect(Number(outputObj[0].balance[0].quantity)).toBeLessThan(initialAccountBalance); - }); + expect(outputObj.length).toEqual(2); + expect(outputObj).toMatchObject(expectedAccounts); }); }); }); @@ -182,7 +236,7 @@ function getExpectedBond(params: { id: string, owner: string, balance: number}): owner: params.owner, balance: [ { - type: "aphoton", + type: TOKEN_TYPE, quantity: params.balance } ] diff --git a/test/run-tests.sh b/test/run-tests.sh index 1ec0755..87ef794 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -21,6 +21,8 @@ services: userKey: $laconicd_key bondId: chainId: $cosmos_chain_id + gas: 200000 + fees: 200000aphoton EOL ) echo "$config" > "$config_file" -- 2.45.2 From f8dee0d8d4c8a5a246fbef2e48b115a05c776120 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 10:54:05 +0530 Subject: [PATCH 13/23] Add tests for record operations commands --- test/cli.test.ts | 99 +++++++++++++++++++++++++++++++++--- test/data/watcher-record.yml | 7 +++ 2 files changed, 100 insertions(+), 6 deletions(-) create mode 100644 test/data/watcher-record.yml diff --git a/test/cli.test.ts b/test/cli.test.ts index d9b68b3..971298a 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -1,3 +1,5 @@ +import fs from 'fs'; +import yaml from 'js-yaml'; import assert from 'assert'; import { spawnSync } from 'child_process'; @@ -65,8 +67,7 @@ describe('Test laconic CLI commands', () => { describe('Bond operations', () => { const bondBalance = 1000000000; const bondOwner = existingAccount; - let bondId = 'de88ffab68af143da5d3ba2cf86f468ac4ac2efaa005e4d2fbce5fde85cbaa3e'; - // let bondId: string; + let bondId: string; test('laconic cns bond create', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); @@ -100,7 +101,7 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected bond - const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + const expectedBond = getBond({ id: bondId, owner: bondOwner, balance: bondBalance }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toEqual(expectedBond); @@ -119,7 +120,7 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected bond - const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + const expectedBond = getBond({ id: bondId, owner: bondOwner, balance: bondBalance }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toEqual(expectedBond); @@ -138,7 +139,7 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected bond - const expectedBond = getExpectedBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + const expectedBond = getBond({ id: bondId, owner: bondOwner, balance: bondBalance }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toEqual(expectedBond); @@ -225,12 +226,80 @@ describe('Test laconic CLI commands', () => { expect(outputObj).toMatchObject(expectedAccounts); }); }); + + describe('Record operations', () => { + const recordFilePath = 'test/data/watcher-record.yml'; + const gas = 250000; + const bondBalance = 1000000000; + const { bondId } = createBond(bondBalance); + let recordId: string; + + test('laconic cns record publish --filename --bond-id --gas ', async () => { + const result = spawnSync('laconic', ['cns', 'record', 'publish', '--filename', recordFilePath, '--bond-id', bondId, '--gas', gas.toString()]); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = JSON.parse(output); + + // Expect output object to resultant bond id + expect(outputObj).toHaveProperty('id'); + + recordId = outputObj.id; + }); + + test('laconic cns record list', async () => { + const result = spawnSync('laconic', ['cns', 'record', 'list']); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expected record + const expectedRecord = getRecord(recordFilePath, { bondId, recordId }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toMatchObject(expectedRecord); + expect(outputObj[0]).toHaveProperty('createTime'); + expect(outputObj[0]).toHaveProperty('expiryTime'); + expect(outputObj[0]).toHaveProperty('owners'); + expect(outputObj[0].owners.length).toEqual(1); + }); + + test('laconic cns record get --id ', async () => { + const result = spawnSync('laconic', ['cns', 'record', 'get', '--id', recordId]); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expected record + const expectedRecord = getRecord(recordFilePath, { bondId, recordId }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toMatchObject(expectedRecord); + }); + }); }); }); // Helper methods -function getExpectedBond(params: { id: string, owner: string, balance: number}): any { +function getBond(params: { id: string, owner: string, balance: number}): any { return { id: params.id, owner: params.owner, @@ -242,3 +311,21 @@ function getExpectedBond(params: { id: string, owner: string, balance: number}): ] }; } + +function createBond(quantity: number): { bondId: string } { + const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', quantity.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); + const output = result.stdout.toString().trim(); + + return JSON.parse(output); +} + +function getRecord(recordFilePath: string, params: { bondId: string, recordId: string }): any { + const recordContent = yaml.load(fs.readFileSync(recordFilePath, 'utf8')) as any; + + return { + id: params.recordId, + names: null, + bondId: params.bondId, + attributes: recordContent.record + }; +} diff --git a/test/data/watcher-record.yml b/test/data/watcher-record.yml new file mode 100644 index 0000000..c1900b5 --- /dev/null +++ b/test/data/watcher-record.yml @@ -0,0 +1,7 @@ +record: + type: WebsiteRegistrationRecord + url: 'https://cerc.io' + repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR + version: 1.0.23 -- 2.45.2 From 19ac893020714d77cd7a8058bb563e0f3dfadfb1 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 11:41:00 +0530 Subject: [PATCH 14/23] Add tests for name authority operations commands --- test/cli.test.ts | 80 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index 971298a..f299a81 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -82,7 +82,7 @@ describe('Test laconic CLI commands', () => { expect(output.length).toBeGreaterThan(0); const outputObj = JSON.parse(output); - // Expect output object to resultant bond id + // Expect output object to have resultant bond id expect(outputObj).toHaveProperty('bondId'); bondId = outputObj.bondId; @@ -294,6 +294,47 @@ describe('Test laconic CLI commands', () => { expect(outputObj[0]).toMatchObject(expectedRecord); }); }); + + describe('Name authority operations', () => { + const authorityName = 'laconic'; + + test('laconic cns authority reserve ', async () => { + const result = spawnSync('laconic', ['cns', 'authority', 'reserve', authorityName]); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = JSON.parse(output); + + // Expect result + expect(outputObj).toEqual({ success: true }); + }); + + test('laconic cns authority whois ', async () => { + const result = spawnSync('laconic', ['cns', 'authority', 'whois', authorityName]); + + const output = result.stdout.toString().trim(); + const errorOutput = result.stderr.toString().trim(); + + expect(errorOutput).toBe(''); + expect(result.status).toBe(0); + + expect(output.length).toBeGreaterThan(0); + const outputObj = Array.from(JSON.parse(output)); + + // Expected authority (still in auction) + const expectedAuthority = getAuthority({ status: 'auction', auction: getAuction({ owner: existingAccount }) }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toMatchObject(expectedAuthority); + expect(outputObj[0]).toHaveProperty('expiryTime'); + expect(outputObj[0].height).toBeGreaterThan(0); + }); + }); }); }); @@ -329,3 +370,40 @@ function getRecord(recordFilePath: string, params: { bondId: string, recordId: s attributes: recordContent.record }; } + +function getAuthority(params: { status: string, auction: any }): any { + return { + ownerAddress: '', + ownerPublicKey: '', + status: params.status, + bondId: '', + auction: params.auction || null + }; +} + +function getAuction(params: { owner: string, status?: string, bids?: any[] }): any { + const auctionFees = { + commit: 1000000, + reveal: 1000000, + minimumBid: 5000000 + }; + + return { + status: params.status || 'commit', + ownerAddress: params.owner, + commitFee: { + type: TOKEN_TYPE, + quantity: auctionFees.commit + }, + revealFee: { + type: TOKEN_TYPE, + quantity: auctionFees.reveal + }, + minimumBid: { + type: TOKEN_TYPE, + quantity: auctionFees.minimumBid + }, + winnerAddress: '', + bids: params.bids || [] + }; +} -- 2.45.2 From 3a0866ea969e69cef6140a191a4f40059b92f855 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 12:26:49 +0530 Subject: [PATCH 15/23] Refactor and fix failing test --- .gitea/workflows/test.yml | 2 - test/cli.test.ts | 107 ++++++++++++++++---------------------- test/run-tests.sh | 2 +- 3 files changed, 47 insertions(+), 64 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index e4cdb02..295669b 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -42,8 +42,6 @@ jobs: repository: cerc-io/laconicd fetch-depth: 0 ref: main - - name: Environment - run: ls -tlh && env - name: Build laconicd container working-directory: ./laconicd/tests/sdk_tests diff --git a/test/cli.test.ts b/test/cli.test.ts index f299a81..3fc4338 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -8,6 +8,7 @@ const TOKEN_TYPE = 'aphoton'; describe('Test laconic CLI commands', () => { test('laconic', async () => { const result = spawnSync('laconic'); + expect(result.status).toBe(1); const output = result.stdout.toString().trim(); const errorOutput = result.stderr.toString().trim(); @@ -15,11 +16,11 @@ describe('Test laconic CLI commands', () => { // Expect error with usage string expect(output).toBe(''); expect(errorOutput).toContain('laconic '); - expect(result.status).toBe(1); }); test('laconic cns', async () => { const result = spawnSync('laconic', ['cns']); + expect(result.status).toBe(1); const output = result.stdout.toString().trim(); const errorOutput = result.stderr.toString().trim(); @@ -29,17 +30,13 @@ describe('Test laconic CLI commands', () => { expect(errorOutput).toContain('laconic cns'); expect(errorOutput).toContain('CNS tools'); expect(errorOutput).toContain('Commands:'); - expect(result.status).toBe(1); }); describe('laconic CNS commands', () => { const initialAccountBalance = Number('100000000000000000000000000'); - // let accountSequence = 0; - const existingAccount = process.env.EXISTING_ACCOUNT; - assert(existingAccount, 'EXISTING_ACCOUNT not set in env'); - - const secondAccount = 'ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu'; - + const testAccount = process.env.TEST_ACCOUNT; + const testAccount2 = 'ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu'; + assert(testAccount, 'TEST_ACCOUNT not set in env'); test('laconic cns status', async () => { const result = spawnSync('laconic', ['cns', 'status']); @@ -66,12 +63,11 @@ describe('Test laconic CLI commands', () => { describe('Bond operations', () => { const bondBalance = 1000000000; - const bondOwner = existingAccount; + const bondOwner = testAccount; let bondId: string; test('laconic cns bond create', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); - // accountSequence++; const output = result.stdout.toString().trim(); const errorOutput = result.stderr.toString().trim(); @@ -101,7 +97,7 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected bond - const expectedBond = getBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + const expectedBond = getBondObj({ id: bondId, owner: bondOwner, balance: bondBalance }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toEqual(expectedBond); @@ -120,7 +116,7 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected bond - const expectedBond = getBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + const expectedBond = getBondObj({ id: bondId, owner: bondOwner, balance: bondBalance }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toEqual(expectedBond); @@ -139,7 +135,7 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected bond - const expectedBond = getBond({ id: bondId, owner: bondOwner, balance: bondBalance }); + const expectedBond = getBondObj({ id: bondId, owner: bondOwner, balance: bondBalance }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toEqual(expectedBond); @@ -150,7 +146,7 @@ describe('Test laconic CLI commands', () => { let balanceBeforeSend: number; test('laconic cns account get --address ', async () => { - const result = spawnSync('laconic', ['cns', 'account', 'get', '--address', existingAccount]); + const result = spawnSync('laconic', ['cns', 'account', 'get', '--address', testAccount]); const output = result.stdout.toString().trim(); const errorOutput = result.stderr.toString().trim(); @@ -162,20 +158,14 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected account - const expectedAccount = { - address: existingAccount, - number: 0, - sequence: 2, - balance: [ - { - type: TOKEN_TYPE - } - ] - }; - balanceBeforeSend = Number(outputObj[0].balance[0].quantity); + const expectedAccount = getAccountObj({ address: testAccount }) expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedAccount); + expect(outputObj[0]).toHaveProperty('number'); + expect(outputObj[0]).toHaveProperty('sequence'); + + balanceBeforeSend = Number(outputObj[0].balance[0].quantity); expect(balanceBeforeSend).toBeGreaterThan(0); expect(balanceBeforeSend).toBeLessThan(initialAccountBalance); }); @@ -184,8 +174,7 @@ describe('Test laconic CLI commands', () => { const sendAmount = 1000000000; const balanceAfterSend = balanceBeforeSend - sendAmount; - const result = spawnSync('laconic', ['cns', 'tokens', 'send', '--address', secondAccount, '--type', TOKEN_TYPE, '--quantity', sendAmount.toString()]); - // accountSequence++; + const result = spawnSync('laconic', ['cns', 'tokens', 'send', '--address', testAccount2, '--type', TOKEN_TYPE, '--quantity', sendAmount.toString()]); const output = result.stdout.toString().trim(); const errorOutput = result.stderr.toString().trim(); @@ -198,28 +187,8 @@ describe('Test laconic CLI commands', () => { // Expected acconts const expectedAccounts = [ - { - address: existingAccount, - number: 0, - sequence: 3, - balance: [ - { - type: TOKEN_TYPE, - quantity: balanceAfterSend - } - ] - }, - { - address: secondAccount, - pubKey: null, - sequence: 0, - balance: [ - { - type: TOKEN_TYPE, - quantity: sendAmount - } - ] - }, + getAccountObj({ address: testAccount, balance: balanceAfterSend }), + getAccountObj({ address: testAccount2, balance: sendAmount }), ]; expect(outputObj.length).toEqual(2); @@ -231,10 +200,13 @@ describe('Test laconic CLI commands', () => { const recordFilePath = 'test/data/watcher-record.yml'; const gas = 250000; const bondBalance = 1000000000; - const { bondId } = createBond(bondBalance); + let bondId: string; let recordId: string; test('laconic cns record publish --filename --bond-id --gas ', async () => { + // Create a new bond to be associated with the record + ({ bondId } = createBond(bondBalance)); + const result = spawnSync('laconic', ['cns', 'record', 'publish', '--filename', recordFilePath, '--bond-id', bondId, '--gas', gas.toString()]); const output = result.stdout.toString().trim(); @@ -265,7 +237,7 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected record - const expectedRecord = getRecord(recordFilePath, { bondId, recordId }); + const expectedRecord = getRecordObj(recordFilePath, { bondId, recordId }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedRecord); @@ -288,7 +260,7 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected record - const expectedRecord = getRecord(recordFilePath, { bondId, recordId }); + const expectedRecord = getRecordObj(recordFilePath, { bondId, recordId }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedRecord); @@ -317,6 +289,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns authority whois ', async () => { const result = spawnSync('laconic', ['cns', 'authority', 'whois', authorityName]); + // TODO: Refactor these basic checks const output = result.stdout.toString().trim(); const errorOutput = result.stderr.toString().trim(); @@ -327,7 +300,7 @@ describe('Test laconic CLI commands', () => { const outputObj = Array.from(JSON.parse(output)); // Expected authority (still in auction) - const expectedAuthority = getAuthority({ status: 'auction', auction: getAuction({ owner: existingAccount }) }); + const expectedAuthority = getAuthorityObj({ status: 'auction', auction: getAuctionObj({ owner: testAccount }) }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedAuthority); @@ -340,7 +313,14 @@ describe('Test laconic CLI commands', () => { // Helper methods -function getBond(params: { id: string, owner: string, balance: number}): any { +function createBond(quantity: number): { bondId: string } { + const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', quantity.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); + const output = result.stdout.toString().trim(); + + return JSON.parse(output); +} + +function getBondObj(params: { id: string, owner: string, balance: number}): any { return { id: params.id, owner: params.owner, @@ -353,14 +333,19 @@ function getBond(params: { id: string, owner: string, balance: number}): any { }; } -function createBond(quantity: number): { bondId: string } { - const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', quantity.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); - const output = result.stdout.toString().trim(); +function getAccountObj(params: { address: string, balance?: number }): any { + const balanceObj: any = { type: TOKEN_TYPE }; + if (params.balance) { + balanceObj.quantity = params.balance; + } - return JSON.parse(output); + return { + address: params.address, + balance: [balanceObj] + }; } -function getRecord(recordFilePath: string, params: { bondId: string, recordId: string }): any { +function getRecordObj(recordFilePath: string, params: { bondId: string, recordId: string }): any { const recordContent = yaml.load(fs.readFileSync(recordFilePath, 'utf8')) as any; return { @@ -371,7 +356,7 @@ function getRecord(recordFilePath: string, params: { bondId: string, recordId: s }; } -function getAuthority(params: { status: string, auction: any }): any { +function getAuthorityObj(params: { status: string, auction: any }): any { return { ownerAddress: '', ownerPublicKey: '', @@ -381,7 +366,7 @@ function getAuthority(params: { status: string, auction: any }): any { }; } -function getAuction(params: { owner: string, status?: string, bids?: any[] }): any { +function getAuctionObj(params: { owner: string, status?: string, bids?: any[] }): any { const auctionFees = { commit: 1000000, reveal: 1000000, diff --git a/test/run-tests.sh b/test/run-tests.sh index 87ef794..9928477 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -31,4 +31,4 @@ echo "$config" > "$config_file" docker compose exec laconicd sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api" # Run tests -EXISTING_ACCOUNT=$laconicd_account_address yarn test +TEST_ACCOUNT=$laconicd_account_address yarn test -- 2.45.2 From 12dd420a13dbb3b527c230d2ae0b42ba3bfbe7b7 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 12:45:30 +0530 Subject: [PATCH 16/23] Refactor basic command result checks --- test/cli.test.ts | 133 +++++++++-------------------------------------- 1 file changed, 25 insertions(+), 108 deletions(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index 3fc4338..7743562 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -1,7 +1,7 @@ import fs from 'fs'; import yaml from 'js-yaml'; import assert from 'assert'; -import { spawnSync } from 'child_process'; +import { SpawnSyncReturns, spawnSync } from 'child_process'; const TOKEN_TYPE = 'aphoton'; @@ -40,10 +40,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns status', async () => { const result = spawnSync('laconic', ['cns', 'status']); - - const output = result.stdout.toString().trim(); - const outputObj = JSON.parse(output); - const errorOutput = result.stderr.toString().trim(); + const outputObj = checkResultAndRetrieveOutput(result); // Expect output object to have CNS status props expect(outputObj).toHaveProperty('version'); @@ -56,9 +53,6 @@ describe('Test laconic CLI commands', () => { expect(outputObj).toHaveProperty('num_peers'); expect(outputObj).toHaveProperty('peers'); expect(outputObj).toHaveProperty('disk_usage'); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); }); describe('Bond operations', () => { @@ -68,15 +62,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns bond create', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = JSON.parse(output); + const outputObj = checkResultAndRetrieveOutput(result); // Expect output object to have resultant bond id expect(outputObj).toHaveProperty('bondId'); @@ -86,15 +72,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns bond list', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'list']); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); + const outputObj = checkResultAndRetrieveOutput(result); // Expected bond const expectedBond = getBondObj({ id: bondId, owner: bondOwner, balance: bondBalance }); @@ -105,15 +83,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns bond list --owner ', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'list', '--owner', bondOwner]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); + const outputObj = checkResultAndRetrieveOutput(result); // Expected bond const expectedBond = getBondObj({ id: bondId, owner: bondOwner, balance: bondBalance }); @@ -124,15 +94,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns bond get --id ', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'get', '--id', bondId]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); + const outputObj = checkResultAndRetrieveOutput(result); // Expected bond const expectedBond = getBondObj({ id: bondId, owner: bondOwner, balance: bondBalance }); @@ -147,15 +109,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns account get --address ', async () => { const result = spawnSync('laconic', ['cns', 'account', 'get', '--address', testAccount]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); + const outputObj = checkResultAndRetrieveOutput(result); // Expected account const expectedAccount = getAccountObj({ address: testAccount }) @@ -175,15 +129,7 @@ describe('Test laconic CLI commands', () => { const balanceAfterSend = balanceBeforeSend - sendAmount; const result = spawnSync('laconic', ['cns', 'tokens', 'send', '--address', testAccount2, '--type', TOKEN_TYPE, '--quantity', sendAmount.toString()]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); + const outputObj = checkResultAndRetrieveOutput(result); // Expected acconts const expectedAccounts = [ @@ -208,15 +154,7 @@ describe('Test laconic CLI commands', () => { ({ bondId } = createBond(bondBalance)); const result = spawnSync('laconic', ['cns', 'record', 'publish', '--filename', recordFilePath, '--bond-id', bondId, '--gas', gas.toString()]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = JSON.parse(output); + const outputObj = checkResultAndRetrieveOutput(result); // Expect output object to resultant bond id expect(outputObj).toHaveProperty('id'); @@ -226,15 +164,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns record list', async () => { const result = spawnSync('laconic', ['cns', 'record', 'list']); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); + const outputObj = checkResultAndRetrieveOutput(result); // Expected record const expectedRecord = getRecordObj(recordFilePath, { bondId, recordId }); @@ -249,15 +179,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns record get --id ', async () => { const result = spawnSync('laconic', ['cns', 'record', 'get', '--id', recordId]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); + const outputObj = checkResultAndRetrieveOutput(result); // Expected record const expectedRecord = getRecordObj(recordFilePath, { bondId, recordId }); @@ -272,15 +194,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns authority reserve ', async () => { const result = spawnSync('laconic', ['cns', 'authority', 'reserve', authorityName]); - - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = JSON.parse(output); + const outputObj = checkResultAndRetrieveOutput(result); // Expect result expect(outputObj).toEqual({ success: true }); @@ -288,16 +202,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns authority whois ', async () => { const result = spawnSync('laconic', ['cns', 'authority', 'whois', authorityName]); - - // TODO: Refactor these basic checks - const output = result.stdout.toString().trim(); - const errorOutput = result.stderr.toString().trim(); - - expect(errorOutput).toBe(''); - expect(result.status).toBe(0); - - expect(output.length).toBeGreaterThan(0); - const outputObj = Array.from(JSON.parse(output)); + const outputObj = checkResultAndRetrieveOutput(result); // Expected authority (still in auction) const expectedAuthority = getAuthorityObj({ status: 'auction', auction: getAuctionObj({ owner: testAccount }) }); @@ -313,6 +218,18 @@ describe('Test laconic CLI commands', () => { // Helper methods +function checkResultAndRetrieveOutput(result: SpawnSyncReturns): any { + expect(result.status).toBe(0); + + const errorOutput = result.stderr.toString().trim(); + expect(errorOutput).toBe(''); + + const output = result.stdout.toString().trim(); + expect(output.length).toBeGreaterThan(0); + + return JSON.parse(output); +} + function createBond(quantity: number): { bondId: string } { const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', quantity.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); const output = result.stdout.toString().trim(); -- 2.45.2 From 7ac169d82241d9beb8f47b8320592c22d25aaa03 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 14:10:35 +0530 Subject: [PATCH 17/23] Add placeholders for remaining tests --- test/cli.test.ts | 78 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index 7743562..3ec345b 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -32,6 +32,8 @@ describe('Test laconic CLI commands', () => { expect(errorOutput).toContain('Commands:'); }); + // TODO: Add tests for CNS commands with all available flags + describe('laconic CNS commands', () => { const initialAccountBalance = Number('100000000000000000000000000'); const testAccount = process.env.TEST_ACCOUNT; @@ -60,7 +62,7 @@ describe('Test laconic CLI commands', () => { const bondOwner = testAccount; let bondId: string; - test('laconic cns bond create', async () => { + test('laconic cns bond create --type --quantity ', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); const outputObj = checkResultAndRetrieveOutput(result); @@ -102,6 +104,18 @@ describe('Test laconic CLI commands', () => { expect(outputObj.length).toEqual(1); expect(outputObj[0]).toEqual(expectedBond); }); + + test('laconic cns bond refill --id --type --quantity ', async () => { + // TODO + }); + + test('laconic cns bond withdraw --id --type --quantity ', async () => { + // TODO + }); + + test('laconic cns bond cancel --id ', async () => { + // TODO + }); }); describe('Account and tokens operations', () => { @@ -187,9 +201,23 @@ describe('Test laconic CLI commands', () => { expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedRecord); }); + + describe('Bond records operations', () => { + test('laconic cns bond associate --id --bond-id ', async () => { + // TODO + }); + + test('laconic cns bond dissociate --id ', async () => { + // TODO + }); + + test('laconic cns bond records reassociate --old-bond-id --new-bond-id ', async () => { + // TODO + }); + }); }); - describe('Name authority operations', () => { + describe('Name authority operations (pre auction)', () => { const authorityName = 'laconic'; test('laconic cns authority reserve ', async () => { @@ -213,6 +241,52 @@ describe('Test laconic CLI commands', () => { expect(outputObj[0].height).toBeGreaterThan(0); }); }); + + describe('Auction operations', () => { + test('laconic cns auction get ', async () => { + // TODO + }); + + test('laconic cns auction bid commit ', async () => { + // TODO + }); + + test('laconic cns auction bid reveal ', async () => { + // TODO + }); + }); + + describe('Name authority operations (post auction)', () => { + test('laconic cns authority bond set laconic ', async () => { + // TODO + }); + + test('laconic cns authority reserve (same owner)', async () => { + // TODO + }); + + test('laconic cns authority reserve --owner (different owner)', async () => { + // TODO + }); + }); + + describe('Name operations', () => { + test('laconic cns name set ', async () => { + // TODO + }); + + test('laconic cns name lookup ', async () => { + // TODO + }); + + test('laconic cns name resolve ', async () => { + // TODO + }); + + test('laconic cns name delete ', async () => { + // TODO + }); + }); }); }); -- 2.45.2 From d8a5b93a237e9b05998f03d0af6844c8cfc91d32 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 15:22:38 +0530 Subject: [PATCH 18/23] Add tests for auction operations and refactor out helper methods --- test/cli.test.ts | 192 +++++++++++++++++++---------------------------- test/helpers.ts | 120 +++++++++++++++++++++++++++++ 2 files changed, 197 insertions(+), 115 deletions(-) create mode 100644 test/helpers.ts diff --git a/test/cli.test.ts b/test/cli.test.ts index 3ec345b..92a502c 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -1,9 +1,21 @@ import fs from 'fs'; -import yaml from 'js-yaml'; import assert from 'assert'; -import { SpawnSyncReturns, spawnSync } from 'child_process'; +import { spawnSync } from 'child_process'; -const TOKEN_TYPE = 'aphoton'; +import { + CHAIN_ID, + TOKEN_TYPE, + COMMIT_DURATION, + delay, + checkResultAndRetrieveOutput, + createBond, + getBondObj, + getAccountObj, + getRecordObj, + getAuthorityObj, + getAuctionObj, + getBidObject +} from './helpers'; describe('Test laconic CLI commands', () => { test('laconic', async () => { @@ -40,6 +52,9 @@ describe('Test laconic CLI commands', () => { const testAccount2 = 'ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu'; assert(testAccount, 'TEST_ACCOUNT not set in env'); + const testAuthorityName = 'laconic'; + let testAuctionId: string; + test('laconic cns status', async () => { const result = spawnSync('laconic', ['cns', 'status']); const outputObj = checkResultAndRetrieveOutput(result); @@ -47,7 +62,7 @@ describe('Test laconic CLI commands', () => { // Expect output object to have CNS status props expect(outputObj).toHaveProperty('version'); expect(outputObj).toHaveProperty('node'); - expect(outputObj).toHaveProperty('node.network', 'laconic_9000-1'); + expect(outputObj).toHaveProperty('node.network', CHAIN_ID); expect(outputObj).toHaveProperty('sync'); expect(Number(outputObj.sync.latest_block_height)).toBeGreaterThan(0); expect(outputObj).toHaveProperty('validator'); @@ -67,7 +82,7 @@ describe('Test laconic CLI commands', () => { const outputObj = checkResultAndRetrieveOutput(result); // Expect output object to have resultant bond id - expect(outputObj).toHaveProperty('bondId'); + expect(outputObj.bondId).toBeDefined(); bondId = outputObj.bondId; }); @@ -130,8 +145,8 @@ describe('Test laconic CLI commands', () => { expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedAccount); - expect(outputObj[0]).toHaveProperty('number'); - expect(outputObj[0]).toHaveProperty('sequence'); + expect(outputObj[0].number).toBeDefined(); + expect(outputObj[0].sequence).toBeDefined(); balanceBeforeSend = Number(outputObj[0].balance[0].quantity); expect(balanceBeforeSend).toBeGreaterThan(0); @@ -171,7 +186,7 @@ describe('Test laconic CLI commands', () => { const outputObj = checkResultAndRetrieveOutput(result); // Expect output object to resultant bond id - expect(outputObj).toHaveProperty('id'); + expect(outputObj.id).toBeDefined(); recordId = outputObj.id; }); @@ -185,9 +200,9 @@ describe('Test laconic CLI commands', () => { expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedRecord); - expect(outputObj[0]).toHaveProperty('createTime'); - expect(outputObj[0]).toHaveProperty('expiryTime'); - expect(outputObj[0]).toHaveProperty('owners'); + expect(outputObj[0].createTime).toBeDefined(); + expect(outputObj[0].expiryTime).toBeDefined(); + expect(outputObj[0].owners).toBeDefined(); expect(outputObj[0].owners.length).toEqual(1); }); @@ -218,10 +233,8 @@ describe('Test laconic CLI commands', () => { }); describe('Name authority operations (pre auction)', () => { - const authorityName = 'laconic'; - test('laconic cns authority reserve ', async () => { - const result = spawnSync('laconic', ['cns', 'authority', 'reserve', authorityName]); + const result = spawnSync('laconic', ['cns', 'authority', 'reserve', testAuthorityName]); const outputObj = checkResultAndRetrieveOutput(result); // Expect result @@ -229,7 +242,7 @@ describe('Test laconic CLI commands', () => { }); test('laconic cns authority whois ', async () => { - const result = spawnSync('laconic', ['cns', 'authority', 'whois', authorityName]); + const result = spawnSync('laconic', ['cns', 'authority', 'whois', testAuthorityName]); const outputObj = checkResultAndRetrieveOutput(result); // Expected authority (still in auction) @@ -237,23 +250,66 @@ describe('Test laconic CLI commands', () => { expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedAuthority); - expect(outputObj[0]).toHaveProperty('expiryTime'); + expect(outputObj[0].expiryTime).toBeDefined(); expect(outputObj[0].height).toBeGreaterThan(0); + + testAuctionId = outputObj[0].auction.id; }); }); describe('Auction operations', () => { + const bidAmount = 25000000; + let bidRevealFilePath: string; + test('laconic cns auction get ', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'auction', 'get', testAuctionId]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected auction (still in commit stage) + const expectedAuction = getAuctionObj({ owner: testAccount, status: 'commit' }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toMatchObject(expectedAuction); }); test('laconic cns auction bid commit ', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'auction', 'bid', 'commit', testAuctionId, bidAmount.toString(), TOKEN_TYPE]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj.reveal_file).toBeDefined(); + + bidRevealFilePath = outputObj.reveal_file; }); - test('laconic cns auction bid reveal ', async () => { - // TODO - }); + test('laconic cns auction bid reveal ', async () => { + // Wait for commits duration (60s) + await delay(COMMIT_DURATION * 1000); + + const auctionResult = spawnSync('laconic', ['cns', 'auction', 'get', testAuctionId]); + const auctionOutputObj = checkResultAndRetrieveOutput(auctionResult); + + const expectedAuction = getAuctionObj({ owner: testAccount, status: 'reveal' }); + const expectedBid = getBidObject({ bidder: testAccount }); + + expect(auctionOutputObj[0]).toMatchObject(expectedAuction); + expect(auctionOutputObj[0].bids[0]).toMatchObject(expectedBid); + + // Reveal bid + const result = spawnSync('laconic', ['cns', 'auction', 'bid', 'reveal', testAuctionId, bidRevealFilePath]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + const revealObject = JSON.parse(fs.readFileSync(bidRevealFilePath, 'utf8')); + expect(revealObject).toMatchObject({ + chainId: CHAIN_ID, + auctionId: testAuctionId, + bidderAddress: testAccount, + bidAmount: `${bidAmount}aphoton` + }); + }, (COMMIT_DURATION + 5) * 1000); }); describe('Name authority operations (post auction)', () => { @@ -289,97 +345,3 @@ describe('Test laconic CLI commands', () => { }); }); }); - -// Helper methods - -function checkResultAndRetrieveOutput(result: SpawnSyncReturns): any { - expect(result.status).toBe(0); - - const errorOutput = result.stderr.toString().trim(); - expect(errorOutput).toBe(''); - - const output = result.stdout.toString().trim(); - expect(output.length).toBeGreaterThan(0); - - return JSON.parse(output); -} - -function createBond(quantity: number): { bondId: string } { - const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', quantity.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); - const output = result.stdout.toString().trim(); - - return JSON.parse(output); -} - -function getBondObj(params: { id: string, owner: string, balance: number}): any { - return { - id: params.id, - owner: params.owner, - balance: [ - { - type: TOKEN_TYPE, - quantity: params.balance - } - ] - }; -} - -function getAccountObj(params: { address: string, balance?: number }): any { - const balanceObj: any = { type: TOKEN_TYPE }; - if (params.balance) { - balanceObj.quantity = params.balance; - } - - return { - address: params.address, - balance: [balanceObj] - }; -} - -function getRecordObj(recordFilePath: string, params: { bondId: string, recordId: string }): any { - const recordContent = yaml.load(fs.readFileSync(recordFilePath, 'utf8')) as any; - - return { - id: params.recordId, - names: null, - bondId: params.bondId, - attributes: recordContent.record - }; -} - -function getAuthorityObj(params: { status: string, auction: any }): any { - return { - ownerAddress: '', - ownerPublicKey: '', - status: params.status, - bondId: '', - auction: params.auction || null - }; -} - -function getAuctionObj(params: { owner: string, status?: string, bids?: any[] }): any { - const auctionFees = { - commit: 1000000, - reveal: 1000000, - minimumBid: 5000000 - }; - - return { - status: params.status || 'commit', - ownerAddress: params.owner, - commitFee: { - type: TOKEN_TYPE, - quantity: auctionFees.commit - }, - revealFee: { - type: TOKEN_TYPE, - quantity: auctionFees.reveal - }, - minimumBid: { - type: TOKEN_TYPE, - quantity: auctionFees.minimumBid - }, - winnerAddress: '', - bids: params.bids || [] - }; -} diff --git a/test/helpers.ts b/test/helpers.ts new file mode 100644 index 0000000..0d90eeb --- /dev/null +++ b/test/helpers.ts @@ -0,0 +1,120 @@ +import fs from 'fs'; +import yaml from 'js-yaml'; +import { SpawnSyncReturns, spawnSync } from 'child_process'; + +export const CHAIN_ID = 'laconic_9000-1'; +export const TOKEN_TYPE = 'aphoton'; +export const AUCTION_FEES = { + commit: 1000000, + reveal: 1000000, + minimumBid: 5000000 +}; +export const COMMIT_DURATION = 60; // 60s + +export function checkResultAndRetrieveOutput(result: SpawnSyncReturns): any { + expect(result.status).toBe(0); + + const errorOutput = result.stderr.toString().trim(); + expect(errorOutput).toBe(''); + + const output = result.stdout.toString().trim(); + expect(output.length).toBeGreaterThan(0); + + return JSON.parse(output); +} + +export function createBond(quantity: number): { bondId: string } { + const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', quantity.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); + const output = result.stdout.toString().trim(); + + return JSON.parse(output); +} + +export function getBondObj(params: { id: string, owner: string, balance: number}): any { + return { + id: params.id, + owner: params.owner, + balance: [ + { + type: TOKEN_TYPE, + quantity: params.balance + } + ] + }; +} + +export function getAccountObj(params: { address: string, balance?: number }): any { + const balanceObj: any = { type: TOKEN_TYPE }; + if (params.balance) { + balanceObj.quantity = params.balance; + } + + return { + address: params.address, + balance: [balanceObj] + }; +} + +export function getRecordObj(recordFilePath: string, params: { bondId: string, recordId: string }): any { + const recordContent = yaml.load(fs.readFileSync(recordFilePath, 'utf8')) as any; + + return { + id: params.recordId, + names: null, + bondId: params.bondId, + attributes: recordContent.record + }; +} + +export function getAuthorityObj(params: { status: string, auction: any }): any { + return { + ownerAddress: '', + ownerPublicKey: '', + status: params.status, + bondId: '', + auction: params.auction || null + }; +} + +export function getAuctionObj(params: { owner: string, status?: string }): any { + return { + status: params.status || 'commit', + ownerAddress: params.owner, + commitFee: { + type: TOKEN_TYPE, + quantity: AUCTION_FEES.commit + }, + revealFee: { + type: TOKEN_TYPE, + quantity: AUCTION_FEES.reveal + }, + minimumBid: { + type: TOKEN_TYPE, + quantity: AUCTION_FEES.minimumBid + }, + winnerAddress: '', + }; +} + +export function getBidObject(params: { bidder: string, status?: string }): any { + return { + bidderAddress: params.bidder, + status: params.status || 'commit', + commitFee: { + type: TOKEN_TYPE, + quantity: AUCTION_FEES.commit + }, + revealFee: { + type: TOKEN_TYPE, + quantity: AUCTION_FEES.reveal + }, + bidAmount: { + type: '', + quantity: 0 + } + }; +} + +export async function delay(ms: number): Promise { + return new Promise(res => setTimeout(res, ms)) +} -- 2.45.2 From 74a5183ad87e0c82f7c4da1a6bb06089741548da Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 15:47:24 +0530 Subject: [PATCH 19/23] Add tests for post auction name authority operations --- test/cli.test.ts | 74 ++++++++++++++++++++++++++++++++++++++++++++---- test/helpers.ts | 10 +++---- 2 files changed, 74 insertions(+), 10 deletions(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index 92a502c..c3726d6 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -6,6 +6,7 @@ import { CHAIN_ID, TOKEN_TYPE, COMMIT_DURATION, + REVEAL_DURATION, delay, checkResultAndRetrieveOutput, createBond, @@ -246,7 +247,7 @@ describe('Test laconic CLI commands', () => { const outputObj = checkResultAndRetrieveOutput(result); // Expected authority (still in auction) - const expectedAuthority = getAuthorityObj({ status: 'auction', auction: getAuctionObj({ owner: testAccount }) }); + const expectedAuthority = getAuthorityObj({ owner: '', status: 'auction', auction: getAuctionObj({ owner: testAccount }) }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedAuthority); @@ -283,7 +284,7 @@ describe('Test laconic CLI commands', () => { }); test('laconic cns auction bid reveal ', async () => { - // Wait for commits duration (60s) + // Wait for auction commits duration (60s) await delay(COMMIT_DURATION * 1000); const auctionResult = spawnSync('laconic', ['cns', 'auction', 'get', testAuctionId]); @@ -313,16 +314,79 @@ describe('Test laconic CLI commands', () => { }); describe('Name authority operations (post auction)', () => { + const testSubAuthorityName = 'echo.laconic'; + const testSubAuthorityName2 = 'kube.laconic'; + + test('laconic cns authority whois ', async () => { + // Wait for auction reveals duration (60s) + await delay(REVEAL_DURATION * 1000); + + const result = spawnSync('laconic', ['cns', 'authority', 'whois', testAuthorityName]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected authority (active) + const expectedAuthority = getAuthorityObj({ owner: testAccount, status: 'active', auction: null }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toMatchObject(expectedAuthority); + }, (REVEAL_DURATION + 5) * 1000); + test('laconic cns authority bond set laconic ', async () => { - // TODO + // Create a new bond to be set on the authority + const bondBalance = 1000000000; + const { bondId } = createBond(bondBalance); + + const result = spawnSync('laconic', ['cns', 'authority', 'bond', 'set', testAuthorityName, bondId]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + // Check updated authority + const authorityResult = spawnSync('laconic', ['cns', 'authority', 'whois', testAuthorityName]); + const authorityOutputObj = checkResultAndRetrieveOutput(authorityResult); + + // Expected authority (active with bond) + const expectedAuthority = getAuthorityObj({ owner: testAccount, status: 'active', auction: null, bondId: bondId }); + + expect(authorityOutputObj.length).toEqual(1); + expect(authorityOutputObj[0]).toMatchObject(expectedAuthority); }); test('laconic cns authority reserve (same owner)', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'authority', 'reserve', testSubAuthorityName]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + // Check updated authority + const authorityResult = spawnSync('laconic', ['cns', 'authority', 'whois', testSubAuthorityName]); + const authorityOutputObj = checkResultAndRetrieveOutput(authorityResult); + + // Expected authority (active with bond) + const expectedAuthority = getAuthorityObj({ owner: testAccount, status: 'active', auction: null }); + + expect(authorityOutputObj.length).toEqual(1); + expect(authorityOutputObj[0]).toMatchObject(expectedAuthority); }); test('laconic cns authority reserve --owner (different owner)', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'authority', 'reserve', testSubAuthorityName2, '--owner', testAccount2]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + // Check updated authority + const authorityResult = spawnSync('laconic', ['cns', 'authority', 'whois', testSubAuthorityName2]); + const authorityOutputObj = checkResultAndRetrieveOutput(authorityResult); + + // Expected authority (active with bond) + const expectedAuthority = getAuthorityObj({ owner: testAccount2, status: 'active', auction: null }); + + expect(authorityOutputObj.length).toEqual(1); + expect(authorityOutputObj[0]).toMatchObject(expectedAuthority); }); }); diff --git a/test/helpers.ts b/test/helpers.ts index 0d90eeb..8874f5b 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -10,6 +10,7 @@ export const AUCTION_FEES = { minimumBid: 5000000 }; export const COMMIT_DURATION = 60; // 60s +export const REVEAL_DURATION = 60; // 60s export function checkResultAndRetrieveOutput(result: SpawnSyncReturns): any { expect(result.status).toBe(0); @@ -66,13 +67,12 @@ export function getRecordObj(recordFilePath: string, params: { bondId: string, r }; } -export function getAuthorityObj(params: { status: string, auction: any }): any { +export function getAuthorityObj(params: { owner: string, status: string, auction: any, bondId?: string }): any { return { - ownerAddress: '', - ownerPublicKey: '', + ownerAddress: params.owner, status: params.status, - bondId: '', - auction: params.auction || null + bondId: params.bondId || '', + auction: params.auction }; } -- 2.45.2 From ad91dfa4bffef607a7611a52d09649d0fcbe49c2 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 16:18:19 +0530 Subject: [PATCH 20/23] Add tests for name operations --- test/cli.test.ts | 52 ++++++++++++++++++++++++++++++++++++------------ test/helpers.ts | 4 ++-- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index c3726d6..c04dba8 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -55,6 +55,8 @@ describe('Test laconic CLI commands', () => { const testAuthorityName = 'laconic'; let testAuctionId: string; + const testRecordFilePath = 'test/data/watcher-record.yml'; + let testRecordId: string, testRecordBondId: string; test('laconic cns status', async () => { const result = spawnSync('laconic', ['cns', 'status']); @@ -173,23 +175,20 @@ describe('Test laconic CLI commands', () => { }); describe('Record operations', () => { - const recordFilePath = 'test/data/watcher-record.yml'; const gas = 250000; const bondBalance = 1000000000; - let bondId: string; - let recordId: string; test('laconic cns record publish --filename --bond-id --gas ', async () => { // Create a new bond to be associated with the record - ({ bondId } = createBond(bondBalance)); + ({ bondId: testRecordBondId } = createBond(bondBalance)); - const result = spawnSync('laconic', ['cns', 'record', 'publish', '--filename', recordFilePath, '--bond-id', bondId, '--gas', gas.toString()]); + const result = spawnSync('laconic', ['cns', 'record', 'publish', '--filename', testRecordFilePath, '--bond-id', testRecordBondId, '--gas', gas.toString()]); const outputObj = checkResultAndRetrieveOutput(result); // Expect output object to resultant bond id expect(outputObj.id).toBeDefined(); - recordId = outputObj.id; + testRecordId = outputObj.id; }); test('laconic cns record list', async () => { @@ -197,7 +196,7 @@ describe('Test laconic CLI commands', () => { const outputObj = checkResultAndRetrieveOutput(result); // Expected record - const expectedRecord = getRecordObj(recordFilePath, { bondId, recordId }); + const expectedRecord = getRecordObj(testRecordFilePath, { bondId: testRecordBondId, recordId: testRecordId, names: null }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedRecord); @@ -208,11 +207,11 @@ describe('Test laconic CLI commands', () => { }); test('laconic cns record get --id ', async () => { - const result = spawnSync('laconic', ['cns', 'record', 'get', '--id', recordId]); + const result = spawnSync('laconic', ['cns', 'record', 'get', '--id', testRecordId]); const outputObj = checkResultAndRetrieveOutput(result); // Expected record - const expectedRecord = getRecordObj(recordFilePath, { bondId, recordId }); + const expectedRecord = getRecordObj(testRecordFilePath, { bondId: testRecordBondId, recordId: testRecordId, names: null }); expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedRecord); @@ -391,20 +390,47 @@ describe('Test laconic CLI commands', () => { }); describe('Name operations', () => { + const testName = 'crn://laconic/watcher/erc20'; + test('laconic cns name set ', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'name', 'set', testName, testRecordId]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); }); test('laconic cns name lookup ', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'name', 'lookup', testName]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toMatchObject({ latest: { id: testRecordId } }); }); test('laconic cns name resolve ', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'name', 'resolve', testName]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected resolved record + const expectedRecord = getRecordObj(testRecordFilePath, { bondId: testRecordBondId, recordId: testRecordId, names: [testName] }); + + expect(outputObj.length).toEqual(1); + expect(outputObj[0]).toMatchObject(expectedRecord); }); test('laconic cns name delete ', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'name', 'delete', testName]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + // Check that name doesn't resolve + const resolveResult = spawnSync('laconic', ['cns', 'name', 'resolve', testName]); + const resolveOutputObj = checkResultAndRetrieveOutput(resolveResult); + expect(resolveOutputObj.length).toEqual(0); }); }); }); diff --git a/test/helpers.ts b/test/helpers.ts index 8874f5b..66e0938 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -56,12 +56,12 @@ export function getAccountObj(params: { address: string, balance?: number }): an }; } -export function getRecordObj(recordFilePath: string, params: { bondId: string, recordId: string }): any { +export function getRecordObj(recordFilePath: string, params: { bondId: string, recordId: string, names: any }): any { const recordContent = yaml.load(fs.readFileSync(recordFilePath, 'utf8')) as any; return { id: params.recordId, - names: null, + names: params.names, bondId: params.bondId, attributes: recordContent.record }; -- 2.45.2 From 16cd3dedf96a027ca5d2916b1bb5ea87d786d59f Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 16:44:42 +0530 Subject: [PATCH 21/23] Add tests for additional bond commands --- test/cli.test.ts | 57 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index c04dba8..cd9706e 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -76,7 +76,7 @@ describe('Test laconic CLI commands', () => { }); describe('Bond operations', () => { - const bondBalance = 1000000000; + let bondBalance = 1000000000; const bondOwner = testAccount; let bondId: string; @@ -123,16 +123,63 @@ describe('Test laconic CLI commands', () => { expect(outputObj[0]).toEqual(expectedBond); }); - test('laconic cns bond refill --id --type --quantity ', async () => { - // TODO + test('laconic cns bond refill --id --type --quantity ', async () => { + const bondRefillAmount = 1000; + bondBalance += bondRefillAmount; + + const result = spawnSync('laconic', ['cns', 'bond', 'refill', '--id', bondId, '--type', TOKEN_TYPE, '--quantity', bondRefillAmount.toString()]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + // Check updated bond + const bondResult = spawnSync('laconic', ['cns', 'bond', 'get', '--id', bondId]); + const bondOutputObj = checkResultAndRetrieveOutput(bondResult); + + // Expected bond + const expectedBond = getBondObj({ id: bondId, owner: bondOwner, balance: bondBalance }); + + expect(bondOutputObj.length).toEqual(1); + expect(bondOutputObj[0]).toEqual(expectedBond); }); test('laconic cns bond withdraw --id --type --quantity ', async () => { - // TODO + const bondWithdrawAmount = 500; + bondBalance -= bondWithdrawAmount; + + const result = spawnSync('laconic', ['cns', 'bond', 'withdraw', '--id', bondId, '--type', TOKEN_TYPE, '--quantity', bondWithdrawAmount.toString()]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + // Check updated bond + const bondResult = spawnSync('laconic', ['cns', 'bond', 'get', '--id', bondId]); + const bondOutputObj = checkResultAndRetrieveOutput(bondResult); + + // Expected bond + const expectedBond = getBondObj({ id: bondId, owner: bondOwner, balance: bondBalance }); + + // Expect balance to be deducted (also deducts gas) + expect(bondOutputObj.length).toEqual(1); + expect(bondOutputObj[0]).toEqual(expectedBond); }); test('laconic cns bond cancel --id ', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'bond', 'cancel', '--id', bondId]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + // Check updated bond + const bondResult = spawnSync('laconic', ['cns', 'bond', 'get', '--id', bondId]); + const bondOutputObj = checkResultAndRetrieveOutput(bondResult); + + // Expect empty object + expect(bondOutputObj.length).toEqual(1); + expect(bondOutputObj[0]).toEqual({ id: '', owner: '', balance: [] }); }); }); -- 2.45.2 From 85827c8466b68bc9c01741bc54f7be35e49ffd90 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 17:05:21 +0530 Subject: [PATCH 22/23] Add tests for bonds-records association commands --- test/cli.test.ts | 57 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index cd9706e..90689b4 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -80,7 +80,7 @@ describe('Test laconic CLI commands', () => { const bondOwner = testAccount; let bondId: string; - test('laconic cns bond create --type --quantity ', async () => { + test('laconic cns bond create --type --quantity --gas --fees ', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); const outputObj = checkResultAndRetrieveOutput(result); @@ -265,16 +265,61 @@ describe('Test laconic CLI commands', () => { }); describe('Bond records operations', () => { - test('laconic cns bond associate --id --bond-id ', async () => { - // TODO - }); + let testRecordBondId2: string; test('laconic cns bond dissociate --id ', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'bond', 'dissociate', '--id', testRecordId]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + const recordResult = spawnSync('laconic', ['cns', 'record', 'get', '--id', testRecordId]); + const recordOutputObj = checkResultAndRetrieveOutput(recordResult); + + // Expected record + const expectedRecord = getRecordObj(testRecordFilePath, { bondId: '', recordId: testRecordId, names: null }); + + expect(recordOutputObj.length).toEqual(1); + expect(recordOutputObj[0]).toMatchObject(expectedRecord); + + }); + + test('laconic cns bond associate --id --bond-id ', async () => { + // Create a new bond to be associated with the record + ({ bondId: testRecordBondId2 } = createBond(bondBalance)); + + const result = spawnSync('laconic', ['cns', 'bond', 'associate', '--id', testRecordId, '--bond-id', testRecordBondId2]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + const recordResult = spawnSync('laconic', ['cns', 'record', 'get', '--id', testRecordId]); + const recordOutputObj = checkResultAndRetrieveOutput(recordResult); + + // Expected record + const expectedRecord = getRecordObj(testRecordFilePath, { bondId: testRecordBondId2, recordId: testRecordId, names: null }); + + expect(recordOutputObj.length).toEqual(1); + expect(recordOutputObj[0]).toMatchObject(expectedRecord); }); test('laconic cns bond records reassociate --old-bond-id --new-bond-id ', async () => { - // TODO + const result = spawnSync('laconic', ['cns', 'bond', 'records', 'reassociate', '--old-bond-id', testRecordBondId2, '--new-bond-id', testRecordBondId]); + const outputObj = checkResultAndRetrieveOutput(result); + + // Expected output + expect(outputObj).toEqual({ success: true }); + + const recordResult = spawnSync('laconic', ['cns', 'record', 'get', '--id', testRecordId]); + const recordOutputObj = checkResultAndRetrieveOutput(recordResult); + + // Expected record + const expectedRecord = getRecordObj(testRecordFilePath, { bondId: testRecordBondId, recordId: testRecordId, names: null }); + + expect(recordOutputObj.length).toEqual(1); + expect(recordOutputObj[0]).toMatchObject(expectedRecord); }); }); }); -- 2.45.2 From a0cd3443c52215883696d56d400529268f2b371e Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 29 Jan 2024 09:58:58 +0530 Subject: [PATCH 23/23] Rename constants and helper methods --- .github/workflows/test.yml | 1 - test/cli.test.ts | 28 ++++++++++++++-------------- test/helpers.ts | 7 ++++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd07de6..e238e86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,3 @@ -# TODO: Remove name: Tests on: pull_request: diff --git a/test/cli.test.ts b/test/cli.test.ts index 90689b4..5fa5198 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -5,8 +5,8 @@ import { spawnSync } from 'child_process'; import { CHAIN_ID, TOKEN_TYPE, - COMMIT_DURATION, - REVEAL_DURATION, + AUCTION_COMMIT_DURATION, + AUCTION_REVEAL_DURATION, delay, checkResultAndRetrieveOutput, createBond, @@ -15,7 +15,7 @@ import { getRecordObj, getAuthorityObj, getAuctionObj, - getBidObject + getBidObj } from './helpers'; describe('Test laconic CLI commands', () => { @@ -45,18 +45,18 @@ describe('Test laconic CLI commands', () => { expect(errorOutput).toContain('Commands:'); }); + // TODO: Break up tests into separate files // TODO: Add tests for CNS commands with all available flags describe('laconic CNS commands', () => { - const initialAccountBalance = Number('100000000000000000000000000'); const testAccount = process.env.TEST_ACCOUNT; - const testAccount2 = 'ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu'; assert(testAccount, 'TEST_ACCOUNT not set in env'); + const testAccount2 = 'ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu'; + const initialAccountBalance = Number('100000000000000000000000000'); const testAuthorityName = 'laconic'; - let testAuctionId: string; const testRecordFilePath = 'test/data/watcher-record.yml'; - let testRecordId: string, testRecordBondId: string; + let testAuctionId: string, testRecordId: string, testRecordBondId: string; test('laconic cns status', async () => { const result = spawnSync('laconic', ['cns', 'status']); @@ -76,8 +76,8 @@ describe('Test laconic CLI commands', () => { }); describe('Bond operations', () => { - let bondBalance = 1000000000; const bondOwner = testAccount; + let bondBalance = 1000000000; let bondId: string; test('laconic cns bond create --type --quantity --gas --fees ', async () => { @@ -161,7 +161,7 @@ describe('Test laconic CLI commands', () => { // Expected bond const expectedBond = getBondObj({ id: bondId, owner: bondOwner, balance: bondBalance }); - // Expect balance to be deducted (also deducts gas) + // Expect balance to be deducted expect(bondOutputObj.length).toEqual(1); expect(bondOutputObj[0]).toEqual(expectedBond); }); @@ -376,13 +376,13 @@ describe('Test laconic CLI commands', () => { test('laconic cns auction bid reveal ', async () => { // Wait for auction commits duration (60s) - await delay(COMMIT_DURATION * 1000); + await delay(AUCTION_COMMIT_DURATION * 1000); const auctionResult = spawnSync('laconic', ['cns', 'auction', 'get', testAuctionId]); const auctionOutputObj = checkResultAndRetrieveOutput(auctionResult); const expectedAuction = getAuctionObj({ owner: testAccount, status: 'reveal' }); - const expectedBid = getBidObject({ bidder: testAccount }); + const expectedBid = getBidObj({ bidder: testAccount }); expect(auctionOutputObj[0]).toMatchObject(expectedAuction); expect(auctionOutputObj[0].bids[0]).toMatchObject(expectedBid); @@ -401,7 +401,7 @@ describe('Test laconic CLI commands', () => { bidderAddress: testAccount, bidAmount: `${bidAmount}aphoton` }); - }, (COMMIT_DURATION + 5) * 1000); + }, (AUCTION_COMMIT_DURATION + 5) * 1000); }); describe('Name authority operations (post auction)', () => { @@ -410,7 +410,7 @@ describe('Test laconic CLI commands', () => { test('laconic cns authority whois ', async () => { // Wait for auction reveals duration (60s) - await delay(REVEAL_DURATION * 1000); + await delay(AUCTION_REVEAL_DURATION * 1000); const result = spawnSync('laconic', ['cns', 'authority', 'whois', testAuthorityName]); const outputObj = checkResultAndRetrieveOutput(result); @@ -420,7 +420,7 @@ describe('Test laconic CLI commands', () => { expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedAuthority); - }, (REVEAL_DURATION + 5) * 1000); + }, (AUCTION_REVEAL_DURATION + 5) * 1000); test('laconic cns authority bond set laconic ', async () => { // Create a new bond to be set on the authority diff --git a/test/helpers.ts b/test/helpers.ts index 66e0938..cc2a335 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -4,13 +4,14 @@ import { SpawnSyncReturns, spawnSync } from 'child_process'; export const CHAIN_ID = 'laconic_9000-1'; export const TOKEN_TYPE = 'aphoton'; + export const AUCTION_FEES = { commit: 1000000, reveal: 1000000, minimumBid: 5000000 }; -export const COMMIT_DURATION = 60; // 60s -export const REVEAL_DURATION = 60; // 60s +export const AUCTION_COMMIT_DURATION = 60; // 60s +export const AUCTION_REVEAL_DURATION = 60; // 60s export function checkResultAndRetrieveOutput(result: SpawnSyncReturns): any { expect(result.status).toBe(0); @@ -96,7 +97,7 @@ export function getAuctionObj(params: { owner: string, status?: string }): any { }; } -export function getBidObject(params: { bidder: string, status?: string }): any { +export function getBidObj(params: { bidder: string, status?: string }): any { return { bidderAddress: params.bidder, status: params.status || 'commit', -- 2.45.2