From 8aeb379b8c2bfa7cb5cb8fee68f7c4bd48c537eb Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 18 Apr 2023 22:37:48 +0700 Subject: [PATCH 01/88] docs: remove ISC License preamble from source files --- LICENSE | 2 +- README.md | 2 +- src/actions/account.js | 16 ---------------- src/actions/aens.js | 16 ---------------- src/actions/chain.js | 16 ---------------- src/actions/contract.js | 16 ---------------- src/actions/inspect.js | 16 ---------------- src/actions/oracle.js | 16 ---------------- src/actions/transaction.js | 16 ---------------- src/aecli-account.js | 16 ---------------- src/aecli-chain.js | 16 ---------------- src/aecli-contract.js | 16 ---------------- src/aecli-crypto.js | 16 ---------------- src/aecli-inspect.js | 16 ---------------- src/aecli-name.js | 16 ---------------- src/aecli-oracle.js | 16 ---------------- src/aecli-tx.js | 16 ---------------- src/aecli.js | 16 ---------------- src/commands/account.js | 16 ---------------- src/commands/chain.js | 16 ---------------- src/commands/contract.js | 16 ---------------- src/commands/crypto.js | 17 ----------------- src/commands/inspect.js | 16 ---------------- src/commands/main.js | 16 ---------------- src/commands/name.js | 16 ---------------- src/commands/oracle.js | 16 ---------------- src/commands/tx.js | 16 ---------------- src/utils/account.js | 16 ---------------- src/utils/cli.js | 16 ---------------- src/utils/constant.js | 16 ---------------- src/utils/helpers.js | 16 ---------------- src/utils/print.js | 16 ---------------- test/account.js | 17 ----------------- test/chain.js | 17 ----------------- test/contract.js | 17 ----------------- test/crypto.js | 17 ----------------- test/index.js | 17 ----------------- test/inspect.js | 17 ----------------- test/name.js | 17 ----------------- test/oracle.js | 17 ----------------- test/other.js | 17 ----------------- test/tx.js | 17 ----------------- 42 files changed, 2 insertions(+), 653 deletions(-) diff --git a/LICENSE b/LICENSE index c67a7e8e..88baaff8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ ISC License (ISC) -Copyright © 2021 aeternity developers +Copyright © 2023 aeternity developers Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice diff --git a/README.md b/README.md index 3677bb95..dab1555e 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Commands: ## License ISC License (ISC) -Copyright © 2018 aeternity developers +Copyright © 2023 aeternity developers Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice diff --git a/src/actions/account.js b/src/actions/account.js index 1bba9d2a..c2919906 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -1,22 +1,6 @@ // # æternity CLI `account` file // // This script initialize all `account` function -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import fs from 'fs-extra'; import { diff --git a/src/actions/aens.js b/src/actions/aens.js index 9df1b77f..8d0b8071 100644 --- a/src/actions/aens.js +++ b/src/actions/aens.js @@ -1,22 +1,6 @@ // # æternity CLI `AENS` file // // This script initialize all `AENS` function -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import { isAddressValid, getDefaultPointerKey } from '@aeternity/aepp-sdk'; import { initSdk, initSdkByWalletFile } from '../utils/cli'; diff --git a/src/actions/chain.js b/src/actions/chain.js index 8ae49fcb..a28b381c 100644 --- a/src/actions/chain.js +++ b/src/actions/chain.js @@ -1,22 +1,6 @@ // # æternity CLI `chain` file // // This script initialize all `chain` function -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import { verifyTransaction, ConsensusProtocolVersion } from '@aeternity/aepp-sdk'; import { initSdk } from '../utils/cli'; diff --git a/src/actions/contract.js b/src/actions/contract.js index e3af0db2..c151b4dc 100644 --- a/src/actions/contract.js +++ b/src/actions/contract.js @@ -1,22 +1,6 @@ // # æternity CLI `contract` file // // This script initialize all `contract` function -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import fs from 'fs-extra'; import path from 'path'; diff --git a/src/actions/inspect.js b/src/actions/inspect.js index 9231f07b..7dbb5a01 100644 --- a/src/actions/inspect.js +++ b/src/actions/inspect.js @@ -1,22 +1,6 @@ // # æternity CLI `inspect` file // // This script initialize all `inspect` function -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import { Encoding, unpackTx as _unpackTx, Tag } from '@aeternity/aepp-sdk'; import { initSdk } from '../utils/cli'; diff --git a/src/actions/oracle.js b/src/actions/oracle.js index 0a932704..0e2e97cc 100644 --- a/src/actions/oracle.js +++ b/src/actions/oracle.js @@ -1,22 +1,6 @@ // # æternity CLI `contract` file // // This script initialize all `contract` function -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import { ORACLE_TTL_TYPES } from '@aeternity/aepp-sdk'; import { initSdk, initSdkByWalletFile } from '../utils/cli'; diff --git a/src/actions/transaction.js b/src/actions/transaction.js index 6d782c02..bc593616 100644 --- a/src/actions/transaction.js +++ b/src/actions/transaction.js @@ -1,22 +1,6 @@ // # æternity CLI `transaction` file // // This script initialize all `transaction` function -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import { Tag, ORACLE_TTL_TYPES, diff --git a/src/aecli-account.js b/src/aecli-account.js index 0c0af54f..2223daec 100644 --- a/src/aecli-account.js +++ b/src/aecli-account.js @@ -1,20 +1,4 @@ #!/usr/bin/env node -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import program from './commands/account'; import { runProgram } from './utils/CliError'; diff --git a/src/aecli-chain.js b/src/aecli-chain.js index cf62b0c3..a9514c75 100755 --- a/src/aecli-chain.js +++ b/src/aecli-chain.js @@ -1,20 +1,4 @@ #!/usr/bin/env node -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import program from './commands/chain'; import { runProgram } from './utils/CliError'; diff --git a/src/aecli-contract.js b/src/aecli-contract.js index b0a365d9..ea2f9481 100644 --- a/src/aecli-contract.js +++ b/src/aecli-contract.js @@ -1,20 +1,4 @@ #!/usr/bin/env node -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import program from './commands/contract'; import { runProgram } from './utils/CliError'; diff --git a/src/aecli-crypto.js b/src/aecli-crypto.js index 48b87824..651722be 100644 --- a/src/aecli-crypto.js +++ b/src/aecli-crypto.js @@ -1,20 +1,4 @@ #!/usr/bin/env node -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import program from './commands/crypto'; import { runProgram } from './utils/CliError'; diff --git a/src/aecli-inspect.js b/src/aecli-inspect.js index cf877282..6a9df831 100644 --- a/src/aecli-inspect.js +++ b/src/aecli-inspect.js @@ -1,20 +1,4 @@ #!/usr/bin/env node -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import program from './commands/inspect'; import { runProgram } from './utils/CliError'; diff --git a/src/aecli-name.js b/src/aecli-name.js index f7d7deea..2d702d72 100644 --- a/src/aecli-name.js +++ b/src/aecli-name.js @@ -1,20 +1,4 @@ #!/usr/bin/env node -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import program from './commands/name'; import { runProgram } from './utils/CliError'; diff --git a/src/aecli-oracle.js b/src/aecli-oracle.js index 11d2d7da..93861d72 100644 --- a/src/aecli-oracle.js +++ b/src/aecli-oracle.js @@ -1,20 +1,4 @@ #!/usr/bin/env node -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import program from './commands/oracle'; import { runProgram } from './utils/CliError'; diff --git a/src/aecli-tx.js b/src/aecli-tx.js index 8e42c1bf..8f05356f 100644 --- a/src/aecli-tx.js +++ b/src/aecli-tx.js @@ -1,20 +1,4 @@ #!/usr/bin/env node -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import program from './commands/tx'; import { runProgram } from './utils/CliError'; diff --git a/src/aecli.js b/src/aecli.js index ebfd5965..8daecf7a 100755 --- a/src/aecli.js +++ b/src/aecli.js @@ -1,20 +1,4 @@ #!/usr/bin/env node -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ import program from './commands/main'; import { runProgram } from './utils/CliError'; diff --git a/src/commands/account.js b/src/commands/account.js index 98397b5e..1ff160cf 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -1,22 +1,6 @@ // # æternity CLI `account` file // // This script initialize all `account` commands -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ // We'll use `commander` for parsing options import { Command } from 'commander'; import * as Account from '../actions/account'; diff --git a/src/commands/chain.js b/src/commands/chain.js index 614ba93a..7f00441e 100755 --- a/src/commands/chain.js +++ b/src/commands/chain.js @@ -1,22 +1,6 @@ // # æternity CLI `chain` file // // This script initialize all `chain` command's -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ // We'll use `commander` for parsing options import { Command } from 'commander'; import * as Chain from '../actions/chain'; diff --git a/src/commands/contract.js b/src/commands/contract.js index e242760b..682b2c26 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -1,22 +1,6 @@ // # æternity CLI `contract` file // // This script initialize all `contract` command's -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ // We'll use `commander` for parsing options import { Argument, Option, Command } from 'commander'; import { MIN_GAS_PRICE } from '@aeternity/aepp-sdk'; diff --git a/src/commands/crypto.js b/src/commands/crypto.js index 0369fc12..e2e5298d 100644 --- a/src/commands/crypto.js +++ b/src/commands/crypto.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import { Command } from 'commander'; import fs from 'fs-extra'; import { unpackTx, Tag, MemoryAccount } from '@aeternity/aepp-sdk'; diff --git a/src/commands/inspect.js b/src/commands/inspect.js index b2faae57..088e899d 100644 --- a/src/commands/inspect.js +++ b/src/commands/inspect.js @@ -1,22 +1,6 @@ // # æternity CLI `inspect` file // // This script initialize all `inspect` commands -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ // We'll use `commander` for parsing options import { Command } from 'commander'; import inspect from '../actions/inspect'; diff --git a/src/commands/main.js b/src/commands/main.js index 241e2c4d..525aa5aa 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -1,22 +1,6 @@ // # æternity CLI `root` file // // This script initialize all `cli` commands -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ // We'll use `commander` for parsing options import { Command } from 'commander'; import prompts from 'prompts'; diff --git a/src/commands/name.js b/src/commands/name.js index 5ec64424..929da1ad 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -1,22 +1,6 @@ // # æternity CLI `name` file // // This script initialize all `name` commands -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ // We'll use `commander` for parsing options // // Also we need `esm` package to handle `ES imports` diff --git a/src/commands/oracle.js b/src/commands/oracle.js index eb1c9036..967c900d 100644 --- a/src/commands/oracle.js +++ b/src/commands/oracle.js @@ -1,22 +1,6 @@ // # æternity CLI `oracle` file // // This script initialize all `oracle` commands -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ // We'll use `commander` for parsing options import { Command } from 'commander'; import { ORACLE_TTL, QUERY_TTL, RESPONSE_TTL } from '@aeternity/aepp-sdk'; diff --git a/src/commands/tx.js b/src/commands/tx.js index f663897b..6d83dd50 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -1,22 +1,6 @@ // # æternity CLI `transaction` file // // This script initialize all `transaction` command's -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ // We'll use `commander` for parsing options // // Also we need `esm` package to handle `ES imports` diff --git a/src/utils/account.js b/src/utils/account.js index dfc9ce12..2a271d6d 100644 --- a/src/utils/account.js +++ b/src/utils/account.js @@ -1,21 +1,5 @@ // # Utils `account` Module // That script contains helper function's for work with `account` -/* -* ISC License (ISC) -* Copyright (c) 2022 aeternity developers -* -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. -* -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -* PERFORMANCE OF THIS SOFTWARE. -*/ import fs from 'fs-extra'; import path from 'path'; import { diff --git a/src/utils/cli.js b/src/utils/cli.js index ea2bf1eb..30b8f550 100644 --- a/src/utils/cli.js +++ b/src/utils/cli.js @@ -1,21 +1,5 @@ // # Utils `cli` Module // That script contains helper function's for work with `cli` -/* -* ISC License (ISC) -* Copyright (c) 2018 aeternity developers -* -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. -* -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -* PERFORMANCE OF THIS SOFTWARE. -*/ import { AeSdk, Node, MemoryAccount, CompilerCli, CompilerHttpNode, } from '@aeternity/aepp-sdk'; diff --git a/src/utils/constant.js b/src/utils/constant.js index 05a501ae..501c8469 100644 --- a/src/utils/constant.js +++ b/src/utils/constant.js @@ -1,19 +1,3 @@ -/* -* ISC License (ISC) -* Copyright (c) 2022 aeternity developers -* -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. -* -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -* PERFORMANCE OF THIS SOFTWARE. -*/ // # Utils `constant` Module // That script contains default configuration for `CLI` diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 010926c0..50588dcf 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -1,19 +1,3 @@ -/* -* ISC License (ISC) -* Copyright (c) 2018 aeternity developers -* -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. -* -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -* PERFORMANCE OF THIS SOFTWARE. -*/ // # Utils `helpers` Module // That script contains base helper function diff --git a/src/utils/print.js b/src/utils/print.js index cdcb9181..5289c29c 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -1,19 +1,3 @@ -/* -* ISC License (ISC) -* Copyright (c) 2018 aeternity developers -* -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. -* -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -* PERFORMANCE OF THIS SOFTWARE. -*/ // # Utils `print` Module // That script contains helper function for `console` print import { Encoding, unpackTx } from '@aeternity/aepp-sdk'; diff --git a/test/account.js b/test/account.js index e09fc03e..2fb9e555 100644 --- a/test/account.js +++ b/test/account.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import fs from 'fs-extra'; import { before, describe, it } from 'mocha'; import { expect } from 'chai'; diff --git a/test/chain.js b/test/chain.js index fb3c47fe..10f3e7eb 100644 --- a/test/chain.js +++ b/test/chain.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { executeProgram, getSdk } from './index'; diff --git a/test/contract.js b/test/contract.js index a083dcbf..e6d184c3 100644 --- a/test/contract.js +++ b/test/contract.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import fs from 'fs-extra'; import { after, before, describe, it, diff --git a/test/crypto.js b/test/crypto.js index 3de12747..11b209ad 100644 --- a/test/crypto.js +++ b/test/crypto.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import { describe, it } from 'mocha'; import { expect } from 'chai'; import { generateKeyPair, unpackTx, Tag } from '@aeternity/aepp-sdk'; diff --git a/test/index.js b/test/index.js index f6d016f0..31296186 100644 --- a/test/index.js +++ b/test/index.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; import { diff --git a/test/inspect.js b/test/inspect.js index 8a719738..5665ad47 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { diff --git a/test/name.js b/test/name.js index 7c3ef587..3542eaa8 100644 --- a/test/name.js +++ b/test/name.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import { generateKeyPair, MemoryAccount } from '@aeternity/aepp-sdk'; import { before, describe, it } from 'mocha'; import { expect } from 'chai'; diff --git a/test/oracle.js b/test/oracle.js index 503a3405..a83fa910 100644 --- a/test/oracle.js +++ b/test/oracle.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2021 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import { AbiVersion, generateKeyPair } from '@aeternity/aepp-sdk'; import { before, describe, it } from 'mocha'; import { expect } from 'chai'; diff --git a/test/other.js b/test/other.js index 85360ee8..adaf5f19 100644 --- a/test/other.js +++ b/test/other.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2022 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import { describe, it } from 'mocha'; import { expect } from 'chai'; import { executeProgram } from './index'; diff --git a/test/tx.js b/test/tx.js index dfcaa2e1..4087dd84 100644 --- a/test/tx.js +++ b/test/tx.js @@ -1,20 +1,3 @@ -/* - * ISC License (ISC) - * Copyright (c) 2018 aeternity developers - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - import { generateKeyPair, decode, encode, Encoding, buildTxHash, } from '@aeternity/aepp-sdk'; From eb33a62bb43ca68823564c776537826d211edc6f Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 19 Apr 2023 01:06:31 +0700 Subject: [PATCH 02/88] test: mock filesystem to don't override global configuration --- .gitignore | 1 - package-lock.json | 10 ++++++++++ package.json | 1 + test/contract.js | 31 ++++--------------------------- test/contracts/contract.aes | 10 ++++++++++ test/contracts/testLib.aes | 2 ++ test/index.js | 13 +++++++++++++ 7 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 test/contracts/contract.aes create mode 100644 test/contracts/testLib.aes diff --git a/.gitignore b/.gitignore index 61d4b97e..44af9fab 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,3 @@ docs /pnpm-debug.log bin /.nyc_output -/test-artifacts diff --git a/package-lock.json b/package-lock.json index 7ce04f35..f81c888d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,6 +36,7 @@ "eslint": "^8.37.0", "eslint-config-airbnb-base": "^15.0.0", "mocha": "^10.2.0", + "mock-fs": "^5.2.0", "nyc": "^15.1.0", "standard-version": "^9.5.0" }, @@ -7962,6 +7963,15 @@ "node": ">=10" } }, + "node_modules/mock-fs": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz", + "integrity": "sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw==", + "dev": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", diff --git a/package.json b/package.json index e04afe29..5f0735f7 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "eslint": "^8.37.0", "eslint-config-airbnb-base": "^15.0.0", "mocha": "^10.2.0", + "mock-fs": "^5.2.0", "nyc": "^15.1.0", "standard-version": "^9.5.0" }, diff --git a/test/contract.js b/test/contract.js index a083dcbf..90f12ddc 100644 --- a/test/contract.js +++ b/test/contract.js @@ -27,27 +27,9 @@ import CliError from '../src/utils/CliError'; const executeContract = (args) => executeProgram(contractProgram, args); -const testLibSource = ` -namespace TestLib = - function sum(x: int, y: int) : int = x + y -`; - -const testContractSource = ` -@compiler >= 7 -@compiler < 8 - -include "testLib.aes" - -contract Identity = - record state = { z: int } - entrypoint init(_z: int) = { z = _z } - entrypoint test(x : int, y: int) = TestLib.sum(x, TestLib.sum(y, state.z)) - entrypoint getMap(): map(int, int) = {[1] = 2, [3] = 4} -`; - describe('Contract Module', function contractTests() { this.timeout(4000); - const contractSourceFile = 'test-artifacts/contract.aes'; + const contractSourceFile = 'test/contracts/contract.aes'; const contractAciFile = 'test-artifacts/contract-aci.json'; let deployDescriptorFile; let sdk; @@ -55,15 +37,10 @@ describe('Contract Module', function contractTests() { let contractAddress; before(async () => { - await fs.outputFile(contractSourceFile, testContractSource); - await fs.outputFile('test-artifacts/testLib.aes', testLibSource); sdk = await getSdk(); await fs.outputJson( contractAciFile, - (await sdk.compilerApi.compileBySourceCode( - testContractSource, - { 'testLib.aes': testLibSource }, - )).aci, + (await sdk.compilerApi.compile(contractSourceFile)).aci, ); }); @@ -117,7 +94,7 @@ describe('Contract Module', function contractTests() { expect(descriptor).to.eql({ version: 1, address, - bytecode: 'cb_+L5GA6BBf3GW9I6fo4TZBejjzPtb4sVLycthaPcbJPMW921AUcC4kbhX/kTWRB8ANwEHNwAaBoIAAQM//pKLIDYANwIHBwcMAoIMAQICAxHQ4oJSDAEABAMR0OKCUv7Q4oJSAjcCBwcHFBQAAgD+6YyQGwA3AGcHBwEDLwICBAYItC8EEUTWRB8RaW5pdBGSiyA2EXRlc3QR0OKCUjEuVGVzdExpYi5zdW0R6YyQGxlnZXRNYXCCLwCFNy4xLjAAKmhsfQ==', + bytecode: 'cb_+L5GA6DYM5NsuGXWxxHp3/rvzpUabt5oDeNdrc22CqVocjzKwMC4kbhX/kTWRB8ANwEHNwAaBoIAAQM//pKLIDYANwIHBwcMAoIMAQICAxHQ4oJSDAEABAMR0OKCUv7Q4oJSAjcCBwcHFBQAAgD+6YyQGwA3AGcHBwEDLwICBAYItC8EEUTWRB8RaW5pdBGSiyA2EXRlc3QR0OKCUjEuVGVzdExpYi5zdW0R6YyQGxlnZXRNYXCCLwCFNy4xLjAAekHqRQ==', aci: [{ namespace: { name: 'TestLib', typedefs: [] }, }, { @@ -207,7 +184,7 @@ describe('Contract Module', function contractTests() { '--descrPath', `${deployDescriptorFile}test`, 'test', '[1, 2]', WALLET_NAME, '--password', 'test', - ])).to.be.rejectedWith('ENOENT: no such file or directory, open'); + ])).to.be.rejectedWith('no such file or directory'); }); it('throws error when calls contract without wallet', async () => { diff --git a/test/contracts/contract.aes b/test/contracts/contract.aes new file mode 100644 index 00000000..5821446f --- /dev/null +++ b/test/contracts/contract.aes @@ -0,0 +1,10 @@ +@compiler >= 7 +@compiler < 8 + +include "testLib.aes" + +contract Identity = + record state = { z: int } + entrypoint init(_z: int) = { z = _z } + entrypoint test(x : int, y: int) = TestLib.sum(x, TestLib.sum(y, state.z)) + entrypoint getMap(): map(int, int) = {[1] = 2, [3] = 4} diff --git a/test/contracts/testLib.aes b/test/contracts/testLib.aes new file mode 100644 index 00000000..8ef6bb4a --- /dev/null +++ b/test/contracts/testLib.aes @@ -0,0 +1,2 @@ +namespace TestLib = + function sum(x: int, y: int) : int = x + y diff --git a/test/index.js b/test/index.js index f6d016f0..ad7c196c 100644 --- a/test/index.js +++ b/test/index.js @@ -17,11 +17,24 @@ import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; +import { before, after } from 'mocha'; +import mockFs from 'mock-fs'; import { AeSdk, MemoryAccount, Node, generateKeyPair, CompilerHttpNode, } from '@aeternity/aepp-sdk'; import accountProgram from '../src/commands/account'; +before(() => { + mockFs({ + 'test-artifacts': {}, + 'test/contracts': mockFs.load('test/contracts'), + }); +}); + +after(() => { + mockFs.restore(); +}); + chai.use(chaiAsPromised); chai.should(); From 97c1b3eedffc95d622b79483c9c5c35c71dfa6d1 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 20 Apr 2023 17:22:33 +0700 Subject: [PATCH 03/88] test(inspect): cover KeyBlock case --- test/inspect.js | 77 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 20 deletions(-) diff --git a/test/inspect.js b/test/inspect.js index 8a719738..90c8d880 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -125,32 +125,69 @@ payload _________________________________ ba_Xfbg4g== }); it('Inspect Block', async () => { - const top = await executeChain(['top', '--json']); - const resJson = await executeInspect([top.hash, '--json']); - expect(resJson).to.eql({ - hash: top.hash, - height: top.height, + const { prevKeyHash } = await executeChain(['top', '--json']); + + const keyJson = await executeInspect([prevKeyHash, '--json']); + expect(keyJson).to.eql({ + beneficiary: keyJson.beneficiary, + hash: keyJson.hash, + height: keyJson.height, + info: keyJson.info, + miner: keyJson.miner, + nonce: keyJson.nonce, + pow: keyJson.pow, + prevHash: keyJson.prevHash, + prevKeyHash: keyJson.prevKeyHash, + stateHash: keyJson.stateHash, + target: keyJson.target, + time: keyJson.time, + version: 5, + }); + const key = await executeInspect([prevKeyHash]); + expect(key.split('\nTransactions')[0]).to.equal(` +<<--------------- KeyBlock --------------->> +Block hash ______________________________ ${keyJson.hash} +Block height ____________________________ ${keyJson.height} +State hash ______________________________ ${keyJson.stateHash} +Nonce ___________________________________ ${keyJson.nonce} +Miner ___________________________________ ${keyJson.miner} +Time ____________________________________ ${new Date(keyJson.time).toString()} +Previous block hash _____________________ ${keyJson.prevHash} +Previous key block hash _________________ ${keyJson.prevKeyHash} +Version _________________________________ 5 +Target __________________________________ ${keyJson.target} + `.trim()); + + let microHash = keyJson.prevHash; + while (microHash.startsWith('kh_')) { + // eslint-disable-next-line no-await-in-loop + microHash = (await executeInspect([microHash, '--json'])).prevHash; + } + const microJson = await executeInspect([microHash, '--json']); + expect(microJson).to.eql({ + hash: microJson.hash, + height: microJson.height, pofHash: 'no_fraud', - prevHash: resJson.prevHash, - prevKeyHash: resJson.prevKeyHash, - signature: resJson.signature, - stateHash: resJson.stateHash, - time: resJson.time, - transactions: resJson.transactions, - txsHash: resJson.txsHash, + prevHash: microJson.prevHash, + prevKeyHash: microJson.prevKeyHash, + signature: microJson.signature, + stateHash: microJson.stateHash, + time: microJson.time, + transactions: microJson.transactions, + txsHash: microJson.txsHash, version: 5, }); - const res = await executeInspect([top.hash]); - expect(res.split('\nTransactions')[0]).to.equal(` + const micro = await executeInspect([microHash]); + expect(micro.split('\nTransactions')[0]).to.equal(` <<--------------- MicroBlock --------------->> -Block hash ______________________________ ${top.hash} -Block height ____________________________ ${top.height} -State hash ______________________________ ${resJson.stateHash} +Block hash ______________________________ ${microJson.hash} +Block height ____________________________ ${microJson.height} +State hash ______________________________ ${microJson.stateHash} Nonce ___________________________________ N/A Miner ___________________________________ N/A -Time ____________________________________ ${new Date(resJson.time).toString()} -Previous block hash _____________________ ${resJson.prevHash} -Previous key block hash _________________ ${resJson.prevKeyHash} +Time ____________________________________ ${new Date(microJson.time).toString()} +Previous block hash _____________________ ${microJson.prevHash} +Previous key block hash _________________ ${microJson.prevKeyHash} Version _________________________________ 5 Target __________________________________ N/A `.trim()); From daefd21a97e84c9bdecaf5aed4d8d22075968e1f Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 20 Apr 2023 18:02:04 +0700 Subject: [PATCH 04/88] fix(account): don't ask for password if it is empty --- package-lock.json | 151 +++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + src/utils/account.js | 4 +- test/account.js | 20 +++++- 4 files changed, 173 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ce04f35..da80e743 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "eslint-config-airbnb-base": "^15.0.0", "mocha": "^10.2.0", "nyc": "^15.1.0", + "sinon": "^15.0.3", "standard-version": "^9.5.0" }, "engines": { @@ -2930,6 +2931,59 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz", + "integrity": "sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^2.0.0" + } + }, + "node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", + "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^2.0.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/text-encoding": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", + "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", + "dev": true + }, "node_modules/@szmarczak/http-timer": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", @@ -7271,6 +7325,12 @@ "node": "*" } }, + "node_modules/just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, "node_modules/keyv": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", @@ -7414,6 +7474,12 @@ "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", "dev": true }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "dev": true + }, "node_modules/lodash.isfunction": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", @@ -8005,6 +8071,28 @@ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" }, + "node_modules/nise": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", + "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^10.0.2", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "node_modules/nise/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, "node_modules/node-addon-api": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", @@ -8681,6 +8769,21 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/path-to-regexp/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -9544,6 +9647,54 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/sinon": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.3.tgz", + "integrity": "sha512-si3geiRkeovP7Iel2O+qGL4NrO9vbMf3KsrJEi0ghP1l5aBkB5UxARea5j0FUsSqH3HLBh0dQPAyQ8fObRUqHw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^10.0.2", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.1.0", + "nise": "^5.1.4", + "supports-color": "^7.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, + "node_modules/sinon/node_modules/diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/sinon/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/sinon/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", diff --git a/package.json b/package.json index e04afe29..ef00eb10 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "eslint-config-airbnb-base": "^15.0.0", "mocha": "^10.2.0", "nyc": "^15.1.0", + "sinon": "^15.0.3", "standard-version": "^9.5.0" }, "repository": { diff --git a/src/utils/account.js b/src/utils/account.js index dfc9ce12..be25530e 100644 --- a/src/utils/account.js +++ b/src/utils/account.js @@ -29,7 +29,7 @@ export async function writeWallet(name, secretKey, output, password, overwrite) if (!overwrite && await fs.exists(walletPath) && !await prompt(PROMPT_TYPE.askOverwrite)) { throw new CliError(`Wallet already exist at ${walletPath}`); } - password ||= await prompt(PROMPT_TYPE.askPassword); + password ??= await prompt(PROMPT_TYPE.askPassword); await fs.outputJson(walletPath, await dump(name, password, secretKey)); const { publicKey } = generateKeyPairFromSecret(secretKey); return { publicKey: encode(publicKey, Encoding.AccountAddress), path: walletPath }; @@ -39,7 +39,7 @@ export async function writeWallet(name, secretKey, output, password, overwrite) export async function getWalletByPathAndDecrypt(walletPath, password) { const keyFile = await fs.readJson(path.resolve(process.cwd(), walletPath)); - password ||= await prompt(PROMPT_TYPE.askPassword); + password ??= await prompt(PROMPT_TYPE.askPassword); const privKey = await recover(password, keyFile); diff --git a/test/account.js b/test/account.js index e09fc03e..1370e60f 100644 --- a/test/account.js +++ b/test/account.js @@ -17,10 +17,12 @@ import fs from 'fs-extra'; import { before, describe, it } from 'mocha'; -import { expect } from 'chai'; +import { expect, assert } from 'chai'; +import { stub } from 'sinon'; import { generateKeyPair } from '@aeternity/aepp-sdk'; import { getSdk, executeProgram, WALLET_NAME } from './index'; import accountProgram from '../src/commands/account'; +import * as promptModule from '../src/utils/prompt'; const executeAccount = (args) => executeProgram(accountProgram, args); const walletName = 'test-artifacts/test-wallet.json'; @@ -62,6 +64,22 @@ describe('Account Module', () => { .to.equal(keypair.secretKey); }); + it('asks for password if it not provided', async () => { + const stubbedPrompt = stub(promptModule, 'prompt'); + stubbedPrompt.throwsException(new Error('stubbed')); + await expect(executeAccount(['create', 'test-artifacts/test-wallet-1.json'])) + .to.be.eventually.rejectedWith('stubbed'); + assert(stubbedPrompt.alwaysCalledWith(promptModule.PROMPT_TYPE.askPassword)); + stubbedPrompt.restore(); + }); + + it('don\'t asks for password if it is empty', async () => { + const name = 'test-artifacts/test-wallet-2.json'; + await executeAccount(['create', name, '--password', '', '--overwrite']); + expect((await executeAccount(['address', name, '--password', '', '--json'])).publicKey) + .to.be.a('string'); + }); + it('Check Wallet Balance', async () => { const balance = await sdk.getBalance(sdk.address); expect((await executeAccount(['balance', WALLET_NAME, '--password', 'test', '--json'])).balance) From 2a2a94b76a67d96154f45d9da3f1cd1ad338c1b3 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 20 Apr 2023 21:17:17 +0700 Subject: [PATCH 05/88] refactor(account)!: combine spend and transfer commands BREAKING CHANGE: `account transfer` command removed Use `account spend` instead. ```diff - aecli account transfer 0.42 + aecli account spend 42% ``` --- src/actions/account.js | 48 +++++++++++++++-------------------------- src/arguments.js | 7 +++--- src/commands/account.js | 32 +++++++++------------------ test/account.js | 7 +++--- 4 files changed, 34 insertions(+), 60 deletions(-) diff --git a/src/actions/account.js b/src/actions/account.js index 1bba9d2a..214cec6b 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -85,43 +85,29 @@ export async function sign(walletPath, tx, { networkId: networkIdOpt, json, ...o } // ## `Spend` function -// this function allow you to `send` token's to another `account` -export async function spend(walletPath, receiverNameOrAddress, amount, options) { - const { - ttl, json, nonce, fee, payload, - } = options; +// this function allow you to `send` coins to another `account` +export async function spend( + walletPath, + receiverNameOrAddress, + { amount, fraction }, + { + ttl, json, nonce, fee, payload, ...options + }, +) { const sdk = await initSdkByWalletFile(walletPath, options); - let tx = await sdk.spend(amount, receiverNameOrAddress, { - ttl, nonce, payload: encode(Buffer.from(payload), Encoding.Bytearray), fee, - }); - if (json) print({ tx }); - else { - print('Transaction mined'); - printTransaction(tx, json); - } -} - -// ## `Transfer` function -// this function allow you to `send` % of balance to another `account` -export async function transferFunds(walletPath, receiver, fraction, options) { - const { - ttl, json, nonce, fee, payload, - } = options; - const sdk = await initSdkByWalletFile(walletPath, options); + const tx = await sdk[amount != null ? 'spend' : 'transferFunds']( + amount ?? fraction / 100, + receiverNameOrAddress, + { + ttl, nonce, payload: encode(Buffer.from(payload), Encoding.Bytearray), fee, + }, + ); - let tx = await sdk.transferFunds(fraction, receiver, { - ttl, nonce, payload: encode(Buffer.from(payload), Encoding.Bytearray), fee, - }); - // if waitMined false - if (typeof tx !== 'object') { - tx = await sdk.api.getTransactionByHash(tx); - } else if (!json) { - print('Transaction mined'); - } if (json) { print({ tx }); } else { + print('Transaction mined'); printTransaction(tx, json); } } diff --git a/src/arguments.js b/src/arguments.js index bd523913..0e62253b 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -2,9 +2,10 @@ import { Argument, Option } from 'commander'; import BigNumber from 'bignumber.js'; import { NODE_URL, COMPILER_URL } from './utils/constant'; -export const coinAmountParser = (amount) => ( - new BigNumber(amount.replace(/ae$/, '')).shiftedBy(amount.endsWith('ae') ? 18 : 0) -); +export const coinAmountParser = (amount) => { + if (amount.endsWith('ae')) return new BigNumber(amount.slice(0, -2)).shiftedBy(18); + return new BigNumber(amount); +}; export const feeOption = new Option('-F, --fee [fee]', 'Override the transaction fee') .argParser(coinAmountParser); diff --git a/src/commands/account.js b/src/commands/account.js index 98397b5e..742e0e9b 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -52,34 +52,22 @@ const addCommonOptions = (p) => p // // Example: `aecli account spend ./myWalletKeyFile ak_1241rioefwj23f2wfdsfsdsdfsasdf 100 --password testpassword --ttl 20` --> this tx will leave for 20 blocks addCommonOptions(program - .command('spend ') - .argument('', 'Amount of coins to send in aettos or in ae (example: 1.2ae)', coinAmountParser) - .addOption(networkIdOption) - .option('--payload [payload]', 'Transaction payload.', '') - .addOption(feeOption) - .addOption(ttlOption) - .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') - .action(Account.spend)); - -// ## Initialize `transfer` command -// -// You can use this command to send % of balance to another account -// -// Example: `aecli account transfer ./myWalletKeyFile ak_1241rioefwj23f2wfdsfsdsdfsasdf 0.5 --password testpassword` -// -// You can set transaction `ttl(Time to leave)`. If not set use default. -// -// Example: `aecli account transfer ./myWalletKeyFile ak_1241rioefwj23f2wfdsfsdsdfsasdf 0.5 --password testpassword --ttl 20` --> this tx will leave for 20 blocks -addCommonOptions(program - .command('transfer ') + .command('spend ') .argument('', 'Address or name of recipient account') - .argument('', 'Fraction of balance to spend (between 0 and 1)', (v) => +v) + .argument( + '', + 'Amount of coins to send in aettos/ae (example 1.2ae), or percent of sender balance (example 42%)', + (amount) => { + if (amount.endsWith('%')) return { fraction: +amount.slice(0, -1) }; + return { amount: coinAmountParser(amount) }; + }, + ) .addOption(networkIdOption) .option('--payload [payload]', 'Transaction payload.', '') .addOption(feeOption) .addOption(ttlOption) .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') - .action(Account.transferFunds)); + .action(Account.spend)); // ## Initialize `sign` command // diff --git a/test/account.js b/test/account.js index e09fc03e..953da8dd 100644 --- a/test/account.js +++ b/test/account.js @@ -86,12 +86,11 @@ describe('Account Module', () => { expect(fee).to.be.equal('20000000000000000'); }); - it('Spend fraction of coins to account by name', async () => { - const fraction = 0.000001; + it('Spend percent of coins to account', async () => { const { publicKey } = generateKeyPair(); const balanceBefore = await sdk.getBalance(sdk.address); - await executeAccount(['transfer', WALLET_NAME, '--password', 'test', publicKey, fraction]); - expect(+await sdk.getBalance(publicKey)).to.be.equal(balanceBefore * fraction); + await executeAccount(['spend', WALLET_NAME, '--password', 'test', publicKey, '42%']); + expect(+await sdk.getBalance(publicKey)).to.be.equal(balanceBefore * 0.42); }); it('Get account nonce', async () => { From c5ef7695fbfb6692e23cc2ddb2e02ff959e5a323 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 20 Apr 2023 21:42:01 +0700 Subject: [PATCH 06/88] test(account): output of `spend` command --- test/account.js | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/test/account.js b/test/account.js index 953da8dd..7b7d85cc 100644 --- a/test/account.js +++ b/test/account.js @@ -71,9 +71,52 @@ describe('Account Module', () => { it('Spend coins to another wallet', async () => { const amount = 100; const { publicKey } = generateKeyPair(); - await executeAccount(['spend', WALLET_NAME, '--password', 'test', publicKey, amount]); + const resJson = await executeAccount([ + 'spend', WALLET_NAME, '--password', 'test', publicKey, amount, '--json', + ]); const receiverBalance = await sdk.getBalance(publicKey); - (+receiverBalance).should.equal(amount); + expect(+receiverBalance).to.be.equal(amount); + + expect(resJson).to.eql({ + tx: { + blockHash: resJson.tx.blockHash, + blockHeight: resJson.tx.blockHeight, + hash: resJson.tx.hash, + rawTx: resJson.tx.rawTx, + signatures: [resJson.tx.signatures[0]], + tx: { + amount: '100', + fee: '16660000000000', + nonce: 1, + payload: 'ba_Xfbg4g==', + recipientId: resJson.tx.tx.recipientId, + senderId: resJson.tx.tx.senderId, + type: 'SpendTx', + version: 1, + }, + }, + }); + + const res = await executeAccount([ + 'spend', WALLET_NAME, '--password', 'test', publicKey, amount, + ]); + const lineEndings = res.split('\n').map((l) => l.split(' ').at(-1)); + expect(res).to.be.equal(` +Transaction mined +Tx hash _________________________________ ${lineEndings[1]} +Block hash ______________________________ ${lineEndings[2]} +Block height ____________________________ ${lineEndings[3]} +Signatures ______________________________ ${lineEndings[4]} +Tx Type _________________________________ SpendTx +Sender account __________________________ ${resJson.tx.tx.senderId} +Recipient account _______________________ ${resJson.tx.tx.recipientId} +Amount __________________________________ 100 +Payload _________________________________ ba_Xfbg4g== +Fee _____________________________________ 16660000000000 +Nonce ___________________________________ 2 +TTL _____________________________________ N/A +Version _________________________________ 1 + `.trim()); }); it('Spend coins to another wallet in ae', async () => { From b1d4585765fdd380502a28583c7a98bf6a1f1a74 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 20 Apr 2023 21:51:16 +0700 Subject: [PATCH 07/88] refactor(account)!: remove extra object wrapping json output BREAKING CHANGE: `account spend` returns unwrapped JSON ```diff - aecli account spend ... | jq .tx.tx.amount + aecli account spend ... | jq .tx.amount ``` --- src/actions/account.js | 8 ++------ test/account.js | 36 +++++++++++++++++------------------- test/name.js | 4 ++-- 3 files changed, 21 insertions(+), 27 deletions(-) diff --git a/src/actions/account.js b/src/actions/account.js index 214cec6b..fa1a0bb6 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -104,12 +104,8 @@ export async function spend( }, ); - if (json) { - print({ tx }); - } else { - print('Transaction mined'); - printTransaction(tx, json); - } + if (!json) print('Transaction mined'); + printTransaction(tx, json); } // ## Get `balance` function diff --git a/test/account.js b/test/account.js index 7b7d85cc..d79aba63 100644 --- a/test/account.js +++ b/test/account.js @@ -78,25 +78,23 @@ describe('Account Module', () => { expect(+receiverBalance).to.be.equal(amount); expect(resJson).to.eql({ + blockHash: resJson.blockHash, + blockHeight: resJson.blockHeight, + hash: resJson.hash, + rawTx: resJson.rawTx, + signatures: [resJson.signatures[0]], tx: { - blockHash: resJson.tx.blockHash, - blockHeight: resJson.tx.blockHeight, - hash: resJson.tx.hash, - rawTx: resJson.tx.rawTx, - signatures: [resJson.tx.signatures[0]], - tx: { - amount: '100', - fee: '16660000000000', - nonce: 1, - payload: 'ba_Xfbg4g==', - recipientId: resJson.tx.tx.recipientId, - senderId: resJson.tx.tx.senderId, - type: 'SpendTx', - version: 1, - }, + amount: '100', + fee: '16660000000000', + nonce: 1, + payload: 'ba_Xfbg4g==', + recipientId: resJson.tx.recipientId, + senderId: resJson.tx.senderId, + type: 'SpendTx', + version: 1, }, }); - + const res = await executeAccount([ 'spend', WALLET_NAME, '--password', 'test', publicKey, amount, ]); @@ -108,8 +106,8 @@ Block hash ______________________________ ${lineEndings[2]} Block height ____________________________ ${lineEndings[3]} Signatures ______________________________ ${lineEndings[4]} Tx Type _________________________________ SpendTx -Sender account __________________________ ${resJson.tx.tx.senderId} -Recipient account _______________________ ${resJson.tx.tx.recipientId} +Sender account __________________________ ${resJson.tx.senderId} +Recipient account _______________________ ${resJson.tx.recipientId} Amount __________________________________ 100 Payload _________________________________ ba_Xfbg4g== Fee _____________________________________ 16660000000000 @@ -121,7 +119,7 @@ Version _________________________________ 1 it('Spend coins to another wallet in ae', async () => { const receiverKeys = generateKeyPair(); - const { tx: { tx: { fee } } } = await executeAccount([ + const { tx: { fee } } = await executeAccount([ 'spend', WALLET_NAME, '--password', 'test', '--json', receiverKeys.publicKey, '1ae', '--fee', '0.02ae', ]); diff --git a/test/name.js b/test/name.js index 7c3ef587..9c513ab8 100644 --- a/test/name.js +++ b/test/name.js @@ -168,7 +168,7 @@ describe('AENS Module', () => { it('Spend by name', async () => { const amount = 100000009; - const spendTx = await executeAccount([ + const { tx: { recipientId } } = await executeAccount([ 'spend', WALLET_NAME, '--password', @@ -179,7 +179,7 @@ describe('AENS Module', () => { ]); const nameObject = await sdk.aensQuery(name2); - spendTx.tx.tx.recipientId.should.be.equal(nameObject.id); + recipientId.should.be.equal(nameObject.id); const balance = await sdk.getBalance(publicKey); balance.should.be.equal(`${amount}`); }); From 74a8a37004e8368b1886f7ba8aa745d96ed3c14b Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 20 Apr 2023 19:01:02 +0700 Subject: [PATCH 08/88] refactor(account)!: remove useless `output` option BREAKING CHANGES: `output` options removed in `account create,save` Put output value in wallet path instead. ```diff - aecli account create my-wallet.json --output ./mykeys + aecli account create ./mykeys/my-wallet.json ``` --- src/actions/account.js | 16 ++++++++-------- src/actions/contract.js | 16 ++++++++-------- src/commands/account.js | 16 ++-------------- src/utils/account.js | 16 ++++++++-------- src/utils/helpers.js | 3 +++ 5 files changed, 29 insertions(+), 38 deletions(-) diff --git a/src/actions/account.js b/src/actions/account.js index 90d2862b..be89e4cb 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -150,11 +150,9 @@ export async function getAccountNonce(walletPath, options) { // ## Create secure `wallet` file // This function allow you to generate `keypair` and write it to secure `ethereum` like key-file -export async function createSecureWallet(walletPath, { - output, password, overwrite, json, -}) { +export async function createSecureWallet(walletPath, { password, overwrite, json }) { const { secretKey } = generateKeyPair(true); - const { publicKey, path } = await writeWallet(walletPath, secretKey, output, password, overwrite); + const { publicKey, path } = await writeWallet(walletPath, secretKey, password, overwrite); if (json) { print({ publicKey, @@ -168,11 +166,13 @@ export async function createSecureWallet(walletPath, { // ## Create secure `wallet` file from `private-key` // This function allow you to generate `keypair` from `private-key` and write it to secure `ethereum` like key-file -export async function createSecureWalletByPrivKey(walletPath, secretKey, { - output, password, overwrite, json, -}) { +export async function createSecureWalletByPrivKey( + walletPath, + secretKey, + { password, overwrite, json }, +) { secretKey = Buffer.from(secretKey.trim(), 'hex'); - const { publicKey, path } = await writeWallet(walletPath, secretKey, output, password, overwrite); + const { publicKey, path } = await writeWallet(walletPath, secretKey, password, overwrite); if (json) { print({ publicKey, diff --git a/src/actions/contract.js b/src/actions/contract.js index c151b4dc..84d7ef8d 100644 --- a/src/actions/contract.js +++ b/src/actions/contract.js @@ -3,21 +3,20 @@ // This script initialize all `contract` function import fs from 'fs-extra'; -import path from 'path'; import { encode } from '@aeternity/aepp-sdk'; import { initSdk, initSdkByWalletFile } from '../utils/cli'; import { print, printTransaction, printUnderscored } from '../utils/print'; import CliError from '../utils/CliError'; +import { getFullPath } from '../utils/helpers'; const DESCRIPTOR_VERSION = 1; -const resolve = (filename) => path.resolve(process.cwd(), filename); async function getContractParams({ descrPath, contractAddress, contractSource, contractBytecode, contractAci, }, { dummyBytecode, descrMayNotExist } = {}) { let descriptor = {}; - if (descrPath && (!descrMayNotExist || await fs.exists(resolve(descrPath)))) { - descriptor = await fs.readJson(resolve(descrPath)); + if (descrPath && (!descrMayNotExist || await fs.exists(getFullPath(descrPath)))) { + descriptor = await fs.readJson(getFullPath(descrPath)); if (descriptor.version !== DESCRIPTOR_VERSION) { throw new CliError(`Unsupported contract descriptor: version ${descriptor.version}, supported ${DESCRIPTOR_VERSION}`); } @@ -29,8 +28,10 @@ async function getContractParams({ ...dummyBytecode && { bytecode: 'cb_invalid-bytecode' }, ...other, ...contractSource && { sourceCodePath: contractSource }, - ...contractBytecode && { bytecode: encode(await fs.readFile(resolve(contractBytecode)), 'cb') }, - ...contractAci && { aci: await fs.readJson(resolve(contractAci)) }, + ...contractBytecode && { + bytecode: encode(await fs.readFile(getFullPath(contractBytecode)), 'cb'), + }, + ...contractAci && { aci: await fs.readJson(getFullPath(contractAci)) }, }; } @@ -75,8 +76,7 @@ export async function deploy(walletPath, args, options) { const contract = await sdk.initializeContract(await getContractParams(options, { descrMayNotExist: true })); const result = await contract.$deploy(args, options); const filename = options.contractSource ?? options.contractBytecode; - options.descrPath ||= path - .resolve(process.cwd(), `${filename}.deploy.${result.address.slice(3)}.json`); + options.descrPath ??= getFullPath(`${filename}.deploy.${result.address.slice(3)}.json`); const descriptor = { version: DESCRIPTOR_VERSION, address: result.address, diff --git a/src/commands/account.js b/src/commands/account.js index bfe51bfe..464bfaf5 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -117,14 +117,9 @@ addCommonOptions(program // You can use this command to generate `keypair` and encrypt it by password. // This command create `ethereum like keyfile`. // -// You can use `--output ./keys` to set directory to save you key. -// -// Example: `aecli account create myWalletName --password testpassword` -// -// Example: `aecli account create myWalletName --password testpassword --output ./mykeys` --> create `key-file` in `mykeys` directory +// Example: `aecli account create ./mykeys/my-wallet.json --password testpassword` addCommonOptions(program .command('create ') - .option('-O, --output [output]', 'Output directory', '.') .option('--overwrite', 'Overwrite if exist') .description('Create a secure wallet') .action(Account.createSecureWallet)); @@ -134,14 +129,9 @@ addCommonOptions(program // You can use this command to generate `keypair` from `private-key` and encrypt it by password. // This command create `ethereum like keyfile`. // -// You can use `--output ./keys` to set directory to save you key -// -// Example: `aecli account save myWalletName 1902855723940510273412074210842018342148234 --password testpassword` -// -// Example: `aecli account save myWalletName 1902855723940510273412074210842018342148234 --password testpassword --output ./mykeys` --> create `key-file` in `mykeys` directory +// Example: `aecli account save ./mykeys/my-wallet.json 1902855723940510273412074210842018342148234 --password testpassword` addCommonOptions(program .command('save ') - .option('-O, --output [output]', 'Output directory', '.') .option('--overwrite', 'Overwrite if exist') .description('Save a private keys string to a password protected file wallet') .action(Account.createSecureWalletByPrivKey)); @@ -150,8 +140,6 @@ addCommonOptions(program // // You can use this command to get `account nonce`. // -// You can use `--output ./keys` to set directory to save you key -// // Example: `aecli account nonce myWalletName --password testpassword addCommonOptions(program .command('nonce ') diff --git a/src/utils/account.js b/src/utils/account.js index 87b998bf..87a537d3 100644 --- a/src/utils/account.js +++ b/src/utils/account.js @@ -1,27 +1,27 @@ // # Utils `account` Module // That script contains helper function's for work with `account` import fs from 'fs-extra'; -import path from 'path'; import { generateKeyPairFromSecret, getAddressFromPriv, dump, recover, encode, Encoding, } from '@aeternity/aepp-sdk'; import { PROMPT_TYPE, prompt } from './prompt'; +import { getFullPath } from './helpers'; import CliError from './CliError'; -export async function writeWallet(name, secretKey, output, password, overwrite) { - const walletPath = path.resolve(process.cwd(), path.join(output, name)); - if (!overwrite && await fs.exists(walletPath) && !await prompt(PROMPT_TYPE.askOverwrite)) { - throw new CliError(`Wallet already exist at ${walletPath}`); +export async function writeWallet(walletPath, secretKey, password, overwrite) { + const path = getFullPath(walletPath); + if (!overwrite && await fs.exists(path) && !await prompt(PROMPT_TYPE.askOverwrite)) { + throw new CliError(`Wallet already exist at ${path}`); } password ??= await prompt(PROMPT_TYPE.askPassword); - await fs.outputJson(walletPath, await dump(name, password, secretKey)); + await fs.outputJson(path, await dump(path, password, secretKey)); const { publicKey } = generateKeyPairFromSecret(secretKey); - return { publicKey: encode(publicKey, Encoding.AccountAddress), path: walletPath }; + return { publicKey: encode(publicKey, Encoding.AccountAddress), path }; } // Get account file by path, decrypt it using password and return `keypair` export async function getWalletByPathAndDecrypt(walletPath, password) { - const keyFile = await fs.readJson(path.resolve(process.cwd(), walletPath)); + const keyFile = await fs.readJson(getFullPath(walletPath)); password ??= await prompt(PROMPT_TYPE.askPassword); diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 50588dcf..60da8524 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -1,6 +1,7 @@ // # Utils `helpers` Module // That script contains base helper function +import { resolve } from 'path'; import { Encoding, decode as _decode } from '@aeternity/aepp-sdk'; import CliError from './CliError'; @@ -77,3 +78,5 @@ export function decode(data, requiredPrefix) { } return _decode(data); } + +export const getFullPath = (path) => resolve(process.cwd(), path); From b4792e686d5595be65c57c233e986d71eb82308e Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 18 Apr 2023 21:53:20 +0700 Subject: [PATCH 09/88] refactor(account)!: remove unnecessary `balance`, `nonce` commands BREAKING CHANGE: `account balance`, `account nonce` commands removed Use `inspect ` instead. ```diff - aecli account balance wallet.json --password=123 - aecli account nonce wallet.json --password=123 + address=$(aecli account address wallet.json --json --password=123 | jq -r .publicKey) + aecli inspect $address ``` --- CLI.md | 10 ---------- src/actions/account.js | 35 ----------------------------------- src/commands/account.js | 22 ---------------------- test/account.js | 12 ------------ 4 files changed, 79 deletions(-) diff --git a/CLI.md b/CLI.md index 05d0a3f6..c2acd04d 100644 --- a/CLI.md +++ b/CLI.md @@ -168,16 +168,6 @@ Wallet saved Wallet address________________ ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi Wallet path___________________ /Users/spushkar/Desktop/aepp-sdk-js-develop/bin/test ``` -#### balance - -This command is used to check the balance of your wallet. -``` -$ aecli account balance test -``` -You will get the account balance: -``` -Your balance is: 998547 - ``` #### spend Using this command, you can send coins to another wallet. Just indicate another account's address and an amount which should be sent. diff --git a/src/actions/account.js b/src/actions/account.js index be89e4cb..4c2407a5 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -92,22 +92,6 @@ export async function spend( printTransaction(tx, json); } -// ## Get `balance` function -// This function allow you retrieve account `balance` -export async function getBalance(walletPath, options) { - const { height, hash, json } = options; - const sdk = await initSdkByWalletFile(walletPath, options); - const { nextNonce: nonce } = await sdk.api.getAccountNextNonce(sdk.address); - const balance = await sdk.getBalance(sdk.address, { height: height && +height, hash }); - if (json) { - print({ address: sdk.address, nonce, balance }); - } else { - printUnderscored('Balance', balance); - printUnderscored('ID', sdk.address); - printUnderscored('Nonce', nonce); - } -} - // ## Get `address` function // This function allow you retrieve account `public` and `private` keys export async function getAddress(walletPath, options) { @@ -129,25 +113,6 @@ export async function getAddress(walletPath, options) { } } -// ## Get `nonce` function -// This function allow you retrieve account `nonce` -export async function getAccountNonce(walletPath, options) { - const { json } = options; - const sdk = await initSdkByWalletFile(walletPath, options); - const { nextNonce: nonce } = await sdk.api.getAccountNextNonce(sdk.address); - if (json) { - print({ - id: sdk.address, - nonce: nonce - 1, - nextNonce: nonce, - }); - } else { - printUnderscored('ID', sdk.address); - printUnderscored('Nonce', nonce - 1); - printUnderscored('Next Nonce', nonce); - } -} - // ## Create secure `wallet` file // This function allow you to generate `keypair` and write it to secure `ethereum` like key-file export async function createSecureWallet(walletPath, { password, overwrite, json }) { diff --git a/src/commands/account.js b/src/commands/account.js index 464bfaf5..e08b5a3d 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -86,18 +86,6 @@ addCommonOptions(program .description('Check if message was signed by wallet') .action(Account.verifyMessage)); -// ## Initialize `balance` command -// -// You can use this command to retrieve balance of account -// -// Example: `aecli account balance ./myWalletKeyFile --password testpassword` -addCommonOptions(program - .command('balance ') - .option('--height [height]', 'Specific block height') - .option('--hash [hash]', 'Specific block hash') - .description('Get wallet balance') - .action(Account.getBalance)); - // ## Initialize `address` command // // You can use this command to retrieve get your public and private key @@ -136,16 +124,6 @@ addCommonOptions(program .description('Save a private keys string to a password protected file wallet') .action(Account.createSecureWalletByPrivKey)); -// ## Initialize `nonce` command -// -// You can use this command to get `account nonce`. -// -// Example: `aecli account nonce myWalletName --password testpassword -addCommonOptions(program - .command('nonce ') - .description('Get account nonce') - .action(Account.getAccountNonce)); - // ## Initialize `generateKeyPairs` command // // You can use this command to generate KeyPair's. diff --git a/test/account.js b/test/account.js index a4fd6080..f31abeed 100644 --- a/test/account.js +++ b/test/account.js @@ -63,12 +63,6 @@ describe('Account Module', () => { .to.be.a('string'); }); - it('Check Wallet Balance', async () => { - const balance = await sdk.getBalance(sdk.address); - expect((await executeAccount(['balance', WALLET_NAME, '--password', 'test', '--json'])).balance) - .to.equal(balance); - }); - it('Spend coins to another wallet', async () => { const amount = 100; const { publicKey } = generateKeyPair(); @@ -135,12 +129,6 @@ Version _________________________________ 1 expect(+await sdk.getBalance(publicKey)).to.be.equal(balanceBefore * 0.42); }); - it('Get account nonce', async () => { - const { nextNonce } = await sdk.api.getAccountNextNonce(sdk.address); - expect((await executeAccount(['nonce', WALLET_NAME, '--password', 'test', '--json'])).nextNonce) - .to.equal(nextNonce); - }); - it('Generate accounts', async () => { const accounts = await executeAccount(['generate', 2, '--json']); accounts.length.should.be.equal(2); From a0d9b059c2baf103e6eb4622e9c4bd6e2ab1dd5d Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 18 Apr 2023 21:56:13 +0700 Subject: [PATCH 10/88] refactor(crypto)!: remove unnecessary `crypto decode` command BREAKING CHANGE: `crypto decode` removed Use another base58 decoder if necessary. --- src/commands/crypto.js | 11 ----------- test/crypto.js | 7 ------- test/index.js | 2 +- test/inspect.js | 2 +- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/commands/crypto.js b/src/commands/crypto.js index e2e5298d..c295cd95 100644 --- a/src/commands/crypto.js +++ b/src/commands/crypto.js @@ -3,22 +3,11 @@ import fs from 'fs-extra'; import { unpackTx, Tag, MemoryAccount } from '@aeternity/aepp-sdk'; import { print } from '../utils/print'; import CliError from '../utils/CliError'; -import { decode } from '../utils/helpers'; import { decryptKey } from '../utils/encrypt-key'; import { networkIdOption, passwordOption } from '../arguments'; const program = new Command().name('aecli crypto'); -program - .command('decode ') - .description('Decodes base58 address to hex') - // ## Address decoder - // This helper function decodes address(base58) to hex - .action((address) => { - const decoded = decode(address, 'ak').toString('hex'); - console.log(`Decoded address (hex): ${decoded}`); - }); - program .command('sign [privkey]') .addOption(passwordOption) diff --git a/test/crypto.js b/test/crypto.js index 11b209ad..fc0ac41d 100644 --- a/test/crypto.js +++ b/test/crypto.js @@ -7,13 +7,6 @@ import cryptoProgramFactory from '../src/commands/crypto'; const executeCrypto = (args) => executeProgram(cryptoProgramFactory, args); describe('Crypto Module', () => { - it('decodes address', async () => { - const output = await executeCrypto([ - 'decode', 'ak_MA8Qe8ac7e9EARYK7fQxEqFufRGrG1i6qFvHA21eXXMDcnmuc', - ]); - expect(output).to.include('2dc51099d9b3921f5578d5968c2b0b5a37d11a6cc514f13862f3a9af7f0ab05f'); - }); - it('signs transaction', async () => { const { secretKey } = generateKeyPair(); const output = await executeCrypto([ diff --git a/test/index.js b/test/index.js index ed18626a..833f386b 100644 --- a/test/index.js +++ b/test/index.js @@ -86,7 +86,7 @@ export async function executeProgram(program, args) { const allArgs = [ ...args.map((arg) => arg.toString()), ...[ - 'config', 'decode', 'sign', 'unpack', 'select-node', 'select-compiler', + 'config', 'sign', 'unpack', 'select-node', 'select-compiler', ].includes(args[0]) ? [] : ['--url', url], ...[ 'compile', 'deploy', 'call', 'encode-calldata', 'decode-call-result', diff --git a/test/inspect.js b/test/inspect.js index d90ca124..01e0d196 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -278,5 +278,5 @@ Pointer account_pubkey __________________ ${sdk.address} Pointer oracle_pubkey ___________________ ${sdk.address} TTL _____________________________________ ${resJson.ttl} `.trim()); - }).timeout(4000); + }).timeout(6000); }); From 37b996570d44766fe0f1f3b10b2951330d8291fa Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 18 Apr 2023 22:02:44 +0700 Subject: [PATCH 11/88] refactor(crypto)!: remove duplicate `crypto unpack` command BREAKING CHANGE: `crypto unpack` command removed Use `inspect` instead. ```diff - aecli crypto unpack + aecli inspect ``` --- src/commands/crypto.js | 13 +------------ test/crypto.js | 10 ---------- test/index.js | 2 +- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/commands/crypto.js b/src/commands/crypto.js index c295cd95..9fc9cd85 100644 --- a/src/commands/crypto.js +++ b/src/commands/crypto.js @@ -1,7 +1,6 @@ import { Command } from 'commander'; import fs from 'fs-extra'; -import { unpackTx, Tag, MemoryAccount } from '@aeternity/aepp-sdk'; -import { print } from '../utils/print'; +import { MemoryAccount } from '@aeternity/aepp-sdk'; import CliError from '../utils/CliError'; import { decryptKey } from '../utils/encrypt-key'; import { networkIdOption, passwordOption } from '../arguments'; @@ -28,14 +27,4 @@ program console.log(await account.signTransaction(tx, { networkId })); }); -program - .command('unpack ') - // ## Transaction Deserialization - // This helper function deserialized the transaction `tx` and prints the result. - .action((tx) => { - const unpackedTx = unpackTx(tx); - unpackedTx.txType = Tag[unpackedTx.tag]; - print(unpackedTx); - }); - export default program; diff --git a/test/crypto.js b/test/crypto.js index fc0ac41d..57fc02a0 100644 --- a/test/crypto.js +++ b/test/crypto.js @@ -16,14 +16,4 @@ describe('Crypto Module', () => { ]); expect(unpackTx(output).tag).to.equal(Tag.SignedTx); }); - - it('unpacks transaction', async () => { - const output = await executeCrypto([ - 'unpack', 'tx_+F0MAaEB4TK48d23oE5jt/qWR5pUu8UlpTGn8bwM5JISGQMGf7ChAeEyuPHdt6BOY7f6lkeaVLvFJaUxp/G8DOSSEhkDBn+wiBvBbWdOyAAAhg9e1n8oAAABhHRlc3QLK3OW', - ]); - expect(output).to.include('SpendTx'); - expect(output).to.include('"recipientId": "ak_2iBPH7HUz3cSDVEUWiHg76MZJ6tZooVNBmmxcgVK6VV8KAE688"'); - expect(output).to.include('"amount": "2000000000000000000"'); - expect(output).to.include('"payload": "ba_dGVzdJVNWkk="'); - }); }); diff --git a/test/index.js b/test/index.js index 833f386b..29568ab9 100644 --- a/test/index.js +++ b/test/index.js @@ -86,7 +86,7 @@ export async function executeProgram(program, args) { const allArgs = [ ...args.map((arg) => arg.toString()), ...[ - 'config', 'sign', 'unpack', 'select-node', 'select-compiler', + 'config', 'sign', 'select-node', 'select-compiler', ].includes(args[0]) ? [] : ['--url', url], ...[ 'compile', 'deploy', 'call', 'encode-calldata', 'decode-call-result', From bb39f079188760f5c7aaf16765475e00f08ff0dc Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 18 Apr 2023 22:16:05 +0700 Subject: [PATCH 12/88] refactor(crypto)!: remove duplicate `crypto sign` command BREAKING CHANGE: `crypto sign` command removed Use `account sign` instead. --- CLI.md | 1 - README.md | 1 - package-lock.json | 2 -- package.json | 2 -- src/aecli-crypto.js | 5 ----- src/commands/crypto.js | 30 ------------------------------ src/commands/main.js | 1 - src/utils/encrypt-key.js | 38 -------------------------------------- test/crypto.js | 19 ------------------- test/index.js | 2 +- 10 files changed, 1 insertion(+), 100 deletions(-) delete mode 100644 src/aecli-crypto.js delete mode 100644 src/commands/crypto.js delete mode 100644 src/utils/encrypt-key.js delete mode 100644 test/crypto.js diff --git a/CLI.md b/CLI.md index c2acd04d..5bfe08f2 100644 --- a/CLI.md +++ b/CLI.md @@ -43,7 +43,6 @@ Commands: name AENS system tx Transaction builder oracle Interact with oracles - crypto Crypto helpers config [options] Print the current sdk configuration select-node [nodeUrl] Specify node to use in other commands select-compiler [compilerUrl] Specify compiler to use in other commands diff --git a/README.md b/README.md index dab1555e..5bafef34 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,6 @@ Commands: name AENS system tx Transaction builder oracle Interact with oracles - crypto Crypto helpers config [options] Print the current sdk configuration select-node [nodeUrl] Specify node to use in other commands select-compiler [compilerUrl] Specify compiler to use in other commands diff --git a/package-lock.json b/package-lock.json index 3d484234..b724ab0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,13 +10,11 @@ "license": "ISC", "dependencies": { "@aeternity/aepp-sdk": "^13.0.0", - "aes-js": "^3.1.2", "bignumber.js": "^9.1.1", "commander": "^10.0.0", "env-paths": "^2.2.1", "fs-extra": "^11.1.1", "prompts": "^2.4.2", - "sha.js": "^2.4.11", "update-notifier": "^6.0.2" }, "bin": { diff --git a/package.json b/package.json index 67a1add7..3316f650 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,11 @@ }, "dependencies": { "@aeternity/aepp-sdk": "^13.0.0", - "aes-js": "^3.1.2", "bignumber.js": "^9.1.1", "commander": "^10.0.0", "env-paths": "^2.2.1", "fs-extra": "^11.1.1", "prompts": "^2.4.2", - "sha.js": "^2.4.11", "update-notifier": "^6.0.2" }, "devDependencies": { diff --git a/src/aecli-crypto.js b/src/aecli-crypto.js deleted file mode 100644 index 651722be..00000000 --- a/src/aecli-crypto.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -import program from './commands/crypto'; -import { runProgram } from './utils/CliError'; - -await runProgram(program); diff --git a/src/commands/crypto.js b/src/commands/crypto.js deleted file mode 100644 index 9fc9cd85..00000000 --- a/src/commands/crypto.js +++ /dev/null @@ -1,30 +0,0 @@ -import { Command } from 'commander'; -import fs from 'fs-extra'; -import { MemoryAccount } from '@aeternity/aepp-sdk'; -import CliError from '../utils/CliError'; -import { decryptKey } from '../utils/encrypt-key'; -import { networkIdOption, passwordOption } from '../arguments'; - -const program = new Command().name('aecli crypto'); - -program - .command('sign [privkey]') - .addOption(passwordOption) - .option('-f, --file [file]', 'private key file') - .addOption(networkIdOption.default('ae_mainnet')) - // ## Transaction Signing - // - // This function shows how to use a compliant private key to sign an æternity - // transaction and turn it into an RLP-encoded tuple ready for mining - .action(async (tx, privKey, { networkId, password, file }) => { - const binaryKey = await (() => { - if (file) return fs.readFile(file); - if (privKey) return Buffer.from(privKey, 'hex'); - throw new CliError('Must provide either [privkey] or [file]'); - })(); - const decryptedKey = password ? decryptKey(password, binaryKey) : binaryKey; - const account = new MemoryAccount(decryptedKey); - console.log(await account.signTransaction(tx, { networkId })); - }); - -export default program; diff --git a/src/commands/main.js b/src/commands/main.js index 525aa5aa..49404953 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -20,7 +20,6 @@ const EXECUTABLE_CMD = [ { name: 'name', desc: 'AENS system' }, { name: 'tx', desc: 'Transaction builder' }, { name: 'oracle', desc: 'Interact with oracles' }, - { name: 'crypto', desc: 'Crypto helpers' }, ]; // You get get CLI version by exec `aecli version` program.version(process.env.npm_package_version); diff --git a/src/utils/encrypt-key.js b/src/utils/encrypt-key.js deleted file mode 100644 index 43118489..00000000 --- a/src/utils/encrypt-key.js +++ /dev/null @@ -1,38 +0,0 @@ -import aesjs from 'aes-js'; -import { sha256 as Sha256 } from 'sha.js'; - -/** - * Calculate SHA256 hash of `input` - * @param {Uint8Array | string} input - Data to hash - * @returns {Buffer} Hash - */ -function sha256hash(input) { - return new Sha256().update(input).digest(); -} - -const Ecb = aesjs.ModeOfOperation.ecb; - -/** - * Encrypt given data using `password` - * @param {string} password - Password to encrypt with - * @param {Uint8Array} binaryData - Data to encrypt - * @returns {Uint8Array} Encrypted data - */ -export function encryptKey(password, binaryData) { - const hashedPasswordBytes = sha256hash(password); - const aesEcb = new Ecb(hashedPasswordBytes); - return aesEcb.encrypt(binaryData); -} - -/** - * Decrypt given data using `password` - * @param {string} password - Password to decrypt with - * @param {Uint8Array} encrypted - Data to decrypt - * @returns {Uint8Array} Decrypted data - */ -export function decryptKey(password, encrypted) { - const encryptedBytes = Buffer.from(encrypted); - const hashedPasswordBytes = sha256hash(password); - const aesEcb = new Ecb(hashedPasswordBytes); - return aesEcb.decrypt(encryptedBytes); -} diff --git a/test/crypto.js b/test/crypto.js deleted file mode 100644 index 57fc02a0..00000000 --- a/test/crypto.js +++ /dev/null @@ -1,19 +0,0 @@ -import { describe, it } from 'mocha'; -import { expect } from 'chai'; -import { generateKeyPair, unpackTx, Tag } from '@aeternity/aepp-sdk'; -import { executeProgram } from './index'; -import cryptoProgramFactory from '../src/commands/crypto'; - -const executeCrypto = (args) => executeProgram(cryptoProgramFactory, args); - -describe('Crypto Module', () => { - it('signs transaction', async () => { - const { secretKey } = generateKeyPair(); - const output = await executeCrypto([ - 'sign', - 'tx_+F0MAaEB4TK48d23oE5jt/qWR5pUu8UlpTGn8bwM5JISGQMGf7ChAeEyuPHdt6BOY7f6lkeaVLvFJaUxp/G8DOSSEhkDBn+wiBvBbWdOyAAAhg9e1n8oAAABhHRlc3QLK3OW', - secretKey.toString('hex'), - ]); - expect(unpackTx(output).tag).to.equal(Tag.SignedTx); - }); -}); diff --git a/test/index.js b/test/index.js index 29568ab9..01fc6a89 100644 --- a/test/index.js +++ b/test/index.js @@ -86,7 +86,7 @@ export async function executeProgram(program, args) { const allArgs = [ ...args.map((arg) => arg.toString()), ...[ - 'config', 'sign', 'select-node', 'select-compiler', + 'config', 'select-node', 'select-compiler', ].includes(args[0]) ? [] : ['--url', url], ...[ 'compile', 'deploy', 'call', 'encode-calldata', 'decode-call-result', From 1c6abd8cc324437c85e6b139c9b424bd1330e0f2 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 18 Apr 2023 22:23:20 +0700 Subject: [PATCH 13/88] refactor(account)!: remove unnecessary `account generate` command BREAKING CHANGE: `account generate` command removed Use `account create` in a cycle instead. --- src/actions/account.js | 16 ---------------- src/commands/account.js | 10 ---------- test/account.js | 5 ----- 3 files changed, 31 deletions(-) diff --git a/src/actions/account.js b/src/actions/account.js index 4c2407a5..25fe0b59 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -6,7 +6,6 @@ import fs from 'fs-extra'; import { generateKeyPair, encode, Encoding, verifyMessage as _verifyMessage, } from '@aeternity/aepp-sdk'; -import CliError from '../utils/CliError'; import { writeWallet } from '../utils/account'; import { initSdkByWalletFile, getAccountByWalletFile } from '../utils/cli'; import { print, printTransaction, printUnderscored } from '../utils/print'; @@ -148,18 +147,3 @@ export async function createSecureWalletByPrivKey( printUnderscored('Path', path); } } - -export async function generateKeyPairs(count, { json }) { - if (!Number.isInteger(+count)) { - throw new CliError(`Count must be a number, got ${count} instead`); - } - const accounts = new Array(+count).fill().map(() => generateKeyPair()); - if (json) print(accounts); - else { - accounts.forEach((acc, i) => { - if (i) print(''); - printUnderscored(`Account #${i + 1} address`, acc.publicKey); - printUnderscored(`Account #${i + 1} secret key`, acc.secretKey); - }); - } -} diff --git a/src/commands/account.js b/src/commands/account.js index e08b5a3d..de942266 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -124,14 +124,4 @@ addCommonOptions(program .description('Save a private keys string to a password protected file wallet') .action(Account.createSecureWalletByPrivKey)); -// ## Initialize `generateKeyPairs` command -// -// You can use this command to generate KeyPair's. -// -// Example: `aecli account generate 10 --force -addCommonOptions(program - .command('generate ') - .description('Generate account key pairs') - .action(Account.generateKeyPairs)); - export default program; diff --git a/test/account.js b/test/account.js index f31abeed..2c3931d8 100644 --- a/test/account.js +++ b/test/account.js @@ -129,11 +129,6 @@ Version _________________________________ 1 expect(+await sdk.getBalance(publicKey)).to.be.equal(balanceBefore * 0.42); }); - it('Generate accounts', async () => { - const accounts = await executeAccount(['generate', 2, '--json']); - accounts.length.should.be.equal(2); - }); - it('Sign message', async () => { const data = 'Hello world'; const signedMessage = await executeAccount(['sign-message', WALLET_NAME, data, '--json', '--password', 'test']); From e4f9b5009b9c4f95b5349d8ce5f414e422c75d0d Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 20 Apr 2023 23:36:43 +0700 Subject: [PATCH 14/88] refactor(name)!: remove duplicate `name lookup` command BREAKING CHANGE: `name lookup` command removed Use `inspect` instead. ```diff - aecli name lookup + aecli inspect ``` --- src/actions/aens.js | 16 ++-------------- src/commands/name.js | 10 ---------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/src/actions/aens.js b/src/actions/aens.js index 8d0b8071..2ff29ac4 100644 --- a/src/actions/aens.js +++ b/src/actions/aens.js @@ -3,8 +3,8 @@ // This script initialize all `AENS` function import { isAddressValid, getDefaultPointerKey } from '@aeternity/aepp-sdk'; -import { initSdk, initSdkByWalletFile } from '../utils/cli'; -import { print, printName, printTransaction } from '../utils/print'; +import { initSdkByWalletFile } from '../utils/cli'; +import { print, printTransaction } from '../utils/print'; import { isAvailable, updateNameStatus, validateName } from '../utils/helpers'; import CliError from '../utils/CliError'; @@ -261,15 +261,3 @@ export async function fullClaim(walletPath, name, options) { json, ); } - -export async function lookUp(name, options) { - const { json } = options; - validateName(name); - const sdk = initSdk(options); - - // Check if `name` is unavailable and we can revoke it - printName( - await updateNameStatus(name, sdk), - json, - ); -} diff --git a/src/commands/name.js b/src/commands/name.js index 929da1ad..0dee4026 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -137,14 +137,4 @@ addCommonOptions(program .description('Transfer a name to another account') .action(AENS.transferName)); -// ## Initialize `lookup` command -// -// You can use this command to `update` pointer of AENS name. -// -// Example: `aecli lookup name.chain` -addCommonOptions(program - .command('lookup ') - .description('Look up name') - .action(AENS.lookUp)); - export default program; From 198a6dc17a5b5d9c94697d8990dd1107eb5bd594 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 20 Apr 2023 23:34:32 +0700 Subject: [PATCH 15/88] test(inspect): auction name --- test/inspect.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/inspect.js b/test/inspect.js index 01e0d196..9a454b1e 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -279,4 +279,21 @@ Pointer oracle_pubkey ___________________ ${sdk.address} TTL _____________________________________ ${resJson.ttl} `.trim()); }).timeout(6000); + + it('Inspect Running Auction Name', async () => { + const auctionName = `a${Math.random().toString().slice(2, 9)}.chain`; + await (await sdk.aensPreclaim(auctionName)).claim(); + const resJson = await executeInspect([auctionName, '--json']); + expect(resJson).to.eql({ + name: auctionName, + status: 'AVAILABLE', + }); + const res = await executeInspect([auctionName]); + expect(res).to.equal(` +Status __________________________________ AVAILABLE +Name hash _______________________________ N/A +Pointers ________________________________ N/A +TTL _____________________________________ 0 + `.trim()); + }).timeout(4000); }); From 039d53d0b6773b48b9d55ee9b06516d5a0427aad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 11:52:52 +0000 Subject: [PATCH 16/88] chore(deps): bump semver from 5.7.1 to 5.7.2 Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md) - [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2) --- updated-dependencies: - dependency-name: semver dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 176 ++++++++++------------------------------------ 1 file changed, 36 insertions(+), 140 deletions(-) diff --git a/package-lock.json b/package-lock.json index b724ab0c..93bcc6da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2072,18 +2072,6 @@ "node": ">=v14" } }, - "node_modules/@commitlint/is-ignored/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@commitlint/is-ignored/node_modules/semver": { "version": "7.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", @@ -2099,12 +2087,6 @@ "node": ">=10" } }, - "node_modules/@commitlint/is-ignored/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/@commitlint/lint": { "version": "17.4.4", "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-17.4.4.tgz", @@ -2716,21 +2698,10 @@ "semver": "^7.3.5" } }, - "node_modules/@ledgerhq/devices/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@ledgerhq/devices/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -2741,11 +2712,6 @@ "node": ">=10" } }, - "node_modules/@ledgerhq/devices/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/@ledgerhq/errors": { "version": "6.12.3", "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.12.3.tgz", @@ -2785,17 +2751,6 @@ "node-pre-gyp": "bin/node-pre-gyp" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -2811,17 +2766,17 @@ } }, "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } }, "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -2832,11 +2787,6 @@ "node": ">=10" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.3", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", @@ -4368,9 +4318,9 @@ } }, "node_modules/conventional-changelog-core/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -6438,24 +6388,6 @@ "node": ">=10" } }, - "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/hosted-git-info/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -7672,9 +7604,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -8182,22 +8114,10 @@ "node": ">=10" } }, - "node_modules/normalize-package-data/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -8209,12 +8129,6 @@ "node": ">=10" } }, - "node_modules/normalize-package-data/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -8702,9 +8616,9 @@ } }, "node_modules/package-json/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -9176,9 +9090,9 @@ } }, "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -9541,9 +9455,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -9564,9 +9478,9 @@ } }, "node_modules/semver-diff/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -9880,22 +9794,10 @@ "node": ">=10" } }, - "node_modules/standard-version/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/standard-version/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -9907,12 +9809,6 @@ "node": ">=10" } }, - "node_modules/standard-version/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/standard-version/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -10504,9 +10400,9 @@ } }, "node_modules/update-notifier/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, From 4b8cd80cd4ede34a3c7e648aaa61cee184359131 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 19:59:19 +0000 Subject: [PATCH 17/88] chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93bcc6da..ee182737 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10640,9 +10640,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true, "engines": { "node": ">=0.10.0" From 7617438d9e95ffdf74c568f51da7aca4dcffa5f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:01:34 +0000 Subject: [PATCH 18/88] chore(deps-dev): bump @babel/traverse from 7.21.3 to 7.23.2 Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.3 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 125 +++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/package-lock.json b/package-lock.json index ee182737..6030c55e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -262,12 +262,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" @@ -313,12 +314,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.3.tgz", - "integrity": "sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.21.3", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -456,9 +457,9 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -477,25 +478,25 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -625,30 +626,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -693,13 +694,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -707,9 +708,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz", - "integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1853,33 +1854,33 @@ } }, "node_modules/@babel/template": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", - "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.3.tgz", - "integrity": "sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.3", - "@babel/types": "^7.21.3", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1888,13 +1889,13 @@ } }, "node_modules/@babel/types": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.3.tgz", - "integrity": "sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { From c31ea87d5db4423ae68703fed3845f141cd58b8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 17:39:05 +0000 Subject: [PATCH 19/88] chore(deps): bump es5-ext from 0.10.62 to 0.10.64 Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.64. - [Release notes](https://github.com/medikoo/es5-ext/releases) - [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md) - [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.64) --- updated-dependencies: - dependency-name: es5-ext dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6030c55e..237cd308 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5038,13 +5038,14 @@ } }, "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "hasInstallScript": true, "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "engines": { @@ -5452,6 +5453,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/espree": { "version": "9.5.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", @@ -5524,6 +5544,15 @@ "node": ">=0.10.0" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", From b5cce79055cde7757a4ed63e7cdb19d42b961e96 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 5 Apr 2024 19:56:53 +1000 Subject: [PATCH 20/88] chore: ignore dependabot commits in commitlint --- commitlint.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commitlint.config.js b/commitlint.config.js index 84dcb122..8b2e9a28 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,3 +1,4 @@ module.exports = { extends: ['@commitlint/config-conventional'], + ignores: [(message) => /^Bumps \[.+]\(.+\) from .+ to .+\.$/m.test(message)], }; From 59500b6c1cb77256780025ca69bcd44d4c102133 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 5 Apr 2024 19:57:33 +1000 Subject: [PATCH 21/88] chore: don't run tests in a PR twice --- .github/workflows/nodejs.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c6fff279..af596ddd 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,5 +1,10 @@ name: Node.js CI -on: [push, pull_request] +on: + push: + branches: + - master + - develop + pull_request: jobs: test: runs-on: ubuntu-22.04 From 26c1aa0cd39c654c28b18451cd9d5cf353bb41f6 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 1 Apr 2024 11:54:45 +1000 Subject: [PATCH 22/88] chore: simplify docker, ci configuration --- .env | 2 -- .github/workflows/nodejs.yml | 9 +------- docker-compose.yml | 21 ++++++++++++------- docker/{accounts_test.json => accounts.json} | 0 ...ernity_node_mean16.yaml => aeternity.yaml} | 14 +------------ 5 files changed, 15 insertions(+), 31 deletions(-) delete mode 100644 .env rename docker/{accounts_test.json => accounts.json} (100%) rename docker/{aeternity_node_mean16.yaml => aeternity.yaml} (69%) diff --git a/.env b/.env deleted file mode 100644 index a5f0f6d1..00000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -NODE_TAG=v6.8.1 -COMPILER_TAG=v7.3.0 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index af596ddd..f45af6ac 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -20,13 +20,6 @@ jobs: node-version: 18.x - run: npm ci - run: npm run lint - - - run: docker-compose up -d - - name: Ensure that node is running - run: | - while [[ `curl -s -o /dev/null -w %{http_code} localhost:3013/api` != 200 ]]; do - sleep 0.2; - done - + - run: docker-compose up -d --wait - run: npm run test - run: npm run docs diff --git a/docker-compose.yml b/docker-compose.yml index ee99e3e7..ff72b26b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,19 @@ version: '3' services: node: - image: aeternity/aeternity:${NODE_TAG} - hostname: node - ports: ["3013:3013", "3113:3113"] + image: aeternity/aeternity:v6.8.1 + ports: [3013:3013] + # TODO: remove after releasing https://github.com/aeternity/aeternity/pull/4292 + healthcheck: + interval: 2s volumes: - - ./docker/aeternity_node_mean16.yaml:/home/aeternity/node/aeternity.yaml - - ./docker/accounts_test.json:/home/aeternity/node/data/aecore/.genesis/accounts_test.json + - ./docker/aeternity.yaml:/home/aeternity/node/aeternity.yaml + - ./docker/accounts.json:/home/aeternity/node/data/aecore/.genesis/accounts_test.json + stop_grace_period: 0s compiler: - image: aeternity/aesophia_http:${COMPILER_TAG} - hostname: compiler - ports: ["3080:3080"] + image: aeternity/aesophia_http:v7.3.0 + ports: [3080:3080] + # TODO: remove after releasing https://github.com/aeternity/aesophia_http/pull/133 + healthcheck: + interval: 2s diff --git a/docker/accounts_test.json b/docker/accounts.json similarity index 100% rename from docker/accounts_test.json rename to docker/accounts.json diff --git a/docker/aeternity_node_mean16.yaml b/docker/aeternity.yaml similarity index 69% rename from docker/aeternity_node_mean16.yaml rename to docker/aeternity.yaml index c6704d1c..dcf983a1 100644 --- a/docker/aeternity_node_mean16.yaml +++ b/docker/aeternity.yaml @@ -1,21 +1,9 @@ ---- -peers: [] +# yaml-language-server: $schema=https://github.com/aeternity/aeternity/raw/master/apps/aeutils/priv/aeternity_config_schema.json http: - external: - port: 3013 - internal: - debug_endpoints: true - port: 3113 - listen_address: 0.0.0.0 endpoints: dry-run: true -websocket: - channel: - listen_address: 0.0.0.0 - port: 3014 - chain: persist: false hard_forks: From c7342bbb5a041e451703a1c66838673ad890010f Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 1 Apr 2024 12:00:37 +1000 Subject: [PATCH 23/88] chore: inline AUTHORS into contributors field --- AUTHORS | 2 -- LICENSE | 2 +- README.md | 2 +- package.json | 5 ++++- 4 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 AUTHORS diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index d13e17b7..00000000 --- a/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Nazar Duchak - diff --git a/LICENSE b/LICENSE index 88baaff8..0b399e9f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ ISC License (ISC) -Copyright © 2023 aeternity developers +Copyright © 2024 aeternity developers Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice diff --git a/README.md b/README.md index 5bafef34..ab7dd103 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Commands: ## License ISC License (ISC) -Copyright © 2023 aeternity developers +Copyright © 2024 aeternity developers Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice diff --git a/package.json b/package.json index 3316f650..63c5af05 100644 --- a/package.json +++ b/package.json @@ -52,12 +52,15 @@ "aeternity", "blockchain" ], - "author": "nduchak", "license": "ISC", "engines": { "node": ">=14.0.0" }, "files": [ "bin" + ], + "contributors": [ + "Nazar Duchak ", + "Denis Davidyuk " ] } From 14ead8ce62ed6ad4518e86b2bb59b95a3bd01149 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 1 Apr 2024 12:12:59 +1000 Subject: [PATCH 24/88] chore: sync configs with aepp-sdk-js --- .github/workflows/main.yml | 45 ++++++++++++++++++++++++++++++++++++ .github/workflows/nodejs.yml | 25 -------------------- .mocharc.js | 3 ++- commitlint.config.js | 16 +++++++++++++ package.json | 7 +++--- test/index.js | 10 ++++---- 6 files changed, 71 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..0daf534a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,45 @@ +name: Test & build +on: + push: + branches: + - master + - develop + pull_request: +jobs: + main: + runs-on: ubuntu-22.04 + steps: + - run: | + wget -q https://packages.erlang-solutions.com/erlang/debian/pool/esl-erlang_25.0.4-1~ubuntu~jammy_amd64.deb + sudo apt install --allow-downgrades ./esl-erlang_25.0.4-1~ubuntu~jammy_amd64.deb + - uses: actions/checkout@v4 + with: + fetch-depth: 100 + - uses: actions/setup-node@v4 + with: + node-version: 18.x # minimum supported version + - uses: actions/cache@v4 + with: + path: | + ~/.npm + ~/.autorest + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + - run: npm ci + - name: Run Commitlint + if: github.event_name == 'pull_request' + env: + HEAD: ${{ github.event.pull_request.head.sha }} + BASE: ${{ github.event.pull_request.base.sha }} + run: npx commitlint --from $BASE --to $HEAD --verbose + - run: npm run lint + - run: npm run docs + - run: docker compose up -d --wait + - run: npx nyc npm test + - run: npx nyc report --reporter=text-lcov > coverage.lcov + - uses: codecov/codecov-action@v4 + with: + files: coverage.lcov + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - run: docker compose logs + if: always() diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index f45af6ac..00000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Node.js CI -on: - push: - branches: - - master - - develop - pull_request: -jobs: - test: - runs-on: ubuntu-22.04 - steps: - - run: | - wget -q https://packages.erlang-solutions.com/erlang/debian/pool/esl-erlang_25.0.4-1~ubuntu~jammy_amd64.deb - sudo apt install --allow-downgrades ./esl-erlang_25.0.4-1~ubuntu~jammy_amd64.deb - - uses: actions/checkout@v2 - with: - fetch-depth: 100 - - uses: actions/setup-node@v2 - with: - node-version: 18.x - - run: npm ci - - run: npm run lint - - run: docker-compose up -d --wait - - run: npm run test - - run: npm run docs diff --git a/.mocharc.js b/.mocharc.js index ed030f73..c34e5eb2 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -6,5 +6,6 @@ require('@babel/register')({ }) module.exports = { - require: ['@babel/register'] + require: ['@babel/register'], + recursive: true, } diff --git a/commitlint.config.js b/commitlint.config.js index 8b2e9a28..2254ff11 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,4 +1,20 @@ module.exports = { extends: ['@commitlint/config-conventional'], + rules: { + 'scope-enum': [ + 2, + 'always', + [ + 'account', + 'aens', + 'chain', + 'contract', + 'deps', + 'deps-dev', + 'oracle', + 'release', + ], + ], + }, ignores: [(message) => /^Bumps \[.+]\(.+\) from .+ to .+\.$/m.test(message)], }; diff --git a/package.json b/package.json index 63c5af05..f8a42128 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,10 @@ "scripts": { "build": "babel src --out-dir bin --out-file-extension .mjs", "docs": "scripts/js-to-md.js src/*.js src/commands/*.js src/actions/*.js src/utils/*.js", - "lint": "commitlint --from 23f6888 && eslint .", - "test": "nyc mocha --recursive", - "test:watch": "mocha --recursive --watch", + "commitlint": "commitlint --from develop", + "lint": "eslint .", + "test": "mocha", + "test:watch": "mocha --watch", "release": "standard-version --skip.tag", "prepare": "npm run build", "prepublishOnly": "npm run docs" diff --git a/test/index.js b/test/index.js index 01fc6a89..97bde983 100644 --- a/test/index.js +++ b/test/index.js @@ -21,11 +21,10 @@ after(() => { chai.use(chaiAsPromised); chai.should(); -const url = process.env.TEST_URL || 'http://localhost:3013'; -const compilerUrl = process.env.COMPILER_URL || 'http://localhost:3080'; -const secretKey = process.env.SECRET_KEY || 'bf66e1c256931870908a649572ed0257876bb84e3cdf71efb12f56c7335fad54d5cf08400e988222f26eb4b02c8f89077457467211a6e6d955edb70749c6a33b'; -export const networkId = process.env.TEST_NETWORK_ID || 'ae_devnet'; -const ignoreVersion = process.env.IGNORE_VERSION || false; +const url = 'http://localhost:3013'; +const compilerUrl = 'http://localhost:3080'; +const secretKey = 'bf66e1c256931870908a649572ed0257876bb84e3cdf71efb12f56c7335fad54d5cf08400e988222f26eb4b02c8f89077457467211a6e6d955edb70749c6a33b'; +export const networkId = 'ae_devnet'; const keypair = generateKeyPair(); export const WALLET_NAME = 'test-artifacts/wallet.json'; @@ -36,7 +35,6 @@ const Sdk = (params = {}) => { _expectedMineRate: process.env._EXPECTED_MINE_RATE, _microBlockCycle: process.env._MICRO_BLOCK_CYCLE, /* eslint-enable no-underscore-dangle */ - ignoreVersion, onCompiler: new CompilerHttpNode(compilerUrl), nodes: [{ name: 'test', instance: new Node(url) }], ...params, From 5fd3bfa06eb5d36efa67a655f62d4bf4ed8c144e Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 4 Apr 2024 12:25:08 +1000 Subject: [PATCH 25/88] chore!: require nodejs@18 BREAKING CHANGE: require nodejs@18 or newer Because nodejs@16 is not maintained currently. --- babel.config.js | 2 +- package-lock.json | 2 +- package.json | 2 +- test/contract.js | 5 ++++- test/name.js | 2 +- test/other.js | 6 +++--- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/babel.config.js b/babel.config.js index d9a89107..9dcc77c7 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,7 +2,7 @@ module.exports = { presets: [ ['@babel/preset-env', { modules: false, - targets: { node: 14 }, + targets: { node: 18 }, }], ], plugins: [ diff --git a/package-lock.json b/package-lock.json index 237cd308..089b2cdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "standard-version": "^9.5.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@aeternity/aepp-calldata": { diff --git a/package.json b/package.json index f8a42128..9a56e6f9 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ ], "license": "ISC", "engines": { - "node": ">=14.0.0" + "node": ">=18.19.0" }, "files": [ "bin" diff --git a/test/contract.js b/test/contract.js index 46a1959f..583a1eb2 100644 --- a/test/contract.js +++ b/test/contract.js @@ -126,13 +126,16 @@ describe('Contract Module', function contractTests() { }); it('throws error if arguments invalid', async () => { + const expectedError = process.version.startsWith('v18.') + ? 'Unexpected end of JSON input' + : 'Can\'t parse contract arguments: Expected \',\' or \']\' after array element in JSON at position 2'; await expect(executeContract([ 'deploy', WALLET_NAME, '--password', 'test', '--contractSource', contractSourceFile, '[3', '--json', - ])).to.be.rejectedWith(CliError, 'Can\'t parse contract arguments: Unexpected end of JSON input'); + ])).to.be.rejectedWith(CliError, expectedError); }); }); diff --git a/test/name.js b/test/name.js index 35a2afc8..8bafa692 100644 --- a/test/name.js +++ b/test/name.js @@ -247,7 +247,7 @@ describe('AENS Module', () => { name, preClaim.salt, '--json', - ]).should.be.rejectedWith('Giving up after 5 blocks mined, transaction hash:'); + ]).should.be.rejectedWith(/Giving up after 5 blocks mined, transaction hash:|error: Transaction not found/); }).timeout(15000); }); }); diff --git a/test/other.js b/test/other.js index adaf5f19..8264ebf1 100644 --- a/test/other.js +++ b/test/other.js @@ -6,10 +6,10 @@ import mainProgram from '../src/commands/main'; describe('Other tests', () => { it('Config', async () => { expect(await executeProgram(mainProgram, ['config'])).to.equal( - 'Node https://testnet.aeternity.io network id ae_uat, version 6.8.1\n' - + 'Compiler https://v7.compiler.aepps.com version 7.1.0', + 'Node https://testnet.aeternity.io network id ae_uat, version 6.13.0\n' + + 'Compiler https://v7.compiler.aepps.com version 7.4.0', ); - }); + }).timeout(4000); it('selects node', async () => { expect(await executeProgram(mainProgram, ['select-node', 'http://example.com/node'])) From ae3f3f0915d1541de162a0ab257f90ba96bd5e9e Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 4 Apr 2024 15:12:11 +1000 Subject: [PATCH 26/88] chore: don't use babel to run tests --- .eslintrc.js => .eslintrc.cjs | 1 + .mocharc.js => .mocharc.cjs | 6 +---- babel.tests.config.js | 5 ---- commitlint.config.js | 2 +- package.json | 1 + scripts/js-to-md.js | 4 ++-- src/actions/account.js | 8 +++---- src/actions/aens.js | 8 +++---- src/actions/chain.js | 6 ++--- src/actions/contract.js | 8 +++---- src/actions/inspect.js | 8 +++---- src/actions/oracle.js | 8 +++---- src/actions/transaction.js | 4 ++-- src/aecli-account.js | 4 ++-- src/aecli-chain.js | 4 ++-- src/aecli-contract.js | 4 ++-- src/aecli-inspect.js | 4 ++-- src/aecli-name.js | 4 ++-- src/aecli-oracle.js | 4 ++-- src/aecli-tx.js | 4 ++-- src/aecli.js | 4 ++-- src/arguments.js | 2 +- src/commands/account.js | 4 ++-- src/commands/chain.js | 4 ++-- src/commands/contract.js | 6 ++--- src/commands/inspect.js | 4 ++-- src/commands/main.js | 6 ++--- src/commands/name.js | 4 ++-- src/commands/oracle.js | 4 ++-- src/commands/tx.js | 4 ++-- src/utils/CliError.js | 2 +- src/utils/account.js | 6 ++--- src/utils/cli.js | 2 +- src/utils/helpers.js | 2 +- src/utils/print.js | 2 +- test/account.js | 45 ++++++++++++++++++++++------------- test/chain.js | 4 ++-- test/contract.js | 6 ++--- test/index.js | 2 +- test/inspect.js | 6 ++--- test/name.js | 8 +++---- test/oracle.js | 4 ++-- test/other.js | 4 ++-- test/tx.js | 12 +++++----- 44 files changed, 124 insertions(+), 120 deletions(-) rename .eslintrc.js => .eslintrc.cjs (89%) rename .mocharc.js => .mocharc.cjs (52%) delete mode 100644 babel.tests.config.js diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 89% rename from .eslintrc.js rename to .eslintrc.cjs index 3a16a001..5ceecab0 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -10,6 +10,7 @@ module.exports = { sourceType: 'module', }, rules: { + 'import/extensions': ['error', 'always'], // TODO: enable these rules back 'no-console': 0, 'max-len': 0, diff --git a/.mocharc.js b/.mocharc.cjs similarity index 52% rename from .mocharc.js rename to .mocharc.cjs index c34e5eb2..94965605 100644 --- a/.mocharc.js +++ b/.mocharc.cjs @@ -1,11 +1,7 @@ process.env._EXPECTED_MINE_RATE = 1000 process.env._MICRO_BLOCK_CYCLE = 300 -require('@babel/register')({ - configFile: './babel.tests.config.js' -}) - module.exports = { - require: ['@babel/register'], recursive: true, + timeout: '4s', } diff --git a/babel.tests.config.js b/babel.tests.config.js deleted file mode 100644 index 2862f691..00000000 --- a/babel.tests.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - ['@babel/preset-env', { targets: { node: 'current' } }], - ], -}; diff --git a/commitlint.config.js b/commitlint.config.js index 2254ff11..baa8b0a8 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,4 +1,4 @@ -module.exports = { +export default { extends: ['@commitlint/config-conventional'], rules: { 'scope-enum': [ diff --git a/package.json b/package.json index 9a56e6f9..ca18382d 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "bin": { "aecli": "bin/aecli.mjs" }, + "type": "module", "dependencies": { "@aeternity/aepp-sdk": "^13.0.0", "bignumber.js": "^9.1.1", diff --git a/scripts/js-to-md.js b/scripts/js-to-md.js index 1bbba4bb..328ebe13 100755 --- a/scripts/js-to-md.js +++ b/scripts/js-to-md.js @@ -1,7 +1,7 @@ #!/usr/bin/env node -const path = require('path'); -const fs = require('fs-extra'); +import path from 'path'; +import fs from 'fs-extra'; function splitCodeIntoBlocks(text) { const content = []; diff --git a/src/actions/account.js b/src/actions/account.js index 25fe0b59..ff35b1d7 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -6,10 +6,10 @@ import fs from 'fs-extra'; import { generateKeyPair, encode, Encoding, verifyMessage as _verifyMessage, } from '@aeternity/aepp-sdk'; -import { writeWallet } from '../utils/account'; -import { initSdkByWalletFile, getAccountByWalletFile } from '../utils/cli'; -import { print, printTransaction, printUnderscored } from '../utils/print'; -import { PROMPT_TYPE, prompt } from '../utils/prompt'; +import { writeWallet } from '../utils/account.js'; +import { initSdkByWalletFile, getAccountByWalletFile } from '../utils/cli.js'; +import { print, printTransaction, printUnderscored } from '../utils/print.js'; +import { PROMPT_TYPE, prompt } from '../utils/prompt.js'; // ## `Sign message` function // this function allow you to `sign` arbitrary data diff --git a/src/actions/aens.js b/src/actions/aens.js index 2ff29ac4..aa16f063 100644 --- a/src/actions/aens.js +++ b/src/actions/aens.js @@ -3,10 +3,10 @@ // This script initialize all `AENS` function import { isAddressValid, getDefaultPointerKey } from '@aeternity/aepp-sdk'; -import { initSdkByWalletFile } from '../utils/cli'; -import { print, printTransaction } from '../utils/print'; -import { isAvailable, updateNameStatus, validateName } from '../utils/helpers'; -import CliError from '../utils/CliError'; +import { initSdkByWalletFile } from '../utils/cli.js'; +import { print, printTransaction } from '../utils/print.js'; +import { isAvailable, updateNameStatus, validateName } from '../utils/helpers.js'; +import CliError from '../utils/CliError.js'; // ## Claim `name` function export async function preClaim(walletPath, name, options) { diff --git a/src/actions/chain.js b/src/actions/chain.js index a28b381c..23252c88 100644 --- a/src/actions/chain.js +++ b/src/actions/chain.js @@ -3,11 +3,11 @@ // This script initialize all `chain` function import { verifyTransaction, ConsensusProtocolVersion } from '@aeternity/aepp-sdk'; -import { initSdk } from '../utils/cli'; +import { initSdk } from '../utils/cli.js'; import { printBlock, print, printUnderscored, printTransaction, printValidation, -} from '../utils/print'; -import { getBlock } from '../utils/helpers'; +} from '../utils/print.js'; +import { getBlock } from '../utils/helpers.js'; // ## Retrieve `node` version export async function version(options) { diff --git a/src/actions/contract.js b/src/actions/contract.js index 84d7ef8d..066892fa 100644 --- a/src/actions/contract.js +++ b/src/actions/contract.js @@ -4,10 +4,10 @@ import fs from 'fs-extra'; import { encode } from '@aeternity/aepp-sdk'; -import { initSdk, initSdkByWalletFile } from '../utils/cli'; -import { print, printTransaction, printUnderscored } from '../utils/print'; -import CliError from '../utils/CliError'; -import { getFullPath } from '../utils/helpers'; +import { initSdk, initSdkByWalletFile } from '../utils/cli.js'; +import { print, printTransaction, printUnderscored } from '../utils/print.js'; +import CliError from '../utils/CliError.js'; +import { getFullPath } from '../utils/helpers.js'; const DESCRIPTOR_VERSION = 1; diff --git a/src/actions/inspect.js b/src/actions/inspect.js index 7dbb5a01..81e5a19d 100644 --- a/src/actions/inspect.js +++ b/src/actions/inspect.js @@ -3,7 +3,7 @@ // This script initialize all `inspect` function import { Encoding, unpackTx as _unpackTx, Tag } from '@aeternity/aepp-sdk'; -import { initSdk } from '../utils/cli'; +import { initSdk } from '../utils/cli.js'; import { print, printBlock, @@ -11,11 +11,11 @@ import { printName, printOracle, printQueries, printTransaction, printUnderscored, -} from '../utils/print'; +} from '../utils/print.js'; import { checkPref, getBlock, updateNameStatus, validateName, -} from '../utils/helpers'; -import CliError from '../utils/CliError'; +} from '../utils/helpers.js'; +import CliError from '../utils/CliError.js'; function printEntries(object) { Object.entries(object).forEach((entry) => printUnderscored(...entry)); diff --git a/src/actions/oracle.js b/src/actions/oracle.js index 0e2e97cc..eb95adf2 100644 --- a/src/actions/oracle.js +++ b/src/actions/oracle.js @@ -3,12 +3,12 @@ // This script initialize all `contract` function import { ORACLE_TTL_TYPES } from '@aeternity/aepp-sdk'; -import { initSdk, initSdkByWalletFile } from '../utils/cli'; -import { decode } from '../utils/helpers'; +import { initSdk, initSdkByWalletFile } from '../utils/cli.js'; +import { decode } from '../utils/helpers.js'; import { print, printOracle, printQueries, printTransaction, -} from '../utils/print'; -import CliError from '../utils/CliError'; +} from '../utils/print.js'; +import CliError from '../utils/CliError.js'; function ensureTtlANumber(ttl, name) { if (isNaN(+ttl)) throw new CliError(`${name} TTL should be a number`); diff --git a/src/actions/transaction.js b/src/actions/transaction.js index bc593616..bc3d4867 100644 --- a/src/actions/transaction.js +++ b/src/actions/transaction.js @@ -7,8 +7,8 @@ import { Node, genSalt, unpackTx, commitmentHash, buildContractId, verifyTransaction, getDefaultPointerKey, buildTx, encode, Encoding, } from '@aeternity/aepp-sdk'; -import { print, printUnderscored, printValidation } from '../utils/print'; -import { validateName, decode } from '../utils/helpers'; +import { print, printUnderscored, printValidation } from '../utils/print.js'; +import { validateName, decode } from '../utils/helpers.js'; // Print `Buider Transaction` function buildAndPrintTx(params, json, extraKeys = {}) { diff --git a/src/aecli-account.js b/src/aecli-account.js index 2223daec..85965767 100644 --- a/src/aecli-account.js +++ b/src/aecli-account.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import program from './commands/account'; -import { runProgram } from './utils/CliError'; +import program from './commands/account.js'; +import { runProgram } from './utils/CliError.js'; await runProgram(program); diff --git a/src/aecli-chain.js b/src/aecli-chain.js index a9514c75..9bc4a9e1 100755 --- a/src/aecli-chain.js +++ b/src/aecli-chain.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import program from './commands/chain'; -import { runProgram } from './utils/CliError'; +import program from './commands/chain.js'; +import { runProgram } from './utils/CliError.js'; await runProgram(program); diff --git a/src/aecli-contract.js b/src/aecli-contract.js index ea2f9481..cf3c61f2 100644 --- a/src/aecli-contract.js +++ b/src/aecli-contract.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import program from './commands/contract'; -import { runProgram } from './utils/CliError'; +import program from './commands/contract.js'; +import { runProgram } from './utils/CliError.js'; await runProgram(program); diff --git a/src/aecli-inspect.js b/src/aecli-inspect.js index 6a9df831..2572e8ae 100644 --- a/src/aecli-inspect.js +++ b/src/aecli-inspect.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import program from './commands/inspect'; -import { runProgram } from './utils/CliError'; +import program from './commands/inspect.js'; +import { runProgram } from './utils/CliError.js'; await runProgram(program); diff --git a/src/aecli-name.js b/src/aecli-name.js index 2d702d72..cf8ea548 100644 --- a/src/aecli-name.js +++ b/src/aecli-name.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import program from './commands/name'; -import { runProgram } from './utils/CliError'; +import program from './commands/name.js'; +import { runProgram } from './utils/CliError.js'; await runProgram(program); diff --git a/src/aecli-oracle.js b/src/aecli-oracle.js index 93861d72..ae8f4fe1 100644 --- a/src/aecli-oracle.js +++ b/src/aecli-oracle.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import program from './commands/oracle'; -import { runProgram } from './utils/CliError'; +import program from './commands/oracle.js'; +import { runProgram } from './utils/CliError.js'; await runProgram(program); diff --git a/src/aecli-tx.js b/src/aecli-tx.js index 8f05356f..059d123c 100644 --- a/src/aecli-tx.js +++ b/src/aecli-tx.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import program from './commands/tx'; -import { runProgram } from './utils/CliError'; +import program from './commands/tx.js'; +import { runProgram } from './utils/CliError.js'; await runProgram(program); diff --git a/src/aecli.js b/src/aecli.js index 8daecf7a..596106ae 100755 --- a/src/aecli.js +++ b/src/aecli.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import program from './commands/main'; -import { runProgram } from './utils/CliError'; +import program from './commands/main.js'; +import { runProgram } from './utils/CliError.js'; await runProgram(program); diff --git a/src/arguments.js b/src/arguments.js index 0e62253b..701dbb8f 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -1,6 +1,6 @@ import { Argument, Option } from 'commander'; import BigNumber from 'bignumber.js'; -import { NODE_URL, COMPILER_URL } from './utils/constant'; +import { NODE_URL, COMPILER_URL } from './utils/constant.js'; export const coinAmountParser = (amount) => { if (amount.endsWith('ae')) return new BigNumber(amount.slice(0, -2)).shiftedBy(18); diff --git a/src/commands/account.js b/src/commands/account.js index de942266..b65c0e1a 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -3,7 +3,7 @@ // This script initialize all `account` commands // We'll use `commander` for parsing options import { Command } from 'commander'; -import * as Account from '../actions/account'; +import * as Account from '../actions/account.js'; import { nodeOption, jsonOption, @@ -13,7 +13,7 @@ import { passwordOption, ttlOption, networkIdOption, -} from '../arguments'; +} from '../arguments.js'; const program = new Command().name('aecli account'); diff --git a/src/commands/chain.js b/src/commands/chain.js index 7f00441e..4f85bbee 100755 --- a/src/commands/chain.js +++ b/src/commands/chain.js @@ -3,8 +3,8 @@ // This script initialize all `chain` command's // We'll use `commander` for parsing options import { Command } from 'commander'; -import * as Chain from '../actions/chain'; -import { nodeOption, jsonOption, forceOption } from '../arguments'; +import * as Chain from '../actions/chain.js'; +import { nodeOption, jsonOption, forceOption } from '../arguments.js'; const program = new Command().name('aecli chain'); diff --git a/src/commands/contract.js b/src/commands/contract.js index 682b2c26..b3f987e9 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -4,8 +4,8 @@ // We'll use `commander` for parsing options import { Argument, Option, Command } from 'commander'; import { MIN_GAS_PRICE } from '@aeternity/aepp-sdk'; -import CliError from '../utils/CliError'; -import * as Contract from '../actions/contract'; +import CliError from '../utils/CliError.js'; +import * as Contract from '../actions/contract.js'; import { nodeOption, compilerOption, @@ -16,7 +16,7 @@ import { passwordOption, ttlOption, networkIdOption, -} from '../arguments'; +} from '../arguments.js'; const callArgs = new Argument('[args]', 'JSON-encoded arguments array of contract call') .argParser((argsText) => { diff --git a/src/commands/inspect.js b/src/commands/inspect.js index 088e899d..f7543d5e 100644 --- a/src/commands/inspect.js +++ b/src/commands/inspect.js @@ -3,8 +3,8 @@ // This script initialize all `inspect` commands // We'll use `commander` for parsing options import { Command } from 'commander'; -import inspect from '../actions/inspect'; -import { nodeOption, jsonOption, forceOption } from '../arguments'; +import inspect from '../actions/inspect.js'; +import { nodeOption, jsonOption, forceOption } from '../arguments.js'; const program = new Command().name('aecli inspect'); diff --git a/src/commands/main.js b/src/commands/main.js index 49404953..aa730e5d 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -5,9 +5,9 @@ import { Command } from 'commander'; import prompts from 'prompts'; import { Node, CompilerCli, CompilerHttpNode } from '@aeternity/aepp-sdk'; -import { compilerOption, nodeOption } from '../arguments'; -import { addToConfig } from '../utils/config'; -import CliError from '../utils/CliError'; +import { compilerOption, nodeOption } from '../arguments.js'; +import { addToConfig } from '../utils/config.js'; +import CliError from '../utils/CliError.js'; const program = new Command(); diff --git a/src/commands/name.js b/src/commands/name.js index 0dee4026..10dac8b2 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -6,10 +6,10 @@ // Also we need `esm` package to handle `ES imports` import { Command } from 'commander'; import { NAME_TTL, CLIENT_TTL } from '@aeternity/aepp-sdk'; -import * as AENS from '../actions/aens'; +import * as AENS from '../actions/aens.js'; import { nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, networkIdOption, -} from '../arguments'; +} from '../arguments.js'; const program = new Command().name('aecli name'); diff --git a/src/commands/oracle.js b/src/commands/oracle.js index 967c900d..77952a3e 100644 --- a/src/commands/oracle.js +++ b/src/commands/oracle.js @@ -4,10 +4,10 @@ // We'll use `commander` for parsing options import { Command } from 'commander'; import { ORACLE_TTL, QUERY_TTL, RESPONSE_TTL } from '@aeternity/aepp-sdk'; -import * as Oracle from '../actions/oracle'; +import * as Oracle from '../actions/oracle.js'; import { nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, networkIdOption, -} from '../arguments'; +} from '../arguments.js'; const program = new Command().name('aecli oracle'); diff --git a/src/commands/tx.js b/src/commands/tx.js index 6d83dd50..6cffdcd5 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -8,7 +8,7 @@ import { Command } from 'commander'; import { NAME_TTL, CLIENT_TTL, MIN_GAS_PRICE, ORACLE_TTL, QUERY_TTL, RESPONSE_TTL, } from '@aeternity/aepp-sdk'; -import * as Transaction from '../actions/transaction'; +import * as Transaction from '../actions/transaction.js'; import { nodeOption, jsonOption, @@ -18,7 +18,7 @@ import { forceOption, ttlOption, networkIdOption, -} from '../arguments'; +} from '../arguments.js'; const program = new Command().name('aecli tx'); diff --git a/src/utils/CliError.js b/src/utils/CliError.js index 453b6985..5219be2c 100644 --- a/src/utils/CliError.js +++ b/src/utils/CliError.js @@ -1,5 +1,5 @@ import { InvalidPasswordError } from '@aeternity/aepp-sdk'; -import { setCommandOptions } from './config'; +import { setCommandOptions } from './config.js'; export default class CliError extends Error { constructor(message) { diff --git a/src/utils/account.js b/src/utils/account.js index 87a537d3..3419edac 100644 --- a/src/utils/account.js +++ b/src/utils/account.js @@ -4,9 +4,9 @@ import fs from 'fs-extra'; import { generateKeyPairFromSecret, getAddressFromPriv, dump, recover, encode, Encoding, } from '@aeternity/aepp-sdk'; -import { PROMPT_TYPE, prompt } from './prompt'; -import { getFullPath } from './helpers'; -import CliError from './CliError'; +import { PROMPT_TYPE, prompt } from './prompt.js'; +import { getFullPath } from './helpers.js'; +import CliError from './CliError.js'; export async function writeWallet(walletPath, secretKey, password, overwrite) { const path = getFullPath(walletPath); diff --git a/src/utils/cli.js b/src/utils/cli.js index 30b8f550..7f76bce8 100644 --- a/src/utils/cli.js +++ b/src/utils/cli.js @@ -3,7 +3,7 @@ import { AeSdk, Node, MemoryAccount, CompilerCli, CompilerHttpNode, } from '@aeternity/aepp-sdk'; -import { getWalletByPathAndDecrypt } from './account'; +import { getWalletByPathAndDecrypt } from './account.js'; export function initSdk({ url, keypair, compilerUrl, force: ignoreVersion, networkId, accounts = [], diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 60da8524..290e7ec6 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -3,7 +3,7 @@ import { resolve } from 'path'; import { Encoding, decode as _decode } from '@aeternity/aepp-sdk'; -import CliError from './CliError'; +import CliError from './CliError.js'; // ## Method which retrieve block info by hash // if it's `MICRO_BLOCK` call `getMicroBlockHeaderByHash` and `getMicroBlockTransactionsByHash` diff --git a/src/utils/print.js b/src/utils/print.js index 5289c29c..6648a4b5 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -1,7 +1,7 @@ // # Utils `print` Module // That script contains helper function for `console` print import { Encoding, unpackTx } from '@aeternity/aepp-sdk'; -import { decode } from './helpers'; +import { decode } from './helpers.js'; // ## Row width const WIDTH = 40; diff --git a/test/account.js b/test/account.js index 2c3931d8..879e125c 100644 --- a/test/account.js +++ b/test/account.js @@ -1,11 +1,11 @@ import fs from 'fs-extra'; import { before, describe, it } from 'mocha'; -import { expect, assert } from 'chai'; -import { stub } from 'sinon'; +import { expect } from 'chai'; +import prompts from 'prompts'; +import { resolve } from 'path'; import { generateKeyPair } from '@aeternity/aepp-sdk'; -import { getSdk, executeProgram, WALLET_NAME } from './index'; -import accountProgram from '../src/commands/account'; -import * as promptModule from '../src/utils/prompt'; +import { getSdk, executeProgram, WALLET_NAME } from './index.js'; +import accountProgram from '../src/commands/account.js'; const executeAccount = (args) => executeProgram(accountProgram, args); const walletName = 'test-artifacts/test-wallet.json'; @@ -24,10 +24,18 @@ describe('Account Module', () => { }); it('Create Wallet', async () => { - await executeAccount(['create', walletName, '--password', 'test', '--overwrite']); + const createRes = await executeAccount(['create', walletName, '--password', 'test']); expect(await fs.exists(walletName)).to.be.equal(true); - expect((await executeAccount(['address', walletName, '--password', 'test', '--json'])).publicKey) - .to.be.a('string'); + const resJson = await executeAccount(['address', walletName, '--password', 'test', '--json']); + expect(resJson.publicKey).to.be.a('string'); + expect(createRes).to.be.equal(` +Address _________________________________ ${resJson.publicKey} +Path ____________________________________ ${resolve(walletName)} + `.trim()); + const res = await executeAccount(['address', walletName, '--password', 'test']); + expect(res).to.be.equal(` +Address _________________________________ ${resJson.publicKey} + `.trim()); }); it('Create Wallet From Private Key', async () => { @@ -43,22 +51,25 @@ describe('Account Module', () => { }); it('Check Wallet Address with Private Key', async () => { - expect((await executeAccount(['address', walletName, '--password', 'test', '--privateKey', '--forcePrompt', '--json'])).secretKey) - .to.equal(keypair.secretKey); + const resJson = await executeAccount(['address', walletName, '--password', 'test', '--privateKey', '--forcePrompt', '--json']); + expect(resJson.secretKey).to.equal(keypair.secretKey); + const res = await executeAccount(['address', walletName, '--password', 'test', '--privateKey', '--forcePrompt']); + expect(res).to.be.equal(` +Address _________________________________ ${keypair.publicKey} +Secret Key ______________________________ ${keypair.secretKey} + `.trim()); }); it('asks for password if it not provided', async () => { - const stubbedPrompt = stub(promptModule, 'prompt'); - stubbedPrompt.throwsException(new Error('stubbed')); - await expect(executeAccount(['create', 'test-artifacts/test-wallet-1.json'])) - .to.be.eventually.rejectedWith('stubbed'); - assert(stubbedPrompt.alwaysCalledWith(promptModule.PROMPT_TYPE.askPassword)); - stubbedPrompt.restore(); + const walletPath = 'test-artifacts/test-wallet-1.json'; + prompts.inject(['test-password', 'test-password', 'y']); + const { publicKey } = await executeAccount(['create', walletPath, '--json']); + expect(await executeAccount(['address', walletPath, '--privateKey'])).to.include(publicKey); }); it('don\'t asks for password if it is empty', async () => { const name = 'test-artifacts/test-wallet-2.json'; - await executeAccount(['create', name, '--password', '', '--overwrite']); + await executeAccount(['create', name, '--password', '']); expect((await executeAccount(['address', name, '--password', '', '--json'])).publicKey) .to.be.a('string'); }); diff --git a/test/chain.js b/test/chain.js index 10f3e7eb..1d65c975 100644 --- a/test/chain.js +++ b/test/chain.js @@ -1,7 +1,7 @@ import { before, describe, it } from 'mocha'; import { expect } from 'chai'; -import { executeProgram, getSdk } from './index'; -import chainProgram from '../src/commands/chain'; +import { executeProgram, getSdk } from './index.js'; +import chainProgram from '../src/commands/chain.js'; const executeChain = (args) => executeProgram(chainProgram, args); diff --git a/test/contract.js b/test/contract.js index 583a1eb2..f4d886c7 100644 --- a/test/contract.js +++ b/test/contract.js @@ -4,9 +4,9 @@ import { } from 'mocha'; import { expect } from 'chai'; import { decode } from '@aeternity/aepp-sdk'; -import { executeProgram, getSdk, WALLET_NAME } from './index'; -import contractProgram from '../src/commands/contract'; -import CliError from '../src/utils/CliError'; +import { executeProgram, getSdk, WALLET_NAME } from './index.js'; +import contractProgram from '../src/commands/contract.js'; +import CliError from '../src/utils/CliError.js'; const executeContract = (args) => executeProgram(contractProgram, args); diff --git a/test/index.js b/test/index.js index 97bde983..5f2b3286 100644 --- a/test/index.js +++ b/test/index.js @@ -5,7 +5,7 @@ import mockFs from 'mock-fs'; import { AeSdk, MemoryAccount, Node, generateKeyPair, CompilerHttpNode, } from '@aeternity/aepp-sdk'; -import accountProgram from '../src/commands/account'; +import accountProgram from '../src/commands/account.js'; before(() => { mockFs({ diff --git a/test/inspect.js b/test/inspect.js index 9a454b1e..c0af8211 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -3,9 +3,9 @@ import { expect } from 'chai'; import { AbiVersion, generateKeyPair, Tag, VmVersion, } from '@aeternity/aepp-sdk'; -import { executeProgram, getSdk } from './index'; -import inspectProgram from '../src/commands/inspect'; -import chainProgram from '../src/commands/chain'; +import { executeProgram, getSdk } from './index.js'; +import inspectProgram from '../src/commands/inspect.js'; +import chainProgram from '../src/commands/chain.js'; const executeInspect = (args) => executeProgram(inspectProgram, args); const executeChain = (args) => executeProgram(chainProgram, args); diff --git a/test/name.js b/test/name.js index 8bafa692..fd83f2ed 100644 --- a/test/name.js +++ b/test/name.js @@ -3,10 +3,10 @@ import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { executeProgram, randomName, getSdk, WALLET_NAME, -} from './index'; -import nameProgram from '../src/commands/name'; -import inspectProgram from '../src/commands/inspect'; -import accountProgram from '../src/commands/account'; +} from './index.js'; +import nameProgram from '../src/commands/name.js'; +import inspectProgram from '../src/commands/inspect.js'; +import accountProgram from '../src/commands/account.js'; const executeName = (args) => executeProgram(nameProgram, args); const executeInspect = (args) => executeProgram(inspectProgram, args); diff --git a/test/oracle.js b/test/oracle.js index a83fa910..8d1282f4 100644 --- a/test/oracle.js +++ b/test/oracle.js @@ -1,8 +1,8 @@ import { AbiVersion, generateKeyPair } from '@aeternity/aepp-sdk'; import { before, describe, it } from 'mocha'; import { expect } from 'chai'; -import { executeProgram, getSdk, WALLET_NAME } from './index'; -import oracleProgram from '../src/commands/oracle'; +import { executeProgram, getSdk, WALLET_NAME } from './index.js'; +import oracleProgram from '../src/commands/oracle.js'; const executeOracle = (args) => executeProgram(oracleProgram, args); diff --git a/test/other.js b/test/other.js index 8264ebf1..6ffb44b1 100644 --- a/test/other.js +++ b/test/other.js @@ -1,7 +1,7 @@ import { describe, it } from 'mocha'; import { expect } from 'chai'; -import { executeProgram } from './index'; -import mainProgram from '../src/commands/main'; +import { executeProgram } from './index.js'; +import mainProgram from '../src/commands/main.js'; describe('Other tests', () => { it('Config', async () => { diff --git a/test/tx.js b/test/tx.js index 4087dd84..965f71c9 100644 --- a/test/tx.js +++ b/test/tx.js @@ -5,11 +5,11 @@ import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { executeProgram, randomName, getSdk, networkId, -} from './index'; -import txProgram from '../src/commands/tx'; -import accountProgram from '../src/commands/account'; -import chainProgram from '../src/commands/chain'; -import inspectProgram from '../src/commands/inspect'; +} from './index.js'; +import txProgram from '../src/commands/tx.js'; +import accountProgram from '../src/commands/account.js'; +import chainProgram from '../src/commands/chain.js'; +import inspectProgram from '../src/commands/inspect.js'; const executeTx = (args) => executeProgram(txProgram, args); @@ -35,7 +35,7 @@ describe('Transaction Module', () => { before(async () => { sdk = await getSdk(); await sdk.spend(1e24, TX_KEYS.publicKey); - await executeProgram(accountProgram, ['save', WALLET_NAME, '--password', 'test', TX_KEYS.secretKey, '--overwrite']); + await executeProgram(accountProgram, ['save', WALLET_NAME, '--password', 'test', TX_KEYS.secretKey]); }); it('builds tx', async () => { From f2b98bea137a46d757b7b609d24bc2bca7d8eff4 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 4 Apr 2024 17:43:18 +1000 Subject: [PATCH 27/88] chore: drop babel --- .github/workflows/main.yml | 2 +- babel.config.js | 14 - package-lock.json | 1756 +----------------------------------- package.json | 12 +- src/commands/main.js | 24 +- 5 files changed, 26 insertions(+), 1782 deletions(-) delete mode 100644 babel.config.js diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0daf534a..317aa4b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Test & build +name: Test on: push: branches: diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 9dcc77c7..00000000 --- a/babel.config.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - presets: [ - ['@babel/preset-env', { - modules: false, - targets: { node: 18 }, - }], - ], - plugins: [ - ['transform-inline-environment-variables', { - include: ['npm_package_name', 'npm_package_version'], - }], - ['add-import-extension', { extension: 'mjs' }], - ], -}; diff --git a/package-lock.json b/package-lock.json index 089b2cdb..f5f09658 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,17 +18,11 @@ "update-notifier": "^6.0.2" }, "bin": { - "aecli": "bin/aecli.mjs" + "aecli": "src/aecli.js" }, "devDependencies": { - "@babel/cli": "^7.21.0", - "@babel/core": "^7.21.3", - "@babel/preset-env": "^7.20.2", - "@babel/register": "^7.21.0", "@commitlint/cli": "^17.5.1", "@commitlint/config-conventional": "^17.4.4", - "babel-plugin-add-import-extension": "^1.6.0", - "babel-plugin-transform-inline-environment-variables": "^0.4.4", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", "eslint": "^8.37.0", @@ -40,7 +34,7 @@ "standard-version": "^9.5.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=18.19.0" } }, "node_modules/@aeternity/aepp-calldata": { @@ -223,44 +217,6 @@ "node": ">=12.0.0" } }, - "node_modules/@babel/cli": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.21.0.tgz", - "integrity": "sha512-xi7CxyS8XjSyiwUGCfwf+brtJxjW1/ZTcBUkP10xawIEXLX5HzLn+3aXkgxozcP2UhRhtKTmQurw9Uaes7jZrA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "commander": "^4.0.1", - "convert-source-map": "^1.1.0", - "fs-readdir-recursive": "^1.1.0", - "glob": "^7.2.0", - "make-dir": "^2.1.0", - "slash": "^2.0.0" - }, - "bin": { - "babel": "bin/babel.js", - "babel-external-helpers": "bin/babel-external-helpers.js" - }, - "engines": { - "node": ">=6.9.0" - }, - "optionalDependencies": { - "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", - "chokidar": "^3.4.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/cli/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/@babel/code-frame": { "version": "7.22.13", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", @@ -342,31 +298,6 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", - "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", - "dev": true, - "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", @@ -401,61 +332,6 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz", - "integrity": "sha512-Q8wNiMIdwsv5la5SPxNYzzkPnjgC0Sy0i7jLkVOCdllu/xcVNkr3TeZzbHBJrj+XXRqzX5uCyCoV9eu6xUG7KQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-member-expression-to-functions": "^7.21.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/helper-split-export-declaration": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.0.tgz", - "integrity": "sha512-N+LaFW/auRSWdx7SHD/HiARwXQju1vXTW4fKr4u5SgBUTm51OKEjKgj+cs00ggW3kEvNqwErnlwuq7Y3xBe4eg==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0-0" - } - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", @@ -465,18 +341,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", - "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-function-name": { "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", @@ -502,18 +366,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz", - "integrity": "sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.21.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", @@ -545,62 +397,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", - "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", - "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", - "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-wrap-function": "^7.18.9", - "@babel/types": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz", - "integrity": "sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.20.7", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-simple-access": { "version": "7.20.2", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", @@ -613,18 +409,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz", - "integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-split-export-declaration": { "version": "7.22.6", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", @@ -664,21 +448,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz", - "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.19.0", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.5", - "@babel/types": "^7.20.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helpers": { "version": "7.21.0", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", @@ -708,1137 +477,15 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", - "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz", - "integrity": "sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-proposal-optional-chaining": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz", - "integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz", - "integrity": "sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.21.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz", - "integrity": "sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", - "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", - "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz", - "integrity": "sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.21.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz", - "integrity": "sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz", - "integrity": "sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz", - "integrity": "sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", - "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz", - "integrity": "sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz", - "integrity": "sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz", - "integrity": "sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/template": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz", - "integrity": "sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", - "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", - "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", - "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", - "dev": true, - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz", - "integrity": "sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", - "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", - "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", - "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz", - "integrity": "sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz", - "integrity": "sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-simple-access": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz", - "integrity": "sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw==", - "dev": true, - "dependencies": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-identifier": "^7.19.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", - "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz", - "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.20.5", - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", - "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", - "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz", - "integrity": "sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", - "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz", - "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "regenerator-transform": "^0.15.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", - "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", - "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz", - "integrity": "sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", - "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", - "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", - "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", - "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", - "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", - "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.20.1", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.2", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.20.0", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@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-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.20.2", - "@babel/plugin-transform-classes": "^7.20.2", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.20.2", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.9", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", - "@babel/plugin-transform-function-name": "^7.18.9", - "@babel/plugin-transform-literals": "^7.18.9", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.19.6", - "@babel/plugin-transform-modules-commonjs": "^7.19.6", - "@babel/plugin-transform-modules-systemjs": "^7.19.6", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.20.1", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.19.0", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.9", - "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", - "@babel/plugin-transform-unicode-regex": "^7.18.6", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.20.2", - "babel-plugin-polyfill-corejs2": "^0.3.3", - "babel-plugin-polyfill-corejs3": "^0.6.0", - "babel-plugin-polyfill-regenerator": "^0.4.1", - "core-js-compat": "^3.25.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/register": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.21.0.tgz", - "integrity": "sha512-9nKsPmYDi5DidAqJaQooxIhsLJiNMkGr8ypQ8Uic7cIox7UCDsM7HuUGxdGT7mSDTYbqzIdsOWzfBton/YJrMw==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "find-cache-dir": "^2.0.0", - "make-dir": "^2.1.0", - "pirates": "^4.0.5", - "source-map-support": "^0.5.16" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", - "dev": true - }, - "node_modules/@babel/runtime": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", - "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, - "dependencies": { - "regenerator-runtime": "^0.13.11" + "bin": { + "parser": "bin/babel-parser.js" }, "engines": { - "node": ">=6.9.0" + "node": ">=6.0.0" } }, "node_modules/@babel/runtime-corejs3": { @@ -2788,13 +1435,6 @@ "node": ">=10" } }, - "node_modules/@nicolo-ribaudo/chokidar-2": { - "version": "2.1.8-no-fsevents.3", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", - "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", - "dev": true, - "optional": true - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3338,63 +1978,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-plugin-add-import-extension": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-add-import-extension/-/babel-plugin-add-import-extension-1.6.0.tgz", - "integrity": "sha512-JVSQPMzNzN/S4wPRoKQ7+u8PlkV//BPUMnfWVbr63zcE+6yHdU2Mblz10Vf7qe+6Rmu4svF5jG7JxdcPi9VvKg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", - "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3", - "core-js-compat": "^3.25.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", - "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-transform-inline-environment-variables": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-environment-variables/-/babel-plugin-transform-inline-environment-variables-0.4.4.tgz", - "integrity": "sha512-bJILBtn5a11SmtR2j/3mBOjX4K3weC6cq+NNZ7hG22wCAqpc3qtj/iN7dSe9HDiS46lgp1nHsQgeYrea/RUe+g==", - "dev": true - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3937,20 +2520,6 @@ "node": ">=12" } }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -4495,19 +3064,6 @@ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, - "node_modules/core-js-compat": { - "version": "3.29.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.29.0.tgz", - "integrity": "sha512-ScMn3uZNAFhK2DGoEfErguoiAHhV2Ju+oJo/jK08p7B3f3UhocUrCCkTvnZaiS+edl5nlIoiBXKcwMc6elv4KQ==", - "dev": true, - "dependencies": { - "browserslist": "^4.21.5" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, "node_modules/core-js-pure": { "version": "3.29.0", "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.29.0.tgz", @@ -5663,20 +4219,6 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -5824,12 +4366,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, - "node_modules/fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -6845,18 +5381,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -7016,15 +5540,6 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -7423,12 +5938,6 @@ "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "dev": true }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true - }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -7620,28 +6129,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, - "node_modules/make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -8772,97 +7259,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -9175,38 +7571,11 @@ "node": ">=8" } }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "node_modules/regenerate-unicode-properties": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", - "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", - "dev": true, - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, - "node_modules/regenerator-transform": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", - "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, "node_modules/regexp.prototype.flags": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", @@ -9224,23 +7593,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpu-core": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.1.tgz", - "integrity": "sha512-nCOzW2V/X15XpLsK2rlgdwrysrBq+AauCn+omItIz4R1pIcmeot5zvjdmOBRLzEH/CkC6IxMJVmxDe3QcMuNVQ==", - "dev": true, - "dependencies": { - "@babel/regjsgen": "^0.8.0", - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsparser": "^0.9.1", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/registry-auth-token": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz", @@ -9266,27 +7618,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", - "dev": true, - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, "node_modules/release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", @@ -9547,18 +7878,6 @@ "sha.js": "bin.js" } }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -9652,15 +7971,6 @@ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, - "node_modules/slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -9670,16 +7980,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/spawn-wrap": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", @@ -10303,46 +8603,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", - "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/unique-string": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", diff --git a/package.json b/package.json index ca18382d..bb543726 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "5.0.0", "description": "Aeternity command line interface", "bin": { - "aecli": "bin/aecli.mjs" + "aecli": "src/aecli.js" }, "type": "module", "dependencies": { @@ -16,14 +16,8 @@ "update-notifier": "^6.0.2" }, "devDependencies": { - "@babel/cli": "^7.21.0", - "@babel/core": "^7.21.3", - "@babel/preset-env": "^7.20.2", - "@babel/register": "^7.21.0", "@commitlint/cli": "^17.5.1", "@commitlint/config-conventional": "^17.4.4", - "babel-plugin-add-import-extension": "^1.6.0", - "babel-plugin-transform-inline-environment-variables": "^0.4.4", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", "eslint": "^8.37.0", @@ -39,14 +33,12 @@ "url": "https://github.com/aeternity/aepp-cli-js" }, "scripts": { - "build": "babel src --out-dir bin --out-file-extension .mjs", "docs": "scripts/js-to-md.js src/*.js src/commands/*.js src/actions/*.js src/utils/*.js", "commitlint": "commitlint --from develop", "lint": "eslint .", "test": "mocha", "test:watch": "mocha --watch", "release": "standard-version --skip.tag", - "prepare": "npm run build", "prepublishOnly": "npm run docs" }, "keywords": [ @@ -59,7 +51,7 @@ "node": ">=18.19.0" }, "files": [ - "bin" + "src" ], "contributors": [ "Nazar Duchak ", diff --git a/src/commands/main.js b/src/commands/main.js index aa730e5d..3a2ad809 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -4,6 +4,10 @@ // We'll use `commander` for parsing options import { Command } from 'commander'; import prompts from 'prompts'; +import fs from 'fs-extra'; +import { fileURLToPath } from 'url'; +import { resolve } from 'path'; +import updateNotifier from 'update-notifier'; import { Node, CompilerCli, CompilerHttpNode } from '@aeternity/aepp-sdk'; import { compilerOption, nodeOption } from '../arguments.js'; import { addToConfig } from '../utils/config.js'; @@ -21,15 +25,17 @@ const EXECUTABLE_CMD = [ { name: 'tx', desc: 'Transaction builder' }, { name: 'oracle', desc: 'Interact with oracles' }, ]; -// You get get CLI version by exec `aecli version` -program.version(process.env.npm_package_version); - -// TODO: switch to usual import after dropping CJS in tests -import('update-notifier').then(({ default: updateNotifier }) => { - updateNotifier({ - pkg: { name: process.env.npm_package_name, version: process.env.npm_package_version }, - }).notify(); -}); + +(() => { + const { name, version } = fs.readJSONSync( + resolve(fileURLToPath(import.meta.url), '../../../package.json'), + ); + + // You get get CLI version by exec `aecli version` + program.version(version); + + updateNotifier({ pkg: { name, version } }).notify(); +})(); // ## Initialize `child` command's EXECUTABLE_CMD.forEach(({ name, desc }) => program.command(name, desc)); From 5f53d954a62e0b69dd61e9202e304817439efe6c Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 4 Apr 2024 18:35:45 +1000 Subject: [PATCH 28/88] chore(deps): update --- docker-compose.yml | 2 +- package-lock.json | 1809 +++++++++++++++++++++----------------------- package.json | 22 +- test/contract.js | 8 +- test/oracle.js | 2 +- 5 files changed, 889 insertions(+), 954 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ff72b26b..2a49c402 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: stop_grace_period: 0s compiler: - image: aeternity/aesophia_http:v7.3.0 + image: aeternity/aesophia_http:v7.4.0 ports: [3080:3080] # TODO: remove after releasing https://github.com/aeternity/aesophia_http/pull/133 healthcheck: diff --git a/package-lock.json b/package-lock.json index f5f09658..69866e05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,38 +9,47 @@ "version": "5.0.0", "license": "ISC", "dependencies": { - "@aeternity/aepp-sdk": "^13.0.0", - "bignumber.js": "^9.1.1", - "commander": "^10.0.0", - "env-paths": "^2.2.1", - "fs-extra": "^11.1.1", + "@aeternity/aepp-sdk": "^13.2.2", + "bignumber.js": "^9.1.2", + "commander": "^12.0.0", + "env-paths": "^3.0.0", + "fs-extra": "^11.2.0", "prompts": "^2.4.2", - "update-notifier": "^6.0.2" + "update-notifier": "^7.0.0" }, "bin": { "aecli": "src/aecli.js" }, "devDependencies": { - "@commitlint/cli": "^17.5.1", - "@commitlint/config-conventional": "^17.4.4", + "@commitlint/cli": "^19.2.1", + "@commitlint/config-conventional": "^19.1.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.37.0", + "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", - "mocha": "^10.2.0", + "mocha": "^10.4.0", "mock-fs": "^5.2.0", "nyc": "^15.1.0", - "sinon": "^15.0.3", + "sinon": "^17.0.1", "standard-version": "^9.5.0" }, "engines": { "node": ">=18.19.0" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@aeternity/aepp-calldata": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@aeternity/aepp-calldata/-/aepp-calldata-1.4.0.tgz", - "integrity": "sha512-hDhLALqIaoFp20jXK2SBgUqfEkqlBDXdThdnGw47C0EQdNjaawb0vUeHnB4Y7cWXFKHaH5qkJwL2bYmmXg3AtA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-calldata/-/aepp-calldata-1.7.0.tgz", + "integrity": "sha512-SxxJI+Z/FcxMNRtxmGWSRzrbRwsLI9fGKNdSWKevxa+QWVVOPF9o8XogCbM5FaW+u15P+O0dSvJWZCuJLQ7S9Q==", "dependencies": { "blakejs": "^1.2.1", "bs58": "^5.0.0", @@ -50,31 +59,34 @@ } }, "node_modules/@aeternity/aepp-sdk": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-13.0.0.tgz", - "integrity": "sha512-OV8vj/rMwrqkNElRBds+61kk/tbhDYRjB/9B5Dr3cO25DetXuGq0+BqoX4aQohqwIegIdbQCEUIh1HObqJWZ6g==", + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-13.2.2.tgz", + "integrity": "sha512-hTpAV4E8I0Y/IfjizsHlpzPN3gW4Bkr08GVqmRcGUh5yi7MQA9N54kbTfl+kQlcp6AYC9WVk3fhNuoTUOzISig==", "dependencies": { - "@aeternity/aepp-calldata": "^1.4.0", + "@aeternity/aepp-calldata": "^1.5.1", "@aeternity/argon2": "^0.0.1", "@aeternity/uuid": "^0.0.1", "@azure/core-client": "1.6.0", - "@azure/core-rest-pipeline": "^1.10.1", - "@babel/runtime-corejs3": "^7.21.0", - "@ledgerhq/hw-transport": "^6.28.1", + "@azure/core-rest-pipeline": "^1.11.0", + "@babel/runtime-corejs3": "^7.22.6", + "@ledgerhq/hw-transport": "^6.28.6", "@types/aes-js": "^3.1.1", "@types/json-bigint": "^1.0.1", "@types/node": "~18.11.9", - "@types/sha.js": "^2.4.0", - "@types/uuid": "^9.0.1", - "@types/webextension-polyfill": "^0.10.0", + "@types/sha.js": "^2.4.1", + "@types/uuid": "^9.0.2", + "@types/webextension-polyfill": "^0.10.1", "@types/websocket": "^1.0.5", + "@types/ws": "^8.5.5", "aes-js": "^3.1.2", "bignumber.js": "^9.1.1", "bip32-path": "^0.4.2", "blakejs": "^1.2.1", "bs58": "^5.0.0", "buffer": "^6.0.3", + "canonicalize": "^2.0.0", "events": "^3.3.0", + "isomorphic-ws": "^5.0.0", "json-bigint": "^1.0.0", "process": "^0.11.10", "rlp": "^3.0.0", @@ -82,7 +94,8 @@ "tweetnacl": "^1.0.3", "tweetnacl-auth": "^1.0.1", "varuint-bitcoin": "^1.1.2", - "websocket": "^1.0.34" + "websocket": "^1.0.34", + "ws": "^8.13.0" }, "engines": { "node": ">=14.19.0" @@ -164,23 +177,55 @@ } }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.10.1.tgz", - "integrity": "sha512-Kji9k6TOFRDB5ZMTw8qUf2IJ+CeJtsuMdAHox9eqpTf1cefiNMpzrfnF6sINEBZJsaVaWgQ0o48B6kcUH68niA==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.15.1.tgz", + "integrity": "sha512-ZxS6i3eHxh86u+1eWZJiYywoN2vxvsSoAUx60Mny8cZ4nTwvt7UzVVBJO+m2PW2KIJfNiXMt59xBa59htOWL4g==", "dependencies": { - "@azure/abort-controller": "^1.0.0", + "@azure/abort-controller": "^2.0.0", "@azure/core-auth": "^1.4.0", "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.0.0", + "@azure/core-util": "^1.3.0", "@azure/logger": "^1.0.0", - "form-data": "^4.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "tslib": "^2.2.0", - "uuid": "^8.3.0" + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.1.tgz", + "integrity": "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-rest-pipeline/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@azure/core-rest-pipeline/node_modules/https-proxy-agent": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" } }, "node_modules/@azure/core-tracing": { @@ -195,15 +240,26 @@ } }, "node_modules/@azure/core-util": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.1.1.tgz", - "integrity": "sha512-A4TBYVQCtHOigFb2ETiiKFDocBoI1Zk2Ui1KpI42aJSIDexF7DHQFpnjonltXAIU/ceH+1fsZAWWgvX6/AKzog==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.8.1.tgz", + "integrity": "sha512-L3voj0StUdJ+YKomvwnTv7gHzguJO+a6h30pmmZdRprJCM+RJlGMPxzuh4R7lhQu1jNmEtaHX5wvTgWLDAmbGQ==", "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" + "@azure/abort-controller": "^2.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-util/node_modules/@azure/abort-controller": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.1.tgz", + "integrity": "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@azure/logger": { @@ -489,12 +545,12 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.21.0.tgz", - "integrity": "sha512-TDD4UJzos3JJtM+tHX+w2Uc+KWj7GV+VKKFdMVd2Rx8sdA19hcc3P3AHFYd5LVOw+pYuSd5lICC3gm52B6Rwxw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.4.tgz", + "integrity": "sha512-VOQOexSilscN24VEY810G/PqtpFvx/z6UqDIjIWbDe2368HhDLkYN5TYwaEz/+eRCUkhJ2WaNLLmQAlxzfWj4w==", "dependencies": { - "core-js-pure": "^3.25.1", - "regenerator-runtime": "^0.13.11" + "core-js-pure": "^3.30.2", + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" @@ -550,61 +606,59 @@ } }, "node_modules/@commitlint/cli": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.5.1.tgz", - "integrity": "sha512-pRRgGSzdHQHehxZbGA3qF6wVPyl+EEQgTe/t321rtMLFbuJ7nRj2waS17s/v5oEbyZtiY5S8PGB6XtEIm0I+Sg==", - "dev": true, - "dependencies": { - "@commitlint/format": "^17.4.4", - "@commitlint/lint": "^17.4.4", - "@commitlint/load": "^17.5.0", - "@commitlint/read": "^17.5.1", - "@commitlint/types": "^17.4.4", - "execa": "^5.0.0", - "lodash.isfunction": "^3.0.9", - "resolve-from": "5.0.0", - "resolve-global": "1.0.0", + "version": "19.2.1", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.2.1.tgz", + "integrity": "sha512-cbkYUJsLqRomccNxvoJTyv5yn0bSy05BBizVyIcLACkRbVUqYorC351Diw/XFSWC/GtpwiwT2eOvQgFZa374bg==", + "dev": true, + "dependencies": { + "@commitlint/format": "^19.0.3", + "@commitlint/lint": "^19.1.0", + "@commitlint/load": "^19.2.0", + "@commitlint/read": "^19.2.1", + "@commitlint/types": "^19.0.3", + "execa": "^8.0.1", "yargs": "^17.0.0" }, "bin": { "commitlint": "cli.js" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/config-conventional": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.4.4.tgz", - "integrity": "sha512-u6ztvxqzi6NuhrcEDR7a+z0yrh11elY66nRrQIpqsqW6sZmpxYkDLtpRH8jRML+mmxYQ8s4qqF06Q/IQx5aJeQ==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.1.0.tgz", + "integrity": "sha512-KIKD2xrp6Uuk+dcZVj3++MlzIr/Su6zLE8crEDQCZNvWHNQSeeGbzOlNtsR32TUy6H3JbP7nWgduAHCaiGQ6EA==", "dev": true, "dependencies": { - "conventional-changelog-conventionalcommits": "^5.0.0" + "@commitlint/types": "^19.0.3", + "conventional-changelog-conventionalcommits": "^7.0.2" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/config-validator": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.4.4.tgz", - "integrity": "sha512-bi0+TstqMiqoBAQDvdEP4AFh0GaKyLFlPPEObgI29utoKEYoPQTvF0EYqIwYYLEoJYhj5GfMIhPHJkTJhagfeg==", + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-19.0.3.tgz", + "integrity": "sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==", "dev": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^19.0.3", "ajv": "^8.11.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/ensure": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-17.4.4.tgz", - "integrity": "sha512-AHsFCNh8hbhJiuZ2qHv/m59W/GRE9UeOXbkOqxYMNNg9pJ7qELnFcwj5oYpa6vzTSHtPGKf3C2yUFNy1GGHq6g==", + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-19.0.3.tgz", + "integrity": "sha512-SZEpa/VvBLoT+EFZVb91YWbmaZ/9rPH3ESrINOl0HD2kMYsjvl0tF7nMHh0EpTcv4+gTtZBAe1y/SS6/OhfZzQ==", "dev": true, "dependencies": { - "@commitlint/types": "^17.4.4", + "@commitlint/types": "^19.0.3", "lodash.camelcase": "^4.3.0", "lodash.kebabcase": "^4.1.1", "lodash.snakecase": "^4.1.1", @@ -612,434 +666,443 @@ "lodash.upperfirst": "^4.3.1" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/execute-rule": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.4.0.tgz", - "integrity": "sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-19.0.0.tgz", + "integrity": "sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw==", "dev": true, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/format": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-17.4.4.tgz", - "integrity": "sha512-+IS7vpC4Gd/x+uyQPTAt3hXs5NxnkqAZ3aqrHd5Bx/R9skyCAWusNlNbw3InDbAK6j166D9asQM8fnmYIa+CXQ==", + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-19.0.3.tgz", + "integrity": "sha512-QjjyGyoiVWzx1f5xOteKHNLFyhyweVifMgopozSgx1fGNrGV8+wp7k6n1t6StHdJ6maQJ+UUtO2TcEiBFRyR6Q==", "dev": true, "dependencies": { - "@commitlint/types": "^17.4.4", - "chalk": "^4.1.0" + "@commitlint/types": "^19.0.3", + "chalk": "^5.3.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, - "node_modules/@commitlint/format/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@commitlint/format/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@commitlint/format/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/@commitlint/is-ignored": { + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-19.0.3.tgz", + "integrity": "sha512-MqDrxJaRSVSzCbPsV6iOKG/Lt52Y+PVwFVexqImmYYFhe51iVJjK2hRhOG2jUAGiUHk4jpdFr0cZPzcBkSzXDQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@commitlint/types": "^19.0.3", + "semver": "^7.6.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=v18" } }, - "node_modules/@commitlint/format/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/@commitlint/is-ignored/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=7.0.0" + "node": ">=10" } }, - "node_modules/@commitlint/format/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@commitlint/format/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/@commitlint/lint": { + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.1.0.tgz", + "integrity": "sha512-ESjaBmL/9cxm+eePyEr6SFlBUIYlYpI80n+Ltm7IA3MAcrmiP05UMhJdAD66sO8jvo8O4xdGn/1Mt2G5VzfZKw==", "dev": true, + "dependencies": { + "@commitlint/is-ignored": "^19.0.3", + "@commitlint/parse": "^19.0.3", + "@commitlint/rules": "^19.0.3", + "@commitlint/types": "^19.0.3" + }, "engines": { - "node": ">=8" + "node": ">=v18" } }, - "node_modules/@commitlint/format/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" + "node_modules/@commitlint/load": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-19.2.0.tgz", + "integrity": "sha512-XvxxLJTKqZojCxaBQ7u92qQLFMMZc4+p9qrIq/9kJDy8DOrEa7P1yx7Tjdc2u2JxIalqT4KOGraVgCE7eCYJyQ==", + "dev": true, + "dependencies": { + "@commitlint/config-validator": "^19.0.3", + "@commitlint/execute-rule": "^19.0.0", + "@commitlint/resolve-extends": "^19.1.0", + "@commitlint/types": "^19.0.3", + "chalk": "^5.3.0", + "cosmiconfig": "^9.0.0", + "cosmiconfig-typescript-loader": "^5.0.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "lodash.uniq": "^4.5.0" }, "engines": { - "node": ">=8" + "node": ">=v18" } }, - "node_modules/@commitlint/is-ignored": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.4.4.tgz", - "integrity": "sha512-Y3eo1SFJ2JQDik4rWkBC4tlRIxlXEFrRWxcyrzb1PUT2k3kZ/XGNuCDfk/u0bU2/yS0tOA/mTjFsV+C4qyACHw==", + "node_modules/@commitlint/load/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "dependencies": { - "@commitlint/types": "^17.4.4", - "semver": "7.3.8" + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@commitlint/message": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-19.0.0.tgz", + "integrity": "sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw==", + "dev": true, "engines": { - "node": ">=v14" + "node": ">=v18" } }, - "node_modules/@commitlint/is-ignored/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "node_modules/@commitlint/parse": { + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-19.0.3.tgz", + "integrity": "sha512-Il+tNyOb8VDxN3P6XoBBwWJtKKGzHlitEuXA5BP6ir/3loWlsSqDr5aecl6hZcC/spjq4pHqNh0qPlfeWu38QA==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "@commitlint/types": "^19.0.3", + "conventional-changelog-angular": "^7.0.0", + "conventional-commits-parser": "^5.0.0" }, "engines": { - "node": ">=10" + "node": ">=v18" } }, - "node_modules/@commitlint/lint": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-17.4.4.tgz", - "integrity": "sha512-qgkCRRFjyhbMDWsti/5jRYVJkgYZj4r+ZmweZObnbYqPUl5UKLWMf9a/ZZisOI4JfiPmRktYRZ2JmqlSvg+ccw==", + "node_modules/@commitlint/parse/node_modules/conventional-changelog-angular": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", + "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", "dev": true, "dependencies": { - "@commitlint/is-ignored": "^17.4.4", - "@commitlint/parse": "^17.4.4", - "@commitlint/rules": "^17.4.4", - "@commitlint/types": "^17.4.4" + "compare-func": "^2.0.0" }, "engines": { - "node": ">=v14" + "node": ">=16" } }, - "node_modules/@commitlint/load": { - "version": "17.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-17.5.0.tgz", - "integrity": "sha512-l+4W8Sx4CD5rYFsrhHH8HP01/8jEP7kKf33Xlx2Uk2out/UKoKPYMOIRcDH5ppT8UXLMV+x6Wm5osdRKKgaD1Q==", + "node_modules/@commitlint/parse/node_modules/conventional-commits-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", + "integrity": "sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==", "dev": true, "dependencies": { - "@commitlint/config-validator": "^17.4.4", - "@commitlint/execute-rule": "^17.4.0", - "@commitlint/resolve-extends": "^17.4.4", - "@commitlint/types": "^17.4.4", - "@types/node": "*", - "chalk": "^4.1.0", - "cosmiconfig": "^8.0.0", - "cosmiconfig-typescript-loader": "^4.0.0", - "lodash.isplainobject": "^4.0.6", - "lodash.merge": "^4.6.2", - "lodash.uniq": "^4.5.0", - "resolve-from": "^5.0.0", - "ts-node": "^10.8.1", - "typescript": "^4.6.4 || ^5.0.0" + "is-text-path": "^2.0.0", + "JSONStream": "^1.3.5", + "meow": "^12.0.1", + "split2": "^4.0.0" + }, + "bin": { + "conventional-commits-parser": "cli.mjs" }, "engines": { - "node": ">=v14" + "node": ">=16" } }, - "node_modules/@commitlint/load/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@commitlint/parse/node_modules/is-text-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", + "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "text-extensions": "^2.0.0" }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@commitlint/load/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/@commitlint/parse/node_modules/meow": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", + "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": ">=16.10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@commitlint/load/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/@commitlint/parse/node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, "engines": { - "node": ">=7.0.0" + "node": ">= 10.x" } }, - "node_modules/@commitlint/load/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@commitlint/load/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/@commitlint/parse/node_modules/text-extensions": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", + "integrity": "sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@commitlint/load/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/@commitlint/read": { + "version": "19.2.1", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-19.2.1.tgz", + "integrity": "sha512-qETc4+PL0EUv7Q36lJbPG+NJiBOGg7SSC7B5BsPWOmei+Dyif80ErfWQ0qXoW9oCh7GTpTNRoaVhiI8RbhuaNw==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "@commitlint/top-level": "^19.0.0", + "@commitlint/types": "^19.0.3", + "execa": "^8.0.1", + "git-raw-commits": "^4.0.0", + "minimist": "^1.2.8" }, "engines": { - "node": ">=8" + "node": ">=v18" } }, - "node_modules/@commitlint/message": { - "version": "17.4.2", - "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.4.2.tgz", - "integrity": "sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q==", + "node_modules/@commitlint/read/node_modules/dargs": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz", + "integrity": "sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==", "dev": true, "engines": { - "node": ">=v14" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@commitlint/parse": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-17.4.4.tgz", - "integrity": "sha512-EKzz4f49d3/OU0Fplog7nwz/lAfXMaDxtriidyGF9PtR+SRbgv4FhsfF310tKxs6EPj8Y+aWWuX3beN5s+yqGg==", + "node_modules/@commitlint/read/node_modules/git-raw-commits": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-4.0.0.tgz", + "integrity": "sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==", "dev": true, "dependencies": { - "@commitlint/types": "^17.4.4", - "conventional-changelog-angular": "^5.0.11", - "conventional-commits-parser": "^3.2.2" + "dargs": "^8.0.0", + "meow": "^12.0.1", + "split2": "^4.0.0" + }, + "bin": { + "git-raw-commits": "cli.mjs" }, "engines": { - "node": ">=v14" + "node": ">=16" } }, - "node_modules/@commitlint/read": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-17.5.1.tgz", - "integrity": "sha512-7IhfvEvB//p9aYW09YVclHbdf1u7g7QhxeYW9ZHSO8Huzp8Rz7m05aCO1mFG7G8M+7yfFnXB5xOmG18brqQIBg==", + "node_modules/@commitlint/read/node_modules/meow": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", + "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", "dev": true, - "dependencies": { - "@commitlint/top-level": "^17.4.0", - "@commitlint/types": "^17.4.4", - "fs-extra": "^11.0.0", - "git-raw-commits": "^2.0.11", - "minimist": "^1.2.6" + "engines": { + "node": ">=16.10" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@commitlint/read/node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, "engines": { - "node": ">=v14" + "node": ">= 10.x" } }, "node_modules/@commitlint/resolve-extends": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.4.4.tgz", - "integrity": "sha512-znXr1S0Rr8adInptHw0JeLgumS11lWbk5xAWFVno+HUFVN45875kUtqjrI6AppmD3JI+4s0uZlqqlkepjJd99A==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-19.1.0.tgz", + "integrity": "sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==", "dev": true, "dependencies": { - "@commitlint/config-validator": "^17.4.4", - "@commitlint/types": "^17.4.4", - "import-fresh": "^3.0.0", + "@commitlint/config-validator": "^19.0.3", + "@commitlint/types": "^19.0.3", + "global-directory": "^4.0.1", + "import-meta-resolve": "^4.0.0", "lodash.mergewith": "^4.6.2", - "resolve-from": "^5.0.0", - "resolve-global": "^1.0.0" + "resolve-from": "^5.0.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/rules": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-17.4.4.tgz", - "integrity": "sha512-0tgvXnHi/mVcyR8Y8mjTFZIa/FEQXA4uEutXS/imH2v1UNkYDSEMsK/68wiXRpfW1euSgEdwRkvE1z23+yhNrQ==", + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.0.3.tgz", + "integrity": "sha512-TspKb9VB6svklxNCKKwxhELn7qhtY1rFF8ls58DcFd0F97XoG07xugPjjbVnLqmMkRjZDbDIwBKt9bddOfLaPw==", "dev": true, "dependencies": { - "@commitlint/ensure": "^17.4.4", - "@commitlint/message": "^17.4.2", - "@commitlint/to-lines": "^17.4.0", - "@commitlint/types": "^17.4.4", - "execa": "^5.0.0" + "@commitlint/ensure": "^19.0.3", + "@commitlint/message": "^19.0.0", + "@commitlint/to-lines": "^19.0.0", + "@commitlint/types": "^19.0.3", + "execa": "^8.0.1" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/to-lines": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-17.4.0.tgz", - "integrity": "sha512-LcIy/6ZZolsfwDUWfN1mJ+co09soSuNASfKEU5sCmgFCvX5iHwRYLiIuoqXzOVDYOy7E7IcHilr/KS0e5T+0Hg==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-19.0.0.tgz", + "integrity": "sha512-vkxWo+VQU5wFhiP9Ub9Sre0FYe019JxFikrALVoD5UGa8/t3yOJEpEhxC5xKiENKKhUkTpEItMTRAjHw2SCpZw==", "dev": true, "engines": { - "node": ">=v14" + "node": ">=v18" } }, "node_modules/@commitlint/top-level": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-17.4.0.tgz", - "integrity": "sha512-/1loE/g+dTTQgHnjoCy0AexKAEFyHsR2zRB4NWrZ6lZSMIxAhBJnmCqwao7b4H8888PsfoTBCLBYIw8vGnej8g==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-19.0.0.tgz", + "integrity": "sha512-KKjShd6u1aMGNkCkaX4aG1jOGdn7f8ZI8TR1VEuNqUOjWTOdcDSsmglinglJ18JTjuBX5I1PtjrhQCRcixRVFQ==", "dev": true, "dependencies": { - "find-up": "^5.0.0" + "find-up": "^7.0.0" }, "engines": { - "node": ">=v14" + "node": ">=v18" } }, - "node_modules/@commitlint/types": { - "version": "17.4.4", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.4.4.tgz", - "integrity": "sha512-amRN8tRLYOsxRr6mTnGGGvB5EmW/4DDjLMgiwK3CCVEmN6Sr/6xePGEpWaspKkckILuUORCwe6VfDBw6uj4axQ==", + "node_modules/@commitlint/top-level/node_modules/find-up": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz", + "integrity": "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==", "dev": true, "dependencies": { - "chalk": "^4.1.0" + "locate-path": "^7.2.0", + "path-exists": "^5.0.0", + "unicorn-magic": "^0.1.0" }, "engines": { - "node": ">=v14" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@commitlint/types/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@commitlint/top-level/node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "p-locate": "^6.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@commitlint/types/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/@commitlint/top-level/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "yocto-queue": "^1.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@commitlint/types/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/@commitlint/top-level/node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "p-limit": "^4.0.0" }, "engines": { - "node": ">=7.0.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@commitlint/types/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@commitlint/types/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/@commitlint/top-level/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", "dev": true, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/@commitlint/types/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/@commitlint/top-level/node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "node_modules/@commitlint/types": { + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.0.3.tgz", + "integrity": "sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" + "@types/conventional-commits-parser": "^5.0.0", + "chalk": "^5.3.0" }, "engines": { - "node": ">=12" + "node": ">=v18" } }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "node_modules/@commitlint/types/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/@eslint-community/eslint-utils": { @@ -1058,23 +1121,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", - "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -1106,9 +1169,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1139,22 +1202,22 @@ } }, "node_modules/@eslint/js": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz", - "integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -1175,9 +1238,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "node_modules/@hutson/parse-repository-url": { @@ -1336,20 +1399,20 @@ } }, "node_modules/@ledgerhq/devices": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-8.0.0.tgz", - "integrity": "sha512-gSnRT0KPca+LIpaC6D/WZQjOAlSI5uCvK1dmxXtKhODLAj735rX5Z3SnGnLUavRCHNbUi44FzgvloF5BKTkh7A==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-8.2.2.tgz", + "integrity": "sha512-SKahGA4p0mZ3ovypOJ2wa5mUvUkArE3HBrwWKYf+cRs+t/Licp3OJfhj+DHIxP3AfyH2xR6CFFWECYHeKwGsDQ==", "dependencies": { - "@ledgerhq/errors": "^6.12.3", - "@ledgerhq/logs": "^6.10.1", - "rxjs": "6", + "@ledgerhq/errors": "^6.16.3", + "@ledgerhq/logs": "^6.12.0", + "rxjs": "^7.8.1", "semver": "^7.3.5" } }, "node_modules/@ledgerhq/devices/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -1361,24 +1424,25 @@ } }, "node_modules/@ledgerhq/errors": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.12.3.tgz", - "integrity": "sha512-djiMSgB/7hnK3aLR/c5ZMMivxjcI7o2+y3VKcsZZpydPoVf9+FXqeJPRfOwmJ0JxbQ//LinUfWpIfHew8LkaVw==" + "version": "6.16.3", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.16.3.tgz", + "integrity": "sha512-3w7/SJVXOPa9mpzyll7VKoKnGwDD3BzWgN1Nom8byR40DiQvOKjHX+kKQausCedTHVNBn9euzPCNsftZ9+mxfw==" }, "node_modules/@ledgerhq/hw-transport": { - "version": "6.28.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.28.1.tgz", - "integrity": "sha512-RaZe+abn0zBIz82cE9tp7Y7aZkHWWbEaE2yJpfxT8AhFz3fx+BU0kLYzuRN9fmA7vKueNJ1MTVUCY+Ex9/CHSQ==", + "version": "6.30.5", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.30.5.tgz", + "integrity": "sha512-JMl//7BgPBvWxrWyMu82jj6JEYtsQyOyhYtonWNgtxn6KUZWht3gU4gxmLpeIRr+DiS7e50mW7m3GA+EudZmmA==", "dependencies": { - "@ledgerhq/devices": "^8.0.0", - "@ledgerhq/errors": "^6.12.3", + "@ledgerhq/devices": "^8.2.2", + "@ledgerhq/errors": "^6.16.3", + "@ledgerhq/logs": "^6.12.0", "events": "^3.3.0" } }, "node_modules/@ledgerhq/logs": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.1.tgz", - "integrity": "sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w==" + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.12.0.tgz", + "integrity": "sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==" }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.10", @@ -1531,21 +1595,12 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz", - "integrity": "sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^2.0.0" - } - }, - "node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", + "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", "dev": true, "dependencies": { - "type-detect": "4.0.8" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@sinonjs/samsam": { @@ -1585,43 +1640,20 @@ "node": ">=14.16" } }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "dev": true - }, "node_modules/@types/aes-js": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@types/aes-js/-/aes-js-3.1.1.tgz", "integrity": "sha512-SDSGgXT3LRCH6qMWk8OHT1vLSVNuHNvCpKCx2/TYtQMbMGGgxJC9fspwSkQjqzRagrWnCrxuLL3jMNXLXHHvSw==" }, + "node_modules/@types/conventional-commits-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", + "integrity": "sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", @@ -1657,22 +1689,22 @@ "dev": true }, "node_modules/@types/sha.js": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/sha.js/-/sha.js-2.4.0.tgz", - "integrity": "sha512-amxKgPy6WJTKuw8mpUwjX2BSxuBtBmZfRwIUDIuPJKNwGN8CWDli8JTg5ONTWOtcTkHIstvT7oAhhYXqEjStHQ==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/sha.js/-/sha.js-2.4.4.tgz", + "integrity": "sha512-Qukd+D6S2Hm0wLVt2Vh+/eWBIoUt+wF8jWjBsG4F8EFQRwKtYvtXCPcNl2OEUQ1R+eTr3xuSaBYUyM3WD1x/Qw==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==" + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" }, "node_modules/@types/webextension-polyfill": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@types/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz", - "integrity": "sha512-If4EcaHzYTqcbNMp/FdReVdRmLL/Te42ivnJII551bYjhX19bWem5m14FERCqdJA732OloGuxCRvLBvcMGsn4A==" + "version": "0.10.7", + "resolved": "https://registry.npmjs.org/@types/webextension-polyfill/-/webextension-polyfill-0.10.7.tgz", + "integrity": "sha512-10ql7A0qzBmFB+F+qAke/nP1PIonS0TXZAOMVOxEUsm+lGSW6uwVcISFNa0I4Oyj0884TZVWGGMIWeXOVSNFHw==" }, "node_modules/@types/websocket": { "version": "1.0.5", @@ -1682,15 +1714,29 @@ "@types/node": "*" } }, + "node_modules/@types/ws": { + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1708,15 +1754,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/add-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", @@ -1853,12 +1890,6 @@ "node": ">=10" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, "node_modules/argon2": { "version": "0.28.7", "resolved": "https://registry.npmjs.org/argon2/-/argon2-0.28.7.tgz", @@ -1961,11 +1992,6 @@ "node": "*" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -2008,9 +2034,9 @@ ] }, "node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", "engines": { "node": "*" } @@ -2035,18 +2061,18 @@ "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" }, "node_modules/boxen": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.2.tgz", - "integrity": "sha512-1Z4UJabXUP1/R9rLpoU3O2lEMnG3pPLAs/ZD2lF3t2q7qD5lM8rqbtnvtvm4N0wEyNlE+9yZVTVAGmd1V5jabg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.1.1.tgz", + "integrity": "sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==", "dependencies": { "ansi-align": "^3.0.1", - "camelcase": "^7.0.0", - "chalk": "^5.0.1", + "camelcase": "^7.0.1", + "chalk": "^5.2.0", "cli-boxes": "^3.0.0", "string-width": "^5.1.2", "type-fest": "^2.13.0", "widest-line": "^4.0.1", - "wrap-ansi": "^8.0.1" + "wrap-ansi": "^8.1.0" }, "engines": { "node": ">=14.16" @@ -2089,9 +2115,9 @@ } }, "node_modules/boxen/node_modules/chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -2121,9 +2147,9 @@ } }, "node_modules/boxen/node_modules/strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -2384,19 +2410,24 @@ } ] }, + "node_modules/canonicalize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-2.0.0.tgz", + "integrity": "sha512-ulDEYPv7asdKvqahuAY35c1selLdzDwHqugK92hfkzvlDCwXRRelDkR+Er33md/PtnpqHemgkuDPanZ4fiYZ8w==" + }, "node_modules/chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.0.8" }, "engines": { "node": ">=4" @@ -2429,10 +2460,13 @@ } }, "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, "engines": { "node": "*" } @@ -2472,20 +2506,6 @@ "node": ">=10" } }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -2543,23 +2563,12 @@ "color-support": "bin.js" } }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commander": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.0.tgz", - "integrity": "sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz", + "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==", "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/commondir": { @@ -2716,17 +2725,15 @@ "dev": true }, "node_modules/conventional-changelog-conventionalcommits": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-5.0.0.tgz", - "integrity": "sha512-lCDbA+ZqVFQGUj7h9QBKoIpLhl8iihkO0nCTyRNzuXtcd7ubODpYB04IFy31JloiJgG0Uovu8ot8oxRzn7Nwtw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz", + "integrity": "sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==", "dev": true, "dependencies": { - "compare-func": "^2.0.0", - "lodash": "^4.17.15", - "q": "^1.5.1" + "compare-func": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=16" } }, "node_modules/conventional-changelog-core": { @@ -3065,9 +3072,9 @@ "dev": true }, "node_modules/core-js-pure": { - "version": "3.29.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.29.0.tgz", - "integrity": "sha512-v94gUjN5UTe1n0yN/opTihJ8QBWD2O8i19RfTZR7foONPWArnjB96QA/wk5ozu1mm6ja3udQCzOzwQXTxi3xOQ==", + "version": "3.36.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.36.1.tgz", + "integrity": "sha512-NXCvHvSVYSrewP0L5OhltzXeWFJLo2AL2TYnj6iLV3Bw8mM62wAQMNgUCRI6EBu6hVVpbCxmOPlxh1Ikw2PfUA==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -3081,44 +3088,56 @@ "dev": true }, "node_modules/cosmiconfig": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", - "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "dependencies": { - "import-fresh": "^3.2.1", + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" + "parse-json": "^5.2.0" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/cosmiconfig-typescript-loader": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz", - "integrity": "sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz", + "integrity": "sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==", "dev": true, + "dependencies": { + "jiti": "^1.19.1" + }, "engines": { - "node": ">=12", - "npm": ">=6" + "node": ">=v16" }, "peerDependencies": { "@types/node": "*", - "cosmiconfig": ">=7", - "ts-node": ">=10", - "typescript": ">=3" + "cosmiconfig": ">=8.2", + "typescript": ">=4" } }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true + "node_modules/cosmiconfig/node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -3326,14 +3345,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -3489,11 +3500,14 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/error-ex": { @@ -3663,27 +3677,28 @@ } }, "node_modules/eslint": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz", - "integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.37.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -3691,22 +3706,19 @@ "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -3842,9 +3854,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -3852,12 +3864,15 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4029,14 +4044,14 @@ "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" }, "node_modules/espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4118,28 +4133,64 @@ } }, "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.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" + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=16.17" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/execa/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/ext": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", @@ -4279,23 +4330,10 @@ "dev": true, "dependencies": { "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "signal-exit": "^3.0.2" }, "engines": { - "node": ">= 6" + "node": ">=8.0.0" } }, "node_modules/form-data-encoder": { @@ -4327,9 +4365,9 @@ ] }, "node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -4456,9 +4494,9 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "engines": { "node": "*" @@ -4698,16 +4736,28 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", + "node_modules/global-directory": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", + "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", "dev": true, "dependencies": { - "ini": "^1.3.4" + "ini": "4.1.1" }, "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/global-directory/node_modules/ini": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/globals": { @@ -4775,10 +4825,10 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "node_modules/handlebars": { @@ -4897,17 +4947,6 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, - "node_modules/has-yarn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz", - "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/hasha": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", @@ -4966,16 +5005,26 @@ "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 6" + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" } }, "node_modules/http2-wrapper": { @@ -5014,12 +5063,12 @@ } }, "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, "engines": { - "node": ">=10.17.0" + "node": ">=16.17.0" } }, "node_modules/ieee754": { @@ -5042,9 +5091,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -5083,6 +5132,16 @@ "node": ">=8" } }, + "node_modules/import-meta-resolve": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz", + "integrity": "sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -5205,17 +5264,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dependencies": { - "ci-info": "^3.2.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, "node_modules/is-core-module": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", @@ -5272,6 +5320,20 @@ "node": ">=0.10.0" } }, + "node_modules/is-in-ci": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-0.1.0.tgz", + "integrity": "sha512-d9PXLEY0v1iJ64xLiQMJ51J128EYHAaOR4yZqQi8aHGfw6KgifM3/Viw1oZZ1GCVmb3gBuyhLyHj0HgR2DhSXQ==", + "bin": { + "is-in-ci": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -5520,14 +5582,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-yarn-global": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.1.tgz", - "integrity": "sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==", - "engines": { - "node": ">=12" - } - }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -5540,6 +5594,14 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "peerDependencies": { + "ws": "*" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -5670,14 +5732,13 @@ "node": ">=8" } }, - "node_modules/js-sdsl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", - "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" + "bin": { + "jiti": "bin/jiti.js" } }, "node_modules/js-tokens": { @@ -5802,9 +5863,9 @@ } }, "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", + "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", "dev": true }, "node_modules/keyv": { @@ -5950,12 +6011,6 @@ "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, - "node_modules/lodash.isfunction": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", - "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", - "dev": true - }, "node_modules/lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -6097,12 +6152,12 @@ } }, "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "dependencies": { - "get-func-name": "^2.0.0" + "get-func-name": "^2.0.1" } }, "node_modules/lowercase-keys": { @@ -6129,12 +6184,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, "node_modules/map-obj": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", @@ -6178,32 +6227,16 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mimic-response": { @@ -6238,9 +6271,12 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minimist-options": { "version": "4.1.0", @@ -6304,9 +6340,9 @@ } }, "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, "dependencies": { "ansi-colors": "4.1.1", @@ -6316,13 +6352,12 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -6337,10 +6372,6 @@ }, "engines": { "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" } }, "node_modules/mocha/node_modules/cliui": { @@ -6367,37 +6398,24 @@ } }, "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -6499,18 +6517,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -6529,25 +6535,16 @@ "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" }, "node_modules/nise": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", - "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^10.0.2", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node_modules/nise/node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.9.tgz", + "integrity": "sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww==", "dev": true, "dependencies": { - "type-detect": "4.0.8" + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/text-encoding": "^0.7.2", + "just-extend": "^6.2.0", + "path-to-regexp": "^6.2.1" } }, "node_modules/node-addon-api": { @@ -6667,15 +6664,30 @@ } }, "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "path-key": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/npmlog": { @@ -7010,32 +7022,32 @@ } }, "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "dependencies": { - "mimic-fn": "^2.1.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -7209,29 +7221,11 @@ "dev": true }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/path-to-regexp/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", "dev": true }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -7572,9 +7566,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regexp.prototype.flags": { "version": "1.4.3", @@ -7685,18 +7679,6 @@ "node": ">=8" } }, - "node_modules/resolve-global": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz", - "integrity": "sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==", - "dev": true, - "dependencies": { - "global-dirs": "^0.1.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/responselike": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", @@ -7767,21 +7749,13 @@ } }, "node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" + "tslib": "^2.1.0" } }, - "node_modules/rxjs/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -7919,16 +7893,16 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/sinon": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.3.tgz", - "integrity": "sha512-si3geiRkeovP7Iel2O+qGL4NrO9vbMf3KsrJEi0ghP1l5aBkB5UxARea5j0FUsSqH3HLBh0dQPAyQ8fObRUqHw==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", + "integrity": "sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^10.0.2", + "@sinonjs/fake-timers": "^11.2.2", "@sinonjs/samsam": "^8.0.0", "diff": "^5.1.0", - "nise": "^5.1.4", + "nise": "^5.1.5", "supports-color": "^7.2.0" }, "funding": { @@ -8234,12 +8208,15 @@ } }, "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/strip-indent": { @@ -8390,58 +8367,6 @@ "node": ">=8" } }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -8479,9 +8404,9 @@ } }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tweetnacl": { "version": "1.0.3", @@ -8563,16 +8488,17 @@ } }, "node_modules/typescript": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.3.tgz", - "integrity": "sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", + "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=12.20" + "node": ">=14.17" } }, "node_modules/uglify-js": { @@ -8603,6 +8529,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/unique-string": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", @@ -8618,9 +8556,9 @@ } }, "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "engines": { "node": ">= 10.0.0" } @@ -8652,36 +8590,34 @@ } }, "node_modules/update-notifier": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz", - "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-7.0.0.tgz", + "integrity": "sha512-Hv25Bh+eAbOLlsjJreVPOs4vd51rrtCrmhyOJtbpAojro34jS4KQaEp4/EvlHJX7jSO42VvEFpkastVyXyIsdQ==", "dependencies": { - "boxen": "^7.0.0", - "chalk": "^5.0.1", + "boxen": "^7.1.1", + "chalk": "^5.3.0", "configstore": "^6.0.0", - "has-yarn": "^3.0.0", "import-lazy": "^4.0.0", - "is-ci": "^3.0.1", + "is-in-ci": "^0.1.0", "is-installed-globally": "^0.4.0", "is-npm": "^6.0.0", - "is-yarn-global": "^0.4.0", "latest-version": "^7.0.0", "pupa": "^3.1.0", - "semver": "^7.3.7", + "semver": "^7.5.4", "semver-diff": "^4.0.0", "xdg-basedir": "^5.1.0" }, "engines": { - "node": ">=14.16" + "node": ">=18" }, "funding": { "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, "node_modules/update-notifier/node_modules/chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -8733,16 +8669,11 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, "bin": { "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -8916,9 +8847,9 @@ } }, "node_modules/widest-line/node_modules/strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -8929,15 +8860,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -9016,6 +8938,26 @@ "typedarray-to-buffer": "^3.1.5" } }, + "node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", @@ -9137,15 +9079,6 @@ "node": ">=12" } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index bb543726..77bf4793 100644 --- a/package.json +++ b/package.json @@ -7,25 +7,25 @@ }, "type": "module", "dependencies": { - "@aeternity/aepp-sdk": "^13.0.0", - "bignumber.js": "^9.1.1", - "commander": "^10.0.0", - "env-paths": "^2.2.1", - "fs-extra": "^11.1.1", + "@aeternity/aepp-sdk": "^13.2.2", + "bignumber.js": "^9.1.2", + "commander": "^12.0.0", + "env-paths": "^3.0.0", + "fs-extra": "^11.2.0", "prompts": "^2.4.2", - "update-notifier": "^6.0.2" + "update-notifier": "^7.0.0" }, "devDependencies": { - "@commitlint/cli": "^17.5.1", - "@commitlint/config-conventional": "^17.4.4", + "@commitlint/cli": "^19.2.1", + "@commitlint/config-conventional": "^19.1.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.37.0", + "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", - "mocha": "^10.2.0", + "mocha": "^10.4.0", "mock-fs": "^5.2.0", "nyc": "^15.1.0", - "sinon": "^15.0.3", + "sinon": "^17.0.1", "standard-version": "^9.5.0" }, "repository": { diff --git a/test/contract.js b/test/contract.js index f4d886c7..8c02d31c 100644 --- a/test/contract.js +++ b/test/contract.js @@ -77,7 +77,7 @@ describe('Contract Module', function contractTests() { expect(descriptor).to.eql({ version: 1, address, - bytecode: 'cb_+L5GA6DYM5NsuGXWxxHp3/rvzpUabt5oDeNdrc22CqVocjzKwMC4kbhX/kTWRB8ANwEHNwAaBoIAAQM//pKLIDYANwIHBwcMAoIMAQICAxHQ4oJSDAEABAMR0OKCUv7Q4oJSAjcCBwcHFBQAAgD+6YyQGwA3AGcHBwEDLwICBAYItC8EEUTWRB8RaW5pdBGSiyA2EXRlc3QR0OKCUjEuVGVzdExpYi5zdW0R6YyQGxlnZXRNYXCCLwCFNy4xLjAAekHqRQ==', + bytecode: 'cb_+L5GA6DYM5NsuGXWxxHp3/rvzpUabt5oDeNdrc22CqVocjzKwMC4kbhX/kTWRB8ANwEHNwAaBoIAAQM//pKLIDYANwIHBwcMAoIMAQICAxHQ4oJSDAEABAMR0OKCUv7Q4oJSAjcCBwcHFBQAAgD+6YyQGwA3AGcHBwEDLwICBAYItC8EEUTWRB8RaW5pdBGSiyA2EXRlc3QR0OKCUjEuVGVzdExpYi5zdW0R6YyQGxlnZXRNYXCCLwCFNy4yLjEAKvwDWw==', aci: [{ namespace: { name: 'TestLib', typedefs: [] }, }, { @@ -195,7 +195,8 @@ describe('Contract Module', function contractTests() { callResponse.decodedResult.should.equal('6'); }); - it('calls contract static with dry run account', async () => { + // TODO: enable after updating sdk, issues with instanceof not working + it.skip('calls contract static with dry run account', async () => { const callResponse = await executeContract([ 'call', '--json', @@ -208,7 +209,8 @@ describe('Contract Module', function contractTests() { callResponse.decodedResult.should.equal('6'); }); - it('returns Maps correctly', async () => { + // TODO: enable after updating sdk, issues with instanceof not working + it.skip('returns Maps correctly', async () => { const callResponse = await executeContract([ 'call', '--json', diff --git a/test/oracle.js b/test/oracle.js index 8d1282f4..68e32be4 100644 --- a/test/oracle.js +++ b/test/oracle.js @@ -68,7 +68,7 @@ describe('Oracle Module', () => { it('Get non existed Oracle', async () => { const fakeOracleId = generateKeyPair().publicKey.replace('ak_', 'ok_'); await executeOracle(['get', fakeOracleId, '--json']) - .should.be.rejectedWith('error: Oracle not found'); + .should.be.rejectedWith('Oracle not found'); // TODO: add "error: " prefix after updating sdk await executeOracle(['get', 'oq_d1sadasdasda', '--json']) .should.be.rejectedWith('Encoded string have a wrong type: oq (expected: ok)'); }); From d4e7bca6f2822faa0dd6d120a985978600a2128f Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 4 Apr 2024 18:36:04 +1000 Subject: [PATCH 29/88] chore(deps): regenerate package-lock --- package-lock.json | 5151 +++++++++++++++++++++++++++++---------------- 1 file changed, 3303 insertions(+), 1848 deletions(-) diff --git a/package-lock.json b/package-lock.json index 69866e05..d085a423 100644 --- a/package-lock.json +++ b/package-lock.json @@ -124,13 +124,13 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -148,15 +148,27 @@ } }, "node_modules/@azure/core-auth": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.4.0.tgz", - "integrity": "sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.7.1.tgz", + "integrity": "sha512-dyeQwvgthqs/SlPVQbZQetpslXceHd4i5a7M/7z/lGEAVwnSluabnQOjF2/dk/hhWgMISusv1Ytp4mQ8JNy62A==", "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" + "@azure/abort-controller": "^2.0.0", + "@azure/core-util": "^1.1.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-auth/node_modules/@azure/abort-controller": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.1.tgz", + "integrity": "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@azure/core-client": { @@ -205,38 +217,15 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-rest-pipeline/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@azure/core-rest-pipeline/node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/@azure/core-tracing": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", - "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.1.1.tgz", + "integrity": "sha512-qPbYhN1pE5XQ2jPKIHP33x8l3oBu1UqIWnYqZZ3OYnYjzY0xqIHjn49C+ptsPD9yC7uyWI9Zm7iZUZLs2R4DhQ==", "dependencies": { - "tslib": "^2.2.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" } }, "node_modules/@azure/core-util": { @@ -263,59 +252,59 @@ } }, "node_modules/@azure/logger": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", - "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.1.tgz", + "integrity": "sha512-/+4TtokaGgC+MnThdf6HyIH9Wrjp+CnCn3Nx3ggevN7FFjjNyjqg0yLlc2i9S+Z2uAzI8GYOo35Nzb1MhQ89MA==", "dependencies": { - "tslib": "^2.2.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz", - "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.3.tgz", - "integrity": "sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.3", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.3", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.3", - "@babel/types": "^7.21.3", - "convert-source-map": "^1.7.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.4", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -325,69 +314,61 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "dependencies": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "node_modules/@babel/generator": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" }, "engines": { - "node": ">=6.0.0" + "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", + "@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.0" + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "dependencies": { - "yallist": "^3.0.2" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", @@ -423,43 +404,43 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", - "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.2", - "@babel/types": "^7.21.2" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", - "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, "dependencies": { - "@babel/types": "^7.20.2" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -478,9 +459,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -496,46 +477,103 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", - "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", - "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", "dev": true, "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -557,47 +595,56 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", - "debug": "^4.1.0", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, @@ -691,18 +738,6 @@ "node": ">=v18" } }, - "node_modules/@commitlint/format/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/@commitlint/is-ignored": { "version": "19.0.3", "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-19.0.3.tgz", @@ -716,21 +751,6 @@ "node": ">=v18" } }, - "node_modules/@commitlint/is-ignored/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@commitlint/lint": { "version": "19.1.0", "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.1.0.tgz", @@ -767,18 +787,6 @@ "node": ">=v18" } }, - "node_modules/@commitlint/load/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/@commitlint/message": { "version": "19.0.0", "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-19.0.0.tgz", @@ -802,168 +810,43 @@ "node": ">=v18" } }, - "node_modules/@commitlint/parse/node_modules/conventional-changelog-angular": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", - "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", + "node_modules/@commitlint/read": { + "version": "19.2.1", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-19.2.1.tgz", + "integrity": "sha512-qETc4+PL0EUv7Q36lJbPG+NJiBOGg7SSC7B5BsPWOmei+Dyif80ErfWQ0qXoW9oCh7GTpTNRoaVhiI8RbhuaNw==", "dev": true, "dependencies": { - "compare-func": "^2.0.0" + "@commitlint/top-level": "^19.0.0", + "@commitlint/types": "^19.0.3", + "execa": "^8.0.1", + "git-raw-commits": "^4.0.0", + "minimist": "^1.2.8" }, "engines": { - "node": ">=16" + "node": ">=v18" } }, - "node_modules/@commitlint/parse/node_modules/conventional-commits-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", - "integrity": "sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==", + "node_modules/@commitlint/resolve-extends": { + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-19.1.0.tgz", + "integrity": "sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==", "dev": true, "dependencies": { - "is-text-path": "^2.0.0", - "JSONStream": "^1.3.5", - "meow": "^12.0.1", - "split2": "^4.0.0" - }, - "bin": { - "conventional-commits-parser": "cli.mjs" + "@commitlint/config-validator": "^19.0.3", + "@commitlint/types": "^19.0.3", + "global-directory": "^4.0.1", + "import-meta-resolve": "^4.0.0", + "lodash.mergewith": "^4.6.2", + "resolve-from": "^5.0.0" }, "engines": { - "node": ">=16" + "node": ">=v18" } }, - "node_modules/@commitlint/parse/node_modules/is-text-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", - "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", - "dev": true, - "dependencies": { - "text-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@commitlint/parse/node_modules/meow": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", - "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", - "dev": true, - "engines": { - "node": ">=16.10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/parse/node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "dev": true, - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/@commitlint/parse/node_modules/text-extensions": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", - "integrity": "sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/read": { - "version": "19.2.1", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-19.2.1.tgz", - "integrity": "sha512-qETc4+PL0EUv7Q36lJbPG+NJiBOGg7SSC7B5BsPWOmei+Dyif80ErfWQ0qXoW9oCh7GTpTNRoaVhiI8RbhuaNw==", - "dev": true, - "dependencies": { - "@commitlint/top-level": "^19.0.0", - "@commitlint/types": "^19.0.3", - "execa": "^8.0.1", - "git-raw-commits": "^4.0.0", - "minimist": "^1.2.8" - }, - "engines": { - "node": ">=v18" - } - }, - "node_modules/@commitlint/read/node_modules/dargs": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz", - "integrity": "sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/read/node_modules/git-raw-commits": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-4.0.0.tgz", - "integrity": "sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==", - "dev": true, - "dependencies": { - "dargs": "^8.0.0", - "meow": "^12.0.1", - "split2": "^4.0.0" - }, - "bin": { - "git-raw-commits": "cli.mjs" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@commitlint/read/node_modules/meow": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", - "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", - "dev": true, - "engines": { - "node": ">=16.10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/read/node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "dev": true, - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/@commitlint/resolve-extends": { - "version": "19.1.0", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-19.1.0.tgz", - "integrity": "sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==", - "dev": true, - "dependencies": { - "@commitlint/config-validator": "^19.0.3", - "@commitlint/types": "^19.0.3", - "global-directory": "^4.0.1", - "import-meta-resolve": "^4.0.0", - "lodash.mergewith": "^4.6.2", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=v18" - } - }, - "node_modules/@commitlint/rules": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.0.3.tgz", - "integrity": "sha512-TspKb9VB6svklxNCKKwxhELn7qhtY1rFF8ls58DcFd0F97XoG07xugPjjbVnLqmMkRjZDbDIwBKt9bddOfLaPw==", + "node_modules/@commitlint/rules": { + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.0.3.tgz", + "integrity": "sha512-TspKb9VB6svklxNCKKwxhELn7qhtY1rFF8ls58DcFd0F97XoG07xugPjjbVnLqmMkRjZDbDIwBKt9bddOfLaPw==", "dev": true, "dependencies": { "@commitlint/ensure": "^19.0.3", @@ -997,89 +880,6 @@ "node": ">=v18" } }, - "node_modules/@commitlint/top-level/node_modules/find-up": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz", - "integrity": "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==", - "dev": true, - "dependencies": { - "locate-path": "^7.2.0", - "path-exists": "^5.0.0", - "unicorn-magic": "^0.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/top-level/node_modules/locate-path": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", - "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", - "dev": true, - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/top-level/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/top-level/node_modules/p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", - "dev": true, - "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/top-level/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/@commitlint/top-level/node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@commitlint/types": { "version": "19.0.3", "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.0.3.tgz", @@ -1093,18 +893,6 @@ "node": ">=v18" } }, - "node_modules/@commitlint/types/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -1168,39 +956,12 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@eslint/js": { "version": "8.57.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", @@ -1342,6 +1103,15 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -1352,50 +1122,51 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@ledgerhq/devices": { @@ -1409,29 +1180,15 @@ "semver": "^7.3.5" } }, - "node_modules/@ledgerhq/devices/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@ledgerhq/errors": { - "version": "6.16.3", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.16.3.tgz", - "integrity": "sha512-3w7/SJVXOPa9mpzyll7VKoKnGwDD3BzWgN1Nom8byR40DiQvOKjHX+kKQausCedTHVNBn9euzPCNsftZ9+mxfw==" - }, - "node_modules/@ledgerhq/hw-transport": { - "version": "6.30.5", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.30.5.tgz", - "integrity": "sha512-JMl//7BgPBvWxrWyMu82jj6JEYtsQyOyhYtonWNgtxn6KUZWht3gU4gxmLpeIRr+DiS7e50mW7m3GA+EudZmmA==", + "node_modules/@ledgerhq/errors": { + "version": "6.16.3", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.16.3.tgz", + "integrity": "sha512-3w7/SJVXOPa9mpzyll7VKoKnGwDD3BzWgN1Nom8byR40DiQvOKjHX+kKQausCedTHVNBn9euzPCNsftZ9+mxfw==" + }, + "node_modules/@ledgerhq/hw-transport": { + "version": "6.30.5", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.30.5.tgz", + "integrity": "sha512-JMl//7BgPBvWxrWyMu82jj6JEYtsQyOyhYtonWNgtxn6KUZWht3gU4gxmLpeIRr+DiS7e50mW7m3GA+EudZmmA==", "dependencies": { "@ledgerhq/devices": "^8.2.2", "@ledgerhq/errors": "^6.16.3", @@ -1445,9 +1202,9 @@ "integrity": "sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==" }, "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", - "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", "dependencies": { "detect-libc": "^2.0.0", "https-proxy-agent": "^5.0.0", @@ -1463,40 +1220,27 @@ "node-pre-gyp": "bin/node-pre-gyp" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/@mapbox/node-pre-gyp/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dependencies": { - "semver": "^6.0.0" + "debug": "4" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "bin": { - "semver": "bin/semver.js" + "node": ">= 6.0.0" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/@mapbox/node-pre-gyp/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "agent-base": "6", + "debug": "4" }, "engines": { - "node": ">=10" + "node": ">= 6" } }, "node_modules/@nodelib/fs.scandir": { @@ -1543,9 +1287,9 @@ } }, "node_modules/@pnpm/config.env-replace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.0.0.tgz", - "integrity": "sha512-ZVPVDi1E8oeXlYqkGRtX0CkzLTwE2zt62bjWaWKaAvI8NZqHzlMvGeSNDpW+JB3+aKanYb4UETJOF1/CxGPemA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", "engines": { "node": ">=12.22.0" } @@ -1561,12 +1305,17 @@ "node": ">=12.22.0" } }, + "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, "node_modules/@pnpm/npm-conf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.1.0.tgz", - "integrity": "sha512-Oe6ntvgsMTE3hDIqy6sajqHF+MnzJrOF06qC2QSiUEybLL7cp6tjoKUa32gpd9+KPVl4QyMs3E3nsXrx/Vdnlw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.2.2.tgz", + "integrity": "sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==", "dependencies": { - "@pnpm/config.env-replace": "^1.0.0", + "@pnpm/config.env-replace": "^1.1.0", "@pnpm/network.ca-file": "^1.0.1", "config-chain": "^1.1.11" }, @@ -1575,9 +1324,9 @@ } }, "node_modules/@sindresorhus/is": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.3.0.tgz", - "integrity": "sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", + "integrity": "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==", "engines": { "node": ">=14.16" }, @@ -1586,9 +1335,9 @@ } }, "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" @@ -1641,9 +1390,9 @@ } }, "node_modules/@types/aes-js": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@types/aes-js/-/aes-js-3.1.1.tgz", - "integrity": "sha512-SDSGgXT3LRCH6qMWk8OHT1vLSVNuHNvCpKCx2/TYtQMbMGGgxJC9fspwSkQjqzRagrWnCrxuLL3jMNXLXHHvSw==" + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/aes-js/-/aes-js-3.1.4.tgz", + "integrity": "sha512-v3D66IptpUqh+pHKVNRxY8yvp2ESSZXe0rTzsGdzUhEwag7ljVfgCllkWv2YgiYXDhWFBrEywll4A5JToyTNFA==" }, "node_modules/@types/conventional-commits-parser": { "version": "5.0.0", @@ -1655,14 +1404,14 @@ } }, "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" }, "node_modules/@types/json-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.1.tgz", - "integrity": "sha512-zpchZLNsNuzJHi6v64UBoFWAvQlPhch7XAi36FkH6tL1bbbmimIF+cS7vwkzY4u5RaSWMoflQfu+TshMPPw8uw==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", + "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "node_modules/@types/json5": { "version": "0.0.29", @@ -1672,9 +1421,9 @@ "peer": true }, "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", "dev": true }, "node_modules/@types/node": { @@ -1683,9 +1432,9 @@ "integrity": "sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw==" }, "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true }, "node_modules/@types/sha.js": { @@ -1707,9 +1456,9 @@ "integrity": "sha512-10ql7A0qzBmFB+F+qAke/nP1PIonS0TXZAOMVOxEUsm+lGSW6uwVcISFNa0I4Oyj0884TZVWGGMIWeXOVSNFHw==" }, "node_modules/@types/websocket": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.5.tgz", - "integrity": "sha512-NbsqiNX9CnEfC1Z0Vf4mE1SgAJ07JnRYcNex7AJ9zAVzmiGHmjKFEk7O4TJIsgv2B1sLEb6owKFZrACwdYngsQ==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.10.tgz", + "integrity": "sha512-svjGZvPB7EzuYS94cI7a+qhwgGU1y89wUgjT6E2wVUfmAGIvRfT7obBvRtnhXCSsoMdlG4gBFGE7MfkIXZLoww==", "dependencies": { "@types/node": "*" } @@ -1766,14 +1515,14 @@ "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dependencies": { - "debug": "4" + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/aggregate-error": { @@ -1831,15 +1580,14 @@ } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "engines": { - "node": ">=4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { @@ -1910,6 +1658,23 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", @@ -1917,16 +1682,17 @@ "dev": true }, "node_modules/array-includes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", - "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -1936,16 +1702,37 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, "peer": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -1956,15 +1743,15 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, "peer": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -1974,6 +1761,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "peer": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -1993,10 +1803,14 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "peer": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -2042,12 +1856,15 @@ } }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/bip32-path": { @@ -2092,17 +1909,6 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/boxen/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/boxen/node_modules/camelcase": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", @@ -2114,17 +1920,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/boxen/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/boxen/node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -2171,22 +1966,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/boxen/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2215,9 +1994,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -2227,13 +2006,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -2280,9 +2063,9 @@ "dev": true }, "node_modules/bufferutil": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", - "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -2300,14 +2083,14 @@ } }, "node_modules/cacheable-request": { - "version": "10.2.9", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.9.tgz", - "integrity": "sha512-CaAMr53AS1Tb9evO1BIWFnZjSr8A4pbXofpsNVWPMDZZj3ZQKHwsQG9BrTqQ4x5ZYJXz1T2b8LLtTZODxSpzbg==", + "version": "10.2.14", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", + "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", "dependencies": { - "@types/http-cache-semantics": "^4.0.1", + "@types/http-cache-semantics": "^4.0.2", "get-stream": "^6.0.1", "http-cache-semantics": "^4.1.1", - "keyv": "^4.5.2", + "keyv": "^4.5.3", "mimic-response": "^4.0.0", "normalize-url": "^8.0.0", "responselike": "^3.0.0" @@ -2316,6 +2099,17 @@ "node": ">=14.16" } }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -2331,29 +2125,20 @@ "node": ">=8" } }, - "node_modules/caching-transform/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2394,10 +2179,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/camelcase-keys/node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/caniuse-lite": { - "version": "1.0.30001458", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001458.tgz", - "integrity": "sha512-lQ1VlUUq5q9ro9X+5gOEyH7i3vm+AYVT1WDCVB69XOZ17KZRhnZ9J0Sqz7wTHQaLBJccNCHq8/Ww5LlOIZbB0w==", + "version": "1.0.30001605", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz", + "integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==", "dev": true, "funding": [ { @@ -2407,6 +2201,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -2446,17 +2244,14 @@ } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "engines": { - "node": ">=4" + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/check-error": { @@ -2498,6 +2293,18 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -2540,12 +2347,62 @@ "node": ">=12" } }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { "color-name": "1.1.3" } }, @@ -2616,6 +2473,11 @@ "proto-list": "~1.2.1" } }, + "node_modules/config-chain/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "node_modules/configstore": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", @@ -2682,16 +2544,15 @@ } }, "node_modules/conventional-changelog-angular": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", - "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", + "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", "dev": true, "dependencies": { - "compare-func": "^2.0.0", - "q": "^1.5.1" + "compare-func": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=16" } }, "node_modules/conventional-changelog-atom": { @@ -2761,128 +2622,164 @@ "node": ">=10" } }, - "node_modules/conventional-changelog-core/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "node_modules/conventional-changelog-core/node_modules/conventional-commits-parser": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", + "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", "dev": true, "dependencies": { - "locate-path": "^2.0.0" + "is-text-path": "^1.0.1", + "JSONStream": "^1.0.4", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + }, + "bin": { + "conventional-commits-parser": "cli.js" }, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/conventional-changelog-core/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/conventional-changelog-core/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "node_modules/conventional-changelog-core/node_modules/dargs": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", + "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/conventional-changelog-core/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "node_modules/conventional-changelog-core/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "dependencies": { - "p-try": "^1.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/conventional-changelog-core/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "node_modules/conventional-changelog-core/node_modules/git-raw-commits": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", + "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", "dev": true, "dependencies": { - "p-limit": "^1.1.0" + "dargs": "^7.0.0", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + }, + "bin": { + "git-raw-commits": "cli.js" }, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/conventional-changelog-core/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "node_modules/conventional-changelog-core/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/conventional-changelog-core/node_modules/is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", "dev": true, + "dependencies": { + "text-extensions": "^1.0.0" + }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/conventional-changelog-core/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "node_modules/conventional-changelog-core/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/conventional-changelog-core/node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "node_modules/conventional-changelog-core/node_modules/meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", "dev": true, "dependencies": { - "pify": "^3.0.0" + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/conventional-changelog-core/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "node_modules/conventional-changelog-core/node_modules/meow/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/conventional-changelog-core/node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "node_modules/conventional-changelog-core/node_modules/meow/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/conventional-changelog-core/node_modules/read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==", + "node_modules/conventional-changelog-core/node_modules/meow/node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/conventional-changelog-core/node_modules/read-pkg/node_modules/normalize-package-data": { + "node_modules/conventional-changelog-core/node_modules/meow/node_modules/read-pkg/node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", @@ -2894,175 +2791,698 @@ "validate-npm-package-license": "^3.0.1" } }, - "node_modules/conventional-changelog-core/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/conventional-changelog-core/node_modules/meow/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, - "bin": { - "semver": "bin/semver" + "engines": { + "node": ">=8" } }, - "node_modules/conventional-changelog-ember": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz", - "integrity": "sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A==", + "node_modules/conventional-changelog-core/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "q": "^1.5.1" + "p-try": "^2.0.0" }, "engines": { - "node": ">=10" - } - }, + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conventional-changelog-core/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-changelog-core/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-changelog-core/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/conventional-changelog-core/node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "dependencies": { + "readable-stream": "^3.0.0" + } + }, + "node_modules/conventional-changelog-core/node_modules/text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/conventional-changelog-core/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conventional-changelog-ember": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz", + "integrity": "sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A==", + "dev": true, + "dependencies": { + "q": "^1.5.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/conventional-changelog-eslint": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz", "integrity": "sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA==", "dev": true, "dependencies": { - "q": "^1.5.1" + "q": "^1.5.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-changelog-express": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz", + "integrity": "sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ==", + "dev": true, + "dependencies": { + "q": "^1.5.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-changelog-jquery": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz", + "integrity": "sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw==", + "dev": true, + "dependencies": { + "q": "^1.5.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-changelog-jshint": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz", + "integrity": "sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA==", + "dev": true, + "dependencies": { + "compare-func": "^2.0.0", + "q": "^1.5.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-changelog-preset-loader": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz", + "integrity": "sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-changelog-writer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-5.0.1.tgz", + "integrity": "sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ==", + "dev": true, + "dependencies": { + "conventional-commits-filter": "^2.0.7", + "dateformat": "^3.0.0", + "handlebars": "^4.7.7", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "semver": "^6.0.0", + "split": "^1.0.0", + "through2": "^4.0.0" + }, + "bin": { + "conventional-changelog-writer": "cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-changelog-writer/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-changelog-writer/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/conventional-changelog-writer/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-changelog-writer/node_modules/meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "dev": true, + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conventional-changelog-writer/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conventional-changelog-writer/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-changelog-writer/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-changelog-writer/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-changelog-writer/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conventional-changelog-writer/node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-changelog-writer/node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/conventional-changelog-writer/node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/conventional-changelog-writer/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-changelog-writer/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/conventional-changelog-writer/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conventional-changelog/node_modules/conventional-changelog-angular": { + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", + "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", + "dev": true, + "dependencies": { + "compare-func": "^2.0.0", + "q": "^1.5.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-changelog/node_modules/conventional-changelog-conventionalcommits": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz", + "integrity": "sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==", + "dev": true, + "dependencies": { + "compare-func": "^2.0.0", + "lodash": "^4.17.15", + "q": "^1.5.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-commits-filter": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", + "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", + "dev": true, + "dependencies": { + "lodash.ismatch": "^4.4.0", + "modify-values": "^1.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-commits-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", + "integrity": "sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==", + "dev": true, + "dependencies": { + "is-text-path": "^2.0.0", + "JSONStream": "^1.3.5", + "meow": "^12.0.1", + "split2": "^4.0.0" + }, + "bin": { + "conventional-commits-parser": "cli.mjs" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/conventional-recommended-bump": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz", + "integrity": "sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw==", + "dev": true, + "dependencies": { + "concat-stream": "^2.0.0", + "conventional-changelog-preset-loader": "^2.3.4", + "conventional-commits-filter": "^2.0.7", + "conventional-commits-parser": "^3.2.0", + "git-raw-commits": "^2.0.8", + "git-semver-tags": "^4.1.1", + "meow": "^8.0.0", + "q": "^1.5.1" + }, + "bin": { + "conventional-recommended-bump": "cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-recommended-bump/node_modules/conventional-commits-parser": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", + "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", + "dev": true, + "dependencies": { + "is-text-path": "^1.0.1", + "JSONStream": "^1.0.4", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + }, + "bin": { + "conventional-commits-parser": "cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-recommended-bump/node_modules/dargs": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", + "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-recommended-bump/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-recommended-bump/node_modules/git-raw-commits": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", + "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", + "dev": true, + "dependencies": { + "dargs": "^7.0.0", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + }, + "bin": { + "git-raw-commits": "cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-recommended-bump/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/conventional-recommended-bump/node_modules/is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", + "dev": true, + "dependencies": { + "text-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/conventional-recommended-bump/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/conventional-recommended-bump/node_modules/meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "dev": true, + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conventional-recommended-bump/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conventional-recommended-bump/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/conventional-changelog-express": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz", - "integrity": "sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ==", + "node_modules/conventional-recommended-bump/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "dependencies": { - "q": "^1.5.1" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/conventional-changelog-jquery": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz", - "integrity": "sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw==", + "node_modules/conventional-recommended-bump/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, "dependencies": { - "q": "^1.5.1" + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/conventional-changelog-jshint": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz", - "integrity": "sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA==", + "node_modules/conventional-recommended-bump/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, "dependencies": { - "compare-func": "^2.0.0", - "q": "^1.5.1" + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" }, "engines": { - "node": ">=10" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/conventional-changelog-preset-loader": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz", - "integrity": "sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==", + "node_modules/conventional-recommended-bump/node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/conventional-changelog-writer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-5.0.1.tgz", - "integrity": "sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ==", + "node_modules/conventional-recommended-bump/node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "dependencies": { - "conventional-commits-filter": "^2.0.7", - "dateformat": "^3.0.0", - "handlebars": "^4.7.7", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "semver": "^6.0.0", - "split": "^1.0.0", - "through2": "^4.0.0" - }, - "bin": { - "conventional-changelog-writer": "cli.js" - }, - "engines": { - "node": ">=10" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, - "node_modules/conventional-changelog/node_modules/conventional-changelog-conventionalcommits": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz", - "integrity": "sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==", + "node_modules/conventional-recommended-bump/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, - "dependencies": { - "compare-func": "^2.0.0", - "lodash": "^4.17.15", - "q": "^1.5.1" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/conventional-commits-filter": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", - "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", + "node_modules/conventional-recommended-bump/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "dependencies": { - "lodash.ismatch": "^4.4.0", - "modify-values": "^1.0.0" - }, - "engines": { - "node": ">=10" + "bin": { + "semver": "bin/semver" } }, - "node_modules/conventional-commits-parser": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", - "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", + "node_modules/conventional-recommended-bump/node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", "dev": true, "dependencies": { - "is-text-path": "^1.0.1", - "JSONStream": "^1.0.4", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "split2": "^3.0.0", - "through2": "^4.0.0" - }, - "bin": { - "conventional-commits-parser": "cli.js" - }, + "readable-stream": "^3.0.0" + } + }, + "node_modules/conventional-recommended-bump/node_modules/text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=0.10" } }, - "node_modules/conventional-recommended-bump": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz", - "integrity": "sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw==", + "node_modules/conventional-recommended-bump/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", "dev": true, - "dependencies": { - "concat-stream": "^2.0.0", - "conventional-changelog-preset-loader": "^2.3.4", - "conventional-commits-filter": "^2.0.7", - "conventional-commits-parser": "^3.2.0", - "git-raw-commits": "^2.0.8", - "git-semver-tags": "^4.1.1", - "meow": "^8.0.0", - "q": "^1.5.1" - }, - "bin": { - "conventional-recommended-bump": "cli.js" - }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/convert-source-map": { @@ -3179,21 +3599,81 @@ } }, "node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "es5-ext": "^0.10.64", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.12" } }, "node_modules/dargs": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", - "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz", + "integrity": "sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/dateformat": { @@ -3329,12 +3809,30 @@ "node": ">=10" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -3360,9 +3858,9 @@ } }, "node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", "engines": { "node": ">=8" } @@ -3489,9 +3987,9 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "node_modules/electron-to-chromium": { - "version": "1.4.315", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.315.tgz", - "integrity": "sha512-ndBQYz3Eyy3rASjjQ9poMJGoAlsZ/aZnq6GBsGL4w/4sWIAwiUHVSsMuADbxa8WJw7pZ0oxLpGbtoDt4vRTdCg==", + "version": "1.4.726", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.726.tgz", + "integrity": "sha512-xtjfBXn53RORwkbyKvDfTajtnTp0OJoPOIBzXvkNbb7+YYvCHJflba3L7Txyx/6Fov3ov2bGPr/n5MTixmPhdQ==", "dev": true }, "node_modules/emoji-regex": { @@ -3520,74 +4018,122 @@ } }, "node_modules/es-abstract": { - "version": "1.21.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", - "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dev": true, + "peer": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.3", - "get-symbol-description": "^1.0.0", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.4", - "is-array-buffer": "^3.0.1", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "safe-regex-test": "^1.0.0", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, + "peer": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, "peer": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { @@ -3595,6 +4141,7 @@ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, + "peer": true, "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -3639,18 +4186,21 @@ } }, "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" + "d": "^1.0.2", + "ext": "^1.7.0" + }, + "engines": { + "node": ">=0.12" } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -3668,12 +4218,15 @@ } }, "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { @@ -3750,16 +4303,25 @@ "eslint-plugin-import": "^2.25.2" } }, + "node_modules/eslint-config-airbnb-base/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", - "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, "peer": true, "dependencies": { "debug": "^3.2.7", - "is-core-module": "^2.11.0", - "resolve": "^1.22.1" + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { @@ -3773,9 +4335,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", - "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "dev": true, "peer": true, "dependencies": { @@ -3801,27 +4363,29 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", - "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dev": true, "peer": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-module-utils": "^2.7.4", - "has": "^1.0.3", - "is-core-module": "^2.11.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.values": "^1.1.6", - "resolve": "^1.22.1", - "semver": "^6.3.0", - "tsconfig-paths": "^3.14.1" + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" @@ -3853,6 +4417,16 @@ "node": ">=0.10.0" } }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -3946,11 +4520,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, "engines": { "node": ">=10" }, @@ -3958,48 +4536,66 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "is-glob": "^4.0.3" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "type-fest": "^0.20.2" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/has-flag": { + "node_modules/eslint/node_modules/path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -4012,10 +4608,10 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "node_modules/eslint/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "engines": { "node": ">=10" @@ -4038,11 +4634,6 @@ "node": ">=0.10" } }, - "node_modules/esniff/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -4155,42 +4746,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/execa/node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/ext": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", @@ -4199,11 +4754,6 @@ "type": "^2.7.2" } }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4223,9 +4773,9 @@ "dev": true }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -4246,6 +4796,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -4270,17 +4829,35 @@ "node": ">=8" } }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz", + "integrity": "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==", "dev": true, "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "locate-path": "^7.2.0", + "path-exists": "^5.0.0", + "unicorn-magic": "^0.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4296,12 +4873,13 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { @@ -4309,9 +4887,9 @@ } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/for-each": { @@ -4319,6 +4897,7 @@ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, + "peer": true, "dependencies": { "is-callable": "^1.1.3" } @@ -4336,6 +4915,12 @@ "node": ">=8.0.0" } }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/form-data-encoder": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", @@ -4410,9 +4995,9 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -4424,21 +5009,25 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -4452,6 +5041,7 @@ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, + "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4475,6 +5065,11 @@ "node": ">=10" } }, + "node_modules/gauge/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -4503,14 +5098,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4543,6 +5143,21 @@ "node": ">=6.9.0" } }, + "node_modules/get-pkg-repo/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/get-pkg-repo/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -4554,6 +5169,30 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/get-pkg-repo/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/get-pkg-repo/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/get-pkg-repo/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, "node_modules/get-pkg-repo/node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -4594,6 +5233,23 @@ "xtend": "~4.0.1" } }, + "node_modules/get-pkg-repo/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/get-pkg-repo/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -4613,24 +5269,27 @@ } }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -4640,22 +5299,20 @@ } }, "node_modules/git-raw-commits": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", - "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-4.0.0.tgz", + "integrity": "sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==", "dev": true, "dependencies": { - "dargs": "^7.0.0", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "split2": "^3.0.0", - "through2": "^4.0.0" + "dargs": "^8.0.0", + "meow": "^12.0.1", + "split2": "^4.0.0" }, "bin": { - "git-raw-commits": "cli.js" + "git-raw-commits": "cli.mjs" }, "engines": { - "node": ">=10" + "node": ">=16" } }, "node_modules/git-remote-origin-url": { @@ -4671,15 +5328,6 @@ "node": ">=4" } }, - "node_modules/git-remote-origin-url/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/git-semver-tags": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-4.1.1.tgz", @@ -4696,6 +5344,190 @@ "node": ">=10" } }, + "node_modules/git-semver-tags/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/git-semver-tags/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/git-semver-tags/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/git-semver-tags/node_modules/meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "dev": true, + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/git-semver-tags/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/git-semver-tags/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/git-semver-tags/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/git-semver-tags/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/git-semver-tags/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/git-semver-tags/node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/git-semver-tags/node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/git-semver-tags/node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/git-semver-tags/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/git-semver-tags/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/git-semver-tags/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gitconfiglocal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", @@ -4705,35 +5537,62 @@ "ini": "^1.3.2" } }, + "node_modules/gitconfiglocal/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">= 6" + "node": ">=10" } }, "node_modules/global-directory": { @@ -4751,22 +5610,41 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/global-directory/node_modules/ini": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", - "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", - "dev": true, + "node_modules/global-dirs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dependencies": { + "ini": "2.0.0" + }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/global-dirs/node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "engines": { + "node": ">=10" } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { @@ -4774,6 +5652,7 @@ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dev": true, + "peer": true, "dependencies": { "define-properties": "^1.1.3" }, @@ -4797,9 +5676,9 @@ } }, "node_modules/got": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-12.6.0.tgz", - "integrity": "sha512-WTcaQ963xV97MN3x0/CbAriXFZcXCfgxVp91I+Ze6pawQOa7SgzwSx2zIJJsX+kTajMnVs0xcFD1TxZKFqhdnQ==", + "version": "12.6.1", + "resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz", + "integrity": "sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==", "dependencies": { "@sindresorhus/is": "^5.2.0", "@szmarczak/http-timer": "^5.0.1", @@ -4820,10 +5699,21 @@ "url": "https://github.com/sindresorhus/got?sponsor=1" } }, + "node_modules/got/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/graphemer": { "version": "1.4.0", @@ -4832,13 +5722,13 @@ "dev": true }, "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, "dependencies": { "minimist": "^1.2.5", - "neo-async": "^2.6.0", + "neo-async": "^2.6.2", "source-map": "^0.6.1", "wordwrap": "^1.0.0" }, @@ -4861,52 +5751,41 @@ "node": ">=6" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, + "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, "engines": { "node": ">= 0.4" @@ -4928,12 +5807,13 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, + "peer": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -4963,6 +5843,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/hasha/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/hasha/node_modules/type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", @@ -4972,6 +5864,18 @@ "node": ">=8" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -4993,6 +5897,24 @@ "node": ">=10" } }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hosted-git-info/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -5016,21 +5938,10 @@ "node": ">= 14" } }, - "node_modules/http-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.2.0" @@ -5039,27 +5950,16 @@ "node": ">=10.19.0" } }, - "node_modules/http2-wrapper/node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/human-signals": { @@ -5174,18 +6074,23 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, + "peer": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -5193,14 +6098,17 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", - "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5217,6 +6125,7 @@ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "peer": true, "dependencies": { "has-bigints": "^1.0.1" }, @@ -5241,6 +6150,7 @@ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -5257,6 +6167,7 @@ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, + "peer": true, "engines": { "node": ">= 0.4" }, @@ -5265,12 +6176,28 @@ } }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", "dev": true, + "peer": true, "dependencies": { - "has": "^1.0.3" + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5281,6 +6208,7 @@ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -5349,33 +6277,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-installed-globally/node_modules/global-dirs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", - "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-installed-globally/node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "engines": { - "node": ">=10" - } - }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, + "peer": true, "engines": { "node": ">= 0.4" }, @@ -5408,6 +6315,7 @@ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, + "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -5435,12 +6343,12 @@ } }, "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/is-regex": { @@ -5448,6 +6356,7 @@ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -5460,24 +6369,28 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5488,6 +6401,7 @@ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, + "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -5503,6 +6417,7 @@ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, + "peer": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -5514,28 +6429,25 @@ } }, "node_modules/is-text-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", + "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", "dev": true, "dependencies": { - "text-extensions": "^1.0.0" + "text-extensions": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "peer": true, + "dependencies": { + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -5566,6 +6478,7 @@ "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -5583,10 +6496,11 @@ } }, "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "peer": true }, "node_modules/isexe": { "version": "2.0.0", @@ -5603,9 +6517,9 @@ } }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "engines": { "node": ">=8" @@ -5638,6 +6552,15 @@ "node": ">=8" } }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/istanbul-lib-processinfo": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", @@ -5656,38 +6579,29 @@ } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-report/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5720,9 +6634,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -5869,9 +6783,9 @@ "dev": true }, "node_modules/keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dependencies": { "json-buffer": "3.0.1" } @@ -5973,15 +6887,15 @@ } }, "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", "dev": true, "dependencies": { - "p-locate": "^5.0.0" + "p-locate": "^6.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6130,15 +7044,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/log-symbols/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -6172,17 +7077,35 @@ } }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, "dependencies": { "yallist": "^3.0.2" } }, - "node_modules/lru-cache/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } }, "node_modules/map-obj": { "version": "4.3.0", @@ -6197,25 +7120,12 @@ } }, "node_modules/meow": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", - "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", + "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", "dev": true, - "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, "engines": { - "node": ">=10" + "node": ">=16.10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6292,10 +7202,19 @@ "node": ">= 6" } }, + "node_modules/minimist-options/node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/minipass": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.4.tgz", - "integrity": "sha512-lwycX3cBMTvcejsHITUgYj6Gy6A7Nh4Q6h9NP4sTHY1ccJlC7yKzDmiShEHsJ16Jf1nKGDEaiHxiltsJEvk0nQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "engines": { "node": ">=8" } @@ -6374,6 +7293,30 @@ "node": ">= 14.0.0" } }, + "node_modules/mocha/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -6385,44 +7328,53 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/mocha/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/mocha/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "color-name": "~1.1.4" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=7.0.0" } }, - "node_modules/mocha/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "node_modules/mocha/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mocha/node_modules/minimatch": { @@ -6437,34 +7389,66 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/mocha/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/mocha/node_modules/yargs": { @@ -6485,13 +7469,16 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "node_modules/mocha/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mock-fs": { @@ -6553,9 +7540,9 @@ "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" }, "node_modules/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -6572,9 +7559,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -6594,9 +7581,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/nopt": { @@ -6628,21 +7615,6 @@ "node": ">=10" } }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -6653,9 +7625,9 @@ } }, "node_modules/normalize-url": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", - "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", + "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", "engines": { "node": ">=14.16" }, @@ -6786,23 +7758,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/nyc/node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "node_modules/nyc/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -6816,31 +7771,36 @@ "node": ">=8" } }, - "node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/nyc/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=8" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/nyc/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/nyc/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "p-locate": "^4.1.0" }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/nyc/node_modules/p-limit": { @@ -6870,18 +7830,21 @@ "node": ">=8" } }, - "node_modules/nyc/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/nyc/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, "engines": { "node": ">=8" } }, + "node_modules/nyc/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/nyc/node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -6946,10 +7909,11 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, + "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6964,13 +7928,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -6982,29 +7946,63 @@ } }, "node_modules/object.entries": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", - "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -7062,30 +8060,30 @@ } }, "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "yocto-queue": "^1.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", "dev": true, "dependencies": { - "p-limit": "^3.0.2" + "p-limit": "^4.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7128,9 +8126,9 @@ } }, "node_modules/package-json": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz", - "integrity": "sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz", + "integrity": "sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==", "dependencies": { "got": "^12.1.0", "registry-auth-token": "^5.0.1", @@ -7144,113 +8142,212 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", + "dev": true + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-type/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "dependencies": { - "callsites": "^3.0.0" + "p-locate": "^4.1.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "@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" + "p-try": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, "engines": { "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/pkg-dir/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-to-regexp": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", - "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", - "dev": true - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/picocolors": { + "node_modules/possible-typed-array-names": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", "dev": true, + "peer": true, "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "node": ">= 0.4" } }, "node_modules/prelude-ls": { @@ -7306,9 +8403,9 @@ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==" }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -7359,12 +8456,14 @@ ] }, "node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true, + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/randombytes": { @@ -7390,6 +8489,11 @@ "rc": "cli.js" } }, + "node_modules/rc/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -7399,96 +8503,97 @@ } }, "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", "dev": true, "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==", "dev": true, "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, "node_modules/read-pkg-up/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "locate-path": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "p-try": "^1.0.0" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" + "p-limit": "^1.1.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "node_modules/read-pkg-up/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true, "engines": { - "node": ">=8" + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "engines": { + "node": ">=4" } }, "node_modules/read-pkg/node_modules/hosted-git-info": { @@ -7518,19 +8623,10 @@ "semver": "bin/semver" } }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/readable-stream": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz", - "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -7571,14 +8667,16 @@ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -7649,12 +8747,12 @@ "dev": true }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -7717,6 +8815,25 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "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" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/rlp": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/rlp/-/rlp-3.0.0.tgz", @@ -7756,6 +8873,25 @@ "tslib": "^2.1.0" } }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -7776,26 +8912,35 @@ ] }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/semver-diff": { @@ -7812,20 +8957,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/semver-diff/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "yallist": "^4.0.0" }, "engines": { "node": ">=10" } }, + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -7840,6 +8987,39 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "peer": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -7874,23 +9054,35 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/sinon": { "version": "17.0.1", @@ -7911,23 +9103,14 @@ } }, "node_modules/sinon/node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" } }, - "node_modules/sinon/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/sinon/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7971,25 +9154,16 @@ "node": ">=8" } }, - "node_modules/spawn-wrap/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/spawn-wrap/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, "dependencies": { "spdx-expression-parse": "^3.0.0", @@ -7997,9 +9171,9 @@ } }, "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", "dev": true }, "node_modules/spdx-expression-parse": { @@ -8013,9 +9187,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", + "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", "dev": true }, "node_modules/split": { @@ -8031,12 +9205,12 @@ } }, "node_modules/split2": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", - "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", "dev": true, - "dependencies": { - "readable-stream": "^3.0.0" + "engines": { + "node": ">= 10.x" } }, "node_modules/sprintf-js": { @@ -8073,6 +9247,32 @@ "node": ">=10" } }, + "node_modules/standard-version/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/standard-version/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/standard-version/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -8084,6 +9284,12 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/standard-version/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/standard-version/node_modules/conventional-changelog-conventionalcommits": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz", @@ -8098,19 +9304,148 @@ "node": ">=10" } }, - "node_modules/standard-version/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/standard-version/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/standard-version/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/standard-version/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/standard-version/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/standard-version/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/standard-version/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/standard-version/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/standard-version/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/standard-version/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/standard-version/node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/standard-version/node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" }, "engines": { - "node": ">=10" + "node": ">=7.0.0" } }, "node_modules/standard-version/node_modules/yargs": { @@ -8131,6 +9466,18 @@ "node": ">=10" } }, + "node_modules/standard-version/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -8152,29 +9499,53 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8244,15 +9615,18 @@ } }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -8268,13 +9642,13 @@ } }, "node_modules/tar": { - "version": "6.1.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", - "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" @@ -8302,13 +9676,36 @@ "node": ">=8" } }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/text-extensions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", - "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", + "integrity": "sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==", "dev": true, "engines": { - "node": ">=0.10" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/text-table": { @@ -8368,9 +9765,9 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "peer": true, "dependencies": { @@ -8422,9 +9819,9 @@ } }, "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" }, "node_modules/type-check": { "version": "0.4.0", @@ -8448,9 +9845,9 @@ } }, "node_modules/type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { "node": ">=10" @@ -8459,15 +9856,78 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "peer": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8519,6 +9979,7 @@ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -8564,9 +10025,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -8576,6 +10037,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { @@ -8583,7 +10048,7 @@ "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -8614,31 +10079,6 @@ "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, - "node_modules/update-notifier/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/update-notifier/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -8755,6 +10195,7 @@ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, + "peer": true, "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -8767,23 +10208,23 @@ } }, "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", "dev": true }, "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, + "peer": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -8873,55 +10314,67 @@ "dev": true }, "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dependencies": { - "color-convert": "^2.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dependencies": { - "color-name": "~1.1.4" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=7.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -8938,6 +10391,11 @@ "typedarray-to-buffer": "^3.1.5" } }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, "node_modules/ws": { "version": "8.16.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", @@ -8995,10 +10453,16 @@ "node": ">=0.10.32" } }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, "node_modules/yargs": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", - "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { "cliui": "^8.0.1", @@ -9014,9 +10478,9 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, "engines": { "node": ">=10" @@ -9061,15 +10525,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs-unparser/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/yargs/node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", @@ -9080,12 +10535,12 @@ } }, "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12.20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" From 047cf8e20589fdcb597e96176c1d60f9f506cc8b Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 4 Apr 2024 18:51:27 +1000 Subject: [PATCH 30/88] fix(contract): don't use `-G` flag for both gas and gas price --- src/arguments.js | 5 +++++ src/commands/contract.js | 4 ++-- src/commands/tx.js | 7 ++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/arguments.js b/src/arguments.js index 701dbb8f..985736b8 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -1,5 +1,6 @@ import { Argument, Option } from 'commander'; import BigNumber from 'bignumber.js'; +import { MIN_GAS_PRICE } from '@aeternity/aepp-sdk'; import { NODE_URL, COMPILER_URL } from './utils/constant.js'; export const coinAmountParser = (amount) => { @@ -26,6 +27,10 @@ export const jsonOption = new Option('--json', 'Print result in json format'); export const gasOption = new Option('-G --gas [gas]', 'Amount of gas to call/deploy the contract') .argParser((gas) => +gas); +export const gasPriceOption = new Option('--gasPrice [gasPrice]', 'Gas price to call/deploy the contract') + .default(MIN_GAS_PRICE, 'Minimum gas price') // TODO: use gas price from the node after updating sdk to 13.3.0 + .argParser(coinAmountParser); + export const forceOption = new Option('-f --force', 'Ignore node version compatibility check'); export const passwordOption = new Option('-P, --password [password]', 'Wallet Password'); diff --git a/src/commands/contract.js b/src/commands/contract.js index b3f987e9..67444761 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -3,7 +3,6 @@ // This script initialize all `contract` command's // We'll use `commander` for parsing options import { Argument, Option, Command } from 'commander'; -import { MIN_GAS_PRICE } from '@aeternity/aepp-sdk'; import CliError from '../utils/CliError.js'; import * as Contract from '../actions/contract.js'; import { @@ -11,6 +10,7 @@ import { compilerOption, jsonOption, gasOption, + gasPriceOption, feeOption, forceOption, passwordOption, @@ -137,7 +137,7 @@ addCommonOptions(program .option('-W, --no-waitMined', 'Force waiting until transaction will be mined') .addOption(passwordOption) .addOption(gasOption) - .option('-G --gasPrice [gas]', 'Amount of gas to deploy the contract', MIN_GAS_PRICE) + .addOption(gasPriceOption) .addOption(feeOption) .addOption(ttlOption) .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') diff --git a/src/commands/tx.js b/src/commands/tx.js index 6cffdcd5..b82736a8 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -6,13 +6,14 @@ // Also we need `esm` package to handle `ES imports` import { Command } from 'commander'; import { - NAME_TTL, CLIENT_TTL, MIN_GAS_PRICE, ORACLE_TTL, QUERY_TTL, RESPONSE_TTL, + NAME_TTL, CLIENT_TTL, ORACLE_TTL, QUERY_TTL, RESPONSE_TTL, } from '@aeternity/aepp-sdk'; import * as Transaction from '../actions/transaction.js'; import { nodeOption, jsonOption, gasOption, + gasPriceOption, nonceArgument, feeOption, forceOption, @@ -121,7 +122,7 @@ addCommonOptions(program .addOption(ttlOption) .addOption(feeOption) .addOption(gasOption) - .option('-G --gasPrice [gas]', 'Amount of gas to deploy the contract', MIN_GAS_PRICE) + .addOption(gasPriceOption) .option('--amount [amount]', 'Amount', 0) .description('Build contract create transaction.') .action(Transaction.contractDeploy)); @@ -137,7 +138,7 @@ addCommonOptions(program .addOption(ttlOption) .addOption(feeOption) .addOption(gasOption) - .option('-G --gasPrice [gas]', 'Amount of gas to deploy the contract', MIN_GAS_PRICE) + .addOption(gasPriceOption) .option('--amount [amount]', 'Amount', 0) .description('Build contract create transaction.') .action(Transaction.contractCall)); From 8e1d0db0b612b53ff382f14d7f29556bbbe394b6 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 4 Apr 2024 19:07:13 +1000 Subject: [PATCH 31/88] refactor: always put a comma after short option --- src/arguments.js | 4 ++-- src/commands/chain.js | 4 ++-- src/commands/contract.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/arguments.js b/src/arguments.js index 985736b8..08dcf4d6 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -24,14 +24,14 @@ export const compilerOption = new Option('--compilerUrl [compilerUrl]', 'Compile export const jsonOption = new Option('--json', 'Print result in json format'); -export const gasOption = new Option('-G --gas [gas]', 'Amount of gas to call/deploy the contract') +export const gasOption = new Option('-G, --gas [gas]', 'Amount of gas to call/deploy the contract') .argParser((gas) => +gas); export const gasPriceOption = new Option('--gasPrice [gasPrice]', 'Gas price to call/deploy the contract') .default(MIN_GAS_PRICE, 'Minimum gas price') // TODO: use gas price from the node after updating sdk to 13.3.0 .argParser(coinAmountParser); -export const forceOption = new Option('-f --force', 'Ignore node version compatibility check'); +export const forceOption = new Option('-f, --force', 'Ignore node version compatibility check'); export const passwordOption = new Option('-P, --password [password]', 'Wallet Password'); diff --git a/src/commands/chain.js b/src/commands/chain.js index 4f85bbee..97da1349 100755 --- a/src/commands/chain.js +++ b/src/commands/chain.js @@ -63,8 +63,8 @@ addCommonOptions(program // Example: `aecli chain play --height 100` --> print blocks until reach height 100 starting from top addCommonOptions(program .command('play') - .option('-L --limit [playlimit]', 'Limit for play command', 10) - .option('-P --height [playToHeight]', 'Play to selected height') + .option('-L, --limit [playlimit]', 'Limit for play command', 10) + .option('-P, --height [playToHeight]', 'Play to selected height') .description('Real-time block monitoring') .action(Chain.play)); diff --git a/src/commands/contract.js b/src/commands/contract.js index 67444761..5a1963db 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -31,7 +31,7 @@ const callArgs = new Argument('[args]', 'JSON-encoded arguments array of contrac }) .default([]); -const descriptorPathOption = new Option('-d --descrPath [descrPath]', 'Path to contract descriptor file'); +const descriptorPathOption = new Option('-d, --descrPath [descrPath]', 'Path to contract descriptor file'); const contractSourceFilenameOption = new Option('--contractSource [contractSource]', 'Contract source code file name'); const contractAciFilenameOption = new Option('--contractAci [contractAci]', 'Contract ACI file name'); @@ -108,8 +108,8 @@ addCommonOptions(program .addOption(networkIdOption) .addOption(passwordOption) .addOption(gasOption) - .option('-s --callStatic', 'Call static') - .option('-t --topHash', 'Hash of block to make call') + .option('-s, --callStatic', 'Call static') + .option('-t, --topHash', 'Hash of block to make call') .addOption(feeOption) .addOption(ttlOption) .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') From 39df23c723a4a32145daa5afdb84d09eedc3f480 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 4 Apr 2024 19:10:07 +1000 Subject: [PATCH 32/88] refactor(tx-builder): remove options already added as common options --- commitlint.config.js | 1 + src/commands/tx.js | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/commitlint.config.js b/commitlint.config.js index baa8b0a8..c208a4d8 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -13,6 +13,7 @@ export default { 'deps-dev', 'oracle', 'release', + 'tx-builder', ], ], }, diff --git a/src/commands/tx.js b/src/commands/tx.js index b82736a8..cea47a78 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -64,8 +64,6 @@ addCommonOptions(program .command('name-update ') .addArgument(nonceArgument) .argument('[pointers...]') - .addOption(ttlOption) - .addOption(feeOption) .option('--nameTtl [nameTtl]', 'Validity of name.', NAME_TTL) .option('--clientTtl [clientTtl]', 'Client ttl.', CLIENT_TTL) .description('Build name update transaction.') @@ -79,8 +77,6 @@ addCommonOptions(program addCommonOptions(program .command('name-claim ') .addArgument(nonceArgument) - .addOption(ttlOption) - .addOption(feeOption) .option('--nameFee [nameFee]', 'Name fee.') .description('Build name claim transaction.') .action(Transaction.nameClaim)); @@ -93,8 +89,6 @@ addCommonOptions(program addCommonOptions(program .command('name-transfer ') .addArgument(nonceArgument) - .addOption(ttlOption) - .addOption(feeOption) .description('Build name tansfer transaction.') .action(Transaction.nameTransfer)); @@ -106,8 +100,6 @@ addCommonOptions(program addCommonOptions(program .command('name-revoke ') .addArgument(nonceArgument) - .addOption(ttlOption) - .addOption(feeOption) .description('Build name revoke transaction.') .action(Transaction.nameRevoke)); @@ -119,8 +111,6 @@ addCommonOptions(program addCommonOptions(program .command('contract-deploy ') .addArgument(nonceArgument) - .addOption(ttlOption) - .addOption(feeOption) .addOption(gasOption) .addOption(gasPriceOption) .option('--amount [amount]', 'Amount', 0) @@ -135,8 +125,6 @@ addCommonOptions(program addCommonOptions(program .command('contract-call ') .addArgument(nonceArgument) - .addOption(ttlOption) - .addOption(feeOption) .addOption(gasOption) .addOption(gasPriceOption) .option('--amount [amount]', 'Amount', 0) @@ -151,8 +139,6 @@ addCommonOptions(program addCommonOptions(program .command('oracle-register ') .addArgument(nonceArgument) - .addOption(ttlOption) - .addOption(feeOption) .option('--queryFee [queryFee]', 'Oracle Query fee.', 0) .option('--oracleTtl [oracleTtl]', 'Oracle Ttl.', ORACLE_TTL.value) .description('Build oracle register transaction.') @@ -166,8 +152,6 @@ addCommonOptions(program addCommonOptions(program .command('oracle-post-query ') .addArgument(nonceArgument) - .addOption(ttlOption) - .addOption(feeOption) .option('--queryFee [queryFee]', 'Oracle Query fee.', 0) .option('--queryTtl [oracleTtl]', 'Oracle Ttl.', QUERY_TTL.value) .option('--responseTtl [oracleTtl]', 'Oracle Ttl.', RESPONSE_TTL.value) @@ -182,8 +166,6 @@ addCommonOptions(program addCommonOptions(program .command('oracle-extend ') .addArgument(nonceArgument) - .addOption(ttlOption) - .addOption(feeOption) .description('Build oracle extend transaction.') .action(Transaction.oracleExtend)); @@ -195,8 +177,6 @@ addCommonOptions(program addCommonOptions(program .command('oracle-respond ') .addArgument(nonceArgument) - .addOption(ttlOption) - .addOption(feeOption) .option('--responseTtl [oracleTtl]', 'Oracle Ttl.', RESPONSE_TTL.value) .description('Build oracle extend transaction.') .action(Transaction.oracleRespond)); From 5a81814bf39e156e00e8f8c6ed6d903770725446 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 4 Apr 2024 20:43:43 +1000 Subject: [PATCH 33/88] fix(chain)!: use mainnet instead testnet by default BREAKING CHANGE: aecli connects to mainnet by default Use ``` $ aecli select-node https://testnet.aeternity.io ``` to switch back to testnet. --- src/utils/constant.js | 2 +- test/other.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/constant.js b/src/utils/constant.js index 501c8469..e788bc75 100644 --- a/src/utils/constant.js +++ b/src/utils/constant.js @@ -2,5 +2,5 @@ // That script contains default configuration for `CLI` // ## CONNECTION -export const NODE_URL = 'https://testnet.aeternity.io'; +export const NODE_URL = 'https://mainnet.aeternity.io'; export const COMPILER_URL = 'https://v7.compiler.aepps.com'; diff --git a/test/other.js b/test/other.js index 6ffb44b1..d4f74f31 100644 --- a/test/other.js +++ b/test/other.js @@ -6,7 +6,7 @@ import mainProgram from '../src/commands/main.js'; describe('Other tests', () => { it('Config', async () => { expect(await executeProgram(mainProgram, ['config'])).to.equal( - 'Node https://testnet.aeternity.io network id ae_uat, version 6.13.0\n' + 'Node https://mainnet.aeternity.io network id ae_mainnet, version 6.13.0\n' + 'Compiler https://v7.compiler.aepps.com version 7.4.0', ); }).timeout(4000); From e960697b8b956ff8079bde1abd5b34aef1252a5b Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 8 Apr 2024 00:18:38 +1000 Subject: [PATCH 34/88] ci: replace nyc with c8 to fix module coverage reports --- .github/workflows/main.yml | 8 +- .gitignore | 3 +- package-lock.json | 1626 ++++++------------------------------ package.json | 2 +- 4 files changed, 262 insertions(+), 1377 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 317aa4b2..14445158 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,7 @@ name: Test on: push: - branches: - - master - - develop + branches: [master, develop] pull_request: jobs: main: @@ -34,8 +32,8 @@ jobs: - run: npm run lint - run: npm run docs - run: docker compose up -d --wait - - run: npx nyc npm test - - run: npx nyc report --reporter=text-lcov > coverage.lcov + - run: npx c8 npm test + - run: npx c8 report --reporter=text-lcov > coverage.lcov - uses: codecov/codecov-action@v4 with: files: coverage.lcov diff --git a/.gitignore b/.gitignore index 44af9fab..83770e98 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ docs /docker-compose.override.yml /pnpm-debug.log bin -/.nyc_output +/coverage +/coverage.lcov diff --git a/package-lock.json b/package-lock.json index d085a423..c7dd88b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,13 +23,13 @@ "devDependencies": { "@commitlint/cli": "^19.2.1", "@commitlint/config-conventional": "^19.1.0", + "c8": "^9.1.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", "mocha": "^10.4.0", "mock-fs": "^5.2.0", - "nyc": "^15.1.0", "sinon": "^17.0.1", "standard-version": "^9.5.0" }, @@ -123,19 +123,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@azure/abort-controller": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", @@ -275,198 +262,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/compat-data": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", - "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", - "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.4", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.4", - "@babel/parser": "^7.24.4", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", - "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.0", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", - "dev": true, - "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" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", - "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-validator-identifier": { "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", @@ -476,29 +271,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", - "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/highlight": { "version": "7.24.2", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", @@ -570,18 +342,6 @@ "node": ">=4" } }, - "node_modules/@babel/parser": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", - "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/runtime-corejs3": { "version": "7.24.4", "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.4.tgz", @@ -594,63 +354,11 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", - "@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.24.1", - "@babel/types": "^7.24.0", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true }, "node_modules/@commitlint/cli": { "version": "19.2.1", @@ -1013,105 +721,6 @@ "node": ">=6.9.0" } }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -1121,20 +730,6 @@ "node": ">=8" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -1144,15 +739,6 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", @@ -1408,6 +994,12 @@ "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, "node_modules/@types/json-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", @@ -1525,19 +1117,6 @@ "node": ">= 14" } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", @@ -1603,29 +1182,11 @@ "node": ">= 8" } }, - "node_modules/append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/aproba": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" }, - "node_modules/archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", - "dev": true - }, "node_modules/are-we-there-yet": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", @@ -1993,85 +1554,169 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", - "dev": true, + "node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "funding": [ { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" + "type": "github", + "url": "https://github.com/sponsors/feross" }, { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" + "type": "patreon", + "url": "https://www.patreon.com/feross" }, { - "type": "github", - "url": "https://github.com/sponsors/ai" + "type": "consulting", + "url": "https://feross.org/support" } ], "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/c8": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" }, "bin": { - "browserslist": "cli.js" + "c8": "bin/c8.js" }, "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "node": ">=14.14.0" + } + }, + "node_modules/c8/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bs58": { + "node_modules/c8/node_modules/p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "dependencies": { - "base-x": "^4.0.0" + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "node_modules/c8/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" } }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "node_modules/c8/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } }, - "node_modules/bufferutil": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", - "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", - "hasInstallScript": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, + "node_modules/c8/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, "engines": { - "node": ">=6.14.2" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cacheable-lookup": { @@ -2110,21 +1755,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -2188,26 +1818,6 @@ "node": ">=8" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001605", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz", - "integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, "node_modules/canonicalize": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-2.0.0.tgz", @@ -2313,15 +1923,6 @@ "node": ">=10" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/cli-boxes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", @@ -2428,12 +2029,6 @@ "node": ">=18" } }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, "node_modules/compare-func": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", @@ -3486,9 +3081,9 @@ } }, "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, "node_modules/core-js-pure": { @@ -3786,21 +3381,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/default-require-extensions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", - "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", - "dev": true, - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/defer-to-connect": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", @@ -3986,12 +3566,6 @@ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, - "node_modules/electron-to-chromium": { - "version": "1.4.726", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.726.tgz", - "integrity": "sha512-xtjfBXn53RORwkbyKvDfTajtnTp0OJoPOIBzXvkNbb7+YYvCHJflba3L7Txyx/6Fov3ov2bGPr/n5MTixmPhdQ==", - "dev": true - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -4169,12 +3743,6 @@ "node": ">=0.10" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "node_modules/es6-iterator": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", @@ -4651,19 +4219,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esquery": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", @@ -4829,23 +4384,6 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "node_modules/find-up": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz", @@ -4903,24 +4441,21 @@ } }, "node_modules/foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" + "signal-exit": "^4.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/form-data-encoder": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", @@ -4929,26 +4464,6 @@ "node": ">= 14.17" } }, - "node_modules/fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/fs-extra": { "version": "11.2.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", @@ -5070,15 +4585,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -5116,15 +4622,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/get-pkg-repo": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz", @@ -5827,43 +5324,6 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, - "node_modules/hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "dev": true, - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/hasha/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/hasha/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -6486,94 +5946,32 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "peer": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isomorphic-ws": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", - "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", - "peerDependencies": { - "ws": "*" - } - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "peer": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "peerDependencies": { + "ws": "*" } }, - "node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", - "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, "engines": { "node": ">=8" } @@ -6619,20 +6017,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/istanbul-reports": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", @@ -6673,18 +6057,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/json-bigint": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", @@ -6728,18 +6100,6 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -6913,12 +6273,6 @@ "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "dev": true }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true - }, "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", @@ -7076,15 +6430,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -7563,341 +6908,96 @@ "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-url": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", - "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "node_modules/nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "node_modules/nyc/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/nyc/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/nyc/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" } }, - "node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dependencies": { - "p-try": "^2.0.0" + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" }, "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/nyc/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/nyc/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "node_modules/normalize-url": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", + "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "path-key": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" } }, "node_modules/object-assign": { @@ -8089,18 +7189,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -8110,21 +7198,6 @@ "node": ">=6" } }, - "node_modules/package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/package-json": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz", @@ -8267,79 +7340,6 @@ "node": ">=0.10.0" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", @@ -8373,18 +7373,6 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "node_modules/process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -8710,18 +7698,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", - "dev": true, - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -8740,12 +7716,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -9137,29 +8107,6 @@ "node": ">=0.10.0" } }, - "node_modules/spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/spawn-wrap/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -9213,12 +8160,6 @@ "node": ">= 10.x" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "node_modules/standard-version": { "version": "9.5.0", "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-9.5.0.tgz", @@ -9569,15 +8510,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -9729,15 +8661,6 @@ "readable-stream": "3" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -10024,36 +8947,6 @@ "node": ">= 10.0.0" } }, - "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "node_modules/update-notifier": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-7.0.0.tgz", @@ -10105,13 +8998,18 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, - "bin": { - "uuid": "dist/bin/uuid" + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" } }, "node_modules/validate-npm-package-license": { @@ -10207,12 +9105,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, "node_modules/which-typed-array": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", @@ -10453,12 +9345,6 @@ "node": ">=0.10.32" } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 77bf4793..71d09bc3 100644 --- a/package.json +++ b/package.json @@ -18,13 +18,13 @@ "devDependencies": { "@commitlint/cli": "^19.2.1", "@commitlint/config-conventional": "^19.1.0", + "c8": "^9.1.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", "mocha": "^10.4.0", "mock-fs": "^5.2.0", - "nyc": "^15.1.0", "sinon": "^17.0.1", "standard-version": "^9.5.0" }, From 2482434a4e569f57849c73c38552dfe02d4da6cb Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 6 Apr 2024 00:21:59 +1000 Subject: [PATCH 35/88] chore(deps): update to sdk@13.3.0 --- docker-compose.yml | 2 +- package-lock.json | 105 +++++++++++++----------------------- package.json | 2 +- src/arguments.js | 12 ++--- src/commands/main.js | 14 +++-- src/utils/cli.js | 12 +++-- src/utils/constant.js | 6 --- test/account.js | 8 +-- test/contract.js | 8 ++- test/contracts/contract.aes | 2 +- test/inspect.js | 8 +-- test/name.js | 2 +- test/oracle.js | 2 +- test/tx.js | 64 +++++++++++++--------- 14 files changed, 110 insertions(+), 137 deletions(-) delete mode 100644 src/utils/constant.js diff --git a/docker-compose.yml b/docker-compose.yml index 2a49c402..0e102274 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: stop_grace_period: 0s compiler: - image: aeternity/aesophia_http:v7.4.0 + image: aeternity/aesophia_http:v7.6.1 ports: [3080:3080] # TODO: remove after releasing https://github.com/aeternity/aesophia_http/pull/133 healthcheck: diff --git a/package-lock.json b/package-lock.json index c7dd88b7..849f77af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.0.0", "license": "ISC", "dependencies": { - "@aeternity/aepp-sdk": "^13.2.2", + "@aeternity/aepp-sdk": "^13.3.0", "bignumber.js": "^9.1.2", "commander": "^12.0.0", "env-paths": "^3.0.0", @@ -59,27 +59,27 @@ } }, "node_modules/@aeternity/aepp-sdk": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-13.2.2.tgz", - "integrity": "sha512-hTpAV4E8I0Y/IfjizsHlpzPN3gW4Bkr08GVqmRcGUh5yi7MQA9N54kbTfl+kQlcp6AYC9WVk3fhNuoTUOzISig==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-13.3.0.tgz", + "integrity": "sha512-n2UCz+jWisFrZ6D60LMyl1fUOWmEPcH6KvfwjAibSEUXtEFXDAYP7BjjPEap3po0VKvHMrZpKWBI2UkGZ2ylxg==", "dependencies": { - "@aeternity/aepp-calldata": "^1.5.1", + "@aeternity/aepp-calldata": "^1.7.0", "@aeternity/argon2": "^0.0.1", "@aeternity/uuid": "^0.0.1", - "@azure/core-client": "1.6.0", - "@azure/core-rest-pipeline": "^1.11.0", - "@babel/runtime-corejs3": "^7.22.6", - "@ledgerhq/hw-transport": "^6.28.6", - "@types/aes-js": "^3.1.1", - "@types/json-bigint": "^1.0.1", - "@types/node": "~18.11.9", - "@types/sha.js": "^2.4.1", - "@types/uuid": "^9.0.2", - "@types/webextension-polyfill": "^0.10.1", - "@types/websocket": "^1.0.5", - "@types/ws": "^8.5.5", + "@azure/core-client": "^1.8.0", + "@azure/core-rest-pipeline": "^1.14.0", + "@babel/runtime-corejs3": "^7.24.0", + "@ledgerhq/hw-transport": "^6.30.4", + "@types/aes-js": "^3.1.4", + "@types/json-bigint": "^1.0.4", + "@types/node": "~18.13", + "@types/sha.js": "^2.4.4", + "@types/uuid": "^9.0.8", + "@types/webextension-polyfill": "^0.10.7", + "@types/websocket": "^1.0.10", + "@types/ws": "^8.5.10", "aes-js": "^3.1.2", - "bignumber.js": "^9.1.1", + "bignumber.js": "^9.1.2", "bip32-path": "^0.4.2", "blakejs": "^1.2.1", "bs58": "^5.0.0", @@ -95,7 +95,7 @@ "tweetnacl-auth": "^1.0.1", "varuint-bitcoin": "^1.1.2", "websocket": "^1.0.34", - "ws": "^8.13.0" + "ws": "^8.16.0" }, "engines": { "node": ">=14.19.0" @@ -124,14 +124,14 @@ } }, "node_modules/@azure/abort-controller": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", - "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.1.tgz", + "integrity": "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ==", "dependencies": { - "tslib": "^2.2.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" } }, "node_modules/@azure/core-auth": { @@ -147,32 +147,21 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-auth/node_modules/@azure/abort-controller": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.1.tgz", - "integrity": "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@azure/core-client": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.6.0.tgz", - "integrity": "sha512-YhSf4cb61ApSjItscp9XoaLq8KRnacPDAhmjAZSMnn/gs6FhFbZNfOBOErG2dDj7JRknVtCmJ5mLmfR2sLa11A==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.1.tgz", + "integrity": "sha512-hHYFx9lz0ZpbO5W+iotU9tmIX1jPcoIjYUEUaWGuMi1628LCQ/z05TUR4P+NRtMgyoHQuyVYyGQiD3PC47kaIA==", "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.5.0", + "@azure/abort-controller": "^2.0.0", + "@azure/core-auth": "^1.4.0", + "@azure/core-rest-pipeline": "^1.9.1", "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.0.0", + "@azure/core-util": "^1.6.1", "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" } }, "node_modules/@azure/core-rest-pipeline": { @@ -193,17 +182,6 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.1.tgz", - "integrity": "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@azure/core-tracing": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.1.1.tgz", @@ -227,17 +205,6 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-util/node_modules/@azure/abort-controller": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.1.tgz", - "integrity": "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@azure/logger": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.1.tgz", @@ -1019,9 +986,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.11.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.19.tgz", - "integrity": "sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw==" + "version": "18.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", + "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==" }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", diff --git a/package.json b/package.json index 71d09bc3..2111b3c0 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ }, "type": "module", "dependencies": { - "@aeternity/aepp-sdk": "^13.2.2", + "@aeternity/aepp-sdk": "^13.3.0", "bignumber.js": "^9.1.2", "commander": "^12.0.0", "env-paths": "^3.0.0", diff --git a/src/arguments.js b/src/arguments.js index 08dcf4d6..f67f172b 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -1,7 +1,6 @@ import { Argument, Option } from 'commander'; import BigNumber from 'bignumber.js'; import { MIN_GAS_PRICE } from '@aeternity/aepp-sdk'; -import { NODE_URL, COMPILER_URL } from './utils/constant.js'; export const coinAmountParser = (amount) => { if (amount.endsWith('ae')) return new BigNumber(amount.slice(0, -2)).shiftedBy(18); @@ -15,11 +14,11 @@ export const nonceArgument = new Argument('', 'Unique number that is requ .argParser((nonce) => +nonce); export const nodeOption = new Option('-u, --url [nodeUrl]', 'Node to connect to') - .default(NODE_URL, 'Aeternity testnet') + .default('https://mainnet.aeternity.io', 'mainnet') .env('AECLI_NODE_URL'); export const compilerOption = new Option('--compilerUrl [compilerUrl]', 'Compiler to connect to') - .default(COMPILER_URL, 'Stable compiler') + .default('https://v7.compiler.aepps.com', 'stable compiler') .env('AECLI_COMPILER_URL'); export const jsonOption = new Option('--json', 'Print result in json format'); @@ -27,15 +26,12 @@ export const jsonOption = new Option('--json', 'Print result in json format'); export const gasOption = new Option('-G, --gas [gas]', 'Amount of gas to call/deploy the contract') .argParser((gas) => +gas); -export const gasPriceOption = new Option('--gasPrice [gasPrice]', 'Gas price to call/deploy the contract') - .default(MIN_GAS_PRICE, 'Minimum gas price') // TODO: use gas price from the node after updating sdk to 13.3.0 - .argParser(coinAmountParser); +export const gasPriceOption = new Option('--gasPrice [gasPrice]', `Gas price to call/deploy the contract (default: based on network demand or ${MIN_GAS_PRICE})`); export const forceOption = new Option('-f, --force', 'Ignore node version compatibility check'); export const passwordOption = new Option('-P, --password [password]', 'Wallet Password'); -export const ttlOption = new Option('-T, --ttl [ttl]', 'Validity of the transaction in number of blocks') - .default(0, 'forever'); +export const ttlOption = new Option('-T, --ttl [ttl]', 'Validity of the transaction in number of blocks (default: current height increased by 3 or infinity)'); export const networkIdOption = new Option('--networkId [networkId]', 'Network id'); diff --git a/src/commands/main.js b/src/commands/main.js index 3a2ad809..ca1f06c1 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -8,8 +8,9 @@ import fs from 'fs-extra'; import { fileURLToPath } from 'url'; import { resolve } from 'path'; import updateNotifier from 'update-notifier'; -import { Node, CompilerCli, CompilerHttpNode } from '@aeternity/aepp-sdk'; +import { Node } from '@aeternity/aepp-sdk'; import { compilerOption, nodeOption } from '../arguments.js'; +import { getCompilerByUrl } from '../utils/cli.js'; import { addToConfig } from '../utils/config.js'; import CliError from '../utils/CliError.js'; @@ -41,18 +42,14 @@ const EXECUTABLE_CMD = [ EXECUTABLE_CMD.forEach(({ name, desc }) => program.command(name, desc)); async function getNodeDescription(url) { - // TODO: remove after fixing https://github.com/aeternity/aepp-sdk-js/issues/1673 - const omitUncaughtExceptions = () => {}; - process.on('uncaughtException', omitUncaughtExceptions); - const nodeInfo = await (new Node(url)).getNodeInfo().catch(() => {}); - process.off('uncaughtException', omitUncaughtExceptions); + const nodeInfo = await new Node(url).getNodeInfo().catch(() => {}); return nodeInfo ? `network id ${nodeInfo.nodeNetworkId}, version ${nodeInfo.version}` : 'can\'t get node info'; } async function getCompilerDescription(url) { - const compiler = url === 'cli' ? new CompilerCli() : new CompilerHttpNode(url); + const compiler = getCompilerByUrl(url); const version = await compiler.version().catch(() => {}); return version ? `version ${version}` : 'can\'t get compiler version'; } @@ -133,7 +130,8 @@ program .action(async (url) => { const compilers = [ { name: 'Stable v7', url: 'https://v7.compiler.aepps.com/' }, - { name: 'Integrated compiler (requires Erlang installed)', url: 'cli' }, + { name: 'Integrated compiler, FATE 2 (requires Erlang)', url: 'cli' }, + { name: 'Integrated compiler, FATE 3 (requires Erlang)', url: 'cli8' }, { name: 'Latest', url: 'https://latest.compiler.aeternity.io/' }, ]; await addToConfig({ diff --git a/src/utils/cli.js b/src/utils/cli.js index 7f76bce8..889e2b28 100644 --- a/src/utils/cli.js +++ b/src/utils/cli.js @@ -1,10 +1,16 @@ // # Utils `cli` Module // That script contains helper function's for work with `cli` import { - AeSdk, Node, MemoryAccount, CompilerCli, CompilerHttpNode, + AeSdk, Node, MemoryAccount, CompilerCli, CompilerCli8, CompilerHttpNode, } from '@aeternity/aepp-sdk'; import { getWalletByPathAndDecrypt } from './account.js'; +export function getCompilerByUrl(url) { + if (url === 'cli') return new CompilerCli(); + if (url === 'cli8') return new CompilerCli8(); + return new CompilerHttpNode(url); +} + export function initSdk({ url, keypair, compilerUrl, force: ignoreVersion, networkId, accounts = [], } = {}) { @@ -14,9 +20,7 @@ export function initSdk({ _microBlockCycle: process.env._MICRO_BLOCK_CYCLE, /* eslint-enable no-underscore-dangle */ nodes: url ? [{ name: 'test-node', instance: new Node(url, { ignoreVersion }) }] : [], - ...compilerUrl && { - onCompiler: compilerUrl === 'cli' ? new CompilerCli() : new CompilerHttpNode(compilerUrl), - }, + ...compilerUrl && { onCompiler: getCompilerByUrl(compilerUrl) }, networkId, accounts: [...keypair ? [new MemoryAccount(keypair.secretKey)] : [], ...accounts], }); diff --git a/src/utils/constant.js b/src/utils/constant.js deleted file mode 100644 index e788bc75..00000000 --- a/src/utils/constant.js +++ /dev/null @@ -1,6 +0,0 @@ -// # Utils `constant` Module -// That script contains default configuration for `CLI` - -// ## CONNECTION -export const NODE_URL = 'https://mainnet.aeternity.io'; -export const COMPILER_URL = 'https://v7.compiler.aepps.com'; diff --git a/test/account.js b/test/account.js index 879e125c..8e2bbc5c 100644 --- a/test/account.js +++ b/test/account.js @@ -83,6 +83,7 @@ Secret Key ______________________________ ${keypair.secretKey} const receiverBalance = await sdk.getBalance(publicKey); expect(+receiverBalance).to.be.equal(amount); + expect(resJson.tx.fee).to.be.a('string'); expect(resJson).to.eql({ blockHash: resJson.blockHash, blockHeight: resJson.blockHeight, @@ -91,11 +92,12 @@ Secret Key ______________________________ ${keypair.secretKey} signatures: [resJson.signatures[0]], tx: { amount: '100', - fee: '16660000000000', + fee: resJson.tx.fee, nonce: 1, payload: 'ba_Xfbg4g==', recipientId: resJson.tx.recipientId, senderId: resJson.tx.senderId, + ttl: resJson.tx.ttl, type: 'SpendTx', version: 1, }, @@ -116,9 +118,9 @@ Sender account __________________________ ${resJson.tx.senderId} Recipient account _______________________ ${resJson.tx.recipientId} Amount __________________________________ 100 Payload _________________________________ ba_Xfbg4g== -Fee _____________________________________ 16660000000000 +Fee _____________________________________ ${resJson.tx.fee} Nonce ___________________________________ 2 -TTL _____________________________________ N/A +TTL _____________________________________ ${lineEndings[12]} Version _________________________________ 1 `.trim()); }); diff --git a/test/contract.js b/test/contract.js index 8c02d31c..2fb6cc80 100644 --- a/test/contract.js +++ b/test/contract.js @@ -77,7 +77,7 @@ describe('Contract Module', function contractTests() { expect(descriptor).to.eql({ version: 1, address, - bytecode: 'cb_+L5GA6DYM5NsuGXWxxHp3/rvzpUabt5oDeNdrc22CqVocjzKwMC4kbhX/kTWRB8ANwEHNwAaBoIAAQM//pKLIDYANwIHBwcMAoIMAQICAxHQ4oJSDAEABAMR0OKCUv7Q4oJSAjcCBwcHFBQAAgD+6YyQGwA3AGcHBwEDLwICBAYItC8EEUTWRB8RaW5pdBGSiyA2EXRlc3QR0OKCUjEuVGVzdExpYi5zdW0R6YyQGxlnZXRNYXCCLwCFNy4yLjEAKvwDWw==', + bytecode: 'cb_+L5GA6Ar1lCAsdVHFnIFRGVmOW8j4LcSXxgJgqPlwvI2Zeak28C4kbhX/kTWRB8ANwEHNwAaBoIAAQM//pKLIDYANwIHBwcMAoIMAQICAxHQ4oJSDAEABAMR0OKCUv7Q4oJSAjcCBwcHFBQAAgD+6YyQGwA3AGcHBwEDLwICBAYItC8EEUTWRB8RaW5pdBGSiyA2EXRlc3QR0OKCUjEuVGVzdExpYi5zdW0R6YyQGxlnZXRNYXCCLwCFNy40LjEAF0MstQ==', aci: [{ namespace: { name: 'TestLib', typedefs: [] }, }, { @@ -195,8 +195,7 @@ describe('Contract Module', function contractTests() { callResponse.decodedResult.should.equal('6'); }); - // TODO: enable after updating sdk, issues with instanceof not working - it.skip('calls contract static with dry run account', async () => { + it('calls contract static with dry run account', async () => { const callResponse = await executeContract([ 'call', '--json', @@ -209,8 +208,7 @@ describe('Contract Module', function contractTests() { callResponse.decodedResult.should.equal('6'); }); - // TODO: enable after updating sdk, issues with instanceof not working - it.skip('returns Maps correctly', async () => { + it('returns Maps correctly', async () => { const callResponse = await executeContract([ 'call', '--json', diff --git a/test/contracts/contract.aes b/test/contracts/contract.aes index 5821446f..97926b35 100644 --- a/test/contracts/contract.aes +++ b/test/contracts/contract.aes @@ -1,5 +1,5 @@ @compiler >= 7 -@compiler < 8 +@compiler < 9 include "testLib.aes" diff --git a/test/inspect.js b/test/inspect.js index c0af8211..e7039607 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -40,6 +40,7 @@ Pending transactions: const amount = '420'; const { hash } = await sdk.spend(amount, recipient); const resJson = await executeInspect([hash, '--json']); + expect(resJson.tx.fee).to.be.a('string'); expect(resJson).to.eql({ blockHash: resJson.blockHash, blockHeight: resJson.blockHeight, @@ -49,9 +50,10 @@ Pending transactions: recipientId: recipient, senderId: sdk.address, amount, - fee: '16700000000000', + fee: resJson.tx.fee, nonce: resJson.tx.nonce, payload: 'ba_Xfbg4g==', + ttl: resJson.tx.ttl, type: 'SpendTx', version: 1, }, @@ -67,9 +69,9 @@ Sender account __________________________ ${sdk.address} Recipient account _______________________ ${recipient} Amount __________________________________ 420 Payload _________________________________ ba_Xfbg4g== -Fee _____________________________________ 16700000000000 +Fee _____________________________________ ${resJson.tx.fee} Nonce ___________________________________ ${resJson.tx.nonce} -TTL _____________________________________ N/A +TTL _____________________________________ ${resJson.tx.ttl} Version _________________________________ 1 `.trim()); }); diff --git a/test/name.js b/test/name.js index fd83f2ed..0192fd01 100644 --- a/test/name.js +++ b/test/name.js @@ -247,7 +247,7 @@ describe('AENS Module', () => { name, preClaim.salt, '--json', - ]).should.be.rejectedWith(/Giving up after 5 blocks mined, transaction hash:|error: Transaction not found/); + ]).should.be.rejectedWith('error: Transaction not found'); }).timeout(15000); }); }); diff --git a/test/oracle.js b/test/oracle.js index 68e32be4..8d1282f4 100644 --- a/test/oracle.js +++ b/test/oracle.js @@ -68,7 +68,7 @@ describe('Oracle Module', () => { it('Get non existed Oracle', async () => { const fakeOracleId = generateKeyPair().publicKey.replace('ak_', 'ok_'); await executeOracle(['get', fakeOracleId, '--json']) - .should.be.rejectedWith('Oracle not found'); // TODO: add "error: " prefix after updating sdk + .should.be.rejectedWith('error: Oracle not found'); await executeOracle(['get', 'oq_d1sadasdasda', '--json']) .should.be.rejectedWith('Encoded string have a wrong type: oq (expected: ok)'); }); diff --git a/test/tx.js b/test/tx.js index 965f71c9..f4826499 100644 --- a/test/tx.js +++ b/test/tx.js @@ -136,9 +136,10 @@ Signatures ______________________________ ["${signatures}"] const { tx } = await executeTx(['spend', TX_KEYS.publicKey, TX_KEYS.publicKey, amount, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ amount: '100', - fee: '16660000000000', + fee: detailsJson.fee, nonce, payload: 'ba_Xfbg4g==', recipientId: TX_KEYS.publicKey, @@ -152,7 +153,7 @@ Sender account __________________________ ${TX_KEYS.publicKey} Recipient account _______________________ ${TX_KEYS.publicKey} Amount __________________________________ 100 Payload _________________________________ ba_Xfbg4g== -Fee _____________________________________ 16660000000000 +Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} TTL _____________________________________ N/A Version _________________________________ 1 @@ -166,10 +167,11 @@ Version _________________________________ 1 const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.commitmentId).to.satisfy((s) => s.startsWith(Encoding.Commitment)); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ accountId: TX_KEYS.publicKey, commitmentId: detailsJson.commitmentId, - fee: '16620000000000', + fee: detailsJson.fee, nonce, type: 'NamePreclaimTx', version: 1, @@ -179,7 +181,7 @@ Tx Type _________________________________ NamePreclaimTx Account _________________________________ ${TX_KEYS.publicKey} Commitment ______________________________ ${detailsJson.commitmentId} Salt ____________________________________ N/A -Fee _____________________________________ 16620000000000 +Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} TTL _____________________________________ N/A Version _________________________________ 1 @@ -192,9 +194,10 @@ Version _________________________________ 1 const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.nameSalt).to.be.a('number'); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ accountId: TX_KEYS.publicKey, - fee: '16780000000000', + fee: detailsJson.fee, name, nameFee: '159700000000000000', nameSalt: detailsJson.nameSalt, @@ -208,7 +211,7 @@ Account _________________________________ ${TX_KEYS.publicKey} Name ____________________________________ ${name} Name Fee ________________________________ 159700000000000000 Name Salt _______________________________ ${salt} -Fee _____________________________________ 16780000000000 +Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} TTL _____________________________________ N/A Version _________________________________ 2 @@ -222,9 +225,10 @@ Version _________________________________ 2 const { tx } = await executeTx(['name-update', TX_KEYS.publicKey, nameId, nonce, TX_KEYS.publicKey, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ - clientTtl: 84600, - fee: '17800000000000', + clientTtl: 3600, + fee: detailsJson.fee, nameId, nameTtl: 180000, nonce, @@ -236,11 +240,11 @@ Version _________________________________ 2 expect(details).to.equal(` Tx Type _________________________________ NameUpdateTx Account _________________________________ ${TX_KEYS.publicKey} -Client TTL ______________________________ 84600 +Client TTL ______________________________ 3600 Name ID _________________________________ ${nameId} Name TTL ________________________________ 180000 Pointer account_pubkey __________________ ${TX_KEYS.publicKey} -Fee _____________________________________ 17800000000000 +Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} TTL _____________________________________ N/A Version _________________________________ 1 @@ -252,8 +256,9 @@ Version _________________________________ 1 const { tx } = await executeTx(['name-transfer', TX_KEYS.publicKey, TX_KEYS.publicKey, nameId, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ - fee: '17300000000000', + fee: detailsJson.fee, nameId, nonce, recipientId: TX_KEYS.publicKey, @@ -266,7 +271,7 @@ Tx Type _________________________________ NameTransferTx Account _________________________________ ${TX_KEYS.publicKey} Recipient _______________________________ ${TX_KEYS.publicKey} Name ID _________________________________ ${nameId} -Fee _____________________________________ 17300000000000 +Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} TTL _____________________________________ N/A Version _________________________________ 1 @@ -278,8 +283,9 @@ Version _________________________________ 1 const { tx } = await executeTx(['name-revoke', TX_KEYS.publicKey, nameId, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ - fee: '16620000000000', + fee: detailsJson.fee, nameId, nonce, type: 'NameRevokeTx', @@ -290,7 +296,7 @@ Version _________________________________ 1 Tx Type _________________________________ NameRevokeTx Account _________________________________ ${TX_KEYS.publicKey} Name ID _________________________________ ${nameId} -Fee _____________________________________ 16620000000000 +Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} TTL _____________________________________ N/A Version _________________________________ 1 @@ -315,6 +321,7 @@ Version _________________________________ 1 contractId = cId; const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ abiVersion: '3', vmVersion: '7', @@ -322,7 +329,7 @@ Version _________________________________ 1 callData, code: bytecode, deposit: '0', - fee: '78580000000000', + fee: detailsJson.fee, gas: 5921420, gasPrice: '1000000000', nonce, @@ -339,7 +346,7 @@ Gas _____________________________________ 5921420 Gas Price _______________________________ 1000000000 Bytecode ________________________________ ${bytecode} Call data _______________________________ ${callData} -Fee _____________________________________ 78580000000000 +Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} TTL _____________________________________ N/A Version _________________________________ 1 @@ -355,13 +362,14 @@ ABI Version _____________________________ 3 const { tx } = await executeTx(['contract-call', TX_KEYS.publicKey, contractId, callData, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ abiVersion: '3', amount: '0', callData, callerId: TX_KEYS.publicKey, contractId, - fee: '182040000000000', + fee: detailsJson.fee, gas: 5817960, gasPrice: '1000000000', nonce, @@ -376,7 +384,7 @@ Amount __________________________________ 0 Gas _____________________________________ 5817960 Gas Price _______________________________ 1000000000 Call data _______________________________ ${callData} -Fee _____________________________________ 182040000000000 +Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} TTL _____________________________________ N/A Version _________________________________ 1 @@ -389,10 +397,11 @@ ABI Version _____________________________ 3 const { tx } = await executeTx(['oracle-register', TX_KEYS.publicKey, '{city: "str"}', '{tmp:""num}', nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ abiVersion: '0', accountId: TX_KEYS.publicKey, - fee: '16672000000000', + fee: detailsJson.fee, nonce, oracleTtl: { type: 'delta', value: '500' }, queryFee: '0', @@ -405,7 +414,7 @@ ABI Version _____________________________ 3 Tx Type _________________________________ OracleRegisterTx Account _________________________________ ${TX_KEYS.publicKey} Oracle ID _______________________________ ${oracleId} -Fee _____________________________________ 16672000000000 +Fee _____________________________________ ${detailsJson.fee} Query Fee _______________________________ 0 Oracle Ttl ______________________________ {"type":"delta","value":"500"} Query Format ____________________________ {city: "str"} @@ -421,8 +430,9 @@ TTL _____________________________________ N/A const { tx } = await executeTx(['oracle-extend', TX_KEYS.publicKey, oracleId, 100, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ - fee: '15979000000000', + fee: detailsJson.fee, nonce, oracleId, oracleTtl: { type: 'delta', value: '100' }, @@ -432,7 +442,7 @@ TTL _____________________________________ N/A expect(details).to.equal(` Tx Type _________________________________ OracleExtendTx Oracle ID _______________________________ ${oracleId} -Fee _____________________________________ 15979000000000 +Fee _____________________________________ ${detailsJson.fee} Oracle Ttl ______________________________ {"type":"delta","value":"100"} Nonce ___________________________________ ${nonce} TTL _____________________________________ N/A @@ -448,8 +458,9 @@ TTL _____________________________________ N/A const { tx } = await executeTx(['oracle-post-query', TX_KEYS.publicKey, oracleId, '{city: "Berlin"}', nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ - fee: '17062000000000', + fee: detailsJson.fee, nonce, oracleId, query: '{city: "Berlin"}', @@ -466,7 +477,7 @@ Account _________________________________ ${TX_KEYS.publicKey} Oracle ID _______________________________ ${oracleId} Query ID ________________________________ N/A Query ___________________________________ {city: "Berlin"} -Fee _____________________________________ 17062000000000 +Fee _____________________________________ ${detailsJson.fee} Query Fee _______________________________ 0 Query Ttl _______________________________ {"type":"delta","value":"10"} Response Ttl ____________________________ {"type":"delta","value":"10"} @@ -486,8 +497,9 @@ TTL _____________________________________ N/A const { tx } = await executeTx(['oracle-respond', TX_KEYS.publicKey, oracleId, queryId, response, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); + expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ - fee: '16842000000000', + fee: detailsJson.fee, nonce, oracleId, queryId, @@ -500,7 +512,7 @@ TTL _____________________________________ N/A Tx Type _________________________________ OracleRespondTx Oracle ID _______________________________ ${oracleId} Query ___________________________________ ${queryId} -Fee _____________________________________ 16842000000000 +Fee _____________________________________ ${detailsJson.fee} Response ________________________________ {tmp: 10} Response Ttl ____________________________ {"type":"delta","value":"10"} Nonce ___________________________________ ${nonce} From c31e93511e4306f2464220f5e810a455b1b16ce8 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 6 Apr 2024 00:59:59 +1000 Subject: [PATCH 36/88] ci: use devmode --- docker-compose.yml | 3 +-- docker/accounts.json | 3 --- docker/aeternity.yaml | 23 ++++++++--------------- test/account.js | 1 + test/chain.js | 14 ++++++++------ test/index.js | 5 ++--- test/inspect.js | 5 ++--- test/tx.js | 7 ++++--- 8 files changed, 26 insertions(+), 35 deletions(-) delete mode 100644 docker/accounts.json diff --git a/docker-compose.yml b/docker-compose.yml index 0e102274..9b01e682 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,13 @@ version: '3' services: node: - image: aeternity/aeternity:v6.8.1 + image: aeternity/aeternity:v6.13.0 ports: [3013:3013] # TODO: remove after releasing https://github.com/aeternity/aeternity/pull/4292 healthcheck: interval: 2s volumes: - ./docker/aeternity.yaml:/home/aeternity/node/aeternity.yaml - - ./docker/accounts.json:/home/aeternity/node/data/aecore/.genesis/accounts_test.json stop_grace_period: 0s compiler: diff --git a/docker/accounts.json b/docker/accounts.json deleted file mode 100644 index 07f7c8a2..00000000 --- a/docker/accounts.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ak_2dATVcZ9KJU5a8hdsVtTv21pYiGWiPbmVcU1Pz72FFqpk9pSRR": 10000000000000001000000000000000000000 -} diff --git a/docker/aeternity.yaml b/docker/aeternity.yaml index dcf983a1..586cce30 100644 --- a/docker/aeternity.yaml +++ b/docker/aeternity.yaml @@ -1,5 +1,11 @@ # yaml-language-server: $schema=https://github.com/aeternity/aeternity/raw/master/apps/aeutils/priv/aeternity_config_schema.json +system: + dev_mode: true + +dev_mode: + auto_emit_microblocks: true + http: endpoints: dry-run: true @@ -9,18 +15,5 @@ chain: hard_forks: "1": 0 "5": 1 - -mining: - autostart: true - beneficiary: "ak_2iBPH7HUz3cSDVEUWiHg76MZJ6tZooVNBmmxcgVK6VV8KAE688" - expected_mine_rate: 1000 - micro_block_cycle: 300 - strictly_follow_top: true - cuckoo: - miner: - executable: mean15-generic - extra_args: "" - edge_bits: 15 - -fork_management: - network_id: "ae_devnet" + genesis_accounts: + ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E: 10000000000000001000000000000000000000 diff --git a/test/account.js b/test/account.js index 8e2bbc5c..e0962f2d 100644 --- a/test/account.js +++ b/test/account.js @@ -87,6 +87,7 @@ Secret Key ______________________________ ${keypair.secretKey} expect(resJson).to.eql({ blockHash: resJson.blockHash, blockHeight: resJson.blockHeight, + encodedTx: resJson.encodedTx, hash: resJson.hash, rawTx: resJson.rawTx, signatures: [resJson.signatures[0]], diff --git a/test/chain.js b/test/chain.js index 1d65c975..77cfe2cc 100644 --- a/test/chain.js +++ b/test/chain.js @@ -39,10 +39,11 @@ Transactions ____________________________ 0 expect(resJson).to.eql({ difficulty: resJson.difficulty, genesisKeyBlockHash: resJson.genesisKeyBlockHash, + hashrate: 0, listening: true, - networkId: 'ae_devnet', - nodeRevision: 'a42c1b1e84dabdad350005213a2a9334113a6832', - nodeVersion: '6.8.1', + networkId: 'ae_dev', + nodeRevision: '805c662b260cfbdb197cfef96ed07124db4b4896', + nodeVersion: '6.13.0', peerConnections: { inbound: 0, outbound: 0 }, peerCount: 0, peerPubkey: resJson.peerPubkey, @@ -53,16 +54,17 @@ Transactions ____________________________ 0 syncing: false, topBlockHeight: resJson.topBlockHeight, topKeyBlockHash: resJson.topKeyBlockHash, + uptime: resJson.uptime, }); const res = await executeChain(['status']); expect(res).to.equal(` Difficulty ______________________________ ${resJson.difficulty} -Node version ____________________________ 6.8.1 +Node version ____________________________ 6.13.0 Consensus protocol version ______________ 5 (Iris) -Node revision ___________________________ a42c1b1e84dabdad350005213a2a9334113a6832 +Node revision ___________________________ 805c662b260cfbdb197cfef96ed07124db4b4896 Genesis hash ____________________________ ${resJson.genesisKeyBlockHash} -Network ID ______________________________ ae_devnet +Network ID ______________________________ ae_dev Listening _______________________________ true Peer count ______________________________ 0 Pending transactions count ______________ 0 diff --git a/test/index.js b/test/index.js index 5f2b3286..5d3ac25b 100644 --- a/test/index.js +++ b/test/index.js @@ -23,8 +23,8 @@ chai.should(); const url = 'http://localhost:3013'; const compilerUrl = 'http://localhost:3080'; -const secretKey = 'bf66e1c256931870908a649572ed0257876bb84e3cdf71efb12f56c7335fad54d5cf08400e988222f26eb4b02c8f89077457467211a6e6d955edb70749c6a33b'; -export const networkId = 'ae_devnet'; +const secretKey = '9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200'; +export const networkId = 'ae_dev'; const keypair = generateKeyPair(); export const WALLET_NAME = 'test-artifacts/wallet.json'; @@ -43,7 +43,6 @@ const Sdk = (params = {}) => { const spendPromise = (async () => { const sdk = Sdk(); - await sdk.awaitHeight(2); await sdk.spend(1e28, keypair.publicKey); })(); diff --git a/test/inspect.js b/test/inspect.js index e7039607..74409119 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -44,6 +44,7 @@ Pending transactions: expect(resJson).to.eql({ blockHash: resJson.blockHash, blockHeight: resJson.blockHeight, + encodedTx: resJson.encodedTx, hash: resJson.hash, signatures: [resJson.signatures[0]], tx: { @@ -119,8 +120,6 @@ payload _________________________________ ba_Xfbg4g== height: keyJson.height, info: keyJson.info, miner: keyJson.miner, - nonce: keyJson.nonce, - pow: keyJson.pow, prevHash: keyJson.prevHash, prevKeyHash: keyJson.prevKeyHash, stateHash: keyJson.stateHash, @@ -134,7 +133,7 @@ payload _________________________________ ba_Xfbg4g== Block hash ______________________________ ${keyJson.hash} Block height ____________________________ ${keyJson.height} State hash ______________________________ ${keyJson.stateHash} -Nonce ___________________________________ ${keyJson.nonce} +Nonce ___________________________________ N/A Miner ___________________________________ ${keyJson.miner} Time ____________________________________ ${new Date(keyJson.time).toString()} Previous block hash _____________________ ${keyJson.prevHash} diff --git a/test/tx.js b/test/tx.js index f4826499..e84a1588 100644 --- a/test/tx.js +++ b/test/tx.js @@ -86,14 +86,14 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su expect(responseJson.signedTx).to.satisfy((s) => s.startsWith(Encoding.Transaction)); expect(responseJson).to.eql({ address: TX_KEYS.publicKey, - networkId: 'ae_devnet', + networkId: 'ae_dev', signedTx: responseJson.signedTx, }); const response = await executeProgram(accountProgram, args); expect(response).to.equal(` Signing account address _________________ ${TX_KEYS.publicKey} -Network ID ______________________________ ae_devnet +Network ID ______________________________ ae_dev Unsigned ________________________________ ${tx} Signed __________________________________ ${responseJson.signedTx} `.trim()); @@ -109,10 +109,11 @@ Signed __________________________________ ${responseJson.signedTx} const txHash = buildTxHash(signedTx); const { - blockHash, blockHeight, hash, signatures, tx, ...otherDetailsJson + blockHash, blockHeight, hash, signatures, tx, encodedTx, ...otherDetailsJson } = await executeProgram(inspectProgram, [txHash, '--json']); const details = await executeProgram(inspectProgram, [txHash]); + expect(encodedTx).to.be.satisfy((t) => t.startsWith('tx_')); expect(otherDetailsJson).to.eql({}); expect(blockHash).to.satisfy((s) => s.startsWith(Encoding.MicroBlockHash)); expect(blockHeight).to.greaterThan(0); From 15c2341e452fe0062d5a8997a69cac64db855855 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sun, 7 Apr 2024 23:28:25 +1000 Subject: [PATCH 37/88] chore: remove not deployed "latest" compiler url --- src/commands/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/commands/main.js b/src/commands/main.js index ca1f06c1..24f0ba0b 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -132,7 +132,6 @@ program { name: 'Stable v7', url: 'https://v7.compiler.aepps.com/' }, { name: 'Integrated compiler, FATE 2 (requires Erlang)', url: 'cli' }, { name: 'Integrated compiler, FATE 3 (requires Erlang)', url: 'cli8' }, - { name: 'Latest', url: 'https://latest.compiler.aeternity.io/' }, ]; await addToConfig({ compilerUrl: await askUrl('compiler', compilers, getCompilerDescription, url), From ada1be6041944a0dd55c3bed8f2c23473ae74e3c Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 8 Apr 2024 10:21:22 +1000 Subject: [PATCH 38/88] chore: add a workaround to describe default value with no value --- src/arguments.js | 7 +++++-- src/utils/CliError.js | 2 ++ src/utils/default-option-description.js | 9 +++++++++ test/index.js | 2 ++ 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/utils/default-option-description.js diff --git a/src/arguments.js b/src/arguments.js index f67f172b..6f760b49 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -1,6 +1,7 @@ import { Argument, Option } from 'commander'; import BigNumber from 'bignumber.js'; import { MIN_GAS_PRICE } from '@aeternity/aepp-sdk'; +import { noValue } from './utils/default-option-description.js'; export const coinAmountParser = (amount) => { if (amount.endsWith('ae')) return new BigNumber(amount.slice(0, -2)).shiftedBy(18); @@ -26,12 +27,14 @@ export const jsonOption = new Option('--json', 'Print result in json format'); export const gasOption = new Option('-G, --gas [gas]', 'Amount of gas to call/deploy the contract') .argParser((gas) => +gas); -export const gasPriceOption = new Option('--gasPrice [gasPrice]', `Gas price to call/deploy the contract (default: based on network demand or ${MIN_GAS_PRICE})`); +export const gasPriceOption = new Option('--gasPrice [gasPrice]', 'Gas price to call/deploy the contract') + .default(noValue, `based on network demand or ${MIN_GAS_PRICE}`); export const forceOption = new Option('-f, --force', 'Ignore node version compatibility check'); export const passwordOption = new Option('-P, --password [password]', 'Wallet Password'); -export const ttlOption = new Option('-T, --ttl [ttl]', 'Validity of the transaction in number of blocks (default: current height increased by 3 or infinity)'); +export const ttlOption = new Option('-T, --ttl [ttl]', 'Validity of the transaction in number of blocks') + .default(noValue, 'current height increased by 3 or infinity'); export const networkIdOption = new Option('--networkId [networkId]', 'Network id'); diff --git a/src/utils/CliError.js b/src/utils/CliError.js index 5219be2c..a84a0105 100644 --- a/src/utils/CliError.js +++ b/src/utils/CliError.js @@ -1,5 +1,6 @@ import { InvalidPasswordError } from '@aeternity/aepp-sdk'; import { setCommandOptions } from './config.js'; +import { prepareOptions } from './default-option-description.js'; export default class CliError extends Error { constructor(message) { @@ -10,6 +11,7 @@ export default class CliError extends Error { export async function runProgram(program) { try { + prepareOptions(program); await setCommandOptions(program); await program.parseAsync(); } catch (error) { diff --git a/src/utils/default-option-description.js b/src/utils/default-option-description.js new file mode 100644 index 00000000..44e2ec79 --- /dev/null +++ b/src/utils/default-option-description.js @@ -0,0 +1,9 @@ +export const noValue = Symbol('replace with undefined'); + +export function prepareOptions(program) { + Object.entries(program.opts()) + .filter(([, value]) => value === noValue) + .forEach(([name]) => program.setOptionValue(name, undefined)); + + program.commands.forEach(prepareOptions); +} diff --git a/test/index.js b/test/index.js index 5d3ac25b..a3770f2d 100644 --- a/test/index.js +++ b/test/index.js @@ -6,6 +6,7 @@ import { AeSdk, MemoryAccount, Node, generateKeyPair, CompilerHttpNode, } from '@aeternity/aepp-sdk'; import accountProgram from '../src/commands/account.js'; +import { prepareOptions } from '../src/utils/default-option-description.js'; before(() => { mockFs({ @@ -69,6 +70,7 @@ export async function executeProgram(program, args) { if (isProgramExecuting) throw new Error('Another program is already running'); isProgramExecuting = true; let result = ''; + prepareOptions(program); program .configureOutput({ writeOut: (str) => { result += str; } }) .exitOverride(); From b838e63d2cd0a1d4426a5108518778a476b03d78 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 9 Apr 2024 17:20:08 +1000 Subject: [PATCH 39/88] chore: add next.aeternity.io to list of nodes --- src/commands/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands/main.js b/src/commands/main.js index 24f0ba0b..e65bfc4f 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -119,6 +119,7 @@ program const nodes = [ { name: 'Mainnet', url: 'https://mainnet.aeternity.io/' }, { name: 'Testnet', url: 'https://testnet.aeternity.io/' }, + { name: 'Next', url: 'https://next.aeternity.io/' }, ]; await addToConfig({ url: await askUrl('node', nodes, getNodeDescription, url) }); }); From ca0d0b2907f18558462af2e01529bbd4f5122575 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 9 Apr 2024 17:22:26 +1000 Subject: [PATCH 40/88] chore: mark all entry scripts as executables --- src/aecli-account.js | 0 src/aecli-contract.js | 0 src/aecli-inspect.js | 0 src/aecli-name.js | 0 src/aecli-oracle.js | 0 src/aecli-tx.js | 0 6 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 src/aecli-account.js mode change 100644 => 100755 src/aecli-contract.js mode change 100644 => 100755 src/aecli-inspect.js mode change 100644 => 100755 src/aecli-name.js mode change 100644 => 100755 src/aecli-oracle.js mode change 100644 => 100755 src/aecli-tx.js diff --git a/src/aecli-account.js b/src/aecli-account.js old mode 100644 new mode 100755 diff --git a/src/aecli-contract.js b/src/aecli-contract.js old mode 100644 new mode 100755 diff --git a/src/aecli-inspect.js b/src/aecli-inspect.js old mode 100644 new mode 100755 diff --git a/src/aecli-name.js b/src/aecli-name.js old mode 100644 new mode 100755 diff --git a/src/aecli-oracle.js b/src/aecli-oracle.js old mode 100644 new mode 100755 diff --git a/src/aecli-tx.js b/src/aecli-tx.js old mode 100644 new mode 100755 From 35496fbb2d5f80d657a784a17151f37350f2643d Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 9 Apr 2024 16:52:28 +1000 Subject: [PATCH 41/88] feat(chain): show protocol version in config --- src/commands/main.js | 8 ++++++-- test/other.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/commands/main.js b/src/commands/main.js index e65bfc4f..8978a3db 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -8,7 +8,7 @@ import fs from 'fs-extra'; import { fileURLToPath } from 'url'; import { resolve } from 'path'; import updateNotifier from 'update-notifier'; -import { Node } from '@aeternity/aepp-sdk'; +import { Node, ConsensusProtocolVersion } from '@aeternity/aepp-sdk'; import { compilerOption, nodeOption } from '../arguments.js'; import { getCompilerByUrl } from '../utils/cli.js'; import { addToConfig } from '../utils/config.js'; @@ -44,7 +44,11 @@ EXECUTABLE_CMD.forEach(({ name, desc }) => program.command(name, desc)); async function getNodeDescription(url) { const nodeInfo = await new Node(url).getNodeInfo().catch(() => {}); return nodeInfo - ? `network id ${nodeInfo.nodeNetworkId}, version ${nodeInfo.version}` + ? [ + `network id ${nodeInfo.nodeNetworkId}`, + `version ${nodeInfo.version}`, + `protocol ${nodeInfo.consensusProtocolVersion} (${ConsensusProtocolVersion[nodeInfo.consensusProtocolVersion]})`, + ].join(', ') : 'can\'t get node info'; } diff --git a/test/other.js b/test/other.js index d4f74f31..bfbb83a8 100644 --- a/test/other.js +++ b/test/other.js @@ -6,7 +6,7 @@ import mainProgram from '../src/commands/main.js'; describe('Other tests', () => { it('Config', async () => { expect(await executeProgram(mainProgram, ['config'])).to.equal( - 'Node https://mainnet.aeternity.io network id ae_mainnet, version 6.13.0\n' + 'Node https://mainnet.aeternity.io network id ae_mainnet, version 6.13.0, protocol 5 (Iris)\n' + 'Compiler https://v7.compiler.aepps.com version 7.4.0', ); }).timeout(4000); From 3c22e58515812c29ffed9a3a0912d5bb70102706 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 8 Apr 2024 10:21:22 +1000 Subject: [PATCH 42/88] chore: use different option description depending is node used or not --- src/arguments.js | 8 ++++---- src/commands/account.js | 2 +- src/commands/contract.js | 6 +++--- src/commands/name.js | 2 +- src/commands/oracle.js | 2 +- src/commands/tx.js | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/arguments.js b/src/arguments.js index 6f760b49..32e4d5c2 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -27,14 +27,14 @@ export const jsonOption = new Option('--json', 'Print result in json format'); export const gasOption = new Option('-G, --gas [gas]', 'Amount of gas to call/deploy the contract') .argParser((gas) => +gas); -export const gasPriceOption = new Option('--gasPrice [gasPrice]', 'Gas price to call/deploy the contract') - .default(noValue, `based on network demand or ${MIN_GAS_PRICE}`); +export const gasPriceOption = (usingNode) => new Option('--gasPrice [gasPrice]', 'Gas price to call/deploy the contract') + .default(noValue, usingNode ? 'based on network demand' : MIN_GAS_PRICE); export const forceOption = new Option('-f, --force', 'Ignore node version compatibility check'); export const passwordOption = new Option('-P, --password [password]', 'Wallet Password'); -export const ttlOption = new Option('-T, --ttl [ttl]', 'Validity of the transaction in number of blocks') - .default(noValue, 'current height increased by 3 or infinity'); +export const ttlOption = (usingNode) => new Option('-T, --ttl [ttl]', 'Validity of the transaction in number of blocks') + .default(noValue, usingNode ? 'current height increased by 3' : 'infinity'); export const networkIdOption = new Option('--networkId [networkId]', 'Network id'); diff --git a/src/commands/account.js b/src/commands/account.js index b65c0e1a..e9dc604c 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -49,7 +49,7 @@ addCommonOptions(program .addOption(networkIdOption) .option('--payload [payload]', 'Transaction payload.', '') .addOption(feeOption) - .addOption(ttlOption) + .addOption(ttlOption(true)) .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') .action(Account.spend)); diff --git a/src/commands/contract.js b/src/commands/contract.js index 5a1963db..4719942d 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -111,7 +111,7 @@ addCommonOptions(program .option('-s, --callStatic', 'Call static') .option('-t, --topHash', 'Hash of block to make call') .addOption(feeOption) - .addOption(ttlOption) + .addOption(ttlOption(true)) .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') .description('Execute a function of the contract') .action(Contract.call)); @@ -137,9 +137,9 @@ addCommonOptions(program .option('-W, --no-waitMined', 'Force waiting until transaction will be mined') .addOption(passwordOption) .addOption(gasOption) - .addOption(gasPriceOption) + .addOption(gasPriceOption(true)) .addOption(feeOption) - .addOption(ttlOption) + .addOption(ttlOption(true)) .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') .description('Deploy a contract on the chain') .action(Contract.deploy)); diff --git a/src/commands/name.js b/src/commands/name.js index 10dac8b2..c7572c93 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -16,7 +16,7 @@ const program = new Command().name('aecli name'); // ## Initialize `options` const addCommonOptions = (p) => p .addOption(nodeOption) - .addOption(ttlOption) + .addOption(ttlOption(true)) .addOption(feeOption) .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') .addOption(passwordOption) diff --git a/src/commands/oracle.js b/src/commands/oracle.js index 77952a3e..93510dae 100644 --- a/src/commands/oracle.js +++ b/src/commands/oracle.js @@ -14,7 +14,7 @@ const program = new Command().name('aecli oracle'); // ## Initialize `options` const addCommonOptions = (p) => p .addOption(nodeOption) - .addOption(ttlOption) + .addOption(ttlOption(true)) .addOption(feeOption) .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') .addOption(passwordOption) diff --git a/src/commands/tx.js b/src/commands/tx.js index cea47a78..2fedc9fd 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -28,7 +28,7 @@ const addCommonOptions = (p) => p .addOption(nodeOption) // .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') .addOption(feeOption) - .addOption(ttlOption) + .addOption(ttlOption(false)) .addOption(forceOption) .addOption(jsonOption); @@ -112,7 +112,7 @@ addCommonOptions(program .command('contract-deploy ') .addArgument(nonceArgument) .addOption(gasOption) - .addOption(gasPriceOption) + .addOption(gasPriceOption(false)) .option('--amount [amount]', 'Amount', 0) .description('Build contract create transaction.') .action(Transaction.contractDeploy)); @@ -126,7 +126,7 @@ addCommonOptions(program .command('contract-call ') .addArgument(nonceArgument) .addOption(gasOption) - .addOption(gasPriceOption) + .addOption(gasPriceOption(false)) .option('--amount [amount]', 'Amount', 0) .description('Build contract create transaction.') .action(Transaction.contractCall)); From df67561c76549f11036df2eeafa9135f8fde56fb Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 9 Apr 2024 20:15:51 +1000 Subject: [PATCH 43/88] docs: use better names in examples --- CLI.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CLI.md b/CLI.md index 5bfe08f2..751c5e67 100644 --- a/CLI.md +++ b/CLI.md @@ -132,14 +132,14 @@ The account (wallet) commands are those which create and report on key pairs, an Use this command to create a new wallet. ``` -$ aecli account create test --password test +$ aecli account create ./wallet.json --password top-secret ``` You can specify a password for accessing your wallet or just press Enter if you do not want to set a password. The wallet is created in the specified directory. ``` Wallet saved Wallet address________________ ak_2GN72gRFHYmJd1DD2g2sLADr5ZXa13DPYNtuFajhsZT2y3FiWu -Wallet path___________________ /home/nduchak/Project/aepp-sdk-js/bin/test +Wallet path___________________ /path-to/wallet.json ``` Wallet address is your public key. Wallet path is the directory where the wallet is created. @@ -148,7 +148,7 @@ Wallet address is your public key. Wallet path is the directory where the wallet View the address (public key) of your wallet using the following command: ``` -$ aecli account address test +$ aecli account address ./wallet.json ``` You will get the following: ``` @@ -159,19 +159,19 @@ Your address is: ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi Using this command, you can pass the private key to generate a wallet with a key pair. ``` -$ aecli account save test +$ aecli account save ./wallet.json ``` You will get the following: ``` Wallet saved Wallet address________________ ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi -Wallet path___________________ /Users/spushkar/Desktop/aepp-sdk-js-develop/bin/test +Wallet path___________________ /path-to/wallet.json ``` #### spend Using this command, you can send coins to another wallet. Just indicate another account's address and an amount which should be sent. ``` -$ aecli account spend test --password test ak$94TQqDjzwKQYPcCdEAfxcGb3mHq2s9Rm4dybMbDWwiVRwg8RK 10 +$ aecli account spend ./wallet.json --password top-secret ak_2GN72gRFHYmJd1DD2g2sLADr5ZXa13DPYNtuFajhsZT2y3FiWu 1.23ae ``` As an option, you can set _--ttl_ parameter, which limits the lifespan of this transaction. @@ -208,28 +208,28 @@ $ ./aecli.mjs name Create and register a name for your account (public key): ``` -$ aecli name claim test --password test testname.chain +$ aecli name claim ./wallet.json --password top-secret testname.chain ``` #### revoke You can delete your name using the following command: ``` -$ aecli name revoke test --password test testname.chain +$ aecli name revoke ./wallet.json --password top-secret testname.chain ``` #### transfer You can transfer a name to another account or contract, just indicate another account's address. You will pass all rights regarding the name to another account: ``` -$ aecli name transfer test --password test testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi +$ aecli name transfer ./wallet.json --password top-secret testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ``` #### update Use this command to update a name. For example, you can assign it to another account, but still you will have rights to do other operations with this name: ``` -$ aecli name update test --password test testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi +$ aecli name update ./wallet.json --password top-secret testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ``` ## The contracts group @@ -278,7 +278,7 @@ $ aecli contract compile file1 To deploy a contract, run the following command adding the contract name: ``` -$ aecli contract deploy test --password test testContract +$ aecli contract deploy ./wallet.json --password top-secret testContract ``` You will get the following: ``` @@ -292,7 +292,7 @@ Deploy descriptor_______________ testContract.deploy.2a1j2Mk9YSmC1gioUq4PWRm3bsv To execute a function of the contract, run the following command. Json file is stored in `aepp-sdk-js-develop/bin`. `Main` is a function which is executed by this contract, `int 1 2` are numerical values : ``` -$ aecli contract call test --password test testContract.deploy.2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi.json main int 1 2 +$ aecli contract call ./wallet.json --password top-secret testContract.deploy.2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi.json main int 1 2 ``` You will get the following, where return value is a result of contract execution - it is a sum of values 1 and 2: ``` From cfd7ac5b1caf930eefeb1a7c44da0bc0ccce71e8 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 9 Apr 2024 20:34:21 +1000 Subject: [PATCH 44/88] fix: don't accept `--networkId` in commands where node is required --- src/commands/account.js | 1 - src/commands/contract.js | 3 --- src/commands/name.js | 5 ++--- src/commands/oracle.js | 5 ++--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/commands/account.js b/src/commands/account.js index e9dc604c..bd63ffe3 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -46,7 +46,6 @@ addCommonOptions(program return { amount: coinAmountParser(amount) }; }, ) - .addOption(networkIdOption) .option('--payload [payload]', 'Transaction payload.', '') .addOption(feeOption) .addOption(ttlOption(true)) diff --git a/src/commands/contract.js b/src/commands/contract.js index 4719942d..643be377 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -15,7 +15,6 @@ import { forceOption, passwordOption, ttlOption, - networkIdOption, } from '../arguments.js'; const callArgs = new Argument('[args]', 'JSON-encoded arguments array of contract call') @@ -105,7 +104,6 @@ addCommonOptions(program .addOption(contractSourceFilenameOption) .addOption(contractAciFilenameOption) .option('-W, --no-waitMined', 'Force waiting until transaction will be mined') - .addOption(networkIdOption) .addOption(passwordOption) .addOption(gasOption) .option('-s, --callStatic', 'Call static') @@ -133,7 +131,6 @@ addCommonOptions(program .addOption(contractSourceFilenameOption) .option('--contractBytecode [contractBytecode]', 'Contract bytecode file name') .addOption(contractAciFilenameOption) - .addOption(networkIdOption) .option('-W, --no-waitMined', 'Force waiting until transaction will be mined') .addOption(passwordOption) .addOption(gasOption) diff --git a/src/commands/name.js b/src/commands/name.js index c7572c93..81459c80 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -8,7 +8,7 @@ import { Command } from 'commander'; import { NAME_TTL, CLIENT_TTL } from '@aeternity/aepp-sdk'; import * as AENS from '../actions/aens.js'; import { - nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, networkIdOption, + nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, } from '../arguments.js'; const program = new Command().name('aecli name'); @@ -20,7 +20,6 @@ const addCommonOptions = (p) => p .addOption(feeOption) .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') .addOption(passwordOption) - .addOption(networkIdOption) .addOption(forceOption) .addOption(jsonOption); @@ -121,7 +120,7 @@ addCommonOptions(program // // Example: `aecli name revoke ./myWalletKeyFile --password testpass testname.chain` addCommonOptions(program - .command('revoke ') + .command('revoke ') .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .description('Revoke an AENS name') .action(AENS.revokeName)); diff --git a/src/commands/oracle.js b/src/commands/oracle.js index 93510dae..973dd0e7 100644 --- a/src/commands/oracle.js +++ b/src/commands/oracle.js @@ -6,7 +6,7 @@ import { Command } from 'commander'; import { ORACLE_TTL, QUERY_TTL, RESPONSE_TTL } from '@aeternity/aepp-sdk'; import * as Oracle from '../actions/oracle.js'; import { - nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, networkIdOption, + nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, } from '../arguments.js'; const program = new Command().name('aecli oracle'); @@ -18,7 +18,6 @@ const addCommonOptions = (p) => p .addOption(feeOption) .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') .addOption(passwordOption) - .addOption(networkIdOption) .addOption(forceOption) .addOption(jsonOption); @@ -85,7 +84,7 @@ addCommonOptions(program .command('respond-query ') .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .option('--responseTtl [responseTtl]', 'Query response time to leave', RESPONSE_TTL.value) - .description('Respond to Oracle Query') + .description('Respond to Oracle Query') .action(Oracle.respondToQuery)); // ## Initialize `get oracle` command From 0d4aa5157f861b98eb25f5b1b4f93af79a9da018 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 9 Apr 2024 21:56:34 +1000 Subject: [PATCH 45/88] feat(aens): don't require name ttl in `name extend` --- src/commands/chain.js | 6 ++---- src/commands/name.js | 9 +++++---- src/commands/tx.js | 6 +++--- test/name.js | 14 ++++++++++---- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/commands/chain.js b/src/commands/chain.js index 97da1349..cfe9eb59 100755 --- a/src/commands/chain.js +++ b/src/commands/chain.js @@ -44,11 +44,9 @@ addCommonOptions(program .description('Get relative ttl') .action(Chain.ttl)); -// ## Initialize `ttl` command -// -// You can use this command to retrieve relative `ttl` +// ## Initialize `network_id` command // -// Example: `aecli chain ttl ` +// You can use this command to get current network ID addCommonOptions(program .command('network_id') .description('Get network ID') diff --git a/src/commands/name.js b/src/commands/name.js index c7572c93..b41392b9 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -98,8 +98,8 @@ addCommonOptions(program .command('update [addresses...]') .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .option('--extendPointers', 'Extend pointers', false) - .option('--nameTtl [nameTtl]', 'Validity of name.', NAME_TTL) - .option('--clientTtl [clientTtl]', 'Client ttl.', CLIENT_TTL) + .option('--nameTtl [nameTtl]', 'A number of blocks until name expires', NAME_TTL) + .option('--clientTtl [clientTtl]', 'Client TTL', CLIENT_TTL) .description('Update a name pointer') .action(AENS.updateName)); @@ -109,9 +109,10 @@ addCommonOptions(program // // Example: `aecli name extend ./myWalletKeyFile --password testpass testname.chain 100` addCommonOptions(program - .command('extend ') + .command('extend ') + .argument('[nameTtl]', 'A number of blocks until name expires', NAME_TTL) .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') - .option('--clientTtl [clientTtl]', 'Client ttl.', CLIENT_TTL) + .option('--clientTtl [clientTtl]', 'Client TTL', CLIENT_TTL) .description('Extend name ttl') .action(AENS.extendName)); diff --git a/src/commands/tx.js b/src/commands/tx.js index 2fedc9fd..9d76eef4 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -148,7 +148,7 @@ addCommonOptions(program // // You can use this command to build `oracle-post-query` transaction // -// Example: `aecli tx oracle-post-query ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ok_348hrfdhisdkhasdaksdasdsad {city: 'Berlin'}` +// Example: `aecli tx oracle-post-query ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ok_348hrfdhisdkhasdaksdasdsad '{"city": "Berlin"}'` addCommonOptions(program .command('oracle-post-query ') .addArgument(nonceArgument) @@ -162,7 +162,7 @@ addCommonOptions(program // // You can use this command to build `oracle-extend` transaction // -// Example: `aecli tx oracle-extend ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ok_348hrfdhisdkhasdaksdasdsad 100 +// Example: `aecli tx oracle-extend ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ok_348hrfdhisdkhasdaksdasdsad 100 addCommonOptions(program .command('oracle-extend ') .addArgument(nonceArgument) @@ -173,7 +173,7 @@ addCommonOptions(program // // You can use this command to build `oracle-respond` transaction // -// Example: `aecli tx oracle-respond ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ok_348hrfdhisdkhasdaksdasdsad oq_asdjn23ifsdiuhfk2h3fuksadh {tmp: 1}` +// Example: `aecli tx oracle-respond ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ok_348hrfdhisdkhasdaksdasdsad oq_asdjn23ifsdiuhfk2h3fuksadh '{"tmp": 1}'` addCommonOptions(program .command('oracle-respond ') .addArgument(nonceArgument) diff --git a/test/name.js b/test/name.js index 0192fd01..a861fd0f 100644 --- a/test/name.js +++ b/test/name.js @@ -128,12 +128,18 @@ describe('AENS Module', () => { 'test', '--json', ]); + expect(extendTx.blockHeight - height).within(0, 3); + const nameResult = await executeInspect([name2, '--json']); + expect(nameResult.ttl - extendTx.blockHeight).to.be.equal(50); + expect(nameResult.status).to.equal('CLAIMED'); + }); + it('extend name with max ttl', async () => { + const extendTx = await executeName([ + 'extend', WALLET_NAME, name2, '--password', 'test', '--json', + ]); const nameResult = await executeInspect([name2, '--json']); - const isExtended = nameResult.ttl - 50 >= height; - isExtended.should.be.equal(true); - extendTx.blockHeight.should.be.gt(0); - nameResult.status.should.equal('CLAIMED'); + expect(nameResult.ttl - extendTx.blockHeight).to.be.equal(180000); }); it('Fail spend by name on invalid input', async () => { From 75217c3c97ecb93b97521b626a0099e789b8fc33 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 10 Apr 2024 13:06:14 +1000 Subject: [PATCH 46/88] feat(aens): show auction details --- src/actions/aens.js | 49 ++++++++++++++---------------------------- src/actions/inspect.js | 4 ++-- src/utils/helpers.js | 30 ++++++++++++++------------ test/inspect.js | 18 ++++++++++------ test/name.js | 17 ++++----------- 5 files changed, 49 insertions(+), 69 deletions(-) diff --git a/src/actions/aens.js b/src/actions/aens.js index aa16f063..9fe96cae 100644 --- a/src/actions/aens.js +++ b/src/actions/aens.js @@ -5,9 +5,16 @@ import { isAddressValid, getDefaultPointerKey } from '@aeternity/aepp-sdk'; import { initSdkByWalletFile } from '../utils/cli.js'; import { print, printTransaction } from '../utils/print.js'; -import { isAvailable, updateNameStatus, validateName } from '../utils/helpers.js'; +import { getNameEntry, validateName } from '../utils/helpers.js'; import CliError from '../utils/CliError.js'; +async function ensureNameStatus(name, sdk, status, operation) { + const nameEntry = await getNameEntry(name, sdk); + if (nameEntry.status !== status) { + throw new CliError(`AENS name is ${nameEntry.status} and cannot be ${operation}`); + } +} + // ## Claim `name` function export async function preClaim(walletPath, name, options) { const { @@ -20,10 +27,7 @@ export async function preClaim(walletPath, name, options) { const sdk = await initSdkByWalletFile(walletPath, options); // Check if that `name' available - const nameEntry = await updateNameStatus(name, sdk); - if (!isAvailable(nameEntry)) { - throw new CliError('AENS name not available'); - } + await ensureNameStatus(name, sdk, 'AVAILABLE', 'preclaimed'); // Create `pre-claim` transaction const preClaimTx = await sdk.aensPreclaim(name, { ttl, fee, nonce, waitMined, @@ -49,10 +53,7 @@ export async function claim(walletPath, name, salt, options) { const sdk = await initSdkByWalletFile(walletPath, options); // Check if that `name' available - const nameEntry = await updateNameStatus(name, sdk); - if (!isAvailable(nameEntry)) { - throw new CliError('AENS name not available'); - } + await ensureNameStatus(name, sdk, 'AVAILABLE', 'claimed'); // Wait for next block and create `claimName` transaction const claimTx = await sdk.aensClaim(name, salt, { @@ -82,10 +83,7 @@ export async function updateName(walletPath, name, addresses, options) { const sdk = await initSdkByWalletFile(walletPath, options); // Check if that `name` is unavailable and we can update it - const nameEntry = await updateNameStatus(name, sdk); - if (isAvailable(nameEntry)) { - throw new CliError(`AENS name is ${nameEntry.status} and cannot be updated`); - } + await ensureNameStatus(name, sdk, 'CLAIMED', 'updated'); // Create `updateName` transaction const updateTx = await sdk.aensUpdate( @@ -116,10 +114,7 @@ export async function extendName(walletPath, name, nameTtl, options) { const sdk = await initSdkByWalletFile(walletPath, options); // Check if that `name` is unavailable and we can update it - const nameEntry = await updateNameStatus(name, sdk); - if (isAvailable(nameEntry)) { - throw new CliError(`AENS name is ${nameEntry.status} and cannot be extended`); - } + await ensureNameStatus(name, sdk, 'CLAIMED', 'extended'); // Create `updateName` transaction const updateTx = await sdk.aensUpdate(name, {}, { @@ -148,10 +143,7 @@ export async function transferName(walletPath, name, address, options) { const sdk = await initSdkByWalletFile(walletPath, options); // Check if that `name` is unavailable and we can transfer it - const nameEntry = await updateNameStatus(name, sdk); - if (isAvailable(nameEntry)) { - throw new CliError('AENS name is available, nothing to transfer'); - } + await ensureNameStatus(name, sdk, 'CLAIMED', 'transferred'); // Create `transferName` transaction const transferTX = await sdk.aensTransfer(name, address, { @@ -178,10 +170,7 @@ export async function revokeName(walletPath, name, options) { const sdk = await initSdkByWalletFile(walletPath, options); // Check if `name` is unavailable and we can revoke it - const nameEntry = await updateNameStatus(name, sdk); - if (isAvailable(nameEntry)) { - throw new CliError('AENS name is available, nothing to revoke'); - } + await ensureNameStatus(name, sdk, 'CLAIMED', 'revoked'); // Create `revokeName` transaction const revokeTx = await sdk.aensRevoke(name, { @@ -207,10 +196,7 @@ export async function nameBid(walletPath, name, nameFee, options) { const sdk = await initSdkByWalletFile(walletPath, options); // Check if that `name' available - const nameEntry = await updateNameStatus(name, sdk); - if (!isAvailable(nameEntry)) { - throw new CliError('Auction do not start or already end'); - } + await ensureNameStatus(name, sdk, 'AUCTION', 'bidded'); // Wait for next block and create `claimName` transaction const nameBidTx = await sdk.aensBid(name, nameFee, { @@ -236,10 +222,7 @@ export async function fullClaim(walletPath, name, options) { const sdk = await initSdkByWalletFile(walletPath, options); // Check if that `name' available - const nameEntry = await updateNameStatus(name, sdk); - if (!isAvailable(nameEntry)) { - throw new CliError('AENS name not available'); - } + await ensureNameStatus(name, sdk, 'AVAILABLE', 'claimed'); // Wait for next block and create `claimName` transaction nonce = nonce && +nonce; diff --git a/src/actions/inspect.js b/src/actions/inspect.js index 81e5a19d..6cf7befd 100644 --- a/src/actions/inspect.js +++ b/src/actions/inspect.js @@ -13,7 +13,7 @@ import { printUnderscored, } from '../utils/print.js'; import { - checkPref, getBlock, updateNameStatus, validateName, + checkPref, getBlock, getNameEntry, validateName, } from '../utils/helpers.js'; import CliError from '../utils/CliError.js'; @@ -71,7 +71,7 @@ async function getBlockByHeight(height, { json, ...options }) { async function getName(name, { json, ...options }) { validateName(name); const sdk = initSdk(options); - printName(await updateNameStatus(name, sdk), json); + printName(await getNameEntry(name, sdk), json); } async function getContract(contractId, { json, ...options }) { diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 290e7ec6..7f8d0582 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -2,7 +2,7 @@ // That script contains base helper function import { resolve } from 'path'; -import { Encoding, decode as _decode } from '@aeternity/aepp-sdk'; +import { Encoding, decode as _decode, produceNameId } from '@aeternity/aepp-sdk'; import CliError from './CliError.js'; // ## Method which retrieve block info by hash @@ -49,21 +49,23 @@ export function checkPref(hash, hashType) { // ## AENS helpers methods -// Get `name` status -export async function updateNameStatus(name, sdk) { - try { - return { ...await sdk.getName(name), status: 'CLAIMED' }; - } catch (e) { - if (e.response && e.response.status === 404) { - return { name, status: 'AVAILABLE' }; - } - throw e; - } +// Get `name` entry +export async function getNameEntry(nameAsString, sdk) { + const handle404 = (error) => { + if (error.response?.status === 404) return undefined; + throw error; + }; + const [name, auction] = await Promise.all([ + sdk.api.getNameEntryByName(nameAsString).catch(handle404), + sdk.api.getAuctionEntryByName(nameAsString).catch(handle404), + ]); + return { + id: produceNameId(nameAsString), + ...name ?? auction, + status: (name && 'CLAIMED') || (auction && 'AUCTION') || 'AVAILABLE', + }; } -// Check if `name` is `AVAILABLE` -export function isAvailable(name) { return name.status === 'AVAILABLE'; } - // Validate `name` export function validateName(name) { if (typeof name !== 'string') throw new CliError('Name must be a string'); diff --git a/test/inspect.js b/test/inspect.js index 74409119..65744c45 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -1,7 +1,7 @@ import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { - AbiVersion, generateKeyPair, Tag, VmVersion, + AbiVersion, generateKeyPair, produceNameId, Tag, VmVersion, } from '@aeternity/aepp-sdk'; import { executeProgram, getSdk } from './index.js'; import inspectProgram from '../src/commands/inspect.js'; @@ -240,13 +240,13 @@ Ttl _____________________________________ ${resJson.ttl} it('Inspect Unclaimed Name', async () => { const resJson = await executeInspect([name, '--json']); expect(resJson).to.eql({ - name, + id: produceNameId(name), status: 'AVAILABLE', }); const res = await executeInspect([name]); expect(res).to.equal(` Status __________________________________ AVAILABLE -Name hash _______________________________ N/A +Name hash _______________________________ ${produceNameId(name)} Pointers ________________________________ N/A TTL _____________________________________ 0 `.trim()); @@ -286,13 +286,17 @@ TTL _____________________________________ ${resJson.ttl} await (await sdk.aensPreclaim(auctionName)).claim(); const resJson = await executeInspect([auctionName, '--json']); expect(resJson).to.eql({ - name: auctionName, - status: 'AVAILABLE', + endsAt: String(+resJson.startedAt + 14880), + highestBid: '19641800000000000000', + highestBidder: sdk.address, + id: resJson.id, + startedAt: resJson.startedAt, + status: 'AUCTION', }); const res = await executeInspect([auctionName]); expect(res).to.equal(` -Status __________________________________ AVAILABLE -Name hash _______________________________ N/A +Status __________________________________ AUCTION +Name hash _______________________________ ${resJson.id} Pointers ________________________________ N/A TTL _____________________________________ 0 `.trim()); diff --git a/test/name.js b/test/name.js index 0192fd01..02bd97fa 100644 --- a/test/name.js +++ b/test/name.js @@ -76,7 +76,7 @@ describe('AENS Module', () => { preClaim.blockHeight.should.be.gt(0); preClaim.salt.should.be.a('number'); preClaim.commitmentId.should.contain('cm'); - nameResult.name.should.be.equal(name2); + nameResult.id.should.satisfy((id) => id.startsWith('nm_')); nameResult.status.should.equal('AVAILABLE'); }).timeout(4000); @@ -231,23 +231,14 @@ describe('AENS Module', () => { }); it('Fail on open again', async () => { - const preClaim = await executeName([ - 'pre-claim', - WALLET_NAME, - '--password', - 'test', - name, - '--json', - ]); await executeName([ - 'claim', + 'pre-claim', WALLET_NAME, '--password', 'test', name, - preClaim.salt, '--json', - ]).should.be.rejectedWith('error: Transaction not found'); - }).timeout(15000); + ]).should.be.rejectedWith('AENS name is AUCTION and cannot be preclaimed'); + }); }); }); From 91c773198b5d52e3665ed889b1d33d0c8391fa8d Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 10 Apr 2024 15:55:22 +1000 Subject: [PATCH 47/88] feat(aens): print missed name details, be human-friendly --- src/actions/inspect.js | 44 +++++++++++++++++++++++++++++++++++++++--- src/utils/helpers.js | 24 +++++++++++++++++++++++ src/utils/print.js | 13 ------------- test/inspect.js | 14 ++++++++------ 4 files changed, 73 insertions(+), 22 deletions(-) diff --git a/src/actions/inspect.js b/src/actions/inspect.js index 6cf7befd..eacf11a0 100644 --- a/src/actions/inspect.js +++ b/src/actions/inspect.js @@ -2,18 +2,19 @@ // // This script initialize all `inspect` function +import BigNumber from 'bignumber.js'; import { Encoding, unpackTx as _unpackTx, Tag } from '@aeternity/aepp-sdk'; import { initSdk } from '../utils/cli.js'; import { print, printBlock, printBlockTransactions, - printName, printOracle, printQueries, + printOracle, printQueries, printTransaction, printUnderscored, } from '../utils/print.js'; import { - checkPref, getBlock, getNameEntry, validateName, + checkPref, getBlock, getNameEntry, timeAgo, validateName, } from '../utils/helpers.js'; import CliError from '../utils/CliError.js'; @@ -68,10 +69,47 @@ async function getBlockByHeight(height, { json, ...options }) { printBlock(await sdk.api.getKeyBlockByHeight(+height), json); } +const formatCoins = (coins) => `${new BigNumber(coins).shiftedBy(-18).toFixed()}ae`; + +const formatTtl = (ttl, height) => { + const date = new Date(); + const diff = Math.abs(ttl - height) < 3 ? 0 : ttl - height; + date.setMinutes(date.getMinutes() + diff * 3); + return `${ttl} (${timeAgo(date)})`; +}; + async function getName(name, { json, ...options }) { validateName(name); const sdk = initSdk(options); - printName(await getNameEntry(name, sdk), json); + const nameEntry = await getNameEntry(name, sdk); + + if (json) { + print(nameEntry); + return; + } + + const height = await sdk.getHeight({ cached: true }); + printUnderscored('Status', nameEntry.status); + printUnderscored('Name hash', nameEntry.id); + switch (nameEntry.status) { + case 'CLAIMED': + printUnderscored('Owner', nameEntry.owner); + if (nameEntry.pointers?.length) { + nameEntry.pointers.forEach(({ key, id }) => printUnderscored(`Pointer ${key}`, id)); + } else printUnderscored('Pointers', 'N/A'); + printUnderscored('TTL', formatTtl(nameEntry.ttl, height)); + break; + case 'AUCTION': + printUnderscored('Highest bidder', nameEntry.highestBidder); + printUnderscored('Highest bid', formatCoins(nameEntry.highestBid)); + printUnderscored('Ends at height', formatTtl(nameEntry.endsAt, height)); + printUnderscored('Started at height', formatTtl(nameEntry.startedAt, height)); + break; + case 'AVAILABLE': + break; + default: + throw new Error(`Unknown name status: ${nameEntry.status}`); + } } async function getContract(contractId, { json, ...options }) { diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 7f8d0582..4df9e700 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -82,3 +82,27 @@ export function decode(data, requiredPrefix) { } export const getFullPath = (path) => resolve(process.cwd(), path); + +const units = [ + ['year', 365 * 24 * 60 * 60 * 1000], + ['month', 30.5 * 24 * 60 * 60 * 1000], + ['day', 24 * 60 * 60 * 1000], + ['hour', 60 * 60 * 1000], + ['minute', 60 * 1000], + ['second', 1000], +]; + +export function timeAgo(date) { + const diff = Date.now() - date.getTime(); + // TODO: revisit linter settings, the below rule is not relevant because babel is not used + // eslint-disable-next-line no-restricted-syntax + for (const [name, size] of units) { + const value = Math.floor(Math.abs(diff) / size); + if (value > 0) { + const plural = value > 1 ? 's' : ''; + const description = `${value} ${name}${plural}`; + return diff > 0 ? `${description} ago` : `in ${description}`; + } + } + return 'about now'; +} diff --git a/src/utils/print.js b/src/utils/print.js index 6648a4b5..72bb732a 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -347,16 +347,3 @@ export function printQueries(queries = [], json) { print('------------------------------------------------------------------------------'); }); } - -// Print `name` -export function printName(name, json) { - if (json) { - print(name); - return; - } - printUnderscored('Status', name.status ?? 'N/A'); - printUnderscored('Name hash', name.id ?? 'N/A'); - if (name.pointers?.length) name.pointers.forEach(({ key, id }) => printUnderscored(`Pointer ${key}`, id)); - else printUnderscored('Pointers', 'N/A'); - printUnderscored('TTL', name.ttl ?? 0); -} diff --git a/test/inspect.js b/test/inspect.js index 65744c45..c08abb28 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -247,8 +247,6 @@ Ttl _____________________________________ ${resJson.ttl} expect(res).to.equal(` Status __________________________________ AVAILABLE Name hash _______________________________ ${produceNameId(name)} -Pointers ________________________________ N/A -TTL _____________________________________ 0 `.trim()); }); @@ -274,10 +272,11 @@ TTL _____________________________________ 0 expect(res).to.equal(` Status __________________________________ CLAIMED Name hash _______________________________ ${resJson.id} +Owner ___________________________________ ${sdk.address} Pointer myKey ___________________________ ${sdk.address} Pointer account_pubkey __________________ ${sdk.address} Pointer oracle_pubkey ___________________ ${sdk.address} -TTL _____________________________________ ${resJson.ttl} +TTL _____________________________________ ${resJson.ttl} (in 1 year) `.trim()); }).timeout(6000); @@ -285,8 +284,9 @@ TTL _____________________________________ ${resJson.ttl} const auctionName = `a${Math.random().toString().slice(2, 9)}.chain`; await (await sdk.aensPreclaim(auctionName)).claim(); const resJson = await executeInspect([auctionName, '--json']); + const endsAt = +resJson.startedAt + 14880; expect(resJson).to.eql({ - endsAt: String(+resJson.startedAt + 14880), + endsAt: String(endsAt), highestBid: '19641800000000000000', highestBidder: sdk.address, id: resJson.id, @@ -297,8 +297,10 @@ TTL _____________________________________ ${resJson.ttl} expect(res).to.equal(` Status __________________________________ AUCTION Name hash _______________________________ ${resJson.id} -Pointers ________________________________ N/A -TTL _____________________________________ 0 +Highest bidder __________________________ ${sdk.address} +Highest bid _____________________________ 19.6418ae +Ends at height __________________________ ${endsAt} (in 1 month) +Started at height _______________________ ${resJson.startedAt} (about now) `.trim()); }).timeout(4000); }); From 4af1b4ced43a9f6af82d333b9572aed783f5e9f1 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 9 Apr 2024 21:10:44 +1000 Subject: [PATCH 48/88] refactor(account)!: move `aecli account spend` to `aecli spend` BREAKING CHANGE: `aecli account spend` renamed to `aecli spend` --- CLI.md | 2 +- src/actions/account.js | 30 +------------ src/aecli-spend.js | 5 +++ src/arguments.js | 4 +- src/commands/account.js | 41 ++---------------- src/commands/main.js | 1 + src/commands/spend.js | 59 ++++++++++++++++++++++++++ test/account.js | 69 ------------------------------ test/chain.js | 3 ++ test/index.js | 9 ++-- test/name.js | 10 ++--- test/spend.js | 93 +++++++++++++++++++++++++++++++++++++++++ 12 files changed, 179 insertions(+), 147 deletions(-) create mode 100755 src/aecli-spend.js create mode 100644 src/commands/spend.js create mode 100644 test/spend.js diff --git a/CLI.md b/CLI.md index 751c5e67..e9354f36 100644 --- a/CLI.md +++ b/CLI.md @@ -171,7 +171,7 @@ Wallet path___________________ /path-to/wallet.json Using this command, you can send coins to another wallet. Just indicate another account's address and an amount which should be sent. ``` -$ aecli account spend ./wallet.json --password top-secret ak_2GN72gRFHYmJd1DD2g2sLADr5ZXa13DPYNtuFajhsZT2y3FiWu 1.23ae +$ aecli spend ./wallet.json --password top-secret ak_2GN72gRFHYmJd1DD2g2sLADr5ZXa13DPYNtuFajhsZT2y3FiWu 1.23ae ``` As an option, you can set _--ttl_ parameter, which limits the lifespan of this transaction. diff --git a/src/actions/account.js b/src/actions/account.js index ff35b1d7..fb1007e7 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -3,12 +3,10 @@ // This script initialize all `account` function import fs from 'fs-extra'; -import { - generateKeyPair, encode, Encoding, verifyMessage as _verifyMessage, -} from '@aeternity/aepp-sdk'; +import { generateKeyPair, verifyMessage as _verifyMessage } from '@aeternity/aepp-sdk'; import { writeWallet } from '../utils/account.js'; import { initSdkByWalletFile, getAccountByWalletFile } from '../utils/cli.js'; -import { print, printTransaction, printUnderscored } from '../utils/print.js'; +import { print, printUnderscored } from '../utils/print.js'; import { PROMPT_TYPE, prompt } from '../utils/prompt.js'; // ## `Sign message` function @@ -67,30 +65,6 @@ export async function sign(walletPath, tx, { networkId: networkIdOpt, json, ...o } } -// ## `Spend` function -// this function allow you to `send` coins to another `account` -export async function spend( - walletPath, - receiverNameOrAddress, - { amount, fraction }, - { - ttl, json, nonce, fee, payload, ...options - }, -) { - const sdk = await initSdkByWalletFile(walletPath, options); - - const tx = await sdk[amount != null ? 'spend' : 'transferFunds']( - amount ?? fraction / 100, - receiverNameOrAddress, - { - ttl, nonce, payload: encode(Buffer.from(payload), Encoding.Bytearray), fee, - }, - ); - - if (!json) print('Transaction mined'); - printTransaction(tx, json); -} - // ## Get `address` function // This function allow you retrieve account `public` and `private` keys export async function getAddress(walletPath, options) { diff --git a/src/aecli-spend.js b/src/aecli-spend.js new file mode 100755 index 00000000..fa9d32b7 --- /dev/null +++ b/src/aecli-spend.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node +import program from './commands/spend.js'; +import { runProgram } from './utils/CliError.js'; + +await runProgram(program); diff --git a/src/arguments.js b/src/arguments.js index 32e4d5c2..e5c26d9b 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -34,7 +34,7 @@ export const forceOption = new Option('-f, --force', 'Ignore node version compat export const passwordOption = new Option('-P, --password [password]', 'Wallet Password'); -export const ttlOption = (usingNode) => new Option('-T, --ttl [ttl]', 'Validity of the transaction in number of blocks') - .default(noValue, usingNode ? 'current height increased by 3' : 'infinity'); +export const ttlOption = (usingNode) => new Option('-T, --ttl [ttl]', 'Validity of the transaction in number of keyblocks, or without this limit if 0') + .default(noValue, usingNode ? 3 : 0); export const networkIdOption = new Option('--networkId [networkId]', 'Network id'); diff --git a/src/commands/account.js b/src/commands/account.js index bd63ffe3..b8b846a0 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -5,53 +5,16 @@ import { Command } from 'commander'; import * as Account from '../actions/account.js'; import { - nodeOption, - jsonOption, - coinAmountParser, - feeOption, - forceOption, - passwordOption, - ttlOption, - networkIdOption, + nodeOption, jsonOption, forceOption, passwordOption, networkIdOption, } from '../arguments.js'; const program = new Command().name('aecli account'); // ## Initialize `options` const addCommonOptions = (p) => p - .addOption(nodeOption) .addOption(passwordOption) - .addOption(forceOption) .addOption(jsonOption); -// ## Initialize `spend` command -// -// You can use this command to send tokens to another account -// -// Example: `aecli account spend ./myWalletKeyFile ak_1241rioefwj23f2wfdsfsdsdfsasdf 100 --password testpassword` -// -// Example: `aecli account spend ./myWalletKeyFile aensAccountName.chain 100 --password testpassword` -// -// You can set transaction `ttl(Time to leave)`. If not set use default. -// -// Example: `aecli account spend ./myWalletKeyFile ak_1241rioefwj23f2wfdsfsdsdfsasdf 100 --password testpassword --ttl 20` --> this tx will leave for 20 blocks -addCommonOptions(program - .command('spend ') - .argument('', 'Address or name of recipient account') - .argument( - '', - 'Amount of coins to send in aettos/ae (example 1.2ae), or percent of sender balance (example 42%)', - (amount) => { - if (amount.endsWith('%')) return { fraction: +amount.slice(0, -1) }; - return { amount: coinAmountParser(amount) }; - }, - ) - .option('--payload [payload]', 'Transaction payload.', '') - .addOption(feeOption) - .addOption(ttlOption(true)) - .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') - .action(Account.spend)); - // ## Initialize `sign` command // // You can use this command to sign your transaction's @@ -59,6 +22,8 @@ addCommonOptions(program // Example: `aecli account sign ./myWalletKeyFile tx_1241rioefwj23f2wfdsfsdsdfsasdf --password testpassword` addCommonOptions(program .command('sign ') + .addOption(nodeOption) + .addOption(forceOption) .addOption(networkIdOption) .description('Sign a transaction using wallet') .action(Account.sign)); diff --git a/src/commands/main.js b/src/commands/main.js index 8978a3db..8ae8d49d 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -25,6 +25,7 @@ const EXECUTABLE_CMD = [ { name: 'name', desc: 'AENS system' }, { name: 'tx', desc: 'Transaction builder' }, { name: 'oracle', desc: 'Interact with oracles' }, + { name: 'spend', desc: 'Send coins to account or contract' }, ]; (() => { diff --git a/src/commands/spend.js b/src/commands/spend.js new file mode 100644 index 00000000..ea200e5e --- /dev/null +++ b/src/commands/spend.js @@ -0,0 +1,59 @@ +import { Command } from 'commander'; +import { encode, Encoding } from '@aeternity/aepp-sdk'; +import { initSdkByWalletFile } from '../utils/cli.js'; +import { print, printTransaction } from '../utils/print.js'; +import { + nodeOption, + jsonOption, + coinAmountParser, + feeOption, + forceOption, + passwordOption, + ttlOption, +} from '../arguments.js'; + +export default new Command('aecli spend') + .description('Sends coins to another account or contract.') + .addHelpText('after', ` + +Example call: + $ aecli spend ./wallet.json ak_2GN72... 100 --password top-secret + $ aecli spend ./wallet.json aens-name.chain 1.23ae --password top-secret + $ aecli spend ./wallet.json ak_2GN72... 20% --password top-secret --ttl 20`) + .argument('', 'A path to wallet file') + .argument('', 'Address or name of recipient account') + .argument( + '', + 'Amount of coins to send in aettos/ae (example: 1.2ae), or percent of sender balance (example: 42%)', + (amount) => { + if (amount.endsWith('%')) return { fraction: +amount.slice(0, -1) }; + return { amount: coinAmountParser(amount) }; + }, + ) + .option('--payload [payload]', 'Transaction payload as text', '') + .addOption(feeOption) + .addOption(ttlOption(true)) + .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') + .addOption(nodeOption) + .addOption(passwordOption) + .addOption(forceOption) + .addOption(jsonOption) + .action(async ( + walletPath, + receiverNameOrAddress, + { amount, fraction }, + { + ttl, json, nonce, fee, payload, ...options + }, + ) => { + const sdk = await initSdkByWalletFile(walletPath, options); + const tx = await sdk[amount != null ? 'spend' : 'transferFunds']( + amount ?? fraction / 100, + receiverNameOrAddress, + { + ttl, nonce, payload: encode(Buffer.from(payload), Encoding.Bytearray), fee, + }, + ); + if (!json) print('Transaction mined'); + printTransaction(tx, json); + }); diff --git a/test/account.js b/test/account.js index e0962f2d..ab517e9c 100644 --- a/test/account.js +++ b/test/account.js @@ -74,75 +74,6 @@ Secret Key ______________________________ ${keypair.secretKey} .to.be.a('string'); }); - it('Spend coins to another wallet', async () => { - const amount = 100; - const { publicKey } = generateKeyPair(); - const resJson = await executeAccount([ - 'spend', WALLET_NAME, '--password', 'test', publicKey, amount, '--json', - ]); - const receiverBalance = await sdk.getBalance(publicKey); - expect(+receiverBalance).to.be.equal(amount); - - expect(resJson.tx.fee).to.be.a('string'); - expect(resJson).to.eql({ - blockHash: resJson.blockHash, - blockHeight: resJson.blockHeight, - encodedTx: resJson.encodedTx, - hash: resJson.hash, - rawTx: resJson.rawTx, - signatures: [resJson.signatures[0]], - tx: { - amount: '100', - fee: resJson.tx.fee, - nonce: 1, - payload: 'ba_Xfbg4g==', - recipientId: resJson.tx.recipientId, - senderId: resJson.tx.senderId, - ttl: resJson.tx.ttl, - type: 'SpendTx', - version: 1, - }, - }); - - const res = await executeAccount([ - 'spend', WALLET_NAME, '--password', 'test', publicKey, amount, - ]); - const lineEndings = res.split('\n').map((l) => l.split(' ').at(-1)); - expect(res).to.be.equal(` -Transaction mined -Tx hash _________________________________ ${lineEndings[1]} -Block hash ______________________________ ${lineEndings[2]} -Block height ____________________________ ${lineEndings[3]} -Signatures ______________________________ ${lineEndings[4]} -Tx Type _________________________________ SpendTx -Sender account __________________________ ${resJson.tx.senderId} -Recipient account _______________________ ${resJson.tx.recipientId} -Amount __________________________________ 100 -Payload _________________________________ ba_Xfbg4g== -Fee _____________________________________ ${resJson.tx.fee} -Nonce ___________________________________ 2 -TTL _____________________________________ ${lineEndings[12]} -Version _________________________________ 1 - `.trim()); - }); - - it('Spend coins to another wallet in ae', async () => { - const receiverKeys = generateKeyPair(); - const { tx: { fee } } = await executeAccount([ - 'spend', WALLET_NAME, '--password', 'test', '--json', - receiverKeys.publicKey, '1ae', '--fee', '0.02ae', - ]); - expect(await sdk.getBalance(receiverKeys.publicKey)).to.be.equal('1000000000000000000'); - expect(fee).to.be.equal('20000000000000000'); - }); - - it('Spend percent of coins to account', async () => { - const { publicKey } = generateKeyPair(); - const balanceBefore = await sdk.getBalance(sdk.address); - await executeAccount(['spend', WALLET_NAME, '--password', 'test', publicKey, '42%']); - expect(+await sdk.getBalance(publicKey)).to.be.equal(balanceBefore * 0.42); - }); - it('Sign message', async () => { const data = 'Hello world'; const signedMessage = await executeAccount(['sign-message', WALLET_NAME, data, '--json', '--password', 'test']); diff --git a/test/chain.js b/test/chain.js index 77cfe2cc..5627504e 100644 --- a/test/chain.js +++ b/test/chain.js @@ -10,6 +10,9 @@ describe('Chain Module', () => { before(async () => { sdk = await getSdk(); + for (let i = 0; i < 5; i += 1) { + await sdk.spend(0, sdk.address); // eslint-disable-line no-await-in-loop + } }); it('prints top', async () => { diff --git a/test/index.js b/test/index.js index a3770f2d..6ab35f8d 100644 --- a/test/index.js +++ b/test/index.js @@ -84,9 +84,12 @@ export async function executeProgram(program, args) { try { const allArgs = [ ...args.map((arg) => arg.toString()), - ...[ - 'config', 'select-node', 'select-compiler', - ].includes(args[0]) ? [] : ['--url', url], + ...['config', 'select-node', 'select-compiler'].includes(args[0]) + || ( + // eslint-disable-next-line no-underscore-dangle + program._name === 'aecli account' + && ['save', 'create', 'address', 'sign-message', 'verify-message'].includes(args[0]) + ) ? [] : ['--url', url], ...[ 'compile', 'deploy', 'call', 'encode-calldata', 'decode-call-result', ].includes(args[0]) && !args.includes('--compilerUrl') ? ['--compilerUrl', compilerUrl] : [], diff --git a/test/name.js b/test/name.js index 0192fd01..cea6c0b2 100644 --- a/test/name.js +++ b/test/name.js @@ -6,11 +6,11 @@ import { } from './index.js'; import nameProgram from '../src/commands/name.js'; import inspectProgram from '../src/commands/inspect.js'; -import accountProgram from '../src/commands/account.js'; +import spendProgram from '../src/commands/spend.js'; const executeName = (args) => executeProgram(nameProgram, args); const executeInspect = (args) => executeProgram(inspectProgram, args); -const executeAccount = (args) => executeProgram(accountProgram, args); +const executeSpend = (args) => executeProgram(spendProgram, args); describe('AENS Module', () => { const { publicKey } = generateKeyPair(); @@ -138,8 +138,7 @@ describe('AENS Module', () => { it('Fail spend by name on invalid input', async () => { const amount = 100000009; - await executeAccount([ - 'spend', + await executeSpend([ WALLET_NAME, '--password', 'test', @@ -151,8 +150,7 @@ describe('AENS Module', () => { it('Spend by name', async () => { const amount = 100000009; - const { tx: { recipientId } } = await executeAccount([ - 'spend', + const { tx: { recipientId } } = await executeSpend([ WALLET_NAME, '--password', 'test', diff --git a/test/spend.js b/test/spend.js new file mode 100644 index 00000000..127703e7 --- /dev/null +++ b/test/spend.js @@ -0,0 +1,93 @@ +import { before, describe, it } from 'mocha'; +import { expect } from 'chai'; +import { generateKeyPair } from '@aeternity/aepp-sdk'; +import { getSdk, executeProgram, WALLET_NAME } from './index.js'; +import spendProgram from '../src/commands/spend.js'; + +const executeSpend = (args) => ( + executeProgram(spendProgram, [WALLET_NAME, '--password', 'test', ...args]) +); + +describe('Spend', () => { + let sdk; + + before(async () => { + sdk = await getSdk(); + }); + + it('spends', async () => { + const amount = 100; + const { publicKey } = generateKeyPair(); + const resJson = await executeSpend([publicKey, amount, '--json']); + const receiverBalance = await sdk.getBalance(publicKey); + expect(+receiverBalance).to.be.equal(amount); + + expect(resJson.tx.fee).to.be.a('string'); + expect(resJson).to.eql({ + blockHash: resJson.blockHash, + blockHeight: resJson.blockHeight, + encodedTx: resJson.encodedTx, + hash: resJson.hash, + rawTx: resJson.rawTx, + signatures: [resJson.signatures[0]], + tx: { + amount: '100', + fee: resJson.tx.fee, + nonce: 1, + payload: 'ba_Xfbg4g==', + recipientId: resJson.tx.recipientId, + senderId: resJson.tx.senderId, + ttl: resJson.tx.ttl, + type: 'SpendTx', + version: 1, + }, + }); + + const res = await executeSpend([publicKey, amount]); + const lineEndings = res.split('\n').map((l) => l.split(' ').at(-1)); + expect(res).to.be.equal(` +Transaction mined +Tx hash _________________________________ ${lineEndings[1]} +Block hash ______________________________ ${lineEndings[2]} +Block height ____________________________ ${lineEndings[3]} +Signatures ______________________________ ${lineEndings[4]} +Tx Type _________________________________ SpendTx +Sender account __________________________ ${resJson.tx.senderId} +Recipient account _______________________ ${resJson.tx.recipientId} +Amount __________________________________ 100 +Payload _________________________________ ba_Xfbg4g== +Fee _____________________________________ ${resJson.tx.fee} +Nonce ___________________________________ 2 +TTL _____________________________________ ${lineEndings[12]} +Version _________________________________ 1 + `.trim()); + }); + + it('spends in ae', async () => { + const receiverKeys = generateKeyPair(); + const { tx: { fee } } = await executeSpend([ + '--json', receiverKeys.publicKey, '1ae', '--fee', '0.02ae', + ]); + expect(await sdk.getBalance(receiverKeys.publicKey)).to.be.equal('1000000000000000000'); + expect(fee).to.be.equal('20000000000000000'); + }); + + it('spends percent of balance', async () => { + const { publicKey } = generateKeyPair(); + const balanceBefore = await sdk.getBalance(sdk.address); + await executeSpend([publicKey, '42%']); + expect(+await sdk.getBalance(publicKey)).to.be.equal(balanceBefore * 0.42); + }); + + it('spends to contract', async () => { + const contract = await sdk.initializeContract({ + sourceCode: '' + + 'payable contract Main =\n' + + ' record state = { key: int }\n' + + ' entrypoint init() = { key = 0 }\n', + }); + const { address } = await contract.$deploy([]); + await executeSpend([address, 100]); + expect(await sdk.getBalance(address)).to.be.equal('100'); + }); +}); From 929c78c151bad8d6085da8aeece096bc9672d051 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 10 Apr 2024 17:49:05 +1000 Subject: [PATCH 49/88] chore: run "npm pkg fix" --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2111b3c0..713a1833 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/aeternity/aepp-cli-js" + "url": "git+https://github.com/aeternity/aepp-cli-js.git" }, "scripts": { "docs": "scripts/js-to-md.js src/*.js src/commands/*.js src/actions/*.js src/utils/*.js", From fdaeeff250c8e267de000b0bb244e07422014553 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 10 Apr 2024 00:28:44 +1000 Subject: [PATCH 50/88] refactor(account)!: combine `account create` and `account save` BREAKING CHANGE: `account save` removed Use `account create` instead: ```diff -$ aecli account save ./my-wallet.json +$ aecli account create ./my-wallet.json ``` --- CLI.md | 2 +- src/actions/account.js | 46 ++++++++++++++++------------------------- src/commands/account.js | 23 +++++++-------------- src/utils/account.js | 16 +------------- test/account.js | 2 +- test/index.js | 2 +- test/tx.js | 2 +- 7 files changed, 31 insertions(+), 62 deletions(-) diff --git a/CLI.md b/CLI.md index e9354f36..bbc2da52 100644 --- a/CLI.md +++ b/CLI.md @@ -159,7 +159,7 @@ Your address is: ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi Using this command, you can pass the private key to generate a wallet with a key pair. ``` -$ aecli account save ./wallet.json +$ aecli account create ./wallet.json ``` You will get the following: ``` diff --git a/src/actions/account.js b/src/actions/account.js index fb1007e7..6de46e2c 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -3,8 +3,11 @@ // This script initialize all `account` function import fs from 'fs-extra'; -import { generateKeyPair, verifyMessage as _verifyMessage } from '@aeternity/aepp-sdk'; -import { writeWallet } from '../utils/account.js'; +import { + generateKeyPair, verifyMessage as _verifyMessage, getAddressFromPriv, dump, +} from '@aeternity/aepp-sdk'; +import { getFullPath } from '../utils/helpers.js'; +import CliError from '../utils/CliError.js'; import { initSdkByWalletFile, getAccountByWalletFile } from '../utils/cli.js'; import { print, printUnderscored } from '../utils/print.js'; import { PROMPT_TYPE, prompt } from '../utils/prompt.js'; @@ -86,38 +89,25 @@ export async function getAddress(walletPath, options) { } } -// ## Create secure `wallet` file +// ## Create secure `wallet` file by secret key of generate one // This function allow you to generate `keypair` and write it to secure `ethereum` like key-file -export async function createSecureWallet(walletPath, { password, overwrite, json }) { - const { secretKey } = generateKeyPair(true); - const { publicKey, path } = await writeWallet(walletPath, secretKey, password, overwrite); - if (json) { - print({ - publicKey, - path, - }); - } else { - printUnderscored('Address', publicKey); - printUnderscored('Path', path); - } -} - -// ## Create secure `wallet` file from `private-key` -// This function allow you to generate `keypair` from `private-key` and write it to secure `ethereum` like key-file -export async function createSecureWalletByPrivKey( +export async function createWallet( walletPath, - secretKey, + secretKey = generateKeyPair().secretKey, { password, overwrite, json }, ) { - secretKey = Buffer.from(secretKey.trim(), 'hex'); - const { publicKey, path } = await writeWallet(walletPath, secretKey, password, overwrite); + secretKey = Buffer.from(secretKey, 'hex'); + walletPath = getFullPath(walletPath); + if (!overwrite && await fs.exists(walletPath) && !await prompt(PROMPT_TYPE.askOverwrite)) { + throw new CliError(`Wallet already exist at ${walletPath}`); + } + password ??= await prompt(PROMPT_TYPE.askPassword); + await fs.outputJson(walletPath, await dump(walletPath, password, secretKey)); + const publicKey = getAddressFromPriv(secretKey); if (json) { - print({ - publicKey, - path, - }); + print({ publicKey, path: walletPath }); } else { printUnderscored('Address', publicKey); - printUnderscored('Path', path); + printUnderscored('Path', walletPath); } } diff --git a/src/commands/account.js b/src/commands/account.js index b8b846a0..e11c0213 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -67,25 +67,18 @@ addCommonOptions(program // ## Initialize `create` command // // You can use this command to generate `keypair` and encrypt it by password. +// Secret key can be provided in options, or cli will generate one. // This command create `ethereum like keyfile`. -// -// Example: `aecli account create ./mykeys/my-wallet.json --password testpassword` addCommonOptions(program .command('create ') + .argument('[privkey]', 'Secret key as 64-bytes encoded as hex') .option('--overwrite', 'Overwrite if exist') - .description('Create a secure wallet') - .action(Account.createSecureWallet)); + .description('Create a secure wallet by a private key or generate one.') + .addHelpText('after', ` -// ## Initialize `save` command -// -// You can use this command to generate `keypair` from `private-key` and encrypt it by password. -// This command create `ethereum like keyfile`. -// -// Example: `aecli account save ./mykeys/my-wallet.json 1902855723940510273412074210842018342148234 --password testpassword` -addCommonOptions(program - .command('save ') - .option('--overwrite', 'Overwrite if exist') - .description('Save a private keys string to a password protected file wallet') - .action(Account.createSecureWalletByPrivKey)); +Example call: + $ aecli account create ./my-wallet.json --password top-secret + $ aecli account create ./my-wallet.json 9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200`) + .action(Account.createWallet)); export default program; diff --git a/src/utils/account.js b/src/utils/account.js index 3419edac..96345ccb 100644 --- a/src/utils/account.js +++ b/src/utils/account.js @@ -1,23 +1,9 @@ // # Utils `account` Module // That script contains helper function's for work with `account` import fs from 'fs-extra'; -import { - generateKeyPairFromSecret, getAddressFromPriv, dump, recover, encode, Encoding, -} from '@aeternity/aepp-sdk'; +import { getAddressFromPriv, recover } from '@aeternity/aepp-sdk'; import { PROMPT_TYPE, prompt } from './prompt.js'; import { getFullPath } from './helpers.js'; -import CliError from './CliError.js'; - -export async function writeWallet(walletPath, secretKey, password, overwrite) { - const path = getFullPath(walletPath); - if (!overwrite && await fs.exists(path) && !await prompt(PROMPT_TYPE.askOverwrite)) { - throw new CliError(`Wallet already exist at ${path}`); - } - password ??= await prompt(PROMPT_TYPE.askPassword); - await fs.outputJson(path, await dump(path, password, secretKey)); - const { publicKey } = generateKeyPairFromSecret(secretKey); - return { publicKey: encode(publicKey, Encoding.AccountAddress), path }; -} // Get account file by path, decrypt it using password and return `keypair` export async function getWalletByPathAndDecrypt(walletPath, password) { diff --git a/test/account.js b/test/account.js index ab517e9c..154ac97a 100644 --- a/test/account.js +++ b/test/account.js @@ -39,7 +39,7 @@ Address _________________________________ ${resJson.publicKey} }); it('Create Wallet From Private Key', async () => { - await executeAccount(['save', walletName, '--password', 'test', keypair.secretKey, '--overwrite']); + await executeAccount(['create', walletName, '--password', 'test', keypair.secretKey, '--overwrite']); expect(await fs.exists(walletName)).to.be.equal(true); expect((await executeAccount(['address', walletName, '--password', 'test', '--json'])).publicKey) .to.equal(keypair.publicKey); diff --git a/test/index.js b/test/index.js index 6ab35f8d..8d4a3657 100644 --- a/test/index.js +++ b/test/index.js @@ -119,7 +119,7 @@ export async function getSdk() { accounts: [new MemoryAccount(tempKeyPair.secretKey)], }); await Promise.all([ - executeProgram(accountProgram, ['save', WALLET_NAME, '--password', 'test', tempKeyPair.secretKey, '--overwrite']), + executeProgram(accountProgram, ['create', WALLET_NAME, '--password', 'test', tempKeyPair.secretKey, '--overwrite']), sdk.spend(1e26, tempKeyPair.publicKey, { onAccount: new MemoryAccount(keypair.secretKey) }), ]); return sdk; diff --git a/test/tx.js b/test/tx.js index e84a1588..481b9a32 100644 --- a/test/tx.js +++ b/test/tx.js @@ -35,7 +35,7 @@ describe('Transaction Module', () => { before(async () => { sdk = await getSdk(); await sdk.spend(1e24, TX_KEYS.publicKey); - await executeProgram(accountProgram, ['save', WALLET_NAME, '--password', 'test', TX_KEYS.secretKey]); + await executeProgram(accountProgram, ['create', WALLET_NAME, '--password', 'test', TX_KEYS.secretKey]); }); it('builds tx', async () => { From b6537b8629c8ba2487895467e9740fbd0dba4ce4 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 10 Apr 2024 00:47:12 +1000 Subject: [PATCH 51/88] refactor(account): replace `getWalletByPathAndDecrypt` with `AccountCli` --- src/actions/account.js | 12 ++++++------ src/utils/account.js | 20 -------------------- src/utils/cli.js | 26 ++++++++++++++++++-------- 3 files changed, 24 insertions(+), 34 deletions(-) delete mode 100644 src/utils/account.js diff --git a/src/actions/account.js b/src/actions/account.js index 6de46e2c..b5f7af08 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -8,7 +8,7 @@ import { } from '@aeternity/aepp-sdk'; import { getFullPath } from '../utils/helpers.js'; import CliError from '../utils/CliError.js'; -import { initSdkByWalletFile, getAccountByWalletFile } from '../utils/cli.js'; +import { initSdkByWalletFile, AccountCli } from '../utils/cli.js'; import { print, printUnderscored } from '../utils/print.js'; import { PROMPT_TYPE, prompt } from '../utils/prompt.js'; @@ -17,7 +17,7 @@ import { PROMPT_TYPE, prompt } from '../utils/prompt.js'; export async function signMessage(walletPath, data = [], options) { const { json, filePath, password } = options; const dataForSign = filePath ? await fs.readFile(filePath) : data.join(' '); - const { account } = await getAccountByWalletFile(walletPath, password); + const account = await AccountCli.read(walletPath, password); const signedMessage = await account.signMessage(dataForSign); const result = { data: typeof dataForSign !== 'string' ? Array.from(dataForSign) : dataForSign, @@ -40,7 +40,7 @@ export async function signMessage(walletPath, data = [], options) { export async function verifyMessage(walletPath, hexSignature, dataArray = [], options) { const { json, filePath, password } = options; const data = filePath ? await fs.readFile(filePath) : dataArray.join(' '); - const { account } = await getAccountByWalletFile(walletPath, password); + const account = await AccountCli.read(walletPath, password); const isCorrect = _verifyMessage(data, Buffer.from(hexSignature, 'hex'), account.address); if (json) { print({ data, isCorrect }); @@ -74,18 +74,18 @@ export async function getAddress(walletPath, options) { const { privateKey, forcePrompt = false, json, password, } = options; - const { account, keypair } = await getAccountByWalletFile(walletPath, password); + const account = await AccountCli.read(walletPath, password); const printPrivateKey = privateKey && (forcePrompt || await prompt(PROMPT_TYPE.confirm, { message: 'Are you sure you want print your secret key?' })); if (json) { print({ publicKey: account.address, - ...printPrivateKey && { secretKey: keypair.secretKey }, + ...printPrivateKey && { secretKey: account.secretKey }, }); } else { printUnderscored('Address', account.address); - if (printPrivateKey) printUnderscored('Secret Key', keypair.secretKey); + if (printPrivateKey) printUnderscored('Secret Key', account.secretKey); } } diff --git a/src/utils/account.js b/src/utils/account.js deleted file mode 100644 index 96345ccb..00000000 --- a/src/utils/account.js +++ /dev/null @@ -1,20 +0,0 @@ -// # Utils `account` Module -// That script contains helper function's for work with `account` -import fs from 'fs-extra'; -import { getAddressFromPriv, recover } from '@aeternity/aepp-sdk'; -import { PROMPT_TYPE, prompt } from './prompt.js'; -import { getFullPath } from './helpers.js'; - -// Get account file by path, decrypt it using password and return `keypair` -export async function getWalletByPathAndDecrypt(walletPath, password) { - const keyFile = await fs.readJson(getFullPath(walletPath)); - - password ??= await prompt(PROMPT_TYPE.askPassword); - - const privKey = await recover(password, keyFile); - - return { - secretKey: privKey, - publicKey: getAddressFromPriv(privKey), - }; -} diff --git a/src/utils/cli.js b/src/utils/cli.js index 889e2b28..6de13a43 100644 --- a/src/utils/cli.js +++ b/src/utils/cli.js @@ -1,9 +1,11 @@ // # Utils `cli` Module // That script contains helper function's for work with `cli` +import fs from 'fs-extra'; import { - AeSdk, Node, MemoryAccount, CompilerCli, CompilerCli8, CompilerHttpNode, + AeSdk, Node, MemoryAccount, CompilerCli, CompilerCli8, CompilerHttpNode, recover, } from '@aeternity/aepp-sdk'; -import { getWalletByPathAndDecrypt } from './account.js'; +import { PROMPT_TYPE, prompt } from './prompt.js'; +import { getFullPath } from './helpers.js'; export function getCompilerByUrl(url) { if (url === 'cli') return new CompilerCli(); @@ -26,18 +28,26 @@ export function initSdk({ }); } -export async function getAccountByWalletFile(walletPath, password) { - const keypair = await getWalletByPathAndDecrypt(walletPath, password); - return { account: new MemoryAccount(keypair.secretKey), keypair }; +export class AccountCli extends MemoryAccount { + constructor(secretKey) { + super(secretKey); + // TODO: remove after resolving https://github.com/aeternity/aepp-sdk-js/issues/1672 + this.secretKey = secretKey; + } + + // Get account file by path, decrypt it using password and return AccountCli + static async read(path, password) { + const keyFile = await fs.readJson(getFullPath(path)); + password ??= await prompt(PROMPT_TYPE.askPassword); + return new AccountCli(await recover(password, keyFile)); + } } // ## Get account files and decrypt it using password // After that create sdk instance using this `keyPair` -// -// We use `getWalletByPathAndDecrypt` from `utils/account` to get `keypair` from file export async function initSdkByWalletFile(walletPath, { password, ...options }) { return initSdk({ ...options, - accounts: walletPath ? [(await getAccountByWalletFile(walletPath, password)).account] : [], + accounts: walletPath ? [await AccountCli.read(walletPath, password)] : [], }); } From 54d70fbeae91627e8f4e9aa982d0ea5285d7d6be Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 10 Apr 2024 11:16:15 +1000 Subject: [PATCH 52/88] fix(account): don't ask password if it is not required --- src/actions/account.js | 5 +++-- src/utils/cli.js | 33 ++++++++++++++++++++++++++------- test/account.js | 15 ++++++++------- 3 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/actions/account.js b/src/actions/account.js index b5f7af08..b6dc4442 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -78,14 +78,15 @@ export async function getAddress(walletPath, options) { const printPrivateKey = privateKey && (forcePrompt || await prompt(PROMPT_TYPE.confirm, { message: 'Are you sure you want print your secret key?' })); + const secretKey = printPrivateKey && await account.getSecretKey(); if (json) { print({ publicKey: account.address, - ...printPrivateKey && { secretKey: account.secretKey }, + ...printPrivateKey && { secretKey }, }); } else { printUnderscored('Address', account.address); - if (printPrivateKey) printUnderscored('Secret Key', account.secretKey); + if (printPrivateKey) printUnderscored('Secret Key', secretKey); } } diff --git a/src/utils/cli.js b/src/utils/cli.js index 6de13a43..2d11afef 100644 --- a/src/utils/cli.js +++ b/src/utils/cli.js @@ -2,7 +2,7 @@ // That script contains helper function's for work with `cli` import fs from 'fs-extra'; import { - AeSdk, Node, MemoryAccount, CompilerCli, CompilerCli8, CompilerHttpNode, recover, + AeSdk, Node, MemoryAccount, CompilerCli, CompilerCli8, CompilerHttpNode, recover, sign, } from '@aeternity/aepp-sdk'; import { PROMPT_TYPE, prompt } from './prompt.js'; import { getFullPath } from './helpers.js'; @@ -29,17 +29,36 @@ export function initSdk({ } export class AccountCli extends MemoryAccount { - constructor(secretKey) { - super(secretKey); - // TODO: remove after resolving https://github.com/aeternity/aepp-sdk-js/issues/1672 - this.secretKey = secretKey; + #keyFile; + + #password; + + #secretKey; + + constructor(keyFile, password) { + super(Buffer.alloc(64)); + this.#keyFile = keyFile; + this.#password = password; + this.address = keyFile.public_key; + } + + async getSecretKey() { + this.#secretKey ??= await recover( + this.#password ?? await prompt(PROMPT_TYPE.askPassword), + this.#keyFile, + ); + return this.#secretKey; + } + + async sign(data) { + const secretKey = await this.getSecretKey(); + return sign(data, Buffer.from(secretKey, 'hex')); } // Get account file by path, decrypt it using password and return AccountCli static async read(path, password) { const keyFile = await fs.readJson(getFullPath(path)); - password ??= await prompt(PROMPT_TYPE.askPassword); - return new AccountCli(await recover(password, keyFile)); + return new AccountCli(keyFile, password); } } diff --git a/test/account.js b/test/account.js index 154ac97a..98f3be76 100644 --- a/test/account.js +++ b/test/account.js @@ -26,13 +26,13 @@ describe('Account Module', () => { it('Create Wallet', async () => { const createRes = await executeAccount(['create', walletName, '--password', 'test']); expect(await fs.exists(walletName)).to.be.equal(true); - const resJson = await executeAccount(['address', walletName, '--password', 'test', '--json']); + const resJson = await executeAccount(['address', walletName, '--json']); expect(resJson.publicKey).to.be.a('string'); expect(createRes).to.be.equal(` Address _________________________________ ${resJson.publicKey} Path ____________________________________ ${resolve(walletName)} `.trim()); - const res = await executeAccount(['address', walletName, '--password', 'test']); + const res = await executeAccount(['address', walletName]); expect(res).to.be.equal(` Address _________________________________ ${resJson.publicKey} `.trim()); @@ -41,12 +41,12 @@ Address _________________________________ ${resJson.publicKey} it('Create Wallet From Private Key', async () => { await executeAccount(['create', walletName, '--password', 'test', keypair.secretKey, '--overwrite']); expect(await fs.exists(walletName)).to.be.equal(true); - expect((await executeAccount(['address', walletName, '--password', 'test', '--json'])).publicKey) + expect((await executeAccount(['address', walletName, '--json'])).publicKey) .to.equal(keypair.publicKey); }); it('Check Wallet Address', async () => { - expect((await executeAccount(['address', WALLET_NAME, '--password', 'test', '--json'])).publicKey) + expect((await executeAccount(['address', WALLET_NAME, '--json'])).publicKey) .to.equal(sdk.address); }); @@ -62,15 +62,16 @@ Secret Key ______________________________ ${keypair.secretKey} it('asks for password if it not provided', async () => { const walletPath = 'test-artifacts/test-wallet-1.json'; - prompts.inject(['test-password', 'test-password', 'y']); + prompts.inject(['test-password', 'y', 'test-password']); const { publicKey } = await executeAccount(['create', walletPath, '--json']); expect(await executeAccount(['address', walletPath, '--privateKey'])).to.include(publicKey); }); - it('don\'t asks for password if it is empty', async () => { + it('don\'t asks for password if provided password is empty string', async () => { const name = 'test-artifacts/test-wallet-2.json'; await executeAccount(['create', name, '--password', '']); - expect((await executeAccount(['address', name, '--password', '', '--json'])).publicKey) + prompts.inject(['y']); + expect((await executeAccount(['address', name, '--password', '', '--privateKey', '--json'])).publicKey) .to.be.a('string'); }); From 9c9784474a13ade972c36b3b7992ea3689383777 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 10 Apr 2024 12:05:15 +1000 Subject: [PATCH 53/88] feat(account): show approximate tx execution cost before asking password --- src/utils/cli.js | 8 ++++++++ test/index.js | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/utils/cli.js b/src/utils/cli.js index 2d11afef..6c8bc270 100644 --- a/src/utils/cli.js +++ b/src/utils/cli.js @@ -3,6 +3,7 @@ import fs from 'fs-extra'; import { AeSdk, Node, MemoryAccount, CompilerCli, CompilerCli8, CompilerHttpNode, recover, sign, + getExecutionCost, unpackTx, Tag, } from '@aeternity/aepp-sdk'; import { PROMPT_TYPE, prompt } from './prompt.js'; import { getFullPath } from './helpers.js'; @@ -55,6 +56,13 @@ export class AccountCli extends MemoryAccount { return sign(data, Buffer.from(secretKey, 'hex')); } + async signTransaction(transaction, options) { + const cost = Number(getExecutionCost(transaction)) / 1e18; + const txType = Tag[unpackTx(transaction).tag]; + console.warn(`Cost of ${txType} execution ≈ ${cost}ae`); + return super.signTransaction(transaction, options); + } + // Get account file by path, decrypt it using password and return AccountCli static async read(path, password) { const keyFile = await fs.readJson(getFullPath(path)); diff --git a/test/index.js b/test/index.js index 8d4a3657..243505a2 100644 --- a/test/index.js +++ b/test/index.js @@ -75,11 +75,15 @@ export async function executeProgram(program, args) { .configureOutput({ writeOut: (str) => { result += str; } }) .exitOverride(); - const { log } = console; + const { log, warn } = console; console.log = (...data) => { if (result) result += '\n'; result += data.join(' '); }; + console.warn = (...data) => { + if (/Cost of .+ execution ≈ .+ae/.test(data[0])) return; + warn(...data); + }; const options = getProgramOptions(program); try { const allArgs = [ @@ -100,6 +104,7 @@ export async function executeProgram(program, args) { await program.parseAsync(allArgs, { from: 'user' }); } finally { console.log = log; + console.warn = warn; isProgramExecuting = false; setProgramOptions(program, options); } From 1dbd19557ccba9d89f99a48ea1f3d588d5022cd0 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 11 Apr 2024 09:45:14 +1000 Subject: [PATCH 54/88] feat(contract): accept amount in contract and tx builder commands --- src/actions/contract.js | 3 ++- src/arguments.js | 4 ++++ src/commands/contract.js | 3 +++ src/commands/tx.js | 5 +++-- test/contract.js | 32 +++++++++++++++++++++++++++++++- test/contracts/contract.aes | 1 + test/tx.js | 10 +++++----- 7 files changed, 49 insertions(+), 9 deletions(-) diff --git a/src/actions/contract.js b/src/actions/contract.js index 066892fa..d20b19c2 100644 --- a/src/actions/contract.js +++ b/src/actions/contract.js @@ -97,7 +97,7 @@ export async function deploy(walletPath, args, options) { // ## Function which `call` contract export async function call(fn, args, walletPath, options) { const { - callStatic, json, top, ttl, gas, nonce, + callStatic, json, top, ttl, gas, nonce, amount, } = options; if (callStatic !== true && walletPath == null) { throw new CliError('wallet_path is required for on-chain calls'); @@ -110,6 +110,7 @@ export async function call(fn, args, walletPath, options) { nonce: nonce && +nonce, callStatic, top, + amount, }); if (json) print(callResult); else { diff --git a/src/arguments.js b/src/arguments.js index e5c26d9b..b7637b05 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -8,6 +8,10 @@ export const coinAmountParser = (amount) => { return new BigNumber(amount); }; +export const amountOption = new Option('-a, --amount [amount]', 'Amount of coins to send') + .default(0, '0ae') + .argParser(coinAmountParser); + export const feeOption = new Option('-F, --fee [fee]', 'Override the transaction fee') .argParser(coinAmountParser); diff --git a/src/commands/contract.js b/src/commands/contract.js index 643be377..36335e68 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -15,6 +15,7 @@ import { forceOption, passwordOption, ttlOption, + amountOption, } from '../arguments.js'; const callArgs = new Argument('[args]', 'JSON-encoded arguments array of contract call') @@ -108,6 +109,7 @@ addCommonOptions(program .addOption(gasOption) .option('-s, --callStatic', 'Call static') .option('-t, --topHash', 'Hash of block to make call') + .addOption(amountOption) .addOption(feeOption) .addOption(ttlOption(true)) .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') @@ -135,6 +137,7 @@ addCommonOptions(program .addOption(passwordOption) .addOption(gasOption) .addOption(gasPriceOption(true)) + .addOption(amountOption) .addOption(feeOption) .addOption(ttlOption(true)) .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') diff --git a/src/commands/tx.js b/src/commands/tx.js index 9d76eef4..baeb7a4c 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -19,6 +19,7 @@ import { forceOption, ttlOption, networkIdOption, + amountOption, } from '../arguments.js'; const program = new Command().name('aecli tx'); @@ -113,7 +114,7 @@ addCommonOptions(program .addArgument(nonceArgument) .addOption(gasOption) .addOption(gasPriceOption(false)) - .option('--amount [amount]', 'Amount', 0) + .addOption(amountOption) .description('Build contract create transaction.') .action(Transaction.contractDeploy)); @@ -127,7 +128,7 @@ addCommonOptions(program .addArgument(nonceArgument) .addOption(gasOption) .addOption(gasPriceOption(false)) - .option('--amount [amount]', 'Amount', 0) + .addOption(amountOption) .description('Build contract create transaction.') .action(Transaction.contractCall)); diff --git a/test/contract.js b/test/contract.js index 2fb6cc80..0d7bc7eb 100644 --- a/test/contract.js +++ b/test/contract.js @@ -77,7 +77,7 @@ describe('Contract Module', function contractTests() { expect(descriptor).to.eql({ version: 1, address, - bytecode: 'cb_+L5GA6Ar1lCAsdVHFnIFRGVmOW8j4LcSXxgJgqPlwvI2Zeak28C4kbhX/kTWRB8ANwEHNwAaBoIAAQM//pKLIDYANwIHBwcMAoIMAQICAxHQ4oJSDAEABAMR0OKCUv7Q4oJSAjcCBwcHFBQAAgD+6YyQGwA3AGcHBwEDLwICBAYItC8EEUTWRB8RaW5pdBGSiyA2EXRlc3QR0OKCUjEuVGVzdExpYi5zdW0R6YyQGxlnZXRNYXCCLwCFNy40LjEAF0MstQ==', + bytecode: 'cb_+NRGA6CmFq9nCCwTbFoTpKtDko1jYl6CdmFWd0+re1zVAPUVJMC4p7hj/kTWRB8ANwEHNwAaBoIAAQM//pKLIDYANwIHBwcMAoIMAQICAxHQ4oJSDAEABAMR0OKCUv7Q4oJSAjcCBwcHFBQAAgD+6YyQGwA3AGcHBwEDLwICBAYI/viMoQQENwAHAQMAuD0vBRFE1kQfEWluaXQRkosgNhF0ZXN0EdDiglIxLlRlc3RMaWIuc3VtEemMkBsZZ2V0TWFwEfiMoQQNcGF5gi8AhTcuNC4xAK21f/c=', aci: [{ namespace: { name: 'TestLib', typedefs: [] }, }, { @@ -100,6 +100,12 @@ describe('Contract Module', function contractTests() { payable: false, returns: { map: ['int', 'int'] }, stateful: false, + }, { + arguments: [], + name: 'pay', + payable: true, + returns: 'int', + stateful: false, }], kind: 'contract_main', name: 'Identity', @@ -137,6 +143,18 @@ describe('Contract Module', function contractTests() { '--json', ])).to.be.rejectedWith(CliError, expectedError); }); + + it('deploys contract with coins', async () => { + const { address } = await executeContract([ + 'deploy', + WALLET_NAME, '--password', 'test', + '--contractSource', contractSourceFile, + '[3]', + '--json', + '--amount', '1', + ]); + expect(await sdk.getBalance(address)).to.be.equal('1'); + }); }); describe('Call', () => { @@ -242,6 +260,18 @@ describe('Contract Module', function contractTests() { ]); callResponse.decodedResult.should.equal('6'); }); + + it('calls contract with coins', async () => { + await executeContract([ + 'call', + '--json', + '--descrPath', deployDescriptorFile, + 'pay', '[]', + WALLET_NAME, '--password', 'test', + '--amount', '0.000000001ae', + ]); + expect(await sdk.getBalance(contractAddress)).to.be.equal('1000000000'); + }); }); describe('Calldata', () => { diff --git a/test/contracts/contract.aes b/test/contracts/contract.aes index 97926b35..722b2b09 100644 --- a/test/contracts/contract.aes +++ b/test/contracts/contract.aes @@ -8,3 +8,4 @@ contract Identity = entrypoint init(_z: int) = { z = _z } entrypoint test(x : int, y: int) = TestLib.sum(x, TestLib.sum(y, state.z)) entrypoint getMap(): map(int, int) = {[1] = 2, [3] = 4} + payable entrypoint pay() = 0 diff --git a/test/tx.js b/test/tx.js index 481b9a32..ed5020a8 100644 --- a/test/tx.js +++ b/test/tx.js @@ -360,18 +360,18 @@ ABI Version _____________________________ 3 nonce += 1; // eslint-disable-next-line no-underscore-dangle const callData = contract._calldata.encode(contract._name, 'test', ['1', '2']); - const { tx } = await executeTx(['contract-call', TX_KEYS.publicKey, contractId, callData, nonce, '--json']); + const { tx } = await executeTx(['contract-call', TX_KEYS.publicKey, contractId, callData, nonce, '--json', '--amount', '0.00000042ae']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ abiVersion: '3', - amount: '0', + amount: '420000000000', callData, callerId: TX_KEYS.publicKey, contractId, fee: detailsJson.fee, - gas: 5817960, + gas: 5817860, gasPrice: '1000000000', nonce, type: 'ContractCallTx', @@ -381,8 +381,8 @@ ABI Version _____________________________ 3 Tx Type _________________________________ ContractCallTx Caller Account __________________________ ${TX_KEYS.publicKey} Contract Hash ___________________________ ${contractId} -Amount __________________________________ 0 -Gas _____________________________________ 5817960 +Amount __________________________________ 420000000000 +Gas _____________________________________ 5817860 Gas Price _______________________________ 1000000000 Call data _______________________________ ${callData} Fee _____________________________________ ${detailsJson.fee} From 694d40032d029588a3c13f088647a1e7806d7493 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 10 Apr 2024 19:31:42 +1000 Subject: [PATCH 55/88] fix(contract): don't show stacktrace if static contract call failed --- src/utils/CliError.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/CliError.js b/src/utils/CliError.js index a84a0105..eac96ff8 100644 --- a/src/utils/CliError.js +++ b/src/utils/CliError.js @@ -1,4 +1,4 @@ -import { InvalidPasswordError } from '@aeternity/aepp-sdk'; +import { InvalidPasswordError, NodeInvocationError } from '@aeternity/aepp-sdk'; import { setCommandOptions } from './config.js'; import { prepareOptions } from './default-option-description.js'; @@ -18,6 +18,7 @@ export async function runProgram(program) { if ( error instanceof CliError || error instanceof InvalidPasswordError + || error instanceof NodeInvocationError || error.code === 'ENOENT' ) { program.error(error.message); From 9fc2100fe3bf32a264cca994e7abdcef61512d49 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 11 Apr 2024 16:01:36 +1000 Subject: [PATCH 56/88] refactor: rewrite print utils using `console.group` --- src/utils/print.js | 355 +++++++++++++++++++-------------------------- 1 file changed, 152 insertions(+), 203 deletions(-) diff --git a/src/utils/print.js b/src/utils/print.js index 72bb732a..70d2646f 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -1,18 +1,7 @@ -// # Utils `print` Module -// That script contains helper function for `console` print import { Encoding, unpackTx } from '@aeternity/aepp-sdk'; import { decode } from './helpers.js'; -// ## Row width -const WIDTH = 40; - -// ## CONSOLE PRINT HELPERS - -// Calculate tabs length -function getTabs(tabs) { - if (!tabs) return ''; - return ' '.repeat(tabs * 4); -} +const ROW_WIDTH = 40; const JsonStringifyEs = (object, spaced) => JSON.stringify( object, @@ -24,7 +13,6 @@ const JsonStringifyEs = (object, spaced) => JSON.stringify( spaced ? 2 : undefined, ); -// Print helper export function print(msg, obj) { if (typeof msg === 'object') { console.log(JsonStringifyEs(msg, true)); @@ -38,16 +26,14 @@ export function print(msg, obj) { } } -// Print `underscored` export function printUnderscored(key, val) { print([ key, - '_'.repeat(WIDTH - key.length), + '_'.repeat(ROW_WIDTH - key.length), typeof val !== 'object' ? val : JsonStringifyEs(val), ].join(' ')); } -// ## TX export function printValidation({ validation, transaction }) { print('---------------------------------------- TX DATA ↓↓↓ \n'); const { tx, txType: type } = unpackTx(transaction); @@ -58,177 +44,154 @@ export function printValidation({ validation, transaction }) { }); } -// -// Print base `tx` info -function printTxBase(tx = {}, tabs = '') { - printUnderscored(`${tabs}Tx hash`, tx.hash); - printUnderscored(`${tabs}Block hash`, tx.blockHash); - printUnderscored(`${tabs}Block height`, tx.blockHeight); - printUnderscored(`${tabs}Signatures`, tx.signatures); - - printUnderscored(`${tabs}Tx Type`, tx?.tx?.type ?? 'N/A'); +function printContractCreateTransaction(tx) { + printUnderscored('Owner', tx.ownerId ?? 'N/A'); + printUnderscored('Amount', tx.amount ?? 'N/A'); + printUnderscored('Deposit', tx.deposit ?? 'N/A'); + printUnderscored('Gas', tx.gas ?? 'N/A'); + printUnderscored('Gas Price', tx.gasPrice ?? 'N/A'); + printUnderscored('Bytecode', tx.code); + printUnderscored('Call data', tx.callData); + + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); + printUnderscored('Version', tx.version ?? 'N/A'); + printUnderscored('VM Version', tx.vmVersion ?? 'N/A'); + printUnderscored('ABI Version', tx.abiVersion ?? 'N/A'); } -// Print `contract_create_tx` info -function printContractCreateTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Owner`, tx?.tx?.ownerId ?? 'N/A'); - printUnderscored(`${tabs}Amount`, tx?.tx?.amount ?? 'N/A'); - printUnderscored(`${tabs}Deposit`, tx?.tx?.deposit ?? 'N/A'); - printUnderscored(`${tabs}Gas`, tx?.tx?.gas ?? 'N/A'); - printUnderscored(`${tabs}Gas Price`, tx?.tx?.gasPrice ?? 'N/A'); - printUnderscored(`${tabs}Bytecode`, tx.tx.code); - printUnderscored(`${tabs}Call data`, tx.tx.callData); - - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); - printUnderscored(`${tabs}Version`, tx?.tx?.version ?? 'N/A'); - printUnderscored(`${tabs}VM Version`, tx?.tx?.vmVersion ?? 'N/A'); - printUnderscored(`${tabs}ABI Version`, tx?.tx?.abiVersion ?? 'N/A'); +function printContractCallTransaction(tx) { + printUnderscored('Caller Account', tx.callerId ?? 'N/A'); + printUnderscored('Contract Hash', tx.contractId ?? 'N/A'); + printUnderscored('Amount', tx.amount ?? 0); + printUnderscored('Gas', tx.gas ?? 0); + printUnderscored('Gas Price', tx.gasPrice ?? 0); + printUnderscored('Call data', tx.callData); + + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); + printUnderscored('Version', tx.version ?? 0); + printUnderscored('ABI Version', tx.abiVersion ?? 0); } -// Print `contract_call_tx` info -function printContractCallTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Caller Account`, tx?.tx?.callerId ?? 'N/A'); - printUnderscored(`${tabs}Contract Hash`, tx?.tx?.contractId ?? 'N/A'); - printUnderscored(`${tabs}Amount`, tx?.tx?.amount ?? 0); - printUnderscored(`${tabs}Gas`, tx?.tx?.gas ?? 0); - printUnderscored(`${tabs}Gas Price`, tx?.tx?.gasPrice ?? 0); - printUnderscored(`${tabs}Call data`, tx.tx.callData); - - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); - printUnderscored(`${tabs}Version`, tx?.tx?.version ?? 0); - printUnderscored(`${tabs}ABI Version`, tx?.tx?.abiVersion ?? 0); -} +function printSpendTransaction(tx) { + printUnderscored('Sender account', tx.senderId ?? 'N/A'); + printUnderscored('Recipient account', tx.recipientId ?? 'N/A'); + printUnderscored('Amount', tx.amount ?? 'N/A'); + printUnderscored('Payload', tx.payload ?? 'N/A'); -// Print `spend_tx` info -function printSpendTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Sender account`, tx?.tx?.senderId ?? 'N/A'); - printUnderscored(`${tabs}Recipient account`, tx?.tx?.recipientId ?? 'N/A'); - printUnderscored(`${tabs}Amount`, tx?.tx?.amount ?? 'N/A'); - printUnderscored(`${tabs}Payload`, tx?.tx?.payload ?? 'N/A'); - - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); - printUnderscored(`${tabs}Version`, tx?.tx?.version ?? 'N/A'); + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); + printUnderscored('Version', tx.version ?? 'N/A'); } -// Print `pre_claim_tx` info -function printNamePreclaimTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Account`, tx?.tx?.accountId ?? 'N/A'); - printUnderscored(`${tabs}Commitment`, tx?.tx?.commitmentId ?? 'N/A'); - printUnderscored(`${tabs}Salt`, tx?.salt ?? 'N/A'); +function printNamePreclaimTransaction(tx) { + printUnderscored('Account', tx.accountId ?? 'N/A'); + printUnderscored('Commitment', tx.commitmentId ?? 'N/A'); + printUnderscored('Salt', tx?.salt ?? 'N/A'); - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); - printUnderscored(`${tabs}Version`, tx?.tx?.version ?? 'N/A'); + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); + printUnderscored('Version', tx.version ?? 'N/A'); } -// Print `claim_tx` info -function printNameClaimTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Account`, tx?.tx?.accountId ?? 'N/A'); - printUnderscored(`${tabs}Name`, tx?.tx?.name ?? 'N/A'); - printUnderscored(`${tabs}Name Fee`, tx?.tx?.nameFee ?? 'N/A'); - printUnderscored(`${tabs}Name Salt`, tx?.tx?.nameSalt ?? 'N/A'); - - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); - printUnderscored(`${tabs}Version`, tx?.tx?.version ?? 'N/A'); +function printNameClaimTransaction(tx) { + printUnderscored('Account', tx.accountId ?? 'N/A'); + printUnderscored('Name', tx.name ?? 'N/A'); + printUnderscored('Name Fee', tx.nameFee ?? 'N/A'); + printUnderscored('Name Salt', tx.nameSalt ?? 'N/A'); + + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); + printUnderscored('Version', tx.version ?? 'N/A'); } -// Print `update_name_tx` info -function printNameUpdateTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Account`, tx?.tx?.accountId ?? 'N/A'); - printUnderscored(`${tabs}Client TTL`, tx?.tx?.clientTtl ?? 'N/A'); - printUnderscored(`${tabs}Name ID`, tx?.tx?.nameId ?? 'N/A'); - printUnderscored(`${tabs}Name TTL`, tx?.tx?.nameTtl ?? 'N/A'); - const pointers = tx?.tx?.pointers; +function printNameUpdateTransaction(tx) { + printUnderscored('Account', tx.accountId ?? 'N/A'); + printUnderscored('Client TTL', tx.clientTtl ?? 'N/A'); + printUnderscored('Name ID', tx.nameId ?? 'N/A'); + printUnderscored('Name TTL', tx.nameTtl ?? 'N/A'); + const { pointers } = tx; if (pointers?.length) pointers.forEach(({ key, id }) => printUnderscored(`Pointer ${key}`, id)); else printUnderscored('Pointers', 'N/A'); - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); - printUnderscored(`${tabs}Version`, tx?.tx?.version ?? 'N/A'); + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); + printUnderscored('Version', tx.version ?? 'N/A'); } -// Print `transfer_name_tx` info -function printNameTransferTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Account`, tx?.tx?.accountId ?? 'N/A'); - printUnderscored(`${tabs}Recipient`, tx?.tx?.recipientId ?? 'N/A'); - printUnderscored(`${tabs}Name ID`, tx?.tx?.nameId ?? 'N/A'); +function printNameTransferTransaction(tx) { + printUnderscored('Account', tx.accountId ?? 'N/A'); + printUnderscored('Recipient', tx.recipientId ?? 'N/A'); + printUnderscored('Name ID', tx.nameId ?? 'N/A'); - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); - printUnderscored(`${tabs}Version`, tx?.tx?.version ?? 'N/A'); + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); + printUnderscored('Version', tx.version ?? 'N/A'); } -// Print `revoke_name_tx` info -function printNameRevokeTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Account`, tx?.tx?.accountId ?? 'N/A'); - printUnderscored(`${tabs}Name ID`, tx?.tx?.nameId ?? 'N/A'); +function printNameRevokeTransaction(tx) { + printUnderscored('Account', tx.accountId ?? 'N/A'); + printUnderscored('Name ID', tx.nameId ?? 'N/A'); - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); - printUnderscored(`${tabs}Version`, tx?.tx?.version ?? 'N/A'); + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); + printUnderscored('Version', tx.version ?? 'N/A'); } -// Print `oracle-register-tx` info -function printOracleRegisterTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Account`, tx?.tx?.accountId ?? 'N/A'); - printUnderscored(`${tabs}Oracle ID`, tx?.tx?.accountId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); - - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Query Fee`, tx?.tx?.queryFee ?? 'N/A'); - printUnderscored(`${tabs}Oracle Ttl`, tx?.tx?.oracleTtl ?? 'N/A'); - printUnderscored(`${tabs}Query Format`, tx?.tx?.queryFormat ?? 'N/A'); - printUnderscored(`${tabs}Response Format`, tx?.tx?.responseFormat ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); +function printOracleRegisterTransaction(tx) { + printUnderscored('Account', tx.accountId ?? 'N/A'); + printUnderscored('Oracle ID', tx.accountId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); + + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Query Fee', tx.queryFee ?? 'N/A'); + printUnderscored('Oracle Ttl', tx.oracleTtl ?? 'N/A'); + printUnderscored('Query Format', tx.queryFormat ?? 'N/A'); + printUnderscored('Response Format', tx.responseFormat ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); } -// Print `oracle-post-query` info -function printOraclePostQueryTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Account`, tx?.tx?.senderId ?? 'N/A'); - printUnderscored(`${tabs}Oracle ID`, tx?.tx?.oracleId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); - printUnderscored(`${tabs}Query ID`, tx?.id ?? 'N/A'); - printUnderscored(`${tabs}Query`, tx?.tx?.query ?? 'N/A'); - - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Query Fee`, tx?.tx?.queryFee ?? 'N/A'); - printUnderscored(`${tabs}Query Ttl`, tx?.tx?.queryTtl ?? 'N/A'); - printUnderscored(`${tabs}Response Ttl`, tx?.tx?.responseTtl ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); +function printOraclePostQueryTransaction(tx) { + printUnderscored('Account', tx.senderId ?? 'N/A'); + printUnderscored('Oracle ID', tx.oracleId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); + printUnderscored('Query ID', tx?.id ?? 'N/A'); + printUnderscored('Query', tx.query ?? 'N/A'); + + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Query Fee', tx.queryFee ?? 'N/A'); + printUnderscored('Query Ttl', tx.queryTtl ?? 'N/A'); + printUnderscored('Response Ttl', tx.responseTtl ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); } -// Print `oracle-extend` info -function printOracleExtendTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Oracle ID`, tx?.tx?.oracleId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); +function printOracleExtendTransaction(tx) { + printUnderscored('Oracle ID', tx.oracleId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Oracle Ttl`, tx?.tx?.oracleTtl ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Oracle Ttl', tx.oracleTtl ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); } -// Print `oracle-response` info -function printOracleResponseTransaction(tx = {}, tabs = '') { - printUnderscored(`${tabs}Oracle ID`, tx?.tx?.oracleId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); - printUnderscored(`${tabs}Query`, tx?.tx?.queryId ?? 'N/A'); +function printOracleResponseTransaction(tx) { + printUnderscored('Oracle ID', tx.oracleId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); + printUnderscored('Query', tx.queryId ?? 'N/A'); - printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A'); - printUnderscored(`${tabs}Response`, tx?.tx?.response ?? 'N/A'); - printUnderscored(`${tabs}Response Ttl`, tx?.tx?.responseTtl ?? 'N/A'); - printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A'); - printUnderscored(`${tabs}TTL`, tx?.tx?.ttl ?? 'N/A'); + printUnderscored('Fee', tx.fee ?? 'N/A'); + printUnderscored('Response', tx.response ?? 'N/A'); + printUnderscored('Response Ttl', tx.responseTtl ?? 'N/A'); + printUnderscored('Nonce', tx.nonce ?? 'N/A'); + printUnderscored('TTL', tx.ttl ?? 'N/A'); } const TX_TYPE_PRINT_MAP = { @@ -246,38 +209,24 @@ const TX_TYPE_PRINT_MAP = { OracleRespondTx: printOracleResponseTransaction, }; -// ## BLOCK - -function replaceAt(str, index, replacement) { - return str.substring(0, index) + replacement + str.substring(index + replacement.length); -} - -function printTxInfo(tx, tabs) { - const type = tx?.tx?.type; - TX_TYPE_PRINT_MAP[replaceAt(type, 0, type[0].toUpperCase())](tx, tabs); -} - -// Function which print `tx` -// Get type of `tx` to now which `print` method to use -export function printTransaction(tx, json, tabs = 0, skipBase = false) { +export function printTransaction(_tx, json) { if (json) { - print(tx); + print(_tx); return; } - const tabsString = getTabs(tabs); - if (!skipBase) printTxBase({ ...tx, ...tx.tx ? tx.tx : {} }, tabsString); - printTxInfo({ ...tx, ...tx.tx ? tx.tx : {} }, tabsString); + const tx = { ..._tx, ..._tx.tx }; + printUnderscored('Tx hash', tx.hash); + printUnderscored('Block hash', tx.blockHash); + printUnderscored('Block height', tx.blockHeight); + printUnderscored('Signatures', tx.signatures); + printUnderscored('Tx Type', tx.type); + TX_TYPE_PRINT_MAP[tx.type[0].toUpperCase() + tx.type.slice(1)](tx); } -export function printBlockTransactions(ts, json, tabs = 0) { - if (json) { - print(ts); - return; - } - const tabsString = getTabs(tabs); +export function printBlockTransactions(ts) { ts.forEach((tx) => { - print(`${tabsString}<<--------------- Transaction --------------->>`); - printTransaction(tx, false, tabs); + print('<<--------------- Transaction --------------->>'); + printTransaction(tx, false); }); } @@ -287,32 +236,32 @@ export function printBlock(block, json, isRoot = false) { return; } const encoding = block.hash.split('_')[0]; - const tabs = !isRoot && encoding === Encoding.MicroBlockHash ? 1 : 0; - const tabString = getTabs(tabs); + if (!isRoot && encoding === Encoding.MicroBlockHash) console.group(); const reverseEncoding = Object.fromEntries(Object.entries(Encoding).map(([k, v]) => [v, k])); const name = reverseEncoding[encoding].replace('Hash', ''); - print(`${tabString}<<--------------- ${name} --------------->>`); - - printUnderscored(`${tabString}Block hash`, block.hash); - printUnderscored(`${tabString}Block height`, block.height); - printUnderscored(`${tabString}State hash`, block.stateHash); - printUnderscored(`${tabString}Nonce`, block.nonce ?? 'N/A'); - printUnderscored(`${tabString}Miner`, block.miner ?? 'N/A'); - printUnderscored(`${tabString}Time`, new Date(block.time).toString()); - printUnderscored(`${tabString}Previous block hash`, block.prevHash); - printUnderscored(`${tabString}Previous key block hash`, block.prevKeyHash); - printUnderscored(`${tabString}Version`, block.version); - printUnderscored(`${tabString}Target`, block.target ?? 'N/A'); + print(`<<--------------- ${name} --------------->>`); + + printUnderscored('Block hash', block.hash); + printUnderscored('Block height', block.height); + printUnderscored('State hash', block.stateHash); + printUnderscored('Nonce', block.nonce ?? 'N/A'); + printUnderscored('Miner', block.miner ?? 'N/A'); + printUnderscored('Time', new Date(block.time).toString()); + printUnderscored('Previous block hash', block.prevHash); + printUnderscored('Previous key block hash', block.prevKeyHash); + printUnderscored('Version', block.version); + printUnderscored('Target', block.target ?? 'N/A'); const txCount = block.transactions?.length ?? 0; - printUnderscored(`${tabString}Transactions`, txCount); - if (txCount) printBlockTransactions(block.transactions, false, tabs + 1); + printUnderscored('Transactions', txCount); + if (txCount) { + console.group(); + printBlockTransactions(block.transactions); + console.groupEnd(); + } + if (!isRoot && encoding === Encoding.MicroBlockHash) console.groupEnd(); } -// ##OTHER -// - -// Print `oracle` export function printOracle(oracle, json) { if (json) { print(oracle); @@ -324,7 +273,7 @@ export function printOracle(oracle, json) { printUnderscored('Oracle Response Format', oracle.responseFormat ?? 'N/A'); printUnderscored('Ttl', oracle.ttl ?? 'N/A'); } -// Print `oracle` + export function printQueries(queries = [], json) { if (json) { print(queries); From f2fa210a1bbba6949c8d82d6015ce811f32e30bc Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 11 Apr 2024 17:13:24 +1000 Subject: [PATCH 57/88] refactor: combine transaction printing helpers --- src/actions/transaction.js | 3 +- src/utils/print.js | 210 ++++++++----------------------------- test/tx.js | 26 ++--- 3 files changed, 56 insertions(+), 183 deletions(-) diff --git a/src/actions/transaction.js b/src/actions/transaction.js index bc3d4867..830df4f8 100644 --- a/src/actions/transaction.js +++ b/src/actions/transaction.js @@ -10,7 +10,7 @@ import { import { print, printUnderscored, printValidation } from '../utils/print.js'; import { validateName, decode } from '../utils/helpers.js'; -// Print `Buider Transaction` +// Print `Builder Transaction` function buildAndPrintTx(params, json, extraKeys = {}) { const tx = buildTx(params); const txObject = unpackTx(tx); @@ -21,6 +21,7 @@ function buildAndPrintTx(params, json, extraKeys = {}) { } printUnderscored('Transaction type', Tag[params.tag]); print('Summary'); + // TODO: print the same way as transactions from node Object .entries({ ...txObject, ...extraKeys }) .forEach(([key, value]) => printUnderscored(` ${key.toUpperCase()}`, value)); diff --git a/src/utils/print.js b/src/utils/print.js index 70d2646f..b6f721f6 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -44,183 +44,65 @@ export function printValidation({ validation, transaction }) { }); } -function printContractCreateTransaction(tx) { - printUnderscored('Owner', tx.ownerId ?? 'N/A'); - printUnderscored('Amount', tx.amount ?? 'N/A'); - printUnderscored('Deposit', tx.deposit ?? 'N/A'); - printUnderscored('Gas', tx.gas ?? 'N/A'); - printUnderscored('Gas Price', tx.gasPrice ?? 'N/A'); - printUnderscored('Bytecode', tx.code); - printUnderscored('Call data', tx.callData); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); - printUnderscored('Version', tx.version ?? 'N/A'); - printUnderscored('VM Version', tx.vmVersion ?? 'N/A'); - printUnderscored('ABI Version', tx.abiVersion ?? 'N/A'); -} - -function printContractCallTransaction(tx) { - printUnderscored('Caller Account', tx.callerId ?? 'N/A'); - printUnderscored('Contract Hash', tx.contractId ?? 'N/A'); - printUnderscored('Amount', tx.amount ?? 0); - printUnderscored('Gas', tx.gas ?? 0); - printUnderscored('Gas Price', tx.gasPrice ?? 0); - printUnderscored('Call data', tx.callData); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); - printUnderscored('Version', tx.version ?? 0); - printUnderscored('ABI Version', tx.abiVersion ?? 0); -} - -function printSpendTransaction(tx) { - printUnderscored('Sender account', tx.senderId ?? 'N/A'); - printUnderscored('Recipient account', tx.recipientId ?? 'N/A'); - printUnderscored('Amount', tx.amount ?? 'N/A'); - printUnderscored('Payload', tx.payload ?? 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); - printUnderscored('Version', tx.version ?? 'N/A'); -} - -function printNamePreclaimTransaction(tx) { - printUnderscored('Account', tx.accountId ?? 'N/A'); - printUnderscored('Commitment', tx.commitmentId ?? 'N/A'); - printUnderscored('Salt', tx?.salt ?? 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); - printUnderscored('Version', tx.version ?? 'N/A'); -} - -function printNameClaimTransaction(tx) { - printUnderscored('Account', tx.accountId ?? 'N/A'); - printUnderscored('Name', tx.name ?? 'N/A'); - printUnderscored('Name Fee', tx.nameFee ?? 'N/A'); - printUnderscored('Name Salt', tx.nameSalt ?? 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); - printUnderscored('Version', tx.version ?? 'N/A'); -} - -function printNameUpdateTransaction(tx) { - printUnderscored('Account', tx.accountId ?? 'N/A'); - printUnderscored('Client TTL', tx.clientTtl ?? 'N/A'); - printUnderscored('Name ID', tx.nameId ?? 'N/A'); - printUnderscored('Name TTL', tx.nameTtl ?? 'N/A'); - const { pointers } = tx; - if (pointers?.length) pointers.forEach(({ key, id }) => printUnderscored(`Pointer ${key}`, id)); - else printUnderscored('Pointers', 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); - printUnderscored('Version', tx.version ?? 'N/A'); -} - -function printNameTransferTransaction(tx) { - printUnderscored('Account', tx.accountId ?? 'N/A'); - printUnderscored('Recipient', tx.recipientId ?? 'N/A'); - printUnderscored('Name ID', tx.nameId ?? 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); - printUnderscored('Version', tx.version ?? 'N/A'); +function printTxField(tx, verboseName, field, handleValue = (a) => a) { + if (!(field in tx)) return; + printUnderscored(verboseName, tx[field] == null ? 'N/A' : handleValue(tx[field])); } -function printNameRevokeTransaction(tx) { - printUnderscored('Account', tx.accountId ?? 'N/A'); - printUnderscored('Name ID', tx.nameId ?? 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); - printUnderscored('Version', tx.version ?? 'N/A'); -} - -function printOracleRegisterTransaction(tx) { - printUnderscored('Account', tx.accountId ?? 'N/A'); - printUnderscored('Oracle ID', tx.accountId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Query Fee', tx.queryFee ?? 'N/A'); - printUnderscored('Oracle Ttl', tx.oracleTtl ?? 'N/A'); - printUnderscored('Query Format', tx.queryFormat ?? 'N/A'); - printUnderscored('Response Format', tx.responseFormat ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); -} - -function printOraclePostQueryTransaction(tx) { - printUnderscored('Account', tx.senderId ?? 'N/A'); - printUnderscored('Oracle ID', tx.oracleId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); - printUnderscored('Query ID', tx?.id ?? 'N/A'); - printUnderscored('Query', tx.query ?? 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Query Fee', tx.queryFee ?? 'N/A'); - printUnderscored('Query Ttl', tx.queryTtl ?? 'N/A'); - printUnderscored('Response Ttl', tx.responseTtl ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); -} - -function printOracleExtendTransaction(tx) { - printUnderscored('Oracle ID', tx.oracleId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Oracle Ttl', tx.oracleTtl ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); -} - -function printOracleResponseTransaction(tx) { - printUnderscored('Oracle ID', tx.oracleId?.replace(/^\w{2}_/, 'ok_') ?? 'N/A'); - printUnderscored('Query', tx.queryId ?? 'N/A'); - - printUnderscored('Fee', tx.fee ?? 'N/A'); - printUnderscored('Response', tx.response ?? 'N/A'); - printUnderscored('Response Ttl', tx.responseTtl ?? 'N/A'); - printUnderscored('Nonce', tx.nonce ?? 'N/A'); - printUnderscored('TTL', tx.ttl ?? 'N/A'); -} - -const TX_TYPE_PRINT_MAP = { - SpendTx: printSpendTransaction, - ContractCreateTx: printContractCreateTransaction, - ContractCallTx: printContractCallTransaction, - NamePreclaimTx: printNamePreclaimTransaction, - NameClaimTx: printNameClaimTransaction, - NameTransferTx: printNameTransferTransaction, - NameUpdateTx: printNameUpdateTransaction, - NameRevokeTx: printNameRevokeTransaction, - OracleRegisterTx: printOracleRegisterTransaction, - OracleQueryTx: printOraclePostQueryTransaction, - OracleExtendTx: printOracleExtendTransaction, - OracleRespondTx: printOracleResponseTransaction, -}; - export function printTransaction(_tx, json) { if (json) { print(_tx); return; } const tx = { ..._tx, ..._tx.tx }; + printUnderscored('Tx hash', tx.hash); printUnderscored('Block hash', tx.blockHash); printUnderscored('Block height', tx.blockHeight); printUnderscored('Signatures', tx.signatures); printUnderscored('Tx Type', tx.type); - TX_TYPE_PRINT_MAP[tx.type[0].toUpperCase() + tx.type.slice(1)](tx); + + printTxField(tx, 'Account', 'accountId'); + printTxField(tx, 'Client TTL', 'clientTtl'); + printTxField(tx, 'Sender account', 'senderId'); + printTxField(tx, 'Recipient account', 'recipientId'); + printTxField(tx, 'Name ID', 'nameId'); + printTxField(tx, 'Name TTL', 'nameTtl'); + printTxField(tx, 'Name', 'name'); + printTxField(tx, 'Name Fee', 'nameFee'); + printTxField(tx, 'Name Salt', 'nameSalt'); + printTxField(tx, 'Owner', 'ownerId'); + printTxField(tx, 'Caller Account', 'callerId'); + printTxField(tx, 'Contract Address', 'contractId'); + printTxField(tx, 'Oracle ID', 'oracleId', (id) => id.replace(/^\w{2}_/, 'ok_')); + printTxField(tx, 'Query', 'query'); + if ('pointers' in tx) { + if (tx.pointers.length === 0) printUnderscored('Pointers', 'N/A'); + else tx.pointers.forEach(({ key, id }) => printUnderscored(`Pointer ${key}`, id)); + } + printTxField(tx, 'Amount', 'amount'); + printTxField(tx, 'Payload', 'payload'); + printTxField(tx, 'Deposit', 'deposit'); + printTxField(tx, 'Gas', 'gas'); + printTxField(tx, 'Gas Price', 'gasPrice'); + printTxField(tx, 'Bytecode', 'code'); + printTxField(tx, 'Call data', 'callData'); + printTxField(tx, 'Commitment', 'commitmentId'); + printTxField(tx, 'Salt', 'salt'); + printTxField(tx, 'Query', 'queryId'); + printTxField(tx, 'Fee', 'fee'); + printTxField(tx, 'Response', 'response'); + printTxField(tx, 'Query Fee', 'queryFee'); + printTxField(tx, 'Oracle Ttl', 'oracleTtl'); + printTxField(tx, 'Query Ttl', 'queryTtl'); + printTxField(tx, 'Response Ttl', 'responseTtl'); + printTxField(tx, 'Query Format', 'queryFormat'); + printTxField(tx, 'Response Format', 'responseFormat'); + printTxField(tx, 'Nonce', 'nonce'); + printTxField(tx, 'TTL', 'ttl'); + printTxField(tx, 'Version', 'version'); + printTxField(tx, 'VM Version', 'vmVersion'); + printTxField(tx, 'ABI Version', 'abiVersion'); } export function printBlockTransactions(ts) { diff --git a/test/tx.js b/test/tx.js index ed5020a8..368c4641 100644 --- a/test/tx.js +++ b/test/tx.js @@ -156,7 +156,6 @@ Amount __________________________________ 100 Payload _________________________________ ba_Xfbg4g== Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A Version _________________________________ 1 `.trim()); }); @@ -181,10 +180,8 @@ Version _________________________________ 1 Tx Type _________________________________ NamePreclaimTx Account _________________________________ ${TX_KEYS.publicKey} Commitment ______________________________ ${detailsJson.commitmentId} -Salt ____________________________________ N/A Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A Version _________________________________ 1 `.trim()); }); @@ -214,7 +211,6 @@ Name Fee ________________________________ 159700000000000000 Name Salt _______________________________ ${salt} Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A Version _________________________________ 2 `.trim()); @@ -247,7 +243,6 @@ Name TTL ________________________________ 180000 Pointer account_pubkey __________________ ${TX_KEYS.publicKey} Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A Version _________________________________ 1 `.trim()); }); @@ -270,11 +265,10 @@ Version _________________________________ 1 expect(details).to.equal(` Tx Type _________________________________ NameTransferTx Account _________________________________ ${TX_KEYS.publicKey} -Recipient _______________________________ ${TX_KEYS.publicKey} +Recipient account _______________________ ${TX_KEYS.publicKey} Name ID _________________________________ ${nameId} Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A Version _________________________________ 1 `.trim()); }); @@ -299,7 +293,6 @@ Account _________________________________ ${TX_KEYS.publicKey} Name ID _________________________________ ${nameId} Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A Version _________________________________ 1 `.trim()); }); @@ -349,7 +342,6 @@ Bytecode ________________________________ ${bytecode} Call data _______________________________ ${callData} Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A Version _________________________________ 1 VM Version ______________________________ 7 ABI Version _____________________________ 3 @@ -380,14 +372,13 @@ ABI Version _____________________________ 3 expect(details).to.equal(` Tx Type _________________________________ ContractCallTx Caller Account __________________________ ${TX_KEYS.publicKey} -Contract Hash ___________________________ ${contractId} +Contract Address ________________________ ${contractId} Amount __________________________________ 420000000000 Gas _____________________________________ 5817860 Gas Price _______________________________ 1000000000 Call data _______________________________ ${callData} Fee _____________________________________ ${detailsJson.fee} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A Version _________________________________ 1 ABI Version _____________________________ 3 `.trim()); @@ -414,14 +405,14 @@ ABI Version _____________________________ 3 expect(details).to.equal(` Tx Type _________________________________ OracleRegisterTx Account _________________________________ ${TX_KEYS.publicKey} -Oracle ID _______________________________ ${oracleId} Fee _____________________________________ ${detailsJson.fee} Query Fee _______________________________ 0 Oracle Ttl ______________________________ {"type":"delta","value":"500"} Query Format ____________________________ {city: "str"} Response Format _________________________ {tmp:""num} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A +Version _________________________________ 1 +ABI Version _____________________________ 0 `.trim()); }); @@ -446,7 +437,7 @@ Oracle ID _______________________________ ${oracleId} Fee _____________________________________ ${detailsJson.fee} Oracle Ttl ______________________________ {"type":"delta","value":"100"} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A +Version _________________________________ 1 `.trim()); const oracleTtl = await sdk.api.getOracleByPubkey(oracleId); @@ -474,16 +465,15 @@ TTL _____________________________________ N/A }); expect(details).to.equal(` Tx Type _________________________________ OracleQueryTx -Account _________________________________ ${TX_KEYS.publicKey} +Sender account __________________________ ${TX_KEYS.publicKey} Oracle ID _______________________________ ${oracleId} -Query ID ________________________________ N/A Query ___________________________________ {city: "Berlin"} Fee _____________________________________ ${detailsJson.fee} Query Fee _______________________________ 0 Query Ttl _______________________________ {"type":"delta","value":"10"} Response Ttl ____________________________ {"type":"delta","value":"10"} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A +Version _________________________________ 1 `.trim()); const { oracleQueries: queries } = await sdk.api.getOracleQueriesByPubkey(oracleId); @@ -517,7 +507,7 @@ Fee _____________________________________ ${detailsJson.fee} Response ________________________________ {tmp: 10} Response Ttl ____________________________ {"type":"delta","value":"10"} Nonce ___________________________________ ${nonce} -TTL _____________________________________ N/A +Version _________________________________ 1 `.trim()); const { oracleQueries: queries } = await sdk.api.getOracleQueriesByPubkey(oracleId); From e7f2e58bae89834f44e0d220c2b5748521c7fdfd Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 11 Apr 2024 17:47:49 +1000 Subject: [PATCH 58/88] fix: don't show stacktraces for RestErrors --- package-lock.json | 7 ++++--- package.json | 1 + src/utils/CliError.js | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 849f77af..24b4e55c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "ISC", "dependencies": { "@aeternity/aepp-sdk": "^13.3.0", + "@azure/core-rest-pipeline": "^1.15.2", "bignumber.js": "^9.1.2", "commander": "^12.0.0", "env-paths": "^3.0.0", @@ -165,9 +166,9 @@ } }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.15.1.tgz", - "integrity": "sha512-ZxS6i3eHxh86u+1eWZJiYywoN2vxvsSoAUx60Mny8cZ4nTwvt7UzVVBJO+m2PW2KIJfNiXMt59xBa59htOWL4g==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.15.2.tgz", + "integrity": "sha512-BmWfpjc/QXc2ipHOh6LbUzp3ONCaa6xzIssTU0DwH9bbYNXJlGUL6tujx5TrbVd/QQknmS+vlQJGrCq2oL1gZA==", "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-auth": "^1.4.0", diff --git a/package.json b/package.json index 713a1833..f6eb3e27 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "type": "module", "dependencies": { "@aeternity/aepp-sdk": "^13.3.0", + "@azure/core-rest-pipeline": "^1.15.2", "bignumber.js": "^9.1.2", "commander": "^12.0.0", "env-paths": "^3.0.0", diff --git a/src/utils/CliError.js b/src/utils/CliError.js index eac96ff8..23bafc63 100644 --- a/src/utils/CliError.js +++ b/src/utils/CliError.js @@ -1,3 +1,4 @@ +import { RestError } from '@azure/core-rest-pipeline'; import { InvalidPasswordError, NodeInvocationError } from '@aeternity/aepp-sdk'; import { setCommandOptions } from './config.js'; import { prepareOptions } from './default-option-description.js'; @@ -17,6 +18,7 @@ export async function runProgram(program) { } catch (error) { if ( error instanceof CliError + || error instanceof RestError || error instanceof InvalidPasswordError || error instanceof NodeInvocationError || error.code === 'ENOENT' From 5a9f4cc31750cbc82cb3c4179935c8efda402d5f Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 12 Apr 2024 00:15:31 +1000 Subject: [PATCH 59/88] feat: show extra info in tx details, consistent fields naming --- src/actions/aens.js | 40 ++---- src/actions/chain.js | 2 +- src/actions/contract.js | 4 +- src/actions/inspect.js | 15 +-- src/actions/oracle.js | 8 +- src/commands/spend.js | 2 +- src/utils/helpers.js | 10 ++ src/utils/print.js | 85 +++++++----- test/index.js | 20 ++- test/inspect.js | 50 +++---- test/spend.js | 37 +++--- test/tx.js | 282 ++++++++++++++++++++-------------------- 12 files changed, 288 insertions(+), 267 deletions(-) diff --git a/src/actions/aens.js b/src/actions/aens.js index 9fe96cae..6c1f221b 100644 --- a/src/actions/aens.js +++ b/src/actions/aens.js @@ -33,10 +33,7 @@ export async function preClaim(walletPath, name, options) { ttl, fee, nonce, waitMined, }); if (waitMined) { - printTransaction( - preClaimTx, - json, - ); + await printTransaction(preClaimTx, json, sdk); } else { print(`Transaction send to the chain. Tx hash: ${preClaimTx.hash}`); } @@ -60,10 +57,7 @@ export async function claim(walletPath, name, salt, options) { nonce, ttl, fee, waitMined, nameFee, }); if (waitMined) { - printTransaction( - claimTx, - json, - ); + await printTransaction(claimTx, json, sdk); } else { print(`Transaction send to the chain. Tx hash: ${claimTx.hash}`); } @@ -94,10 +88,7 @@ export async function updateName(walletPath, name, addresses, options) { }, ); if (waitMined) { - printTransaction( - updateTx, - json, - ); + await printTransaction(updateTx, json, sdk); } else { print(`Transaction send to the chain. Tx hash: ${updateTx.hash}`); } @@ -121,10 +112,7 @@ export async function extendName(walletPath, name, nameTtl, options) { ttl, fee, nonce, waitMined, nameTtl, extendPointers: true, }); if (waitMined) { - printTransaction( - updateTx, - json, - ); + await printTransaction(updateTx, json, sdk); } else { print(`Transaction send to the chain. Tx hash: ${updateTx.hash}`); } @@ -150,10 +138,7 @@ export async function transferName(walletPath, name, address, options) { ttl, fee, nonce, waitMined, }); if (waitMined) { - printTransaction( - transferTX, - json, - ); + await printTransaction(transferTX, json, sdk); } else { print(`Transaction send to the chain. Tx hash: ${transferTX.hash}`); } @@ -177,10 +162,7 @@ export async function revokeName(walletPath, name, options) { ttl, fee, nonce, waitMined, }); if (waitMined) { - printTransaction( - revokeTx, - json, - ); + await printTransaction(revokeTx, json, sdk); } else { print(`Transaction send to the chain. Tx hash: ${revokeTx.hash}`); } @@ -203,10 +185,7 @@ export async function nameBid(walletPath, name, nameFee, options) { nonce, ttl, fee, waitMined, }); if (waitMined) { - printTransaction( - nameBidTx, - json, - ); + await printTransaction(nameBidTx, json, sdk); } else { print(`Transaction send to the chain. Tx hash: ${nameBidTx.hash}`); } @@ -239,8 +218,5 @@ export async function fullClaim(walletPath, name, options) { }, ); - printTransaction( - updateTx, - json, - ); + await printTransaction(updateTx, json, sdk); } diff --git a/src/actions/chain.js b/src/actions/chain.js index 23252c88..a5f362c5 100644 --- a/src/actions/chain.js +++ b/src/actions/chain.js @@ -103,6 +103,6 @@ export async function broadcast(signedTx, options) { const { txHash } = await sdk.api.postTransaction({ tx: signedTx }); const tx = await (waitMined ? sdk.poll(txHash) : sdk.api.getTransactionByHash(txHash)); - printTransaction(tx, json); + await printTransaction(tx, json, sdk); if (!waitMined && !json) print('Transaction send to the chain.'); } diff --git a/src/actions/contract.js b/src/actions/contract.js index d20b19c2..57a65953 100644 --- a/src/actions/contract.js +++ b/src/actions/contract.js @@ -114,7 +114,9 @@ export async function call(fn, args, walletPath, options) { }); if (json) print(callResult); else { - if (callResult.hash) printTransaction(await sdk.api.getTransactionByHash(callResult.hash), json); + if (callResult.hash) { + await printTransaction(await sdk.api.getTransactionByHash(callResult.hash), json, sdk); + } print('----------------------Call info-----------------------'); printUnderscored('Contract address', contract.$options.address); printUnderscored('Gas price', callResult.result?.gasPrice); diff --git a/src/actions/inspect.js b/src/actions/inspect.js index eacf11a0..0e422fb9 100644 --- a/src/actions/inspect.js +++ b/src/actions/inspect.js @@ -2,7 +2,6 @@ // // This script initialize all `inspect` function -import BigNumber from 'bignumber.js'; import { Encoding, unpackTx as _unpackTx, Tag } from '@aeternity/aepp-sdk'; import { initSdk } from '../utils/cli.js'; import { @@ -14,7 +13,7 @@ import { printUnderscored, } from '../utils/print.js'; import { - checkPref, getBlock, getNameEntry, timeAgo, validateName, + checkPref, getBlock, getNameEntry, formatCoins, formatTtl, validateName, } from '../utils/helpers.js'; import CliError from '../utils/CliError.js'; @@ -32,13 +31,14 @@ async function getBlockByHash(hash, { json, ...options }) { async function getTransactionByHash(hash, { json, ...options }) { checkPref(hash, Encoding.TxHash); const sdk = initSdk(options); - printTransaction(await sdk.api.getTransactionByHash(hash), json); + await printTransaction(await sdk.api.getTransactionByHash(hash), json, sdk); } async function unpackTx(encodedTx, { json }) { checkPref(encodedTx, Encoding.Transaction); const txUnpacked = _unpackTx(encodedTx); if (json) print(txUnpacked); + // TODO: use printTransaction instead else printEntries({ 'Tx Type': Tag[txUnpacked.tag], ...txUnpacked }); } @@ -69,15 +69,6 @@ async function getBlockByHeight(height, { json, ...options }) { printBlock(await sdk.api.getKeyBlockByHeight(+height), json); } -const formatCoins = (coins) => `${new BigNumber(coins).shiftedBy(-18).toFixed()}ae`; - -const formatTtl = (ttl, height) => { - const date = new Date(); - const diff = Math.abs(ttl - height) < 3 ? 0 : ttl - height; - date.setMinutes(date.getMinutes() + diff * 3); - return `${ttl} (${timeAgo(date)})`; -}; - async function getName(name, { json, ...options }) { validateName(name); const sdk = initSdk(options); diff --git a/src/actions/oracle.js b/src/actions/oracle.js index eb95adf2..8ea56881 100644 --- a/src/actions/oracle.js +++ b/src/actions/oracle.js @@ -35,7 +35,7 @@ export async function createOracle(walletPath, queryFormat, responseFormat, opti queryFee, }); if (waitMined) { - printTransaction(oracle, json); + await printTransaction(oracle, json, sdk); } else { print('Transaction send to the chain. Tx hash: ', oracle); } @@ -62,7 +62,7 @@ export async function extendOracle(walletPath, oracleId, oracleTtl, options) { }, }); if (waitMined) { - printTransaction(extended, json); + await printTransaction(extended, json, sdk); } else { print('Transaction send to the chain. Tx hash: ', extended); } @@ -96,7 +96,7 @@ export async function createOracleQuery(walletPath, oracleId, query, options) { queryFee, }); if (waitMined) { - printTransaction(oracleQuery, json); + await printTransaction(oracleQuery, json, sdk); } else { print('Transaction send to the chain. Tx hash: ', oracleQuery); } @@ -131,7 +131,7 @@ export async function respondToQuery( }, }); if (waitMined) { - printTransaction(queryResponse, json); + await printTransaction(queryResponse, json, sdk); } else { print('Transaction send to the chain. Tx hash: ', queryResponse); } diff --git a/src/commands/spend.js b/src/commands/spend.js index ea200e5e..254d6c31 100644 --- a/src/commands/spend.js +++ b/src/commands/spend.js @@ -55,5 +55,5 @@ Example call: }, ); if (!json) print('Transaction mined'); - printTransaction(tx, json); + await printTransaction(tx, json, sdk); }); diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 4df9e700..69910c4a 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -1,6 +1,7 @@ // # Utils `helpers` Module // That script contains base helper function +import BigNumber from 'bignumber.js'; import { resolve } from 'path'; import { Encoding, decode as _decode, produceNameId } from '@aeternity/aepp-sdk'; import CliError from './CliError.js'; @@ -106,3 +107,12 @@ export function timeAgo(date) { } return 'about now'; } + +export const formatCoins = (coins) => `${new BigNumber(coins).shiftedBy(-18).toFixed()}ae`; + +export const formatTtl = (ttl, height) => { + const date = new Date(); + const diff = Math.abs(ttl - height) < 2 ? 0 : ttl - height; + date.setMinutes(date.getMinutes() + diff * 3); + return `${ttl} (${timeAgo(date)})`; +}; diff --git a/src/utils/print.js b/src/utils/print.js index b6f721f6..71e7a1d1 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -1,5 +1,9 @@ -import { Encoding, unpackTx } from '@aeternity/aepp-sdk'; -import { decode } from './helpers.js'; +import { + Encoding, unpackTx, AbiVersion, VmVersion, +} from '@aeternity/aepp-sdk'; +import { + decode, formatCoins, formatTtl as formatTtlUnbound, timeAgo, +} from './helpers.js'; const ROW_WIDTH = 40; @@ -49,66 +53,85 @@ function printTxField(tx, verboseName, field, handleValue = (a) => a) { printUnderscored(verboseName, tx[field] == null ? 'N/A' : handleValue(tx[field])); } -export function printTransaction(_tx, json) { +function printTransactionSync(_tx, json, currentHeight) { if (json) { print(_tx); return; } const tx = { ..._tx, ..._tx.tx }; + const formatTtl = (ttl) => (currentHeight ? formatTtlUnbound(ttl, currentHeight) : ttl); + const formatTtlObject = ({ type, value }) => { + switch (type) { + case 'delta': return formatTtl(+value + +tx.blockHeight); + case 'block': return formatTtl(value); + default: throw new Error(`Unknown ttl type: ${type}`); + } + }; + const formatTtlSeconds = (seconds) => { + const date = new Date(); + date.setSeconds(date.getSeconds() + seconds); + return `${seconds} (${timeAgo(date).replace('in ', '')})`; + }; - printUnderscored('Tx hash', tx.hash); + printUnderscored('Transaction hash', tx.hash); printUnderscored('Block hash', tx.blockHash); - printUnderscored('Block height', tx.blockHeight); + printTxField(tx, 'Block height', 'blockHeight', formatTtl); printUnderscored('Signatures', tx.signatures); - printUnderscored('Tx Type', tx.type); + printUnderscored('Transaction type', tx.type); - printTxField(tx, 'Account', 'accountId'); - printTxField(tx, 'Client TTL', 'clientTtl'); - printTxField(tx, 'Sender account', 'senderId'); - printTxField(tx, 'Recipient account', 'recipientId'); + printTxField(tx, 'Account address', 'accountId'); + printTxField(tx, 'Client TTL', 'clientTtl', formatTtlSeconds); + printTxField(tx, 'Sender address', 'senderId'); + printTxField(tx, 'Recipient address', 'recipientId'); printTxField(tx, 'Name ID', 'nameId'); - printTxField(tx, 'Name TTL', 'nameTtl'); + printTxField(tx, 'Name TTL', 'nameTtl', formatTtl); printTxField(tx, 'Name', 'name'); - printTxField(tx, 'Name Fee', 'nameFee'); - printTxField(tx, 'Name Salt', 'nameSalt'); - printTxField(tx, 'Owner', 'ownerId'); - printTxField(tx, 'Caller Account', 'callerId'); - printTxField(tx, 'Contract Address', 'contractId'); - printTxField(tx, 'Oracle ID', 'oracleId', (id) => id.replace(/^\w{2}_/, 'ok_')); + printTxField(tx, 'Name fee', 'nameFee', formatCoins); + printTxField(tx, 'Name salt', 'nameSalt'); + printTxField(tx, 'Owner address', 'ownerId'); + printTxField(tx, 'Caller address', 'callerId'); + printTxField(tx, 'Contract address', 'contractId'); + printTxField(tx, 'Oracle ID', 'oracleId'); printTxField(tx, 'Query', 'query'); if ('pointers' in tx) { if (tx.pointers.length === 0) printUnderscored('Pointers', 'N/A'); else tx.pointers.forEach(({ key, id }) => printUnderscored(`Pointer ${key}`, id)); } - printTxField(tx, 'Amount', 'amount'); + printTxField(tx, 'Amount', 'amount', formatCoins); printTxField(tx, 'Payload', 'payload'); - printTxField(tx, 'Deposit', 'deposit'); + printTxField(tx, 'Deposit', 'deposit', formatCoins); printTxField(tx, 'Gas', 'gas'); - printTxField(tx, 'Gas Price', 'gasPrice'); + printTxField(tx, 'Gas price', 'gasPrice', formatCoins); printTxField(tx, 'Bytecode', 'code'); printTxField(tx, 'Call data', 'callData'); printTxField(tx, 'Commitment', 'commitmentId'); printTxField(tx, 'Salt', 'salt'); printTxField(tx, 'Query', 'queryId'); - printTxField(tx, 'Fee', 'fee'); + printTxField(tx, 'Fee', 'fee', formatCoins); printTxField(tx, 'Response', 'response'); - printTxField(tx, 'Query Fee', 'queryFee'); - printTxField(tx, 'Oracle Ttl', 'oracleTtl'); - printTxField(tx, 'Query Ttl', 'queryTtl'); - printTxField(tx, 'Response Ttl', 'responseTtl'); - printTxField(tx, 'Query Format', 'queryFormat'); - printTxField(tx, 'Response Format', 'responseFormat'); + printTxField(tx, 'Query fee', 'queryFee', formatCoins); + printTxField(tx, 'Oracle TTL', 'oracleTtl', formatTtlObject); + printTxField(tx, 'Query TTL', 'queryTtl', formatTtlObject); + printTxField(tx, 'Response TTL', 'responseTtl', formatTtlObject); + printTxField(tx, 'Query format', 'queryFormat'); + printTxField(tx, 'Response format', 'responseFormat'); printTxField(tx, 'Nonce', 'nonce'); - printTxField(tx, 'TTL', 'ttl'); + printTxField(tx, 'TTL', 'ttl', formatTtl); printTxField(tx, 'Version', 'version'); - printTxField(tx, 'VM Version', 'vmVersion'); - printTxField(tx, 'ABI Version', 'abiVersion'); + printTxField(tx, 'VM version', 'vmVersion', (v) => `${v} (${VmVersion[v]})`); + printTxField(tx, 'ABI version', 'abiVersion', (v) => `${v} (${AbiVersion[v]})`); +} + +export async function printTransaction(tx, json, sdk) { + const height = await sdk.getHeight({ cache: true }); + printTransactionSync(tx, json, height); } export function printBlockTransactions(ts) { ts.forEach((tx) => { print('<<--------------- Transaction --------------->>'); - printTransaction(tx, false); + // TODO: consider using async version + printTransactionSync(tx, false); }); } diff --git a/test/index.js b/test/index.js index 243505a2..117cffb0 100644 --- a/test/index.js +++ b/test/index.js @@ -1,4 +1,4 @@ -import chai from 'chai'; +import chai, { expect } from 'chai'; import chaiAsPromised from 'chai-as-promised'; import { before, after } from 'mocha'; import mockFs from 'mock-fs'; @@ -136,3 +136,21 @@ export function randomName(length = 18) { .map(() => chars[Math.floor(Math.random() * chars.length)]).join(''); return `${random}.chain`; } + +export function expectToMatchLines(value, testLines) { + try { + const valueLines = value.split('\n'); + testLines.forEach((test) => { + if (typeof test === 'string') return expect(valueLines.shift()).to.be.equal(test); + if (test instanceof RegExp) return expect(valueLines.shift()).to.be.match(test); + throw new Error(`Unexpected test line: ${test}`); + }); + expect(valueLines.join('\n')).to.be.equal(''); + } catch (error) { + const stackItems = error.stack.split('\n'); + stackItems.splice(1, 3); + error.stack = stackItems.join('\n'); + error.message += `\nWhole value:\n${value}`; + throw error; + } +} diff --git a/test/inspect.js b/test/inspect.js index c08abb28..fb5821c5 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { AbiVersion, generateKeyPair, produceNameId, Tag, VmVersion, } from '@aeternity/aepp-sdk'; -import { executeProgram, getSdk } from './index.js'; +import { executeProgram, expectToMatchLines, getSdk } from './index.js'; import inspectProgram from '../src/commands/inspect.js'; import chainProgram from '../src/commands/chain.js'; @@ -60,21 +60,21 @@ Pending transactions: }, }); const res = await executeInspect([hash]); - expect(res).to.equal(` -Tx hash _________________________________ ${resJson.hash} -Block hash ______________________________ ${resJson.blockHash} -Block height ____________________________ ${resJson.blockHeight} -Signatures ______________________________ ["${resJson.signatures[0]}"] -Tx Type _________________________________ SpendTx -Sender account __________________________ ${sdk.address} -Recipient account _______________________ ${recipient} -Amount __________________________________ 420 -Payload _________________________________ ba_Xfbg4g== -Fee _____________________________________ ${resJson.tx.fee} -Nonce ___________________________________ ${resJson.tx.nonce} -TTL _____________________________________ ${resJson.tx.ttl} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(res, [ + `Transaction hash ________________________ ${resJson.hash}`, + `Block hash ______________________________ ${resJson.blockHash}`, + `Block height ____________________________ ${resJson.blockHeight} (about now)`, + `Signatures ______________________________ ["${resJson.signatures[0]}"]`, + 'Transaction type ________________________ SpendTx', + `Sender address __________________________ ${sdk.address}`, + `Recipient address _______________________ ${recipient}`, + 'Amount __________________________________ 0.00000000000000042ae', + 'Payload _________________________________ ba_Xfbg4g==', + /Fee _____________________________________ 0.000016\d+ae/, + `Nonce ___________________________________ ${resJson.tx.nonce}`, + /TTL _____________________________________ \d+ \(in [56] minutes\)/, + 'Version _________________________________ 1', + ]); }); it('Inspect Transaction', async () => { @@ -269,15 +269,15 @@ Name hash _______________________________ ${produceNameId(name)} ttl: resJson.ttl, }); const res = await executeInspect([name]); - expect(res).to.equal(` -Status __________________________________ CLAIMED -Name hash _______________________________ ${resJson.id} -Owner ___________________________________ ${sdk.address} -Pointer myKey ___________________________ ${sdk.address} -Pointer account_pubkey __________________ ${sdk.address} -Pointer oracle_pubkey ___________________ ${sdk.address} -TTL _____________________________________ ${resJson.ttl} (in 1 year) - `.trim()); + expectToMatchLines(res, [ + 'Status __________________________________ CLAIMED', + `Name hash _______________________________ ${resJson.id}`, + `Owner ___________________________________ ${sdk.address}`, + `Pointer myKey ___________________________ ${sdk.address}`, + `Pointer account_pubkey __________________ ${sdk.address}`, + `Pointer oracle_pubkey ___________________ ${sdk.address}`, + /TTL _____________________________________ \d+ \(in 1 year\)/, + ]); }).timeout(6000); it('Inspect Running Auction Name', async () => { diff --git a/test/spend.js b/test/spend.js index 127703e7..043aeb17 100644 --- a/test/spend.js +++ b/test/spend.js @@ -1,7 +1,9 @@ import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { generateKeyPair } from '@aeternity/aepp-sdk'; -import { getSdk, executeProgram, WALLET_NAME } from './index.js'; +import { + getSdk, executeProgram, WALLET_NAME, expectToMatchLines, +} from './index.js'; import spendProgram from '../src/commands/spend.js'; const executeSpend = (args) => ( @@ -44,23 +46,22 @@ describe('Spend', () => { }); const res = await executeSpend([publicKey, amount]); - const lineEndings = res.split('\n').map((l) => l.split(' ').at(-1)); - expect(res).to.be.equal(` -Transaction mined -Tx hash _________________________________ ${lineEndings[1]} -Block hash ______________________________ ${lineEndings[2]} -Block height ____________________________ ${lineEndings[3]} -Signatures ______________________________ ${lineEndings[4]} -Tx Type _________________________________ SpendTx -Sender account __________________________ ${resJson.tx.senderId} -Recipient account _______________________ ${resJson.tx.recipientId} -Amount __________________________________ 100 -Payload _________________________________ ba_Xfbg4g== -Fee _____________________________________ ${resJson.tx.fee} -Nonce ___________________________________ 2 -TTL _____________________________________ ${lineEndings[12]} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(res, [ + 'Transaction mined', + /Transaction hash ________________________ th_\w+/, + /Block hash ______________________________ \w+/, + /Block height ____________________________ \d+/, + /Signatures ______________________________ .+/, + 'Transaction type ________________________ SpendTx', + `Sender address __________________________ ${resJson.tx.senderId}`, + `Recipient address _______________________ ${resJson.tx.recipientId}`, + 'Amount __________________________________ 0.0000000000000001ae', + 'Payload _________________________________ ba_Xfbg4g==', + /Fee _____________________________________ 0.000016\d+ae/, + 'Nonce ___________________________________ 2', + /TTL _____________________________________ \d+/, + 'Version _________________________________ 1', + ]); }); it('spends in ae', async () => { diff --git a/test/tx.js b/test/tx.js index 368c4641..d900ad96 100644 --- a/test/tx.js +++ b/test/tx.js @@ -4,7 +4,7 @@ import { import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { - executeProgram, randomName, getSdk, networkId, + executeProgram, randomName, getSdk, networkId, expectToMatchLines, } from './index.js'; import txProgram from '../src/commands/tx.js'; import accountProgram from '../src/commands/account.js'; @@ -91,12 +91,12 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su }); const response = await executeProgram(accountProgram, args); - expect(response).to.equal(` -Signing account address _________________ ${TX_KEYS.publicKey} -Network ID ______________________________ ae_dev -Unsigned ________________________________ ${tx} -Signed __________________________________ ${responseJson.signedTx} - `.trim()); + expectToMatchLines(response, [ + `Signing account address _________________ ${TX_KEYS.publicKey}`, + 'Network ID ______________________________ ae_dev', + `Unsigned ________________________________ ${tx}`, + `Signed __________________________________ ${responseJson.signedTx}`, + ]); }); async function signAndPostAndInspect(txEncoded) { @@ -120,15 +120,15 @@ Signed __________________________________ ${responseJson.signedTx} expect(hash).to.satisfy((s) => s.startsWith(Encoding.TxHash)); expect(signatures[0]).to.satisfy((s) => s.startsWith(Encoding.Signature)); - const [commonDetails, specificDetails] = details.split('\nTx Type'); - expect(commonDetails).to.equal(` -Tx hash _________________________________ ${hash} -Block hash ______________________________ ${blockHash} -Block height ____________________________ ${blockHeight} -Signatures ______________________________ ["${signatures}"] - `.trim()); + const [commonDetails, specificDetails] = details.split('\nTransaction type'); + expectToMatchLines(commonDetails, [ + `Transaction hash ________________________ ${hash}`, + `Block hash ______________________________ ${blockHash}`, + `Block height ____________________________ ${blockHeight} (about now)`, + `Signatures ______________________________ ["${signatures}"]`, + ]); - return [tx, `Tx Type${specificDetails}`]; + return [tx, `Transaction type${specificDetails}`]; } it('builds spend tx and sends', async () => { @@ -148,16 +148,16 @@ Signatures ______________________________ ["${signatures}"] type: 'SpendTx', version: 1, }); - expect(details).to.equal(` -Tx Type _________________________________ SpendTx -Sender account __________________________ ${TX_KEYS.publicKey} -Recipient account _______________________ ${TX_KEYS.publicKey} -Amount __________________________________ 100 -Payload _________________________________ ba_Xfbg4g== -Fee _____________________________________ ${detailsJson.fee} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ SpendTx', + `Sender address __________________________ ${TX_KEYS.publicKey}`, + `Recipient address _______________________ ${TX_KEYS.publicKey}`, + 'Amount __________________________________ 0.0000000000000001ae', + 'Payload _________________________________ ba_Xfbg4g==', + /Fee _____________________________________ 0.000016\d+ae/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + ]); }); it('builds name preclaim tx and sends', async () => { @@ -176,14 +176,14 @@ Version _________________________________ 1 type: 'NamePreclaimTx', version: 1, }); - expect(details).to.equal(` -Tx Type _________________________________ NamePreclaimTx -Account _________________________________ ${TX_KEYS.publicKey} -Commitment ______________________________ ${detailsJson.commitmentId} -Fee _____________________________________ ${detailsJson.fee} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ NamePreclaimTx', + `Account address _________________________ ${TX_KEYS.publicKey}`, + `Commitment ______________________________ ${detailsJson.commitmentId}`, + /Fee _____________________________________ 0.000016\d+ae/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + ]); }); it('builds name claim tx and sends', async () => { @@ -203,16 +203,16 @@ Version _________________________________ 1 type: 'NameClaimTx', version: 2, }); - expect(details).to.equal(` -Tx Type _________________________________ NameClaimTx -Account _________________________________ ${TX_KEYS.publicKey} -Name ____________________________________ ${name} -Name Fee ________________________________ 159700000000000000 -Name Salt _______________________________ ${salt} -Fee _____________________________________ ${detailsJson.fee} -Nonce ___________________________________ ${nonce} -Version _________________________________ 2 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ NameClaimTx', + `Account address _________________________ ${TX_KEYS.publicKey}`, + `Name ____________________________________ ${name}`, + 'Name fee ________________________________ 0.1597ae', + `Name salt _______________________________ ${salt}`, + /Fee _____________________________________ 0.000016\d+ae/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 2', + ]); nameId = (await sdk.aensQuery(name)).id; }).timeout(10000); @@ -234,17 +234,17 @@ Version _________________________________ 2 version: 1, accountId: TX_KEYS.publicKey, }); - expect(details).to.equal(` -Tx Type _________________________________ NameUpdateTx -Account _________________________________ ${TX_KEYS.publicKey} -Client TTL ______________________________ 3600 -Name ID _________________________________ ${nameId} -Name TTL ________________________________ 180000 -Pointer account_pubkey __________________ ${TX_KEYS.publicKey} -Fee _____________________________________ ${detailsJson.fee} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ NameUpdateTx', + `Account address _________________________ ${TX_KEYS.publicKey}`, + 'Client TTL ______________________________ 3600 (1 hour)', + `Name ID _________________________________ ${nameId}`, + 'Name TTL ________________________________ 180000 (in 1 year)', + `Pointer account_pubkey __________________ ${TX_KEYS.publicKey}`, + /Fee _____________________________________ 0.000017\d+ae/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + ]); }); it('builds name transfer tx and sends', async () => { @@ -262,15 +262,15 @@ Version _________________________________ 1 version: 1, accountId: TX_KEYS.publicKey, }); - expect(details).to.equal(` -Tx Type _________________________________ NameTransferTx -Account _________________________________ ${TX_KEYS.publicKey} -Recipient account _______________________ ${TX_KEYS.publicKey} -Name ID _________________________________ ${nameId} -Fee _____________________________________ ${detailsJson.fee} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ NameTransferTx', + `Account address _________________________ ${TX_KEYS.publicKey}`, + `Recipient address _______________________ ${TX_KEYS.publicKey}`, + `Name ID _________________________________ ${nameId}`, + /Fee _____________________________________ 0.000017\d+ae/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + ]); }); it('builds name revoke tx and sends', async () => { @@ -287,14 +287,14 @@ Version _________________________________ 1 version: 1, accountId: TX_KEYS.publicKey, }); - expect(details).to.equal(` -Tx Type _________________________________ NameRevokeTx -Account _________________________________ ${TX_KEYS.publicKey} -Name ID _________________________________ ${nameId} -Fee _____________________________________ ${detailsJson.fee} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ NameRevokeTx', + `Account address _________________________ ${TX_KEYS.publicKey}`, + `Name ID _________________________________ ${nameId}`, + /Fee _____________________________________ 0.000016\d+ae/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + ]); }); let contract; @@ -331,21 +331,21 @@ Version _________________________________ 1 version: 1, ownerId: TX_KEYS.publicKey, }); - expect(details).to.equal(` -Tx Type _________________________________ ContractCreateTx -Owner ___________________________________ ${TX_KEYS.publicKey} -Amount __________________________________ 0 -Deposit _________________________________ 0 -Gas _____________________________________ 5921420 -Gas Price _______________________________ 1000000000 -Bytecode ________________________________ ${bytecode} -Call data _______________________________ ${callData} -Fee _____________________________________ ${detailsJson.fee} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 -VM Version ______________________________ 7 -ABI Version _____________________________ 3 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ ContractCreateTx', + `Owner address ___________________________ ${TX_KEYS.publicKey}`, + 'Amount __________________________________ 0ae', + 'Deposit _________________________________ 0ae', + 'Gas _____________________________________ 5921420', + 'Gas price _______________________________ 0.000000001ae', + `Bytecode ________________________________ ${bytecode}`, + `Call data _______________________________ ${callData}`, + /Fee _____________________________________ 0.000078\d+ae/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + 'VM version ______________________________ 7 (Fate2)', + 'ABI version _____________________________ 3 (Fate)', + ]); }).timeout(8000); it('builds contract call tx and sends', async () => { @@ -369,19 +369,19 @@ ABI Version _____________________________ 3 type: 'ContractCallTx', version: 1, }); - expect(details).to.equal(` -Tx Type _________________________________ ContractCallTx -Caller Account __________________________ ${TX_KEYS.publicKey} -Contract Address ________________________ ${contractId} -Amount __________________________________ 420000000000 -Gas _____________________________________ 5817860 -Gas Price _______________________________ 1000000000 -Call data _______________________________ ${callData} -Fee _____________________________________ ${detailsJson.fee} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 -ABI Version _____________________________ 3 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ ContractCallTx', + `Caller address __________________________ ${TX_KEYS.publicKey}`, + `Contract address ________________________ ${contractId}`, + 'Amount __________________________________ 0.00000042ae', + 'Gas _____________________________________ 5817860', + 'Gas price _______________________________ 0.000000001ae', + `Call data _______________________________ ${callData}`, + /Fee _____________________________________ 0.000182\d+ae/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + 'ABI version _____________________________ 3 (Fate)', + ]); }).timeout(4000); it('builds oracle register tx and sends', async () => { @@ -402,18 +402,18 @@ ABI Version _____________________________ 3 type: 'OracleRegisterTx', version: 1, }); - expect(details).to.equal(` -Tx Type _________________________________ OracleRegisterTx -Account _________________________________ ${TX_KEYS.publicKey} -Fee _____________________________________ ${detailsJson.fee} -Query Fee _______________________________ 0 -Oracle Ttl ______________________________ {"type":"delta","value":"500"} -Query Format ____________________________ {city: "str"} -Response Format _________________________ {tmp:""num} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 -ABI Version _____________________________ 0 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ OracleRegisterTx', + `Account address _________________________ ${TX_KEYS.publicKey}`, + /Fee _____________________________________ 0.000016\d+ae/, + 'Query fee _______________________________ 0ae', + /Oracle TTL ______________________________ \d+ \(in 1 day\)/, + 'Query format ____________________________ {city: "str"}', + 'Response format _________________________ {tmp:""num}', + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + 'ABI version _____________________________ 0 (NoAbi)', + ]); }); it('builds oracle extend tx and sends', async () => { @@ -431,14 +431,14 @@ ABI Version _____________________________ 0 type: 'OracleExtendTx', version: 1, }); - expect(details).to.equal(` -Tx Type _________________________________ OracleExtendTx -Oracle ID _______________________________ ${oracleId} -Fee _____________________________________ ${detailsJson.fee} -Oracle Ttl ______________________________ {"type":"delta","value":"100"} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ OracleExtendTx', + `Oracle ID _______________________________ ${oracleId}`, + /Fee _____________________________________ 0.000015\d+ae/, + /Oracle TTL ______________________________ \d+ \(in 4 hours\)/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + ]); const oracleTtl = await sdk.api.getOracleByPubkey(oracleId); const isExtended = +oracleTtl.ttl === +oracleCurrentTtl.ttl + 100; @@ -463,18 +463,18 @@ Version _________________________________ 1 type: 'OracleQueryTx', version: 1, }); - expect(details).to.equal(` -Tx Type _________________________________ OracleQueryTx -Sender account __________________________ ${TX_KEYS.publicKey} -Oracle ID _______________________________ ${oracleId} -Query ___________________________________ {city: "Berlin"} -Fee _____________________________________ ${detailsJson.fee} -Query Fee _______________________________ 0 -Query Ttl _______________________________ {"type":"delta","value":"10"} -Response Ttl ____________________________ {"type":"delta","value":"10"} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ OracleQueryTx', + `Sender address __________________________ ${TX_KEYS.publicKey}`, + `Oracle ID _______________________________ ${oracleId}`, + 'Query ___________________________________ {city: "Berlin"}', + /Fee _____________________________________ 0.000017\d+ae/, + 'Query fee _______________________________ 0ae', + /Query TTL _______________________________ \d+ \(in 27 minutes\)/, + /Response TTL ____________________________ \d+ \(in 27 minutes\)/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + ]); const { oracleQueries: queries } = await sdk.api.getOracleQueriesByPubkey(oracleId); queryId = queries[0].id; @@ -499,16 +499,16 @@ Version _________________________________ 1 type: 'OracleRespondTx', version: 1, }); - expect(details).to.equal(` -Tx Type _________________________________ OracleRespondTx -Oracle ID _______________________________ ${oracleId} -Query ___________________________________ ${queryId} -Fee _____________________________________ ${detailsJson.fee} -Response ________________________________ {tmp: 10} -Response Ttl ____________________________ {"type":"delta","value":"10"} -Nonce ___________________________________ ${nonce} -Version _________________________________ 1 - `.trim()); + expectToMatchLines(details, [ + 'Transaction type ________________________ OracleRespondTx', + `Oracle ID _______________________________ ${oracleId}`, + `Query ___________________________________ ${queryId}`, + /Fee _____________________________________ 0.000016\d+ae/, + 'Response ________________________________ {tmp: 10}', + /Response TTL ____________________________ \d+ \(in 27 minutes\)/, + `Nonce ___________________________________ ${nonce}`, + 'Version _________________________________ 1', + ]); const { oracleQueries: queries } = await sdk.api.getOracleQueriesByPubkey(oracleId); const responseQuery = decode(queries[0].response).toString(); From 47e0306cb0bbccfdc7ee51da017e1293c4dd70d6 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 12 Apr 2024 00:54:53 +1000 Subject: [PATCH 60/88] fix: don't print contract deposit because it can't be used --- src/utils/print.js | 1 - test/tx.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/utils/print.js b/src/utils/print.js index 71e7a1d1..98f6ad6f 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -99,7 +99,6 @@ function printTransactionSync(_tx, json, currentHeight) { } printTxField(tx, 'Amount', 'amount', formatCoins); printTxField(tx, 'Payload', 'payload'); - printTxField(tx, 'Deposit', 'deposit', formatCoins); printTxField(tx, 'Gas', 'gas'); printTxField(tx, 'Gas price', 'gasPrice', formatCoins); printTxField(tx, 'Bytecode', 'code'); diff --git a/test/tx.js b/test/tx.js index d900ad96..70a28d4a 100644 --- a/test/tx.js +++ b/test/tx.js @@ -335,7 +335,6 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su 'Transaction type ________________________ ContractCreateTx', `Owner address ___________________________ ${TX_KEYS.publicKey}`, 'Amount __________________________________ 0ae', - 'Deposit _________________________________ 0ae', 'Gas _____________________________________ 5921420', 'Gas price _______________________________ 0.000000001ae', `Bytecode ________________________________ ${bytecode}`, From 91978c57d738a20ee161c2f42ab862d1df2a4337 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 12 Apr 2024 00:58:49 +1000 Subject: [PATCH 61/88] refactor: group tx fields by entity type while printing --- src/utils/print.js | 45 ++++++++++++++++++++++++++------------------- test/tx.js | 30 +++++++++++++++--------------- 2 files changed, 41 insertions(+), 34 deletions(-) diff --git a/src/utils/print.js b/src/utils/print.js index 98f6ad6f..59b078a6 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -73,52 +73,59 @@ function printTransactionSync(_tx, json, currentHeight) { return `${seconds} (${timeAgo(date).replace('in ', '')})`; }; + // meta printUnderscored('Transaction hash', tx.hash); printUnderscored('Block hash', tx.blockHash); printTxField(tx, 'Block height', 'blockHeight', formatTtl); printUnderscored('Signatures', tx.signatures); printUnderscored('Transaction type', tx.type); - + // sender printTxField(tx, 'Account address', 'accountId'); - printTxField(tx, 'Client TTL', 'clientTtl', formatTtlSeconds); printTxField(tx, 'Sender address', 'senderId'); printTxField(tx, 'Recipient address', 'recipientId'); + printTxField(tx, 'Owner address', 'ownerId'); + printTxField(tx, 'Caller address', 'callerId'); + // name printTxField(tx, 'Name ID', 'nameId'); printTxField(tx, 'Name TTL', 'nameTtl', formatTtl); printTxField(tx, 'Name', 'name'); printTxField(tx, 'Name fee', 'nameFee', formatCoins); printTxField(tx, 'Name salt', 'nameSalt'); - printTxField(tx, 'Owner address', 'ownerId'); - printTxField(tx, 'Caller address', 'callerId'); - printTxField(tx, 'Contract address', 'contractId'); - printTxField(tx, 'Oracle ID', 'oracleId'); - printTxField(tx, 'Query', 'query'); if ('pointers' in tx) { if (tx.pointers.length === 0) printUnderscored('Pointers', 'N/A'); else tx.pointers.forEach(({ key, id }) => printUnderscored(`Pointer ${key}`, id)); } - printTxField(tx, 'Amount', 'amount', formatCoins); - printTxField(tx, 'Payload', 'payload'); - printTxField(tx, 'Gas', 'gas'); + printTxField(tx, 'Client TTL', 'clientTtl', formatTtlSeconds); + printTxField(tx, 'Commitment', 'commitmentId'); + // contract + printTxField(tx, 'Contract address', 'contractId'); + printTxField(tx, 'Gas', 'gas', (gas) => `${gas} (${formatCoins(tx.gasPrice * BigInt(gas))})`); printTxField(tx, 'Gas price', 'gasPrice', formatCoins); printTxField(tx, 'Bytecode', 'code'); printTxField(tx, 'Call data', 'callData'); - printTxField(tx, 'Commitment', 'commitmentId'); - printTxField(tx, 'Salt', 'salt'); - printTxField(tx, 'Query', 'queryId'); - printTxField(tx, 'Fee', 'fee', formatCoins); - printTxField(tx, 'Response', 'response'); - printTxField(tx, 'Query fee', 'queryFee', formatCoins); + // oracle + printTxField(tx, 'Oracle ID', 'oracleId'); printTxField(tx, 'Oracle TTL', 'oracleTtl', formatTtlObject); + printTxField(tx, 'VM version', 'vmVersion', (v) => `${v} (${VmVersion[v]})`); + printTxField(tx, 'ABI version', 'abiVersion', (v) => `${v} (${AbiVersion[v]})`); + // spend + printTxField(tx, 'Amount', 'amount', formatCoins); + printTxField(tx, 'Payload', 'payload'); + // oracle query + printTxField(tx, 'Query', 'query'); + printTxField(tx, 'Query ID', 'queryId'); + printTxField(tx, 'Query fee', 'queryFee', formatCoins); printTxField(tx, 'Query TTL', 'queryTtl', formatTtlObject); - printTxField(tx, 'Response TTL', 'responseTtl', formatTtlObject); printTxField(tx, 'Query format', 'queryFormat'); + // oracle response + printTxField(tx, 'Response', 'response'); + printTxField(tx, 'Response TTL', 'responseTtl', formatTtlObject); printTxField(tx, 'Response format', 'responseFormat'); + // common fields + printTxField(tx, 'Fee', 'fee', formatCoins); printTxField(tx, 'Nonce', 'nonce'); printTxField(tx, 'TTL', 'ttl', formatTtl); printTxField(tx, 'Version', 'version'); - printTxField(tx, 'VM version', 'vmVersion', (v) => `${v} (${VmVersion[v]})`); - printTxField(tx, 'ABI version', 'abiVersion', (v) => `${v} (${AbiVersion[v]})`); } export async function printTransaction(tx, json, sdk) { diff --git a/test/tx.js b/test/tx.js index 70a28d4a..d556ee73 100644 --- a/test/tx.js +++ b/test/tx.js @@ -237,10 +237,10 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su expectToMatchLines(details, [ 'Transaction type ________________________ NameUpdateTx', `Account address _________________________ ${TX_KEYS.publicKey}`, - 'Client TTL ______________________________ 3600 (1 hour)', `Name ID _________________________________ ${nameId}`, 'Name TTL ________________________________ 180000 (in 1 year)', `Pointer account_pubkey __________________ ${TX_KEYS.publicKey}`, + 'Client TTL ______________________________ 3600 (1 hour)', /Fee _____________________________________ 0.000017\d+ae/, `Nonce ___________________________________ ${nonce}`, 'Version _________________________________ 1', @@ -334,16 +334,16 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su expectToMatchLines(details, [ 'Transaction type ________________________ ContractCreateTx', `Owner address ___________________________ ${TX_KEYS.publicKey}`, - 'Amount __________________________________ 0ae', - 'Gas _____________________________________ 5921420', + 'Gas _____________________________________ 5921420 (0.00592142ae)', 'Gas price _______________________________ 0.000000001ae', `Bytecode ________________________________ ${bytecode}`, `Call data _______________________________ ${callData}`, + 'VM version ______________________________ 7 (Fate2)', + 'ABI version _____________________________ 3 (Fate)', + 'Amount __________________________________ 0ae', /Fee _____________________________________ 0.000078\d+ae/, `Nonce ___________________________________ ${nonce}`, 'Version _________________________________ 1', - 'VM version ______________________________ 7 (Fate2)', - 'ABI version _____________________________ 3 (Fate)', ]); }).timeout(8000); @@ -372,14 +372,14 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su 'Transaction type ________________________ ContractCallTx', `Caller address __________________________ ${TX_KEYS.publicKey}`, `Contract address ________________________ ${contractId}`, - 'Amount __________________________________ 0.00000042ae', - 'Gas _____________________________________ 5817860', + 'Gas _____________________________________ 5817860 (0.00581786ae)', 'Gas price _______________________________ 0.000000001ae', `Call data _______________________________ ${callData}`, + 'ABI version _____________________________ 3 (Fate)', + 'Amount __________________________________ 0.00000042ae', /Fee _____________________________________ 0.000182\d+ae/, `Nonce ___________________________________ ${nonce}`, 'Version _________________________________ 1', - 'ABI version _____________________________ 3 (Fate)', ]); }).timeout(4000); @@ -404,14 +404,14 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su expectToMatchLines(details, [ 'Transaction type ________________________ OracleRegisterTx', `Account address _________________________ ${TX_KEYS.publicKey}`, - /Fee _____________________________________ 0.000016\d+ae/, - 'Query fee _______________________________ 0ae', /Oracle TTL ______________________________ \d+ \(in 1 day\)/, + 'ABI version _____________________________ 0 (NoAbi)', + 'Query fee _______________________________ 0ae', 'Query format ____________________________ {city: "str"}', 'Response format _________________________ {tmp:""num}', + /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, 'Version _________________________________ 1', - 'ABI version _____________________________ 0 (NoAbi)', ]); }); @@ -433,8 +433,8 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su expectToMatchLines(details, [ 'Transaction type ________________________ OracleExtendTx', `Oracle ID _______________________________ ${oracleId}`, - /Fee _____________________________________ 0.000015\d+ae/, /Oracle TTL ______________________________ \d+ \(in 4 hours\)/, + /Fee _____________________________________ 0.000015\d+ae/, `Nonce ___________________________________ ${nonce}`, 'Version _________________________________ 1', ]); @@ -467,10 +467,10 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su `Sender address __________________________ ${TX_KEYS.publicKey}`, `Oracle ID _______________________________ ${oracleId}`, 'Query ___________________________________ {city: "Berlin"}', - /Fee _____________________________________ 0.000017\d+ae/, 'Query fee _______________________________ 0ae', /Query TTL _______________________________ \d+ \(in 27 minutes\)/, /Response TTL ____________________________ \d+ \(in 27 minutes\)/, + /Fee _____________________________________ 0.000017\d+ae/, `Nonce ___________________________________ ${nonce}`, 'Version _________________________________ 1', ]); @@ -501,10 +501,10 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su expectToMatchLines(details, [ 'Transaction type ________________________ OracleRespondTx', `Oracle ID _______________________________ ${oracleId}`, - `Query ___________________________________ ${queryId}`, - /Fee _____________________________________ 0.000016\d+ae/, + `Query ID ________________________________ ${queryId}`, 'Response ________________________________ {tmp: 10}', /Response TTL ____________________________ \d+ \(in 27 minutes\)/, + /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, 'Version _________________________________ 1', ]); From 5fe7dc48ac29f30a29670f8770fbc465e97f7b96 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 12 Apr 2024 14:46:19 +1000 Subject: [PATCH 62/88] refactor!: remove --no-waitMined option BREAKING CHANGE: Commands don't accept `--no-waitMined` anymore In the most cases transactions gets mined immediately. In case of NameClaim, tx needs to be submitted in the next keyblock after preclaim. In that case it would be mined also immediately, with no early name revealing. If still needed, use `aecli chain broadcast tx_... --no-waitMined` instead. --- src/actions/aens.js | 80 +++++++++++----------------------------- src/actions/oracle.js | 36 ++++-------------- src/commands/chain.js | 4 +- src/commands/contract.js | 2 - src/commands/name.js | 9 ----- src/commands/oracle.js | 14 ------- 6 files changed, 32 insertions(+), 113 deletions(-) diff --git a/src/actions/aens.js b/src/actions/aens.js index 6c1f221b..3b1ba3f6 100644 --- a/src/actions/aens.js +++ b/src/actions/aens.js @@ -4,7 +4,7 @@ import { isAddressValid, getDefaultPointerKey } from '@aeternity/aepp-sdk'; import { initSdkByWalletFile } from '../utils/cli.js'; -import { print, printTransaction } from '../utils/print.js'; +import { printTransaction } from '../utils/print.js'; import { getNameEntry, validateName } from '../utils/helpers.js'; import CliError from '../utils/CliError.js'; @@ -18,7 +18,7 @@ async function ensureNameStatus(name, sdk, status, operation) { // ## Claim `name` function export async function preClaim(walletPath, name, options) { const { - ttl, fee, nonce, waitMined, json, + ttl, fee, nonce, json, } = options; // Validate `name`(check if `name` end on `.chain`) @@ -29,20 +29,14 @@ export async function preClaim(walletPath, name, options) { // Check if that `name' available await ensureNameStatus(name, sdk, 'AVAILABLE', 'preclaimed'); // Create `pre-claim` transaction - const preClaimTx = await sdk.aensPreclaim(name, { - ttl, fee, nonce, waitMined, - }); - if (waitMined) { - await printTransaction(preClaimTx, json, sdk); - } else { - print(`Transaction send to the chain. Tx hash: ${preClaimTx.hash}`); - } + const preClaimTx = await sdk.aensPreclaim(name, { ttl, fee, nonce }); + await printTransaction(preClaimTx, json, sdk); } // ## Claim `name` function export async function claim(walletPath, name, salt, options) { const { - ttl, fee, nonce, waitMined, json, nameFee, + ttl, fee, nonce, json, nameFee, } = options; // Validate `name` // validateName(name) @@ -54,19 +48,15 @@ export async function claim(walletPath, name, salt, options) { // Wait for next block and create `claimName` transaction const claimTx = await sdk.aensClaim(name, salt, { - nonce, ttl, fee, waitMined, nameFee, + nonce, ttl, fee, nameFee, }); - if (waitMined) { - await printTransaction(claimTx, json, sdk); - } else { - print(`Transaction send to the chain. Tx hash: ${claimTx.hash}`); - } + await printTransaction(claimTx, json, sdk); } // ##Update `name` function export async function updateName(walletPath, name, addresses, options) { const { - ttl, fee, nonce, waitMined, json, nameTtl, clientTtl, extendPointers = false, + ttl, fee, nonce, json, nameTtl, clientTtl, extendPointers = false, } = options; // Validate `address` @@ -84,20 +74,16 @@ export async function updateName(walletPath, name, addresses, options) { name, Object.fromEntries(addresses.map((address) => [getDefaultPointerKey(address), address])), { - ttl, fee, nonce, waitMined, nameTtl, clientTtl, extendPointers, + ttl, fee, nonce, nameTtl, clientTtl, extendPointers, }, ); - if (waitMined) { - await printTransaction(updateTx, json, sdk); - } else { - print(`Transaction send to the chain. Tx hash: ${updateTx.hash}`); - } + await printTransaction(updateTx, json, sdk); } // ##Extend `name` ttl function export async function extendName(walletPath, name, nameTtl, options) { const { - ttl, fee, nonce, waitMined, json, + ttl, fee, nonce, json, } = options; // Validate `name` @@ -109,19 +95,15 @@ export async function extendName(walletPath, name, nameTtl, options) { // Create `updateName` transaction const updateTx = await sdk.aensUpdate(name, {}, { - ttl, fee, nonce, waitMined, nameTtl, extendPointers: true, + ttl, fee, nonce, nameTtl, extendPointers: true, }); - if (waitMined) { - await printTransaction(updateTx, json, sdk); - } else { - print(`Transaction send to the chain. Tx hash: ${updateTx.hash}`); - } + await printTransaction(updateTx, json, sdk); } // ##Transfer `name` function export async function transferName(walletPath, name, address, options) { const { - ttl, fee, nonce, waitMined, json, + ttl, fee, nonce, json, } = options; // Validate `address` @@ -134,20 +116,14 @@ export async function transferName(walletPath, name, address, options) { await ensureNameStatus(name, sdk, 'CLAIMED', 'transferred'); // Create `transferName` transaction - const transferTX = await sdk.aensTransfer(name, address, { - ttl, fee, nonce, waitMined, - }); - if (waitMined) { - await printTransaction(transferTX, json, sdk); - } else { - print(`Transaction send to the chain. Tx hash: ${transferTX.hash}`); - } + const transferTX = await sdk.aensTransfer(name, address, { ttl, fee, nonce }); + await printTransaction(transferTX, json, sdk); } // ## Revoke `name` function export async function revokeName(walletPath, name, options) { const { - ttl, fee, nonce, waitMined, json, + ttl, fee, nonce, json, } = options; // Validate `name` @@ -158,19 +134,13 @@ export async function revokeName(walletPath, name, options) { await ensureNameStatus(name, sdk, 'CLAIMED', 'revoked'); // Create `revokeName` transaction - const revokeTx = await sdk.aensRevoke(name, { - ttl, fee, nonce, waitMined, - }); - if (waitMined) { - await printTransaction(revokeTx, json, sdk); - } else { - print(`Transaction send to the chain. Tx hash: ${revokeTx.hash}`); - } + const revokeTx = await sdk.aensRevoke(name, { ttl, fee, nonce }); + await printTransaction(revokeTx, json, sdk); } export async function nameBid(walletPath, name, nameFee, options) { const { - ttl, fee, nonce, waitMined, json, + ttl, fee, nonce, json, } = options; // Validate `name` validateName(name); @@ -181,14 +151,8 @@ export async function nameBid(walletPath, name, nameFee, options) { await ensureNameStatus(name, sdk, 'AUCTION', 'bidded'); // Wait for next block and create `claimName` transaction - const nameBidTx = await sdk.aensBid(name, nameFee, { - nonce, ttl, fee, waitMined, - }); - if (waitMined) { - await printTransaction(nameBidTx, json, sdk); - } else { - print(`Transaction send to the chain. Tx hash: ${nameBidTx.hash}`); - } + const nameBidTx = await sdk.aensBid(name, nameFee, { nonce, ttl, fee }); + await printTransaction(nameBidTx, json, sdk); } export async function fullClaim(walletPath, name, options) { diff --git a/src/actions/oracle.js b/src/actions/oracle.js index 8ea56881..8ccde2f9 100644 --- a/src/actions/oracle.js +++ b/src/actions/oracle.js @@ -17,7 +17,7 @@ function ensureTtlANumber(ttl, name) { // ## Create Oracle export async function createOracle(walletPath, queryFormat, responseFormat, options) { const { - ttl, fee, nonce, waitMined, json, oracleTtl, queryFee, + ttl, fee, nonce, json, oracleTtl, queryFee, } = options; ensureTtlANumber(oracleTtl, 'Oracle'); @@ -25,7 +25,6 @@ export async function createOracle(walletPath, queryFormat, responseFormat, opti // Register Oracle const oracle = await sdk.registerOracle(queryFormat, responseFormat, { ttl, - waitMined, nonce, fee, ...oracleTtl && { @@ -34,17 +33,13 @@ export async function createOracle(walletPath, queryFormat, responseFormat, opti }, queryFee, }); - if (waitMined) { - await printTransaction(oracle, json, sdk); - } else { - print('Transaction send to the chain. Tx hash: ', oracle); - } + await printTransaction(oracle, json, sdk); } // ## Extend Oracle export async function extendOracle(walletPath, oracleId, oracleTtl, options) { const { - ttl, fee, nonce, waitMined, json, + ttl, fee, nonce, json, } = options; ensureTtlANumber(oracleTtl, 'Oracle'); @@ -53,7 +48,6 @@ export async function extendOracle(walletPath, oracleId, oracleTtl, options) { const oracle = await sdk.getOracleObject(oracleId); const extended = await oracle.extendOracle({ ttl, - waitMined, nonce, fee, ...oracleTtl && { @@ -61,17 +55,13 @@ export async function extendOracle(walletPath, oracleId, oracleTtl, options) { oracleTtlValue: oracleTtl, }, }); - if (waitMined) { - await printTransaction(extended, json, sdk); - } else { - print('Transaction send to the chain. Tx hash: ', extended); - } + await printTransaction(extended, json, sdk); } // ## Create Oracle Query export async function createOracleQuery(walletPath, oracleId, query, options) { const { - ttl, fee, nonce, waitMined, json, queryTtl, queryFee, responseTtl, + ttl, fee, nonce, json, queryTtl, queryFee, responseTtl, } = options; decode(oracleId, 'ok'); @@ -82,7 +72,6 @@ export async function createOracleQuery(walletPath, oracleId, query, options) { const oracle = await sdk.getOracleObject(oracleId); const oracleQuery = await oracle.postQuery(query, { ttl, - waitMined, nonce, fee, ...queryTtl && { @@ -95,11 +84,7 @@ export async function createOracleQuery(walletPath, oracleId, query, options) { }, queryFee, }); - if (waitMined) { - await printTransaction(oracleQuery, json, sdk); - } else { - print('Transaction send to the chain. Tx hash: ', oracleQuery); - } + await printTransaction(oracleQuery, json, sdk); } // ## Respond to Oracle Query @@ -111,7 +96,7 @@ export async function respondToQuery( options, ) { const { - ttl, fee, nonce, waitMined, json, responseTtl, + ttl, fee, nonce, json, responseTtl, } = options; decode(oracleId, 'ok'); @@ -122,7 +107,6 @@ export async function respondToQuery( const oracle = await sdk.getOracleObject(oracleId); const queryResponse = await oracle.respondToQuery(queryId, response, { ttl, - waitMined, nonce, fee, ...responseTtl && { @@ -130,11 +114,7 @@ export async function respondToQuery( responseTtlValue: responseTtl, }, }); - if (waitMined) { - await printTransaction(queryResponse, json, sdk); - } else { - print('Transaction send to the chain. Tx hash: ', queryResponse); - } + await printTransaction(queryResponse, json, sdk); } // ## Get oracle diff --git a/src/commands/chain.js b/src/commands/chain.js index cfe9eb59..ba4b1bd2 100755 --- a/src/commands/chain.js +++ b/src/commands/chain.js @@ -73,8 +73,8 @@ addCommonOptions(program // Example: `aecli tx spend ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT 100` addCommonOptions(program .command('broadcast ') - .option('-W, --no-waitMined', 'Force waiting until transaction will be mined') - .option('--verify', 'Verify Transaction before broadcast.') + .option('-W, --no-waitMined', 'Don\'t wait until transaction gets mined') + .option('--verify', 'Verify Transaction before broadcasting.') .description('Send transaction to the chain') .action(Chain.broadcast)); diff --git a/src/commands/contract.js b/src/commands/contract.js index 36335e68..c8bf4327 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -104,7 +104,6 @@ addCommonOptions(program .option('--contractAddress [contractAddress]', 'Contract address to call') .addOption(contractSourceFilenameOption) .addOption(contractAciFilenameOption) - .option('-W, --no-waitMined', 'Force waiting until transaction will be mined') .addOption(passwordOption) .addOption(gasOption) .option('-s, --callStatic', 'Call static') @@ -133,7 +132,6 @@ addCommonOptions(program .addOption(contractSourceFilenameOption) .option('--contractBytecode [contractBytecode]', 'Contract bytecode file name') .addOption(contractAciFilenameOption) - .option('-W, --no-waitMined', 'Force waiting until transaction will be mined') .addOption(passwordOption) .addOption(gasOption) .addOption(gasPriceOption(true)) diff --git a/src/commands/name.js b/src/commands/name.js index 13a8e761..fae54b9f 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -34,7 +34,6 @@ const addCommonOptions = (p) => p // You can use `--nameTtl` and `--ttl` to pre-set transaction and name `time to leave` addCommonOptions(program .command('full-claim ') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .option('--nameFee [nameFee]', 'Amount of coins to pay for name') .option('--nameTtl [nameTtl]', 'Validity of name.', NAME_TTL) .option('--clientTtl [clientTtl]', 'Client ttl.', CLIENT_TTL) @@ -48,12 +47,10 @@ addCommonOptions(program // Example: `aecli name pre-claim ./myWalletKeyFile --password testpass testname.chain` // // This command build and send `pre-claim` transaction. -// And wait until it will be mined. You can force waiting by using `--waitMined false` option. Default: true // // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program .command('pre-claim ') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .description('Pre-Claim an AENS name') .action(AENS.preClaim)); @@ -68,7 +65,6 @@ addCommonOptions(program // You can use `--nameTtl` and `--ttl` to pre-set transaction and name `time to leave` addCommonOptions(program .command('claim ') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .option('--nameFee [nameFee]', 'Amount of coins to pay for name') .description('Claim an AENS name') .action(AENS.claim)); @@ -84,7 +80,6 @@ addCommonOptions(program // You can use `--nameTtl` and `--ttl` to pre-set transaction and name `time to leave` addCommonOptions(program .command('bid ') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .description('Bid on name') .action(AENS.nameBid)); @@ -95,7 +90,6 @@ addCommonOptions(program // Example: `aecli name update ./myWalletKeyFile --password testpass testname.chain ak_qwe23dffasfgdesag323` addCommonOptions(program .command('update [addresses...]') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .option('--extendPointers', 'Extend pointers', false) .option('--nameTtl [nameTtl]', 'A number of blocks until name expires', NAME_TTL) .option('--clientTtl [clientTtl]', 'Client TTL', CLIENT_TTL) @@ -110,7 +104,6 @@ addCommonOptions(program addCommonOptions(program .command('extend ') .argument('[nameTtl]', 'A number of blocks until name expires', NAME_TTL) - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .option('--clientTtl [clientTtl]', 'Client TTL', CLIENT_TTL) .description('Extend name ttl') .action(AENS.extendName)); @@ -122,7 +115,6 @@ addCommonOptions(program // Example: `aecli name revoke ./myWalletKeyFile --password testpass testname.chain` addCommonOptions(program .command('revoke ') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .description('Revoke an AENS name') .action(AENS.revokeName)); @@ -133,7 +125,6 @@ addCommonOptions(program // Example: `aecli name transfer ./myWalletKeyFile --password testpass testname.chain ak_qqwemjgflewgkj349gjdslksd` addCommonOptions(program .command('transfer
') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .description('Transfer a name to another account') .action(AENS.transferName)); diff --git a/src/commands/oracle.js b/src/commands/oracle.js index 973dd0e7..85ae367a 100644 --- a/src/commands/oracle.js +++ b/src/commands/oracle.js @@ -27,12 +27,9 @@ const addCommonOptions = (p) => p // // Example: `aecli oracle create ./myWalletKeyFile --password testpass string string` // -// And wait until it will be mined. You can force waiting by using `--waitMined false` option. Default: true -// // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program .command('create ') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .option('--oracleTtl [oracleTtl]', 'Relative oracle time to leave', ORACLE_TTL.value) .option('--queryFee [queryFee]', 'Oracle query fee', 0) .description('Register Oracle') @@ -44,12 +41,9 @@ addCommonOptions(program // // Example: `aecli oracle extend ./myWalletKeyFile --password testpass ok_12dasdgfa32fasf 200` // -// And wait until it will be mined. You can force waiting by using `--waitMined false` option. Default: true -// // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program .command('extend ') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .description('Extend Oracle') .action(Oracle.extendOracle)); @@ -59,12 +53,9 @@ addCommonOptions(program // // Example: `aecli oracle create-query ./myWalletKeyFile --password testpass ok_123asdasd... WhatTheWeatherIs?` // -// And wait until it will be mined. You can force waiting by using `--waitMined false` option. Default: true -// // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program .command('create-query ') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .option('--responseTtl [responseTtl]', 'Relative query response time to leave', RESPONSE_TTL.value) .option('--queryTtl [queryTtl]', 'Relative query time to leave', QUERY_TTL.value) .option('--queryFee [queryFee]', 'Oracle query fee', 0) @@ -77,12 +68,9 @@ addCommonOptions(program // // Example: `aecli oracle respondQuery ./myWalletKeyFile --password testpass ok_12313... oq_12efdsafa... +16Degree` // -// And wait until it will be mined. You can force waiting by using `--waitMined false` option. Default: true -// // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program .command('respond-query ') - .option('-M, --no-waitMined', 'Do not wait until transaction will be mined') .option('--responseTtl [responseTtl]', 'Query response time to leave', RESPONSE_TTL.value) .description('Respond to Oracle Query') .action(Oracle.respondToQuery)); @@ -93,8 +81,6 @@ addCommonOptions(program // // Example: `aecli oracle respondQuery ./myWalletKeyFile --password testpass ok_12313... oq_12efdsafa... +16Degree` // -// And wait until it will be mined. You can force waiting by using `--waitMined false` option. Default: true -// // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program .command('get ') From af5bad8cabc27be2aeb3c2d9fb73fad7bb5c9e5c Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 12 Apr 2024 15:20:20 +1000 Subject: [PATCH 63/88] docs: clear wallet name, remove `--password` for simplicity --- CHANGELOG.md | 4 ++-- CLI.md | 16 ++++++++-------- src/commands/account.js | 12 ++++++------ src/commands/contract.js | 14 +++++++------- src/commands/name.js | 16 ++++++++-------- src/commands/oracle.js | 10 +++++----- src/commands/spend.js | 6 +++--- 7 files changed, 39 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d969a527..b42b3d57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,11 +14,11 @@ Contract descriptors needs to be regenerated. For example, replace ``` -$ aecli contract call ./myWalletFile --password testpass foo '[1, 2]' +$ aecli contract call ./wallet.json foo '[1, 2]' ``` with ``` -$ aecli contract call --password testpass foo '[1, 2]' ./myWalletFile +$ aecli contract call foo '[1, 2]' ./wallet.json ``` #### `account spend` doesn't accept `denomination` parameter diff --git a/CLI.md b/CLI.md index bbc2da52..beedf15a 100644 --- a/CLI.md +++ b/CLI.md @@ -132,7 +132,7 @@ The account (wallet) commands are those which create and report on key pairs, an Use this command to create a new wallet. ``` -$ aecli account create ./wallet.json --password top-secret +$ aecli account create ./wallet.json ``` You can specify a password for accessing your wallet or just press Enter if you do not want to set a password. The wallet is created in the specified directory. @@ -171,7 +171,7 @@ Wallet path___________________ /path-to/wallet.json Using this command, you can send coins to another wallet. Just indicate another account's address and an amount which should be sent. ``` -$ aecli spend ./wallet.json --password top-secret ak_2GN72gRFHYmJd1DD2g2sLADr5ZXa13DPYNtuFajhsZT2y3FiWu 1.23ae +$ aecli spend ./wallet.json ak_2GN72gRFHYmJd1DD2g2sLADr5ZXa13DPYNtuFajhsZT2y3FiWu 1.23ae ``` As an option, you can set _--ttl_ parameter, which limits the lifespan of this transaction. @@ -208,28 +208,28 @@ $ ./aecli.mjs name Create and register a name for your account (public key): ``` -$ aecli name claim ./wallet.json --password top-secret testname.chain +$ aecli name claim ./wallet.json testname.chain ``` #### revoke You can delete your name using the following command: ``` -$ aecli name revoke ./wallet.json --password top-secret testname.chain +$ aecli name revoke ./wallet.json testname.chain ``` #### transfer You can transfer a name to another account or contract, just indicate another account's address. You will pass all rights regarding the name to another account: ``` -$ aecli name transfer ./wallet.json --password top-secret testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi +$ aecli name transfer ./wallet.json testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ``` #### update Use this command to update a name. For example, you can assign it to another account, but still you will have rights to do other operations with this name: ``` -$ aecli name update ./wallet.json --password top-secret testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi +$ aecli name update ./wallet.json testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ``` ## The contracts group @@ -278,7 +278,7 @@ $ aecli contract compile file1 To deploy a contract, run the following command adding the contract name: ``` -$ aecli contract deploy ./wallet.json --password top-secret testContract +$ aecli contract deploy ./wallet.json testContract ``` You will get the following: ``` @@ -292,7 +292,7 @@ Deploy descriptor_______________ testContract.deploy.2a1j2Mk9YSmC1gioUq4PWRm3bsv To execute a function of the contract, run the following command. Json file is stored in `aepp-sdk-js-develop/bin`. `Main` is a function which is executed by this contract, `int 1 2` are numerical values : ``` -$ aecli contract call ./wallet.json --password top-secret testContract.deploy.2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi.json main int 1 2 +$ aecli contract call ./wallet.json testContract.deploy.2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi.json main int 1 2 ``` You will get the following, where return value is a result of contract execution - it is a sum of values 1 and 2: ``` diff --git a/src/commands/account.js b/src/commands/account.js index e11c0213..698a63fb 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -19,7 +19,7 @@ const addCommonOptions = (p) => p // // You can use this command to sign your transaction's // -// Example: `aecli account sign ./myWalletKeyFile tx_1241rioefwj23f2wfdsfsdsdfsasdf --password testpassword` +// Example: `aecli account sign ./wallet.json tx_1241rioefwj23f2wfdsfsdsdfsasdf` addCommonOptions(program .command('sign ') .addOption(nodeOption) @@ -32,7 +32,7 @@ addCommonOptions(program // // You can use this command to sign message // -// Example: `aecli account sign-message ./myWalletKeyFile Hello --password testpassword` +// Example: `aecli account sign-message ./wallet.json Hello` addCommonOptions(program .command('sign-message [data...]') .option('--filePath [path]', 'Specify the path to the file for signing(ignore command message argument and use file instead)') @@ -43,7 +43,7 @@ addCommonOptions(program // // You can use this command to sign message // -// Example: `aecli account verify-message ./myWalletKeyFile asd1dasfadfsdasdasdasHexSig... Hello --password testpassword` +// Example: `aecli account verify-message ./wallet.json asd1dasfadfsdasdasdasHexSig... Hello` addCommonOptions(program .command('verify-message [data...]') .option('--filePath [path]', 'Specify the path to the file(ignore comm and message argument and use file instead)') @@ -54,9 +54,9 @@ addCommonOptions(program // // You can use this command to retrieve get your public and private key // -// Example: `aecli account address ./myWalletKeyFile --password testpassword` --> show only public key +// Example: `aecli account address ./wallet.json` --> show only public key // -// Example: `aecli account address ./myWalletKeyFile --password testpassword --privateKey` --> show public key and private key +// Example: `aecli account address ./wallet.json --privateKey` --> show public key and private key addCommonOptions(program .command('address ') .option('--privateKey', 'Print private key') @@ -77,7 +77,7 @@ addCommonOptions(program .addHelpText('after', ` Example call: - $ aecli account create ./my-wallet.json --password top-secret + $ aecli account create ./my-wallet.json $ aecli account create ./my-wallet.json 9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200`) .action(Account.createWallet)); diff --git a/src/commands/contract.js b/src/commands/contract.js index c8bf4327..63428166 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -86,15 +86,15 @@ addCommonOptions(program // You can use this command to execute a function's of contract // // Example: -// `aecli contract call ./myWalletFile --password testpass sumFunc '[1, 2]' --descrPath ./contractDescriptorFile.json ` --> Using descriptor file -// `aecli contract call ./myWalletFile --password testpass sumFunc '[1, 2]' --contractAddress ct_1dsf35423fdsg345g4wsdf35ty54234235 ` --> Using contract address +// `aecli contract call ./wallet.json sumFunc '[1, 2]' --descrPath ./contractDescriptorFile.json ` --> Using descriptor file +// `aecli contract call ./wallet.json sumFunc '[1, 2]' --contractAddress ct_1dsf35423fdsg345g4wsdf35ty54234235 ` --> Using contract address // // Also you have ability to make `static` call using `--callStatic` flag // Example: -// `aecli contract call ./myWalletFile --password testpass sumFunc '[1, 2]' --descrPath ./contractDescriptorFile.json --callStatic` --> Static call using descriptor -// `aecli contract call ./myWalletFile --password testpass sumFunc '[1, 2]' --contractAddress ct_1dsf35423fdsg345g4wsdf35ty54234235 --callStatic` --> Static call using contract address +// `aecli contract call ./wallet.json sumFunc '[1, 2]' --descrPath ./contractDescriptorFile.json --callStatic` --> Static call using descriptor +// `aecli contract call ./wallet.json sumFunc '[1, 2]' --contractAddress ct_1dsf35423fdsg345g4wsdf35ty54234235 --callStatic` --> Static call using contract address // You can preset gas, nonce and ttl for that call. If not set use default. -// Example: `aecli contract call ./myWalletFile --password testpass sumFunc '[1, 2]' --descrPath ./contractDescriptorFile.json --gas 2222222 --nonce 4 --ttl 1243` +// Example: `aecli contract call ./wallet.json sumFunc '[1, 2]' --descrPath ./contractDescriptorFile.json --gas 2222222 --nonce 4 --ttl 1243` addCommonOptions(program .command('call') .argument('', 'Name of contract entrypoint to call') @@ -120,11 +120,11 @@ addCommonOptions(program // // You can use this command to deploy contract on the chain // -// Example: `aecli contract deploy ./myWalletFile --password testpass ./contractSourceCodeFile 1 2` -> "1 2" -> Init state params +// Example: `aecli contract deploy ./wallet.json ./contractSourceCodeFile 1 2` -> "1 2" -> Init state params // // You can preset gas and initState for deploy // -// Example: `aecli contract deploy ./myWalletFile --password tstpass ./contractSourceCodeFile --gas 2222222` +// Example: `aecli contract deploy ./wallet.json ./contractSourceCodeFile --gas 2222222` addCommonOptions(program .command('deploy ') .addArgument(callArgs) diff --git a/src/commands/name.js b/src/commands/name.js index fae54b9f..da3198c9 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -27,7 +27,7 @@ const addCommonOptions = (p) => p // // You can use this command to `claim` AENS name. Name must end on `.chain`. // -// Example: `aecli name claim ./myWalletKeyFile --password testpass testname.chain` +// Example: `aecli name claim ./wallet.json testname.chain` // // This command send `pre-claim` transaction, wait until one block was mined, after that sent `claim` and `update` transaction's // @@ -44,7 +44,7 @@ addCommonOptions(program // // You can use this command to `pre-claim` AENS name // -// Example: `aecli name pre-claim ./myWalletKeyFile --password testpass testname.chain` +// Example: `aecli name pre-claim ./wallet.json testname.chain` // // This command build and send `pre-claim` transaction. // @@ -58,7 +58,7 @@ addCommonOptions(program // // You can use this command to `claim` AENS name. Name must end on `.chain`. // -// Example: `aecli name claim ./myWalletKeyFile --password testpass testname.chain` +// Example: `aecli name claim ./wallet.json testname.chain` // // This command send `pre-claim` transaction, wait until one block was mined, after that sent `claim` and `update` transaction's // @@ -73,7 +73,7 @@ addCommonOptions(program // // You can use this command to `claim` AENS name. Name must end on `.chain`. // -// Example: `aecli name claim ./myWalletKeyFile --password testpass testname.chain` +// Example: `aecli name claim ./wallet.json testname.chain` // // This command send `pre-claim` transaction, wait until one block was mined, after that sent `claim` and `update` transaction's // @@ -87,7 +87,7 @@ addCommonOptions(program // // You can use this command to `update` pointer of AENS name. // -// Example: `aecli name update ./myWalletKeyFile --password testpass testname.chain ak_qwe23dffasfgdesag323` +// Example: `aecli name update ./wallet.json testname.chain ak_qwe23dffasfgdesag323` addCommonOptions(program .command('update [addresses...]') .option('--extendPointers', 'Extend pointers', false) @@ -100,7 +100,7 @@ addCommonOptions(program // // You can use this command to `extend` ttl of AENS name. // -// Example: `aecli name extend ./myWalletKeyFile --password testpass testname.chain 100` +// Example: `aecli name extend ./wallet.json testname.chain 100` addCommonOptions(program .command('extend ') .argument('[nameTtl]', 'A number of blocks until name expires', NAME_TTL) @@ -112,7 +112,7 @@ addCommonOptions(program // // You can use this command to `destroy` AENS name. // -// Example: `aecli name revoke ./myWalletKeyFile --password testpass testname.chain` +// Example: `aecli name revoke ./wallet.json testname.chain` addCommonOptions(program .command('revoke ') .description('Revoke an AENS name') @@ -122,7 +122,7 @@ addCommonOptions(program // // You can use this command to `transfer` AENS name to another account. // -// Example: `aecli name transfer ./myWalletKeyFile --password testpass testname.chain ak_qqwemjgflewgkj349gjdslksd` +// Example: `aecli name transfer ./wallet.json testname.chain ak_qqwemjgflewgkj349gjdslksd` addCommonOptions(program .command('transfer
') .description('Transfer a name to another account') diff --git a/src/commands/oracle.js b/src/commands/oracle.js index 85ae367a..91465405 100644 --- a/src/commands/oracle.js +++ b/src/commands/oracle.js @@ -25,7 +25,7 @@ const addCommonOptions = (p) => p // // You can use this command to `create` Oracle // -// Example: `aecli oracle create ./myWalletKeyFile --password testpass string string` +// Example: `aecli oracle create ./wallet.json string string` // // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program @@ -39,7 +39,7 @@ addCommonOptions(program // // You can use this command to `extend` Oracle time to leave // -// Example: `aecli oracle extend ./myWalletKeyFile --password testpass ok_12dasdgfa32fasf 200` +// Example: `aecli oracle extend ./wallet.json ok_12dasdgfa32fasf 200` // // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program @@ -51,7 +51,7 @@ addCommonOptions(program // // You can use this command to `create` an Oracle Query // -// Example: `aecli oracle create-query ./myWalletKeyFile --password testpass ok_123asdasd... WhatTheWeatherIs?` +// Example: `aecli oracle create-query ./wallet.json ok_123asdasd... WhatTheWeatherIs?` // // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program @@ -66,7 +66,7 @@ addCommonOptions(program // // You can use this command to `respond` to Oracle Query // -// Example: `aecli oracle respondQuery ./myWalletKeyFile --password testpass ok_12313... oq_12efdsafa... +16Degree` +// Example: `aecli oracle respondQuery ./wallet.json ok_12313... oq_12efdsafa... +16Degree` // // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program @@ -79,7 +79,7 @@ addCommonOptions(program // // You can use this command to `get` an Oracle // -// Example: `aecli oracle respondQuery ./myWalletKeyFile --password testpass ok_12313... oq_12efdsafa... +16Degree` +// Example: `aecli oracle respondQuery ./wallet.json ok_12313... oq_12efdsafa... +16Degree` // // You can use `--ttl` to pre-set transaction `time to leave` addCommonOptions(program diff --git a/src/commands/spend.js b/src/commands/spend.js index 254d6c31..9dd3f8cb 100644 --- a/src/commands/spend.js +++ b/src/commands/spend.js @@ -17,9 +17,9 @@ export default new Command('aecli spend') .addHelpText('after', ` Example call: - $ aecli spend ./wallet.json ak_2GN72... 100 --password top-secret - $ aecli spend ./wallet.json aens-name.chain 1.23ae --password top-secret - $ aecli spend ./wallet.json ak_2GN72... 20% --password top-secret --ttl 20`) + $ aecli spend ./wallet.json ak_2GN72... 100 + $ aecli spend ./wallet.json aens-name.chain 1.23ae + $ aecli spend ./wallet.json ak_2GN72... 20% --ttl 20`) .argument('', 'A path to wallet file') .argument('', 'Address or name of recipient account') .argument( From 302c8b318447e8c74147dbbcd21b61156db3ed4a Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 12 Apr 2024 17:10:19 +1000 Subject: [PATCH 64/88] feat(account): accept password in env variable, notice password recorded --- src/arguments.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arguments.js b/src/arguments.js index b7637b05..c47b550c 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -36,7 +36,8 @@ export const gasPriceOption = (usingNode) => new Option('--gasPrice [gasPrice]', export const forceOption = new Option('-f, --force', 'Ignore node version compatibility check'); -export const passwordOption = new Option('-P, --password [password]', 'Wallet Password'); +export const passwordOption = new Option('-P, --password [password]', 'Wallet Password, may be recorded to shell history') + .env('AECLI_WALLET_PASSWORD'); export const ttlOption = (usingNode) => new Option('-T, --ttl [ttl]', 'Validity of the transaction in number of keyblocks, or without this limit if 0') .default(noValue, usingNode ? 3 : 0); From 4d4adce835917c6cdaa67164b7a84ff689316bb7 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 13 Apr 2024 13:40:44 +1000 Subject: [PATCH 65/88] refactor(chain)!: remove `network_id` command BREAKING CHANGE: `aecli chain network_id` removed Use `aecli chain status` instead. --- src/actions/chain.js | 11 ----------- src/commands/chain.js | 8 -------- test/chain.js | 6 ------ 3 files changed, 25 deletions(-) diff --git a/src/actions/chain.js b/src/actions/chain.js index a5f362c5..5d3ec14b 100644 --- a/src/actions/chain.js +++ b/src/actions/chain.js @@ -34,17 +34,6 @@ export async function version(options) { printUnderscored('Syncing', status.syncing); } -// ## Retrieve `node` version -export async function getNetworkId(options) { - const { json } = options; - // Initialize `Ae` - const sdk = initSdk(options); - // Call `getStatus` API and print it - const { networkId } = await sdk.api.getStatus(); - if (json) print({ networkId }); - else printUnderscored('Network ID', networkId); -} - // ## Retrieve `ttl` version export async function ttl(_absoluteTtl, { json, ...options }) { // Initialize `Ae` diff --git a/src/commands/chain.js b/src/commands/chain.js index ba4b1bd2..c0e40f0d 100755 --- a/src/commands/chain.js +++ b/src/commands/chain.js @@ -44,14 +44,6 @@ addCommonOptions(program .description('Get relative ttl') .action(Chain.ttl)); -// ## Initialize `network_id` command -// -// You can use this command to get current network ID -addCommonOptions(program - .command('network_id') - .description('Get network ID') - .action(Chain.getNetworkId)); - // ## Initialize `play` command // // You can use this command to get list of block by some condition (by `limit` or `height`) diff --git a/test/chain.js b/test/chain.js index 5627504e..8414f9ee 100644 --- a/test/chain.js +++ b/test/chain.js @@ -105,10 +105,4 @@ Absolute TTL ____________________________ 10 Relative TTL ____________________________ ${resJson.relativeTtl} `.trim()); }); - - it('prints network id', async () => { - const nodeNetworkId = await sdk.api.getNetworkId(); - const { networkId } = await executeChain(['network_id', '--json']); - nodeNetworkId.should.equal(networkId); - }); }); From 412827674d8ac57b484584ca63afe917f5ef68a0 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 13 Apr 2024 14:14:17 +1000 Subject: [PATCH 66/88] feat(account)!: verify message by address instead wallet BREAKING CHANGE: `aecli account verify-message` accepts signer address instead wallet --- src/actions/account.js | 7 +++---- src/commands/account.js | 6 +++--- test/account.js | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/actions/account.js b/src/actions/account.js index b6dc4442..998fa234 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -37,11 +37,10 @@ export async function signMessage(walletPath, data = [], options) { // ## `Verify` function // this function allow you to `verify` signed data -export async function verifyMessage(walletPath, hexSignature, dataArray = [], options) { - const { json, filePath, password } = options; +export async function verifyMessage(address, hexSignature, dataArray = [], options) { + const { json, filePath } = options; const data = filePath ? await fs.readFile(filePath) : dataArray.join(' '); - const account = await AccountCli.read(walletPath, password); - const isCorrect = _verifyMessage(data, Buffer.from(hexSignature, 'hex'), account.address); + const isCorrect = _verifyMessage(data, Buffer.from(hexSignature, 'hex'), address); if (json) { print({ data, isCorrect }); } else { diff --git a/src/commands/account.js b/src/commands/account.js index 698a63fb..0a8d8be6 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -43,11 +43,11 @@ addCommonOptions(program // // You can use this command to sign message // -// Example: `aecli account verify-message ./wallet.json asd1dasfadfsdasdasdasHexSig... Hello` +// Example: `aecli account verify-message ak_... asd1dasfadfsdasdasdasHexSig... Hello` addCommonOptions(program - .command('verify-message [data...]') + .command('verify-message
[data...]') .option('--filePath [path]', 'Specify the path to the file(ignore comm and message argument and use file instead)') - .description('Check if message was signed by wallet') + .description('Check if message was signed by account') .action(Account.verifyMessage)); // ## Initialize `address` command diff --git a/test/account.js b/test/account.js index 98f3be76..7002b3da 100644 --- a/test/account.js +++ b/test/account.js @@ -102,9 +102,9 @@ Secret Key ______________________________ ${keypair.secretKey} it('verify message', async () => { const data = 'Hello world'; - const verify = await executeAccount(['verify-message', WALLET_NAME, sig, data, '--json', '--password', 'test']); + const verify = await executeAccount(['verify-message', sdk.address, sig, data, '--json']); verify.isCorrect.should.be.equal(true); - const verifyFromFile = await executeAccount(['verify-message', WALLET_NAME, sigFromFile, '--json', '--password', 'test', '--filePath', fileName]); + const verifyFromFile = await executeAccount(['verify-message', sdk.address, sigFromFile, '--json', '--filePath', fileName]); verifyFromFile.isCorrect.should.be.equal(true); }); }); From 2b38b370e2ccd1c2d1d2b5b371bc88335448c19d Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sun, 14 Apr 2024 14:06:05 +1000 Subject: [PATCH 67/88] test: use smaller ae amounts --- docker/aeternity.yaml | 2 +- test/index.js | 4 +- test/name.js | 2 +- test/tx.js | 103 ++++++++++++++++++++---------------------- 4 files changed, 54 insertions(+), 57 deletions(-) diff --git a/docker/aeternity.yaml b/docker/aeternity.yaml index 586cce30..34aa56ea 100644 --- a/docker/aeternity.yaml +++ b/docker/aeternity.yaml @@ -16,4 +16,4 @@ chain: "1": 0 "5": 1 genesis_accounts: - ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E: 10000000000000001000000000000000000000 + ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E: 10000000000000000000000 diff --git a/test/index.js b/test/index.js index 117cffb0..5b074369 100644 --- a/test/index.js +++ b/test/index.js @@ -44,7 +44,7 @@ const Sdk = (params = {}) => { const spendPromise = (async () => { const sdk = Sdk(); - await sdk.spend(1e28, keypair.publicKey); + await sdk.spend(5e20, keypair.publicKey); })(); function getProgramOptions(command) { @@ -125,7 +125,7 @@ export async function getSdk() { }); await Promise.all([ executeProgram(accountProgram, ['create', WALLET_NAME, '--password', 'test', tempKeyPair.secretKey, '--overwrite']), - sdk.spend(1e26, tempKeyPair.publicKey, { onAccount: new MemoryAccount(keypair.secretKey) }), + sdk.spend(5e19, tempKeyPair.publicKey, { onAccount: new MemoryAccount(keypair.secretKey) }), ]); return sdk; } diff --git a/test/name.js b/test/name.js index 75b0bc11..3d7bc6d5 100644 --- a/test/name.js +++ b/test/name.js @@ -213,7 +213,7 @@ describe('AENS Module', () => { it('Open auction', async () => { const onAccount = MemoryAccount.generate(); - await sdk.spend('30000000000000000000000', onAccount.address); + await sdk.spend(5e18, onAccount.address); const preclaim = await sdk.aensPreclaim(name, { onAccount }); const claim = await preclaim.claim({ onAccount }); claim.blockHeight.should.be.gt(0); diff --git a/test/tx.js b/test/tx.js index d556ee73..1bd65769 100644 --- a/test/tx.js +++ b/test/tx.js @@ -1,10 +1,10 @@ import { - generateKeyPair, decode, encode, Encoding, buildTxHash, + decode, encode, Encoding, buildTxHash, } from '@aeternity/aepp-sdk'; import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { - executeProgram, randomName, getSdk, networkId, expectToMatchLines, + executeProgram, randomName, getSdk, networkId, expectToMatchLines, WALLET_NAME, } from './index.js'; import txProgram from '../src/commands/tx.js'; import accountProgram from '../src/commands/account.js'; @@ -13,7 +13,6 @@ import inspectProgram from '../src/commands/inspect.js'; const executeTx = (args) => executeProgram(txProgram, args); -const WALLET_NAME = 'test-artifacts/tx-wallet.json'; const testContract = ` @compiler >= 6 @@ -22,9 +21,8 @@ contract Identity = `; describe('Transaction Module', () => { - const TX_KEYS = generateKeyPair(); - const oracleId = encode(decode(TX_KEYS.publicKey, Encoding.AccountAddress), Encoding.OracleAddress); let sdk; + let oracleId; let salt; let queryId; let contractId; @@ -34,14 +32,13 @@ describe('Transaction Module', () => { before(async () => { sdk = await getSdk(); - await sdk.spend(1e24, TX_KEYS.publicKey); - await executeProgram(accountProgram, ['create', WALLET_NAME, '--password', 'test', TX_KEYS.secretKey]); + oracleId = encode(decode(sdk.address, Encoding.AccountAddress), Encoding.OracleAddress); }); it('builds tx', async () => { const amount = 100; - const args = ['spend', TX_KEYS.publicKey, TX_KEYS.publicKey, amount, nonce]; + const args = ['spend', sdk.address, sdk.address, amount, nonce]; const responseJson = await executeTx([...args, '--json']); expect(responseJson.tx).to.satisfy((s) => s.startsWith(Encoding.Transaction)); expect(responseJson).to.eql({ @@ -52,8 +49,8 @@ describe('Transaction Module', () => { fee: '16660000000000', nonce, payload: 'ba_Xfbg4g==', - recipientId: TX_KEYS.publicKey, - senderId: TX_KEYS.publicKey, + recipientId: sdk.address, + senderId: sdk.address, tag: 12, ttl: 0, }, @@ -65,8 +62,8 @@ Transaction type ________________________ SpendTx Summary TAG _________________________________ 12 VERSION _____________________________ 1 - SENDERID ____________________________ ${TX_KEYS.publicKey} - RECIPIENTID _________________________ ${TX_KEYS.publicKey} + SENDERID ____________________________ ${sdk.address} + RECIPIENTID _________________________ ${sdk.address} AMOUNT ______________________________ ${amount} FEE _________________________________ 16660000000000 TTL _________________________________ 0 @@ -79,20 +76,20 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su }); it('signs tx', async () => { - const { tx } = await executeTx(['spend', TX_KEYS.publicKey, TX_KEYS.publicKey, 100, nonce, '--json']); + const { tx } = await executeTx(['spend', sdk.address, sdk.address, 100, nonce, '--json']); const args = ['sign', WALLET_NAME, tx, '--password', 'test', '--networkId', networkId]; const responseJson = await executeProgram(accountProgram, [...args, '--json']); expect(responseJson.signedTx).to.satisfy((s) => s.startsWith(Encoding.Transaction)); expect(responseJson).to.eql({ - address: TX_KEYS.publicKey, + address: sdk.address, networkId: 'ae_dev', signedTx: responseJson.signedTx, }); const response = await executeProgram(accountProgram, args); expectToMatchLines(response, [ - `Signing account address _________________ ${TX_KEYS.publicKey}`, + `Signing account address _________________ ${sdk.address}`, 'Network ID ______________________________ ae_dev', `Unsigned ________________________________ ${tx}`, `Signed __________________________________ ${responseJson.signedTx}`, @@ -134,7 +131,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds spend tx and sends', async () => { const amount = 100; nonce += 1; - const { tx } = await executeTx(['spend', TX_KEYS.publicKey, TX_KEYS.publicKey, amount, nonce, '--json']); + const { tx } = await executeTx(['spend', sdk.address, sdk.address, amount, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -143,15 +140,15 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su fee: detailsJson.fee, nonce, payload: 'ba_Xfbg4g==', - recipientId: TX_KEYS.publicKey, - senderId: TX_KEYS.publicKey, + recipientId: sdk.address, + senderId: sdk.address, type: 'SpendTx', version: 1, }); expectToMatchLines(details, [ 'Transaction type ________________________ SpendTx', - `Sender address __________________________ ${TX_KEYS.publicKey}`, - `Recipient address _______________________ ${TX_KEYS.publicKey}`, + `Sender address __________________________ ${sdk.address}`, + `Recipient address _______________________ ${sdk.address}`, 'Amount __________________________________ 0.0000000000000001ae', 'Payload _________________________________ ba_Xfbg4g==', /Fee _____________________________________ 0.000016\d+ae/, @@ -162,14 +159,14 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name preclaim tx and sends', async () => { nonce += 1; - const { tx, salt: nameSalt } = await executeTx(['name-preclaim', TX_KEYS.publicKey, name, nonce, '--json']); + const { tx, salt: nameSalt } = await executeTx(['name-preclaim', sdk.address, name, nonce, '--json']); salt = nameSalt; const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.commitmentId).to.satisfy((s) => s.startsWith(Encoding.Commitment)); expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ - accountId: TX_KEYS.publicKey, + accountId: sdk.address, commitmentId: detailsJson.commitmentId, fee: detailsJson.fee, nonce, @@ -178,7 +175,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su }); expectToMatchLines(details, [ 'Transaction type ________________________ NamePreclaimTx', - `Account address _________________________ ${TX_KEYS.publicKey}`, + `Account address _________________________ ${sdk.address}`, `Commitment ______________________________ ${detailsJson.commitmentId}`, /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, @@ -188,13 +185,13 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name claim tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['name-claim', TX_KEYS.publicKey, salt, name, nonce, '--json']); + const { tx } = await executeTx(['name-claim', sdk.address, salt, name, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.nameSalt).to.be.a('number'); expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ - accountId: TX_KEYS.publicKey, + accountId: sdk.address, fee: detailsJson.fee, name, nameFee: '159700000000000000', @@ -205,7 +202,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su }); expectToMatchLines(details, [ 'Transaction type ________________________ NameClaimTx', - `Account address _________________________ ${TX_KEYS.publicKey}`, + `Account address _________________________ ${sdk.address}`, `Name ____________________________________ ${name}`, 'Name fee ________________________________ 0.1597ae', `Name salt _______________________________ ${salt}`, @@ -219,7 +216,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name update tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['name-update', TX_KEYS.publicKey, nameId, nonce, TX_KEYS.publicKey, '--json']); + const { tx } = await executeTx(['name-update', sdk.address, nameId, nonce, sdk.address, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -229,17 +226,17 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su nameId, nameTtl: 180000, nonce, - pointers: [{ id: TX_KEYS.publicKey, key: 'account_pubkey' }], + pointers: [{ id: sdk.address, key: 'account_pubkey' }], type: 'NameUpdateTx', version: 1, - accountId: TX_KEYS.publicKey, + accountId: sdk.address, }); expectToMatchLines(details, [ 'Transaction type ________________________ NameUpdateTx', - `Account address _________________________ ${TX_KEYS.publicKey}`, + `Account address _________________________ ${sdk.address}`, `Name ID _________________________________ ${nameId}`, 'Name TTL ________________________________ 180000 (in 1 year)', - `Pointer account_pubkey __________________ ${TX_KEYS.publicKey}`, + `Pointer account_pubkey __________________ ${sdk.address}`, 'Client TTL ______________________________ 3600 (1 hour)', /Fee _____________________________________ 0.000017\d+ae/, `Nonce ___________________________________ ${nonce}`, @@ -249,7 +246,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name transfer tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['name-transfer', TX_KEYS.publicKey, TX_KEYS.publicKey, nameId, nonce, '--json']); + const { tx } = await executeTx(['name-transfer', sdk.address, sdk.address, nameId, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -257,15 +254,15 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su fee: detailsJson.fee, nameId, nonce, - recipientId: TX_KEYS.publicKey, + recipientId: sdk.address, type: 'NameTransferTx', version: 1, - accountId: TX_KEYS.publicKey, + accountId: sdk.address, }); expectToMatchLines(details, [ 'Transaction type ________________________ NameTransferTx', - `Account address _________________________ ${TX_KEYS.publicKey}`, - `Recipient address _______________________ ${TX_KEYS.publicKey}`, + `Account address _________________________ ${sdk.address}`, + `Recipient address _______________________ ${sdk.address}`, `Name ID _________________________________ ${nameId}`, /Fee _____________________________________ 0.000017\d+ae/, `Nonce ___________________________________ ${nonce}`, @@ -275,7 +272,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name revoke tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['name-revoke', TX_KEYS.publicKey, nameId, nonce, '--json']); + const { tx } = await executeTx(['name-revoke', sdk.address, nameId, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -285,11 +282,11 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su nonce, type: 'NameRevokeTx', version: 1, - accountId: TX_KEYS.publicKey, + accountId: sdk.address, }); expectToMatchLines(details, [ 'Transaction type ________________________ NameRevokeTx', - `Account address _________________________ ${TX_KEYS.publicKey}`, + `Account address _________________________ ${sdk.address}`, `Name ID _________________________________ ${nameId}`, /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, @@ -306,7 +303,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su const callData = contract._calldata.encode(contract._name, 'init', []); const { tx, contractId: cId } = await executeTx([ 'contract-deploy', - TX_KEYS.publicKey, + sdk.address, bytecode, callData, nonce, @@ -329,11 +326,11 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su nonce, type: 'ContractCreateTx', version: 1, - ownerId: TX_KEYS.publicKey, + ownerId: sdk.address, }); expectToMatchLines(details, [ 'Transaction type ________________________ ContractCreateTx', - `Owner address ___________________________ ${TX_KEYS.publicKey}`, + `Owner address ___________________________ ${sdk.address}`, 'Gas _____________________________________ 5921420 (0.00592142ae)', 'Gas price _______________________________ 0.000000001ae', `Bytecode ________________________________ ${bytecode}`, @@ -351,7 +348,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su nonce += 1; // eslint-disable-next-line no-underscore-dangle const callData = contract._calldata.encode(contract._name, 'test', ['1', '2']); - const { tx } = await executeTx(['contract-call', TX_KEYS.publicKey, contractId, callData, nonce, '--json', '--amount', '0.00000042ae']); + const { tx } = await executeTx(['contract-call', sdk.address, contractId, callData, nonce, '--json', '--amount', '0.00000042ae']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -359,7 +356,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su abiVersion: '3', amount: '420000000000', callData, - callerId: TX_KEYS.publicKey, + callerId: sdk.address, contractId, fee: detailsJson.fee, gas: 5817860, @@ -370,7 +367,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su }); expectToMatchLines(details, [ 'Transaction type ________________________ ContractCallTx', - `Caller address __________________________ ${TX_KEYS.publicKey}`, + `Caller address __________________________ ${sdk.address}`, `Contract address ________________________ ${contractId}`, 'Gas _____________________________________ 5817860 (0.00581786ae)', 'Gas price _______________________________ 0.000000001ae', @@ -385,13 +382,13 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle register tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['oracle-register', TX_KEYS.publicKey, '{city: "str"}', '{tmp:""num}', nonce, '--json']); + const { tx } = await executeTx(['oracle-register', sdk.address, '{city: "str"}', '{tmp:""num}', nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); expect(detailsJson).to.eql({ abiVersion: '0', - accountId: TX_KEYS.publicKey, + accountId: sdk.address, fee: detailsJson.fee, nonce, oracleTtl: { type: 'delta', value: '500' }, @@ -403,7 +400,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su }); expectToMatchLines(details, [ 'Transaction type ________________________ OracleRegisterTx', - `Account address _________________________ ${TX_KEYS.publicKey}`, + `Account address _________________________ ${sdk.address}`, /Oracle TTL ______________________________ \d+ \(in 1 day\)/, 'ABI version _____________________________ 0 (NoAbi)', 'Query fee _______________________________ 0ae', @@ -418,7 +415,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle extend tx and sends', async () => { const oracleCurrentTtl = await sdk.api.getOracleByPubkey(oracleId); nonce += 1; - const { tx } = await executeTx(['oracle-extend', TX_KEYS.publicKey, oracleId, 100, nonce, '--json']); + const { tx } = await executeTx(['oracle-extend', sdk.address, oracleId, 100, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -446,7 +443,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle post query tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['oracle-post-query', TX_KEYS.publicKey, oracleId, '{city: "Berlin"}', nonce, '--json']); + const { tx } = await executeTx(['oracle-post-query', sdk.address, oracleId, '{city: "Berlin"}', nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -458,13 +455,13 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su queryFee: '0', queryTtl: { type: 'delta', value: '10' }, responseTtl: { type: 'delta', value: '10' }, - senderId: TX_KEYS.publicKey, + senderId: sdk.address, type: 'OracleQueryTx', version: 1, }); expectToMatchLines(details, [ 'Transaction type ________________________ OracleQueryTx', - `Sender address __________________________ ${TX_KEYS.publicKey}`, + `Sender address __________________________ ${sdk.address}`, `Oracle ID _______________________________ ${oracleId}`, 'Query ___________________________________ {city: "Berlin"}', 'Query fee _______________________________ 0ae', @@ -484,7 +481,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle respond tx and sends', async () => { const response = '{tmp: 10}'; nonce += 1; - const { tx } = await executeTx(['oracle-respond', TX_KEYS.publicKey, oracleId, queryId, response, nonce, '--json']); + const { tx } = await executeTx(['oracle-respond', sdk.address, oracleId, queryId, response, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); From e3be36575f32d9c346048e5d0a7495017be0e9d1 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 12 Apr 2024 12:38:23 +1000 Subject: [PATCH 68/88] fix(oracle): remove extra arguments in tx builder, refactor, fix examples --- src/actions/transaction.js | 33 +---- src/arguments.js | 5 +- src/commands/main.js | 9 +- src/commands/spend.js | 1 - src/commands/tx.js | 272 ++++++++++++++----------------------- src/utils/print.js | 5 +- test/index.js | 6 +- test/tx.js | 4 +- 8 files changed, 114 insertions(+), 221 deletions(-) diff --git a/src/actions/transaction.js b/src/actions/transaction.js index 830df4f8..babbad3d 100644 --- a/src/actions/transaction.js +++ b/src/actions/transaction.js @@ -1,7 +1,3 @@ -// # æternity CLI `transaction` file -// -// This script initialize all `transaction` function - import { Tag, ORACLE_TTL_TYPES, Node, genSalt, unpackTx, commitmentHash, buildContractId, verifyTransaction, @@ -10,7 +6,6 @@ import { import { print, printUnderscored, printValidation } from '../utils/print.js'; import { validateName, decode } from '../utils/helpers.js'; -// Print `Builder Transaction` function buildAndPrintTx(params, json, extraKeys = {}) { const tx = buildTx(params); const txObject = unpackTx(tx); @@ -30,9 +25,7 @@ function buildAndPrintTx(params, json, extraKeys = {}) { print('This is an unsigned transaction. Use `account sign` and `tx broadcast` to submit the transaction to the network, or verify that it will be accepted with `tx verify`.'); } -// ## Build `spend` transaction export function spend(senderId, recipientId, amount, nonce, { json, payload, ...options }) { - // Build params const params = { tag: Tag.SpendTx, ...options, @@ -45,15 +38,10 @@ export function spend(senderId, recipientId, amount, nonce, { json, payload, ... buildAndPrintTx(params, json); } -// ## Build `namePreClaim` transaction export function namePreClaim(accountId, name, nonce, { json, ...options }) { - // Validate `name`(check if `name` end on `.chain`) validateName(name); - - // Generate `salt` and `commitmentId` and build `name` hash const salt = genSalt(); const commitmentId = commitmentHash(name, salt); - const params = { tag: Tag.NamePreclaimTx, ...options, @@ -64,9 +52,7 @@ export function namePreClaim(accountId, name, nonce, { json, ...options }) { buildAndPrintTx(params, json, { salt }); } -// ## Build `nameClaim` transaction export function nameClaim(accountId, nameSalt, name, nonce, { json, ...options }) { - // Validate `name`(check if `name` end on `.chain`) validateName(name); const params = { tag: Tag.NameClaimTx, @@ -79,7 +65,6 @@ export function nameClaim(accountId, nameSalt, name, nonce, { json, ...options } buildAndPrintTx(params, json); } -// ## Build `nameUpdate` transaction export function nameUpdate(accountId, nameId, nonce, pointers, { json, ...options }) { const params = { tag: Tag.NameUpdateTx, @@ -92,9 +77,7 @@ export function nameUpdate(accountId, nameId, nonce, pointers, { json, ...option buildAndPrintTx(params, json); } -// ## Build `nameTransfer` transaction export function nameTransfer(accountId, recipientId, nameId, nonce, { json, ...options }) { - // Create `transfer` transaction const params = { tag: Tag.NameTransferTx, ...options, @@ -106,7 +89,6 @@ export function nameTransfer(accountId, recipientId, nameId, nonce, { json, ...o buildAndPrintTx(params, json); } -// ## Build `nameRevoke` transaction export function nameRevoke(accountId, nameId, nonce, { json, ...options }) { const params = { tag: Tag.NameRevokeTx, @@ -118,7 +100,6 @@ export function nameRevoke(accountId, nameId, nonce, { json, ...options }) { buildAndPrintTx(params, json); } -// ## Build `contractDeploy` transaction export function contractDeploy(ownerId, code, callData, nonce, { json, gas, ...options }) { const params = { tag: Tag.ContractCreateTx, @@ -134,7 +115,6 @@ export function contractDeploy(ownerId, code, callData, nonce, { json, gas, ...o }); } -// ## Build `contractCall` transaction export function contractCall(callerId, contractId, callData, nonce, { json, gas, ...options }) { const params = { tag: Tag.ContractCallTx, @@ -148,7 +128,6 @@ export function contractCall(callerId, contractId, callData, nonce, { json, gas, buildAndPrintTx(params, json); } -// ## Build `oracleRegister` transaction export function oracleRegister(accountId, queryFormat, responseFormat, nonce, { json, oracleTtl, ...options }) { @@ -165,7 +144,6 @@ export function oracleRegister(accountId, queryFormat, responseFormat, nonce, { buildAndPrintTx(params, json); } -// ## Build `oraclePostQuery` transaction export function oraclePostQuery(senderId, oracleId, query, nonce, { json, queryTtl, responseTtl, ...options }) { @@ -184,12 +162,10 @@ export function oraclePostQuery(senderId, oracleId, query, nonce, { buildAndPrintTx(params, json); } -// ## Build `oracleExtend` transaction -export function oracleExtend(callerId, oracleId, oracleTtl, nonce, { json, ...options }) { +export function oracleExtend(oracleId, oracleTtl, nonce, { json, ...options }) { const params = { tag: Tag.OracleExtendTx, ...options, - callerId, oracleId, oracleTtlType: ORACLE_TTL_TYPES.delta, oracleTtlValue: oracleTtl, @@ -198,8 +174,7 @@ export function oracleExtend(callerId, oracleId, oracleTtl, nonce, { json, ...op buildAndPrintTx(params, json); } -// ## Build `oracleRespond` transaction -export function oracleRespond(callerId, oracleId, queryId, response, nonce, { +export function oracleRespond(oracleId, queryId, response, nonce, { json, responseTtl, ...options }) { const params = { @@ -208,7 +183,6 @@ export function oracleRespond(callerId, oracleId, queryId, response, nonce, { oracleId, responseTtlType: ORACLE_TTL_TYPES.delta, responseTtlValue: responseTtl, - callerId, queryId, response, nonce, @@ -216,11 +190,8 @@ export function oracleRespond(callerId, oracleId, queryId, response, nonce, { buildAndPrintTx(params, json); } -// ## Verify 'transaction' export async function verify(transaction, { json, ...options }) { - // Validate input decode(transaction, 'tx'); - // Call `getStatus` API and print it const validation = await verifyTransaction(transaction, new Node(options.url)); const { tag, ...tx } = unpackTx(transaction); if (json) { diff --git a/src/arguments.js b/src/arguments.js index c47b550c..6e94fff6 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -1,4 +1,4 @@ -import { Argument, Option } from 'commander'; +import { Option } from 'commander'; import BigNumber from 'bignumber.js'; import { MIN_GAS_PRICE } from '@aeternity/aepp-sdk'; import { noValue } from './utils/default-option-description.js'; @@ -15,9 +15,6 @@ export const amountOption = new Option('-a, --amount [amount]', 'Amount of coins export const feeOption = new Option('-F, --fee [fee]', 'Override the transaction fee') .argParser(coinAmountParser); -export const nonceArgument = new Argument('', 'Unique number that is required to sign transaction securely') - .argParser((nonce) => +nonce); - export const nodeOption = new Option('-u, --url [nodeUrl]', 'Node to connect to') .default('https://mainnet.aeternity.io', 'mainnet') .env('AECLI_NODE_URL'); diff --git a/src/commands/main.js b/src/commands/main.js index 8ae8d49d..200e9b94 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -1,7 +1,3 @@ -// # æternity CLI `root` file -// -// This script initialize all `cli` commands -// We'll use `commander` for parsing options import { Command } from 'commander'; import prompts from 'prompts'; import fs from 'fs-extra'; @@ -16,14 +12,13 @@ import CliError from '../utils/CliError.js'; const program = new Command(); -// Array of child command's const EXECUTABLE_CMD = [ { name: 'chain', desc: 'Interact with the blockchain' }, { name: 'inspect', desc: 'Get information on transactions, blocks,...' }, { name: 'account', desc: 'Handle wallet operations' }, { name: 'contract', desc: 'Contract interactions' }, { name: 'name', desc: 'AENS system' }, - { name: 'tx', desc: 'Transaction builder' }, + { name: 'tx', desc: 'Generates transactions to sign and submit manually' }, { name: 'oracle', desc: 'Interact with oracles' }, { name: 'spend', desc: 'Send coins to account or contract' }, ]; @@ -33,13 +28,11 @@ const EXECUTABLE_CMD = [ resolve(fileURLToPath(import.meta.url), '../../../package.json'), ); - // You get get CLI version by exec `aecli version` program.version(version); updateNotifier({ pkg: { name, version } }).notify(); })(); -// ## Initialize `child` command's EXECUTABLE_CMD.forEach(({ name, desc }) => program.command(name, desc)); async function getNodeDescription(url) { diff --git a/src/commands/spend.js b/src/commands/spend.js index 9dd3f8cb..64c760e9 100644 --- a/src/commands/spend.js +++ b/src/commands/spend.js @@ -15,7 +15,6 @@ import { export default new Command('aecli spend') .description('Sends coins to another account or contract.') .addHelpText('after', ` - Example call: $ aecli spend ./wallet.json ak_2GN72... 100 $ aecli spend ./wallet.json aens-name.chain 1.23ae diff --git a/src/commands/tx.js b/src/commands/tx.js index baeb7a4c..af7fb564 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -1,10 +1,4 @@ -// # æternity CLI `transaction` file -// -// This script initialize all `transaction` command's -// We'll use `commander` for parsing options -// -// Also we need `esm` package to handle `ES imports` -import { Command } from 'commander'; +import { Command, Argument } from 'commander'; import { NAME_TTL, CLIENT_TTL, ORACLE_TTL, QUERY_TTL, RESPONSE_TTL, } from '@aeternity/aepp-sdk'; @@ -14,183 +8,121 @@ import { jsonOption, gasOption, gasPriceOption, - nonceArgument, feeOption, forceOption, ttlOption, - networkIdOption, amountOption, + coinAmountParser, } from '../arguments.js'; -const program = new Command().name('aecli tx'); - -// ## Initialize `options` -const addCommonOptions = (p) => p - .addOption(nodeOption) -// .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') - .addOption(feeOption) - .addOption(ttlOption(false)) - .addOption(forceOption) - .addOption(jsonOption); - -// ## Initialize `spend` command -// -// You can use this command to build `spend` transaction -// -// Example: `aecli tx spend ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT 100` -addCommonOptions(program - .command('spend ') - .addArgument(nonceArgument) - .option('--payload [payload]', 'Transaction payload.', '') - .description('Build Spend Transaction') - .action(Transaction.spend)); - -// ## Initialize `name-preclaim` command -// -// You can use this command to build `preclaim` transaction -// -// Example: `aecli tx name-preclaim ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi testname.chain` -addCommonOptions(program - .command('name-preclaim ') - .addArgument(nonceArgument) - .description('Build name preclaim transaction.') - .action(Transaction.namePreClaim)); - -// ## Initialize `name-update` command -// -// You can use this command to build `update` transaction -// -// Example: `aecli tx name-update ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi testname.chain` -addCommonOptions(program - .command('name-update ') - .addArgument(nonceArgument) - .argument('[pointers...]') - .option('--nameTtl [nameTtl]', 'Validity of name.', NAME_TTL) - .option('--clientTtl [clientTtl]', 'Client ttl.', CLIENT_TTL) - .description('Build name update transaction.') - .action(Transaction.nameUpdate)); - -// ## Initialize `name-claim` command -// -// You can use this command to build `claim` transaction -// -// Example: `aecli tx name-claim ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi 12327389123 testname.chain` -addCommonOptions(program - .command('name-claim ') - .addArgument(nonceArgument) - .option('--nameFee [nameFee]', 'Name fee.') - .description('Build name claim transaction.') - .action(Transaction.nameClaim)); - -// ## Initialize `name-transfer` command -// -// You can use this command to build `tansfer` transaction -// -// Example: `aecli tx name-transfer ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi testname.chain` -addCommonOptions(program - .command('name-transfer ') - .addArgument(nonceArgument) - .description('Build name tansfer transaction.') - .action(Transaction.nameTransfer)); - -// ## Initialize `name-revoke` command -// -// You can use this command to build `revoke` transaction -// -// Example: `aecli tx name-revoke ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi testname.chain` -addCommonOptions(program - .command('name-revoke ') - .addArgument(nonceArgument) - .description('Build name revoke transaction.') - .action(Transaction.nameRevoke)); - -// ## Initialize `contract-deploy` command -// -// You can use this command to build `contract create` transaction -// -// Example: `aecli tx contract-deploy ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi test.contract` -addCommonOptions(program - .command('contract-deploy ') - .addArgument(nonceArgument) +const program = new Command() + .name('aecli tx') + .description('Generates transactions to sign and submit manually. Useful for offline signing.'); + +const addExamples = (cmd, examples) => cmd.addHelpText('after', ` +Example call: +${examples.map((e) => ` $ ${program.name()} ${cmd.name()} ${e}`).join('\n')}`); + +const addTxBuilderOptions = (cmd, example) => { + cmd + .addArgument( + new Argument('', 'Unique number that is required to sign transaction securely') + .argParser((nonce) => +nonce), + ) + .addOption(feeOption) + .addOption(ttlOption(false)) + .addOption(jsonOption) + .summary(`build ${cmd.name().replaceAll('-', ' ')} transaction`) + .description(`Build ${cmd.name().replaceAll('-', ' ')} transaction.`); + addExamples(cmd, [example]); +}; + +const exampleAddress1 = 'ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi'; +const exampleAddress2 = 'ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT'; +const exampleContract = 'ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh'; +const exampleOracle = 'ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi'; +const exampleOracleQuery = 'oq_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh'; +const exampleName = 'example-name.chain'; +const exampleCalldata = 'cb_DA6sWJo='; + +let command; + +command = program.command('spend ') + .argument('', 'Amount of coins to send', coinAmountParser) + .option('--payload [payload]', 'Transaction payload', '') + .action(Transaction.spend); +addTxBuilderOptions(command, `${exampleAddress1} ${exampleAddress2} 100ae 42`); + +command = program.command('name-preclaim ') + .action(Transaction.namePreClaim); +addTxBuilderOptions(command, `${exampleAddress1} ${exampleName} 42`); + +command = program.command('name-claim ') + .option('--nameFee [nameFee]', 'Name fee') + .action(Transaction.nameClaim); +addTxBuilderOptions(command, `${exampleAddress1} 12327389123 ${exampleName} 42`); + +command = program.command('name-update ') + .option('--nameTtl [nameTtl]', 'Validity of name', NAME_TTL) + .option('--clientTtl [clientTtl]', 'Client TTL', CLIENT_TTL) + .action(Transaction.nameUpdate); +addTxBuilderOptions(command, `${exampleAddress1} ${exampleName} 42 ${exampleContract}`); +command.argument('[pointers...]'); + +command = program.command('name-transfer ') + .action(Transaction.nameTransfer); +addTxBuilderOptions(command, `${exampleAddress1} ${exampleAddress2} ${exampleName} 42`); + +command = program.command('name-revoke ') + .action(Transaction.nameRevoke); +addTxBuilderOptions(command, `${exampleAddress1} ${exampleName} 42`); + +command = program.command('contract-deploy ') .addOption(gasOption) .addOption(gasPriceOption(false)) .addOption(amountOption) .description('Build contract create transaction.') - .action(Transaction.contractDeploy)); - -// ## Initialize `contract-call` command -// -// You can use this command to build `contract call` transaction -// -// Example: `aecli tx contract-call ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ct_2134235423dsfsdfsdf sum int 1 2` -addCommonOptions(program - .command('contract-call ') - .addArgument(nonceArgument) + .action(Transaction.contractDeploy); +addTxBuilderOptions(command, `${exampleAddress1} cb_dGhpcyBtZXNzYWdlIGlzIG5vdCBpbmRleGVkdWmUpw== ${exampleCalldata} 42`); + +command = program.command('contract-call ') .addOption(gasOption) .addOption(gasPriceOption(false)) .addOption(amountOption) .description('Build contract create transaction.') - .action(Transaction.contractCall)); - -// ## Initialize `oracle-register` command -// -// You can use this command to build `oracle-register` transaction -// -// Example: `aecli tx oracle-register ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi "{city: 'string'}" "{tmp: 'num'}"`` -addCommonOptions(program - .command('oracle-register ') - .addArgument(nonceArgument) - .option('--queryFee [queryFee]', 'Oracle Query fee.', 0) - .option('--oracleTtl [oracleTtl]', 'Oracle Ttl.', ORACLE_TTL.value) - .description('Build oracle register transaction.') - .action(Transaction.oracleRegister)); - -// ## Initialize `oracle-post-query` command -// -// You can use this command to build `oracle-post-query` transaction -// -// Example: `aecli tx oracle-post-query ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ok_348hrfdhisdkhasdaksdasdsad '{"city": "Berlin"}'` -addCommonOptions(program - .command('oracle-post-query ') - .addArgument(nonceArgument) - .option('--queryFee [queryFee]', 'Oracle Query fee.', 0) - .option('--queryTtl [oracleTtl]', 'Oracle Ttl.', QUERY_TTL.value) - .option('--responseTtl [oracleTtl]', 'Oracle Ttl.', RESPONSE_TTL.value) - .description('Build oracle post query transaction.') - .action(Transaction.oraclePostQuery)); - -// ## Initialize `oracle-extend` command -// -// You can use this command to build `oracle-extend` transaction -// -// Example: `aecli tx oracle-extend ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ok_348hrfdhisdkhasdaksdasdsad 100 -addCommonOptions(program - .command('oracle-extend ') - .addArgument(nonceArgument) - .description('Build oracle extend transaction.') - .action(Transaction.oracleExtend)); - -// ## Initialize `oracle-respond` command -// -// You can use this command to build `oracle-respond` transaction -// -// Example: `aecli tx oracle-respond ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ok_348hrfdhisdkhasdaksdasdsad oq_asdjn23ifsdiuhfk2h3fuksadh '{"tmp": 1}'` -addCommonOptions(program - .command('oracle-respond ') - .addArgument(nonceArgument) - .option('--responseTtl [oracleTtl]', 'Oracle Ttl.', RESPONSE_TTL.value) - .description('Build oracle extend transaction.') - .action(Transaction.oracleRespond)); - -// ## Initialize `verify` command -// -// You can use this command to send `transaction` to the `chain` -// -// Example: `aecli tx spend ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT 100` -addCommonOptions(program + .action(Transaction.contractCall); +addTxBuilderOptions(command, `${exampleAddress1} ${exampleContract} ${exampleCalldata} 42`); + +command = program.command('oracle-register ') + .option('--queryFee [queryFee]', 'Oracle query fee', 0) + .option('--oracleTtl [oracleTtl]', 'Oracle TTL', ORACLE_TTL.value) + .action(Transaction.oracleRegister); +addTxBuilderOptions(command, `${exampleAddress1} '{"city": "string"}' '{"tmp": "number"}' 42`); + +command = program.command('oracle-extend ') + .action(Transaction.oracleExtend); +addTxBuilderOptions(command, `${exampleOracle} 100 42`); + +command = program.command('oracle-post-query ') + .option('--queryFee [queryFee]', 'Oracle query fee', 0) + .option('--queryTtl [oracleTtl]', 'Oracle TTL', QUERY_TTL.value) + .option('--responseTtl [oracleTtl]', 'Oracle TTL', RESPONSE_TTL.value) + .action(Transaction.oraclePostQuery); +addTxBuilderOptions(command, `${exampleAddress2} ${exampleOracle} '{"city": "Berlin"}' 42`); + +command = program.command('oracle-respond ') + .option('--responseTtl [oracleTtl]', 'Oracle TTL', RESPONSE_TTL.value) + .action(Transaction.oracleRespond); +addTxBuilderOptions(command, `${exampleOracle} ${exampleOracleQuery} '{"tmp": 1}' 42`); + +command = program .command('verify ') - .addOption(networkIdOption) - .description('Verify transaction') - .action(Transaction.verify)); + .addOption(nodeOption) + .addOption(forceOption) + .addOption(jsonOption) + .summary('verify transaction using node') + .description('Verify transaction using node.') + .action(Transaction.verify); +addExamples(command, ['tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57']); export default program; diff --git a/src/utils/print.js b/src/utils/print.js index 59b078a6..f04ed4be 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -40,8 +40,9 @@ export function printUnderscored(key, val) { export function printValidation({ validation, transaction }) { print('---------------------------------------- TX DATA ↓↓↓ \n'); - const { tx, txType: type } = unpackTx(transaction); - Object.entries({ ...tx, type }).forEach(([key, value]) => printUnderscored(key, value)); + const tx = unpackTx(transaction); + // TODO: print the same way as transaction by hash + Object.entries(tx).forEach(([key, value]) => printUnderscored(key, value)); print('\n---------------------------------------- ERRORS ↓↓↓ \n'); validation.forEach(({ message, checkedKeys }) => { printUnderscored(checkedKeys.join(', '), message); diff --git a/test/index.js b/test/index.js index 5b074369..38b922ef 100644 --- a/test/index.js +++ b/test/index.js @@ -90,10 +90,10 @@ export async function executeProgram(program, args) { ...args.map((arg) => arg.toString()), ...['config', 'select-node', 'select-compiler'].includes(args[0]) || ( - // eslint-disable-next-line no-underscore-dangle - program._name === 'aecli account' + program.name() === 'aecli account' && ['save', 'create', 'address', 'sign-message', 'verify-message'].includes(args[0]) - ) ? [] : ['--url', url], + ) + || (program.name() === 'aecli tx' && args[0] !== 'verify') ? [] : ['--url', url], ...[ 'compile', 'deploy', 'call', 'encode-calldata', 'decode-call-result', ].includes(args[0]) && !args.includes('--compilerUrl') ? ['--compilerUrl', compilerUrl] : [], diff --git a/test/tx.js b/test/tx.js index 1bd65769..5854f310 100644 --- a/test/tx.js +++ b/test/tx.js @@ -415,7 +415,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle extend tx and sends', async () => { const oracleCurrentTtl = await sdk.api.getOracleByPubkey(oracleId); nonce += 1; - const { tx } = await executeTx(['oracle-extend', sdk.address, oracleId, 100, nonce, '--json']); + const { tx } = await executeTx(['oracle-extend', oracleId, 100, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -481,7 +481,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle respond tx and sends', async () => { const response = '{tmp: 10}'; nonce += 1; - const { tx } = await executeTx(['oracle-respond', sdk.address, oracleId, queryId, response, nonce, '--json']); + const { tx } = await executeTx(['oracle-respond', oracleId, queryId, response, nonce, '--json']); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); From 4fada6e2abcab38649dea793a79d877d5fd32df2 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 12 Apr 2024 16:34:56 +1000 Subject: [PATCH 69/88] fix(oracle)!: don't require extra arguments, refactor examples BREAKING CHANGE: aecli won't accept already known account address in oracles Remove extra argument: ```diff - $ aecli oracle extend ./wallet.json ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi 200 + $ aecli oracle extend ./wallet.json 200 - $ aecli oracle respond-query ./wallet.json ok_2a1j2Mk9YSmC1gi... oq_6y3N9KqQb74QsvR... +16Degree + $ aecli oracle respond-query ./wallet.json oq_6y3N9KqQb74QsvR... +16Degree ``` --- src/actions/oracle.js | 26 ++-------- src/commands/oracle.js | 111 +++++++++++++++-------------------------- src/commands/spend.js | 17 ++++--- src/commands/tx.js | 20 +++----- src/utils/helpers.js | 25 +++++----- test/oracle.js | 8 +-- 6 files changed, 78 insertions(+), 129 deletions(-) diff --git a/src/actions/oracle.js b/src/actions/oracle.js index 8ccde2f9..db7bd0d9 100644 --- a/src/actions/oracle.js +++ b/src/actions/oracle.js @@ -1,7 +1,3 @@ -// # æternity CLI `contract` file -// -// This script initialize all `contract` function - import { ORACLE_TTL_TYPES } from '@aeternity/aepp-sdk'; import { initSdk, initSdkByWalletFile } from '../utils/cli.js'; import { decode } from '../utils/helpers.js'; @@ -14,7 +10,6 @@ function ensureTtlANumber(ttl, name) { if (isNaN(+ttl)) throw new CliError(`${name} TTL should be a number`); } -// ## Create Oracle export async function createOracle(walletPath, queryFormat, responseFormat, options) { const { ttl, fee, nonce, json, oracleTtl, queryFee, @@ -22,7 +17,6 @@ export async function createOracle(walletPath, queryFormat, responseFormat, opti ensureTtlANumber(oracleTtl, 'Oracle'); const sdk = await initSdkByWalletFile(walletPath, options); - // Register Oracle const oracle = await sdk.registerOracle(queryFormat, responseFormat, { ttl, nonce, @@ -36,16 +30,14 @@ export async function createOracle(walletPath, queryFormat, responseFormat, opti await printTransaction(oracle, json, sdk); } -// ## Extend Oracle -export async function extendOracle(walletPath, oracleId, oracleTtl, options) { +export async function extendOracle(walletPath, oracleTtl, options) { const { ttl, fee, nonce, json, } = options; ensureTtlANumber(oracleTtl, 'Oracle'); - decode(oracleId, 'ok'); const sdk = await initSdkByWalletFile(walletPath, options); - const oracle = await sdk.getOracleObject(oracleId); + const oracle = await sdk.getOracleObject(sdk.address.replace('ak_', 'ok_')); const extended = await oracle.extendOracle({ ttl, nonce, @@ -58,7 +50,6 @@ export async function extendOracle(walletPath, oracleId, oracleTtl, options) { await printTransaction(extended, json, sdk); } -// ## Create Oracle Query export async function createOracleQuery(walletPath, oracleId, query, options) { const { ttl, fee, nonce, json, queryTtl, queryFee, responseTtl, @@ -87,24 +78,16 @@ export async function createOracleQuery(walletPath, oracleId, query, options) { await printTransaction(oracleQuery, json, sdk); } -// ## Respond to Oracle Query -export async function respondToQuery( - walletPath, - oracleId, - queryId, - response, - options, -) { +export async function respondToQuery(walletPath, queryId, response, options) { const { ttl, fee, nonce, json, responseTtl, } = options; - decode(oracleId, 'ok'); decode(queryId, 'oq'); ensureTtlANumber(responseTtl, 'Response'); const sdk = await initSdkByWalletFile(walletPath, options); - const oracle = await sdk.getOracleObject(oracleId); + const oracle = await sdk.getOracleObject(sdk.address.replace('ak_', 'ok_')); const queryResponse = await oracle.respondToQuery(queryId, response, { ttl, nonce, @@ -117,7 +100,6 @@ export async function respondToQuery( await printTransaction(queryResponse, json, sdk); } -// ## Get oracle export async function queryOracle(oracleId, { json, ...options }) { decode(oracleId, 'ok'); const sdk = initSdk(options); diff --git a/src/commands/oracle.js b/src/commands/oracle.js index 91465405..b0044637 100644 --- a/src/commands/oracle.js +++ b/src/commands/oracle.js @@ -1,90 +1,61 @@ -// # æternity CLI `oracle` file -// -// This script initialize all `oracle` commands -// We'll use `commander` for parsing options import { Command } from 'commander'; import { ORACLE_TTL, QUERY_TTL, RESPONSE_TTL } from '@aeternity/aepp-sdk'; import * as Oracle from '../actions/oracle.js'; import { nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, } from '../arguments.js'; +import { addExamples, exampleOracle, exampleOracleQuery } from '../utils/helpers.js'; const program = new Command().name('aecli oracle'); -// ## Initialize `options` -const addCommonOptions = (p) => p - .addOption(nodeOption) - .addOption(ttlOption(true)) - .addOption(feeOption) - .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') - .addOption(passwordOption) - .addOption(forceOption) - .addOption(jsonOption); - -// ## Initialize `create` command -// -// You can use this command to `create` Oracle -// -// Example: `aecli oracle create ./wallet.json string string` -// -// You can use `--ttl` to pre-set transaction `time to leave` -addCommonOptions(program - .command('create ') +const addCommonOptions = (cmd, example) => { + cmd + .addOption(nodeOption) + .addOption(forceOption) + .addOption(jsonOption); + const summary = cmd.summary(); + cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); + addExamples(program.name(), cmd, [example]); +}; + +let command = program.command('get ') + .summary('print oracle details') + .action(Oracle.queryOracle); +addCommonOptions(command, exampleOracle); + +const addTxOptions = (cmd, example) => { + cmd + .addOption(passwordOption) + .addOption(ttlOption(true)) + .addOption(feeOption) + .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with'); + addCommonOptions(cmd, example); +}; + +command = program.command('create ') .option('--oracleTtl [oracleTtl]', 'Relative oracle time to leave', ORACLE_TTL.value) .option('--queryFee [queryFee]', 'Oracle query fee', 0) - .description('Register Oracle') - .action(Oracle.createOracle)); + .summary('register current account as oracle') + .action(Oracle.createOracle); +addTxOptions(command, './wallet.json string string'); -// ## Initialize `extend oracle` command -// -// You can use this command to `extend` Oracle time to leave -// -// Example: `aecli oracle extend ./wallet.json ok_12dasdgfa32fasf 200` -// -// You can use `--ttl` to pre-set transaction `time to leave` -addCommonOptions(program - .command('extend ') - .description('Extend Oracle') - .action(Oracle.extendOracle)); +command = program.command('extend ') + .summary('extend oracle\'s time to leave') + .action(Oracle.extendOracle); +addTxOptions(command, './wallet.json 200'); -// ## Initialize `create oracle query` command -// -// You can use this command to `create` an Oracle Query -// -// Example: `aecli oracle create-query ./wallet.json ok_123asdasd... WhatTheWeatherIs?` -// -// You can use `--ttl` to pre-set transaction `time to leave` -addCommonOptions(program - .command('create-query ') +command = program.command('create-query ') .option('--responseTtl [responseTtl]', 'Relative query response time to leave', RESPONSE_TTL.value) .option('--queryTtl [queryTtl]', 'Relative query time to leave', QUERY_TTL.value) .option('--queryFee [queryFee]', 'Oracle query fee', 0) - .description('Create Oracle query') - .action(Oracle.createOracleQuery)); + .summary('create an oracle query') + .action(Oracle.createOracleQuery); +addTxOptions(command, `./wallet.json ${exampleOracle} WhatTheWeatherIs?`); -// ## Initialize `respond query` command -// -// You can use this command to `respond` to Oracle Query -// -// Example: `aecli oracle respondQuery ./wallet.json ok_12313... oq_12efdsafa... +16Degree` -// -// You can use `--ttl` to pre-set transaction `time to leave` -addCommonOptions(program - .command('respond-query ') +command = program.command('respond-query ') .option('--responseTtl [responseTtl]', 'Query response time to leave', RESPONSE_TTL.value) - .description('Respond to Oracle Query') - .action(Oracle.respondToQuery)); - -// ## Initialize `get oracle` command -// -// You can use this command to `get` an Oracle -// -// Example: `aecli oracle respondQuery ./wallet.json ok_12313... oq_12efdsafa... +16Degree` -// -// You can use `--ttl` to pre-set transaction `time to leave` -addCommonOptions(program - .command('get ') - .description('Get Oracle') - .action(Oracle.queryOracle)); + .summary('respond to an oracle query') + .action(Oracle.respondToQuery); +addTxOptions(command, `./wallet.json ${exampleOracleQuery} +16Degree`); export default program; diff --git a/src/commands/spend.js b/src/commands/spend.js index 64c760e9..d2a05ef6 100644 --- a/src/commands/spend.js +++ b/src/commands/spend.js @@ -11,14 +11,11 @@ import { passwordOption, ttlOption, } from '../arguments.js'; +import { addExamples, exampleAddress1, exampleName } from '../utils/helpers.js'; -export default new Command('aecli spend') +const command = new Command('aecli spend') + .summary('sends coins to another account or contract') .description('Sends coins to another account or contract.') - .addHelpText('after', ` -Example call: - $ aecli spend ./wallet.json ak_2GN72... 100 - $ aecli spend ./wallet.json aens-name.chain 1.23ae - $ aecli spend ./wallet.json ak_2GN72... 20% --ttl 20`) .argument('', 'A path to wallet file') .argument('', 'Address or name of recipient account') .argument( @@ -56,3 +53,11 @@ Example call: if (!json) print('Transaction mined'); await printTransaction(tx, json, sdk); }); + +addExamples('', command, [ + `./wallet.json ${exampleAddress1} 100`, + `./wallet.json ${exampleName} 1.23ae`, + `./wallet.json ${exampleAddress1} 20% --ttl 20`, +]); + +export default command; diff --git a/src/commands/tx.js b/src/commands/tx.js index af7fb564..f11685bf 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -14,15 +14,15 @@ import { amountOption, coinAmountParser, } from '../arguments.js'; +import { + addExamples, exampleAddress1, exampleAddress2, exampleContract, exampleOracle, exampleOracleQuery, + exampleName, exampleCalldata, +} from '../utils/helpers.js'; const program = new Command() .name('aecli tx') .description('Generates transactions to sign and submit manually. Useful for offline signing.'); -const addExamples = (cmd, examples) => cmd.addHelpText('after', ` -Example call: -${examples.map((e) => ` $ ${program.name()} ${cmd.name()} ${e}`).join('\n')}`); - const addTxBuilderOptions = (cmd, example) => { cmd .addArgument( @@ -34,17 +34,9 @@ const addTxBuilderOptions = (cmd, example) => { .addOption(jsonOption) .summary(`build ${cmd.name().replaceAll('-', ' ')} transaction`) .description(`Build ${cmd.name().replaceAll('-', ' ')} transaction.`); - addExamples(cmd, [example]); + addExamples(program.name(), cmd, [example]); }; -const exampleAddress1 = 'ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi'; -const exampleAddress2 = 'ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT'; -const exampleContract = 'ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh'; -const exampleOracle = 'ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi'; -const exampleOracleQuery = 'oq_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh'; -const exampleName = 'example-name.chain'; -const exampleCalldata = 'cb_DA6sWJo='; - let command; command = program.command('spend ') @@ -123,6 +115,6 @@ command = program .summary('verify transaction using node') .description('Verify transaction using node.') .action(Transaction.verify); -addExamples(command, ['tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57']); +addExamples(program.name(), command, ['tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57']); export default program; diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 69910c4a..a43d06ef 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -1,15 +1,20 @@ -// # Utils `helpers` Module -// That script contains base helper function - import BigNumber from 'bignumber.js'; import { resolve } from 'path'; import { Encoding, decode as _decode, produceNameId } from '@aeternity/aepp-sdk'; import CliError from './CliError.js'; -// ## Method which retrieve block info by hash -// if it's `MICRO_BLOCK` call `getMicroBlockHeaderByHash` and `getMicroBlockTransactionsByHash` -// -// if it's `BLOCK` call `getKeyBlockByHash` +export const exampleAddress1 = 'ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi'; +export const exampleAddress2 = 'ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT'; +export const exampleContract = 'ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh'; +export const exampleOracle = 'ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi'; +export const exampleOracleQuery = 'oq_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh'; +export const exampleName = 'example-name.chain'; +export const exampleCalldata = 'cb_DA6sWJo='; + +export const addExamples = (prefix, command, examples) => command.addHelpText('after', ` +Example call: +${examples.map((e) => ` $ ${prefix ? `${prefix} ` : ''}${command.name()} ${e}`).join('\n')}`); + export async function getBlock(hash, sdk) { const type = hash.split('_')[0]; switch (type) { @@ -25,14 +30,12 @@ export async function getBlock(hash, sdk) { } } -// ## Method which validate `hash` // TODO: move to sdk side (combine with decode) export function checkPref(hash, hashType) { if (hash.length < 3 || hash.indexOf('_') === -1) { throw new CliError('Invalid input, likely you forgot to escape the $ sign (use \\_)'); } - /* block and micro block check */ if (Array.isArray(hashType)) { const res = hashType.find((ht) => hash.startsWith(`${ht}_`)); if (res) return; @@ -48,9 +51,6 @@ export function checkPref(hash, hashType) { } } -// ## AENS helpers methods - -// Get `name` entry export async function getNameEntry(nameAsString, sdk) { const handle404 = (error) => { if (error.response?.status === 404) return undefined; @@ -67,7 +67,6 @@ export async function getNameEntry(nameAsString, sdk) { }; } -// Validate `name` export function validateName(name) { if (typeof name !== 'string') throw new CliError('Name must be a string'); if (!name.endsWith('.chain')) throw new CliError(`Name should end with .chain: ${name}`); diff --git a/test/oracle.js b/test/oracle.js index 8d1282f4..12d7b27d 100644 --- a/test/oracle.js +++ b/test/oracle.js @@ -32,7 +32,7 @@ describe('Oracle Module', () => { it('Oracle extend', async () => { const oracle = await sdk.getOracleObject(oracleId); const oracleExtend = await executeOracle([ - 'extend', WALLET_NAME, '--password', 'test', oracleId, 42, '--json', + 'extend', WALLET_NAME, '--password', 'test', 42, '--json', ]); oracleExtend.blockHeight.should.be.gt(0); expect(oracleExtend.ttl).to.be.equal(oracle.ttl + 42); @@ -55,7 +55,7 @@ describe('Oracle Module', () => { it('Oracle respond to query', async () => { const oracleQueryResponse = await executeOracle([ - 'respond-query', WALLET_NAME, '--password', 'test', oracleId, queryId, 'Hi!', '--json', + 'respond-query', WALLET_NAME, '--password', 'test', queryId, 'Hi!', '--json', '--responseTtl', 21, ]); expect(oracleQueryResponse.queries[0].ttl).to.be.equal(oracleQueryResponse.blockHeight + 21); @@ -65,7 +65,7 @@ describe('Oracle Module', () => { query.decodedResponse.should.be.equal('Hi!'); }); - it('Get non existed Oracle', async () => { + it('Get non existing Oracle', async () => { const fakeOracleId = generateKeyPair().publicKey.replace('ak_', 'ok_'); await executeOracle(['get', fakeOracleId, '--json']) .should.be.rejectedWith('error: Oracle not found'); @@ -73,7 +73,7 @@ describe('Oracle Module', () => { .should.be.rejectedWith('Encoded string have a wrong type: oq (expected: ok)'); }); - it('Get existed Oracle', async () => { + it('Get Oracle', async () => { const resJson = await executeOracle(['get', oracleId, '--json']); expect(resJson).to.eql({ abiVersion: AbiVersion.NoAbi.toString(), From 70b46c2b97de4004d9aef743f82b753c66cc12db Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Fri, 12 Apr 2024 21:54:31 +1000 Subject: [PATCH 70/88] fix(aens): handle revoked names, refactor docs --- src/actions/aens.js | 66 +-------------- src/arguments.js | 5 +- src/commands/main.js | 2 +- src/commands/name.js | 197 +++++++++++++++++++------------------------ src/commands/tx.js | 5 +- src/utils/helpers.js | 24 +++--- test/name.js | 13 ++- 7 files changed, 124 insertions(+), 188 deletions(-) diff --git a/src/actions/aens.js b/src/actions/aens.js index 3b1ba3f6..c968918f 100644 --- a/src/actions/aens.js +++ b/src/actions/aens.js @@ -1,7 +1,3 @@ -// # æternity CLI `AENS` file -// -// This script initialize all `AENS` function - import { isAddressValid, getDefaultPointerKey } from '@aeternity/aepp-sdk'; import { initSdkByWalletFile } from '../utils/cli.js'; import { printTransaction } from '../utils/print.js'; @@ -15,61 +11,39 @@ async function ensureNameStatus(name, sdk, status, operation) { } } -// ## Claim `name` function export async function preClaim(walletPath, name, options) { const { ttl, fee, nonce, json, } = options; - - // Validate `name`(check if `name` end on `.chain`) - // validateName(name) - + validateName(name); const sdk = await initSdkByWalletFile(walletPath, options); - - // Check if that `name' available await ensureNameStatus(name, sdk, 'AVAILABLE', 'preclaimed'); - // Create `pre-claim` transaction const preClaimTx = await sdk.aensPreclaim(name, { ttl, fee, nonce }); await printTransaction(preClaimTx, json, sdk); } -// ## Claim `name` function export async function claim(walletPath, name, salt, options) { const { ttl, fee, nonce, json, nameFee, } = options; - // Validate `name` - // validateName(name) - + validateName(name); const sdk = await initSdkByWalletFile(walletPath, options); - - // Check if that `name' available await ensureNameStatus(name, sdk, 'AVAILABLE', 'claimed'); - - // Wait for next block and create `claimName` transaction const claimTx = await sdk.aensClaim(name, salt, { nonce, ttl, fee, nameFee, }); await printTransaction(claimTx, json, sdk); } -// ##Update `name` function export async function updateName(walletPath, name, addresses, options) { const { ttl, fee, nonce, json, nameTtl, clientTtl, extendPointers = false, } = options; - - // Validate `address` const invalidAddresses = addresses.filter((address) => !isAddressValid(address)); if (invalidAddresses.length) throw new CliError(`Addresses "[${invalidAddresses}]" is not valid`); - // Validate `name` validateName(name); const sdk = await initSdkByWalletFile(walletPath, options); - - // Check if that `name` is unavailable and we can update it await ensureNameStatus(name, sdk, 'CLAIMED', 'updated'); - - // Create `updateName` transaction const updateTx = await sdk.aensUpdate( name, Object.fromEntries(addresses.map((address) => [getDefaultPointerKey(address), address])), @@ -80,60 +54,38 @@ export async function updateName(walletPath, name, addresses, options) { await printTransaction(updateTx, json, sdk); } -// ##Extend `name` ttl function export async function extendName(walletPath, name, nameTtl, options) { const { ttl, fee, nonce, json, } = options; - - // Validate `name` validateName(name); const sdk = await initSdkByWalletFile(walletPath, options); - - // Check if that `name` is unavailable and we can update it await ensureNameStatus(name, sdk, 'CLAIMED', 'extended'); - - // Create `updateName` transaction const updateTx = await sdk.aensUpdate(name, {}, { ttl, fee, nonce, nameTtl, extendPointers: true, }); await printTransaction(updateTx, json, sdk); } -// ##Transfer `name` function export async function transferName(walletPath, name, address, options) { const { ttl, fee, nonce, json, } = options; - - // Validate `address` if (!isAddressValid(address)) throw new CliError(`Address "${address}" is not valid`); - // Validate `name` validateName(name); const sdk = await initSdkByWalletFile(walletPath, options); - - // Check if that `name` is unavailable and we can transfer it await ensureNameStatus(name, sdk, 'CLAIMED', 'transferred'); - - // Create `transferName` transaction const transferTX = await sdk.aensTransfer(name, address, { ttl, fee, nonce }); await printTransaction(transferTX, json, sdk); } -// ## Revoke `name` function export async function revokeName(walletPath, name, options) { const { ttl, fee, nonce, json, } = options; - - // Validate `name` validateName(name); const sdk = await initSdkByWalletFile(walletPath, options); - - // Check if `name` is unavailable and we can revoke it await ensureNameStatus(name, sdk, 'CLAIMED', 'revoked'); - - // Create `revokeName` transaction const revokeTx = await sdk.aensRevoke(name, { ttl, fee, nonce }); await printTransaction(revokeTx, json, sdk); } @@ -142,15 +94,9 @@ export async function nameBid(walletPath, name, nameFee, options) { const { ttl, fee, nonce, json, } = options; - // Validate `name` validateName(name); - const sdk = await initSdkByWalletFile(walletPath, options); - - // Check if that `name' available await ensureNameStatus(name, sdk, 'AUCTION', 'bidded'); - - // Wait for next block and create `claimName` transaction const nameBidTx = await sdk.aensBid(name, nameFee, { nonce, ttl, fee }); await printTransaction(nameBidTx, json, sdk); } @@ -161,19 +107,16 @@ export async function fullClaim(walletPath, name, options) { } = options; validateName(name); if (name.split('.')[0] < 13) throw new CliError('Full name claiming works only with name longer then 12 symbol (not trigger auction)'); - const sdk = await initSdkByWalletFile(walletPath, options); - - // Check if that `name' available await ensureNameStatus(name, sdk, 'AVAILABLE', 'claimed'); - - // Wait for next block and create `claimName` transaction nonce = nonce && +nonce; const preclaim = await sdk.aensPreclaim(name, { nonce, ttl, fee }); + nonce = nonce && nonce + 1; const nameInstance = await preclaim.claim({ nonce, ttl, fee, nameFee, }); + nonce = nonce && nonce + 1; const updateTx = await nameInstance.update( { account_pubkey: sdk.address }, @@ -181,6 +124,5 @@ export async function fullClaim(walletPath, name, options) { nonce, ttl, fee, nameTtl, clientTtl, }, ); - await printTransaction(updateTx, json, sdk); } diff --git a/src/arguments.js b/src/arguments.js index 6e94fff6..1305d424 100644 --- a/src/arguments.js +++ b/src/arguments.js @@ -1,6 +1,6 @@ import { Option } from 'commander'; import BigNumber from 'bignumber.js'; -import { MIN_GAS_PRICE } from '@aeternity/aepp-sdk'; +import { MIN_GAS_PRICE, CLIENT_TTL } from '@aeternity/aepp-sdk'; import { noValue } from './utils/default-option-description.js'; export const coinAmountParser = (amount) => { @@ -40,3 +40,6 @@ export const ttlOption = (usingNode) => new Option('-T, --ttl [ttl]', 'Validity .default(noValue, usingNode ? 3 : 0); export const networkIdOption = new Option('--networkId [networkId]', 'Network id'); + +export const clientTtlOption = new Option('--clientTtl [clientTtl]', 'a suggestion measured in seconds on how long clients should cache name pointers') + .default(CLIENT_TTL, '1 hour'); diff --git a/src/commands/main.js b/src/commands/main.js index 200e9b94..aef3d4c4 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -17,7 +17,7 @@ const EXECUTABLE_CMD = [ { name: 'inspect', desc: 'Get information on transactions, blocks,...' }, { name: 'account', desc: 'Handle wallet operations' }, { name: 'contract', desc: 'Contract interactions' }, - { name: 'name', desc: 'AENS system' }, + { name: 'name', desc: 'manage AENS names' }, { name: 'tx', desc: 'Generates transactions to sign and submit manually' }, { name: 'oracle', desc: 'Interact with oracles' }, { name: 'spend', desc: 'Send coins to account or contract' }, diff --git a/src/commands/name.js b/src/commands/name.js index da3198c9..c9dfba08 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -1,131 +1,108 @@ -// # æternity CLI `name` file -// -// This script initialize all `name` commands -// We'll use `commander` for parsing options -// -// Also we need `esm` package to handle `ES imports` import { Command } from 'commander'; -import { NAME_TTL, CLIENT_TTL } from '@aeternity/aepp-sdk'; +import { NAME_TTL } from '@aeternity/aepp-sdk'; import * as AENS from '../actions/aens.js'; import { - nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, + nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, coinAmountParser, + clientTtlOption, } from '../arguments.js'; +import { + addExamples, exampleAddress1, exampleContract, exampleName, +} from '../utils/helpers.js'; const program = new Command().name('aecli name'); -// ## Initialize `options` -const addCommonOptions = (p) => p - .addOption(nodeOption) - .addOption(ttlOption(true)) - .addOption(feeOption) - .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') - .addOption(passwordOption) - .addOption(forceOption) - .addOption(jsonOption); +const addCommonOptions = (cmd, example) => { + cmd + .addOption(nodeOption) + .addOption(ttlOption(true)) + .addOption(feeOption) + .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') + .addOption(passwordOption) + .addOption(forceOption) + .addOption(jsonOption); + if (!cmd.description()) { + const summary = cmd.summary(); + cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); + } + addExamples(program.name(), cmd, [example]); +}; + +const claimingGuide = [ + 'A name in arguments should end with ".chain". Be careful, shorter names are more expensive.', + 'If the name is shorter than 13 characters (without ".chain") then it won\'t be claimed immediately', + 'but would start an auction instead.', +].join(' '); -// ## Initialize `claim` command -// -// You can use this command to `claim` AENS name. Name must end on `.chain`. -// -// Example: `aecli name claim ./wallet.json testname.chain` -// -// This command send `pre-claim` transaction, wait until one block was mined, after that sent `claim` and `update` transaction's -// -// You can use `--nameTtl` and `--ttl` to pre-set transaction and name `time to leave` -addCommonOptions(program - .command('full-claim ') - .option('--nameFee [nameFee]', 'Amount of coins to pay for name') +let command = program.command('full-claim ') + .option('--nameFee [nameFee]', 'Amount of coins to pay for name', coinAmountParser) .option('--nameTtl [nameTtl]', 'Validity of name.', NAME_TTL) - .option('--clientTtl [clientTtl]', 'Client ttl.', CLIENT_TTL) - .description('Claim an AENS name') - .action(AENS.fullClaim)); + .addOption(clientTtlOption) + .summary('claim an AENS name in a single command') + .description([ + 'Claim an AENS name in a single command.', + 'This command signs and sends a pre-claim transaction and waits until one block gets mined.', + 'After that, it sends a claim transaction. At the end, the update transaction is', + 'submitted, making a name point to the current account.', + `\n\n${claimingGuide}`, + ].join(' ')) + .action(AENS.fullClaim); +addCommonOptions(command, `./wallet.json ${exampleName}`); -// ## Initialize `pre-claim` command -// -// You can use this command to `pre-claim` AENS name -// -// Example: `aecli name pre-claim ./wallet.json testname.chain` -// -// This command build and send `pre-claim` transaction. -// -// You can use `--ttl` to pre-set transaction `time to leave` -addCommonOptions(program - .command('pre-claim ') - .description('Pre-Claim an AENS name') - .action(AENS.preClaim)); +// TODO: consider keeping only full-claim +command = program.command('pre-claim ') + .summary('pre-claim an AENS name') + .description([ + 'Pre-claim an AENS name. The name should be claimed after one key block since the pre-claim gets mined.', + 'This command sends a pre-claim transaction,', + 'and outputs a salt that needs to be provided to `aecli name claim`.', + `\n\n${claimingGuide}`, + ].join(' ')) + .action(AENS.preClaim); +addCommonOptions(command, `./wallet.json ${exampleName}`); -// ## Initialize `claim` command -// -// You can use this command to `claim` AENS name. Name must end on `.chain`. -// -// Example: `aecli name claim ./wallet.json testname.chain` -// -// This command send `pre-claim` transaction, wait until one block was mined, after that sent `claim` and `update` transaction's -// -// You can use `--nameTtl` and `--ttl` to pre-set transaction and name `time to leave` -addCommonOptions(program - .command('claim ') - .option('--nameFee [nameFee]', 'Amount of coins to pay for name') - .description('Claim an AENS name') - .action(AENS.claim)); +command = program.command('claim ') + .option('--nameFee [nameFee]', 'Amount of coins to pay for name', coinAmountParser) + .summary('claim an AENS name (requires pre-claim)') + .description([ + 'Claim an AENS name, it requires a salt provided by `aecli name pre-claim`.', + `\n\n${claimingGuide}`, + ].join(' ')) + .action(AENS.claim); +addCommonOptions(command, `./wallet.json ${exampleName} 12327389123`); -// ## Initialize `claim` command -// -// You can use this command to `claim` AENS name. Name must end on `.chain`. -// -// Example: `aecli name claim ./wallet.json testname.chain` -// -// This command send `pre-claim` transaction, wait until one block was mined, after that sent `claim` and `update` transaction's -// -// You can use `--nameTtl` and `--ttl` to pre-set transaction and name `time to leave` -addCommonOptions(program - .command('bid ') - .description('Bid on name') - .action(AENS.nameBid)); +command = program.command('bid ') + .argument('', 'Amount of coins to pay for name', coinAmountParser) + .summary('bid on name in auction') + .action(AENS.nameBid); +addCommonOptions(command, `./wallet.json ${exampleName} 4.2ae`); -// ## Initialize `update` command -// -// You can use this command to `update` pointer of AENS name. -// -// Example: `aecli name update ./wallet.json testname.chain ak_qwe23dffasfgdesag323` -addCommonOptions(program - .command('update [addresses...]') +command = program.command('update [addresses...]') .option('--extendPointers', 'Extend pointers', false) .option('--nameTtl [nameTtl]', 'A number of blocks until name expires', NAME_TTL) - .option('--clientTtl [clientTtl]', 'Client TTL', CLIENT_TTL) - .description('Update a name pointer') - .action(AENS.updateName)); + .addOption(clientTtlOption) + .summary('update a name pointer') + .action(AENS.updateName); +addCommonOptions(command, `./wallet.json ${exampleName} ${exampleContract}`); -// ## Initialize `extend` command -// -// You can use this command to `extend` ttl of AENS name. -// -// Example: `aecli name extend ./wallet.json testname.chain 100` -addCommonOptions(program - .command('extend ') +command = program.command('extend ') .argument('[nameTtl]', 'A number of blocks until name expires', NAME_TTL) - .option('--clientTtl [clientTtl]', 'Client TTL', CLIENT_TTL) - .description('Extend name ttl') - .action(AENS.extendName)); + .addOption(clientTtlOption) + .summary('extend name TTL') + .action(AENS.extendName); +addCommonOptions(command, `./wallet.json ${exampleName} 180000`); -// ## Initialize `revoke` command -// -// You can use this command to `destroy` AENS name. -// -// Example: `aecli name revoke ./wallet.json testname.chain` -addCommonOptions(program - .command('revoke ') - .description('Revoke an AENS name') - .action(AENS.revokeName)); +command = program.command('revoke ') + .summary('revoke an AENS name') + .description([ + 'Revoke an AENS name. After that nobody will be able to claim it again.', + 'This action is irreversible!', + ].join(' ')) + .action(AENS.revokeName); +addCommonOptions(command, `./wallet.json ${exampleName}`); -// ## Initialize `transfer` command -// -// You can use this command to `transfer` AENS name to another account. -// -// Example: `aecli name transfer ./wallet.json testname.chain ak_qqwemjgflewgkj349gjdslksd` -addCommonOptions(program - .command('transfer
') - .description('Transfer a name to another account') - .action(AENS.transferName)); +command = program.command('transfer
') + .summary('transfer a name to another account') + .action(AENS.transferName); +addCommonOptions(command, `./wallet.json ${exampleName} ${exampleAddress1}`); export default program; diff --git a/src/commands/tx.js b/src/commands/tx.js index f11685bf..b2b1785a 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -1,6 +1,6 @@ import { Command, Argument } from 'commander'; import { - NAME_TTL, CLIENT_TTL, ORACLE_TTL, QUERY_TTL, RESPONSE_TTL, + NAME_TTL, ORACLE_TTL, QUERY_TTL, RESPONSE_TTL, } from '@aeternity/aepp-sdk'; import * as Transaction from '../actions/transaction.js'; import { @@ -13,6 +13,7 @@ import { ttlOption, amountOption, coinAmountParser, + clientTtlOption, } from '../arguments.js'; import { addExamples, exampleAddress1, exampleAddress2, exampleContract, exampleOracle, exampleOracleQuery, @@ -56,7 +57,7 @@ addTxBuilderOptions(command, `${exampleAddress1} 12327389123 ${exampleName} 42`) command = program.command('name-update ') .option('--nameTtl [nameTtl]', 'Validity of name', NAME_TTL) - .option('--clientTtl [clientTtl]', 'Client TTL', CLIENT_TTL) + .addOption(clientTtlOption) .action(Transaction.nameUpdate); addTxBuilderOptions(command, `${exampleAddress1} ${exampleName} 42 ${exampleContract}`); command.argument('[pointers...]'); diff --git a/src/utils/helpers.js b/src/utils/helpers.js index a43d06ef..b8e70dbc 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -52,19 +52,21 @@ export function checkPref(hash, hashType) { } export async function getNameEntry(nameAsString, sdk) { - const handle404 = (error) => { - if (error.response?.status === 404) return undefined; - throw error; - }; const [name, auction] = await Promise.all([ - sdk.api.getNameEntryByName(nameAsString).catch(handle404), - sdk.api.getAuctionEntryByName(nameAsString).catch(handle404), + sdk.api.getNameEntryByName(nameAsString).catch((error) => { + if (error.response?.status === 404) { + return error.response.parsedBody?.reason === 'Name revoked' ? 'REVOKED' : 'AVAILABLE'; + } + throw error; + }), + sdk.api.getAuctionEntryByName(nameAsString).catch((error) => { + if (error.response?.status === 404) return undefined; + throw error; + }), ]); - return { - id: produceNameId(nameAsString), - ...name ?? auction, - status: (name && 'CLAIMED') || (auction && 'AUCTION') || 'AVAILABLE', - }; + if (auction) return { ...auction, status: 'AUCTION' }; + if (typeof name === 'object') return { ...name, status: 'CLAIMED' }; + return { id: produceNameId(nameAsString), status: name }; } export function validateName(name) { diff --git a/test/name.js b/test/name.js index 3d7bc6d5..3032e5b7 100644 --- a/test/name.js +++ b/test/name.js @@ -205,7 +205,18 @@ describe('AENS Module', () => { const nameResult = await executeInspect([name2, '--json']); revoke.blockHeight.should.be.gt(0); - nameResult.status.should.equal('AVAILABLE'); + nameResult.status.should.equal('REVOKED'); + }); + + it('can\'t claim revoked name', async () => { + await executeName([ + 'pre-claim', + WALLET_NAME, + '--password', + 'test', + name2, + '--json', + ]).should.be.rejectedWith('AENS name is REVOKED and cannot be preclaimed'); }); describe('Name Auction', () => { From a66c0fde6a4287656ef033d7641ef44e7a899d97 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 13 Apr 2024 10:23:57 +1000 Subject: [PATCH 71/88] docs: improve `inspect` help --- src/actions/inspect.js | 16 ----------- src/commands/inspect.js | 60 +++++++++++++++++++++-------------------- src/commands/main.js | 2 +- src/commands/tx.js | 4 +-- src/utils/helpers.js | 1 + 5 files changed, 35 insertions(+), 48 deletions(-) diff --git a/src/actions/inspect.js b/src/actions/inspect.js index 0e422fb9..224e5d19 100644 --- a/src/actions/inspect.js +++ b/src/actions/inspect.js @@ -1,7 +1,3 @@ -// # æternity CLI `inspect` file -// -// This script initialize all `inspect` function - import { Encoding, unpackTx as _unpackTx, Tag } from '@aeternity/aepp-sdk'; import { initSdk } from '../utils/cli.js'; import { @@ -15,13 +11,11 @@ import { import { checkPref, getBlock, getNameEntry, formatCoins, formatTtl, validateName, } from '../utils/helpers.js'; -import CliError from '../utils/CliError.js'; function printEntries(object) { Object.entries(object).forEach((entry) => printUnderscored(...entry)); } -// ## Inspect helper function's async function getBlockByHash(hash, { json, ...options }) { checkPref(hash, [Encoding.KeyBlockHash, Encoding.MicroBlockHash]); const sdk = initSdk(options); @@ -122,12 +116,7 @@ async function getOracle(oracleId, { json, ...options }) { if (oracle.queries) printQueries(oracle.queries); } -// ## Inspect function -// That function get the param(`hash`, `height` or `name`) and show you info about it export default async function inspect(hash, option) { - if (!hash) throw new CliError('Hash argument is required'); - - // Get `block` by `height` if (!isNaN(hash)) { await getBlockByHeight(hash, option); return; @@ -135,30 +124,25 @@ export default async function inspect(hash, option) { const [pref] = hash.split('_'); switch (pref) { - // Get `block` or `micro_block` by `hash` case Encoding.KeyBlockHash: case Encoding.MicroBlockHash: await getBlockByHash(hash, option); break; - // Get `account` by `hash` case Encoding.AccountAddress: await getAccountByHash(hash, option); break; - // Get `transaction` by `hash` case Encoding.TxHash: await getTransactionByHash(hash, option); break; case Encoding.Transaction: await unpackTx(hash, option); break; - // Get `contract` by `contractId` case Encoding.ContractAddress: await getContract(hash, option); break; case Encoding.OracleAddress: await getOracle(hash, option); break; - // Get `name` default: await getName(hash, option); break; diff --git a/src/commands/inspect.js b/src/commands/inspect.js index f7543d5e..a9c4e84c 100644 --- a/src/commands/inspect.js +++ b/src/commands/inspect.js @@ -1,37 +1,39 @@ -// # æternity CLI `inspect` file -// -// This script initialize all `inspect` commands -// We'll use `commander` for parsing options import { Command } from 'commander'; import inspect from '../actions/inspect.js'; import { nodeOption, jsonOption, forceOption } from '../arguments.js'; +import { + addExamples, exampleAddress1, exampleContract, exampleName, exampleOracle, exampleTransaction, +} from '../utils/helpers.js'; -const program = new Command().name('aecli inspect'); - -// ## Initialize `options` -const addCommonOptions = (p) => p +const command = new Command().name('aecli inspect') + .arguments('') + .description([ + 'Prints details of:', + ...[ + 'account (ak_-prefixed string)', + 'name (string ending with \'.chain\')', + 'contract (ct_-prefixed string)', + 'oracle (ok_-prefixed string)', + 'keyblock or microblock (prefixed with kh_, mh_)', + 'keyblock by height (integer)', + 'transaction (by th_-string or tx_)', + ].map((el, i, arr) => ` - ${el}${arr.length === i + 1 ? '.' : ','}`), + ].join('\n')) .addOption(nodeOption) .addOption(forceOption) - .addOption(jsonOption); + .addOption(jsonOption) + .action(inspect); -// ## Initialize `inspect` command -// -// You can use this command to get info about account, block, transaction or name -// -// Example: `aecli inspect testName.chain` --> get info about AENS `name` -// -// Example: `aecli inspect ak_134defawsgf34gfq4f` --> get info about `account` -// -// Example: `aecli inspect kh_134defawsgf34gfq4f` --> get info about `key block` by block `hash` -// -// Example: `aecli inspect mh_134defawsgf34gfq4f` --> get info about `micro block` by block `hash` -// -// Example: `aecli inspect 1234` --> get info about `block` by block `height` -// -// Example: `aecli inspect th_asfwegfj34234t34t` --> get info about `transaction` by transaction `hash` -addCommonOptions(program - .arguments('') - .description('Hash or Name to inspect (eg: ak_..., mk_..., name.chain)') - .action(inspect)); +addExamples('', command, [ + `${exampleAddress1} # get account details`, + `${exampleName} # get details of AENS name`, + `${exampleContract} # get contract details`, + `${exampleOracle} # get contract details`, + 'kh_CF37tA4KiiZTFqbQ6JFCU7kDt6CBZucBrvineVUGC7svA9vK7 # get key block details by hash', + 'mh_k1K9gLLtdikJhCdKfBbhYGveQs7osSNwceEJZb1jD6AmraNdr # get micro block details by hash', + '929796 # get key block details by height', + 'th_2nZshewM7FtKSsDEP4zXPsGCe9cdxaFTRrcNjJyE22ktjGidZR # get transaction details by hash', + `${exampleTransaction} # get transaction details`, +]); -export default program; +export default command; diff --git a/src/commands/main.js b/src/commands/main.js index aef3d4c4..2fdcd0d3 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -14,7 +14,7 @@ const program = new Command(); const EXECUTABLE_CMD = [ { name: 'chain', desc: 'Interact with the blockchain' }, - { name: 'inspect', desc: 'Get information on transactions, blocks,...' }, + { name: 'inspect', desc: 'get details of a node entity' }, { name: 'account', desc: 'Handle wallet operations' }, { name: 'contract', desc: 'Contract interactions' }, { name: 'name', desc: 'manage AENS names' }, diff --git a/src/commands/tx.js b/src/commands/tx.js index b2b1785a..fbb8cae0 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -17,7 +17,7 @@ import { } from '../arguments.js'; import { addExamples, exampleAddress1, exampleAddress2, exampleContract, exampleOracle, exampleOracleQuery, - exampleName, exampleCalldata, + exampleName, exampleCalldata, exampleTransaction, } from '../utils/helpers.js'; const program = new Command() @@ -116,6 +116,6 @@ command = program .summary('verify transaction using node') .description('Verify transaction using node.') .action(Transaction.verify); -addExamples(program.name(), command, ['tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57']); +addExamples(program.name(), command, [exampleTransaction]); export default program; diff --git a/src/utils/helpers.js b/src/utils/helpers.js index b8e70dbc..0af8b33c 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -8,6 +8,7 @@ export const exampleAddress2 = 'ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUD export const exampleContract = 'ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh'; export const exampleOracle = 'ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi'; export const exampleOracleQuery = 'oq_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh'; +export const exampleTransaction = 'tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57'; export const exampleName = 'example-name.chain'; export const exampleCalldata = 'cb_DA6sWJo='; From f4d5941bb409426b5bb1e3617fb05c52b894c22a Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 13 Apr 2024 12:50:06 +1000 Subject: [PATCH 72/88] docs(contract): improve help --- src/actions/contract.js | 19 ++--- src/commands/contract.js | 173 +++++++++++++++++++-------------------- src/commands/main.js | 2 +- test/index.js | 3 + 4 files changed, 91 insertions(+), 106 deletions(-) diff --git a/src/actions/contract.js b/src/actions/contract.js index 57a65953..ceec458f 100644 --- a/src/actions/contract.js +++ b/src/actions/contract.js @@ -1,7 +1,3 @@ -// # æternity CLI `contract` file -// -// This script initialize all `contract` function - import fs from 'fs-extra'; import { encode } from '@aeternity/aepp-sdk'; import { initSdk, initSdkByWalletFile } from '../utils/cli.js'; @@ -35,7 +31,6 @@ async function getContractParams({ }; } -// ## Function which compile your `source` code export async function compile(contractSource, options) { const sdk = initSdk(options); const contract = await sdk.initializeContract({ sourceCodePath: contractSource }); @@ -46,7 +41,9 @@ export async function compile(contractSource, options) { export async function encodeCalldata(fn, args, options) { const sdk = initSdk(options); - const contract = await sdk.initializeContract(await getContractParams(options, { dummyBytecode: true })); + const contractParams = await getContractParams(options, { dummyBytecode: true }); + delete contractParams.address; // TODO: remove after dropping Iris support + const contract = await sdk.initializeContract(contractParams); // eslint-disable-next-line no-underscore-dangle const calldata = contract._calldata.encode(contract._name, fn, args); if (options.json) print({ calldata }); @@ -65,13 +62,7 @@ export async function decodeCallResult(fn, calldata, options) { } } -// ## Function which `deploy` contract export async function deploy(walletPath, args, options) { - // Deploy a contract to the chain and create a deployment descriptor - // with the contract information that can be used to invoke the contract - // later on. The generated descriptor will be created in the same folder of the contract - // source file or at location provided in descrPath. Multiple deploy of the same contract - // file will generate different deploy descriptors. const sdk = await initSdkByWalletFile(walletPath, options); const contract = await sdk.initializeContract(await getContractParams(options, { descrMayNotExist: true })); const result = await contract.$deploy(args, options); @@ -94,10 +85,9 @@ export async function deploy(walletPath, args, options) { } } -// ## Function which `call` contract export async function call(fn, args, walletPath, options) { const { - callStatic, json, top, ttl, gas, nonce, amount, + callStatic, json, top, ttl, gas, gasPrice, nonce, amount, } = options; if (callStatic !== true && walletPath == null) { throw new CliError('wallet_path is required for on-chain calls'); @@ -107,6 +97,7 @@ export async function call(fn, args, walletPath, options) { const callResult = await contract.$call(fn, args, { ttl: ttl && +ttl, gas, + gasPrice, nonce: nonce && +nonce, callStatic, top, diff --git a/src/commands/contract.js b/src/commands/contract.js index 63428166..0d26a35f 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -1,7 +1,3 @@ -// # æternity CLI `contract` file -// -// This script initialize all `contract` command's -// We'll use `commander` for parsing options import { Argument, Option, Command } from 'commander'; import CliError from '../utils/CliError.js'; import * as Contract from '../actions/contract.js'; @@ -17,6 +13,7 @@ import { ttlOption, amountOption, } from '../arguments.js'; +import { addExamples, exampleContract } from '../utils/helpers.js'; const callArgs = new Argument('[args]', 'JSON-encoded arguments array of contract call') .argParser((argsText) => { @@ -32,114 +29,108 @@ const callArgs = new Argument('[args]', 'JSON-encoded arguments array of contrac .default([]); const descriptorPathOption = new Option('-d, --descrPath [descrPath]', 'Path to contract descriptor file'); +// TODO: remove "contract" prefix because it is clear in context const contractSourceFilenameOption = new Option('--contractSource [contractSource]', 'Contract source code file name'); const contractAciFilenameOption = new Option('--contractAci [contractAci]', 'Contract ACI file name'); const program = new Command().name('aecli contract'); -const addCommonOptions = (p) => p - .addOption(nodeOption) - .addOption(compilerOption) - .addOption(forceOption) - .addOption(jsonOption); +const exampleContractPath = './contract.aes'; +const exampleContractDescriptorPath = './contract.aes.deploy.229e.json'; +const exampleContractAciPath = './contract.json'; +const exampleCalldata = 'cb_DA6sWJo='; +const exampleFunction = 'sum'; +const exampleArgs = '\'[1, 2]\''; -// ## Initialize `compile` command -// -// You can use this command to compile your `contract` to `bytecode` -// -// Example: `aecli contract compile ./mycontract.contract` -addCommonOptions(program - .command('compile ') - .description('Compile a contract') - .action(Contract.compile)); +const addCompilerOptions = (cmd, examples) => { + cmd.addOption(compilerOption).addOption(forceOption).addOption(jsonOption); + if (!cmd.description()) { + const summary = cmd.summary(); + cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); + } + addExamples(program.name(), cmd, examples); +}; -// ## Initialize `encode-calldata` command -// -// You can use this command to prepare `callData` -// -// Example: `aecli contract encodeData ./mycontract.contract testFn 1 2` -addCommonOptions(program - .command('encode-calldata ') +let command = program.command('compile ') + .summary('compile a contract to get bytecode') + .action(Contract.compile); +addCompilerOptions(command, [exampleContractPath]); + +command = program.command('encode-calldata ') .addArgument(callArgs) .addOption(descriptorPathOption) .addOption(contractSourceFilenameOption) .addOption(contractAciFilenameOption) - .description('Encode contract calldata') - .action(Contract.encodeCalldata)); + .summary('encode calldata for contract call') + .action(Contract.encodeCalldata); +addCompilerOptions(command, [ + `--descrPath ${exampleContractDescriptorPath} ${exampleFunction} ${exampleArgs}`, + `--contractSource ${exampleContractPath} ${exampleFunction} ${exampleArgs}`, + `--contractAci ${exampleContractAciPath} ${exampleFunction} ${exampleArgs}`, +]); -// ## Initialize `decode-calldata` command -// -// You can use this command to decode contract calldata using source or bytecode -// -// Example bytecode: `aecli contract decodeCallData cb_asdasdasd... --code cb_asdasdasdasd....` -// Example source code: `aecli contract decodeCallData cb_asdasdasd... --sourcePath ./contractSource --fn someFunction` -addCommonOptions(program - .command('decode-call-result ') +command = program + .command('decode-call-result ') .addOption(descriptorPathOption) .addOption(contractSourceFilenameOption) .addOption(contractAciFilenameOption) - .description('Decode contract calldata') - .action(Contract.decodeCallResult)); + .summary('decode contract call result') + .action(Contract.decodeCallResult); +addCompilerOptions(command, [ + `--descrPath ${exampleContractDescriptorPath} test ${exampleCalldata}`, + `--contractSource ${exampleContractPath} test ${exampleCalldata}`, + `--contractAci ${exampleContractAciPath} test ${exampleCalldata}`, +]); + +const addCommonOptions = (cmd, examples) => { + cmd + .addOption(descriptorPathOption) + .addOption(contractSourceFilenameOption) + .addOption(contractAciFilenameOption) + .addOption(nodeOption) + .addOption(passwordOption) + .addOption(gasOption) + .addOption(gasPriceOption(true)) + .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') + .addOption(amountOption) + .addOption(feeOption) + .addOption(ttlOption(true)); + addCompilerOptions(cmd, examples); +}; -// ## Initialize `call` command -// -// You can use this command to execute a function's of contract -// -// Example: -// `aecli contract call ./wallet.json sumFunc '[1, 2]' --descrPath ./contractDescriptorFile.json ` --> Using descriptor file -// `aecli contract call ./wallet.json sumFunc '[1, 2]' --contractAddress ct_1dsf35423fdsg345g4wsdf35ty54234235 ` --> Using contract address -// -// Also you have ability to make `static` call using `--callStatic` flag -// Example: -// `aecli contract call ./wallet.json sumFunc '[1, 2]' --descrPath ./contractDescriptorFile.json --callStatic` --> Static call using descriptor -// `aecli contract call ./wallet.json sumFunc '[1, 2]' --contractAddress ct_1dsf35423fdsg345g4wsdf35ty54234235 --callStatic` --> Static call using contract address -// You can preset gas, nonce and ttl for that call. If not set use default. -// Example: `aecli contract call ./wallet.json sumFunc '[1, 2]' --descrPath ./contractDescriptorFile.json --gas 2222222 --nonce 4 --ttl 1243` -addCommonOptions(program - .command('call') +command = program.command('call') .argument('', 'Name of contract entrypoint to call') .addArgument(callArgs) - .argument('[wallet_path]', 'Path to secret storage file') - .addOption(descriptorPathOption) + .argument('[wallet_path]', 'Path to secret storage file, not needed to make a static call') .option('--contractAddress [contractAddress]', 'Contract address to call') - .addOption(contractSourceFilenameOption) - .addOption(contractAciFilenameOption) - .addOption(passwordOption) - .addOption(gasOption) - .option('-s, --callStatic', 'Call static') - .option('-t, --topHash', 'Hash of block to make call') - .addOption(amountOption) - .addOption(feeOption) - .addOption(ttlOption(true)) - .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') - .description('Execute a function of the contract') - .action(Contract.call)); + .option('-s, --callStatic', 'estimate the return value, without making a transaction on chain') + .addOption( + new Option('-t, --topHash', 'Hash of block to make call').implies({ callStatic: true }), + ) + .summary('execute a function of the contract') + .action(Contract.call); +addCommonOptions(command, [ + `./wallet.json ${exampleFunction} ${exampleArgs} --descrPath ${exampleContractDescriptorPath}`, + `./wallet.json ${exampleFunction} ${exampleArgs} --contractAddress ${exampleContract} --callStatic`, + `./wallet.json ${exampleFunction} ${exampleArgs} --descrPath ${exampleContractDescriptorPath} --gas 2222222 --nonce 4 --ttl 1243`, +]); -// -// ## Initialize `deploy` command -// -// You can use this command to deploy contract on the chain -// -// Example: `aecli contract deploy ./wallet.json ./contractSourceCodeFile 1 2` -> "1 2" -> Init state params -// -// You can preset gas and initState for deploy -// -// Example: `aecli contract deploy ./wallet.json ./contractSourceCodeFile --gas 2222222` -addCommonOptions(program - .command('deploy ') +command = program.command('deploy ') .addArgument(callArgs) - .addOption(descriptorPathOption) - .addOption(contractSourceFilenameOption) .option('--contractBytecode [contractBytecode]', 'Contract bytecode file name') - .addOption(contractAciFilenameOption) - .addOption(passwordOption) - .addOption(gasOption) - .addOption(gasPriceOption(true)) - .addOption(amountOption) - .addOption(feeOption) - .addOption(ttlOption(true)) - .option('-N, --nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') - .description('Deploy a contract on the chain') - .action(Contract.deploy)); + .summary('deploy a contract on the chain') + .description([ + 'Deploy a contract on the chain and create a deployment descriptor with the contract', + 'information that can be used to invoke the contract later on.', + 'The generated descriptor will be made in the same folder of the contract source file or', + 'at the location provided in `descrPath`.', + 'Multiple deploys of the same contract file will generate different deploy descriptors.', + ].join(' ')) + .action(Contract.deploy); +addCommonOptions(command, [ + `./wallet.json --contractSource ${exampleContractPath} ${exampleArgs}`, + `./wallet.json --descrPath ${exampleContractDescriptorPath} --gas 2222222`, + `./wallet.json --contractBytecode ./contract.txt --contractAci ${exampleContractAciPath}`, +]); export default program; diff --git a/src/commands/main.js b/src/commands/main.js index 2fdcd0d3..205f8211 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -16,7 +16,7 @@ const EXECUTABLE_CMD = [ { name: 'chain', desc: 'Interact with the blockchain' }, { name: 'inspect', desc: 'get details of a node entity' }, { name: 'account', desc: 'Handle wallet operations' }, - { name: 'contract', desc: 'Contract interactions' }, + { name: 'contract', desc: 'contract interactions' }, { name: 'name', desc: 'manage AENS names' }, { name: 'tx', desc: 'Generates transactions to sign and submit manually' }, { name: 'oracle', desc: 'Interact with oracles' }, diff --git a/test/index.js b/test/index.js index 38b922ef..27061639 100644 --- a/test/index.js +++ b/test/index.js @@ -93,6 +93,9 @@ export async function executeProgram(program, args) { program.name() === 'aecli account' && ['save', 'create', 'address', 'sign-message', 'verify-message'].includes(args[0]) ) + || ( + program.name() === 'aecli contract' + && ['compile', 'encode-calldata', 'decode-call-result'].includes(args[0])) || (program.name() === 'aecli tx' && args[0] !== 'verify') ? [] : ['--url', url], ...[ 'compile', 'deploy', 'call', 'encode-calldata', 'decode-call-result', From 545fc816bc1b91563827a8abea0a7bb6be01f00d Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 13 Apr 2024 14:00:44 +1000 Subject: [PATCH 73/88] docs(chain): improve help --- src/actions/chain.js | 45 +++++------------- src/commands/chain.js | 103 ++++++++++++++++------------------------ src/commands/inspect.js | 5 +- src/commands/main.js | 2 +- src/utils/helpers.js | 1 + 5 files changed, 58 insertions(+), 98 deletions(-) diff --git a/src/actions/chain.js b/src/actions/chain.js index 5d3ec14b..2a0f49fd 100644 --- a/src/actions/chain.js +++ b/src/actions/chain.js @@ -1,7 +1,3 @@ -// # æternity CLI `chain` file -// -// This script initialize all `chain` function - import { verifyTransaction, ConsensusProtocolVersion } from '@aeternity/aepp-sdk'; import { initSdk } from '../utils/cli.js'; import { @@ -9,34 +5,29 @@ import { } from '../utils/print.js'; import { getBlock } from '../utils/helpers.js'; -// ## Retrieve `node` version -export async function version(options) { +export async function status(options) { const { json } = options; - // Initialize `Ae` const sdk = initSdk(options); - // Call `getStatus` API and print it - const status = await sdk.api.getStatus(); + const st = await sdk.api.getStatus(); const { consensusProtocolVersion } = await sdk.getNodeInfo(); if (json) { - print(status); + print(st); return; } - printUnderscored('Difficulty', status.difficulty); - printUnderscored('Node version', status.nodeVersion); + printUnderscored('Difficulty', st.difficulty); + printUnderscored('Node version', st.nodeVersion); printUnderscored('Consensus protocol version', `${consensusProtocolVersion} (${ConsensusProtocolVersion[consensusProtocolVersion]})`); - printUnderscored('Node revision', status.nodeRevision); - printUnderscored('Genesis hash', status.genesisKeyBlockHash); - printUnderscored('Network ID', status.networkId); - printUnderscored('Listening', status.listening); - printUnderscored('Peer count', status.peerCount); - printUnderscored('Pending transactions count', status.pendingTransactionsCount); - printUnderscored('Solutions', status.solutions); - printUnderscored('Syncing', status.syncing); + printUnderscored('Node revision', st.nodeRevision); + printUnderscored('Genesis hash', st.genesisKeyBlockHash); + printUnderscored('Network ID', st.networkId); + printUnderscored('Listening', st.listening); + printUnderscored('Peer count', st.peerCount); + printUnderscored('Pending transactions count', st.pendingTransactionsCount); + printUnderscored('Solutions', st.solutions); + printUnderscored('Syncing', st.syncing); } -// ## Retrieve `ttl` version export async function ttl(_absoluteTtl, { json, ...options }) { - // Initialize `Ae` const sdk = initSdk(options); const height = await sdk.getHeight(); const absoluteTtl = +_absoluteTtl; @@ -49,25 +40,17 @@ export async function ttl(_absoluteTtl, { json, ...options }) { } } -// ## Retrieve `TOP` block export async function top({ json, ...options }) { - // Initialize `Ae` const sdk = initSdk(options); - // Call `getTopBlock` API and print it printBlock(await sdk.api.getTopHeader(), json, true); } -// ## This function `Play` (print all block) from `top` block to some condition (reach some `height` or `limit`) export async function play(options) { let { height, limit, json } = options; limit = +limit; height = +height; const sdk = initSdk(options); - - // Get top block from `node`. It is a start point for play. let block = await sdk.api.getTopHeader(); - - // Play by `height` or by `limit` using `top` block as start point while (height ? block.height >= height : limit) { if (!height) limit -= 1; printBlock(block, json); @@ -75,10 +58,8 @@ export async function play(options) { } } -// ## Send 'transaction' to the chain export async function broadcast(signedTx, options) { const { json, waitMined, verify } = options; - // Initialize `Ae` const sdk = initSdk(options); if (verify) { diff --git a/src/commands/chain.js b/src/commands/chain.js index c0e40f0d..492b8019 100755 --- a/src/commands/chain.js +++ b/src/commands/chain.js @@ -1,73 +1,50 @@ -// # æternity CLI `chain` file -// -// This script initialize all `chain` command's -// We'll use `commander` for parsing options import { Command } from 'commander'; import * as Chain from '../actions/chain.js'; import { nodeOption, jsonOption, forceOption } from '../arguments.js'; +import { addExamples, exampleHeight, exampleTransaction } from '../utils/helpers.js'; const program = new Command().name('aecli chain'); -// ## Initialize `options` -const addCommonOptions = (p) => p - .addOption(nodeOption) - .addOption(forceOption) - .addOption(jsonOption); - -// ## Initialize `top` command -// -// You can use this command to retrieve `top block` from `node` -// -// Example: `aecli chain top` -addCommonOptions(program - .command('top') - .description('Get top of Chain') - .action(Chain.top)); - -// ## Initialize `status` command -// -// You can use this command to retrieve `node version` -// -// Example: `aecli chain status` -addCommonOptions(program - .command('status') - .description('Get node version') - .action(Chain.version)); - -// ## Initialize `ttl` command -// -// You can use this command to retrieve relative `ttl` -// -// Example: `aecli chain ttl ` -addCommonOptions(program - .command('ttl ') - .description('Get relative ttl') - .action(Chain.ttl)); - -// ## Initialize `play` command -// -// You can use this command to get list of block by some condition (by `limit` or `height`) -// -// Example: `aecli chain play --limit 10` --> print 10 blocks starting from top -// -// Example: `aecli chain play --height 100` --> print blocks until reach height 100 starting from top -addCommonOptions(program - .command('play') - .option('-L, --limit [playlimit]', 'Limit for play command', 10) - .option('-P, --height [playToHeight]', 'Play to selected height') - .description('Real-time block monitoring') - .action(Chain.play)); - -// ## Initialize `broadcast` command -// -// You can use this command to send `transaction` to the `chain` -// -// Example: `aecli tx spend ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT 100` -addCommonOptions(program - .command('broadcast ') +const addCommonOptions = (cmd, examples) => { + cmd.addOption(nodeOption).addOption(forceOption).addOption(jsonOption); + if (!cmd.description()) { + const summary = cmd.summary(); + cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); + } + addExamples(program.name(), cmd, examples); +}; + +let command = program.command('top') + .summary('get top key block or micro block of chain') + .action(Chain.top); +addCommonOptions(command, ['']); + +command = program.command('status') + .summary('get node version, network id, and related details') + .action(Chain.status); +addCommonOptions(command, ['']); + +command = program.command('ttl ') + .summary('get relative TTL by absolute TTL') + .action(Chain.ttl); +addCommonOptions(command, ['']); + +command = program.command('play') + .option('-L, --limit [playLimit]', 'amount of blocks to print', 10) + .option('-P, --height [playToHeight]', 'print blocks till the height') + .summary('prints blocks from top until condition') + .action(Chain.play); +addCommonOptions(command, [ + '--limit 3 # print 3 blocks from top', + `--height ${exampleHeight} # print blocks from top until reach height`, +]); + +command = program.command('broadcast ') .option('-W, --no-waitMined', 'Don\'t wait until transaction gets mined') .option('--verify', 'Verify Transaction before broadcasting.') - .description('Send transaction to the chain') - .action(Chain.broadcast)); + .summary('send signed transaction to the chain') + .description('Send signed transaction to the chain. Useful in offline signing scheme.') + .action(Chain.broadcast); +addCommonOptions(command, [exampleTransaction]); export default program; diff --git a/src/commands/inspect.js b/src/commands/inspect.js index a9c4e84c..5ae9271c 100644 --- a/src/commands/inspect.js +++ b/src/commands/inspect.js @@ -2,7 +2,8 @@ import { Command } from 'commander'; import inspect from '../actions/inspect.js'; import { nodeOption, jsonOption, forceOption } from '../arguments.js'; import { - addExamples, exampleAddress1, exampleContract, exampleName, exampleOracle, exampleTransaction, + addExamples, exampleAddress1, exampleContract, exampleHeight, exampleName, exampleOracle, + exampleTransaction, } from '../utils/helpers.js'; const command = new Command().name('aecli inspect') @@ -31,7 +32,7 @@ addExamples('', command, [ `${exampleOracle} # get contract details`, 'kh_CF37tA4KiiZTFqbQ6JFCU7kDt6CBZucBrvineVUGC7svA9vK7 # get key block details by hash', 'mh_k1K9gLLtdikJhCdKfBbhYGveQs7osSNwceEJZb1jD6AmraNdr # get micro block details by hash', - '929796 # get key block details by height', + `${exampleHeight} # get key block details by height`, 'th_2nZshewM7FtKSsDEP4zXPsGCe9cdxaFTRrcNjJyE22ktjGidZR # get transaction details by hash', `${exampleTransaction} # get transaction details`, ]); diff --git a/src/commands/main.js b/src/commands/main.js index 205f8211..0cf75a32 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -13,7 +13,7 @@ import CliError from '../utils/CliError.js'; const program = new Command(); const EXECUTABLE_CMD = [ - { name: 'chain', desc: 'Interact with the blockchain' }, + { name: 'chain', desc: 'interact with the node' }, { name: 'inspect', desc: 'get details of a node entity' }, { name: 'account', desc: 'Handle wallet operations' }, { name: 'contract', desc: 'contract interactions' }, diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 0af8b33c..a41eba74 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -11,6 +11,7 @@ export const exampleOracleQuery = 'oq_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTu export const exampleTransaction = 'tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57'; export const exampleName = 'example-name.chain'; export const exampleCalldata = 'cb_DA6sWJo='; +export const exampleHeight = 929796; export const addExamples = (prefix, command, examples) => command.addHelpText('after', ` Example call: From 6c0178d91f6e5361a25433a4c119c14d7a7b2f24 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 13 Apr 2024 15:20:12 +1000 Subject: [PATCH 74/88] docs(account): improve help --- src/actions/account.js | 14 ----- src/commands/account.js | 112 ++++++++++++++++++---------------------- src/commands/main.js | 2 +- src/utils/helpers.js | 2 +- 4 files changed, 52 insertions(+), 78 deletions(-) diff --git a/src/actions/account.js b/src/actions/account.js index 998fa234..c8c19e98 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -1,7 +1,3 @@ -// # æternity CLI `account` file -// -// This script initialize all `account` function - import fs from 'fs-extra'; import { generateKeyPair, verifyMessage as _verifyMessage, getAddressFromPriv, dump, @@ -12,8 +8,6 @@ import { initSdkByWalletFile, AccountCli } from '../utils/cli.js'; import { print, printUnderscored } from '../utils/print.js'; import { PROMPT_TYPE, prompt } from '../utils/prompt.js'; -// ## `Sign message` function -// this function allow you to `sign` arbitrary data export async function signMessage(walletPath, data = [], options) { const { json, filePath, password } = options; const dataForSign = filePath ? await fs.readFile(filePath) : data.join(' '); @@ -35,8 +29,6 @@ export async function signMessage(walletPath, data = [], options) { } } -// ## `Verify` function -// this function allow you to `verify` signed data export async function verifyMessage(address, hexSignature, dataArray = [], options) { const { json, filePath } = options; const data = filePath ? await fs.readFile(filePath) : dataArray.join(' '); @@ -49,8 +41,6 @@ export async function verifyMessage(address, hexSignature, dataArray = [], optio } } -// ## `Sign` function -// this function allow you to `sign` transaction's export async function sign(walletPath, tx, { networkId: networkIdOpt, json, ...options }) { const sdk = await initSdkByWalletFile(walletPath, options); const networkId = networkIdOpt ?? await sdk.api.getNetworkId(); @@ -67,8 +57,6 @@ export async function sign(walletPath, tx, { networkId: networkIdOpt, json, ...o } } -// ## Get `address` function -// This function allow you retrieve account `public` and `private` keys export async function getAddress(walletPath, options) { const { privateKey, forcePrompt = false, json, password, @@ -89,8 +77,6 @@ export async function getAddress(walletPath, options) { } } -// ## Create secure `wallet` file by secret key of generate one -// This function allow you to generate `keypair` and write it to secure `ethereum` like key-file export async function createWallet( walletPath, secretKey = generateKeyPair().secretKey, diff --git a/src/commands/account.js b/src/commands/account.js index 0a8d8be6..2ca91db8 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -1,84 +1,72 @@ -// # æternity CLI `account` file -// -// This script initialize all `account` commands -// We'll use `commander` for parsing options import { Command } from 'commander'; import * as Account from '../actions/account.js'; import { nodeOption, jsonOption, forceOption, passwordOption, networkIdOption, } from '../arguments.js'; +import { addExamples, exampleAddress1, exampleTransaction } from '../utils/helpers.js'; const program = new Command().name('aecli account'); -// ## Initialize `options` -const addCommonOptions = (p) => p - .addOption(passwordOption) - .addOption(jsonOption); +const addCommonOptions = (cmd, examples) => { + cmd.addOption(jsonOption); + if (!cmd.description()) { + const summary = cmd.summary(); + cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); + } + addExamples(program.name(), cmd, examples); +}; -// ## Initialize `sign` command -// -// You can use this command to sign your transaction's -// -// Example: `aecli account sign ./wallet.json tx_1241rioefwj23f2wfdsfsdsdfsasdf` -addCommonOptions(program - .command('sign ') +const addWalletOptions = (cmd, examples) => { + cmd.addOption(passwordOption); + addCommonOptions(cmd, examples); +}; + +let command = program.command('sign ') .addOption(nodeOption) .addOption(forceOption) .addOption(networkIdOption) - .description('Sign a transaction using wallet') - .action(Account.sign)); + .summary('sign a transaction using wallet') + .description('Sign a transaction using wallet. Useful in offline signing scheme.') + .action(Account.sign); +addWalletOptions(command, [`./wallet.json ${exampleTransaction}`]); + +const exampleMessage = '\'message to sign\''; -// ## Initialize `sign-message` command -// -// You can use this command to sign message -// -// Example: `aecli account sign-message ./wallet.json Hello` -addCommonOptions(program - .command('sign-message [data...]') - .option('--filePath [path]', 'Specify the path to the file for signing(ignore command message argument and use file instead)') - .description('Sign a personal message using wallet') - .action(Account.signMessage)); +command = program.command('sign-message [data...]') + .option('--filePath [path]', 'Specify the path to the file for signing (ignore "data" argument and use file instead)') + .summary('sign a personal message using wallet') + .action(Account.signMessage); +addWalletOptions(command, [`./wallet.json ${exampleMessage}`]); -// ## Initialize `verify-message` command -// -// You can use this command to sign message -// -// Example: `aecli account verify-message ak_... asd1dasfadfsdasdasdasHexSig... Hello` -addCommonOptions(program - .command('verify-message
[data...]') - .option('--filePath [path]', 'Specify the path to the file(ignore comm and message argument and use file instead)') - .description('Check if message was signed by account') - .action(Account.verifyMessage)); +command = program.command('verify-message
[data...]') + .option('--filePath [path]', 'Specify the path to the file (ignore "data" argument and use file instead)') + .summary('check if message was signed by address') + .action(Account.verifyMessage); +addCommonOptions(command, [`${exampleAddress1} f2f268f195d4747568f38f9efd36e72606dc356c0b8db9fdfae5f1f9c207dbc354c57c29397837d911516aef184b0ddbed7d16d77caf9ffb3f42fe2bcc15c30e ${exampleMessage}`]); -// ## Initialize `address` command -// -// You can use this command to retrieve get your public and private key -// -// Example: `aecli account address ./wallet.json` --> show only public key -// -// Example: `aecli account address ./wallet.json --privateKey` --> show public key and private key -addCommonOptions(program - .command('address ') +command = program.command('address ') .option('--privateKey', 'Print private key') .option('--forcePrompt', 'Force prompting') - .description('Get wallet address') - .action(Account.getAddress)); + .summary('get wallet address and optionally private key') + .action(Account.getAddress); +addWalletOptions(command, [ + './wallet.json # show only public key', + './wallet.json --privateKey # show public key and private key', +]); -// ## Initialize `create` command -// -// You can use this command to generate `keypair` and encrypt it by password. -// Secret key can be provided in options, or cli will generate one. -// This command create `ethereum like keyfile`. -addCommonOptions(program - .command('create ') +command = program.command('create ') .argument('[privkey]', 'Secret key as 64-bytes encoded as hex') .option('--overwrite', 'Overwrite if exist') - .description('Create a secure wallet by a private key or generate one.') - .addHelpText('after', ` - -Example call: - $ aecli account create ./my-wallet.json - $ aecli account create ./my-wallet.json 9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200`) - .action(Account.createWallet)); + .summary('create a wallet by a private key or generate a new one') + .description([ + 'Create a password-encrypted wallet by a secret key.', + 'Secret key can be provided in options, or cli will generate one.', + 'This command creates ethereum-like keyfile.', + ].join(' ')) + .action(Account.createWallet); +addWalletOptions(command, [ + './wallet.json', + './wallet.json 9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200', +]); export default program; diff --git a/src/commands/main.js b/src/commands/main.js index 0cf75a32..56598021 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -15,7 +15,7 @@ const program = new Command(); const EXECUTABLE_CMD = [ { name: 'chain', desc: 'interact with the node' }, { name: 'inspect', desc: 'get details of a node entity' }, - { name: 'account', desc: 'Handle wallet operations' }, + { name: 'account', desc: 'handle wallet operations' }, { name: 'contract', desc: 'contract interactions' }, { name: 'name', desc: 'manage AENS names' }, { name: 'tx', desc: 'Generates transactions to sign and submit manually' }, diff --git a/src/utils/helpers.js b/src/utils/helpers.js index a41eba74..462796cc 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -3,7 +3,7 @@ import { resolve } from 'path'; import { Encoding, decode as _decode, produceNameId } from '@aeternity/aepp-sdk'; import CliError from './CliError.js'; -export const exampleAddress1 = 'ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi'; +export const exampleAddress1 = 'ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E'; export const exampleAddress2 = 'ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT'; export const exampleContract = 'ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh'; export const exampleOracle = 'ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi'; From 730862313a3ec4d277e0f60b3387cb0cbf7a3439 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 13 Apr 2024 15:43:11 +1000 Subject: [PATCH 75/88] docs: consistent summary in main command --- src/commands/main.js | 35 ++++++++++++++++++++--------------- src/utils/cli.js | 5 ----- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/commands/main.js b/src/commands/main.js index 56598021..70f342fc 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -13,14 +13,14 @@ import CliError from '../utils/CliError.js'; const program = new Command(); const EXECUTABLE_CMD = [ - { name: 'chain', desc: 'interact with the node' }, - { name: 'inspect', desc: 'get details of a node entity' }, { name: 'account', desc: 'handle wallet operations' }, - { name: 'contract', desc: 'contract interactions' }, + { name: 'spend', desc: 'send coins to account or contract' }, { name: 'name', desc: 'manage AENS names' }, - { name: 'tx', desc: 'Generates transactions to sign and submit manually' }, - { name: 'oracle', desc: 'Interact with oracles' }, - { name: 'spend', desc: 'Send coins to account or contract' }, + { name: 'contract', desc: 'contract interactions' }, + { name: 'oracle', desc: 'interact with oracles' }, + { name: 'chain', desc: 'make a request to the node' }, + { name: 'inspect', desc: 'get details of a node entity' }, + { name: 'tx', desc: 'generate transactions to sign and submit manually' }, ]; (() => { @@ -52,15 +52,20 @@ async function getCompilerDescription(url) { return version ? `version ${version}` : 'can\'t get compiler version'; } -program - .command('config') - .description('Print the current sdk configuration') +const addCommonOptions = (cmd) => { + const summary = cmd.summary(); + cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); +}; + +let command = program.command('config') + .summary('print the current sdk configuration') .addOption(nodeOption) .addOption(compilerOption) .action(async ({ url, compilerUrl }) => { console.log('Node', url, await getNodeDescription(url)); console.log('Compiler', compilerUrl, await getCompilerDescription(compilerUrl)); }); +addCommonOptions(command); async function askUrl(entity, choices, getDescription, _url) { let url = _url; @@ -109,10 +114,9 @@ async function askUrl(entity, choices, getDescription, _url) { } } -program - .command('select-node') +command = program.command('select-node') .argument('[nodeUrl]', 'Node URL') - .description('Specify node to use in other commands') + .summary('specify node to use in other commands') .action(async (url) => { const nodes = [ { name: 'Mainnet', url: 'https://mainnet.aeternity.io/' }, @@ -121,11 +125,11 @@ program ]; await addToConfig({ url: await askUrl('node', nodes, getNodeDescription, url) }); }); +addCommonOptions(command); -program - .command('select-compiler') +command = program.command('select-compiler') .argument('[compilerUrl]', 'Compiler URL') - .description('Specify compiler to use in other commands') + .summary('specify compiler to use in other commands') .action(async (url) => { const compilers = [ { name: 'Stable v7', url: 'https://v7.compiler.aepps.com/' }, @@ -136,5 +140,6 @@ program compilerUrl: await askUrl('compiler', compilers, getCompilerDescription, url), }); }); +addCommonOptions(command); export default program; diff --git a/src/utils/cli.js b/src/utils/cli.js index 6c8bc270..448f0f14 100644 --- a/src/utils/cli.js +++ b/src/utils/cli.js @@ -1,5 +1,3 @@ -// # Utils `cli` Module -// That script contains helper function's for work with `cli` import fs from 'fs-extra'; import { AeSdk, Node, MemoryAccount, CompilerCli, CompilerCli8, CompilerHttpNode, recover, sign, @@ -63,15 +61,12 @@ export class AccountCli extends MemoryAccount { return super.signTransaction(transaction, options); } - // Get account file by path, decrypt it using password and return AccountCli static async read(path, password) { const keyFile = await fs.readJson(getFullPath(path)); return new AccountCli(keyFile, password); } } -// ## Get account files and decrypt it using password -// After that create sdk instance using this `keyPair` export async function initSdkByWalletFile(walletPath, { password, ...options }) { return initSdk({ ...options, From 0ae26a6603e79c1453b7a80ee3c0714a2e482575 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 13 Apr 2024 17:50:26 +1000 Subject: [PATCH 76/88] perf: combine all subprograms into a single program This speeds up initialization about 2 times. Because don't need to spawn node process twice. --- src/aecli-account.js | 5 - src/aecli-chain.js | 5 - src/aecli-contract.js | 5 - src/aecli-inspect.js | 5 - src/aecli-name.js | 5 - src/aecli-oracle.js | 5 - src/aecli-spend.js | 5 - src/aecli-tx.js | 5 - src/commands/account.js | 4 +- src/commands/chain.js | 4 +- src/commands/contract.js | 4 +- src/commands/inspect.js | 5 +- src/commands/main.js | 25 ++-- src/commands/name.js | 4 +- src/commands/oracle.js | 4 +- src/commands/spend.js | 10 +- src/commands/tx.js | 8 +- src/utils/helpers.js | 14 ++- test/account.js | 35 +++--- test/chain.js | 19 ++- test/contract.js | 250 ++++++++++++++++++++++++--------------- test/index.js | 21 ++-- test/inspect.js | 52 ++++---- test/name.js | 77 ++++++------ test/oracle.js | 62 ++++++---- test/other.js | 9 +- test/spend.js | 17 +-- test/tx.js | 53 ++++----- 28 files changed, 370 insertions(+), 347 deletions(-) delete mode 100755 src/aecli-account.js delete mode 100755 src/aecli-chain.js delete mode 100755 src/aecli-contract.js delete mode 100755 src/aecli-inspect.js delete mode 100755 src/aecli-name.js delete mode 100755 src/aecli-oracle.js delete mode 100755 src/aecli-spend.js delete mode 100755 src/aecli-tx.js diff --git a/src/aecli-account.js b/src/aecli-account.js deleted file mode 100755 index 85965767..00000000 --- a/src/aecli-account.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -import program from './commands/account.js'; -import { runProgram } from './utils/CliError.js'; - -await runProgram(program); diff --git a/src/aecli-chain.js b/src/aecli-chain.js deleted file mode 100755 index 9bc4a9e1..00000000 --- a/src/aecli-chain.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -import program from './commands/chain.js'; -import { runProgram } from './utils/CliError.js'; - -await runProgram(program); diff --git a/src/aecli-contract.js b/src/aecli-contract.js deleted file mode 100755 index cf3c61f2..00000000 --- a/src/aecli-contract.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -import program from './commands/contract.js'; -import { runProgram } from './utils/CliError.js'; - -await runProgram(program); diff --git a/src/aecli-inspect.js b/src/aecli-inspect.js deleted file mode 100755 index 2572e8ae..00000000 --- a/src/aecli-inspect.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -import program from './commands/inspect.js'; -import { runProgram } from './utils/CliError.js'; - -await runProgram(program); diff --git a/src/aecli-name.js b/src/aecli-name.js deleted file mode 100755 index cf8ea548..00000000 --- a/src/aecli-name.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -import program from './commands/name.js'; -import { runProgram } from './utils/CliError.js'; - -await runProgram(program); diff --git a/src/aecli-oracle.js b/src/aecli-oracle.js deleted file mode 100755 index ae8f4fe1..00000000 --- a/src/aecli-oracle.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -import program from './commands/oracle.js'; -import { runProgram } from './utils/CliError.js'; - -await runProgram(program); diff --git a/src/aecli-spend.js b/src/aecli-spend.js deleted file mode 100755 index fa9d32b7..00000000 --- a/src/aecli-spend.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -import program from './commands/spend.js'; -import { runProgram } from './utils/CliError.js'; - -await runProgram(program); diff --git a/src/aecli-tx.js b/src/aecli-tx.js deleted file mode 100755 index 059d123c..00000000 --- a/src/aecli-tx.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -import program from './commands/tx.js'; -import { runProgram } from './utils/CliError.js'; - -await runProgram(program); diff --git a/src/commands/account.js b/src/commands/account.js index 2ca91db8..808bd436 100644 --- a/src/commands/account.js +++ b/src/commands/account.js @@ -5,7 +5,7 @@ import { } from '../arguments.js'; import { addExamples, exampleAddress1, exampleTransaction } from '../utils/helpers.js'; -const program = new Command().name('aecli account'); +const program = new Command('account').summary('handle wallet operations'); const addCommonOptions = (cmd, examples) => { cmd.addOption(jsonOption); @@ -13,7 +13,7 @@ const addCommonOptions = (cmd, examples) => { const summary = cmd.summary(); cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); } - addExamples(program.name(), cmd, examples); + addExamples(cmd, examples); }; const addWalletOptions = (cmd, examples) => { diff --git a/src/commands/chain.js b/src/commands/chain.js index 492b8019..e1868d2c 100755 --- a/src/commands/chain.js +++ b/src/commands/chain.js @@ -3,7 +3,7 @@ import * as Chain from '../actions/chain.js'; import { nodeOption, jsonOption, forceOption } from '../arguments.js'; import { addExamples, exampleHeight, exampleTransaction } from '../utils/helpers.js'; -const program = new Command().name('aecli chain'); +const program = new Command('chain').summary('make a request to the node'); const addCommonOptions = (cmd, examples) => { cmd.addOption(nodeOption).addOption(forceOption).addOption(jsonOption); @@ -11,7 +11,7 @@ const addCommonOptions = (cmd, examples) => { const summary = cmd.summary(); cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); } - addExamples(program.name(), cmd, examples); + addExamples(cmd, examples); }; let command = program.command('top') diff --git a/src/commands/contract.js b/src/commands/contract.js index 0d26a35f..d5245c6c 100644 --- a/src/commands/contract.js +++ b/src/commands/contract.js @@ -33,7 +33,7 @@ const descriptorPathOption = new Option('-d, --descrPath [descrPath]', 'Path to const contractSourceFilenameOption = new Option('--contractSource [contractSource]', 'Contract source code file name'); const contractAciFilenameOption = new Option('--contractAci [contractAci]', 'Contract ACI file name'); -const program = new Command().name('aecli contract'); +const program = new Command('contract').summary('contract interactions'); const exampleContractPath = './contract.aes'; const exampleContractDescriptorPath = './contract.aes.deploy.229e.json'; @@ -48,7 +48,7 @@ const addCompilerOptions = (cmd, examples) => { const summary = cmd.summary(); cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); } - addExamples(program.name(), cmd, examples); + addExamples(cmd, examples); }; let command = program.command('compile ') diff --git a/src/commands/inspect.js b/src/commands/inspect.js index 5ae9271c..3fe4fe7f 100644 --- a/src/commands/inspect.js +++ b/src/commands/inspect.js @@ -6,8 +6,9 @@ import { exampleTransaction, } from '../utils/helpers.js'; -const command = new Command().name('aecli inspect') +const command = new Command('inspect') .arguments('') + .summary('get details of a node entity') .description([ 'Prints details of:', ...[ @@ -25,7 +26,7 @@ const command = new Command().name('aecli inspect') .addOption(jsonOption) .action(inspect); -addExamples('', command, [ +addExamples(command, [ `${exampleAddress1} # get account details`, `${exampleName} # get details of AENS name`, `${exampleContract} # get contract details`, diff --git a/src/commands/main.js b/src/commands/main.js index 70f342fc..ba44819c 100644 --- a/src/commands/main.js +++ b/src/commands/main.js @@ -5,23 +5,24 @@ import { fileURLToPath } from 'url'; import { resolve } from 'path'; import updateNotifier from 'update-notifier'; import { Node, ConsensusProtocolVersion } from '@aeternity/aepp-sdk'; +import accountCmd from './account.js'; +import spendCmd from './spend.js'; +import nameCmd from './name.js'; +import contractCmd from './contract.js'; +import oracleCmd from './oracle.js'; +import chainCmd from './chain.js'; +import inspectCmd from './inspect.js'; +import txCmd from './tx.js'; import { compilerOption, nodeOption } from '../arguments.js'; import { getCompilerByUrl } from '../utils/cli.js'; import { addToConfig } from '../utils/config.js'; import CliError from '../utils/CliError.js'; -const program = new Command(); +const program = new Command('aecli'); -const EXECUTABLE_CMD = [ - { name: 'account', desc: 'handle wallet operations' }, - { name: 'spend', desc: 'send coins to account or contract' }, - { name: 'name', desc: 'manage AENS names' }, - { name: 'contract', desc: 'contract interactions' }, - { name: 'oracle', desc: 'interact with oracles' }, - { name: 'chain', desc: 'make a request to the node' }, - { name: 'inspect', desc: 'get details of a node entity' }, - { name: 'tx', desc: 'generate transactions to sign and submit manually' }, -]; +[ + accountCmd, spendCmd, nameCmd, contractCmd, oracleCmd, chainCmd, inspectCmd, txCmd, +].forEach((cmd) => program.addCommand(cmd)); (() => { const { name, version } = fs.readJSONSync( @@ -33,8 +34,6 @@ const EXECUTABLE_CMD = [ updateNotifier({ pkg: { name, version } }).notify(); })(); -EXECUTABLE_CMD.forEach(({ name, desc }) => program.command(name, desc)); - async function getNodeDescription(url) { const nodeInfo = await new Node(url).getNodeInfo().catch(() => {}); return nodeInfo diff --git a/src/commands/name.js b/src/commands/name.js index c9dfba08..cad7df11 100644 --- a/src/commands/name.js +++ b/src/commands/name.js @@ -9,7 +9,7 @@ import { addExamples, exampleAddress1, exampleContract, exampleName, } from '../utils/helpers.js'; -const program = new Command().name('aecli name'); +const program = new Command('name').summary('manage AENS names'); const addCommonOptions = (cmd, example) => { cmd @@ -24,7 +24,7 @@ const addCommonOptions = (cmd, example) => { const summary = cmd.summary(); cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); } - addExamples(program.name(), cmd, [example]); + addExamples(cmd, [example]); }; const claimingGuide = [ diff --git a/src/commands/oracle.js b/src/commands/oracle.js index b0044637..9a8005db 100644 --- a/src/commands/oracle.js +++ b/src/commands/oracle.js @@ -6,7 +6,7 @@ import { } from '../arguments.js'; import { addExamples, exampleOracle, exampleOracleQuery } from '../utils/helpers.js'; -const program = new Command().name('aecli oracle'); +const program = new Command('oracle').summary('interact with oracles'); const addCommonOptions = (cmd, example) => { cmd @@ -15,7 +15,7 @@ const addCommonOptions = (cmd, example) => { .addOption(jsonOption); const summary = cmd.summary(); cmd.description(`${summary[0].toUpperCase()}${summary.slice(1)}.`); - addExamples(program.name(), cmd, [example]); + addExamples(cmd, [example]); }; let command = program.command('get ') diff --git a/src/commands/spend.js b/src/commands/spend.js index d2a05ef6..32649123 100644 --- a/src/commands/spend.js +++ b/src/commands/spend.js @@ -13,13 +13,13 @@ import { } from '../arguments.js'; import { addExamples, exampleAddress1, exampleName } from '../utils/helpers.js'; -const command = new Command('aecli spend') - .summary('sends coins to another account or contract') +const command = new Command('spend') + .summary('send coins to another account or contract') .description('Sends coins to another account or contract.') - .argument('', 'A path to wallet file') + .argument('', 'A path to wallet file') .argument('', 'Address or name of recipient account') .argument( - '', + '', 'Amount of coins to send in aettos/ae (example: 1.2ae), or percent of sender balance (example: 42%)', (amount) => { if (amount.endsWith('%')) return { fraction: +amount.slice(0, -1) }; @@ -54,7 +54,7 @@ const command = new Command('aecli spend') await printTransaction(tx, json, sdk); }); -addExamples('', command, [ +addExamples(command, [ `./wallet.json ${exampleAddress1} 100`, `./wallet.json ${exampleName} 1.23ae`, `./wallet.json ${exampleAddress1} 20% --ttl 20`, diff --git a/src/commands/tx.js b/src/commands/tx.js index fbb8cae0..23a4fa4e 100644 --- a/src/commands/tx.js +++ b/src/commands/tx.js @@ -20,8 +20,8 @@ import { exampleName, exampleCalldata, exampleTransaction, } from '../utils/helpers.js'; -const program = new Command() - .name('aecli tx') +const program = new Command('tx') + .summary('generate transactions to sign and submit manually') .description('Generates transactions to sign and submit manually. Useful for offline signing.'); const addTxBuilderOptions = (cmd, example) => { @@ -35,7 +35,7 @@ const addTxBuilderOptions = (cmd, example) => { .addOption(jsonOption) .summary(`build ${cmd.name().replaceAll('-', ' ')} transaction`) .description(`Build ${cmd.name().replaceAll('-', ' ')} transaction.`); - addExamples(program.name(), cmd, [example]); + addExamples(cmd, [example]); }; let command; @@ -116,6 +116,6 @@ command = program .summary('verify transaction using node') .description('Verify transaction using node.') .action(Transaction.verify); -addExamples(program.name(), command, [exampleTransaction]); +addExamples(command, [exampleTransaction]); export default program; diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 462796cc..33e61014 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -13,9 +13,17 @@ export const exampleName = 'example-name.chain'; export const exampleCalldata = 'cb_DA6sWJo='; export const exampleHeight = 929796; -export const addExamples = (prefix, command, examples) => command.addHelpText('after', ` -Example call: -${examples.map((e) => ` $ ${prefix ? `${prefix} ` : ''}${command.name()} ${e}`).join('\n')}`); +export const addExamples = (command, examples) => { + command.addHelpText('after', () => { + let name = ''; + let cmd = command; + while (cmd) { + name = `${cmd.name()} ${name}`; + cmd = cmd.parent; + } + return ['', 'Example call:', ...examples.map((e) => ` $ ${name}${e}`)].join('\n'); + }); +}; export async function getBlock(hash, sdk) { const type = hash.split('_')[0]; diff --git a/test/account.js b/test/account.js index 7002b3da..ce2178fe 100644 --- a/test/account.js +++ b/test/account.js @@ -5,9 +5,8 @@ import prompts from 'prompts'; import { resolve } from 'path'; import { generateKeyPair } from '@aeternity/aepp-sdk'; import { getSdk, executeProgram, WALLET_NAME } from './index.js'; -import accountProgram from '../src/commands/account.js'; -const executeAccount = (args) => executeProgram(accountProgram, args); +const executeAccount = executeProgram.bind(null, 'account'); const walletName = 'test-artifacts/test-wallet.json'; describe('Account Module', () => { @@ -24,36 +23,36 @@ describe('Account Module', () => { }); it('Create Wallet', async () => { - const createRes = await executeAccount(['create', walletName, '--password', 'test']); + const createRes = await executeAccount('create', walletName, '--password', 'test'); expect(await fs.exists(walletName)).to.be.equal(true); - const resJson = await executeAccount(['address', walletName, '--json']); + const resJson = await executeAccount('address', walletName, '--json'); expect(resJson.publicKey).to.be.a('string'); expect(createRes).to.be.equal(` Address _________________________________ ${resJson.publicKey} Path ____________________________________ ${resolve(walletName)} `.trim()); - const res = await executeAccount(['address', walletName]); + const res = await executeAccount('address', walletName); expect(res).to.be.equal(` Address _________________________________ ${resJson.publicKey} `.trim()); }); it('Create Wallet From Private Key', async () => { - await executeAccount(['create', walletName, '--password', 'test', keypair.secretKey, '--overwrite']); + await executeAccount('create', walletName, '--password', 'test', keypair.secretKey, '--overwrite'); expect(await fs.exists(walletName)).to.be.equal(true); - expect((await executeAccount(['address', walletName, '--json'])).publicKey) + expect((await executeAccount('address', walletName, '--json')).publicKey) .to.equal(keypair.publicKey); }); it('Check Wallet Address', async () => { - expect((await executeAccount(['address', WALLET_NAME, '--json'])).publicKey) + expect((await executeAccount('address', WALLET_NAME, '--json')).publicKey) .to.equal(sdk.address); }); it('Check Wallet Address with Private Key', async () => { - const resJson = await executeAccount(['address', walletName, '--password', 'test', '--privateKey', '--forcePrompt', '--json']); + const resJson = await executeAccount('address', walletName, '--password', 'test', '--privateKey', '--forcePrompt', '--json'); expect(resJson.secretKey).to.equal(keypair.secretKey); - const res = await executeAccount(['address', walletName, '--password', 'test', '--privateKey', '--forcePrompt']); + const res = await executeAccount('address', walletName, '--password', 'test', '--privateKey', '--forcePrompt'); expect(res).to.be.equal(` Address _________________________________ ${keypair.publicKey} Secret Key ______________________________ ${keypair.secretKey} @@ -63,21 +62,21 @@ Secret Key ______________________________ ${keypair.secretKey} it('asks for password if it not provided', async () => { const walletPath = 'test-artifacts/test-wallet-1.json'; prompts.inject(['test-password', 'y', 'test-password']); - const { publicKey } = await executeAccount(['create', walletPath, '--json']); - expect(await executeAccount(['address', walletPath, '--privateKey'])).to.include(publicKey); + const { publicKey } = await executeAccount('create', walletPath, '--json'); + expect(await executeAccount('address', walletPath, '--privateKey')).to.include(publicKey); }); it('don\'t asks for password if provided password is empty string', async () => { const name = 'test-artifacts/test-wallet-2.json'; - await executeAccount(['create', name, '--password', '']); + await executeAccount('create', name, '--password', ''); prompts.inject(['y']); - expect((await executeAccount(['address', name, '--password', '', '--privateKey', '--json'])).publicKey) + expect((await executeAccount('address', name, '--password', '', '--privateKey', '--json')).publicKey) .to.be.a('string'); }); it('Sign message', async () => { const data = 'Hello world'; - const signedMessage = await executeAccount(['sign-message', WALLET_NAME, data, '--json', '--password', 'test']); + const signedMessage = await executeAccount('sign-message', WALLET_NAME, data, '--json', '--password', 'test'); const signedUsingSDK = Array.from(await sdk.signMessage(data)); sig = signedMessage.signatureHex; signedMessage.data.should.be.equal(data); @@ -90,7 +89,7 @@ Secret Key ______________________________ ${keypair.secretKey} it('Sign message using file', async () => { const { data, signature, signatureHex, address, - } = await executeAccount(['sign-message', WALLET_NAME, '--json', '--filePath', fileName, '--password', 'test']); + } = await executeAccount('sign-message', WALLET_NAME, '--json', '--filePath', fileName, '--password', 'test'); const signedUsingSDK = Array.from(await sdk.signMessage(data)); sigFromFile = signatureHex; signature.toString().should.be.equal(signedUsingSDK.toString()); @@ -102,9 +101,9 @@ Secret Key ______________________________ ${keypair.secretKey} it('verify message', async () => { const data = 'Hello world'; - const verify = await executeAccount(['verify-message', sdk.address, sig, data, '--json']); + const verify = await executeAccount('verify-message', sdk.address, sig, data, '--json'); verify.isCorrect.should.be.equal(true); - const verifyFromFile = await executeAccount(['verify-message', sdk.address, sigFromFile, '--json', '--filePath', fileName]); + const verifyFromFile = await executeAccount('verify-message', sdk.address, sigFromFile, '--json', '--filePath', fileName); verifyFromFile.isCorrect.should.be.equal(true); }); }); diff --git a/test/chain.js b/test/chain.js index 8414f9ee..b4de3cd7 100644 --- a/test/chain.js +++ b/test/chain.js @@ -1,9 +1,8 @@ import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { executeProgram, getSdk } from './index.js'; -import chainProgram from '../src/commands/chain.js'; -const executeChain = (args) => executeProgram(chainProgram, args); +const executeChain = executeProgram.bind(null, 'chain'); describe('Chain Module', () => { let sdk; @@ -16,11 +15,11 @@ describe('Chain Module', () => { }); it('prints top', async () => { - const resJson = await executeChain(['top', '--json']); + const resJson = await executeChain('top', '--json'); expect(resJson.hash).to.be.a('string'); expect(resJson.height).to.be.a('number'); - const res = await executeChain(['top']); + const res = await executeChain('top'); expect(res).to.equal(` <<--------------- ${resJson.hash.startsWith('mh_') ? 'MicroBlock' : 'KeyBlock'} --------------->> Block hash ______________________________ ${resJson.hash} @@ -38,7 +37,7 @@ Transactions ____________________________ 0 }); it('prints status', async () => { - const resJson = await executeChain(['status', '--json']); + const resJson = await executeChain('status', '--json'); expect(resJson).to.eql({ difficulty: resJson.difficulty, genesisKeyBlockHash: resJson.genesisKeyBlockHash, @@ -60,7 +59,7 @@ Transactions ____________________________ 0 uptime: resJson.uptime, }); - const res = await executeChain(['status']); + const res = await executeChain('status'); expect(res).to.equal(` Difficulty ______________________________ ${resJson.difficulty} Node version ____________________________ 6.13.0 @@ -77,13 +76,13 @@ Syncing _________________________________ false }); it('plays by limit', async () => { - const res = await executeChain(['play', '--limit', '4']); + const res = await executeChain('play', '--limit', '4'); const blockCount = (output) => (output.match(/(Key|Micro)Block/g) || []).length; expect(blockCount(res)).to.be.equal(4); }); it('plays by height', async () => { - const res = await executeChain(['play', '--height', await sdk.getHeight() - 4]); + const res = await executeChain('play', '--height', await sdk.getHeight() - 4); const heights = res .split('\n') .filter((l) => l.includes('Block height')) @@ -93,13 +92,13 @@ Syncing _________________________________ false it('calculates ttl', async () => { const height = await sdk.getHeight(); - const resJson = await executeChain(['ttl', 10, '--json']); + const resJson = await executeChain('ttl', 10, '--json'); expect(resJson).to.eql({ absoluteTtl: 10, relativeTtl: 10 - height, }); - const res = await executeChain(['ttl', 10]); + const res = await executeChain('ttl', 10); expect(res).to.equal(` Absolute TTL ____________________________ 10 Relative TTL ____________________________ ${resJson.relativeTtl} diff --git a/test/contract.js b/test/contract.js index 0d7bc7eb..edbd130f 100644 --- a/test/contract.js +++ b/test/contract.js @@ -5,10 +5,9 @@ import { import { expect } from 'chai'; import { decode } from '@aeternity/aepp-sdk'; import { executeProgram, getSdk, WALLET_NAME } from './index.js'; -import contractProgram from '../src/commands/contract.js'; import CliError from '../src/utils/CliError.js'; -const executeContract = (args) => executeProgram(contractProgram, args); +const executeContract = executeProgram.bind(null, 'contract'); describe('Contract Module', function contractTests() { this.timeout(4000); @@ -32,27 +31,28 @@ describe('Contract Module', function contractTests() { }); it('compiles contract', async () => { - const { bytecode } = await executeContract(['compile', contractSourceFile, '--json']); + const { bytecode } = await executeContract('compile', contractSourceFile, '--json'); contractBytecode = bytecode; expect(bytecode).to.satisfy((b) => b.startsWith('cb_')); }); it('compiles contract using cli compiler', async () => { - const { bytecode } = await executeContract([ - 'compile', contractSourceFile, '--json', '--compilerUrl', 'cli', - ]); + const { bytecode } = await executeContract('compile', contractSourceFile, '--json', '--compilerUrl', 'cli'); expect(bytecode).to.equal(contractBytecode); }); describe('Deploy', () => { it('deploys contract', async () => { - const { address, transaction, descrPath } = await executeContract([ + const { address, transaction, descrPath } = await executeContract( 'deploy', - WALLET_NAME, '--password', 'test', - '--contractSource', contractSourceFile, + WALLET_NAME, + '--password', + 'test', + '--contractSource', + contractSourceFile, '[3]', '--json', - ]); + ); deployDescriptorFile = descrPath; const [name, add] = deployDescriptorFile.split('.deploy.'); contractAddress = address; @@ -64,14 +64,18 @@ describe('Contract Module', function contractTests() { it('deploys contract with custom descrPath', async () => { const descrPath = './not-existing/testDescriptor.json'; - const { address } = await executeContract([ + const { address } = await executeContract( 'deploy', - WALLET_NAME, '--password', 'test', - '--contractSource', contractSourceFile, - '--descrPath', descrPath, + WALLET_NAME, + '--password', + 'test', + '--contractSource', + contractSourceFile, + '--descrPath', + descrPath, '[3]', '--json', - ]); + ); expect(await fs.exists(descrPath)).to.be.equal(true); const descriptor = await fs.readJson(descrPath); expect(descriptor).to.eql({ @@ -121,197 +125,253 @@ describe('Contract Module', function contractTests() { it('deploys contract by bytecode', async () => { const contractBytecodeFile = 'test-artifacts/bytecode.bin'; await fs.outputFile(contractBytecodeFile, decode(contractBytecode)); - await executeContract([ + await executeContract( 'deploy', - WALLET_NAME, '--password', 'test', - '--contractAci', contractAciFile, - '--contractBytecode', contractBytecodeFile, + WALLET_NAME, + '--password', + 'test', + '--contractAci', + contractAciFile, + '--contractBytecode', + contractBytecodeFile, '[3]', '--json', - ]); + ); }); it('throws error if arguments invalid', async () => { const expectedError = process.version.startsWith('v18.') ? 'Unexpected end of JSON input' : 'Can\'t parse contract arguments: Expected \',\' or \']\' after array element in JSON at position 2'; - await expect(executeContract([ + await expect(executeContract( 'deploy', - WALLET_NAME, '--password', 'test', - '--contractSource', contractSourceFile, + WALLET_NAME, + '--password', + 'test', + '--contractSource', + contractSourceFile, '[3', '--json', - ])).to.be.rejectedWith(CliError, expectedError); + )).to.be.rejectedWith(CliError, expectedError); }); it('deploys contract with coins', async () => { - const { address } = await executeContract([ + const { address } = await executeContract( 'deploy', - WALLET_NAME, '--password', 'test', - '--contractSource', contractSourceFile, + WALLET_NAME, + '--password', + 'test', + '--contractSource', + contractSourceFile, '[3]', '--json', - '--amount', '1', - ]); + '--amount', + '1', + ); expect(await sdk.getBalance(address)).to.be.equal('1'); }); }); describe('Call', () => { it('calls contract', async () => { - const callResponse = await executeContract([ + const callResponse = await executeContract( 'call', '--json', - '--descrPath', deployDescriptorFile, - 'test', '[1, 2]', - WALLET_NAME, '--password', 'test', - ]); + '--descrPath', + deployDescriptorFile, + 'test', + '[1, 2]', + WALLET_NAME, + '--password', + 'test', + ); callResponse.result.returnValue.should.contain('cb_'); callResponse.decodedResult.should.be.equal('6'); }); it('overrides descriptor\'s address using --contractAddress', async () => { - await expect(executeContract([ + await expect(executeContract( 'call', '--json', - '--contractAddress', 'ct_test', - '--descrPath', deployDescriptorFile, - 'test', '[1, 2]', - WALLET_NAME, '--password', 'test', - ])).to.be.rejectedWith('Invalid name or address: ct_test'); + '--contractAddress', + 'ct_test', + '--descrPath', + deployDescriptorFile, + 'test', + '[1, 2]', + WALLET_NAME, + '--password', + 'test', + )).to.be.rejectedWith('Invalid name or address: ct_test'); }); it('throws error if descriptor file not exists', async () => { - await expect(executeContract([ + await expect(executeContract( 'call', '--json', - '--descrPath', `${deployDescriptorFile}test`, - 'test', '[1, 2]', - WALLET_NAME, '--password', 'test', - ])).to.be.rejectedWith('no such file or directory'); + '--descrPath', + `${deployDescriptorFile}test`, + 'test', + '[1, 2]', + WALLET_NAME, + '--password', + 'test', + )).to.be.rejectedWith('no such file or directory'); }); it('throws error when calls contract without wallet', async () => { - await expect(executeContract([ + await expect(executeContract( 'call', '--json', - '--descrPath', deployDescriptorFile, - 'test', '[1, 2]', - ])).to.be.rejectedWith(CliError, 'wallet_path is required for on-chain calls'); + '--descrPath', + deployDescriptorFile, + 'test', + '[1, 2]', + )).to.be.rejectedWith(CliError, 'wallet_path is required for on-chain calls'); }); it('calls contract static', async () => { - const callResponse = await executeContract([ + const callResponse = await executeContract( 'call', '--json', - '--descrPath', deployDescriptorFile, - 'test', '[1, 2]', + '--descrPath', + deployDescriptorFile, + 'test', + '[1, 2]', '--callStatic', - WALLET_NAME, '--password', 'test', - ]); + WALLET_NAME, + '--password', + 'test', + ); callResponse.result.returnValue.should.contain('cb_'); callResponse.decodedResult.should.equal('6'); }); it('calls contract static with dry run account', async () => { - const callResponse = await executeContract([ + const callResponse = await executeContract( 'call', '--json', - '--descrPath', deployDescriptorFile, - 'test', '[1, 2]', + '--descrPath', + deployDescriptorFile, + 'test', + '[1, 2]', '--callStatic', - ]); + ); callResponse.result.returnValue.should.contain('cb_'); expect(callResponse.result.callerId).to.equal('ak_11111111111111111111111111111111273Yts'); callResponse.decodedResult.should.equal('6'); }); it('returns Maps correctly', async () => { - const callResponse = await executeContract([ + const callResponse = await executeContract( 'call', '--json', - '--descrPath', deployDescriptorFile, + '--descrPath', + deployDescriptorFile, 'getMap', '--callStatic', - ]); + ); expect(callResponse.decodedResult).to.be.eql([['1', '2'], ['3', '4']]); }); it('calls contract by contract source and address', async () => { - const callResponse = await executeContract([ + const callResponse = await executeContract( 'call', '--json', - '--contractAddress', contractAddress, - '--contractSource', contractSourceFile, - 'test', '[1, 2]', - WALLET_NAME, '--password', 'test', - ]); + '--contractAddress', + contractAddress, + '--contractSource', + contractSourceFile, + 'test', + '[1, 2]', + WALLET_NAME, + '--password', + 'test', + ); callResponse.decodedResult.should.equal('6'); }); it('calls contract by contract ACI and address', async () => { - const callResponse = await executeContract([ + const callResponse = await executeContract( 'call', '--json', - '--contractAddress', contractAddress, - '--contractAci', contractAciFile, - 'test', '[1, 2]', - WALLET_NAME, '--password', 'test', - ]); + '--contractAddress', + contractAddress, + '--contractAci', + contractAciFile, + 'test', + '[1, 2]', + WALLET_NAME, + '--password', + 'test', + ); callResponse.decodedResult.should.equal('6'); }); it('calls contract with coins', async () => { - await executeContract([ + await executeContract( 'call', '--json', - '--descrPath', deployDescriptorFile, - 'pay', '[]', - WALLET_NAME, '--password', 'test', - '--amount', '0.000000001ae', - ]); + '--descrPath', + deployDescriptorFile, + 'pay', + '[]', + WALLET_NAME, + '--password', + 'test', + '--amount', + '0.000000001ae', + ); expect(await sdk.getBalance(contractAddress)).to.be.equal('1000000000'); }); }); describe('Calldata', () => { it('encodes calldata', async () => { - const { calldata } = await executeContract([ + const { calldata } = await executeContract( 'encode-calldata', - 'test', '[1, 2]', - '--contractSource', contractSourceFile, + 'test', + '[1, 2]', + '--contractSource', + contractSourceFile, '--json', - ]); + ); expect(calldata).to.be.equal('cb_KxGSiyA2KwIEFfUrtQ=='); }); it('encodes calldata by aci', async () => { - const { calldata } = await executeContract([ + const { calldata } = await executeContract( 'encode-calldata', - 'test', '[1, 2]', - '--contractAci', contractAciFile, + 'test', + '[1, 2]', + '--contractAci', + contractAciFile, '--json', - ]); + ); expect(calldata).to.be.equal('cb_KxGSiyA2KwIEFfUrtQ=='); }); it('encodes calldata by deploy descriptor', async () => { - const { calldata } = await executeContract([ + const { calldata } = await executeContract( 'encode-calldata', - 'test', '[1, 2]', - '--descrPath', deployDescriptorFile, + 'test', + '[1, 2]', + '--descrPath', + deployDescriptorFile, '--json', - ]); + ); expect(calldata).to.be.equal('cb_KxGSiyA2KwIEFfUrtQ=='); }); it('decodes call result', async () => { - const { decoded } = await executeContract([ + const { decoded } = await executeContract( 'decode-call-result', - 'test', 'cb_BvMDXHk=', - '--contractSource', contractSourceFile, + 'test', + 'cb_BvMDXHk=', + '--contractSource', + contractSourceFile, '--json', - ]); + ); decoded.should.be.equal('3'); }); }); diff --git a/test/index.js b/test/index.js index 27061639..7c299184 100644 --- a/test/index.js +++ b/test/index.js @@ -5,7 +5,7 @@ import mockFs from 'mock-fs'; import { AeSdk, MemoryAccount, Node, generateKeyPair, CompilerHttpNode, } from '@aeternity/aepp-sdk'; -import accountProgram from '../src/commands/account.js'; +import program from '../src/commands/main.js'; import { prepareOptions } from '../src/utils/default-option-description.js'; before(() => { @@ -66,7 +66,7 @@ function setProgramOptions(command, options) { } let isProgramExecuting = false; -export async function executeProgram(program, args) { +export async function executeProgram(...args) { if (isProgramExecuting) throw new Error('Another program is already running'); isProgramExecuting = true; let result = ''; @@ -90,20 +90,17 @@ export async function executeProgram(program, args) { ...args.map((arg) => arg.toString()), ...['config', 'select-node', 'select-compiler'].includes(args[0]) || ( - program.name() === 'aecli account' - && ['save', 'create', 'address', 'sign-message', 'verify-message'].includes(args[0]) + args[0] === 'account' + && ['save', 'create', 'address', 'sign-message', 'verify-message'].includes(args[1]) ) || ( - program.name() === 'aecli contract' - && ['compile', 'encode-calldata', 'decode-call-result'].includes(args[0])) - || (program.name() === 'aecli tx' && args[0] !== 'verify') ? [] : ['--url', url], + args[0] === 'contract' + && ['compile', 'encode-calldata', 'decode-call-result'].includes(args[1])) + || (args[0] === 'tx' && args[1] !== 'verify') ? [] : ['--url', url], ...[ 'compile', 'deploy', 'call', 'encode-calldata', 'decode-call-result', - ].includes(args[0]) && !args.includes('--compilerUrl') ? ['--compilerUrl', compilerUrl] : [], + ].includes(args[1]) && !args.includes('--compilerUrl') ? ['--compilerUrl', compilerUrl] : [], ]; - if (allArgs.some((a) => !['string', 'number'].includes(typeof a))) { - throw new Error(`Invalid arguments: [${allArgs.join(', ')}]`); - } await program.parseAsync(allArgs, { from: 'user' }); } finally { console.log = log; @@ -127,7 +124,7 @@ export async function getSdk() { accounts: [new MemoryAccount(tempKeyPair.secretKey)], }); await Promise.all([ - executeProgram(accountProgram, ['create', WALLET_NAME, '--password', 'test', tempKeyPair.secretKey, '--overwrite']), + executeProgram('account', 'create', WALLET_NAME, '--password', 'test', tempKeyPair.secretKey, '--overwrite'), sdk.spend(5e19, tempKeyPair.publicKey, { onAccount: new MemoryAccount(keypair.secretKey) }), ]); return sdk; diff --git a/test/inspect.js b/test/inspect.js index fb5821c5..0b32b441 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -4,11 +4,9 @@ import { AbiVersion, generateKeyPair, produceNameId, Tag, VmVersion, } from '@aeternity/aepp-sdk'; import { executeProgram, expectToMatchLines, getSdk } from './index.js'; -import inspectProgram from '../src/commands/inspect.js'; -import chainProgram from '../src/commands/chain.js'; -const executeInspect = (args) => executeProgram(inspectProgram, args); -const executeChain = (args) => executeProgram(chainProgram, args); +const executeInspect = executeProgram.bind(null, 'inspect'); +const executeChain = executeProgram.bind(null, 'chain'); describe('Inspect Module', () => { let sdk; @@ -19,14 +17,14 @@ describe('Inspect Module', () => { it('Inspect Account', async () => { const balance = await sdk.getBalance(sdk.address); - const resJson = await executeInspect([sdk.address, '--json']); + const resJson = await executeInspect(sdk.address, '--json'); expect(resJson).to.eql({ balance, hash: sdk.address, nonce: resJson.nonce, transactions: [], }); - const res = await executeInspect([sdk.address]); + const res = await executeInspect(sdk.address); expect(res).to.equal(` Account ID ______________________________ ${sdk.address} Account balance _________________________ ${balance} @@ -39,7 +37,7 @@ Pending transactions: const recipient = (generateKeyPair()).publicKey; const amount = '420'; const { hash } = await sdk.spend(amount, recipient); - const resJson = await executeInspect([hash, '--json']); + const resJson = await executeInspect(hash, '--json'); expect(resJson.tx.fee).to.be.a('string'); expect(resJson).to.eql({ blockHash: resJson.blockHash, @@ -59,7 +57,7 @@ Pending transactions: version: 1, }, }); - const res = await executeInspect([hash]); + const res = await executeInspect(hash); expectToMatchLines(res, [ `Transaction hash ________________________ ${resJson.hash}`, `Block hash ______________________________ ${resJson.blockHash}`, @@ -83,7 +81,7 @@ Pending transactions: const tx = await sdk.buildTx({ tag: Tag.SpendTx, amount, recipientId, senderId: sdk.address, }); - const resJson = await executeInspect([tx, '--json']); + const resJson = await executeInspect(tx, '--json'); expect(resJson).to.eql({ amount, fee: '16700000000000', @@ -95,7 +93,7 @@ Pending transactions: ttl: 0, version: 1, }); - const res = await executeInspect([tx]); + const res = await executeInspect(tx); expect(res).to.equal(` Tx Type _________________________________ SpendTx tag _____________________________________ 12 @@ -111,9 +109,9 @@ payload _________________________________ ba_Xfbg4g== }); it('Inspect Block', async () => { - const { prevKeyHash } = await executeChain(['top', '--json']); + const { prevKeyHash } = await executeChain('top', '--json'); - const keyJson = await executeInspect([prevKeyHash, '--json']); + const keyJson = await executeInspect(prevKeyHash, '--json'); expect(keyJson).to.eql({ beneficiary: keyJson.beneficiary, hash: keyJson.hash, @@ -127,7 +125,7 @@ payload _________________________________ ba_Xfbg4g== time: keyJson.time, version: 5, }); - const key = await executeInspect([prevKeyHash]); + const key = await executeInspect(prevKeyHash); expect(key.split('\nTransactions')[0]).to.equal(` <<--------------- KeyBlock --------------->> Block hash ______________________________ ${keyJson.hash} @@ -145,9 +143,9 @@ Target __________________________________ ${keyJson.target} let microHash = keyJson.prevHash; while (microHash.startsWith('kh_')) { // eslint-disable-next-line no-await-in-loop - microHash = (await executeInspect([microHash, '--json'])).prevHash; + microHash = (await executeInspect(microHash, '--json')).prevHash; } - const microJson = await executeInspect([microHash, '--json']); + const microJson = await executeInspect(microHash, '--json'); expect(microJson).to.eql({ hash: microJson.hash, height: microJson.height, @@ -161,7 +159,7 @@ Target __________________________________ ${keyJson.target} txsHash: microJson.txsHash, version: 5, }); - const micro = await executeInspect([microHash]); + const micro = await executeInspect(microHash); expect(micro.split('\nTransactions')[0]).to.equal(` <<--------------- MicroBlock --------------->> Block hash ______________________________ ${microJson.hash} @@ -185,7 +183,7 @@ contract Identity = `, }); const { address } = await contract.$deploy([]); - const resJson = await executeInspect([address, '--json']); + const resJson = await executeInspect(address, '--json'); expect(resJson).to.eql({ abiVersion: AbiVersion.Fate.toString(), active: true, @@ -195,7 +193,7 @@ contract Identity = referrerIds: [], vmVersion: VmVersion.Fate2.toString(), }); - const res = await executeInspect([address]); + const res = await executeInspect(address); expect(res).to.equal(` id ______________________________________ ${address} ownerId _________________________________ ${sdk.address} @@ -209,7 +207,7 @@ deposit _________________________________ 0 it('Inspect Oracle', async () => { const { id } = await sdk.registerOracle('', ''); - const resJson = await executeInspect([id, '--json']); + const resJson = await executeInspect(id, '--json'); expect(resJson).to.eql({ id, abiVersion: AbiVersion.NoAbi.toString(), @@ -219,7 +217,7 @@ deposit _________________________________ 0 responseFormat: '', ttl: resJson.ttl, }); - const res = await executeInspect([id]); + const res = await executeInspect(id); expect(res).to.equal(` Oracle ID _______________________________ ${id} Oracle Query Fee ________________________ 0 @@ -232,18 +230,18 @@ Ttl _____________________________________ ${resJson.ttl} }); it('Inspect Invalid Name', async () => { - await expect(executeInspect(['asd', '--json'])).to.be.rejectedWith('Name should end with .chain'); + await expect(executeInspect('asd', '--json')).to.be.rejectedWith('Name should end with .chain'); }); const name = `nazdou${Math.random().toString().slice(2, 9)}.chain`; it('Inspect Unclaimed Name', async () => { - const resJson = await executeInspect([name, '--json']); + const resJson = await executeInspect(name, '--json'); expect(resJson).to.eql({ id: produceNameId(name), status: 'AVAILABLE', }); - const res = await executeInspect([name]); + const res = await executeInspect(name); expect(res).to.equal(` Status __________________________________ AVAILABLE Name hash _______________________________ ${produceNameId(name)} @@ -256,7 +254,7 @@ Name hash _______________________________ ${produceNameId(name)} account_pubkey: sdk.address, oracle_pubkey: sdk.address, }); - const resJson = await executeInspect([name, '--json']); + const resJson = await executeInspect(name, '--json'); expect(resJson).to.eql({ id: resJson.id, owner: sdk.address, @@ -268,7 +266,7 @@ Name hash _______________________________ ${produceNameId(name)} status: 'CLAIMED', ttl: resJson.ttl, }); - const res = await executeInspect([name]); + const res = await executeInspect(name); expectToMatchLines(res, [ 'Status __________________________________ CLAIMED', `Name hash _______________________________ ${resJson.id}`, @@ -283,7 +281,7 @@ Name hash _______________________________ ${produceNameId(name)} it('Inspect Running Auction Name', async () => { const auctionName = `a${Math.random().toString().slice(2, 9)}.chain`; await (await sdk.aensPreclaim(auctionName)).claim(); - const resJson = await executeInspect([auctionName, '--json']); + const resJson = await executeInspect(auctionName, '--json'); const endsAt = +resJson.startedAt + 14880; expect(resJson).to.eql({ endsAt: String(endsAt), @@ -293,7 +291,7 @@ Name hash _______________________________ ${produceNameId(name)} startedAt: resJson.startedAt, status: 'AUCTION', }); - const res = await executeInspect([auctionName]); + const res = await executeInspect(auctionName); expect(res).to.equal(` Status __________________________________ AUCTION Name hash _______________________________ ${resJson.id} diff --git a/test/name.js b/test/name.js index 3032e5b7..30bb42ae 100644 --- a/test/name.js +++ b/test/name.js @@ -4,13 +4,10 @@ import { expect } from 'chai'; import { executeProgram, randomName, getSdk, WALLET_NAME, } from './index.js'; -import nameProgram from '../src/commands/name.js'; -import inspectProgram from '../src/commands/inspect.js'; -import spendProgram from '../src/commands/spend.js'; -const executeName = (args) => executeProgram(nameProgram, args); -const executeInspect = (args) => executeProgram(inspectProgram, args); -const executeSpend = (args) => executeProgram(spendProgram, args); +const executeName = executeProgram.bind(null, 'name'); +const executeInspect = executeProgram.bind(null, 'inspect'); +const executeSpend = executeProgram.bind(null, 'spend'); describe('AENS Module', () => { const { publicKey } = generateKeyPair(); @@ -24,14 +21,14 @@ describe('AENS Module', () => { }); it('Full claim', async () => { - const updateTx = await executeName([ + const updateTx = await executeName( 'full-claim', WALLET_NAME, '--password', 'test', randomName(13), '--json', - ]); + ); updateTx.blockHeight.should.be.gt(0); const pointer = updateTx.pointers.find(({ id }) => id === sdk.address); @@ -39,7 +36,7 @@ describe('AENS Module', () => { }).timeout(10000); it('Full claim with options', async () => { - const updateTx = await executeName([ + const updateTx = await executeName( 'full-claim', WALLET_NAME, '--password', @@ -52,7 +49,7 @@ describe('AENS Module', () => { '3865700000000000000', '--clientTtl', 50, - ]); + ); updateTx.blockHeight.should.be.gt(0); updateTx.tx.nameTtl.should.be.equal(50); @@ -62,15 +59,15 @@ describe('AENS Module', () => { }).timeout(10000); it('Pre Claim Name', async () => { - const preClaim = await executeName([ + const preClaim = await executeName( 'pre-claim', WALLET_NAME, '--password', 'test', name2, '--json', - ]); - const nameResult = await executeInspect([name2, '--json']); + ); + const nameResult = await executeInspect(name2, '--json'); salt = preClaim.salt; preClaim.blockHeight.should.be.gt(0); @@ -81,7 +78,7 @@ describe('AENS Module', () => { }).timeout(4000); it('Claim Name', async () => { - const claim = await executeName([ + const claim = await executeName( 'claim', WALLET_NAME, '--password', @@ -89,8 +86,8 @@ describe('AENS Module', () => { name2, salt, '--json', - ]); - const nameResult = await executeInspect([name2, '--json']); + ); + const nameResult = await executeInspect(name2, '--json'); claim.blockHeight.should.be.gt(0); claim.pointers.length.should.be.equal(0); @@ -98,7 +95,7 @@ describe('AENS Module', () => { }).timeout(10000); it('Update Name', async () => { - const updateTx = await executeName([ + const updateTx = await executeName( 'update', WALLET_NAME, name2, @@ -106,8 +103,8 @@ describe('AENS Module', () => { '--password', 'test', '--json', - ]); - const nameResult = await executeInspect([name2, '--json']); + ); + const nameResult = await executeInspect(name2, '--json'); updateTx.blockHeight.should.be.gt(0); const isUpdatedNode = !!nameResult.pointers.find( @@ -119,7 +116,7 @@ describe('AENS Module', () => { it('extend name ttl', async () => { const height = await sdk.getHeight(); - const extendTx = await executeName([ + const extendTx = await executeName( 'extend', WALLET_NAME, name2, @@ -127,43 +124,41 @@ describe('AENS Module', () => { '--password', 'test', '--json', - ]); + ); expect(extendTx.blockHeight - height).within(0, 3); - const nameResult = await executeInspect([name2, '--json']); + const nameResult = await executeInspect(name2, '--json'); expect(nameResult.ttl - extendTx.blockHeight).to.be.equal(50); expect(nameResult.status).to.equal('CLAIMED'); }); it('extend name with max ttl', async () => { - const extendTx = await executeName([ - 'extend', WALLET_NAME, name2, '--password', 'test', '--json', - ]); - const nameResult = await executeInspect([name2, '--json']); + const extendTx = await executeName('extend', WALLET_NAME, name2, '--password', 'test', '--json'); + const nameResult = await executeInspect(name2, '--json'); expect(nameResult.ttl - extendTx.blockHeight).to.be.equal(180000); }); it('Fail spend by name on invalid input', async () => { const amount = 100000009; - await executeSpend([ + await executeSpend( WALLET_NAME, '--password', 'test', 'sdasdaasdas', amount, '--json', - ]).should.be.rejectedWith('Invalid name or address'); + ).should.be.rejectedWith('Invalid name or address'); }); it('Spend by name', async () => { const amount = 100000009; - const { tx: { recipientId } } = await executeSpend([ + const { tx: { recipientId } } = await executeSpend( WALLET_NAME, '--password', 'test', name2, amount, '--json', - ]); + ); const nameObject = await sdk.aensQuery(name2); recipientId.should.be.equal(nameObject.id); @@ -174,7 +169,7 @@ describe('AENS Module', () => { it('Transfer name', async () => { const keypair = generateKeyPair(); - const transferTx = await executeName([ + const transferTx = await executeName( 'transfer', WALLET_NAME, name2, @@ -182,7 +177,7 @@ describe('AENS Module', () => { '--password', 'test', '--json', - ]); + ); transferTx.blockHeight.should.be.gt(0); await sdk.spend(1, keypair.publicKey, { denomination: 'ae' }); @@ -193,30 +188,30 @@ describe('AENS Module', () => { }); it('Revoke Name', async () => { - const revoke = await executeName([ + const revoke = await executeName( 'revoke', WALLET_NAME, '--password', 'test', name2, '--json', - ]); + ); - const nameResult = await executeInspect([name2, '--json']); + const nameResult = await executeInspect(name2, '--json'); revoke.blockHeight.should.be.gt(0); nameResult.status.should.equal('REVOKED'); }); it('can\'t claim revoked name', async () => { - await executeName([ + await executeName( 'pre-claim', WALLET_NAME, '--password', 'test', name2, '--json', - ]).should.be.rejectedWith('AENS name is REVOKED and cannot be preclaimed'); + ).should.be.rejectedWith('AENS name is REVOKED and cannot be preclaimed'); }); describe('Name Auction', () => { @@ -231,7 +226,7 @@ describe('AENS Module', () => { }).timeout(10000); it('Make bid', async () => { - const bid = await executeName([ + const bid = await executeName( 'bid', WALLET_NAME, '--password', @@ -239,21 +234,21 @@ describe('AENS Module', () => { name, nameFee, '--json', - ]); + ); bid.tx.nameSalt.should.be.equal(0); bid.tx.nameFee.should.be.equal(nameFee); }); it('Fail on open again', async () => { - await executeName([ + await executeName( 'pre-claim', WALLET_NAME, '--password', 'test', name, '--json', - ]).should.be.rejectedWith('AENS name is AUCTION and cannot be preclaimed'); + ).should.be.rejectedWith('AENS name is AUCTION and cannot be preclaimed'); }); }); }); diff --git a/test/oracle.js b/test/oracle.js index 12d7b27d..293f09a6 100644 --- a/test/oracle.js +++ b/test/oracle.js @@ -2,9 +2,8 @@ import { AbiVersion, generateKeyPair } from '@aeternity/aepp-sdk'; import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { executeProgram, getSdk, WALLET_NAME } from './index.js'; -import oracleProgram from '../src/commands/oracle.js'; -const executeOracle = (args) => executeProgram(oracleProgram, args); +const executeOracle = executeProgram.bind(null, 'oracle'); describe('Oracle Module', () => { const oracleFormat = 'string'; @@ -18,10 +17,17 @@ describe('Oracle Module', () => { }); it('Oracle create', async () => { - const oracleCreate = await executeOracle([ - 'create', WALLET_NAME, '--password', 'test', oracleFormat, responseFormat, '--json', - '--oracleTtl', 420, - ]); + const oracleCreate = await executeOracle( + 'create', + WALLET_NAME, + '--password', + 'test', + oracleFormat, + responseFormat, + '--json', + '--oracleTtl', + 420, + ); expect(oracleCreate.ttl).to.be.equal(oracleCreate.blockHeight + 420); oracleCreate.blockHeight.should.be.gt(0); oracleCreate.queryFormat.should.be.equal(oracleFormat); @@ -31,18 +37,25 @@ describe('Oracle Module', () => { it('Oracle extend', async () => { const oracle = await sdk.getOracleObject(oracleId); - const oracleExtend = await executeOracle([ - 'extend', WALLET_NAME, '--password', 'test', 42, '--json', - ]); + const oracleExtend = await executeOracle('extend', WALLET_NAME, '--password', 'test', 42, '--json'); oracleExtend.blockHeight.should.be.gt(0); expect(oracleExtend.ttl).to.be.equal(oracle.ttl + 42); }); it('Oracle create query', async () => { - const oracleQuery = await executeOracle([ - 'create-query', WALLET_NAME, '--password', 'test', oracleId, 'Hello?', '--json', - '--queryTtl', 42, '--responseTtl', 21, - ]); + const oracleQuery = await executeOracle( + 'create-query', + WALLET_NAME, + '--password', + 'test', + oracleId, + 'Hello?', + '--json', + '--queryTtl', + 42, + '--responseTtl', + 21, + ); expect(oracleQuery.ttl).to.be.equal(oracleQuery.blockHeight + 42); expect(oracleQuery.responseTtl).to.be.eql({ type: 'delta', value: '21' }); oracleQuery.blockHeight.should.be.gt(0); @@ -54,10 +67,17 @@ describe('Oracle Module', () => { }); it('Oracle respond to query', async () => { - const oracleQueryResponse = await executeOracle([ - 'respond-query', WALLET_NAME, '--password', 'test', queryId, 'Hi!', '--json', - '--responseTtl', 21, - ]); + const oracleQueryResponse = await executeOracle( + 'respond-query', + WALLET_NAME, + '--password', + 'test', + queryId, + 'Hi!', + '--json', + '--responseTtl', + 21, + ); expect(oracleQueryResponse.queries[0].ttl).to.be.equal(oracleQueryResponse.blockHeight + 21); oracleQueryResponse.blockHeight.should.be.gt(0); const oracle = await sdk.getOracleObject(oracleId); @@ -67,14 +87,14 @@ describe('Oracle Module', () => { it('Get non existing Oracle', async () => { const fakeOracleId = generateKeyPair().publicKey.replace('ak_', 'ok_'); - await executeOracle(['get', fakeOracleId, '--json']) + await executeOracle('get', fakeOracleId, '--json') .should.be.rejectedWith('error: Oracle not found'); - await executeOracle(['get', 'oq_d1sadasdasda', '--json']) + await executeOracle('get', 'oq_d1sadasdasda', '--json') .should.be.rejectedWith('Encoded string have a wrong type: oq (expected: ok)'); }); it('Get Oracle', async () => { - const resJson = await executeOracle(['get', oracleId, '--json']); + const resJson = await executeOracle('get', oracleId, '--json'); expect(resJson).to.eql({ abiVersion: AbiVersion.NoAbi.toString(), id: oracleId, @@ -98,7 +118,7 @@ describe('Oracle Module', () => { ttl: resJson.ttl, }); - const res = await executeOracle(['get', oracleId]); + const res = await executeOracle('get', oracleId); expect(res).to.equal(` Oracle ID _______________________________ ${oracleId} Oracle Query Fee ________________________ 0 diff --git a/test/other.js b/test/other.js index bfbb83a8..256a112d 100644 --- a/test/other.js +++ b/test/other.js @@ -1,28 +1,27 @@ import { describe, it } from 'mocha'; import { expect } from 'chai'; import { executeProgram } from './index.js'; -import mainProgram from '../src/commands/main.js'; describe('Other tests', () => { it('Config', async () => { - expect(await executeProgram(mainProgram, ['config'])).to.equal( + expect(await executeProgram('config')).to.equal( 'Node https://mainnet.aeternity.io network id ae_mainnet, version 6.13.0, protocol 5 (Iris)\n' + 'Compiler https://v7.compiler.aepps.com version 7.4.0', ); }).timeout(4000); it('selects node', async () => { - expect(await executeProgram(mainProgram, ['select-node', 'http://example.com/node'])) + expect(await executeProgram('select-node', 'http://example.com/node')) .to.equal(''); }); it('fails if invalid url', async () => { - await expect(executeProgram(mainProgram, ['select-node', 'example.com/node'])) + await expect(executeProgram('select-node', 'example.com/node')) .to.be.rejectedWith('Invalid URL'); }); it('selects compiler', async () => { - expect(await executeProgram(mainProgram, ['select-compiler', 'http://example.com/node'])) + expect(await executeProgram('select-compiler', 'http://example.com/node')) .to.equal(''); }); }); diff --git a/test/spend.js b/test/spend.js index 043aeb17..3e97cb39 100644 --- a/test/spend.js +++ b/test/spend.js @@ -4,11 +4,8 @@ import { generateKeyPair } from '@aeternity/aepp-sdk'; import { getSdk, executeProgram, WALLET_NAME, expectToMatchLines, } from './index.js'; -import spendProgram from '../src/commands/spend.js'; -const executeSpend = (args) => ( - executeProgram(spendProgram, [WALLET_NAME, '--password', 'test', ...args]) -); +const executeSpend = executeProgram.bind(null, 'spend', WALLET_NAME, '--password', 'test'); describe('Spend', () => { let sdk; @@ -20,7 +17,7 @@ describe('Spend', () => { it('spends', async () => { const amount = 100; const { publicKey } = generateKeyPair(); - const resJson = await executeSpend([publicKey, amount, '--json']); + const resJson = await executeSpend(publicKey, amount, '--json'); const receiverBalance = await sdk.getBalance(publicKey); expect(+receiverBalance).to.be.equal(amount); @@ -45,7 +42,7 @@ describe('Spend', () => { }, }); - const res = await executeSpend([publicKey, amount]); + const res = await executeSpend(publicKey, amount); expectToMatchLines(res, [ 'Transaction mined', /Transaction hash ________________________ th_\w+/, @@ -66,9 +63,7 @@ describe('Spend', () => { it('spends in ae', async () => { const receiverKeys = generateKeyPair(); - const { tx: { fee } } = await executeSpend([ - '--json', receiverKeys.publicKey, '1ae', '--fee', '0.02ae', - ]); + const { tx: { fee } } = await executeSpend('--json', receiverKeys.publicKey, '1ae', '--fee', '0.02ae'); expect(await sdk.getBalance(receiverKeys.publicKey)).to.be.equal('1000000000000000000'); expect(fee).to.be.equal('20000000000000000'); }); @@ -76,7 +71,7 @@ describe('Spend', () => { it('spends percent of balance', async () => { const { publicKey } = generateKeyPair(); const balanceBefore = await sdk.getBalance(sdk.address); - await executeSpend([publicKey, '42%']); + await executeSpend(publicKey, '42%'); expect(+await sdk.getBalance(publicKey)).to.be.equal(balanceBefore * 0.42); }); @@ -88,7 +83,7 @@ describe('Spend', () => { + ' entrypoint init() = { key = 0 }\n', }); const { address } = await contract.$deploy([]); - await executeSpend([address, 100]); + await executeSpend(address, 100); expect(await sdk.getBalance(address)).to.be.equal('100'); }); }); diff --git a/test/tx.js b/test/tx.js index 5854f310..917e280c 100644 --- a/test/tx.js +++ b/test/tx.js @@ -6,12 +6,8 @@ import { expect } from 'chai'; import { executeProgram, randomName, getSdk, networkId, expectToMatchLines, WALLET_NAME, } from './index.js'; -import txProgram from '../src/commands/tx.js'; -import accountProgram from '../src/commands/account.js'; -import chainProgram from '../src/commands/chain.js'; -import inspectProgram from '../src/commands/inspect.js'; -const executeTx = (args) => executeProgram(txProgram, args); +const executeTx = executeProgram.bind(null, 'tx'); const testContract = ` @compiler >= 6 @@ -39,7 +35,7 @@ describe('Transaction Module', () => { const amount = 100; const args = ['spend', sdk.address, sdk.address, amount, nonce]; - const responseJson = await executeTx([...args, '--json']); + const responseJson = await executeTx(...args, '--json'); expect(responseJson.tx).to.satisfy((s) => s.startsWith(Encoding.Transaction)); expect(responseJson).to.eql({ tx: responseJson.tx, @@ -56,7 +52,7 @@ describe('Transaction Module', () => { }, }); - const response = await executeTx(args); + const response = await executeTx(...args); expect(response).to.equal(` Transaction type ________________________ SpendTx Summary @@ -76,10 +72,10 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su }); it('signs tx', async () => { - const { tx } = await executeTx(['spend', sdk.address, sdk.address, 100, nonce, '--json']); + const { tx } = await executeTx('spend', sdk.address, sdk.address, 100, nonce, '--json'); const args = ['sign', WALLET_NAME, tx, '--password', 'test', '--networkId', networkId]; - const responseJson = await executeProgram(accountProgram, [...args, '--json']); + const responseJson = await executeProgram('account', ...args, '--json'); expect(responseJson.signedTx).to.satisfy((s) => s.startsWith(Encoding.Transaction)); expect(responseJson).to.eql({ address: sdk.address, @@ -87,7 +83,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su signedTx: responseJson.signedTx, }); - const response = await executeProgram(accountProgram, args); + const response = await executeProgram('account', ...args); expectToMatchLines(response, [ `Signing account address _________________ ${sdk.address}`, 'Network ID ______________________________ ae_dev', @@ -97,18 +93,15 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su }); async function signAndPostAndInspect(txEncoded) { - const { signedTx } = await executeProgram( - accountProgram, - ['sign', WALLET_NAME, txEncoded, '--password', 'test', '--json', '--networkId', networkId], - ); - const broadcast = await executeProgram(chainProgram, ['broadcast', signedTx, '--json']); + const { signedTx } = await executeProgram('account', 'sign', WALLET_NAME, txEncoded, '--password', 'test', '--json', '--networkId', networkId); + const broadcast = await executeProgram('chain', 'broadcast', signedTx, '--json'); expect(+broadcast.blockHeight).to.be.above(0); const txHash = buildTxHash(signedTx); const { blockHash, blockHeight, hash, signatures, tx, encodedTx, ...otherDetailsJson - } = await executeProgram(inspectProgram, [txHash, '--json']); - const details = await executeProgram(inspectProgram, [txHash]); + } = await executeProgram('inspect', txHash, '--json'); + const details = await executeProgram('inspect', txHash); expect(encodedTx).to.be.satisfy((t) => t.startsWith('tx_')); expect(otherDetailsJson).to.eql({}); @@ -131,7 +124,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds spend tx and sends', async () => { const amount = 100; nonce += 1; - const { tx } = await executeTx(['spend', sdk.address, sdk.address, amount, nonce, '--json']); + const { tx } = await executeTx('spend', sdk.address, sdk.address, amount, nonce, '--json'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -159,7 +152,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name preclaim tx and sends', async () => { nonce += 1; - const { tx, salt: nameSalt } = await executeTx(['name-preclaim', sdk.address, name, nonce, '--json']); + const { tx, salt: nameSalt } = await executeTx('name-preclaim', sdk.address, name, nonce, '--json'); salt = nameSalt; const [detailsJson, details] = await signAndPostAndInspect(tx); @@ -185,7 +178,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name claim tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['name-claim', sdk.address, salt, name, nonce, '--json']); + const { tx } = await executeTx('name-claim', sdk.address, salt, name, nonce, '--json'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.nameSalt).to.be.a('number'); @@ -216,7 +209,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name update tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['name-update', sdk.address, nameId, nonce, sdk.address, '--json']); + const { tx } = await executeTx('name-update', sdk.address, nameId, nonce, sdk.address, '--json'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -246,7 +239,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name transfer tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['name-transfer', sdk.address, sdk.address, nameId, nonce, '--json']); + const { tx } = await executeTx('name-transfer', sdk.address, sdk.address, nameId, nonce, '--json'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -272,7 +265,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds name revoke tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['name-revoke', sdk.address, nameId, nonce, '--json']); + const { tx } = await executeTx('name-revoke', sdk.address, nameId, nonce, '--json'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -301,14 +294,14 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su const bytecode = await contract.$compile(); // eslint-disable-next-line no-underscore-dangle const callData = contract._calldata.encode(contract._name, 'init', []); - const { tx, contractId: cId } = await executeTx([ + const { tx, contractId: cId } = await executeTx( 'contract-deploy', sdk.address, bytecode, callData, nonce, '--json', - ]); + ); contractId = cId; const [detailsJson, details] = await signAndPostAndInspect(tx); @@ -348,7 +341,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su nonce += 1; // eslint-disable-next-line no-underscore-dangle const callData = contract._calldata.encode(contract._name, 'test', ['1', '2']); - const { tx } = await executeTx(['contract-call', sdk.address, contractId, callData, nonce, '--json', '--amount', '0.00000042ae']); + const { tx } = await executeTx('contract-call', sdk.address, contractId, callData, nonce, '--json', '--amount', '0.00000042ae'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -382,7 +375,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle register tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['oracle-register', sdk.address, '{city: "str"}', '{tmp:""num}', nonce, '--json']); + const { tx } = await executeTx('oracle-register', sdk.address, '{city: "str"}', '{tmp:""num}', nonce, '--json'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -415,7 +408,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle extend tx and sends', async () => { const oracleCurrentTtl = await sdk.api.getOracleByPubkey(oracleId); nonce += 1; - const { tx } = await executeTx(['oracle-extend', oracleId, 100, nonce, '--json']); + const { tx } = await executeTx('oracle-extend', oracleId, 100, nonce, '--json'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -443,7 +436,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle post query tx and sends', async () => { nonce += 1; - const { tx } = await executeTx(['oracle-post-query', sdk.address, oracleId, '{city: "Berlin"}', nonce, '--json']); + const { tx } = await executeTx('oracle-post-query', sdk.address, oracleId, '{city: "Berlin"}', nonce, '--json'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); @@ -481,7 +474,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su it('builds oracle respond tx and sends', async () => { const response = '{tmp: 10}'; nonce += 1; - const { tx } = await executeTx(['oracle-respond', oracleId, queryId, response, nonce, '--json']); + const { tx } = await executeTx('oracle-respond', oracleId, queryId, response, nonce, '--json'); const [detailsJson, details] = await signAndPostAndInspect(tx); expect(detailsJson.fee).to.be.a('string'); From 8b8a2ab656af29bbb58fb938857bd205522dbf69 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Thu, 11 Apr 2024 14:49:25 +1000 Subject: [PATCH 77/88] docs: drop the old way to generate --- .github/workflows/main.yml | 1 - .gitignore | 10 ------- package.json | 4 +-- scripts/js-to-md.js | 57 -------------------------------------- 4 files changed, 1 insertion(+), 71 deletions(-) delete mode 100755 scripts/js-to-md.js diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14445158..a8dbd650 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,6 @@ jobs: BASE: ${{ github.event.pull_request.base.sha }} run: npx commitlint --from $BASE --to $HEAD --verbose - run: npm run lint - - run: npm run docs - run: docker compose up -d --wait - run: npx c8 npm test - run: npx c8 report --reporter=text-lcov > coverage.lcov diff --git a/.gitignore b/.gitignore index 83770e98..73143172 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,4 @@ node_modules -docs -/test-results.xml -.tern-port -.tern-project -.dir-locals.el -/.envrc -/yarn-error.log .idea -/docker-compose.override.yml -/pnpm-debug.log -bin /coverage /coverage.lcov diff --git a/package.json b/package.json index f6eb3e27..448c7a22 100644 --- a/package.json +++ b/package.json @@ -34,13 +34,11 @@ "url": "git+https://github.com/aeternity/aepp-cli-js.git" }, "scripts": { - "docs": "scripts/js-to-md.js src/*.js src/commands/*.js src/actions/*.js src/utils/*.js", "commitlint": "commitlint --from develop", "lint": "eslint .", "test": "mocha", "test:watch": "mocha --watch", - "release": "standard-version --skip.tag", - "prepublishOnly": "npm run docs" + "release": "standard-version --skip.tag" }, "keywords": [ "CLI", diff --git a/scripts/js-to-md.js b/scripts/js-to-md.js deleted file mode 100755 index 328ebe13..00000000 --- a/scripts/js-to-md.js +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env node - -import path from 'path'; -import fs from 'fs-extra'; - -function splitCodeIntoBlocks(text) { - const content = []; - while (text) { - const commentIndex = text.search(/\n *\//); - switch (commentIndex) { - case -1: - content.push({ type: 'code', content: text }); - return content; - case 0: - text = text.slice(commentIndex).trimStart().slice(1); - break; - default: - content.push({ type: 'code', content: text.slice(0, commentIndex) }); - text = text.slice(commentIndex).trimStart().slice(1); - break; - } - switch (text[0]) { - case '/': - content.push({ type: 'comment', content: text.slice(1, text.indexOf('\n')) }); - text = text.slice(text.indexOf('\n')); - break; - case '*': - content.push({ type: 'comment', content: text.slice(1, text.indexOf('*/')) }); - text = text.slice(text.indexOf('*/') + 2); - break; - default: - throw new Error(`Parsing failed, unknown char: ${text[0]}`); - } - } - return content; -} - -process.argv.slice(2).forEach(async (fileName) => { - const inputFilePath = path.resolve(process.cwd(), fileName); - const text = await fs.readFile(inputFilePath).toString(); - - const textMd = splitCodeIntoBlocks(text) - .map(({ type, content }) => ({ - type, - content: type === 'code' ? content.replace(/^\n+|\n+$/g, '') : content.replace(/^ /, ''), - })) - .filter(({ type, content }) => type !== 'code' || content) - .filter(({ content }) => !content.includes('License')) - .filter(({ content }) => !content.includes('#!/')) - .map(({ type, content }) => (type === 'code' ? `\`\`\`js\n${content}\n\`\`\`` : content)) - .join('\n'); - - const fileParsedPath = path.parse(path.resolve(process.cwd(), 'docs', fileName)); - const outputFilePath = path.format({ ...fileParsedPath, base: undefined, ext: '.md' }); - await fs.outputFile(outputFilePath, Buffer.from(textMd)); - console.log(`${inputFilePath} -> ${outputFilePath}`); -}); From e29d92ec1ef59db7af28e6b62fe6083db4634d09 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 13 Apr 2024 22:30:04 +1000 Subject: [PATCH 78/88] docs: generate commands reference --- .github/workflows/main.yml | 2 + README.md | 57 ++ package-lock.json | 469 +++++++++++- package.json | 5 +- reference.md | 1453 ++++++++++++++++++++++++++++++++++++ scripts/docs/index.ts | 5 + scripts/docs/reference.ts | 112 +++ src/utils/helpers.js | 5 +- 8 files changed, 2105 insertions(+), 3 deletions(-) create mode 100644 reference.md create mode 100755 scripts/docs/index.ts create mode 100644 scripts/docs/reference.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a8dbd650..27936a0b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,8 @@ jobs: HEAD: ${{ github.event.pull_request.head.sha }} BASE: ${{ github.event.pull_request.base.sha }} run: npx commitlint --from $BASE --to $HEAD --verbose + - name: Ensure that docs are up to date + run: npm run docs && git diff - run: npm run lint - run: docker compose up -d --wait - run: npx c8 npm test diff --git a/README.md b/README.md index ab7dd103..96f1eeb3 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,63 @@ Commands: 4. To read documentation of other commands and sub-commands, you can append `--help`. For example, type `bin/aecli.mjs account --help` to get a list of `account`'s available sub-commands. +## Commands reference + + +- `account` + - [`sign`](./reference.md#sign) — sign a transaction using wallet + - [`sign-message`](./reference.md#sign-message) — sign a personal message using wallet + - [`verify-message`](./reference.md#verify-message) — check if message was signed by address + - [`address`](./reference.md#address) — get wallet address and optionally private key + - [`create`](./reference.md#create) — create a wallet by a private key or generate a new one +- [`spend`](./reference.md#spend) — send coins to another account or contract +- `name` + - [`full-claim`](./reference.md#full-claim) — claim an AENS name in a single command + - [`pre-claim`](./reference.md#pre-claim) — pre-claim an AENS name + - [`claim`](./reference.md#claim) — claim an AENS name (requires pre-claim) + - [`bid`](./reference.md#bid) — bid on name in auction + - [`update`](./reference.md#update) — update a name pointer + - [`extend`](./reference.md#extend) — extend name TTL + - [`revoke`](./reference.md#revoke) — revoke an AENS name + - [`transfer`](./reference.md#transfer) — transfer a name to another account +- `contract` + - [`compile`](./reference.md#compile) — compile a contract to get bytecode + - [`encode-calldata`](./reference.md#encode-calldata) — encode calldata for contract call + - [`decode-call-result`](./reference.md#decode-call-result) — decode contract call result + - [`call`](./reference.md#call) — execute a function of the contract + - [`deploy`](./reference.md#deploy) — deploy a contract on the chain +- `oracle` + - [`get`](./reference.md#get) — print oracle details + - [`create`](./reference.md#create-1) — register current account as oracle + - [`extend`](./reference.md#extend-1) — extend oracle's time to leave + - [`create-query`](./reference.md#create-query) — create an oracle query + - [`respond-query`](./reference.md#respond-query) — respond to an oracle query +- `chain` + - [`top`](./reference.md#top) — get top key block or micro block of chain + - [`status`](./reference.md#status) — get node version, network id, and related details + - [`ttl`](./reference.md#ttl) — get relative TTL by absolute TTL + - [`play`](./reference.md#play) — prints blocks from top until condition + - [`broadcast`](./reference.md#broadcast) — send signed transaction to the chain +- [`inspect`](./reference.md#inspect) — get details of a node entity +- `tx` + - [`spend`](./reference.md#spend-1) — build spend transaction + - [`name-preclaim`](./reference.md#name-preclaim) — build name preclaim transaction + - [`name-claim`](./reference.md#name-claim) — build name claim transaction + - [`name-update`](./reference.md#name-update) — build name update transaction + - [`name-transfer`](./reference.md#name-transfer) — build name transfer transaction + - [`name-revoke`](./reference.md#name-revoke) — build name revoke transaction + - [`contract-deploy`](./reference.md#contract-deploy) — build contract deploy transaction + - [`contract-call`](./reference.md#contract-call) — build contract call transaction + - [`oracle-register`](./reference.md#oracle-register) — build oracle register transaction + - [`oracle-extend`](./reference.md#oracle-extend) — build oracle extend transaction + - [`oracle-post-query`](./reference.md#oracle-post-query) — build oracle post query transaction + - [`oracle-respond`](./reference.md#oracle-respond) — build oracle respond transaction + - [`verify`](./reference.md#verify) — verify transaction using node +- [`config`](./reference.md#config) — print the current sdk configuration +- [`select-node`](./reference.md#select-node) — specify node to use in other commands +- [`select-compiler`](./reference.md#select-compiler) — specify compiler to use in other commands + + ## [Change Log] [Change Log]: CHANGELOG.md diff --git a/package-lock.json b/package-lock.json index 24b4e55c..fdf98355 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "devDependencies": { "@commitlint/cli": "^19.2.1", "@commitlint/config-conventional": "^19.1.0", + "@types/fs-extra": "^11.0.4", "c8": "^9.1.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", @@ -32,7 +33,8 @@ "mocha": "^10.4.0", "mock-fs": "^5.2.0", "sinon": "^17.0.1", - "standard-version": "^9.5.0" + "standard-version": "^9.5.0", + "tsx": "^4.7.2" }, "engines": { "node": ">=18.19.0" @@ -569,6 +571,374 @@ "node": ">=v18" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -957,6 +1327,16 @@ "@types/node": "*" } }, + "node_modules/@types/fs-extra": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", + "dev": true, + "dependencies": { + "@types/jsonfile": "*", + "@types/node": "*" + } + }, "node_modules/@types/http-cache-semantics": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", @@ -980,6 +1360,15 @@ "dev": true, "peer": true }, + "node_modules/@types/jsonfile": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", + "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", @@ -3733,6 +4122,44 @@ "node": ">=0.12" } }, + "node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -4763,6 +5190,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", + "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/git-raw-commits": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-4.0.0.tgz", @@ -7715,6 +8154,15 @@ "node": ">=8" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/responselike": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", @@ -8696,6 +9144,25 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "node_modules/tsx": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.2.tgz", + "integrity": "sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==", + "dev": true, + "dependencies": { + "esbuild": "~0.19.10", + "get-tsconfig": "^4.7.2" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", diff --git a/package.json b/package.json index 448c7a22..0e9a173a 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@commitlint/cli": "^19.2.1", "@commitlint/config-conventional": "^19.1.0", + "@types/fs-extra": "^11.0.4", "c8": "^9.1.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", @@ -27,7 +28,8 @@ "mocha": "^10.4.0", "mock-fs": "^5.2.0", "sinon": "^17.0.1", - "standard-version": "^9.5.0" + "standard-version": "^9.5.0", + "tsx": "^4.7.2" }, "repository": { "type": "git", @@ -35,6 +37,7 @@ }, "scripts": { "commitlint": "commitlint --from develop", + "docs": "npx tsx ./scripts/docs/index.ts", "lint": "eslint .", "test": "mocha", "test:watch": "mocha --watch", diff --git a/reference.md b/reference.md new file mode 100644 index 00000000..8f33d21a --- /dev/null +++ b/reference.md @@ -0,0 +1,1453 @@ +# AECLI commands + +- `account` + - [`sign`](#sign) — sign a transaction using wallet + - [`sign-message`](#sign-message) — sign a personal message using wallet + - [`verify-message`](#verify-message) — check if message was signed by address + - [`address`](#address) — get wallet address and optionally private key + - [`create`](#create) — create a wallet by a private key or generate a new one +- [`spend`](#spend) — send coins to another account or contract +- `name` + - [`full-claim`](#full-claim) — claim an AENS name in a single command + - [`pre-claim`](#pre-claim) — pre-claim an AENS name + - [`claim`](#claim) — claim an AENS name (requires pre-claim) + - [`bid`](#bid) — bid on name in auction + - [`update`](#update) — update a name pointer + - [`extend`](#extend) — extend name TTL + - [`revoke`](#revoke) — revoke an AENS name + - [`transfer`](#transfer) — transfer a name to another account +- `contract` + - [`compile`](#compile) — compile a contract to get bytecode + - [`encode-calldata`](#encode-calldata) — encode calldata for contract call + - [`decode-call-result`](#decode-call-result) — decode contract call result + - [`call`](#call) — execute a function of the contract + - [`deploy`](#deploy) — deploy a contract on the chain +- `oracle` + - [`get`](#get) — print oracle details + - [`create`](#create-1) — register current account as oracle + - [`extend`](#extend-1) — extend oracle's time to leave + - [`create-query`](#create-query) — create an oracle query + - [`respond-query`](#respond-query) — respond to an oracle query +- `chain` + - [`top`](#top) — get top key block or micro block of chain + - [`status`](#status) — get node version, network id, and related details + - [`ttl`](#ttl) — get relative TTL by absolute TTL + - [`play`](#play) — prints blocks from top until condition + - [`broadcast`](#broadcast) — send signed transaction to the chain +- [`inspect`](#inspect) — get details of a node entity +- `tx` + - [`spend`](#spend-1) — build spend transaction + - [`name-preclaim`](#name-preclaim) — build name preclaim transaction + - [`name-claim`](#name-claim) — build name claim transaction + - [`name-update`](#name-update) — build name update transaction + - [`name-transfer`](#name-transfer) — build name transfer transaction + - [`name-revoke`](#name-revoke) — build name revoke transaction + - [`contract-deploy`](#contract-deploy) — build contract deploy transaction + - [`contract-call`](#contract-call) — build contract call transaction + - [`oracle-register`](#oracle-register) — build oracle register transaction + - [`oracle-extend`](#oracle-extend) — build oracle extend transaction + - [`oracle-post-query`](#oracle-post-query) — build oracle post query transaction + - [`oracle-respond`](#oracle-respond) — build oracle respond transaction + - [`verify`](#verify) — verify transaction using node +- [`config`](#config) — print the current sdk configuration +- [`select-node`](#select-node) — specify node to use in other commands +- [`select-compiler`](#select-compiler) — specify compiler to use in other commands + + +# account group + + +## sign +``` +aecli account sign [options] +``` + +Sign a transaction using wallet. Useful in offline signing scheme. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--networkId [networkId]` +Network id. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli account sign ./wallet.json tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57 +``` + + +## sign-message +``` +aecli account sign-message [options] [data...] +``` + +Sign a personal message using wallet. + +#### Options +`--filePath [path]` +Specify the path to the file for signing (ignore "data" argument and use file instead). +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli account sign-message ./wallet.json 'message to sign' +``` + + +## verify-message +``` +aecli account verify-message [options]
[data...] +``` + +Check if message was signed by address. + +#### Options +`--filePath [path]` +Specify the path to the file (ignore "data" argument and use file instead). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli account verify-message ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E f2f268f195d4747568f38f9efd36e72606dc356c0b8db9fdfae5f1f9c207dbc354c57c29397837d911516aef184b0ddbed7d16d77caf9ffb3f42fe2bcc15c30e 'message to sign' +``` + + +## address +``` +aecli account address [options] +``` + +Get wallet address and optionally private key. + +#### Options +`--privateKey` +Print private key. +`--forcePrompt` +Force prompting. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli account address ./wallet.json # show only public key +$ aecli account address ./wallet.json --privateKey # show public key and private key +``` + + +## create +``` +aecli account create [options] [privkey] +``` + +Create a password-encrypted wallet by a secret key. Secret key can be provided in options, or cli will generate one. This command creates ethereum-like keyfile. + +#### Arguments +`wallet_path` + +`privkey` +Secret key as 64-bytes encoded as hex. + +#### Options +`--overwrite` +Overwrite if exist. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli account create ./wallet.json +$ aecli account create ./wallet.json 9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200 +``` + + +## spend +``` +aecli spend [options] +``` + +Sends coins to another account or contract. + +#### Arguments +`wallet` +A path to wallet file. +`receiver` +Address or name of recipient account. +`amount` +Amount of coins to send in aettos/ae (example: 1.2ae), or percent of sender balance (example: 42%). + +#### Options +`--payload [payload]` +Transaction payload as text (default: ""). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-N, --nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli spend ./wallet.json ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E 100 +$ aecli spend ./wallet.json example-name.chain 1.23ae +$ aecli spend ./wallet.json ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E 20% --ttl 20 +``` + + +# name group + + +## full-claim +``` +aecli name full-claim [options] +``` + +Claim an AENS name in a single command. This command signs and sends a pre-claim transaction and waits until one block gets mined. After that, it sends a claim transaction. At the end, the update transaction is submitted, making a name point to the current account. + +A name in arguments should end with ".chain". Be careful, shorter names are more expensive. If the name is shorter than 13 characters (without ".chain") then it won't be claimed immediately but would start an auction instead. + +#### Options +`--nameFee [nameFee]` +Amount of coins to pay for name. +`--nameTtl [nameTtl]` +Validity of name. (default: 180000). +`--clientTtl [clientTtl]` +A suggestion measured in seconds on how long clients should cache name pointers (default: 1 hour). +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli name full-claim ./wallet.json example-name.chain +``` + + +## pre-claim +``` +aecli name pre-claim [options] +``` + +Pre-claim an AENS name. The name should be claimed after one key block since the pre-claim gets mined. This command sends a pre-claim transaction, and outputs a salt that needs to be provided to `aecli name claim`. + +A name in arguments should end with ".chain". Be careful, shorter names are more expensive. If the name is shorter than 13 characters (without ".chain") then it won't be claimed immediately but would start an auction instead. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli name pre-claim ./wallet.json example-name.chain +``` + + +## claim +``` +aecli name claim [options] +``` + +Claim an AENS name, it requires a salt provided by `aecli name pre-claim`. + +A name in arguments should end with ".chain". Be careful, shorter names are more expensive. If the name is shorter than 13 characters (without ".chain") then it won't be claimed immediately but would start an auction instead. + +#### Options +`--nameFee [nameFee]` +Amount of coins to pay for name. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli name claim ./wallet.json example-name.chain 12327389123 +``` + + +## bid +``` +aecli name bid [options] +``` + +Bid on name in auction. + +#### Arguments +`wallet_path` + +`name` + +`nameFee` +Amount of coins to pay for name. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli name bid ./wallet.json example-name.chain 4.2ae +``` + + +## update +``` +aecli name update [options] [addresses...] +``` + +Update a name pointer. + +#### Options +`--extendPointers` +Extend pointers (default: false). +`--nameTtl [nameTtl]` +A number of blocks until name expires (default: 180000). +`--clientTtl [clientTtl]` +A suggestion measured in seconds on how long clients should cache name pointers (default: 1 hour). +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli name update ./wallet.json example-name.chain ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh +``` + + +## extend +``` +aecli name extend [options] [nameTtl] +``` + +Extend name TTL. + +#### Arguments +`wallet_path` + +`name` + +`nameTtl` +A number of blocks until name expires (default: 180000). + +#### Options +`--clientTtl [clientTtl]` +A suggestion measured in seconds on how long clients should cache name pointers (default: 1 hour). +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli name extend ./wallet.json example-name.chain 180000 +``` + + +## revoke +``` +aecli name revoke [options] +``` + +Revoke an AENS name. After that nobody will be able to claim it again. This action is irreversible! + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli name revoke ./wallet.json example-name.chain +``` + + +## transfer +``` +aecli name transfer [options]
+``` + +Transfer a name to another account. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli name transfer ./wallet.json example-name.chain ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E +``` + + +# contract group + + +## compile +``` +aecli contract compile [options] +``` + +Compile a contract to get bytecode. + +#### Options +`--compilerUrl [compilerUrl]` +Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli contract compile ./contract.aes +``` + + +## encode-calldata +``` +aecli contract encode-calldata [options] [args] +``` + +Encode calldata for contract call. + +#### Arguments +`fn` + +`args` +JSON-encoded arguments array of contract call (default: []). + +#### Options +`-d, --descrPath [descrPath]` +Path to contract descriptor file. +`--contractSource [contractSource]` +Contract source code file name. +`--contractAci [contractAci]` +Contract ACI file name. +`--compilerUrl [compilerUrl]` +Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli contract encode-calldata --descrPath ./contract.aes.deploy.229e.json sum '[1, 2]' +$ aecli contract encode-calldata --contractSource ./contract.aes sum '[1, 2]' +$ aecli contract encode-calldata --contractAci ./contract.json sum '[1, 2]' +``` + + +## decode-call-result +``` +aecli contract decode-call-result [options] +``` + +Decode contract call result. + +#### Options +`-d, --descrPath [descrPath]` +Path to contract descriptor file. +`--contractSource [contractSource]` +Contract source code file name. +`--contractAci [contractAci]` +Contract ACI file name. +`--compilerUrl [compilerUrl]` +Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli contract decode-call-result --descrPath ./contract.aes.deploy.229e.json test cb_DA6sWJo= +$ aecli contract decode-call-result --contractSource ./contract.aes test cb_DA6sWJo= +$ aecli contract decode-call-result --contractAci ./contract.json test cb_DA6sWJo= +``` + + +## call +``` +aecli contract call [options] [args] [wallet_path] +``` + +Execute a function of the contract. + +#### Arguments +`fn` +Name of contract entrypoint to call. +`args` +JSON-encoded arguments array of contract call (default: []). +`wallet_path` +Path to secret storage file, not needed to make a static call. + +#### Options +`--contractAddress [contractAddress]` +Contract address to call. +`-s, --callStatic` +Estimate the return value, without making a transaction on chain. +`-t, --topHash` +Hash of block to make call. +`-d, --descrPath [descrPath]` +Path to contract descriptor file. +`--contractSource [contractSource]` +Contract source code file name. +`--contractAci [contractAci]` +Contract ACI file name. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-G, --gas [gas]` +Amount of gas to call/deploy the contract. +`--gasPrice [gasPrice]` +Gas price to call/deploy the contract (default: based on network demand). +`-N, --nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-a, --amount [amount]` +Amount of coins to send (default: 0ae). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`--compilerUrl [compilerUrl]` +Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli contract call ./wallet.json sum '[1, 2]' --descrPath ./contract.aes.deploy.229e.json +$ aecli contract call ./wallet.json sum '[1, 2]' --contractAddress ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh --callStatic +$ aecli contract call ./wallet.json sum '[1, 2]' --descrPath ./contract.aes.deploy.229e.json --gas 2222222 --nonce 4 --ttl 1243 +``` + + +## deploy +``` +aecli contract deploy [options] [args] +``` + +Deploy a contract on the chain and create a deployment descriptor with the contract information that can be used to invoke the contract later on. The generated descriptor will be made in the same folder of the contract source file or at the location provided in `descrPath`. Multiple deploys of the same contract file will generate different deploy descriptors. + +#### Arguments +`wallet_path` + +`args` +JSON-encoded arguments array of contract call (default: []). + +#### Options +`--contractBytecode [contractBytecode]` +Contract bytecode file name. +`-d, --descrPath [descrPath]` +Path to contract descriptor file. +`--contractSource [contractSource]` +Contract source code file name. +`--contractAci [contractAci]` +Contract ACI file name. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-G, --gas [gas]` +Amount of gas to call/deploy the contract. +`--gasPrice [gasPrice]` +Gas price to call/deploy the contract (default: based on network demand). +`-N, --nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-a, --amount [amount]` +Amount of coins to send (default: 0ae). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`--compilerUrl [compilerUrl]` +Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli contract deploy ./wallet.json --contractSource ./contract.aes '[1, 2]' +$ aecli contract deploy ./wallet.json --descrPath ./contract.aes.deploy.229e.json --gas 2222222 +$ aecli contract deploy ./wallet.json --contractBytecode ./contract.txt --contractAci ./contract.json +``` + + +# oracle group + + +## get +``` +aecli oracle get [options] +``` + +Print oracle details. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli oracle get ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi +``` + + +## create +``` +aecli oracle create [options] +``` + +Register current account as oracle. + +#### Options +`--oracleTtl [oracleTtl]` +Relative oracle time to leave (default: 500). +`--queryFee [queryFee]` +Oracle query fee (default: 0). +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli oracle create ./wallet.json string string +``` + + +## extend +``` +aecli oracle extend [options] +``` + +Extend oracle's time to leave. + +#### Options +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli oracle extend ./wallet.json 200 +``` + + +## create-query +``` +aecli oracle create-query [options] +``` + +Create an oracle query. + +#### Options +`--responseTtl [responseTtl]` +Relative query response time to leave (default: 10). +`--queryTtl [queryTtl]` +Relative query time to leave (default: 10). +`--queryFee [queryFee]` +Oracle query fee (default: 0). +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli oracle create-query ./wallet.json ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi WhatTheWeatherIs? +``` + + +## respond-query +``` +aecli oracle respond-query [options] +``` + +Respond to an oracle query. + +#### Options +`--responseTtl [responseTtl]` +Query response time to leave (default: 10). +`-P, --password [password]` +Wallet Password, may be recorded to shell history (env: AECLI_WALLET_PASSWORD). +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: 3). +`-F, --fee [fee]` +Override the transaction fee. +`--nonce [nonce]` +Override the nonce that the transaction is going to be sent with. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli oracle respond-query ./wallet.json oq_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh +16Degree +``` + + +# chain group + + +## top +``` +aecli chain top [options] +``` + +Get top key block or micro block of chain. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli chain top +``` + + +## status +``` +aecli chain status [options] +``` + +Get node version, network id, and related details. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli chain status +``` + + +## ttl +``` +aecli chain ttl [options] +``` + +Get relative TTL by absolute TTL. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli chain ttl +``` + + +## play +``` +aecli chain play [options] +``` + +Prints blocks from top until condition. + +#### Options +`-L, --limit [playLimit]` +Amount of blocks to print (default: 10). +`-P, --height [playToHeight]` +Print blocks till the height. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli chain play --limit 3 # print 3 blocks from top +$ aecli chain play --height 929796 # print blocks from top until reach height +``` + + +## broadcast +``` +aecli chain broadcast [options] +``` + +Send signed transaction to the chain. Useful in offline signing scheme. + +#### Options +`-W, --no-waitMined` +Don't wait until transaction gets mined. +`--verify` +Verify Transaction before broadcasting. +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli chain broadcast tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57 +``` + + +## inspect +``` +aecli inspect [options] +``` + +Prints details of: + - account (ak_-prefixed string), + - name (string ending with '.chain'), + - contract (ct_-prefixed string), + - oracle (ok_-prefixed string), + - keyblock or microblock (prefixed with kh_, mh_), + - keyblock by height (integer), + - transaction (by th_-string or tx_). + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli inspect ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E # get account details +$ aecli inspect example-name.chain # get details of AENS name +$ aecli inspect ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh # get contract details +$ aecli inspect ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi # get contract details +$ aecli inspect kh_CF37tA4KiiZTFqbQ6JFCU7kDt6CBZucBrvineVUGC7svA9vK7 # get key block details by hash +$ aecli inspect mh_k1K9gLLtdikJhCdKfBbhYGveQs7osSNwceEJZb1jD6AmraNdr # get micro block details by hash +$ aecli inspect 929796 # get key block details by height +$ aecli inspect th_2nZshewM7FtKSsDEP4zXPsGCe9cdxaFTRrcNjJyE22ktjGidZR # get transaction details by hash +$ aecli inspect tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57 # get transaction details +``` + + +# tx group + + +## spend +``` +aecli tx spend [options] +``` + +Build spend transaction. + +#### Arguments +`senderId` + +`receiverId` + +`amount` +Amount of coins to send. +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`--payload [payload]` +Transaction payload (default: ""). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx spend ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT 100ae 42 +``` + + +## name-preclaim +``` +aecli tx name-preclaim [options] +``` + +Build name preclaim transaction. + +#### Arguments +`accountId` + +`name` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx name-preclaim ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E example-name.chain 42 +``` + + +## name-claim +``` +aecli tx name-claim [options] +``` + +Build name claim transaction. + +#### Arguments +`accountId` + +`salt` + +`name` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`--nameFee [nameFee]` +Name fee. +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx name-claim ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E 12327389123 example-name.chain 42 +``` + + +## name-update +``` +aecli tx name-update [options] [pointers...] +``` + +Build name update transaction. + +#### Arguments +`accountId` + +`nameId` + +`nonce` +Unique number that is required to sign transaction securely. +`pointers` + + +#### Options +`--nameTtl [nameTtl]` +Validity of name (default: 180000). +`--clientTtl [clientTtl]` +A suggestion measured in seconds on how long clients should cache name pointers (default: 1 hour). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx name-update ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E example-name.chain 42 ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh +``` + + +## name-transfer +``` +aecli tx name-transfer [options] +``` + +Build name transfer transaction. + +#### Arguments +`accountId` + +`recipientId` + +`name` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx name-transfer ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT example-name.chain 42 +``` + + +## name-revoke +``` +aecli tx name-revoke [options] +``` + +Build name revoke transaction. + +#### Arguments +`accountId` + +`name` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx name-revoke ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E example-name.chain 42 +``` + + +## contract-deploy +``` +aecli tx contract-deploy [options] +``` + +Build contract deploy transaction. + +#### Arguments +`ownerId` + +`contractBytecode` + +`initCallData` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`-G, --gas [gas]` +Amount of gas to call/deploy the contract. +`--gasPrice [gasPrice]` +Gas price to call/deploy the contract (default: 1000000000). +`-a, --amount [amount]` +Amount of coins to send (default: 0ae). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx contract-deploy ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E cb_dGhpcyBtZXNzYWdlIGlzIG5vdCBpbmRleGVkdWmUpw== cb_DA6sWJo= 42 +``` + + +## contract-call +``` +aecli tx contract-call [options] +``` + +Build contract call transaction. + +#### Arguments +`callerId` + +`contractId` + +`callData` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`-G, --gas [gas]` +Amount of gas to call/deploy the contract. +`--gasPrice [gasPrice]` +Gas price to call/deploy the contract (default: 1000000000). +`-a, --amount [amount]` +Amount of coins to send (default: 0ae). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx contract-call ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E ct_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh cb_DA6sWJo= 42 +``` + + +## oracle-register +``` +aecli tx oracle-register [options] +``` + +Build oracle register transaction. + +#### Arguments +`accountId` + +`queryFormat` + +`responseFormat` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`--queryFee [queryFee]` +Oracle query fee (default: 0). +`--oracleTtl [oracleTtl]` +Oracle TTL (default: 500). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx oracle-register ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E '{"city": "string"}' '{"tmp": "number"}' 42 +``` + + +## oracle-extend +``` +aecli tx oracle-extend [options] +``` + +Build oracle extend transaction. + +#### Arguments +`oracleId` + +`oracleTtl` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx oracle-extend ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi 100 42 +``` + + +## oracle-post-query +``` +aecli tx oracle-post-query [options] +``` + +Build oracle post query transaction. + +#### Arguments +`accountId` + +`oracleId` + +`query` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`--queryFee [queryFee]` +Oracle query fee (default: 0). +`--queryTtl [oracleTtl]` +Oracle TTL (default: 10). +`--responseTtl [oracleTtl]` +Oracle TTL (default: 10). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx oracle-post-query ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi '{"city": "Berlin"}' 42 +``` + + +## oracle-respond +``` +aecli tx oracle-respond [options] +``` + +Build oracle respond transaction. + +#### Arguments +`oracleId` + +`queryId` + +`response` + +`nonce` +Unique number that is required to sign transaction securely. + +#### Options +`--responseTtl [oracleTtl]` +Oracle TTL (default: 10). +`-F, --fee [fee]` +Override the transaction fee. +`-T, --ttl [ttl]` +Validity of the transaction in number of keyblocks, or without this limit if 0 (default: undefined). +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx oracle-respond ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi oq_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7ua8CvsTuGot6uzh '{"tmp": 1}' 42 +``` + + +## verify +``` +aecli tx verify [options] +``` + +Verify transaction using node. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`-f, --force` +Ignore node version compatibility check. +`--json` +Print result in json format. + +#### Example calls +``` +$ aecli tx verify tx_+FoMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhARX7Ovvi4N8rfRN/Dsvb2ei7AJ3ysIkBrG5pnY6qW3W7iQVrx14tYxAAAIYPUN430AAAKoBebL57 +``` + + +## config +``` +aecli config [options] +``` + +Print the current sdk configuration. + +#### Options +`-u, --url [nodeUrl]` +Node to connect to (default: mainnet, env: AECLI_NODE_URL). +`--compilerUrl [compilerUrl]` +Compiler to connect to (default: stable compiler, env: AECLI_COMPILER_URL). + + +## select-node +``` +aecli select-node [options] [nodeUrl] +``` + +Specify node to use in other commands. + +#### Arguments +`nodeUrl` +Node URL. + + +## select-compiler +``` +aecli select-compiler [options] [compilerUrl] +``` + +Specify compiler to use in other commands. + +#### Arguments +`compilerUrl` +Compiler URL. \ No newline at end of file diff --git a/scripts/docs/index.ts b/scripts/docs/index.ts new file mode 100755 index 00000000..ffac10be --- /dev/null +++ b/scripts/docs/index.ts @@ -0,0 +1,5 @@ +#!/usr/bin/env npx tsx + +await import('./reference.ts'); + +export {}; diff --git a/scripts/docs/reference.ts b/scripts/docs/reference.ts new file mode 100644 index 00000000..9a04cdd8 --- /dev/null +++ b/scripts/docs/reference.ts @@ -0,0 +1,112 @@ +import { Command } from 'commander'; +import fs from 'fs-extra'; +import program from '../../src/commands/main.js'; +import { commandExamples } from '../../src/utils/helpers.js'; + +function buildToc(isReadme: boolean): string { + const anchorCounter = {}; + + const getAnchor = (name) => { + anchorCounter[name] ??= -1; + anchorCounter[name] += 1; + return `${name}${anchorCounter[name] === 0 ? '' : `-${anchorCounter[name]}`}`; + } + + function rec(cmd: Command, nesting: number): string { + const name = cmd.name(); + if (cmd.commands.length) { + getAnchor(name); + return [ + `${' '.repeat(nesting)}- \`${name}\``, + ...cmd.commands.map((c) => rec(c, nesting + 4)), + ].join('\n'); + } + return [ + [ + ' '.repeat(nesting), + `- [\`${name}\`](${isReadme ? './reference.md' : ''}#${getAnchor(name)}) — `, + cmd.summary(), + ].join(''), + ...cmd.commands.map((c) => rec(c, nesting + 4)), + ].join('\n'); + } + + return program.commands.map((c) => rec(c, 0)).join('\n'); +} + +function asParagraph(summary: string) { + if (!summary) return ''; + return `${summary[0].toUpperCase()}${summary.slice(1)}${summary.endsWith('.') ? '' : '.'}`; +} + +function buildReference(command: Command): string { + if (command.commands.length) { + return [ + '', + '', + `# ${command.name()} group`, + ...command.commands.map(buildReference), + ].join('\n'); + } + + const help = command.createHelp(); + const fullName = help.commandUsage(command).replace(' ' + command.usage(), ''); + const examples = commandExamples.get(command); + return [ + `\n\n## ${command.name()}`, + `\`\`\`\n${help.commandUsage(command)}\n\`\`\``, + `\n${command.description()}`, + + ...command.registeredArguments.some((argument) => help.argumentDescription(argument)) + ? [ + '\n#### Arguments', + ...command.registeredArguments + .map((argument) => [ + `\`${help.argumentTerm(argument)}\` `, + `${asParagraph(help.argumentDescription(argument))} `, + ]) + .flat(Infinity), + ] + : [], + + ...command.options.length + ? [ + '\n#### Options', + ...command.options + .map((option) => [ + `\`${help.optionTerm(option)}\` `, + `${asParagraph(help.optionDescription(option))} `, + ]) + .flat(Infinity), + ] + : [], + + ...examples ? [ + `\n#### Example calls`, + '```', + ...examples.map((example) => `$ ${fullName} ${example}`), + '```', + ] : [], + + ...command.commands.map(buildReference), + ].join('\n'); +} + +await Promise.all([ + fs.writeFile('./reference.md', [ + '# AECLI commands', + '', + buildToc(false), + ...program.commands.map(buildReference), + ].join('\n')), + (async () => { + const begin = ''; + const end = ''; + const readme = await fs.readFile('./README.md', 'utf-8'); + const readmeWithToc = readme.replace( + new RegExp(`${begin}[\\s\\S]*${end}`), + [begin, buildToc(true), end].join('\n'), + ); + await fs.writeFile('./README.md', readmeWithToc); + })(), +]); diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 33e61014..d4a8d7c3 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -13,7 +13,10 @@ export const exampleName = 'example-name.chain'; export const exampleCalldata = 'cb_DA6sWJo='; export const exampleHeight = 929796; +export const commandExamples = new WeakMap(); + export const addExamples = (command, examples) => { + commandExamples.set(command, examples); command.addHelpText('after', () => { let name = ''; let cmd = command; @@ -21,7 +24,7 @@ export const addExamples = (command, examples) => { name = `${cmd.name()} ${name}`; cmd = cmd.parent; } - return ['', 'Example call:', ...examples.map((e) => ` $ ${name}${e}`)].join('\n'); + return ['', 'Example calls:', ...examples.map((e) => ` $ ${name}${e}`)].join('\n'); }); }; From 2092897d06b3f9f8a597956c43ffa11f9be15525 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sun, 14 Apr 2024 14:02:51 +1000 Subject: [PATCH 79/88] docs: cleanup readme, generate examples --- .github/workflows/main.yml | 4 +- README.md | 142 ++++++++++++++++++++----------------- contributor-guide.md | 15 ++++ docker-compose.yml | 4 +- docker/aeternity.yaml | 2 + scripts/docs/index.ts | 9 +++ scripts/docs/readme.ts | 68 ++++++++++++++++++ scripts/docs/reference.ts | 12 ++-- scripts/docs/utils.ts | 19 +++++ scripts/execute-program.js | 75 ++++++++++++++++++++ test/index.js | 77 +------------------- CLI.md => user-guide.md | 0 12 files changed, 274 insertions(+), 153 deletions(-) create mode 100644 contributor-guide.md create mode 100644 scripts/docs/readme.ts create mode 100644 scripts/docs/utils.ts create mode 100644 scripts/execute-program.js rename CLI.md => user-guide.md (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27936a0b..023b6234 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,10 +29,10 @@ jobs: HEAD: ${{ github.event.pull_request.head.sha }} BASE: ${{ github.event.pull_request.base.sha }} run: npx commitlint --from $BASE --to $HEAD --verbose - - name: Ensure that docs are up to date - run: npm run docs && git diff - run: npm run lint - run: docker compose up -d --wait + - name: Ensure that docs are up to date + run: npm run docs && git diff - run: npx c8 npm test - run: npx c8 report --reporter=text-lcov > coverage.lcov - uses: codecov/codecov-action@v4 diff --git a/README.md b/README.md index 96f1eeb3..4a154570 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,97 @@ -[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) -[![npm](https://img.shields.io/npm/v/@aeternity/aepp-cli.svg)](https://www.npmjs.com/package/@aeternity/aepp-cli) -[![npm](https://img.shields.io/npm/l/@aeternity/aepp-cli.svg)](https://www.npmjs.com/package/@aeternity/aepp-cli) - # aepp-cli-js Command Line Interface for the æternity blockchain. -## Disclaimer +## Installation +You can install `aecli` using your preferred tool (`yarn` or `npm`). Here's an `npm` example +``` +$ npm install --global @aeternity/aepp-cli +``` -This project is a work-in-progress and things might break. We aim to make our -pre-releases as stable as possible. Neverless it should not be taken as -production-ready. To catch up with even more edgy state of development please -check out the [develop branch]. +## Quick start +Let's ensure that CLI installed correctly by running `$ aecli`. It will show the available commands as below. -[develop branch]: https://github.com/aeternity/aecli-js/tree/develop + +``` +$ aecli +Usage: aecli [options] [command] +Options: + -V, --version output the version number + -h, --help display help for command -## Installation -You can install this `CLI` using your preferred tool (`yarn` or `npm`). Here's an `npm` example -``` -npm install --global @aeternity/aepp-cli +Commands: + account handle wallet operations + spend [options] send coins to another account or contract + name manage AENS names + contract contract interactions + oracle interact with oracles + chain make a request to the node + inspect [options] get details of a node entity + tx generate transactions to sign and submit manually + config [options] print the current sdk configuration + select-node [nodeUrl] specify node to use in other commands + select-compiler [compilerUrl] specify compiler to use in other commands + help [command] display help for command ``` + ---- -### Local symlink to aecli -Run `npm link` for linking `aecli` name to `aecli/bin/aecli.mjs` +> To read documentation of other commands and sub-commands, you can append `--help`. For example, type `aecli account --help` to get a list of commands available in `account` module. -1. Clone or copy the `aepp-cli-js` git repository into any place you like -2. Enter the folder and run `npm link` -3. Enter a new `bash` session and try `aecli` command to see if everything is okay. -4. If you have any issue, open an `issue` in github +The next step is to create a wallet to use in other commands: -__If you have problems linking, try also `npm install` and then `npm link`__ + +``` +$ aecli account create ./wallet.json +Address _________________________________ ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E +Path ____________________________________ /path/to/wallet.json +``` + -## Usage Documentation +You need to send some coins to the created wallet. -You can install, use and work on this `CLI` tool, by following these instructions: +> On testnet you can do that using [faucet]. Switch to testnet using `$ aecli select-node`. -1. Clone this repository -2. With your terminal: enter in folder when the repo has been cloned -3. Run `bin/aecli.mjs` to see the (following) available commands or run `npm link` and use `aecli` command +[faucet]: https://faucet.aepps.com/ +Run `$ aecli inspect ` to ensure that it got coins. + ``` -Usage: aecli [options] [command] - -Options: - -V, --version output the version number - -h, --help display help for command +$ aecli inspect ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E +Account ID ______________________________ ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E +Account balance _________________________ 10000000000000000000000 +Account nonce ___________________________ 0 +Pending transactions: +``` + -Commands: - chain Interact with the blockchain - inspect Get information on transactions, blocks,... - account Handle wallet operations - contract Contract interactions - name AENS system - tx Transaction builder - oracle Interact with oracles - config [options] Print the current sdk configuration - select-node [nodeUrl] Specify node to use in other commands - select-compiler [compilerUrl] Specify compiler to use in other commands - help [command] display help for command +At the last step, we will send our coins to another account: + +``` +$ aecli spend ./wallet.json ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT 42ae +Transaction mined +Transaction hash ________________________ th_2muLsbZeFaVJ3tePTnLqobPhxBzwFsm1zUv8sjgMX4LKuevX2T +Block hash ______________________________ mh_dnoULQWpiRtcrntd5yJPUxcu7YrTu18xZ1e9EC2b8prKdShME +Block height ____________________________ 2 (about now) +Signatures ______________________________ ["sg_SG5uW5KEGiy5iG1cCkKq4VEdpyvewcW4NjVf4vj2ZoCiap5iB7UQoknWpyWsD4FkziBuGPE88zwXemq3ZvPrdzNtXtKuD"] +Transaction type ________________________ SpendTx +Sender address __________________________ ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E +Recipient address _______________________ ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT +Amount __________________________________ 42ae +Payload _________________________________ ba_Xfbg4g== +Fee _____________________________________ 0.00001684ae +Nonce ___________________________________ 1 +TTL _____________________________________ 4 (about now) +Version _________________________________ 1 ``` + -4. To read documentation of other commands and sub-commands, you can append `--help`. For example, type `bin/aecli.mjs account --help` to get a list of `account`'s available sub-commands. +Find out more in the [user guide](./user-guide.md). + +## Resources + +- [User guide](./user-guide.md) +- [Changelog](./CHANGELOG.md) +- [Contributor guide](./contributor-guide.md) ## Commands reference @@ -119,25 +149,3 @@ Commands: - [`select-node`](./reference.md#select-node) — specify node to use in other commands - [`select-compiler`](./reference.md#select-compiler) — specify compiler to use in other commands - -## [Change Log] - -[Change Log]: CHANGELOG.md - -## License - -ISC License (ISC) -Copyright © 2024 aeternity developers - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - diff --git a/contributor-guide.md b/contributor-guide.md new file mode 100644 index 00000000..b6d53f80 --- /dev/null +++ b/contributor-guide.md @@ -0,0 +1,15 @@ +# Contributor guide + +## Install `aecli` from git repository + +1. Clone the [aepp-cli-js] git repository into any place you like +1. With your terminal: enter in folder when the repo has been cloned +1. Run `npm link` for linking `aecli` executable to `src/aecli.js` +1. Start a new terminal session and try `aecli` command to see if everything is okay. +1. If you have any issue, open an [issue] in github + +If you have problems linking, try also `npm install` and then `npm link`. +Instead of using `npm link` you can also execute `./src/aecli.js` directly. + +[aepp-cli-js]: git@github.com:aeternity/aepp-cli-js.git +[issue]: https://github.com/aeternity/aepp-cli-js/issues/new diff --git a/docker-compose.yml b/docker-compose.yml index 9b01e682..ac98c918 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ version: '3' services: node: - image: aeternity/aeternity:v6.13.0 - ports: [3013:3013] + image: aeternity/aeternity:v6.13.0-bundle + ports: [3013:3013, 3313:3313] # TODO: remove after releasing https://github.com/aeternity/aeternity/pull/4292 healthcheck: interval: 2s diff --git a/docker/aeternity.yaml b/docker/aeternity.yaml index 34aa56ea..ba91fd78 100644 --- a/docker/aeternity.yaml +++ b/docker/aeternity.yaml @@ -2,6 +2,8 @@ system: dev_mode: true + plugins: + - name: aeplugin_dev_mode dev_mode: auto_emit_microblocks: true diff --git a/scripts/docs/index.ts b/scripts/docs/index.ts index ffac10be..bd225376 100755 --- a/scripts/docs/index.ts +++ b/scripts/docs/index.ts @@ -1,5 +1,14 @@ #!/usr/bin/env npx tsx +async function rollbackToFirstBlock() { + const { status } = await fetch('http://localhost:3313/rollback?height=1'); + if (status !== 200) throw new Error(`Unexpected status code: ${status}`); +} +await rollbackToFirstBlock(); + await import('./reference.ts'); +console.log('Reference generated'); +await import('./readme.ts'); +console.log('Readme updated'); export {}; diff --git a/scripts/docs/readme.ts b/scripts/docs/readme.ts new file mode 100644 index 00000000..cdd691e0 --- /dev/null +++ b/scripts/docs/readme.ts @@ -0,0 +1,68 @@ +import fs from 'fs-extra'; +import program from '../../src/commands/main.js'; +import { exampleAddress1, exampleAddress2 } from '../../src/utils/helpers.js'; +import { replaceInTemplate, executeProgram } from './utils.js'; + +function getRootHelp(): string { + let output = ''; + program + .configureOutput({ writeOut: (str) => { output += str; } }) + .exitOverride(); + program.outputHelp(); + return [ + '```', + '$ aecli', + output.trimEnd(), + '```', + ].join('\n'); +} + +const wallet = './wallet.json'; +const pass = ['--password', 'temp'] as const; + +async function getWalletCreateOutput(): Promise { + const output = await executeProgram( + 'account', + 'create', + wallet, + '9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200', + ...pass, + '--overwrite' + ); + return [ + '```', + `$ aecli account create ${wallet}`, + output.replace(/([\w\/-]+)wallet\.json/, '/path/to/wallet.json'), + '```', + ].join('\n'); +} + +async function getInspectOutput(): Promise { + const output = await executeProgram('inspect', exampleAddress1); + return [ + '```', + `$ aecli inspect ${exampleAddress1}`, + output, + '```', + ].join('\n'); +} + +async function getSpendOutput(): Promise { + const output = await executeProgram('spend', wallet, exampleAddress2, '42ae', ...pass); + return [ + '```', + `$ aecli spend ${wallet} ${exampleAddress2} 42ae`, + output, + '```', + ].join('\n'); +} + +let readme = await fs.readFile('./README.md', 'utf-8'); +readme = replaceInTemplate(readme, 'ROOT-HELP', getRootHelp()); +readme = replaceInTemplate(readme, 'WALLET-CREATE', await getWalletCreateOutput()); +readme = replaceInTemplate(readme, 'INSPECT', await getInspectOutput()); +readme = replaceInTemplate(readme, 'SPEND', await getSpendOutput()); +await Promise.all([ + fs.writeFile('./README.md', readme), + fs.remove(wallet), +]); diff --git a/scripts/docs/reference.ts b/scripts/docs/reference.ts index 9a04cdd8..ea3d3543 100644 --- a/scripts/docs/reference.ts +++ b/scripts/docs/reference.ts @@ -2,6 +2,7 @@ import { Command } from 'commander'; import fs from 'fs-extra'; import program from '../../src/commands/main.js'; import { commandExamples } from '../../src/utils/helpers.js'; +import { replaceInTemplate } from './utils.js'; function buildToc(isReadme: boolean): string { const anchorCounter = {}; @@ -100,13 +101,8 @@ await Promise.all([ ...program.commands.map(buildReference), ].join('\n')), (async () => { - const begin = ''; - const end = ''; - const readme = await fs.readFile('./README.md', 'utf-8'); - const readmeWithToc = readme.replace( - new RegExp(`${begin}[\\s\\S]*${end}`), - [begin, buildToc(true), end].join('\n'), - ); - await fs.writeFile('./README.md', readmeWithToc); + let readme = await fs.readFile('./README.md', 'utf-8'); + readme = replaceInTemplate(readme, 'REFERENCE-TOC', buildToc(true)); + await fs.writeFile('./README.md', readme); })(), ]); diff --git a/scripts/docs/utils.ts b/scripts/docs/utils.ts new file mode 100644 index 00000000..0951383d --- /dev/null +++ b/scripts/docs/utils.ts @@ -0,0 +1,19 @@ +import _executeProgram from '../execute-program.js'; + +export async function executeProgram (...args: Array): Promise { + let out = await _executeProgram(...args); + if (!args.includes('--url')) { + // TODO: remove after resolving https://github.com/aeternity/aeplugin_dev_mode/issues/35 + out = out.replace(/mh_\w+/, 'mh_dnoULQWpiRtcrntd5yJPUxcu7YrTu18xZ1e9EC2b8prKdShME'); + } + return out.trimEnd(); +}; + +export function replaceInTemplate(template: string, placeholder: string, content: string): string { + const begin = ``; + const end = ``; + return template.replace( + new RegExp(`${begin}.*${end}`, 's'), + [begin, content, end].join('\n'), + ); +} diff --git a/scripts/execute-program.js b/scripts/execute-program.js new file mode 100644 index 00000000..eb8c897d --- /dev/null +++ b/scripts/execute-program.js @@ -0,0 +1,75 @@ +import program from '../src/commands/main.js'; +import { prepareOptions } from '../src/utils/default-option-description.js'; + +export const url = 'http://localhost:3013'; +export const compilerUrl = 'http://localhost:3080'; + +function getProgramOptions(command) { + return { + /* eslint-disable no-underscore-dangle */ + optionValues: { ...command._optionValues }, + optionValueSources: { ...command._optionValueSources }, + /* eslint-enable no-underscore-dangle */ + commands: command.commands.map((c) => getProgramOptions(c)), + }; +} + +function setProgramOptions(command, options) { + /* eslint-disable no-underscore-dangle */ + command._optionValues = options.optionValues; + command._optionValueSources = options.optionValueSources; + /* eslint-enable no-underscore-dangle */ + command.commands.forEach((c, i) => setProgramOptions(c, options.commands[i])); +} + +let isProgramExecuting = false; +export default async function executeProgram(...args) { + if (isProgramExecuting) throw new Error('Another program is already running'); + isProgramExecuting = true; + let result = ''; + prepareOptions(program); + program + .configureOutput({ writeOut: (str) => { result += str; } }) + .exitOverride(); + + const { log, warn } = console; + console.log = (...data) => { + if (result) result += '\n'; + result += data.join(' '); + }; + console.warn = (...data) => { + if (/Cost of .+ execution ≈ .+ae/.test(data[0])) return; + warn(...data); + }; + const options = getProgramOptions(program); + try { + const allArgs = [ + ...args.map((arg) => arg.toString()), + ...['config', 'select-node', 'select-compiler'].includes(args[0]) + || ( + args[0] === 'account' + && ['save', 'create', 'address', 'sign-message', 'verify-message'].includes(args[1]) + ) + || ( + args[0] === 'contract' + && ['compile', 'encode-calldata', 'decode-call-result'].includes(args[1])) + || (args[0] === 'tx' && args[1] !== 'verify') ? [] : ['--url', url], + ...[ + 'compile', 'deploy', 'call', 'encode-calldata', 'decode-call-result', + ].includes(args[1]) && !args.includes('--compilerUrl') ? ['--compilerUrl', compilerUrl] : [], + ]; + await program.parseAsync(allArgs, { from: 'user' }); + } finally { + console.log = log; + console.warn = warn; + isProgramExecuting = false; + setProgramOptions(program, options); + } + + if (!args.includes('--json')) return result; + try { + return JSON.parse(result); + } catch (error) { + throw new Error(`Can't parse as JSON:\n${result}`); + } +} diff --git a/test/index.js b/test/index.js index 7c299184..d1a4433d 100644 --- a/test/index.js +++ b/test/index.js @@ -5,8 +5,9 @@ import mockFs from 'mock-fs'; import { AeSdk, MemoryAccount, Node, generateKeyPair, CompilerHttpNode, } from '@aeternity/aepp-sdk'; -import program from '../src/commands/main.js'; -import { prepareOptions } from '../src/utils/default-option-description.js'; +import executeProgram, { url, compilerUrl } from '../scripts/execute-program.js'; + +export { default as executeProgram } from '../scripts/execute-program.js'; before(() => { mockFs({ @@ -22,8 +23,6 @@ after(() => { chai.use(chaiAsPromised); chai.should(); -const url = 'http://localhost:3013'; -const compilerUrl = 'http://localhost:3080'; const secretKey = '9ebd7beda0c79af72a42ece3821a56eff16359b6df376cf049aee995565f022f840c974b97164776454ba119d84edc4d6058a8dec92b6edc578ab2d30b4c4200'; export const networkId = 'ae_dev'; const keypair = generateKeyPair(); @@ -47,76 +46,6 @@ const spendPromise = (async () => { await sdk.spend(5e20, keypair.publicKey); })(); -function getProgramOptions(command) { - return { - /* eslint-disable no-underscore-dangle */ - optionValues: { ...command._optionValues }, - optionValueSources: { ...command._optionValueSources }, - /* eslint-enable no-underscore-dangle */ - commands: command.commands.map((c) => getProgramOptions(c)), - }; -} - -function setProgramOptions(command, options) { - /* eslint-disable no-underscore-dangle */ - command._optionValues = options.optionValues; - command._optionValueSources = options.optionValueSources; - /* eslint-enable no-underscore-dangle */ - command.commands.forEach((c, i) => setProgramOptions(c, options.commands[i])); -} - -let isProgramExecuting = false; -export async function executeProgram(...args) { - if (isProgramExecuting) throw new Error('Another program is already running'); - isProgramExecuting = true; - let result = ''; - prepareOptions(program); - program - .configureOutput({ writeOut: (str) => { result += str; } }) - .exitOverride(); - - const { log, warn } = console; - console.log = (...data) => { - if (result) result += '\n'; - result += data.join(' '); - }; - console.warn = (...data) => { - if (/Cost of .+ execution ≈ .+ae/.test(data[0])) return; - warn(...data); - }; - const options = getProgramOptions(program); - try { - const allArgs = [ - ...args.map((arg) => arg.toString()), - ...['config', 'select-node', 'select-compiler'].includes(args[0]) - || ( - args[0] === 'account' - && ['save', 'create', 'address', 'sign-message', 'verify-message'].includes(args[1]) - ) - || ( - args[0] === 'contract' - && ['compile', 'encode-calldata', 'decode-call-result'].includes(args[1])) - || (args[0] === 'tx' && args[1] !== 'verify') ? [] : ['--url', url], - ...[ - 'compile', 'deploy', 'call', 'encode-calldata', 'decode-call-result', - ].includes(args[1]) && !args.includes('--compilerUrl') ? ['--compilerUrl', compilerUrl] : [], - ]; - await program.parseAsync(allArgs, { from: 'user' }); - } finally { - console.log = log; - console.warn = warn; - isProgramExecuting = false; - setProgramOptions(program, options); - } - - if (!args.includes('--json')) return result; - try { - return JSON.parse(result); - } catch (error) { - throw new Error(`Can't parse as JSON:\n${result}`); - } -} - export async function getSdk() { await spendPromise; const tempKeyPair = generateKeyPair(); diff --git a/CLI.md b/user-guide.md similarity index 100% rename from CLI.md rename to user-guide.md From 24161f1b5b53806071571ea6108d7dbded69b2ea Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sun, 14 Apr 2024 22:52:47 +1000 Subject: [PATCH 80/88] docs: reorder sections in user guide according to commands --- user-guide.md | 145 +++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 72 deletions(-) diff --git a/user-guide.md b/user-guide.md index beedf15a..fd491333 100644 --- a/user-guide.md +++ b/user-guide.md @@ -10,13 +10,13 @@ So [GP] indicates that a feature is only available in Go and Python. # Table of Contents -1. [Overview](#overview) -2. [General usage](#general-usage) -3. [The chain group](#the-chain-group) -4. [The inspect group](#the-inspect-group) -5. [Account commands](#account-commands) -6. [The name group](#the-name-group) -7. [The contracts group](#the-contracts-group) +- [Overview](#overview) +- [General usage](#general-usage) +- [Account commands](#account-commands) +- [The name group](#the-name-group) +- [The contracts group](#the-contracts-group) +- [The chain group](#the-chain-group) +- [The inspect group](#the-inspect-group) ## Overview @@ -60,71 +60,6 @@ The general groupings of commands are: - `contract` allows deploying and calling the smart contracts. -## The chain group - -``` -$ ./aecli chain -Query the state of the chain - -Usage: - aecli chain [command] - -Available Commands: - play Query the blocks of the chain one after the other - top Query the top block of the chain - version Get the status and version of the node running the chain - mempool Get memory pool of chain (transactions, that are not mined yet) -``` -These commands display basic information about the blockchain and require little explanation. `Play` moves backward through the blockchain displaying blocks and transactions. - -## The inspect group -The inspect command allows you to see inside various æternity types. Because each æternity type starts with two letters identifying what sort of thing it is, you can throw anything you like at inspect, and it will bravely try to do the right thing. - -#### inspect public key -``` -$ ./aecli inspect ak_XeSuxD8wZ1eDWYu71pWVMJTDopUKrSxZAuiQtNT6bgmNWe9D3 -Balance___________________________________________ 9999497 -ID________________________________________________ ak_XeSuxD8wZ1eDWYu71pWVMJTDopUKrSxZAuiQtNT6bgmNWe9D3 -Nonce_____________________________________________ 3 -``` -#### inspect transaction -``` -$ ./aecli inspect th_2kgDHbvFjZn4nRLrxrimzyjdJzdEnMtFnD56r5K5UXHMaMbPkd -BlockHash_________________________________________ mh_2MTsaWUdadr1YRKC5FE7qMHXvtzCZixQyHFV8zsPUCQvwJr2fP -BlockHeight_______________________________________ 151 -Hash______________________________________________ th_2kgDHbvFjZn4nRLrxrimzyjdJzdEnMtFnD56r5K5UXHMaMbPkd - versionField_____________________________________ 1 - Amount__________________________________________ 20000 - Fee_____________________________________________ 1 - Nonce___________________________________________ 1 - Payload_________________________________________ test transaction - RecipientID_____________________________________ ak_2uLM25PWdhrTQfuxgJiM8E5sZREzUoB5iFnukHCz1uAZYBMqwo - SenderID________________________________________ ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi -``` -#### inspect block -``` -$ ./aecli inspect mh_2mj6dTVLdRJd2ysvpeMCanMnE816PUjUHZt4N2JBxCbVHb3LnZ -Hash______________________________________________ mh_2mj6dTVLdRJd2ysvpeMCanMnE816PUjUHZt4N2JBxCbVHb3LnZ -Height____________________________________________ 682 -PrevHash__________________________________________ kh_Uo54QZNbXAP52BftwHoLVjrfEPmYVn8186D6CfqicXz25gtbE -PrevKeyHash_______________________________________ kh_Uo54QZNbXAP52BftwHoLVjrfEPmYVn8186D6CfqicXz25gtbE -Signature_________________________________________ sg_FctQnGxxCzNUf5vkAfhVVeVAQ8DbBiknQW5Wh6DpSz77ku9tgL23GpaDk6V5yij4Fw1jozNwzJJPYbzMroLkaHJU2rYE3 -StateHash_________________________________________ bs_phbFtw7EhFKEP63mtMYd9wSR818VQJqyTqsbLefWJT68ecbR1 -Time______________________________________________ 2018-09-20T13:34:51+02:00 -TxsHash___________________________________________ bx_GnJ5zjiwAatgQjmQF9gPkFjxKiX7uwvc6z1YGrECSv6QmazeH -Version___________________________________________ 23 - BlockHash_______________________________________ mh_2mj6dTVLdRJd2ysvpeMCanMnE816PUjUHZt4N2JBxCbVHb3LnZ - BlockHeight_____________________________________ 682 - Hash____________________________________________ th_UvCG8Xo7EvsdA1D21ngLmxnJ1oDYv5qEKKNAg2pDXdYs5mJvW - versionField___________________________________ 1 - Amount________________________________________ 10000000 - Fee___________________________________________ 1 - Nonce_________________________________________ 61 - Payload_______________________________________ hello Naz! - RecipientID___________________________________ ak_XeSuxD8wZ1eDWYu71pWVMJTDopUKrSxZAuiQtNT6bgmNWe9D3 - SenderID______________________________________ ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi - TTL___________________________________________ 1182 -``` ## Account commands The account (wallet) commands are those which create and report on key pairs, and all of the operations which payments require. To perform transactions within aeternity, you need to have at least two wallets with some coins on their accounts. Using the Account commands, you can create a wallet (with a password or without it), add some coins to it, send coins, and view the wallet’s address (public key). @@ -303,3 +238,69 @@ Return value (encoded)___ 0x0000000000000000000000000000000000000000000000000000 Return value (decoded)___ 3 Return remote type_______ word ``` + +## The chain group + +``` +$ ./aecli chain +Query the state of the chain + +Usage: + aecli chain [command] + +Available Commands: + play Query the blocks of the chain one after the other + top Query the top block of the chain + version Get the status and version of the node running the chain + mempool Get memory pool of chain (transactions, that are not mined yet) +``` +These commands display basic information about the blockchain and require little explanation. `Play` moves backward through the blockchain displaying blocks and transactions. + +## The inspect group +The inspect command allows you to see inside various æternity types. Because each æternity type starts with two letters identifying what sort of thing it is, you can throw anything you like at inspect, and it will bravely try to do the right thing. + +#### inspect public key +``` +$ ./aecli inspect ak_XeSuxD8wZ1eDWYu71pWVMJTDopUKrSxZAuiQtNT6bgmNWe9D3 +Balance___________________________________________ 9999497 +ID________________________________________________ ak_XeSuxD8wZ1eDWYu71pWVMJTDopUKrSxZAuiQtNT6bgmNWe9D3 +Nonce_____________________________________________ 3 +``` +#### inspect transaction +``` +$ ./aecli inspect th_2kgDHbvFjZn4nRLrxrimzyjdJzdEnMtFnD56r5K5UXHMaMbPkd +BlockHash_________________________________________ mh_2MTsaWUdadr1YRKC5FE7qMHXvtzCZixQyHFV8zsPUCQvwJr2fP +BlockHeight_______________________________________ 151 +Hash______________________________________________ th_2kgDHbvFjZn4nRLrxrimzyjdJzdEnMtFnD56r5K5UXHMaMbPkd + versionField_____________________________________ 1 + Amount__________________________________________ 20000 + Fee_____________________________________________ 1 + Nonce___________________________________________ 1 + Payload_________________________________________ test transaction + RecipientID_____________________________________ ak_2uLM25PWdhrTQfuxgJiM8E5sZREzUoB5iFnukHCz1uAZYBMqwo + SenderID________________________________________ ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi +``` +#### inspect block +``` +$ ./aecli inspect mh_2mj6dTVLdRJd2ysvpeMCanMnE816PUjUHZt4N2JBxCbVHb3LnZ +Hash______________________________________________ mh_2mj6dTVLdRJd2ysvpeMCanMnE816PUjUHZt4N2JBxCbVHb3LnZ +Height____________________________________________ 682 +PrevHash__________________________________________ kh_Uo54QZNbXAP52BftwHoLVjrfEPmYVn8186D6CfqicXz25gtbE +PrevKeyHash_______________________________________ kh_Uo54QZNbXAP52BftwHoLVjrfEPmYVn8186D6CfqicXz25gtbE +Signature_________________________________________ sg_FctQnGxxCzNUf5vkAfhVVeVAQ8DbBiknQW5Wh6DpSz77ku9tgL23GpaDk6V5yij4Fw1jozNwzJJPYbzMroLkaHJU2rYE3 +StateHash_________________________________________ bs_phbFtw7EhFKEP63mtMYd9wSR818VQJqyTqsbLefWJT68ecbR1 +Time______________________________________________ 2018-09-20T13:34:51+02:00 +TxsHash___________________________________________ bx_GnJ5zjiwAatgQjmQF9gPkFjxKiX7uwvc6z1YGrECSv6QmazeH +Version___________________________________________ 23 + BlockHash_______________________________________ mh_2mj6dTVLdRJd2ysvpeMCanMnE816PUjUHZt4N2JBxCbVHb3LnZ + BlockHeight_____________________________________ 682 + Hash____________________________________________ th_UvCG8Xo7EvsdA1D21ngLmxnJ1oDYv5qEKKNAg2pDXdYs5mJvW + versionField___________________________________ 1 + Amount________________________________________ 10000000 + Fee___________________________________________ 1 + Nonce_________________________________________ 61 + Payload_______________________________________ hello Naz! + RecipientID___________________________________ ak_XeSuxD8wZ1eDWYu71pWVMJTDopUKrSxZAuiQtNT6bgmNWe9D3 + SenderID______________________________________ ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi + TTL___________________________________________ 1182 +``` From d87ed807f1d686febf46848beebfc25923adb482 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 15 Apr 2024 10:02:47 +1000 Subject: [PATCH 81/88] docs: update user guide --- README.md | 4 +- reference.md | 8 +- scripts/docs/index.ts | 7 + scripts/docs/readme.ts | 10 +- scripts/docs/user-guide.ts | 63 +++++++ scripts/docs/utils.ts | 4 + scripts/execute-program.js | 15 +- src/commands/chain.js | 4 +- user-guide.md | 373 ++++++++++++------------------------- 9 files changed, 213 insertions(+), 275 deletions(-) create mode 100644 scripts/docs/user-guide.ts diff --git a/README.md b/README.md index 4a154570..ac934643 100644 --- a/README.md +++ b/README.md @@ -125,8 +125,8 @@ Find out more in the [user guide](./user-guide.md). - [`create-query`](./reference.md#create-query) — create an oracle query - [`respond-query`](./reference.md#respond-query) — respond to an oracle query - `chain` - - [`top`](./reference.md#top) — get top key block or micro block of chain - - [`status`](./reference.md#status) — get node version, network id, and related details + - [`top`](./reference.md#top) — query the top key/micro block of the chain + - [`status`](./reference.md#status) — query node version, network id, and related details of the selected node - [`ttl`](./reference.md#ttl) — get relative TTL by absolute TTL - [`play`](./reference.md#play) — prints blocks from top until condition - [`broadcast`](./reference.md#broadcast) — send signed transaction to the chain diff --git a/reference.md b/reference.md index 8f33d21a..0b85dbc6 100644 --- a/reference.md +++ b/reference.md @@ -29,8 +29,8 @@ - [`create-query`](#create-query) — create an oracle query - [`respond-query`](#respond-query) — respond to an oracle query - `chain` - - [`top`](#top) — get top key block or micro block of chain - - [`status`](#status) — get node version, network id, and related details + - [`top`](#top) — query the top key/micro block of the chain + - [`status`](#status) — query node version, network id, and related details of the selected node - [`ttl`](#ttl) — get relative TTL by absolute TTL - [`play`](#play) — prints blocks from top until condition - [`broadcast`](#broadcast) — send signed transaction to the chain @@ -848,7 +848,7 @@ $ aecli oracle respond-query ./wallet.json oq_6y3N9KqQb74QsvR9NrESyhWeLNiA9aJgJ7 aecli chain top [options] ``` -Get top key block or micro block of chain. +Query the top key/micro block of the chain. #### Options `-u, --url [nodeUrl]` @@ -869,7 +869,7 @@ $ aecli chain top aecli chain status [options] ``` -Get node version, network id, and related details. +Query node version, network id, and related details of the selected node. #### Options `-u, --url [nodeUrl]` diff --git a/scripts/docs/index.ts b/scripts/docs/index.ts index bd225376..8c91c0e0 100755 --- a/scripts/docs/index.ts +++ b/scripts/docs/index.ts @@ -1,5 +1,8 @@ #!/usr/bin/env npx tsx +import fs from 'fs-extra'; +import { wallet } from './utils.ts'; + async function rollbackToFirstBlock() { const { status } = await fetch('http://localhost:3313/rollback?height=1'); if (status !== 200) throw new Error(`Unexpected status code: ${status}`); @@ -10,5 +13,9 @@ await import('./reference.ts'); console.log('Reference generated'); await import('./readme.ts'); console.log('Readme updated'); +await import('./user-guide.ts'); +console.log('User guide updated'); + +await fs.remove(wallet); export {}; diff --git a/scripts/docs/readme.ts b/scripts/docs/readme.ts index cdd691e0..f07f477a 100644 --- a/scripts/docs/readme.ts +++ b/scripts/docs/readme.ts @@ -1,7 +1,7 @@ import fs from 'fs-extra'; import program from '../../src/commands/main.js'; import { exampleAddress1, exampleAddress2 } from '../../src/utils/helpers.js'; -import { replaceInTemplate, executeProgram } from './utils.js'; +import { replaceInTemplate, executeProgram, wallet, pass } from './utils.js'; function getRootHelp(): string { let output = ''; @@ -17,9 +17,6 @@ function getRootHelp(): string { ].join('\n'); } -const wallet = './wallet.json'; -const pass = ['--password', 'temp'] as const; - async function getWalletCreateOutput(): Promise { const output = await executeProgram( 'account', @@ -62,7 +59,4 @@ readme = replaceInTemplate(readme, 'ROOT-HELP', getRootHelp()); readme = replaceInTemplate(readme, 'WALLET-CREATE', await getWalletCreateOutput()); readme = replaceInTemplate(readme, 'INSPECT', await getInspectOutput()); readme = replaceInTemplate(readme, 'SPEND', await getSpendOutput()); -await Promise.all([ - fs.writeFile('./README.md', readme), - fs.remove(wallet), -]); +await fs.writeFile('./README.md', readme); diff --git a/scripts/docs/user-guide.ts b/scripts/docs/user-guide.ts new file mode 100644 index 00000000..9b3938be --- /dev/null +++ b/scripts/docs/user-guide.ts @@ -0,0 +1,63 @@ +import fs from 'fs-extra'; +import { executeProgram, replaceInTemplate, wallet, pass } from './utils.js'; + +Date.prototype.toString = function (): string { + return this.toLocaleString('en-UK', { timeZone: 'Europe/Berlin' }); +} + +const contractSourceCode = + 'contract Example =\n' + + ' entrypoint sum(a: int, b: int) = a + b'; +const contract = './contract.aes'; +const contractDescriptor = 'contract.aes.deploy.5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV.json'; + +async function getInspectExamples(): Promise { + const inspect = async (name, id) => [ + `#### inspect ${name}`, + '```', + `$ aecli inspect ${id}`, + await executeProgram('inspect', id, '--url', 'https://testnet.aeternity.io'), + '```', + ].join('\n'); + return [ + await inspect('account by address', 'ak_22xzfNRfgYWJmsB1nFAGF3kmabuaGFTzWRobNdpturBgHF83Cx'), + await inspect('transaction', 'th_iirV7mw49NfFY8NbBhbXGBLv9PPT3h1ou11oKtPsJVHGVpWVC'), + await inspect('block', 'mh_2DhgyD4np6n3JMsNWVXdtWZE2rAx74sgxL6nb2GsCKB1VnbLxN'), + ].join('\n'); +} + +async function getContractDeployOutput(): Promise { + const args = ['contract', 'deploy', '--contractSource', contract, wallet]; + const output = await executeProgram(...args, ...pass); + return [ + '```', + `$ aecli ${args.join(' ')}`, + output.replace(/([\w\/-]+)contract\.aes\.deploy/, '/path/to/contract.aes.deploy'), + '```', + ].join('\n'); +} + +async function getContractCallOutput(): Promise { + const args = ['contract', 'call', '--descrPath', contractDescriptor, 'sum']; + const output = await executeProgram(...args, '[1, 2]', wallet, ...pass); + return [ + '```', + `$ aecli ${args.join(' ')} '[1, 2]' ${wallet}`, + output, + '```', + ].join('\n'); +} + +let [guide] = await Promise.all([ + fs.readFile('./user-guide.md', 'utf-8'), + fs.writeFile(contract, contractSourceCode), +]); +guide = replaceInTemplate(guide, 'INSPECT-EXAMPLES', await getInspectExamples()); +guide = replaceInTemplate(guide, 'CONTRACT', `\`\`\`\n${contractSourceCode}\n\`\`\``); +guide = replaceInTemplate(guide, 'CONTRACT-DEPLOY', await getContractDeployOutput()); +guide = replaceInTemplate(guide, 'CONTRACT-CALL', await getContractCallOutput()); +await Promise.all([ + fs.remove(contract), + fs.remove(contractDescriptor), + fs.writeFile('./user-guide.md', guide), +]); diff --git a/scripts/docs/utils.ts b/scripts/docs/utils.ts index 0951383d..4287dc28 100644 --- a/scripts/docs/utils.ts +++ b/scripts/docs/utils.ts @@ -17,3 +17,7 @@ export function replaceInTemplate(template: string, placeholder: string, content [begin, content, end].join('\n'), ); } + +export const wallet = './wallet.json'; + +export const pass = ['--password', 'temp'] as const; diff --git a/scripts/execute-program.js b/scripts/execute-program.js index eb8c897d..2c7c9065 100644 --- a/scripts/execute-program.js +++ b/scripts/execute-program.js @@ -32,10 +32,15 @@ export default async function executeProgram(...args) { .configureOutput({ writeOut: (str) => { result += str; } }) .exitOverride(); - const { log, warn } = console; + const { + log, warn, group, groupEnd, + } = console; + let padding = 0; + console.group = () => { padding += 1; }; + console.groupEnd = () => { padding -= 1; }; console.log = (...data) => { if (result) result += '\n'; - result += data.join(' '); + result += ' '.repeat(padding * 4) + data.join(' '); }; console.warn = (...data) => { if (/Cost of .+ execution ≈ .+ae/.test(data[0])) return; @@ -46,6 +51,7 @@ export default async function executeProgram(...args) { const allArgs = [ ...args.map((arg) => arg.toString()), ...['config', 'select-node', 'select-compiler'].includes(args[0]) + || args.includes('--url') || ( args[0] === 'account' && ['save', 'create', 'address', 'sign-message', 'verify-message'].includes(args[1]) @@ -60,8 +66,9 @@ export default async function executeProgram(...args) { ]; await program.parseAsync(allArgs, { from: 'user' }); } finally { - console.log = log; - console.warn = warn; + Object.assign(console, { + log, warn, group, groupEnd, + }); isProgramExecuting = false; setProgramOptions(program, options); } diff --git a/src/commands/chain.js b/src/commands/chain.js index e1868d2c..303dd9f7 100755 --- a/src/commands/chain.js +++ b/src/commands/chain.js @@ -15,12 +15,12 @@ const addCommonOptions = (cmd, examples) => { }; let command = program.command('top') - .summary('get top key block or micro block of chain') + .summary('query the top key/micro block of the chain') .action(Chain.top); addCommonOptions(command, ['']); command = program.command('status') - .summary('get node version, network id, and related details') + .summary('query node version, network id, and related details of the selected node') .action(Chain.status); addCommonOptions(command, ['']); diff --git a/user-guide.md b/user-guide.md index fd491333..e7be1a33 100644 --- a/user-guide.md +++ b/user-guide.md @@ -1,306 +1,169 @@ -The æternity command line interface - -## Summary -Each æternity's SDKs feature a command-line interface which you can use to invoke the blockchain's features. All CLIs have the same name and syntax, which are described here. However, not all of them have a full feature set. An entry in [square brackets] indicates which SDKs support a feature, using the following codes: -- G go -- J javascript -- P python - -So [GP] indicates that a feature is only available in Go and Python. +# User guide +This guide assumes that you have `aecli` [installed](./README.md#installation) and you checked the [Quick start]('./README.md#quick-start'). # Table of Contents -- [Overview](#overview) -- [General usage](#general-usage) - [Account commands](#account-commands) - [The name group](#the-name-group) - [The contracts group](#the-contracts-group) - [The chain group](#the-chain-group) -- [The inspect group](#the-inspect-group) - -## Overview - -The command-line interface is invoked using the command `aecli`. Depending on where it's installed on your system, you may have to give a path when you invoke it. - - -## General usage - - -If you invoke `aecli` with no arguments, it shows basic usage: -``` -$ aecli -Usage: aecli [options] [command] - -Options: - -V, --version output the version number - -h, --help display help for command - -Commands: - chain Interact with the blockchain - inspect Get information on transactions, blocks,... - account Handle wallet operations - contract Contract interactions - name AENS system - tx Transaction builder - oracle Interact with oracles - config [options] Print the current sdk configuration - select-node [nodeUrl] Specify node to use in other commands - select-compiler [compilerUrl] Specify compiler to use in other commands - help [command] display help for command -``` - -The general groupings of commands are: -- `chain` commands do not require a public or private key and give information about the state of the chain. None of the chain commands changes the state of the chain at all. -- `config` displays the sdk's configuration file and can write the configuration to disk. -- `help` does what one would expect and is described here no further. -- `inspect` allows you to look at the objects on the blockchain. -- `name` allows interaction with the naming system. -- `account` commands cover a set of functions which operate with a key pair, from transferring tokens to registering names and invoking smart contracts. -- `oracle` allows you to interact with the oracles. -- `contract` allows deploying and calling the smart contracts. +- [Inspect command examples](#inspect-command-examples) +- [Offline signing](#offline-signing) ## Account commands -The account (wallet) commands are those which create and report on key pairs, and all of the operations which payments require. To perform transactions within aeternity, you need to have at least two wallets with some coins on their accounts. Using the Account commands, you can create a wallet (with a password or without it), add some coins to it, send coins, and view the wallet’s address (public key). - -#### create - -Use this command to create a new wallet. -``` -$ aecli account create ./wallet.json - ``` -You can specify a password for accessing your wallet or just press Enter if you do not want to set a password. -The wallet is created in the specified directory. -``` -Wallet saved -Wallet address________________ ak_2GN72gRFHYmJd1DD2g2sLADr5ZXa13DPYNtuFajhsZT2y3FiWu -Wallet path___________________ /path-to/wallet.json - -``` -Wallet address is your public key. Wallet path is the directory where the wallet is created. -#### address +The account (wallet) [commands](./reference.md#account-group) are those which create and report on key pairs, and sign transactions, messages. To [perform transactions](./reference.md#spend) within aeternity, you need to have at least two wallets with some coins on their accounts. -View the address (public key) of your wallet using the following command: -``` -$ aecli account address ./wallet.json -``` -You will get the following: -``` -Your address is: ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi - ``` -#### save +Use [`aecli account create`](./reference.md#create) to create a new wallet. +You can specify a password for accessing your wallet or just press Enter if you do not want to set a password. The wallet is created at the specified path. -Using this command, you can pass the private key to generate a wallet with a key pair. +Alternatively, you can pass the private key in `[privkey]` argument to generate a corresponding wallet. -``` -$ aecli account create ./wallet.json - ``` -You will get the following: -``` -Wallet saved -Wallet address________________ ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi -Wallet path___________________ /path-to/wallet.json - ``` -#### spend - -Using this command, you can send coins to another wallet. Just indicate another account's address and an amount which should be sent. -``` -$ aecli spend ./wallet.json ak_2GN72gRFHYmJd1DD2g2sLADr5ZXa13DPYNtuFajhsZT2y3FiWu 1.23ae -``` -As an option, you can set _--ttl_ parameter, which limits the lifespan of this transaction. +View the address (public key) of your wallet using [`aecli account address`](./reference.md#address) command. Also, it can be used to reveal your private key. ## The name group With the aeternity naming system (AENS), you can assign and register a name to your account or oracle. This way, instead of a complex hash, you can use a name you choose. -These names have an expiration period, after which they can be transferred to another account. -For more information, see [The Æternity Naming System (AENS)](https://dev.aepps.com/aepp-sdk-docs/AENS-Python.html) and [Aeternity Naming System](https://github.com/aeternity/protocol/blob/master/AENS.md) docs. +These names have an expiration period, after which the name will no longer belong to anyone, so it can be claimed again. +For more information, see [Aeternity Naming System](https://github.com/aeternity/protocol/blob/master/AENS.md) docs. -The name group consists of the following commands and options: -``` -$ ./aecli.mjs name -``` - Usage: aecli-name [options] [command] - - Options: +The name group consists of the [following commands](./reference.md#name-group). - -H, --host [hostname] Node to connect to (default: https://localhost:3013) - -P, --password [password] Wallet Password - -N, --nameTtl [nameTtl] Name life Ttl (default: 500) - -T, --ttl [ttl] Life Ttl (default: 50000) - --json [json] Print result in json format - -h, --help output usage information +Use [`aecli name full-claim`](./reference.md#full-claim) to create and register a name for your account. - Commands: +After that, you can use [`aecli name update`](./reference.md#update) command to set a name pointer. You can assign the name to another account via pointers, you will still have the right to do other operations with this name. - claim Claim an AENS name - revoke Revoke an AENS name - transfer
Transfer a name to another account - update
Update a name pointer +Don't forget to run [`aecli name extend`](./reference.md#extend) from time to time to don't lose access to your name. By default name TTL gets extended to one year, it can't be extended for a longer period. -#### claim +You can [transfer](./reference.md#transfer) a name to another account or contract, just indicate another account's address. You will pass all rights regarding the name to another account. -Create and register a name for your account (public key): -``` -$ aecli name claim ./wallet.json testname.chain -``` - -#### revoke - -You can delete your name using the following command: -``` -$ aecli name revoke ./wallet.json testname.chain -``` +At last, you can delete your name using [`aecli name revoke`](./reference.md#revoke). +In comparison with name expiration, the revoked name can't be claimed again by anybody. -#### transfer - -You can transfer a name to another account or contract, just indicate another account's address. You will pass all rights regarding the name to another account: -``` -$ aecli name transfer ./wallet.json testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi -``` - -#### update - -Use this command to update a name. For example, you can assign it to another account, but still you will have rights to do other operations with this name: -``` -$ aecli name update ./wallet.json testname.chain ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi -``` ## The contracts group A smart contract is a computer protocol intended to digitally facilitate, verify, or enforce the negotiation or performance of a contract. Smart contracts allow the performance of credible transactions without third parties. These transactions are trackable and irreversible. Smart contracts aim to provide security that is superior to traditional contract law and to reduce other transaction costs associated with contracting. -The contracts group consists of the following commands and options: -``` -$ ./aecli.mjs contract -``` - Usage: aecli-contract [options] [command] - - Options: - - -H, --host [hostname] Node to connect to (default: https://localhost:3013) - -T, --ttl [ttl] Validity of the transaction in number of blocks (default forever) (default: 50000) - -f --force Ignore node version compatibility check - --json [json] Print result in json format - -h, --help output usage information - - Commands: - - compile Compile a contract - call [options] [args...] Execute a function of the contract - deploy [options] Deploy a contract on the chain - -The `deploy` command has its options: - - - -P, --password [password] Wallet Password - -I, --init [state] Deploying contract arguments for constructor function - -G --gas [gas] Amount of gas to deploy the contract - -The `call` command also has its option: - - -P, --password [password] Wallet Password - -#### compile - -To compile a contract, run the following command adding a file which should be compiled. The file should be stored in `aepp-sdk-js-develop/bin`: -``` -$ aecli contract compile file1 -``` +The contracts group consists of the [following commands](./reference.md#contract-group). #### deploy - -To deploy a contract, run the following command adding the contract name: +Here is an example contract that we will deploy + ``` -$ aecli contract deploy ./wallet.json testContract +contract Example = + entrypoint sum(a: int, b: int) = a + b ``` -You will get the following: + +To deploy a contract, run [`aecli contract deploy`](./reference.md#deploy) adding a file that should be compiled. + ``` +$ aecli contract deploy --contractSource ./contract.aes ./wallet.json Contract was successfully deployed -Contract address________________ ct_2HpbSPdiA2csizgKxt8VUE5z2uRvvrE3MPM9VuLNkc5g6wKKHS -Transaction hash________________ th_2sfW2c8GxJvZK3xzPagjziX9gVYFcJnywcL8vn8wWM5HCWnykE -Deploy descriptor_______________ testContract.deploy.2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi.json +Contract address ________________________ ct_5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV +Transaction hash ________________________ th_2oK2tdvhVCLzeMtqLb3EQLNT8dALWFXF4Y1t1EhicujMREWWWV +Deploy descriptor _______________________ /path/to/contract.aes.deploy.5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV.json ``` + + #### call +To execute a function of the contract, run [`aecli contract call`](./reference.md#call) command. `sum` is a function which is executed by this contract, `[1, 2]` are arguments of this function: + +``` +$ aecli contract call --descrPath contract.aes.deploy.5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV.json sum '[1, 2]' ./wallet.json +Transaction hash ________________________ th_urgozuZRooNXrZxuvNDdT4BiApcGKsf6ZRpffargXcoZNHQ4C +Block hash ______________________________ mh_dnoULQWpiRtcrntd5yJPUxcu7YrTu18xZ1e9EC2b8prKdShME +Block height ____________________________ 4 (about now) +Signatures ______________________________ ["sg_Vn2cCsMk8RvBKyNTKTbq8V4vm6beuHxfYA7vLBNLnRF3x9hoydWWAtNkaiix8KhyEFSLmsmTy6jz9Lps2TQqVdmH6qmCG"] +Transaction type ________________________ ContractCallTx +Caller address __________________________ ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E +Contract address ________________________ ct_5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV +Gas _____________________________________ 31 (0.000000031ae) +Gas price _______________________________ 0.000000001ae +Call data _______________________________ cb_KxHrtMsKKwIE32Kmfg== +ABI version _____________________________ 3 (Fate) +Amount __________________________________ 0ae +Fee _____________________________________ 0.00018198ae +Nonce ___________________________________ 3 +TTL _____________________________________ 7 (in 6 minutes) +Version _________________________________ 1 +----------------------Call info----------------------- +Contract address ________________________ ct_5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV +Gas price _______________________________ 1000000000 +Gas used ________________________________ 25 +Return value (encoded) __________________ cb_BvMDXHk= +Return value (decoded) __________________ 3 +``` + +In the above, the "Return value (decoded)" is a result of contract execution — it is a sum of values 1 and 2. -To execute a function of the contract, run the following command. Json file is stored in `aepp-sdk-js-develop/bin`. `Main` is a function which is executed by this contract, `int 1 2` are numerical values : - -``` -$ aecli contract call ./wallet.json testContract.deploy.2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi.json main int 1 2 -``` -You will get the following, where return value is a result of contract execution - it is a sum of values 1 and 2: -``` -Contract address_________ ct_2HpbSPdiA2csizgKxt8VUE5z2uRvvrE3MPM9VuLNkc5g6wKKHS -Gas price________________ 1 -Gas used_________________ 555 -Return value (encoded)___ 0x0000000000000000000000000000000000000000000000000000000000000003 -Return value (decoded)___ 3 -Return remote type_______ word -``` ## The chain group -``` -$ ./aecli chain -Query the state of the chain - -Usage: - aecli chain [command] +[These commands](./reference.md#chain-group) display basic information about the blockchain and require little explanation. [`play`](./reference.md#play) moves backward through the blockchain displaying blocks and transactions. -Available Commands: - play Query the blocks of the chain one after the other - top Query the top block of the chain - version Get the status and version of the node running the chain - mempool Get memory pool of chain (transactions, that are not mined yet) +## Inspect command examples +The [`inspect`](./reference.md#inspect) command allows you to see inside various æternity types. Because each æternity type starts with two letters identifying what sort of thing it is, you can throw anything you like at inspect, and it will bravely try to do the right thing. + +#### inspect account by address ``` -These commands display basic information about the blockchain and require little explanation. `Play` moves backward through the blockchain displaying blocks and transactions. - -## The inspect group -The inspect command allows you to see inside various æternity types. Because each æternity type starts with two letters identifying what sort of thing it is, you can throw anything you like at inspect, and it will bravely try to do the right thing. - -#### inspect public key -``` -$ ./aecli inspect ak_XeSuxD8wZ1eDWYu71pWVMJTDopUKrSxZAuiQtNT6bgmNWe9D3 -Balance___________________________________________ 9999497 -ID________________________________________________ ak_XeSuxD8wZ1eDWYu71pWVMJTDopUKrSxZAuiQtNT6bgmNWe9D3 -Nonce_____________________________________________ 3 +$ aecli inspect ak_22xzfNRfgYWJmsB1nFAGF3kmabuaGFTzWRobNdpturBgHF83Cx +Account ID ______________________________ ak_22xzfNRfgYWJmsB1nFAGF3kmabuaGFTzWRobNdpturBgHF83Cx +Account balance _________________________ 52134250100000000000 +Account nonce ___________________________ 3 +Pending transactions: ``` #### inspect transaction ``` -$ ./aecli inspect th_2kgDHbvFjZn4nRLrxrimzyjdJzdEnMtFnD56r5K5UXHMaMbPkd -BlockHash_________________________________________ mh_2MTsaWUdadr1YRKC5FE7qMHXvtzCZixQyHFV8zsPUCQvwJr2fP -BlockHeight_______________________________________ 151 -Hash______________________________________________ th_2kgDHbvFjZn4nRLrxrimzyjdJzdEnMtFnD56r5K5UXHMaMbPkd - versionField_____________________________________ 1 - Amount__________________________________________ 20000 - Fee_____________________________________________ 1 - Nonce___________________________________________ 1 - Payload_________________________________________ test transaction - RecipientID_____________________________________ ak_2uLM25PWdhrTQfuxgJiM8E5sZREzUoB5iFnukHCz1uAZYBMqwo - SenderID________________________________________ ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi +$ aecli inspect th_iirV7mw49NfFY8NbBhbXGBLv9PPT3h1ou11oKtPsJVHGVpWVC +Transaction hash ________________________ th_iirV7mw49NfFY8NbBhbXGBLv9PPT3h1ou11oKtPsJVHGVpWVC +Block hash ______________________________ mh_2RojH44UtAjf8pRQekPp7o78CmCqMQJkRdxmfXvVmWg9M6ymcr +Block height ____________________________ 99005 (4 years ago) +Signatures ______________________________ ["sg_MjwB8zrhqGTqYWY2c5jLrikuCcwppnhNhjXg9TcdFbCkSvGhPL6Hf4iu81eoxWWJFSgRSFQ3h3qMv6vVNqYfo5NNBNDFK"] +Transaction type ________________________ NameClaimTx +Account address _________________________ ak_2i74vkHbdciAdr7Bw3ogdTHsLykPf4ii1DQEGLh6RpySyhtA9H +Name ____________________________________ yanislav.test +Name salt _______________________________ 6632125367082877 +Fee _____________________________________ 0.00001638ae +Nonce ___________________________________ 2 +Version _________________________________ 2 ``` #### inspect block ``` -$ ./aecli inspect mh_2mj6dTVLdRJd2ysvpeMCanMnE816PUjUHZt4N2JBxCbVHb3LnZ -Hash______________________________________________ mh_2mj6dTVLdRJd2ysvpeMCanMnE816PUjUHZt4N2JBxCbVHb3LnZ -Height____________________________________________ 682 -PrevHash__________________________________________ kh_Uo54QZNbXAP52BftwHoLVjrfEPmYVn8186D6CfqicXz25gtbE -PrevKeyHash_______________________________________ kh_Uo54QZNbXAP52BftwHoLVjrfEPmYVn8186D6CfqicXz25gtbE -Signature_________________________________________ sg_FctQnGxxCzNUf5vkAfhVVeVAQ8DbBiknQW5Wh6DpSz77ku9tgL23GpaDk6V5yij4Fw1jozNwzJJPYbzMroLkaHJU2rYE3 -StateHash_________________________________________ bs_phbFtw7EhFKEP63mtMYd9wSR818VQJqyTqsbLefWJT68ecbR1 -Time______________________________________________ 2018-09-20T13:34:51+02:00 -TxsHash___________________________________________ bx_GnJ5zjiwAatgQjmQF9gPkFjxKiX7uwvc6z1YGrECSv6QmazeH -Version___________________________________________ 23 - BlockHash_______________________________________ mh_2mj6dTVLdRJd2ysvpeMCanMnE816PUjUHZt4N2JBxCbVHb3LnZ - BlockHeight_____________________________________ 682 - Hash____________________________________________ th_UvCG8Xo7EvsdA1D21ngLmxnJ1oDYv5qEKKNAg2pDXdYs5mJvW - versionField___________________________________ 1 - Amount________________________________________ 10000000 - Fee___________________________________________ 1 - Nonce_________________________________________ 61 - Payload_______________________________________ hello Naz! - RecipientID___________________________________ ak_XeSuxD8wZ1eDWYu71pWVMJTDopUKrSxZAuiQtNT6bgmNWe9D3 - SenderID______________________________________ ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi - TTL___________________________________________ 1182 -``` +$ aecli inspect mh_2DhgyD4np6n3JMsNWVXdtWZE2rAx74sgxL6nb2GsCKB1VnbLxN +<<--------------- MicroBlock --------------->> +Block hash ______________________________ mh_2DhgyD4np6n3JMsNWVXdtWZE2rAx74sgxL6nb2GsCKB1VnbLxN +Block height ____________________________ 762850 +State hash ______________________________ bs_9vEQ2hkjJLFoqbmUq2YB3PyZN4TGV6Viv686wgX3i4t21PUK3 +Nonce ___________________________________ N/A +Miner ___________________________________ N/A +Time ____________________________________ 17/04/2023, 05:54:40 +Previous block hash _____________________ mh_2VaToyVbe8joVts9SjzdGJZqK7nk6w4MfvGC32Nfwp9KnTa7Z6 +Previous key block hash _________________ kh_2gVG4vzZwWJfzMe5Ug2jwwDcgcpmjEd1umsWqKA9CkSPidCYuw +Version _________________________________ 5 +Target __________________________________ N/A +Transactions ____________________________ 1 + <<--------------- Transaction --------------->> + Transaction hash ________________________ th_2uc2RDDQnDV2BsyVLHA36GP3UZJNn16utV6uivWjLAQoTVBA3u + Block hash ______________________________ mh_2DhgyD4np6n3JMsNWVXdtWZE2rAx74sgxL6nb2GsCKB1VnbLxN + Block height ____________________________ 762850 + Signatures ______________________________ ["sg_4UUxNZhGLXWjGsfAMEddccjQ1wpZfwUkZ9qMczjRUNFGAWAS3fahHWqgwxLf79RQ3J3ZRnEaazz259dPzUjj5J3EHcNYj"] + Transaction type ________________________ SpendTx + Sender address __________________________ ak_2swhLkgBPeeADxVTAVCJnZLY5NZtCFiM93JxsEaMuC59euuFRQ + Recipient address _______________________ ak_22xzfNRfgYWJmsB1nFAGF3kmabuaGFTzWRobNdpturBgHF83Cx + Amount __________________________________ 50ae + Payload _________________________________ ba_Xfbg4g== + Fee _____________________________________ 0.00001688ae + Nonce ___________________________________ 1513 + Version _________________________________ 1 +``` + + +## Offline signing +One of `aecli` use cases is offline signing. It requires the below steps. +1. prepare a transaction using [transaction builder](./reference.md#tx-group) on any device; +1. optionally run [`aecli inspect`](./reference.md#inspect) to verify the generated transaction before signing on offline device; +1. sign the transaction by [`aecli account sign`](./reference.md#sign) on offline device; +1. broadcast signed transaction using [`aecli chain broadcast`](./reference.md#broadcast) on a device connected to the internet. From d01bc057b6ad4245d55eb4a1b476fd3a2955eb14 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 16 Apr 2024 09:22:01 +1000 Subject: [PATCH 82/88] docs: set gh pages theme --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 00000000..8bbf7943 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-hacker From 8e7e614c9f0b2b32ac3d628e9b0e8b6910b17589 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 16 Apr 2024 09:57:43 +1000 Subject: [PATCH 83/88] chore: combine tx type and version --- README.md | 3 +-- src/utils/print.js | 3 +-- test/inspect.js | 3 +-- test/spend.js | 3 +-- test/tx.js | 36 ++++++++++++------------------------ user-guide.md | 9 +++------ 6 files changed, 19 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index ac934643..f16dfdd1 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Transaction hash ________________________ th_2muLsbZeFaVJ3tePTnLqobPhxBzwFsm1zUv Block hash ______________________________ mh_dnoULQWpiRtcrntd5yJPUxcu7YrTu18xZ1e9EC2b8prKdShME Block height ____________________________ 2 (about now) Signatures ______________________________ ["sg_SG5uW5KEGiy5iG1cCkKq4VEdpyvewcW4NjVf4vj2ZoCiap5iB7UQoknWpyWsD4FkziBuGPE88zwXemq3ZvPrdzNtXtKuD"] -Transaction type ________________________ SpendTx +Transaction type ________________________ SpendTx (ver. 1) Sender address __________________________ ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E Recipient address _______________________ ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT Amount __________________________________ 42ae @@ -81,7 +81,6 @@ Payload _________________________________ ba_Xfbg4g== Fee _____________________________________ 0.00001684ae Nonce ___________________________________ 1 TTL _____________________________________ 4 (about now) -Version _________________________________ 1 ``` diff --git a/src/utils/print.js b/src/utils/print.js index f04ed4be..b03541cf 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -79,7 +79,7 @@ function printTransactionSync(_tx, json, currentHeight) { printUnderscored('Block hash', tx.blockHash); printTxField(tx, 'Block height', 'blockHeight', formatTtl); printUnderscored('Signatures', tx.signatures); - printUnderscored('Transaction type', tx.type); + printUnderscored('Transaction type', `${tx.type} (ver. ${tx.version})`); // sender printTxField(tx, 'Account address', 'accountId'); printTxField(tx, 'Sender address', 'senderId'); @@ -126,7 +126,6 @@ function printTransactionSync(_tx, json, currentHeight) { printTxField(tx, 'Fee', 'fee', formatCoins); printTxField(tx, 'Nonce', 'nonce'); printTxField(tx, 'TTL', 'ttl', formatTtl); - printTxField(tx, 'Version', 'version'); } export async function printTransaction(tx, json, sdk) { diff --git a/test/inspect.js b/test/inspect.js index 0b32b441..2487f89d 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -63,7 +63,7 @@ Pending transactions: `Block hash ______________________________ ${resJson.blockHash}`, `Block height ____________________________ ${resJson.blockHeight} (about now)`, `Signatures ______________________________ ["${resJson.signatures[0]}"]`, - 'Transaction type ________________________ SpendTx', + 'Transaction type ________________________ SpendTx (ver. 1)', `Sender address __________________________ ${sdk.address}`, `Recipient address _______________________ ${recipient}`, 'Amount __________________________________ 0.00000000000000042ae', @@ -71,7 +71,6 @@ Pending transactions: /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${resJson.tx.nonce}`, /TTL _____________________________________ \d+ \(in [56] minutes\)/, - 'Version _________________________________ 1', ]); }); diff --git a/test/spend.js b/test/spend.js index 3e97cb39..f6e7cf62 100644 --- a/test/spend.js +++ b/test/spend.js @@ -49,7 +49,7 @@ describe('Spend', () => { /Block hash ______________________________ \w+/, /Block height ____________________________ \d+/, /Signatures ______________________________ .+/, - 'Transaction type ________________________ SpendTx', + 'Transaction type ________________________ SpendTx (ver. 1)', `Sender address __________________________ ${resJson.tx.senderId}`, `Recipient address _______________________ ${resJson.tx.recipientId}`, 'Amount __________________________________ 0.0000000000000001ae', @@ -57,7 +57,6 @@ describe('Spend', () => { /Fee _____________________________________ 0.000016\d+ae/, 'Nonce ___________________________________ 2', /TTL _____________________________________ \d+/, - 'Version _________________________________ 1', ]); }); diff --git a/test/tx.js b/test/tx.js index 917e280c..3e137423 100644 --- a/test/tx.js +++ b/test/tx.js @@ -139,14 +139,13 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su version: 1, }); expectToMatchLines(details, [ - 'Transaction type ________________________ SpendTx', + 'Transaction type ________________________ SpendTx (ver. 1)', `Sender address __________________________ ${sdk.address}`, `Recipient address _______________________ ${sdk.address}`, 'Amount __________________________________ 0.0000000000000001ae', 'Payload _________________________________ ba_Xfbg4g==', /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); }); @@ -167,12 +166,11 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su version: 1, }); expectToMatchLines(details, [ - 'Transaction type ________________________ NamePreclaimTx', + 'Transaction type ________________________ NamePreclaimTx (ver. 1)', `Account address _________________________ ${sdk.address}`, `Commitment ______________________________ ${detailsJson.commitmentId}`, /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); }); @@ -194,14 +192,13 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su version: 2, }); expectToMatchLines(details, [ - 'Transaction type ________________________ NameClaimTx', + 'Transaction type ________________________ NameClaimTx (ver. 2)', `Account address _________________________ ${sdk.address}`, `Name ____________________________________ ${name}`, 'Name fee ________________________________ 0.1597ae', `Name salt _______________________________ ${salt}`, /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 2', ]); nameId = (await sdk.aensQuery(name)).id; @@ -225,7 +222,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su accountId: sdk.address, }); expectToMatchLines(details, [ - 'Transaction type ________________________ NameUpdateTx', + 'Transaction type ________________________ NameUpdateTx (ver. 1)', `Account address _________________________ ${sdk.address}`, `Name ID _________________________________ ${nameId}`, 'Name TTL ________________________________ 180000 (in 1 year)', @@ -233,7 +230,6 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su 'Client TTL ______________________________ 3600 (1 hour)', /Fee _____________________________________ 0.000017\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); }); @@ -253,13 +249,12 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su accountId: sdk.address, }); expectToMatchLines(details, [ - 'Transaction type ________________________ NameTransferTx', + 'Transaction type ________________________ NameTransferTx (ver. 1)', `Account address _________________________ ${sdk.address}`, `Recipient address _______________________ ${sdk.address}`, `Name ID _________________________________ ${nameId}`, /Fee _____________________________________ 0.000017\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); }); @@ -278,12 +273,11 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su accountId: sdk.address, }); expectToMatchLines(details, [ - 'Transaction type ________________________ NameRevokeTx', + 'Transaction type ________________________ NameRevokeTx (ver. 1)', `Account address _________________________ ${sdk.address}`, `Name ID _________________________________ ${nameId}`, /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); }); @@ -322,7 +316,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su ownerId: sdk.address, }); expectToMatchLines(details, [ - 'Transaction type ________________________ ContractCreateTx', + 'Transaction type ________________________ ContractCreateTx (ver. 1)', `Owner address ___________________________ ${sdk.address}`, 'Gas _____________________________________ 5921420 (0.00592142ae)', 'Gas price _______________________________ 0.000000001ae', @@ -333,7 +327,6 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su 'Amount __________________________________ 0ae', /Fee _____________________________________ 0.000078\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); }).timeout(8000); @@ -359,7 +352,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su version: 1, }); expectToMatchLines(details, [ - 'Transaction type ________________________ ContractCallTx', + 'Transaction type ________________________ ContractCallTx (ver. 1)', `Caller address __________________________ ${sdk.address}`, `Contract address ________________________ ${contractId}`, 'Gas _____________________________________ 5817860 (0.00581786ae)', @@ -369,7 +362,6 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su 'Amount __________________________________ 0.00000042ae', /Fee _____________________________________ 0.000182\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); }).timeout(4000); @@ -392,7 +384,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su version: 1, }); expectToMatchLines(details, [ - 'Transaction type ________________________ OracleRegisterTx', + 'Transaction type ________________________ OracleRegisterTx (ver. 1)', `Account address _________________________ ${sdk.address}`, /Oracle TTL ______________________________ \d+ \(in 1 day\)/, 'ABI version _____________________________ 0 (NoAbi)', @@ -401,7 +393,6 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su 'Response format _________________________ {tmp:""num}', /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); }); @@ -421,12 +412,11 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su version: 1, }); expectToMatchLines(details, [ - 'Transaction type ________________________ OracleExtendTx', + 'Transaction type ________________________ OracleExtendTx (ver. 1)', `Oracle ID _______________________________ ${oracleId}`, /Oracle TTL ______________________________ \d+ \(in 4 hours\)/, /Fee _____________________________________ 0.000015\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); const oracleTtl = await sdk.api.getOracleByPubkey(oracleId); @@ -453,7 +443,7 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su version: 1, }); expectToMatchLines(details, [ - 'Transaction type ________________________ OracleQueryTx', + 'Transaction type ________________________ OracleQueryTx (ver. 1)', `Sender address __________________________ ${sdk.address}`, `Oracle ID _______________________________ ${oracleId}`, 'Query ___________________________________ {city: "Berlin"}', @@ -462,7 +452,6 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su /Response TTL ____________________________ \d+ \(in 27 minutes\)/, /Fee _____________________________________ 0.000017\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); const { oracleQueries: queries } = await sdk.api.getOracleQueriesByPubkey(oracleId); @@ -489,14 +478,13 @@ This is an unsigned transaction. Use \`account sign\` and \`tx broadcast\` to su version: 1, }); expectToMatchLines(details, [ - 'Transaction type ________________________ OracleRespondTx', + 'Transaction type ________________________ OracleRespondTx (ver. 1)', `Oracle ID _______________________________ ${oracleId}`, `Query ID ________________________________ ${queryId}`, 'Response ________________________________ {tmp: 10}', /Response TTL ____________________________ \d+ \(in 27 minutes\)/, /Fee _____________________________________ 0.000016\d+ae/, `Nonce ___________________________________ ${nonce}`, - 'Version _________________________________ 1', ]); const { oracleQueries: queries } = await sdk.api.getOracleQueriesByPubkey(oracleId); diff --git a/user-guide.md b/user-guide.md index e7be1a33..b1d2c303 100644 --- a/user-guide.md +++ b/user-guide.md @@ -77,7 +77,7 @@ Transaction hash ________________________ th_urgozuZRooNXrZxuvNDdT4BiApcGKsf6ZRp Block hash ______________________________ mh_dnoULQWpiRtcrntd5yJPUxcu7YrTu18xZ1e9EC2b8prKdShME Block height ____________________________ 4 (about now) Signatures ______________________________ ["sg_Vn2cCsMk8RvBKyNTKTbq8V4vm6beuHxfYA7vLBNLnRF3x9hoydWWAtNkaiix8KhyEFSLmsmTy6jz9Lps2TQqVdmH6qmCG"] -Transaction type ________________________ ContractCallTx +Transaction type ________________________ ContractCallTx (ver. 1) Caller address __________________________ ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E Contract address ________________________ ct_5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV Gas _____________________________________ 31 (0.000000031ae) @@ -88,7 +88,6 @@ Amount __________________________________ 0ae Fee _____________________________________ 0.00018198ae Nonce ___________________________________ 3 TTL _____________________________________ 7 (in 6 minutes) -Version _________________________________ 1 ----------------------Call info----------------------- Contract address ________________________ ct_5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV Gas price _______________________________ 1000000000 @@ -122,13 +121,12 @@ Transaction hash ________________________ th_iirV7mw49NfFY8NbBhbXGBLv9PPT3h1ou11 Block hash ______________________________ mh_2RojH44UtAjf8pRQekPp7o78CmCqMQJkRdxmfXvVmWg9M6ymcr Block height ____________________________ 99005 (4 years ago) Signatures ______________________________ ["sg_MjwB8zrhqGTqYWY2c5jLrikuCcwppnhNhjXg9TcdFbCkSvGhPL6Hf4iu81eoxWWJFSgRSFQ3h3qMv6vVNqYfo5NNBNDFK"] -Transaction type ________________________ NameClaimTx +Transaction type ________________________ NameClaimTx (ver. 2) Account address _________________________ ak_2i74vkHbdciAdr7Bw3ogdTHsLykPf4ii1DQEGLh6RpySyhtA9H Name ____________________________________ yanislav.test Name salt _______________________________ 6632125367082877 Fee _____________________________________ 0.00001638ae Nonce ___________________________________ 2 -Version _________________________________ 2 ``` #### inspect block ``` @@ -150,14 +148,13 @@ Transactions ____________________________ 1 Block hash ______________________________ mh_2DhgyD4np6n3JMsNWVXdtWZE2rAx74sgxL6nb2GsCKB1VnbLxN Block height ____________________________ 762850 Signatures ______________________________ ["sg_4UUxNZhGLXWjGsfAMEddccjQ1wpZfwUkZ9qMczjRUNFGAWAS3fahHWqgwxLf79RQ3J3ZRnEaazz259dPzUjj5J3EHcNYj"] - Transaction type ________________________ SpendTx + Transaction type ________________________ SpendTx (ver. 1) Sender address __________________________ ak_2swhLkgBPeeADxVTAVCJnZLY5NZtCFiM93JxsEaMuC59euuFRQ Recipient address _______________________ ak_22xzfNRfgYWJmsB1nFAGF3kmabuaGFTzWRobNdpturBgHF83Cx Amount __________________________________ 50ae Payload _________________________________ ba_Xfbg4g== Fee _____________________________________ 0.00001688ae Nonce ___________________________________ 1513 - Version _________________________________ 1 ``` From 8a9c0fab17cdd7610eef96a01ae947b7f30fcb39 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 16 Apr 2024 10:02:31 +1000 Subject: [PATCH 84/88] chore(account): show balance as ae --- README.md | 4 ++-- src/actions/inspect.js | 4 ++-- test/inspect.js | 4 ++-- user-guide.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f16dfdd1..74131645 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,9 @@ Run `$ aecli inspect ` to ensure that it got coins. ``` $ aecli inspect ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E Account ID ______________________________ ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E -Account balance _________________________ 10000000000000000000000 +Account balance _________________________ 10000ae Account nonce ___________________________ 0 -Pending transactions: +No pending transactions ``` diff --git a/src/actions/inspect.js b/src/actions/inspect.js index 224e5d19..7b4c0b0e 100644 --- a/src/actions/inspect.js +++ b/src/actions/inspect.js @@ -51,9 +51,9 @@ async function getAccountByHash(hash, { json, ...options }) { }); } else { printUnderscored('Account ID', hash); - printUnderscored('Account balance', balance); + printUnderscored('Account balance', formatCoins(balance)); printUnderscored('Account nonce', nonce); - print('Pending transactions:'); + print(transactions.length ? 'Pending transactions:' : 'No pending transactions'); printBlockTransactions(transactions); } } diff --git a/test/inspect.js b/test/inspect.js index 2487f89d..f465ae36 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -27,9 +27,9 @@ describe('Inspect Module', () => { const res = await executeInspect(sdk.address); expect(res).to.equal(` Account ID ______________________________ ${sdk.address} -Account balance _________________________ ${balance} +Account balance _________________________ 50ae Account nonce ___________________________ ${resJson.nonce} -Pending transactions: +No pending transactions `.trim()); }); diff --git a/user-guide.md b/user-guide.md index b1d2c303..f526bb17 100644 --- a/user-guide.md +++ b/user-guide.md @@ -110,9 +110,9 @@ The [`inspect`](./reference.md#inspect) command allows you to see inside various ``` $ aecli inspect ak_22xzfNRfgYWJmsB1nFAGF3kmabuaGFTzWRobNdpturBgHF83Cx Account ID ______________________________ ak_22xzfNRfgYWJmsB1nFAGF3kmabuaGFTzWRobNdpturBgHF83Cx -Account balance _________________________ 52134250100000000000 +Account balance _________________________ 52.1342501ae Account nonce ___________________________ 3 -Pending transactions: +No pending transactions ``` #### inspect transaction ``` From fbc4de7d4df5c0ad4829510220855f381d865a62 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 16 Apr 2024 10:06:39 +1000 Subject: [PATCH 85/88] chore(contract): remove duplicate data in call result --- src/actions/contract.js | 13 +++++-------- user-guide.md | 4 +--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/actions/contract.js b/src/actions/contract.js index ceec458f..46badbc4 100644 --- a/src/actions/contract.js +++ b/src/actions/contract.js @@ -3,7 +3,7 @@ import { encode } from '@aeternity/aepp-sdk'; import { initSdk, initSdkByWalletFile } from '../utils/cli.js'; import { print, printTransaction, printUnderscored } from '../utils/print.js'; import CliError from '../utils/CliError.js'; -import { getFullPath } from '../utils/helpers.js'; +import { formatCoins, getFullPath } from '../utils/helpers.js'; const DESCRIPTOR_VERSION = 1; @@ -105,14 +105,11 @@ export async function call(fn, args, walletPath, options) { }); if (json) print(callResult); else { - if (callResult.hash) { - await printTransaction(await sdk.api.getTransactionByHash(callResult.hash), json, sdk); - } + await printTransaction(callResult.txData, json, sdk); print('----------------------Call info-----------------------'); - printUnderscored('Contract address', contract.$options.address); - printUnderscored('Gas price', callResult.result?.gasPrice); - printUnderscored('Gas used', callResult.result?.gasUsed); - printUnderscored('Return value (encoded)', callResult.result?.returnValue); + const gasCoins = BigInt(callResult.result.gasUsed) * callResult.txData.tx.gasPrice; + printUnderscored('Gas used', `${callResult.result.gasUsed} (${formatCoins(gasCoins)})`); + printUnderscored('Return value (encoded)', callResult.result.returnValue); printUnderscored('Return value (decoded)', callResult.decodedResult); } } diff --git a/user-guide.md b/user-guide.md index f526bb17..5596b03f 100644 --- a/user-guide.md +++ b/user-guide.md @@ -89,9 +89,7 @@ Fee _____________________________________ 0.00018198ae Nonce ___________________________________ 3 TTL _____________________________________ 7 (in 6 minutes) ----------------------Call info----------------------- -Contract address ________________________ ct_5MbRKEb77pJVZrjVrQYHu2nzr2EKojuthotio1vZ2Q23dkYkV -Gas price _______________________________ 1000000000 -Gas used ________________________________ 25 +Gas used ________________________________ 25 (0.000000025ae) Return value (encoded) __________________ cb_BvMDXHk= Return value (decoded) __________________ 3 ``` From 6db5dc216b8fc07de501385524e944676f8fab7e Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 16 Apr 2024 10:53:16 +1000 Subject: [PATCH 86/88] refactor(oracle)!: remove `oracle get` BREAKING CHANGE: `aecli oracle get` removed Use `aecli inspect` instead. --- README.md | 1 - reference.md | 22 ---------------- src/actions/inspect.js | 2 +- src/actions/oracle.js | 18 ++----------- src/commands/oracle.js | 28 +++++++------------- test/inspect.js | 45 +++++++++++++++++++++++++++----- test/oracle.js | 58 ------------------------------------------ 7 files changed, 51 insertions(+), 123 deletions(-) diff --git a/README.md b/README.md index 74131645..93cd48df 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,6 @@ Find out more in the [user guide](./user-guide.md). - [`call`](./reference.md#call) — execute a function of the contract - [`deploy`](./reference.md#deploy) — deploy a contract on the chain - `oracle` - - [`get`](./reference.md#get) — print oracle details - [`create`](./reference.md#create-1) — register current account as oracle - [`extend`](./reference.md#extend-1) — extend oracle's time to leave - [`create-query`](./reference.md#create-query) — create an oracle query diff --git a/reference.md b/reference.md index 0b85dbc6..44c7e3b7 100644 --- a/reference.md +++ b/reference.md @@ -23,7 +23,6 @@ - [`call`](#call) — execute a function of the contract - [`deploy`](#deploy) — deploy a contract on the chain - `oracle` - - [`get`](#get) — print oracle details - [`create`](#create-1) — register current account as oracle - [`extend`](#extend-1) — extend oracle's time to leave - [`create-query`](#create-query) — create an oracle query @@ -691,27 +690,6 @@ $ aecli contract deploy ./wallet.json --contractBytecode ./contract.txt --contra # oracle group -## get -``` -aecli oracle get [options] -``` - -Print oracle details. - -#### Options -`-u, --url [nodeUrl]` -Node to connect to (default: mainnet, env: AECLI_NODE_URL). -`-f, --force` -Ignore node version compatibility check. -`--json` -Print result in json format. - -#### Example calls -``` -$ aecli oracle get ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi -``` - - ## create ``` aecli oracle create [options] diff --git a/src/actions/inspect.js b/src/actions/inspect.js index 7b4c0b0e..68c41255 100644 --- a/src/actions/inspect.js +++ b/src/actions/inspect.js @@ -113,7 +113,7 @@ async function getOracle(oracleId, { json, ...options }) { return; } printOracle(oracle); - if (oracle.queries) printQueries(oracle.queries); + printQueries(oracle.queries); } export default async function inspect(hash, option) { diff --git a/src/actions/oracle.js b/src/actions/oracle.js index db7bd0d9..3c38386e 100644 --- a/src/actions/oracle.js +++ b/src/actions/oracle.js @@ -1,9 +1,7 @@ import { ORACLE_TTL_TYPES } from '@aeternity/aepp-sdk'; -import { initSdk, initSdkByWalletFile } from '../utils/cli.js'; +import { initSdkByWalletFile } from '../utils/cli.js'; import { decode } from '../utils/helpers.js'; -import { - print, printOracle, printQueries, printTransaction, -} from '../utils/print.js'; +import { printTransaction } from '../utils/print.js'; import CliError from '../utils/CliError.js'; function ensureTtlANumber(ttl, name) { @@ -99,15 +97,3 @@ export async function respondToQuery(walletPath, queryId, response, options) { }); await printTransaction(queryResponse, json, sdk); } - -export async function queryOracle(oracleId, { json, ...options }) { - decode(oracleId, 'ok'); - const sdk = initSdk(options); - const oracle = await sdk.api.getOracleByPubkey(oracleId); - const { oracleQueries: queries } = await sdk.api.getOracleQueriesByPubkey(oracleId); - if (json) print({ ...oracle, queries }); - else { - printOracle(oracle, json); - printQueries(queries, json); - } -} diff --git a/src/commands/oracle.js b/src/commands/oracle.js index 9a8005db..814bce50 100644 --- a/src/commands/oracle.js +++ b/src/commands/oracle.js @@ -10,6 +10,10 @@ const program = new Command('oracle').summary('interact with oracles'); const addCommonOptions = (cmd, example) => { cmd + .addOption(passwordOption) + .addOption(ttlOption(true)) + .addOption(feeOption) + .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with') .addOption(nodeOption) .addOption(forceOption) .addOption(jsonOption); @@ -18,31 +22,17 @@ const addCommonOptions = (cmd, example) => { addExamples(cmd, [example]); }; -let command = program.command('get ') - .summary('print oracle details') - .action(Oracle.queryOracle); -addCommonOptions(command, exampleOracle); - -const addTxOptions = (cmd, example) => { - cmd - .addOption(passwordOption) - .addOption(ttlOption(true)) - .addOption(feeOption) - .option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with'); - addCommonOptions(cmd, example); -}; - -command = program.command('create ') +let command = program.command('create ') .option('--oracleTtl [oracleTtl]', 'Relative oracle time to leave', ORACLE_TTL.value) .option('--queryFee [queryFee]', 'Oracle query fee', 0) .summary('register current account as oracle') .action(Oracle.createOracle); -addTxOptions(command, './wallet.json string string'); +addCommonOptions(command, './wallet.json string string'); command = program.command('extend ') .summary('extend oracle\'s time to leave') .action(Oracle.extendOracle); -addTxOptions(command, './wallet.json 200'); +addCommonOptions(command, './wallet.json 200'); command = program.command('create-query ') .option('--responseTtl [responseTtl]', 'Relative query response time to leave', RESPONSE_TTL.value) @@ -50,12 +40,12 @@ command = program.command('create-query ') .option('--queryFee [queryFee]', 'Oracle query fee', 0) .summary('create an oracle query') .action(Oracle.createOracleQuery); -addTxOptions(command, `./wallet.json ${exampleOracle} WhatTheWeatherIs?`); +addCommonOptions(command, `./wallet.json ${exampleOracle} WhatTheWeatherIs?`); command = program.command('respond-query ') .option('--responseTtl [responseTtl]', 'Query response time to leave', RESPONSE_TTL.value) .summary('respond to an oracle query') .action(Oracle.respondToQuery); -addTxOptions(command, `./wallet.json ${exampleOracleQuery} +16Degree`); +addCommonOptions(command, `./wallet.json ${exampleOracleQuery} +16Degree`); export default program; diff --git a/test/inspect.js b/test/inspect.js index f465ae36..45ef984b 100644 --- a/test/inspect.js +++ b/test/inspect.js @@ -204,27 +204,60 @@ deposit _________________________________ 0 `.trim()); }); + it('Inspect non existing Oracle', async () => { + const fakeOracleId = generateKeyPair().publicKey.replace('ak_', 'ok_'); + await executeInspect(fakeOracleId, '--json') + .should.be.rejectedWith('error: Oracle not found'); + }); + it('Inspect Oracle', async () => { - const { id } = await sdk.registerOracle('', ''); - const resJson = await executeInspect(id, '--json'); + const { id: oracleId } = await sdk.registerOracle('', ''); + const { id: queryId } = await sdk.postQueryToOracle(oracleId, 'Hello?'); + const resJson = await executeInspect(oracleId, '--json'); expect(resJson).to.eql({ - id, + id: oracleId, abiVersion: AbiVersion.NoAbi.toString(), - queries: [], + queries: [{ + fee: '0', + id: queryId, + oracleId, + query: 'ov_SGVsbG8/0oNcUw==', + response: 'or_Xfbg4g==', + responseTtl: { + type: 'delta', + value: '10', + }, + senderId: sdk.address, + senderNonce: '4', + ttl: resJson.queries[0].ttl, + }], queryFee: '0', queryFormat: '', responseFormat: '', ttl: resJson.ttl, }); - const res = await executeInspect(id); + const res = await executeInspect(oracleId); + // TODO: "no response" message instead of empty string in "Response decoded" expect(res).to.equal(` -Oracle ID _______________________________ ${id} +Oracle ID _______________________________ ${oracleId} Oracle Query Fee ________________________ 0 Oracle Query Format _____________________ Oracle Response Format __________________ Ttl _____________________________________ ${resJson.ttl} --------------------------------- QUERIES ------------------------------------ +Oracle ID _______________________________ ${oracleId} +Query ID ________________________________ ${queryId} +Fee _____________________________________ 0 +Query ___________________________________ ov_SGVsbG8/0oNcUw== +Query decoded ___________________________ Hello? +Response ________________________________ or_Xfbg4g== +Response decoded ________________________${' '} +Response Ttl ____________________________ {"type":"delta","value":"10"} +Sender Id _______________________________ ${sdk.address} +Sender Nonce ____________________________ 4 +Ttl _____________________________________ ${resJson.queries[0].ttl} +------------------------------------------------------------------------------ `.trim()); }); diff --git a/test/oracle.js b/test/oracle.js index 293f09a6..13c66168 100644 --- a/test/oracle.js +++ b/test/oracle.js @@ -1,4 +1,3 @@ -import { AbiVersion, generateKeyPair } from '@aeternity/aepp-sdk'; import { before, describe, it } from 'mocha'; import { expect } from 'chai'; import { executeProgram, getSdk, WALLET_NAME } from './index.js'; @@ -84,61 +83,4 @@ describe('Oracle Module', () => { const query = await oracle.getQuery(queryId); query.decodedResponse.should.be.equal('Hi!'); }); - - it('Get non existing Oracle', async () => { - const fakeOracleId = generateKeyPair().publicKey.replace('ak_', 'ok_'); - await executeOracle('get', fakeOracleId, '--json') - .should.be.rejectedWith('error: Oracle not found'); - await executeOracle('get', 'oq_d1sadasdasda', '--json') - .should.be.rejectedWith('Encoded string have a wrong type: oq (expected: ok)'); - }); - - it('Get Oracle', async () => { - const resJson = await executeOracle('get', oracleId, '--json'); - expect(resJson).to.eql({ - abiVersion: AbiVersion.NoAbi.toString(), - id: oracleId, - queries: [{ - fee: '0', - id: queryId, - oracleId, - query: 'ov_SGVsbG8/0oNcUw==', - response: 'or_SGkh73W+jw==', - responseTtl: { - type: 'delta', - value: '21', - }, - senderId: sdk.address, - senderNonce: '3', - ttl: resJson.queries[0].ttl, - }], - queryFee: '0', - queryFormat: 'string', - responseFormat: 'string', - ttl: resJson.ttl, - }); - - const res = await executeOracle('get', oracleId); - expect(res).to.equal(` -Oracle ID _______________________________ ${oracleId} -Oracle Query Fee ________________________ 0 -Oracle Query Format _____________________ string -Oracle Response Format __________________ string -Ttl _____________________________________ ${resJson.ttl} - ---------------------------------- QUERIES ------------------------------------ -Oracle ID _______________________________ ${oracleId} -Query ID ________________________________ ${queryId} -Fee _____________________________________ 0 -Query ___________________________________ ov_SGVsbG8/0oNcUw== -Query decoded ___________________________ Hello? -Response ________________________________ or_SGkh73W+jw== -Response decoded ________________________ Hi! -Response Ttl ____________________________ {"type":"delta","value":"21"} -Sender Id _______________________________ ${sdk.address} -Sender Nonce ____________________________ 3 -Ttl _____________________________________ ${resJson.queries[0].ttl} ------------------------------------------------------------------------------- - `.trim()); - }); }); From 973c663e69b855e016a9b20daa9c7d66f06a3794 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 16 Apr 2024 23:30:48 +1000 Subject: [PATCH 87/88] chore(release): 6.0.0 --- CHANGELOG.md | 121 ++++++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 4 +- package.json | 2 +- 3 files changed, 124 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b42b3d57..10a0446e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,127 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [6.0.0](https://github.com/aeternity/aepp-cli-js/compare/v5.0.0...v6.0.0) (2024-04-16) + + +### ⚠ BREAKING CHANGES + +* **oracle:** `aecli oracle get` removed +Use `aecli inspect` instead. +* **oracle:** aecli won't accept already known account address in oracles +Remove extra argument: +```diff +- $ aecli oracle extend ./wallet.json ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi 200 ++ $ aecli oracle extend ./wallet.json 200 +- $ aecli oracle respond-query ./wallet.json ok_2a1j2Mk9YSmC1gi... oq_6y3N9KqQb74QsvR... +16Degree ++ $ aecli oracle respond-query ./wallet.json oq_6y3N9KqQb74QsvR... +16Degree +``` +* **account:** `aecli account verify-message` accepts signer address instead wallet +* **chain:** `aecli chain network_id` removed +Use `aecli chain status` instead. +* Commands don't accept `--no-waitMined` anymore +In the most cases transactions gets mined immediately. In case of NameClaim, tx needs to be +submitted in the next keyblock after preclaim. In that case it would be mined also immediately, +with no early name revealing. +If still needed, use `aecli chain broadcast tx_... --no-waitMined` instead. +* **account:** `account save` removed +Use `account create` instead: +```diff +-$ aecli account save ./my-wallet.json ++$ aecli account create ./my-wallet.json +``` +* **account:** `aecli account spend` renamed to `aecli spend` +* **chain:** aecli connects to mainnet by default +Use +``` +$ aecli select-node https://testnet.aeternity.io +``` +to switch back to testnet. +* require nodejs@18 or newer +Because nodejs@16 is not maintained currently. +* **name:** `name lookup` command removed +Use `inspect` instead. +```diff +- aecli name lookup ++ aecli inspect +``` +* **account:** `account generate` command removed +Use `account create` in a cycle instead. +* **crypto:** `crypto sign` command removed +Use `account sign` instead. +* **crypto:** `crypto unpack` command removed +Use `inspect` instead. +```diff +- aecli crypto unpack ++ aecli inspect +``` +* **crypto:** `crypto decode` removed +Use another base58 decoder if necessary. +* **account:** `account balance`, `account nonce` commands removed +Use `inspect ` instead. +```diff +- aecli account balance wallet.json --password=123 +- aecli account nonce wallet.json --password=123 ++ address=$(aecli account address wallet.json --json --password=123 | jq -r .publicKey) ++ aecli inspect $address +``` +* **account:** remove useless `output` option +* **account:** `account spend` returns unwrapped JSON +```diff +- aecli account spend ... | jq .tx.tx.amount ++ aecli account spend ... | jq .tx.amount +``` +* **account:** `account transfer` command removed +Use `account spend` instead. +```diff +- aecli account transfer 0.42 ++ aecli account spend 42% +``` + +### Features + +* **account:** accept password in env variable, notice password recorded ([302c8b3](https://github.com/aeternity/aepp-cli-js/commit/302c8b318447e8c74147dbbcd21b61156db3ed4a)) +* **account:** show approximate tx execution cost before asking password ([9c97844](https://github.com/aeternity/aepp-cli-js/commit/9c9784474a13ade972c36b3b7992ea3689383777)) +* **account:** verify message by address instead wallet ([4128276](https://github.com/aeternity/aepp-cli-js/commit/412827674d8ac57b484584ca63afe917f5ef68a0)) +* **aens:** don't require name ttl in `name extend` ([0d4aa51](https://github.com/aeternity/aepp-cli-js/commit/0d4aa5157f861b98eb25f5b1b4f93af79a9da018)) +* **aens:** print missed name details, be human-friendly ([91c7731](https://github.com/aeternity/aepp-cli-js/commit/91c773198b5d52e3665ed889b1d33d0c8391fa8d)) +* **aens:** show auction details ([75217c3](https://github.com/aeternity/aepp-cli-js/commit/75217c3c97ecb93b97521b626a0099e789b8fc33)) +* **chain:** show protocol version in config ([35496fb](https://github.com/aeternity/aepp-cli-js/commit/35496fbb2d5f80d657a784a17151f37350f2643d)) +* **contract:** accept amount in contract and tx builder commands ([1dbd195](https://github.com/aeternity/aepp-cli-js/commit/1dbd19557ccba9d89f99a48ea1f3d588d5022cd0)) +* show extra info in tx details, consistent fields naming ([5a9f4cc](https://github.com/aeternity/aepp-cli-js/commit/5a9f4cc31750cbc82cb3c4179935c8efda402d5f)) + + +### Bug Fixes + +* **account:** don't ask for password if it is empty ([daefd21](https://github.com/aeternity/aepp-cli-js/commit/daefd21a97e84c9bdecaf5aed4d8d22075968e1f)) +* **account:** don't ask password if it is not required ([54d70fb](https://github.com/aeternity/aepp-cli-js/commit/54d70fbeae91627e8f4e9aa982d0ea5285d7d6be)) +* **aens:** handle revoked names, refactor docs ([70b46c2](https://github.com/aeternity/aepp-cli-js/commit/70b46c2b97de4004d9aef743f82b753c66cc12db)) +* **chain:** use mainnet instead testnet by default ([5a81814](https://github.com/aeternity/aepp-cli-js/commit/5a81814bf39e156e00e8f8c6ed6d903770725446)) +* **contract:** don't show stacktrace if static contract call failed ([694d400](https://github.com/aeternity/aepp-cli-js/commit/694d40032d029588a3c13f088647a1e7806d7493)) +* **contract:** don't use `-G` flag for both gas and gas price ([047cf8e](https://github.com/aeternity/aepp-cli-js/commit/047cf8e20589fdcb597e96176c1d60f9f506cc8b)) +* don't accept `--networkId` in commands where node is required ([cfd7ac5](https://github.com/aeternity/aepp-cli-js/commit/cfd7ac5b1caf930eefeb1a7c44da0bc0ccce71e8)) +* don't print contract deposit because it can't be used ([47e0306](https://github.com/aeternity/aepp-cli-js/commit/47e0306cb0bbccfdc7ee51da017e1293c4dd70d6)) +* don't show stacktraces for RestErrors ([e7f2e58](https://github.com/aeternity/aepp-cli-js/commit/e7f2e58bae89834f44e0d220c2b5748521c7fdfd)) +* **oracle:** don't require extra arguments, refactor examples ([4fada6e](https://github.com/aeternity/aepp-cli-js/commit/4fada6e2abcab38649dea793a79d877d5fd32df2)) +* **oracle:** remove extra arguments in tx builder, refactor, fix examples ([e3be365](https://github.com/aeternity/aepp-cli-js/commit/e3be36575f32d9c346048e5d0a7495017be0e9d1)) + + +* **account:** combine `account create` and `account save` ([fdaeeff](https://github.com/aeternity/aepp-cli-js/commit/fdaeeff250c8e267de000b0bb244e07422014553)) +* **account:** combine spend and transfer commands ([2a2a94b](https://github.com/aeternity/aepp-cli-js/commit/2a2a94b76a67d96154f45d9da3f1cd1ad338c1b3)) +* **account:** move `aecli account spend` to `aecli spend` ([4af1b4c](https://github.com/aeternity/aepp-cli-js/commit/4af1b4ced43a9f6af82d333b9572aed783f5e9f1)) +* **account:** remove extra object wrapping json output ([b1d4585](https://github.com/aeternity/aepp-cli-js/commit/b1d4585765fdd380502a28583c7a98bf6a1f1a74)) +* **account:** remove unnecessary `account generate` command ([1c6abd8](https://github.com/aeternity/aepp-cli-js/commit/1c6abd8cc324437c85e6b139c9b424bd1330e0f2)) +* **account:** remove unnecessary `balance`, `nonce` commands ([b4792e6](https://github.com/aeternity/aepp-cli-js/commit/b4792e686d5595be65c57c233e986d71eb82308e)) +* **account:** remove useless `output` option ([74a8a37](https://github.com/aeternity/aepp-cli-js/commit/74a8a37004e8368b1886f7ba8aa745d96ed3c14b)) +* **chain:** remove `network_id` command ([4d4adce](https://github.com/aeternity/aepp-cli-js/commit/4d4adce835917c6cdaa67164b7a84ff689316bb7)) +* **crypto:** remove duplicate `crypto sign` command ([bb39f07](https://github.com/aeternity/aepp-cli-js/commit/bb39f079188760f5c7aaf16765475e00f08ff0dc)) +* **crypto:** remove duplicate `crypto unpack` command ([37b9965](https://github.com/aeternity/aepp-cli-js/commit/37b996570d44766fe0f1f3b10b2951330d8291fa)) +* **crypto:** remove unnecessary `crypto decode` command ([a0d9b05](https://github.com/aeternity/aepp-cli-js/commit/a0d9b059c2baf103e6eb4622e9c4bd6e2ab1dd5d)) +* **name:** remove duplicate `name lookup` command ([e4f9b50](https://github.com/aeternity/aepp-cli-js/commit/e4f9b5009b9c4f95b5349d8ce5f414e422c75d0d)) +* **oracle:** remove `oracle get` ([6db5dc2](https://github.com/aeternity/aepp-cli-js/commit/6db5dc216b8fc07de501385524e944676f8fab7e)) +* remove --no-waitMined option ([5fe7dc4](https://github.com/aeternity/aepp-cli-js/commit/5fe7dc48ac29f30a29670f8770fbc465e97f7b96)) +* require nodejs@18 ([5fd3bfa](https://github.com/aeternity/aepp-cli-js/commit/5fd3bfa06eb5d36efa67a655f62d4bf4ed8c144e)) + ## [5.0.0](https://github.com/aeternity/aepp-cli-js/compare/v4.1.0...v5.0.0) (2023-04-08) diff --git a/package-lock.json b/package-lock.json index fdf98355..eb7cc5fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@aeternity/aepp-cli", - "version": "5.0.0", + "version": "6.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@aeternity/aepp-cli", - "version": "5.0.0", + "version": "6.0.0", "license": "ISC", "dependencies": { "@aeternity/aepp-sdk": "^13.3.0", diff --git a/package.json b/package.json index 0e9a173a..ba738429 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aeternity/aepp-cli", - "version": "5.0.0", + "version": "6.0.0", "description": "Aeternity command line interface", "bin": { "aecli": "src/aecli.js" From 026f050cdccf4b823cafd205fc727444dfb74740 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Tue, 16 Apr 2024 23:50:56 +1000 Subject: [PATCH 88/88] docs(release): reformat migration guide --- CHANGELOG.md | 67 ++++++++++++++++++++++++++++---------------- commitlint.config.js | 4 +++ 2 files changed, 47 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10a0446e..522039a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,14 @@ All notable changes to this project will be documented in this file. See [standa ## [6.0.0](https://github.com/aeternity/aepp-cli-js/compare/v5.0.0...v6.0.0) (2024-04-16) +*Check out the new documentation at [docs.aeternity.com/aepp-cli-js](https://docs.aeternity.com/aepp-cli-js/)* ### ⚠ BREAKING CHANGES -* **oracle:** `aecli oracle get` removed +#### **oracle:** `aecli oracle get` removed Use `aecli inspect` instead. -* **oracle:** aecli won't accept already known account address in oracles + +#### **oracle:** aecli don't accept already known account address in oracles Remove extra argument: ```diff - $ aecli oracle extend ./wallet.json ok_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi 200 @@ -17,66 +19,81 @@ Remove extra argument: - $ aecli oracle respond-query ./wallet.json ok_2a1j2Mk9YSmC1gi... oq_6y3N9KqQb74QsvR... +16Degree + $ aecli oracle respond-query ./wallet.json oq_6y3N9KqQb74QsvR... +16Degree ``` -* **account:** `aecli account verify-message` accepts signer address instead wallet -* **chain:** `aecli chain network_id` removed + +#### **account:** `aecli account verify-message` accepts signer address instead wallet + +#### **chain:** `aecli chain network_id` removed Use `aecli chain status` instead. -* Commands don't accept `--no-waitMined` anymore + +#### Commands don't accept `--no-waitMined` anymore In the most cases transactions gets mined immediately. In case of NameClaim, tx needs to be submitted in the next keyblock after preclaim. In that case it would be mined also immediately, with no early name revealing. If still needed, use `aecli chain broadcast tx_... --no-waitMined` instead. -* **account:** `account save` removed + +#### **account:** `account save` removed Use `account create` instead: ```diff -$ aecli account save ./my-wallet.json +$ aecli account create ./my-wallet.json ``` -* **account:** `aecli account spend` renamed to `aecli spend` -* **chain:** aecli connects to mainnet by default -Use + +#### **account:** `aecli account spend` renamed to `aecli spend` + +#### **chain:** aecli connects to mainnet by default +Use the below to switch back to testnet. ``` $ aecli select-node https://testnet.aeternity.io ``` -to switch back to testnet. -* require nodejs@18 or newer + +#### require nodejs@18 or newer Because nodejs@16 is not maintained currently. -* **name:** `name lookup` command removed + +#### **name:** `name lookup` command removed Use `inspect` instead. ```diff - aecli name lookup + aecli inspect ``` -* **account:** `account generate` command removed + +#### **account:** `account generate` command removed Use `account create` in a cycle instead. -* **crypto:** `crypto sign` command removed + +#### **crypto:** `crypto sign` command removed Use `account sign` instead. -* **crypto:** `crypto unpack` command removed + +#### **crypto:** `crypto unpack` command removed Use `inspect` instead. ```diff - aecli crypto unpack + aecli inspect ``` -* **crypto:** `crypto decode` removed + +#### **crypto:** `crypto decode` removed Use another base58 decoder if necessary. -* **account:** `account balance`, `account nonce` commands removed + +#### **account:** `account balance`, `account nonce` commands removed Use `inspect ` instead. ```diff - aecli account balance wallet.json --password=123 - aecli account nonce wallet.json --password=123 -+ address=$(aecli account address wallet.json --json --password=123 | jq -r .publicKey) ++ address=$(aecli account address wallet.json --json | jq -r .publicKey) + aecli inspect $address ``` -* **account:** remove useless `output` option -* **account:** `account spend` returns unwrapped JSON + +#### **account:** remove useless `output` option + +#### **account:** `account spend` returns unwrapped JSON ```diff - aecli account spend ... | jq .tx.tx.amount -+ aecli account spend ... | jq .tx.amount ++ aecli spend ... | jq .tx.amount ``` -* **account:** `account transfer` command removed -Use `account spend` instead. + +#### **account:** `account transfer` command removed +Use `spend` instead. ```diff - aecli account transfer 0.42 -+ aecli account spend 42% ++ aecli spend 42% ``` ### Features @@ -107,6 +124,8 @@ Use `account spend` instead. * **oracle:** remove extra arguments in tx builder, refactor, fix examples ([e3be365](https://github.com/aeternity/aepp-cli-js/commit/e3be36575f32d9c346048e5d0a7495017be0e9d1)) +#### Other commits with breaking changes + * **account:** combine `account create` and `account save` ([fdaeeff](https://github.com/aeternity/aepp-cli-js/commit/fdaeeff250c8e267de000b0bb244e07422014553)) * **account:** combine spend and transfer commands ([2a2a94b](https://github.com/aeternity/aepp-cli-js/commit/2a2a94b76a67d96154f45d9da3f1cd1ad338c1b3)) * **account:** move `aecli account spend` to `aecli spend` ([4af1b4c](https://github.com/aeternity/aepp-cli-js/commit/4af1b4ced43a9f6af82d333b9572aed783f5e9f1)) diff --git a/commitlint.config.js b/commitlint.config.js index c208a4d8..44c1eb40 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -14,6 +14,10 @@ export default { 'oracle', 'release', 'tx-builder', + 'inspect', + // TODO: remove 2 after releasing 6.0.0 + 'crypto', + 'name', ], ], },