From 04331b20d33e195eaafb3fb67a9cab96cec9198d Mon Sep 17 00:00:00 2001 From: AbigailDeng Date: Wed, 1 Feb 2023 09:26:50 +0800 Subject: [PATCH 1/2] feat: add calculateTransactionFee --- README.md | 309 ++++++++++++++++++++++------------------ src/common/constants.js | 7 + 2 files changed, 179 insertions(+), 137 deletions(-) diff --git a/README.md b/README.md index 28a4fc99..0c061f08 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ You can skip 2.2 as 2.1 is enough now. In our dist directory, we supply two kinds of packages for different platforms, such as Node and Browser. | packages | usage | -|------------------|--------------------------------------------------------------| +| ---------------- | ------------------------------------------------------------ | | dist/aelf.cjs.js | built for node, remove node built-in modules such as crypto. | | dist/aelf.umd.js | built for browser, add some node built-in modules by webpack | @@ -68,7 +68,7 @@ module.exports = { 'aelf-sdk$': 'aelf-sdk/dist/aelf.umd.js' } } -} +}; ``` Rollup: @@ -83,7 +83,7 @@ rollup({ 'aelf-sdk': require.resolve('aelf-sdk/dist/aelf.umd.js') }) ] -}) +}); ``` #### For Node.js usage and use commonjs module system @@ -98,7 +98,7 @@ module.exports = { 'aelf-sdk$': 'aelf-sdk/dist/aelf.cjs.js' } } -} +}; ``` Rollup: @@ -113,7 +113,7 @@ rollup({ 'aelf-sdk': require.resolve('aelf-sdk/dist/aelf.cjs.js') }) ] -}) +}); ``` ## 3. Basic usage @@ -124,114 +124,117 @@ You can also see full examples in [./examples](./examples); 1. Create a new instance of AElf, connect to an AELF chain node. - ```javascript - import AElf from 'aelf-sdk'; + ```javascript + import AElf from 'aelf-sdk'; - // create a new instance of AElf - const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:1235')); - ``` + // create a new instance of AElf + const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:1235')); + ``` 2. Create or load a wallet with `AElf.wallet` - ```javascript - // create a new wallet - const newWallet = AElf.wallet.createNewWallet(); - // load a wallet by private key - const priviteKeyWallet = AElf.wallet.getWalletByPrivateKey('xxxxxxx'); - // load a wallet by mnemonic - const mnemonicWallet = AElf.wallet.getWalletByMnemonic('set kite ...'); - ``` + ```javascript + // create a new wallet + const newWallet = AElf.wallet.createNewWallet(); + // load a wallet by private key + const priviteKeyWallet = AElf.wallet.getWalletByPrivateKey('xxxxxxx'); + // load a wallet by mnemonic + const mnemonicWallet = AElf.wallet.getWalletByMnemonic('set kite ...'); + ``` 3. Get a system contract address, take `AElf.ContractNames.Token` as an example - ```javascript - const tokenContractName = 'AElf.ContractNames.Token'; - let tokenContractAddress; - (async () => { - // get chain status - const chainStatus = await aelf.chain.getChainStatus(); - // get genesis contract address - const GenesisContractAddress = chainStatus.GenesisContractAddress; - // get genesis contract instance - const zeroContract = await aelf.chain.contractAt(GenesisContractAddress, newWallet); - // Get contract address by the read only method `GetContractAddressByName` of genesis contract - tokenContractAddress = await zeroContract.GetContractAddressByName.call(AElf.utils.sha256(tokenContractName)); - })() - ``` + ```javascript + const tokenContractName = 'AElf.ContractNames.Token'; + let tokenContractAddress; + (async () => { + // get chain status + const chainStatus = await aelf.chain.getChainStatus(); + // get genesis contract address + const GenesisContractAddress = chainStatus.GenesisContractAddress; + // get genesis contract instance + const zeroContract = await aelf.chain.contractAt(GenesisContractAddress, newWallet); + // Get contract address by the read only method `GetContractAddressByName` of genesis contract + tokenContractAddress = await zeroContract.GetContractAddressByName.call(AElf.utils.sha256(tokenContractName)); + })(); + ``` 4. Get a contract instance by contract address - ```javascript - const wallet = AElf.wallet.createNewWallet(); - let tokenContract; - // Use token contract for examples to demonstrate how to get a contract instance in different ways - // in async function - (async () => { - tokenContract = await aelf.chain.contractAt(tokenContractAddress, wallet) - })(); - - // promise way - aelf.chain.contractAt(tokenContractAddress, wallet) - .then(result => { - tokenContract = result; - }); - - // callback way - aelf.chain.contractAt(tokenContractAddress, wallet, (error, result) => {if (error) throw error; tokenContract = result;}); - - ``` + ```javascript + const wallet = AElf.wallet.createNewWallet(); + let tokenContract; + // Use token contract for examples to demonstrate how to get a contract instance in different ways + // in async function + (async () => { + tokenContract = await aelf.chain.contractAt(tokenContractAddress, wallet); + })(); + + // promise way + aelf.chain.contractAt(tokenContractAddress, wallet).then((result) => { + tokenContract = result; + }); + + // callback way + aelf.chain.contractAt(tokenContractAddress, wallet, (error, result) => { + if (error) throw error; + tokenContract = result; + }); + ``` 5. How to use contract instance - A contract instance consists of several contract methods and methods can be called in two ways: read-only and send transaction. - - ```javascript - (async () => { - // get the balance of an address, this would not send a transaction, - // or store any data on the chain, or required any transaction fee, only get the balance - // with `.call` method, `aelf-sdk` will only call read-only method - const result = await tokenContract.GetBalance.call({ - symbol: "ELF", - owner: "7s4XoUHfPuqoZAwnTV7pHWZAaivMiL8aZrDSnY9brE1woa8vz" - }); - console.log(result); - /** - { - "symbol": "ELF", - "owner": "2661mQaaPnzLCoqXPeys3Vzf2wtGM1kSrqVBgNY4JUaGBxEsX8", - "balance": "1000000000000" - }*/ - // with no `.call`, `aelf-sdk` will sign and send a transaction to the chain, and return a transaction id. - // make sure you have enough transaction fee `ELF` in your wallet - const transactionId = await tokenContract.Transfer({ - symbol: "ELF", - to: "7s4XoUHfPuqoZAwnTV7pHWZAaivMiL8aZrDSnY9brE1woa8vz", - amount: "1000000000", - memo: "transfer in demo" - }); - console.log(transactionId); - /** - { - "TransactionId": "123123" - } - */ - })() - ``` + A contract instance consists of several contract methods and methods can be called in two ways: read-only and send transaction. + + ```javascript + (async () => { + // get the balance of an address, this would not send a transaction, + // or store any data on the chain, or required any transaction fee, only get the balance + // with `.call` method, `aelf-sdk` will only call read-only method + const result = await tokenContract.GetBalance.call({ + symbol: 'ELF', + owner: '7s4XoUHfPuqoZAwnTV7pHWZAaivMiL8aZrDSnY9brE1woa8vz' + }); + console.log(result); + /** + { + "symbol": "ELF", + "owner": "2661mQaaPnzLCoqXPeys3Vzf2wtGM1kSrqVBgNY4JUaGBxEsX8", + "balance": "1000000000000" + }*/ + // with no `.call`, `aelf-sdk` will sign and send a transaction to the chain, and return a transaction id. + // make sure you have enough transaction fee `ELF` in your wallet + const transactionId = await tokenContract.Transfer({ + symbol: 'ELF', + to: '7s4XoUHfPuqoZAwnTV7pHWZAaivMiL8aZrDSnY9brE1woa8vz', + amount: '1000000000', + memo: 'transfer in demo' + }); + console.log(transactionId); + /** + { + "TransactionId": "123123" + } + */ + })(); + ``` 6. Change the node endpoint by using `aelf.setProvider` - ```javascript - import AElf from 'aelf-sdk'; + ```javascript + import AElf from 'aelf-sdk'; - const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:1235')); - aelf.setProvider(new AElf.providers.HttpProvider('http://127.0.0.1:8000')); - ``` + const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:1235')); + aelf.setProvider(new AElf.providers.HttpProvider('http://127.0.0.1:8000')); + ``` ### 3.2 Web API -*You can see how the Web Api of the node works in `{chainAddress}/swagger/index.html`* +_You can see how the Web Api of the node works in `{chainAddress}/swagger/index.html`_ _tip: for an example, my local address: 'http://127.0.0.1:1235/swagger/index.html'_ +parameters and returns based on the URL: `https://aelf-public-node.aelf.io/swagger/index.html` + The usage of these methods is based on the AElf instance, so if you don't have one please create it: ```javascript @@ -269,14 +272,12 @@ _Returns_ - `BestChainHash - String` - `BestChainHeight - Number` - _Example_ ```javascript -aelf.chain.getChainStatus() -.then(res => { +aelf.chain.getChainStatus().then((res) => { console.log(res); -}) +}); ``` #### getContractFileDescriptorSet @@ -288,6 +289,7 @@ _Web API path_ `/api/blockChain/contractFileDescriptorSet` _Parameters_ + 1. `contractAddress - String` address of a contract _Returns_ @@ -295,11 +297,11 @@ _Returns_ `String` _Example_ + ```javascript -aelf.chain.getContractFileDescriptorSet(contractAddress) - .then(res => { - console.log(res); - }) +aelf.chain.getContractFileDescriptorSet(contractAddress).then((res) => { + console.log(res); +}); ``` #### getBlockHeight @@ -319,11 +321,11 @@ _Returns_ `Number` _Example_ + ```javascript -aelf.chain.getBlockHeight() - .then(res => { - console.log(res); - }) +aelf.chain.getBlockHeight().then((res) => { + console.log(res); +}); ``` #### getBlock @@ -338,8 +340,9 @@ _Parameters_ 1. `blockHash - String` 2. `includeTransactions - Boolean` : - - `true` require transaction ids list in the block - - `false` Doesn't require transaction ids list in the block + +- `true` require transaction ids list in the block +- `false` Doesn't require transaction ids list in the block _Returns_ @@ -362,11 +365,11 @@ _Returns_ - `transactionId - String` _Example_ + ```javascript -aelf.chain.getBlock(blockHash, false) - .then(res => { - console.log(res); - }) +aelf.chain.getBlock(blockHash, false).then((res) => { + console.log(res); +}); ``` #### getBlockByHeight @@ -381,8 +384,9 @@ _Parameters_ 1. `blockHeight - Number` 2. `includeTransactions - Boolean` : - - `true` require transaction ids list in the block - - `false` Doesn't require transaction ids list in the block + +- `true` require transaction ids list in the block +- `false` Doesn't require transaction ids list in the block _Returns_ @@ -405,11 +409,11 @@ _Returns_ - `transactionId - String` _Example_ + ```javascript -aelf.chain.getBlockByHeight(12, false) - .then(res => { - console.log(res); - }) +aelf.chain.getBlockByHeight(12, false).then((res) => { + console.log(res); +}); ``` #### getTxResult @@ -449,11 +453,11 @@ _Returns_ - `Error - String` _Example_ + ```javascript -aelf.chain.getTxResult(transactionId) - .then(res => { - console.log(res); - }) +aelf.chain.getTxResult(transactionId).then((res) => { + console.log(res); +}); ``` #### getTxResults @@ -471,15 +475,16 @@ _Parameters_ 3. `limit - Number` _Returns_ - `Array` - The array of method descriptions: - - the transaction result object +`Array` - The array of method descriptions: + +- the transaction result object _Example_ + ```javascript -aelf.chain.getTxResults(blockHash, 0, 2) - .then(res => { - console.log(res); - }) +aelf.chain.getTxResults(blockHash, 0, 2).then((res) => { + console.log(res); +}); ``` #### getTransactionPoolStatus @@ -507,6 +512,7 @@ _POST_ _Parameters_ `Object` - Serialization of data into protobuf data, The object with the following structure : + - `RawTransaction - String` : usually developers don't need to use this function directly, just get a contract method and send transaction by call contract method: @@ -520,6 +526,23 @@ _POST_ _Parameters_ `Object` - The object with the following structure : + +- `RawTransaction - String` + +#### calculateTransactionFee + +Estimate transaction fee + +_Web API path_ + +`/api/blockChain/calculateTransactionFee` + +_POST_ + +_Parameters_ + +`Object` - The object with the following structure : + - `RawTransaction - String` #### callReadOnly @@ -531,6 +554,7 @@ _POST_ _Parameters_ `Object` - The object with the following structure : + - `RawTransaction - String` #### getPeers @@ -542,35 +566,41 @@ Get peer info about the connected network nodes Attempts to add a node to the connected network nodes you need to create a aelf authorization instance and set a provider + ```javascript -const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:8000', 8000, { "Authorization": AElf.utils.getAuthorization('UseName', 'Password') })); +const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:8000', 8000, { Authorization: AElf.utils.getAuthorization('UseName', 'Password') })); ``` _Example_ + ```javascript -const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:8000', 8000, { "Authorization": AElf.utils.getAuthorization('aelf', '12345678') })); +const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:8000', 8000, { Authorization: AElf.utils.getAuthorization('aelf', '12345678') })); -aelf.chain.addPeer('192.168.11.140:6801').then(res => { - console.log(res); -}) +aelf.chain.addPeer('192.168.11.140:6801').then((res) => { + console.log(res); +}); ``` + #### removePeer Attempts to remove a node from the connected network nodes you need to create a aelf authorization instance and set a provider + ```javascript -const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:8000', 8000, { "Authorization": AElf.utils.getAuthorization('UseName', 'Password') })); +const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:8000', 8000, { Authorization: AElf.utils.getAuthorization('UseName', 'Password') })); ``` _Example_ + ```javascript -const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:8000', 8000, { "Authorization": AElf.utils.getAuthorization('aelf', '12345678') })); +const aelf = new AElf(new AElf.providers.HttpProvider('http://127.0.0.1:8000', 8000, { Authorization: AElf.utils.getAuthorization('aelf', '12345678') })); -aelf.chain.removePeer('192.168.11.140:6801').then(res => { - console.log(res); -}) +aelf.chain.removePeer('192.168.11.140:6801').then((res) => { + console.log(res); +}); ``` + #### networkInfo Get information about the node’s connection to the network @@ -595,6 +625,7 @@ _Returns_ - `address - String`: address _Example_ + ```javascript import AElf from 'aelf-sdk'; const wallet = AElf.wallet.createNewWallet(); @@ -611,6 +642,7 @@ _Returns_ `Object`: Complete wallet object. _Example_ + ```javascript const wallet = AElf.wallet.getWalletByMnemonic(mnemonic); ``` @@ -626,6 +658,7 @@ _Returns_ `Object`: Complete wallet object, with empty mnemonic _Example_ + ```javascript const wallet = AElf.wallet.getWalletByPrivateKey(privateKey); ``` @@ -635,6 +668,7 @@ const wallet = AElf.wallet.getWalletByPrivateKey(privateKey); Use wallet `keypair` to sign a transaction _Parameters_ + 1. `rawTxn - String` 2. `keyPair - String` @@ -643,6 +677,7 @@ _Returns_ `Object`: The object with the following structure : _Example_ + ```javascript const result = AElf.wallet.signTransaction(rawTxn, keyPair); ``` @@ -695,7 +730,7 @@ For more information, please see the code in [src/util/utils.js](./src/util/util ```javascript const AElf = require('aelf-sdk'); -const {base58} = AElf.utils; +const { base58 } = AElf.utils; base58.decode('$addresss'); // throw error if invalid ``` @@ -703,7 +738,7 @@ base58.decode('$addresss'); // throw error if invalid ```javascript import AElf from 'aelf-sdk'; -AElf.version // eg. 3.2.23 +AElf.version; // eg. 3.2.23 ``` ### 3.8 Requirements diff --git a/src/common/constants.js b/src/common/constants.js index f60f260a..f0a8bd85 100644 --- a/src/common/constants.js +++ b/src/common/constants.js @@ -88,6 +88,13 @@ export const CHAIN_METHODS = { params: ['rawTransaction'], inputFormatter: [] }, + calculateTransactionFee: { + name: 'calculateTransactionFee', + call: 'blockChain/calculateTransactionFee', + method: 'POST', + params: ['rawTransaction'], + inputFormatter: [] + }, callReadOnly: { name: 'callReadOnly', call: 'blockChain/executeTransaction', From 1f20b26dea2b19c61fa998ccd3a96e482bd11bc0 Mon Sep 17 00:00:00 2001 From: AbigailDeng Date: Wed, 1 Feb 2023 09:27:39 +0800 Subject: [PATCH 2/2] feat: add limit --- package.json | 1 + yarn.lock | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 144 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d3ec7df5..c26f633e 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,7 @@ "jest-environment-jsdom-fifteen": "^1.0.0", "lint-staged": "^9.0.2", "rimraf": "^2.6.3", + "size-limit": "^8.1.2", "standard-version": "^9.1.1", "unused-files-webpack-plugin": "^3.4.0", "webpack": "^4.35.2", diff --git a/yarn.lock b/yarn.lock index db8abdb5..13c55751 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1403,6 +1403,14 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -1706,6 +1714,11 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -1780,7 +1793,7 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.1: +braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -1932,6 +1945,11 @@ bundle-analyzer@^0.0.6: opn "^5.2.0" source-map "^0.7.2" +bytes-iec@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/bytes-iec/-/bytes-iec-3.1.1.tgz#94cd36bf95c2c22a82002c247df8772d1d591083" + integrity sha512-fey6+4jDK7TFtFg/klGSvNKJctyU7n2aQdnM+CO0ruLPbqqMOM8Tio0Pc+deqUeVKX1tL5DQep1zQ7+37aTAsA== + bytes@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" @@ -2095,6 +2113,21 @@ chokidar@^2.0.2: optionalDependencies: fsevents "^1.2.7" +chokidar@^3.5.3: + version "3.5.3" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chownr@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" @@ -3487,6 +3520,17 @@ fast-glob@^3.0.3: merge2 "^1.3.0" micromatch "^4.0.2" +fast-glob@^3.2.9: + version "3.2.12" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -3775,6 +3819,11 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3906,6 +3955,13 @@ glob-parent@^5.0.0, glob-parent@^5.1.0: dependencies: is-glob "^4.0.1" +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob@7.1.4: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" @@ -4007,6 +4063,18 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: version "4.2.3" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" @@ -4266,6 +4334,11 @@ ignore@^5.1.1: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== +ignore@^5.2.0: + version "5.2.4" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -4441,6 +4514,13 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -4572,6 +4652,13 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-nan@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.0.tgz#85d1f5482f7051c2019f5673ccebdb06f3b0db03" @@ -5356,6 +5443,11 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lilconfig@^2.0.6: + version "2.0.6" + resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" + integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg== + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -5718,6 +5810,11 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== +merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + merge@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" @@ -5755,6 +5852,14 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -5948,6 +6053,13 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +nanospinner@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/nanospinner/-/nanospinner-1.1.0.tgz#d17ff621cb1784b0a206b400da88a0ef6db39b97" + integrity sha512-yFvNYMig4AthKYfHFl1sLj7B2nkHL4lzdig4osvl9/LdGbXwrdFRoqBS98gsEsOakr0yH+r5NZ/1Y9gdVB8trA== + dependencies: + picocolors "^1.0.0" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -6052,7 +6164,7 @@ normalize-path@^2.1.1: dependencies: remove-trailing-separator "^1.0.1" -normalize-path@^3.0.0: +normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -6543,6 +6655,16 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + picomatch@^2.0.5: version "2.2.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" @@ -6930,6 +7052,13 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + realpath-native@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" @@ -7494,6 +7623,18 @@ sisteransi@^1.0.3: resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3" integrity sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig== +size-limit@^8.1.2: + version "8.1.2" + resolved "https://registry.npmjs.org/size-limit/-/size-limit-8.1.2.tgz#dee99a39442e96092ab143d620d679215901abe2" + integrity sha512-/EfKz9I/K2ouBN+BcrTX2WiaPTOX5yiCXtM07jYpuVtyzX9r4FDUsuCq13nNmoWqRFYbtH/7wqgRLvF40AGKoQ== + dependencies: + bytes-iec "^3.1.1" + chokidar "^3.5.3" + globby "^11.1.0" + lilconfig "^2.0.6" + nanospinner "^1.1.0" + picocolors "^1.0.0" + slash@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"